directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1042351 - /directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
Date Sun, 05 Dec 2010 13:56:01 GMT
Author: kayyagari
Date: Sun Dec  5 13:56:01 2010
New Revision: 1042351

URL: http://svn.apache.org/viewvc?rev=1042351&view=rev
Log:
o added a setFlag() helper method

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java?rev=1042351&r1=1042350&r2=1042351&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
Sun Dec  5 13:56:01 2010
@@ -32,6 +32,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.kerberos.KerberosConstants;
 import org.apache.directory.shared.kerberos.KerberosTime;
+import org.apache.directory.shared.kerberos.flags.TicketFlag;
 import org.apache.directory.shared.kerberos.flags.TicketFlags;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -539,6 +540,24 @@ public class EncTicketPart extends Abstr
 
 
     /**
+     * adds the given flag to the already existing flags.
+     * If no flags exist then creates a new TicketFlags object then sets this flag
+     * and assigns the TicketFlags to this ticket part
+     * 
+     * @param flag the flag to be set
+     */
+    public void setFlag( TicketFlag flag )
+    {
+        if ( flags == null )
+        {
+            flags = new TicketFlags();
+        }
+        
+        flags.setFlag( flag.getValue() );
+    }
+    
+    
+    /**
      * @see Object#toString()
      */
     public String toString()



Mime
View raw message