-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'aiccra-dev' into aiccra-dev-A2-392-IPI-2.3
- Loading branch information
Showing
4 changed files
with
189 additions
and
38 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
...rc/main/java/org/cgiar/ccafs/marlo/action/json/global/ProgressActiveValidationAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/***************************************************************** | ||
* This file is part of Managing Agricultural Research for Learning & | ||
* Outcomes Platform (MARLO). | ||
* MARLO is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* at your option) any later version. | ||
* MARLO is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with MARLO. If not, see <http://www.gnu.org/licenses/>. | ||
*****************************************************************/ | ||
|
||
package org.cgiar.ccafs.marlo.action.json.global; | ||
|
||
import org.cgiar.ccafs.marlo.action.BaseAction; | ||
import org.cgiar.ccafs.marlo.utils.APConfig; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import javax.inject.Inject; | ||
|
||
import org.apache.struts2.dispatcher.Parameter; | ||
|
||
|
||
public class ProgressActiveValidationAction extends BaseAction { | ||
|
||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = 8027160696406597679L; | ||
/** | ||
* | ||
*/ | ||
private Map<String, String> status; | ||
|
||
@Inject | ||
public ProgressActiveValidationAction(APConfig config) { | ||
super(config); | ||
} | ||
|
||
@Override | ||
public String execute() throws Exception { | ||
|
||
status = new HashMap<>(); | ||
|
||
if (this.isUpKeepActive()) { | ||
status.put("isProgress", "true"); | ||
} else { | ||
status.put("isProgress", "false"); | ||
} | ||
|
||
return SUCCESS; | ||
} | ||
|
||
public Map<String, String> getStatus() { | ||
return status; | ||
} | ||
|
||
@Override | ||
public void prepare() throws Exception { | ||
Map<String, Parameter> parameters = this.getParameters(); | ||
} | ||
|
||
|
||
public void setStatus(Map<String, String> keyOutputs) { | ||
this.status = keyOutputs; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters