/******************************************************************************* * Copyright 2014 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal * Chancellery Austria - ICT staff unit, and Graz University of Technology. * * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by * the European Commission - subsequent versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * http://www.osor.eu/eupl/ * * Unless required by applicable law or agreed to in writing, software * distributed under the Licence is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Licence for the specific language governing permissions and * limitations under the Licence. * * This product combines work with different licenses. See the "NOTICE" text * file for details on the various modules and licenses. * The "NOTICE" text file is part of the distribution. Any derivative works * that you distribute must include a readable copy of the "NOTICE" text file. *******************************************************************************/ /** * */ package at.gv.egovernment.moa.id.commons.api.data; import java.net.URL; import java.util.ArrayList; import java.util.List; import org.opensaml.saml2.metadata.RequestedAttribute; /** * Encpasulates C-PEPS information according MOA configuration * * @author bzwattendorfer * */ public class CPEPS { /** Country Code of C-PEPS */ private String countryCode; /** URL of C-PEPS */ private URL pepsURL; private Boolean isXMLSignatureSupported; /** Specific attributes to be requested for this C-PEPS */ private List countrySpecificRequestedAttributes = new ArrayList(); /** * Constructs a C-PEPS * @param countryCode ISO Country Code of C-PEPS * @param pepsURL URL of C-PEPS */ public CPEPS(String countryCode, URL pepsURL, Boolean isXMLSignatureSupported) { super(); this.countryCode = countryCode; this.pepsURL = pepsURL; this.isXMLSignatureSupported = isXMLSignatureSupported; } /** * Gets the country code of this C-PEPS * @return ISO country code */ public String getCountryCode() { return countryCode; } /** * Sets the country code of this C-PEPS * @param countryCode ISO country code */ public void setCountryCode(String countryCode) { this.countryCode = countryCode; } /** * Gets the URL of this C-PEPS * @return C-PEPS URL */ public URL getPepsURL() { return pepsURL; } /** * Sets the C-PEPS URL * @param pepsURL C-PEPS URL */ public void setPepsURL(URL pepsURL) { this.pepsURL = pepsURL; } /** * Returns weather the C-PEPS supports XMl Signatures or not (important for ERnB) */ public Boolean isXMLSignatureSupported() { return isXMLSignatureSupported; } /** * Sets weather the C-PEPS supports XMl Signatures or not (important for ERnB) * @param isXMLSignatureSupported C-PEPS XML Signature support */ public void setXMLSignatureSupported(boolean isXMLSignatureSupported) { this.isXMLSignatureSupported = isXMLSignatureSupported; } /** * Gets the country specific attributes of this C-PEPS * @return List of country specific attributes */ public List getCountrySpecificRequestedAttributes() { return countrySpecificRequestedAttributes; } /** * Sets the country specific attributes * @param countrySpecificRequestedAttributes List of country specific requested attributes */ public void setCountrySpecificRequestedAttributes( List countrySpecificRequestedAttributes) { this.countrySpecificRequestedAttributes = countrySpecificRequestedAttributes; } /** * Adds a Requested attribute to the country specific attribute List * @param countrySpecificRequestedAttribute Additional country specific requested attribute to add */ public void addCountrySpecificRequestedAttribute(RequestedAttribute countrySpecificRequestedAttribute) { this.countrySpecificRequestedAttributes.add(countrySpecificRequestedAttribute); } }