diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2018-07-02 18:11:51 +0200 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2018-07-02 18:11:51 +0200 |
commit | 60c09e4d552828ec1521ed7ad0ca2a3fd3492e3a (patch) | |
tree | 29548cfb5281c3098038c683f80808d7536168d2 /connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/CountrySelectionProcessImpl.java | |
parent | ae550884f5467f6ff6df23100686bc54e100d2d4 (diff) | |
download | National_eIDAS_Gateway-60c09e4d552828ec1521ed7ad0ca2a3fd3492e3a.tar.gz National_eIDAS_Gateway-60c09e4d552828ec1521ed7ad0ca2a3fd3492e3a.tar.bz2 National_eIDAS_Gateway-60c09e4d552828ec1521ed7ad0ca2a3fd3492e3a.zip |
add country selection
Diffstat (limited to 'connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/CountrySelectionProcessImpl.java')
-rw-r--r-- | connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/CountrySelectionProcessImpl.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/CountrySelectionProcessImpl.java b/connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/CountrySelectionProcessImpl.java new file mode 100644 index 00000000..ac99f29d --- /dev/null +++ b/connector/src/main/java/at/gv/egiz/eidas/specific/connector/processes/CountrySelectionProcessImpl.java @@ -0,0 +1,42 @@ +package at.gv.egiz.eidas.specific.connector.processes; + +import org.apache.commons.lang3.StringUtils; + +import at.gv.egiz.eaaf.core.api.idp.auth.modules.AuthModule; +import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; +import at.gv.egiz.eidas.specific.connector.MSeIDASNodeConstants; + +/** + * @author tlenz + * + */ +public class CountrySelectionProcessImpl implements AuthModule { + + @Override + public int getPriority() { + return 0; + + } + + @Override + public String selectProcess(ExecutionContext context) { + Object selectedCountryObj = context.get(MSeIDASNodeConstants.REQ_PARAM_SELECTED_COUNTRY); + if (selectedCountryObj != null && selectedCountryObj instanceof String) { + String selectedCountry = (String) selectedCountryObj; + if (StringUtils.isNotEmpty(selectedCountry)) + return null; + + } + + return "CountrySelectionProcess"; + + + } + + @Override + public String[] getProcessDefinitions() { + return new String[] { "classpath:processes/CountrySelection.process.xml" }; + + } + +} |