diff options
author | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-03-05 21:27:55 +0100 |
---|---|---|
committer | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-03-05 21:27:55 +0100 |
commit | d828b0b377a1bd61a04f0886c9d24aa1eb19c025 (patch) | |
tree | ac7f578e5cf6f4840eb5c6f662b3b6cf96a6a40e /id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/.svn/text-base/CitizenConsent.java.svn-base | |
parent | 0499a41a86a6b44092eb6ad356858cd36a3d19c0 (diff) | |
parent | 19e164874ea92d51f9df12f56047d77db9683091 (diff) | |
download | moa-id-spss-d828b0b377a1bd61a04f0886c9d24aa1eb19c025.tar.gz moa-id-spss-d828b0b377a1bd61a04f0886c9d24aa1eb19c025.tar.bz2 moa-id-spss-d828b0b377a1bd61a04f0886c9d24aa1eb19c025.zip |
Merge branch 'moa2_0_tlenz_bs_3' into moa2_0_tlenz_bs_3_ar
Conflicts:
id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java
id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKAuthnRequest.java
Diffstat (limited to 'id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/.svn/text-base/CitizenConsent.java.svn-base')
-rw-r--r-- | id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/.svn/text-base/CitizenConsent.java.svn-base | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/.svn/text-base/CitizenConsent.java.svn-base b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/.svn/text-base/CitizenConsent.java.svn-base new file mode 100644 index 000000000..9ebcfbd5a --- /dev/null +++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/.svn/text-base/CitizenConsent.java.svn-base @@ -0,0 +1,123 @@ +/* + * This work is Open Source and licensed by the European Commission under the + * conditions of the European Public License v1.1 + * + * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); + * + * any use of this file implies acceptance of the conditions of this license. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package eu.stork.peps.auth.commons; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class is a bean used to store the information relative to the Citizen + * Consent. + * + * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, + * luis.felix@multicert.com, hugo.magalhaes@multicert.com, + * paulo.ribeiro@multicert.com + * @version $Revision: 1.15 $, $Date: 2010-11-17 05:15:28 $ + */ +public final class CitizenConsent { + + /** + * Mandatory attributes list. + */ + private List<String> mandatoryList; + + /** + * Optional attributes list. + */ + private List<String> optionalList; + + /** + * Citizen Consent default Constructor. + */ + public CitizenConsent() { + this.mandatoryList = new ArrayList<String>(); + this.optionalList = new ArrayList<String>(); + } + + /** + * Getter for the mandatoryList value. + * + * @return The mandatoryList value. + */ + public List<String> getMandatoryList() { + return this.mandatoryList; + } + + /** + * Setter for the mandatoryList value. + * + * @param mandatoryAttrList Mandatory parameters list. + */ + public void setMandatoryList(final List<String> mandatoryAttrList) { + this.mandatoryList = mandatoryAttrList; + } + + /** + * Setter for some mandatoryAttribute. Adds the input parameter to the + * mandatoryList. + * + * @param mandatoryAttr Attribute to add to the mandatoryList. + */ + public void setMandatoryAttribute(final String mandatoryAttr) { + this.mandatoryList.add(mandatoryAttr); + } + + /** + * Getter for the optionalList value. + * + * @return The optionalList value. + */ + public List<String> getOptionalList() { + return optionalList; + } + + /** + * Setter for the optionalList value. + * + * @param optAttrList Optional parameters list. + */ + public void setOptionalList(final List<String> optAttrList) { + this.optionalList = optAttrList; + } + + /** + * Setter for some optionalAttr. Adds the input parameter to the optionalList. + * + * @param optionalAttr Attribute to add to the optionalList. + */ + public void setOptionalAttribute(final String optionalAttr) { + this.optionalList.add(optionalAttr); + } + + /** + * Returns a string in the following format. "Mandatory attributes: + * mandatoryAttr1;mandatoryAttr2;mandatoryAttrN Optional attributes: + * optionalAttr1;optionalAttr2;optionalAttrN" + * + * @return {@inheritDoc} + */ + public String toString() { + final StringBuilder strbldr = new StringBuilder(46); + strbldr.append("Mandatory attributes: "); + for (final String str : mandatoryList) { + strbldr.append(str).append(';'); + } + strbldr.append(" Optional attributes: "); + for (final String str : optionalList) { + strbldr.append(str).append(';'); + } + return strbldr.toString(); + } + +} |