Skip to content

Commit 186feca

Browse files
committed
[Mobile] - Recuperer mot de passe en connecté et deconnecté
1 parent c731df4 commit 186feca

File tree

1 file changed

+13
-18
lines changed
  • jsoagger-jfxcore-engine/src/main/java/io/github/jsoagger/jfxcore/engine/client/apiimpl

1 file changed

+13
-18
lines changed

jsoagger-jfxcore-engine/src/main/java/io/github/jsoagger/jfxcore/engine/client/apiimpl/AbstractAction.java

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-
22
* ========================LICENSE_START=================================
3-
* JSoagger
3+
* JSoagger
44
* %%
55
* Copyright (C) 2019 JSOAGGER
66
* %%
@@ -21,7 +21,6 @@
2121
package io.github.jsoagger.jfxcore.engine.client.apiimpl;
2222

2323

24-
import io.github.jsoagger.jfxcore.engine.client.utils.NodeHelper;
2524
import io.github.jsoagger.core.bridge.operation.IOperation;
2625
import io.github.jsoagger.core.bridge.operation.IOperationResult;
2726
import io.github.jsoagger.core.bridge.result.OperationData;
@@ -32,11 +31,11 @@
3231
import io.github.jsoagger.jfxcore.api.IActionResult;
3332
import io.github.jsoagger.jfxcore.api.IRSHeaderHolder;
3433
import io.github.jsoagger.jfxcore.api.services.Services;
34+
import io.github.jsoagger.jfxcore.engine.client.utils.NodeHelper;
3535
import io.github.jsoagger.jfxcore.engine.controller.AbstractViewController;
3636
import io.github.jsoagger.jfxcore.engine.controller.main.RootStructureController;
3737
import io.github.jsoagger.jfxcore.engine.controller.roostructure.content.StructureContentController;
3838
import io.github.jsoagger.jfxcore.engine.controller.roostructure.content.event.SetCurrentLocationEvent;
39-
4039
import javafx.application.Platform;
4140
import javafx.beans.property.SimpleObjectProperty;
4241
import javafx.scene.Node;
@@ -48,11 +47,12 @@
4847
*/
4948
public abstract class AbstractAction implements IAction {
5049

51-
protected SimpleObjectProperty<IActionResult> resultProperty = new SimpleObjectProperty<IActionResult>();
50+
protected SimpleObjectProperty<IActionResult> resultProperty =
51+
new SimpleObjectProperty<IActionResult>();
5252

5353
protected String id;
5454
protected OperationData data;
55-
protected AbstractViewController controller;
55+
protected AbstractViewController controller;
5656

5757

5858
/**
@@ -106,27 +106,22 @@ public IOperation getOperation(IActionRequest actionRequest) {
106106
}
107107

108108

109-
/**
110-
* @param actionRequest
111-
* @return
112-
*/
113109
public boolean isForwardAndReplaceView(IActionRequest actionRequest) {
114110
boolean isForwardAndReplaceView = false;
115111
final String isForwardAndReplaceViewString = (String) actionRequest.getProperty("replace");
116-
isForwardAndReplaceView = StringUtils.hasText(isForwardAndReplaceViewString) && "true".equalsIgnoreCase(isForwardAndReplaceViewString);
112+
isForwardAndReplaceView = StringUtils.hasText(isForwardAndReplaceViewString)
113+
&& "true".equalsIgnoreCase(isForwardAndReplaceViewString);
117114
return isForwardAndReplaceView;
118115
}
119116

120117

121-
/**
122-
* Show general error message
123-
*/
124118
public void onActionGeneralError(Throwable ex) {
125119
final ActionResult ar = new ActionResult.ActionResultBuilder()
126120
.message("Oups, your request can not be processed due to internal error.")
127121
.status(ActionResultStatus.ERROR).build();
128122
resultProperty.set(ar);
129-
NodeHelper.showHeaderErrorMessage(controller, "Oups, your request can not be processed due to internal error.");
123+
NodeHelper.showHeaderErrorMessage(controller,
124+
"Oups, your request can not be processed due to internal error.");
130125
}
131126

132127

@@ -161,9 +156,8 @@ protected void createSuccess(IOperationResult operationResult) {
161156
resultProperty.set(ActionResult.success());
162157
NodeHelper.showHeaderSuccessCreateMessage(controller);
163158
} else {
164-
ActionResult ar = new ActionResult
165-
.ActionResultBuilder()
166-
.operationMessage(operationResult != null ? operationResult.getMessages(): null)
159+
ActionResult ar = new ActionResult.ActionResultBuilder()
160+
.operationMessage(operationResult != null ? operationResult.getMessages() : null)
167161
.status(ActionResultStatus.ERROR).build();
168162
resultProperty.set(ar);
169163
NodeHelper.showHeaderErrorCreateMessage(controller);
@@ -176,7 +170,8 @@ protected void createSuccess(IOperationResult operationResult) {
176170
* @param rsc
177171
* @param currentContent
178172
*/
179-
protected void updateRSCHeader(RootStructureController rsc, StructureContentController currentContent) {
173+
protected void updateRSCHeader(RootStructureController rsc,
174+
StructureContentController currentContent) {
180175
AbstractViewController c = currentContent.getCurrentContent();
181176
if (c instanceof IRSHeaderHolder) {
182177
Node ident = ((IRSHeaderHolder) c).getDisplayIdentity();

0 commit comments

Comments
 (0)