Skip to content

Commit

Permalink
[Mobile] - Recuperer mot de passe en connecté et deconnecté
Browse files Browse the repository at this point in the history
  • Loading branch information
rmvonji committed Apr 19, 2020
1 parent c731df4 commit 186feca
Showing 1 changed file with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* ========================LICENSE_START=================================
* JSoagger
* JSoagger
* %%
* Copyright (C) 2019 JSOAGGER
* %%
Expand All @@ -21,7 +21,6 @@
package io.github.jsoagger.jfxcore.engine.client.apiimpl;


import io.github.jsoagger.jfxcore.engine.client.utils.NodeHelper;
import io.github.jsoagger.core.bridge.operation.IOperation;
import io.github.jsoagger.core.bridge.operation.IOperationResult;
import io.github.jsoagger.core.bridge.result.OperationData;
Expand All @@ -32,11 +31,11 @@
import io.github.jsoagger.jfxcore.api.IActionResult;
import io.github.jsoagger.jfxcore.api.IRSHeaderHolder;
import io.github.jsoagger.jfxcore.api.services.Services;
import io.github.jsoagger.jfxcore.engine.client.utils.NodeHelper;
import io.github.jsoagger.jfxcore.engine.controller.AbstractViewController;
import io.github.jsoagger.jfxcore.engine.controller.main.RootStructureController;
import io.github.jsoagger.jfxcore.engine.controller.roostructure.content.StructureContentController;
import io.github.jsoagger.jfxcore.engine.controller.roostructure.content.event.SetCurrentLocationEvent;

import javafx.application.Platform;
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.Node;
Expand All @@ -48,11 +47,12 @@
*/
public abstract class AbstractAction implements IAction {

protected SimpleObjectProperty<IActionResult> resultProperty = new SimpleObjectProperty<IActionResult>();
protected SimpleObjectProperty<IActionResult> resultProperty =
new SimpleObjectProperty<IActionResult>();

protected String id;
protected OperationData data;
protected AbstractViewController controller;
protected AbstractViewController controller;


/**
Expand Down Expand Up @@ -106,27 +106,22 @@ public IOperation getOperation(IActionRequest actionRequest) {
}


/**
* @param actionRequest
* @return
*/
public boolean isForwardAndReplaceView(IActionRequest actionRequest) {
boolean isForwardAndReplaceView = false;
final String isForwardAndReplaceViewString = (String) actionRequest.getProperty("replace");
isForwardAndReplaceView = StringUtils.hasText(isForwardAndReplaceViewString) && "true".equalsIgnoreCase(isForwardAndReplaceViewString);
isForwardAndReplaceView = StringUtils.hasText(isForwardAndReplaceViewString)
&& "true".equalsIgnoreCase(isForwardAndReplaceViewString);
return isForwardAndReplaceView;
}


/**
* Show general error message
*/
public void onActionGeneralError(Throwable ex) {
final ActionResult ar = new ActionResult.ActionResultBuilder()
.message("Oups, your request can not be processed due to internal error.")
.status(ActionResultStatus.ERROR).build();
resultProperty.set(ar);
NodeHelper.showHeaderErrorMessage(controller, "Oups, your request can not be processed due to internal error.");
NodeHelper.showHeaderErrorMessage(controller,
"Oups, your request can not be processed due to internal error.");
}


Expand Down Expand Up @@ -161,9 +156,8 @@ protected void createSuccess(IOperationResult operationResult) {
resultProperty.set(ActionResult.success());
NodeHelper.showHeaderSuccessCreateMessage(controller);
} else {
ActionResult ar = new ActionResult
.ActionResultBuilder()
.operationMessage(operationResult != null ? operationResult.getMessages(): null)
ActionResult ar = new ActionResult.ActionResultBuilder()
.operationMessage(operationResult != null ? operationResult.getMessages() : null)
.status(ActionResultStatus.ERROR).build();
resultProperty.set(ar);
NodeHelper.showHeaderErrorCreateMessage(controller);
Expand All @@ -176,7 +170,8 @@ protected void createSuccess(IOperationResult operationResult) {
* @param rsc
* @param currentContent
*/
protected void updateRSCHeader(RootStructureController rsc, StructureContentController currentContent) {
protected void updateRSCHeader(RootStructureController rsc,
StructureContentController currentContent) {
AbstractViewController c = currentContent.getCurrentContent();
if (c instanceof IRSHeaderHolder) {
Node ident = ((IRSHeaderHolder) c).getDisplayIdentity();
Expand Down

0 comments on commit 186feca

Please sign in to comment.