[picketlink-commits] Picketlink SVN: r868 - federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion.

picketlink-commits at lists.jboss.org picketlink-commits at lists.jboss.org
Wed Apr 6 13:35:19 EDT 2011


Author: anil.saldhana at jboss.com
Date: 2011-04-06 13:35:18 -0400 (Wed, 06 Apr 2011)
New Revision: 868

Modified:
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AudienceRestrictionType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextClassRefType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EncryptedAssertionType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EncryptedElementType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/KeyInfoConfirmationDataType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectConfirmationDataType.java
   federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectType.java
Log:
make serializable

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AudienceRestrictionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AudienceRestrictionType.java	2011-04-06 16:27:06 UTC (rev 867)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AudienceRestrictionType.java	2011-04-06 17:35:18 UTC (rev 868)
@@ -21,6 +21,7 @@
  */
 package org.picketlink.identity.federation.newmodel.saml.v2.assertion;
 
+import java.io.Serializable;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -44,35 +45,36 @@
  * </pre>
  * 
  * 
- */ 
-public class AudienceRestrictionType
-extends ConditionAbstractType
-{ 
+ */
+public class AudienceRestrictionType extends ConditionAbstractType implements Serializable
+{
+   private static final long serialVersionUID = 1L;
+
    protected List<URI> audience = new ArrayList<URI>();
 
    /**
     * Add an audience
     * @param audienceval
     */
-   public void addAudience( URI audienceval )
+   public void addAudience(URI audienceval)
    {
-      audience.add( audienceval ); 
+      audience.add(audienceval);
    }
-   
+
    /**
     * Remove an audience
     * @param audienceval
     */
-   public void removeAudience( URI audienceval )
+   public void removeAudience(URI audienceval)
    {
-      audience.remove( audienceval ); 
+      audience.remove(audienceval);
    }
 
    /**
     * Gets the value of the audience property.  
     */
-   public List<URI> getAudience() 
-   { 
-      return Collections.unmodifiableList( this.audience );
+   public List<URI> getAudience()
+   {
+      return Collections.unmodifiableList(this.audience);
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextClassRefType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextClassRefType.java	2011-04-06 16:27:06 UTC (rev 867)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextClassRefType.java	2011-04-06 17:35:18 UTC (rev 868)
@@ -21,6 +21,7 @@
  */
 package org.picketlink.identity.federation.newmodel.saml.v2.assertion;
 
+import java.io.Serializable;
 import java.net.URI;
 
 /**
@@ -28,12 +29,14 @@
  * @author Anil.Saldhana at redhat.com
  * @since Nov 24, 2010
  */
-public class AuthnContextClassRefType implements URIType
+public class AuthnContextClassRefType implements URIType, Serializable
 {
-   private URI value;
+   private static final long serialVersionUID = 1L;
 
-   public AuthnContextClassRefType( URI value )
-   { 
+   private final URI value;
+
+   public AuthnContextClassRefType(URI value)
+   {
       this.value = value;
    }
 
@@ -75,5 +78,5 @@
       else if (!value.equals(other.value))
          return false;
       return true;
-   }  
+   }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextType.java	2011-04-06 16:27:06 UTC (rev 867)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/AuthnContextType.java	2011-04-06 17:35:18 UTC (rev 868)
@@ -21,6 +21,7 @@
  */
 package org.picketlink.identity.federation.newmodel.saml.v2.assertion;
 
+import java.io.Serializable;
 import java.net.URI;
 import java.util.Arrays;
 import java.util.Collections;
@@ -28,8 +29,6 @@
 import java.util.LinkedHashSet;
 import java.util.Set;
 
-
-
 /**
  * <p>Java class for AuthnContextType complex type.
  * 
@@ -61,50 +60,52 @@
  * </pre>
  * 
  * 
- */ 
-public class AuthnContextType 
-{  
-   private Set<URI> authenticatingAuthority = new LinkedHashSet<URI>();
+ */
+public class AuthnContextType implements Serializable
+{
+   private static final long serialVersionUID = 1L;
 
+   private final Set<URI> authenticatingAuthority = new LinkedHashSet<URI>();
+
    private AuthnContextTypeSequence sequence;
 
-   private Set<URIType> URITypes = new HashSet<URIType>();
+   private final Set<URIType> URITypes = new HashSet<URIType>();
 
    /**
     * Add an authenticating authority
     * @param aa {@link URI}
     */
-   public void addAuthenticatingAuthority( URI aa )
+   public void addAuthenticatingAuthority(URI aa)
    {
-      authenticatingAuthority.add( aa );
+      authenticatingAuthority.add(aa);
    }
 
    /**
     * Add Authenticating Authority
     * @param aas an array of {@link URI}
     */
-   public void addAuthenticatingAuthority( URI[] aas )
+   public void addAuthenticatingAuthority(URI[] aas)
    {
-      authenticatingAuthority.addAll( Arrays.asList( aas ) );
+      authenticatingAuthority.addAll(Arrays.asList(aas));
    }
 
    /**
     * Remove an authenticating authority
     * @param aa
     */
-   public void removeAuthenticatingAuthority( URI aa )
+   public void removeAuthenticatingAuthority(URI aa)
    {
-      authenticatingAuthority.remove( aa );
+      authenticatingAuthority.remove(aa);
    }
-   
+
    /**
     * Get a read only set of authenticating authority
     * @return
     */
    public Set<URI> getAuthenticatingAuthority()
    {
-      return Collections.unmodifiableSet( authenticatingAuthority );
-   }   
+      return Collections.unmodifiableSet(authenticatingAuthority);
+   }
 
    /**
     * Get the sequence
@@ -122,24 +123,24 @@
    public void setSequence(AuthnContextTypeSequence sequence)
    {
       this.sequence = sequence;
-   } 
+   }
 
    /**
     * Add an URI type
     * @param aa
     */
-   public void addURIType( URIType aa )
+   public void addURIType(URIType aa)
    {
-      URITypes.add( aa );
+      URITypes.add(aa);
    }
 
    /**
     * Add an array of URI Type
     * @param aas
     */
-   public void addURIType( URIType[] aas )
+   public void addURIType(URIType[] aas)
    {
-      URITypes.addAll( Arrays.asList( aas ) );
+      URITypes.addAll(Arrays.asList(aas));
    }
 
    /**
@@ -148,16 +149,16 @@
     */
    public Set<URIType> getURIType()
    {
-      return Collections.unmodifiableSet( URITypes );
+      return Collections.unmodifiableSet(URITypes);
    }
-   
+
    /**
     * Add an URI type
     * @param aa
     */
-   public void removeURIType( URIType aa )
+   public void removeURIType(URIType aa)
    {
-      URITypes.remove( aa );
+      URITypes.remove(aa);
    }
 
    /**
@@ -168,37 +169,41 @@
           <element ref="saml:AuthnContextDeclRef"/>
        </choice>
     </sequence>
-    */ 
+    */
    public class AuthnContextTypeSequence
    {
       private AuthnContextClassRefType classRef;
-      private Set<URIType> URITypes = new HashSet<URIType>();
+
+      private final Set<URIType> URITypes = new HashSet<URIType>();
+
       public AuthnContextClassRefType getClassRef()
       {
          return classRef;
       }
+
       public void setClassRef(AuthnContextClassRefType classRef)
       {
          this.classRef = classRef;
       }
-      public void addURIType( URIType aa )
+
+      public void addURIType(URIType aa)
       {
-         URITypes.add( aa );
+         URITypes.add(aa);
       }
-      
-      public void removeURIType( URIType aa )
+
+      public void removeURIType(URIType aa)
       {
-         URITypes.remove( aa );
+         URITypes.remove(aa);
       }
 
-      public void addURIType( URIType[] aas )
+      public void addURIType(URIType[] aas)
       {
-         URITypes.addAll( Arrays.asList( aas ) );
+         URITypes.addAll(Arrays.asList(aas));
       }
 
       public Set<URIType> getURIType()
       {
-         return Collections.unmodifiableSet( URITypes );
-      } 
+         return Collections.unmodifiableSet(URITypes);
+      }
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EncryptedAssertionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EncryptedAssertionType.java	2011-04-06 16:27:06 UTC (rev 867)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EncryptedAssertionType.java	2011-04-06 17:35:18 UTC (rev 868)
@@ -29,19 +29,21 @@
  * @since Nov 24, 2010
  */
 public class EncryptedAssertionType extends EncryptedElementType
-{ 
+{
+   private static final long serialVersionUID = 1L;
+
    public EncryptedAssertionType()
    {
-      super(); 
+      super();
    }
 
    public EncryptedAssertionType(Element el)
    {
-      super(el); 
-   } 
-   
+      super(el);
+   }
+
    public String getID()
-   {   
+   {
       return null;
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EncryptedElementType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EncryptedElementType.java	2011-04-06 16:27:06 UTC (rev 867)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/EncryptedElementType.java	2011-04-06 17:35:18 UTC (rev 868)
@@ -21,6 +21,8 @@
  */
 package org.picketlink.identity.federation.newmodel.saml.v2.assertion;
 
+import java.io.Serializable;
+
 import org.w3c.dom.Element;
 
 /**
@@ -28,8 +30,10 @@
  * @author Anil.Saldhana at redhat.com
  * @since Nov 24, 2010
  */
-public class EncryptedElementType
+public class EncryptedElementType implements Serializable
 {
+   private static final long serialVersionUID = 1L;
+
    /**
     <complexType name="EncryptedElementType">
         <sequence>
@@ -38,18 +42,18 @@
         </sequence>
     </complexType>
     */
-   
+
    protected Element encryptedElement;
 
    public EncryptedElementType()
-   {   
+   {
    }
-   
-   public EncryptedElementType( Element el)
+
+   public EncryptedElementType(Element el)
    {
       this.encryptedElement = el;
    }
-   
+
    public Element getEncryptedElement()
    {
       return encryptedElement;
@@ -58,5 +62,5 @@
    public void setEncryptedElement(Element encryptedElement)
    {
       this.encryptedElement = encryptedElement;
-   } 
+   }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/KeyInfoConfirmationDataType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/KeyInfoConfirmationDataType.java	2011-04-06 16:27:06 UTC (rev 867)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/KeyInfoConfirmationDataType.java	2011-04-06 17:35:18 UTC (rev 868)
@@ -41,9 +41,11 @@
  * </pre>
  * 
  * 
- */ 
+ */
 public class KeyInfoConfirmationDataType extends SubjectConfirmationDataType
-{ 
+{
+   private static final long serialVersionUID = 2510471236717847074L;
+
    protected Element keyInfo;
 
    public Element getKeyInfo()
@@ -54,5 +56,5 @@
    public void setKeyInfo(Element keyInfo)
    {
       this.keyInfo = keyInfo;
-   } 
+   }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectConfirmationDataType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectConfirmationDataType.java	2011-04-06 16:27:06 UTC (rev 867)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectConfirmationDataType.java	2011-04-06 17:35:18 UTC (rev 868)
@@ -21,6 +21,7 @@
  */
 package org.picketlink.identity.federation.newmodel.saml.v2.assertion;
 
+import java.io.Serializable;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -28,7 +29,6 @@
 import javax.xml.datatype.XMLGregorianCalendar;
 import javax.xml.namespace.QName;
 
-
 /**
  * <p>Java class for SubjectConfirmationDataType complex type.
  * 
@@ -52,18 +52,25 @@
  * </pre>
  * 
  * 
- */ 
-public class SubjectConfirmationDataType 
-{  
-   protected XMLGregorianCalendar notBefore; 
-   protected XMLGregorianCalendar notOnOrAfter; 
-   protected String recipient; 
-   protected String inResponseTo; 
-   protected String address; 
-   private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ */
+public class SubjectConfirmationDataType implements Serializable
+{
+   private static final long serialVersionUID = 7695748370849965158L;
 
-   private Object anyType; 
+   protected XMLGregorianCalendar notBefore;
 
+   protected XMLGregorianCalendar notOnOrAfter;
+
+   protected String recipient;
+
+   protected String inResponseTo;
+
+   protected String address;
+
+   private final Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+   private Object anyType;
+
    public Object getAnyType()
    {
       return anyType;
@@ -82,7 +89,8 @@
     *     {@link XMLGregorianCalendar }
     *     
     */
-   public XMLGregorianCalendar getNotBefore() {
+   public XMLGregorianCalendar getNotBefore()
+   {
       return notBefore;
    }
 
@@ -94,7 +102,8 @@
     *     {@link XMLGregorianCalendar }
     *     
     */
-   public void setNotBefore(XMLGregorianCalendar value) {
+   public void setNotBefore(XMLGregorianCalendar value)
+   {
       this.notBefore = value;
    }
 
@@ -106,7 +115,8 @@
     *     {@link XMLGregorianCalendar }
     *     
     */
-   public XMLGregorianCalendar getNotOnOrAfter() {
+   public XMLGregorianCalendar getNotOnOrAfter()
+   {
       return notOnOrAfter;
    }
 
@@ -118,7 +128,8 @@
     *     {@link XMLGregorianCalendar }
     *     
     */
-   public void setNotOnOrAfter(XMLGregorianCalendar value) {
+   public void setNotOnOrAfter(XMLGregorianCalendar value)
+   {
       this.notOnOrAfter = value;
    }
 
@@ -130,7 +141,8 @@
     *     {@link String }
     *     
     */
-   public String getRecipient() {
+   public String getRecipient()
+   {
       return recipient;
    }
 
@@ -142,7 +154,8 @@
     *     {@link String }
     *     
     */
-   public void setRecipient(String value) {
+   public void setRecipient(String value)
+   {
       this.recipient = value;
    }
 
@@ -154,7 +167,8 @@
     *     {@link String }
     *     
     */
-   public String getInResponseTo() {
+   public String getInResponseTo()
+   {
       return inResponseTo;
    }
 
@@ -166,7 +180,8 @@
     *     {@link String }
     *     
     */
-   public void setInResponseTo(String value) {
+   public void setInResponseTo(String value)
+   {
       this.inResponseTo = value;
    }
 
@@ -178,7 +193,8 @@
     *     {@link String }
     *     
     */
-   public String getAddress() {
+   public String getAddress()
+   {
       return address;
    }
 
@@ -190,7 +206,8 @@
     *     {@link String }
     *     
     */
-   public void setAddress(String value) {
+   public void setAddress(String value)
+   {
       this.address = value;
    }
 
@@ -204,9 +221,9 @@
     * @return
     *     always non-null
     */
-   public Map<QName, String> getOtherAttributes() 
+   public Map<QName, String> getOtherAttributes()
    {
-      return Collections.unmodifiableMap( otherAttributes );
+      return Collections.unmodifiableMap(otherAttributes);
    }
 
    /**
@@ -214,17 +231,17 @@
     * @param qname
     * @param str
     */
-   public void addOtherAttribute( QName qname, String str )
+   public void addOtherAttribute(QName qname, String str)
    {
-      otherAttributes.put(qname, str );
+      otherAttributes.put(qname, str);
    }
-   
+
    /**
     * Remove an other attribute
     * @param qname {@link QName} of the attribute to be removed
     */
-   public void removeOtherAttribute( QName qname )
+   public void removeOtherAttribute(QName qname)
    {
-      otherAttributes.remove( qname );
+      otherAttributes.remove(qname);
    }
 }
\ No newline at end of file

Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectType.java	2011-04-06 16:27:06 UTC (rev 867)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/newmodel/saml/v2/assertion/SubjectType.java	2011-04-06 17:35:18 UTC (rev 868)
@@ -26,8 +26,6 @@
 import java.util.Collections;
 import java.util.List;
 
-
-
 /**
  * <p>Java class for SubjectType complex type.
  * 
@@ -54,14 +52,14 @@
  * </pre>
  * 
  * 
- */ 
+ */
 public class SubjectType implements Serializable
-{ 
+{
    private static final long serialVersionUID = 1L;
 
    protected List<SubjectConfirmationType> subjectConfirmation = new ArrayList<SubjectConfirmationType>();
 
-   protected STSubType subType; 
+   protected STSubType subType;
 
    /**
     * Get the {@link STSubType}
@@ -96,35 +94,38 @@
     */
    public List<SubjectConfirmationType> getConfirmation()
    {
-      return Collections.unmodifiableList( subjectConfirmation );
+      return Collections.unmodifiableList(subjectConfirmation);
    }
 
    /**
     * Add a subject confirmation
     * @param con
     */
-   public void addConfirmation( SubjectConfirmationType con )
+   public void addConfirmation(SubjectConfirmationType con)
    {
-      subjectConfirmation.add( con );
-   } 
+      subjectConfirmation.add(con);
+   }
+
    /**
     * Remove a subject confirmation
     * @param con
     */
-   public void removeConfirmation( SubjectConfirmationType con )
+   public void removeConfirmation(SubjectConfirmationType con)
    {
-      subjectConfirmation.remove( con );
-   } 
+      subjectConfirmation.remove(con);
+   }
 
-   public static class STSubType
+   public static class STSubType implements Serializable
    {
+      private static final long serialVersionUID = -4073731807610876524L;
+
       private BaseIDAbstractType baseID;
-      
+
       private EncryptedElementType encryptedID;
 
       protected List<SubjectConfirmationType> subjectConfirmation = new ArrayList<SubjectConfirmationType>();
 
-      public void addBaseID( BaseIDAbstractType base )
+      public void addBaseID(BaseIDAbstractType base)
       {
          this.baseID = base;
       }
@@ -132,8 +133,8 @@
       public BaseIDAbstractType getBaseID()
       {
          return baseID;
-      }  
-      
+      }
+
       public EncryptedElementType getEncryptedID()
       {
          return encryptedID;
@@ -144,10 +145,10 @@
          this.encryptedID = encryptedID;
       }
 
-      public void addConfirmation( SubjectConfirmationType con )
+      public void addConfirmation(SubjectConfirmationType con)
       {
-         subjectConfirmation.add( con );
-      } 
+         subjectConfirmation.add(con);
+      }
 
       public int getCount()
       {
@@ -156,7 +157,7 @@
 
       public List<SubjectConfirmationType> getConfirmation()
       {
-         return Collections.unmodifiableList( subjectConfirmation );
+         return Collections.unmodifiableList(subjectConfirmation);
       }
-   } 
+   }
 }
\ No newline at end of file



More information about the picketlink-commits mailing list