You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2007/05/24 02:27:07 UTC
svn commit: r541123 [19/25] - in
/directory/apacheds/branches/apacheds-sasl-branch: ./ benchmarks/
bootstrap-extract/ bootstrap-extract/src/ bootstrap-extract/src/main/
bootstrap-extract/src/main/java/ bootstrap-extract/src/main/java/org/
bootstrap-ext...
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncApRepPartModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncApRepPartModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncApRepPartModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncApRepPartModifier.java Wed May 23 17:26:40 2007
@@ -36,30 +36,55 @@
private Integer sequenceNumber; //optional
+ /**
+ * Returns the {@link EncApRepPart}.
+ *
+ * @return The {@link EncApRepPart}.
+ */
public EncApRepPart getEncApRepPart()
{
return new EncApRepPart( clientTime, cusec, subSessionKey, sequenceNumber );
}
+ /**
+ * Sets the client {@link KerberosTime}.
+ *
+ * @param clientTime
+ */
public void setClientTime( KerberosTime clientTime )
{
this.clientTime = clientTime;
}
+ /**
+ * Sets the client microsecond.
+ *
+ * @param cusec
+ */
public void setClientMicroSecond( int cusec )
{
this.cusec = cusec;
}
+ /**
+ * Sets the sub-session {@link EncryptionKey}.
+ *
+ * @param subSessionKey
+ */
public void setSubSessionKey( EncryptionKey subSessionKey )
{
this.subSessionKey = subSessionKey;
}
+ /**
+ * Sets the sequence number.
+ *
+ * @param sequenceNumber
+ */
public void setSequenceNumber( Integer sequenceNumber )
{
this.sequenceNumber = sequenceNumber;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java Wed May 23 17:26:40 2007
@@ -38,7 +38,19 @@
public class EncAsRepPart extends EncKdcRepPart
{
/**
- * Class constructor
+ * Creates a new instance of EncAsRepPart.
+ *
+ * @param key
+ * @param lastReq
+ * @param nonce
+ * @param keyExpiration
+ * @param flags
+ * @param authTime
+ * @param startTime
+ * @param endTime
+ * @param renewTill
+ * @param serverPrincipal
+ * @param caddr
*/
public EncAsRepPart(EncryptionKey key, LastRequest lastReq, int nonce, KerberosTime keyExpiration,
TicketFlags flags, KerberosTime authTime, KerberosTime startTime, KerberosTime endTime, KerberosTime renewTill,
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java Wed May 23 17:26:40 2007
@@ -52,7 +52,7 @@
/**
- * Class constructors
+ * Creates a new instance of EncKdcRepPart.
*/
public EncKdcRepPart()
{
@@ -60,9 +60,25 @@
}
- public EncKdcRepPart(EncryptionKey key, LastRequest lastReq, int nonce, KerberosTime keyExpiration,
+ /**
+ * Creates a new instance of EncKdcRepPart.
+ *
+ * @param key
+ * @param lastReq
+ * @param nonce
+ * @param keyExpiration
+ * @param flags
+ * @param authtime
+ * @param starttime
+ * @param endtime
+ * @param renewTill
+ * @param serverPrincipal
+ * @param caddr
+ * @param componentType
+ */
+ public EncKdcRepPart( EncryptionKey key, LastRequest lastReq, int nonce, KerberosTime keyExpiration,
TicketFlags flags, KerberosTime authtime, KerberosTime starttime, KerberosTime endtime, KerberosTime renewTill,
- KerberosPrincipal serverPrincipal, HostAddresses caddr, MessageComponentType componentType)
+ KerberosPrincipal serverPrincipal, HostAddresses caddr, MessageComponentType componentType )
{
this.key = key;
this.lastRequest = lastReq;
@@ -79,146 +95,264 @@
}
- // getters
+ /**
+ * Returns the auth {@link KerberosTime}.
+ *
+ * @return The auth {@link KerberosTime}.
+ */
public KerberosTime getAuthTime()
{
return authTime;
}
+ /**
+ * Returns the client {@link HostAddresses}.
+ *
+ * @return The client {@link HostAddresses}.
+ */
public HostAddresses getClientAddresses()
{
return clientAddresses;
}
+ /**
+ * Returns the end {@link KerberosTime}.
+ *
+ * @return The end {@link KerberosTime}.
+ */
public KerberosTime getEndTime()
{
return endTime;
}
+ /**
+ * Returns the {@link TicketFlags}.
+ *
+ * @return The {@link TicketFlags}.
+ */
public TicketFlags getFlags()
{
return flags;
}
+ /**
+ * Returns the {@link EncryptionKey}.
+ *
+ * @return The {@link EncryptionKey}.
+ */
public EncryptionKey getKey()
{
return key;
}
+ /**
+ * Returns the key expiration {@link KerberosTime}.
+ *
+ * @return The key expiration {@link KerberosTime}.
+ */
public KerberosTime getKeyExpiration()
{
return keyExpiration;
}
+ /**
+ * Returns the {@link LastRequest}.
+ *
+ * @return The {@link LastRequest}.
+ */
public LastRequest getLastRequest()
{
return lastRequest;
}
+ /**
+ * Returns the nonce.
+ *
+ * @return The nonce.
+ */
public int getNonce()
{
return nonce;
}
+ /**
+ * Returns the renew till {@link KerberosTime}.
+ *
+ * @return The renew till {@link KerberosTime}.
+ */
public KerberosTime getRenewTill()
{
return renewTill;
}
+ /**
+ * Returns the server {@link KerberosPrincipal}.
+ *
+ * @return The server {@link KerberosPrincipal}.
+ */
public KerberosPrincipal getServerPrincipal()
{
return serverPrincipal;
}
+ /**
+ * Returns the server realm.
+ *
+ * @return The server realm.
+ */
public String getServerRealm()
{
return serverPrincipal.getRealm();
}
+ /**
+ * Returns the start {@link KerberosTime}.
+ *
+ * @return The start {@link KerberosTime}.
+ */
public KerberosTime getStartTime()
{
return startTime;
}
+ /**
+ * Returns the {@link MessageComponentType}.
+ *
+ * @return The {@link MessageComponentType}.
+ */
public MessageComponentType getComponentType()
{
return componentType;
}
- // setters
+ /**
+ * Sets the auth {@link KerberosTime}.
+ *
+ * @param time
+ */
public void setAuthTime( KerberosTime time )
{
authTime = time;
}
+ /**
+ * Sets the client {@link HostAddresses}.
+ *
+ * @param addresses
+ */
public void setClientAddresses( HostAddresses addresses )
{
clientAddresses = addresses;
}
+ /**
+ * Sets the end {@link KerberosTime}.
+ *
+ * @param time
+ */
public void setEndTime( KerberosTime time )
{
endTime = time;
}
+ /**
+ * Sets the {@link TicketFlags}.
+ *
+ * @param flags
+ */
public void setFlags( TicketFlags flags )
{
this.flags = flags;
}
+ /**
+ * Sets the {@link EncryptionKey}.
+ *
+ * @param key
+ */
public void setKey( EncryptionKey key )
{
this.key = key;
}
+ /**
+ * Sets the key expiration {@link KerberosTime}.
+ *
+ * @param expiration
+ */
public void setKeyExpiration( KerberosTime expiration )
{
keyExpiration = expiration;
}
+ /**
+ * Sets the {@link LastRequest}.
+ *
+ * @param request
+ */
public void setLastRequest( LastRequest request )
{
lastRequest = request;
}
+ /**
+ * Sets the nonce.
+ *
+ * @param nonce
+ */
public void setNonce( int nonce )
{
this.nonce = nonce;
}
+ /**
+ * Sets the renew till {@link KerberosTime}.
+ *
+ * @param till
+ */
public void setRenewTill( KerberosTime till )
{
renewTill = till;
}
+ /**
+ * Sets the server {@link KerberosPrincipal}.
+ *
+ * @param principal
+ */
public void setServerPrincipal( KerberosPrincipal principal )
{
serverPrincipal = principal;
}
+ /**
+ * Sets the start {@link KerberosTime}.
+ *
+ * @param time
+ */
public void setStartTime( KerberosTime time )
{
startTime = time;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbCredPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbCredPart.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbCredPart.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbCredPart.java Wed May 23 17:26:40 2007
@@ -34,19 +34,26 @@
*/
public class EncKrbCredPart
{
- public KrbCredInfo[] ticketInfo;
- public Integer nonce; //optional
- public KerberosTime timeStamp; //optional
- public Integer usec; //optional
- public HostAddress sAddress; //optional
- public HostAddresses rAddress; //optional
+ private KrbCredInfo[] ticketInfo;
+ private Integer nonce; //optional
+ private KerberosTime timeStamp; //optional
+ private Integer usec; //optional
+ private HostAddress sAddress; //optional
+ private HostAddresses rAddress; //optional
/**
- * Class constructor
+ * Creates a new instance of EncKrbCredPart.
+ *
+ * @param ticketInfo
+ * @param timeStamp
+ * @param usec
+ * @param nonce
+ * @param sAddress
+ * @param rAddress
*/
- public EncKrbCredPart(KrbCredInfo[] ticketInfo, KerberosTime timeStamp, Integer usec, Integer nonce,
- HostAddress sAddress, HostAddresses rAddress)
+ public EncKrbCredPart( KrbCredInfo[] ticketInfo, KerberosTime timeStamp, Integer usec, Integer nonce,
+ HostAddress sAddress, HostAddresses rAddress )
{
this.ticketInfo = ticketInfo;
this.nonce = nonce;
@@ -54,5 +61,71 @@
this.usec = usec;
this.sAddress = sAddress;
this.rAddress = rAddress;
+ }
+
+
+ /**
+ * Returns the nonce.
+ *
+ * @return The nonce.
+ */
+ public Integer getNonce()
+ {
+ return nonce;
+ }
+
+
+ /**
+ * Returns the "R" {@link HostAddresses}.
+ *
+ * @return The "R" {@link HostAddresses}.
+ */
+ public HostAddresses getRAddress()
+ {
+ return rAddress;
+ }
+
+
+ /**
+ * Returns the "S" {@link HostAddresses}.
+ *
+ * @return The "S" {@link HostAddresses}.
+ */
+ public HostAddress getSAddress()
+ {
+ return sAddress;
+ }
+
+
+ /**
+ * Returns the {@link KrbCredInfo}s.
+ *
+ * @return The {@link KrbCredInfo}s.
+ */
+ public KrbCredInfo[] getTicketInfo()
+ {
+ return ticketInfo;
+ }
+
+
+ /**
+ * Returns the timestamp.
+ *
+ * @return The timeStamp.
+ */
+ public KerberosTime getTimeStamp()
+ {
+ return timeStamp;
+ }
+
+
+ /**
+ * Returns the microseconds.
+ *
+ * @return The microseconds.
+ */
+ public Integer getUsec()
+ {
+ return usec;
}
}
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPart.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPart.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPart.java Wed May 23 17:26:40 2007
@@ -43,8 +43,18 @@
private HostAddress recipientAddress; //optional
- public EncKrbPrivPart(byte[] userData, KerberosTime timestamp, Integer usec, Integer sequenceNumber,
- HostAddress senderAddress, HostAddress recipientAddress)
+ /**
+ * Creates a new instance of EncKrbPrivPart.
+ *
+ * @param userData
+ * @param timestamp
+ * @param usec
+ * @param sequenceNumber
+ * @param senderAddress
+ * @param recipientAddress
+ */
+ public EncKrbPrivPart( byte[] userData, KerberosTime timestamp, Integer usec, Integer sequenceNumber,
+ HostAddress senderAddress, HostAddress recipientAddress )
{
super( MessageType.ENC_PRIV_PART );
@@ -57,36 +67,66 @@
}
+ /**
+ * Returns the recipient {@link HostAddress}.
+ *
+ * @return The recipient {@link HostAddress}.
+ */
public HostAddress getRecipientAddress()
{
return recipientAddress;
}
+ /**
+ * Returns the sender {@link HostAddress}.
+ *
+ * @return The sender {@link HostAddress}.
+ */
public HostAddress getSenderAddress()
{
return senderAddress;
}
+ /**
+ * Returns the sequence number.
+ *
+ * @return The sequence number.
+ */
public Integer getSequenceNumber()
{
return sequenceNumber;
}
+ /**
+ * Returns the {@link KerberosTime} timestamp.
+ *
+ * @return The {@link KerberosTime} timestamp.
+ */
public KerberosTime getTimestamp()
{
return timestamp;
}
+ /**
+ * Returns the microsecond.
+ *
+ * @return The microsecond.
+ */
public Integer getMicroSecond()
{
return usec;
}
+ /**
+ * Returns the user data.
+ *
+ * @return The user data.
+ */
public byte[] getUserData()
{
return userData;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPartModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPartModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPartModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKrbPrivPartModifier.java Wed May 23 17:26:40 2007
@@ -38,42 +38,77 @@
private HostAddress recipientAddress; //optional
+ /**
+ * Returns the {@link EncKrbPrivPart}.
+ *
+ * @return The {@link EncKrbPrivPart}.
+ */
public EncKrbPrivPart getEncKrbPrivPart()
{
return new EncKrbPrivPart( userData, timestamp, usec, sequenceNumber, senderAddress, recipientAddress );
}
+ /**
+ * Sets the recipient {@link HostAddress}.
+ *
+ * @param address
+ */
public void setRecipientAddress( HostAddress address )
{
recipientAddress = address;
}
+ /**
+ * Sets the sender {@link HostAddress}.
+ *
+ * @param address
+ */
public void setSenderAddress( HostAddress address )
{
senderAddress = address;
}
+ /**
+ * Sets the sequence number.
+ *
+ * @param number
+ */
public void setSequenceNumber( Integer number )
{
sequenceNumber = number;
}
+ /**
+ * Sets the {@link KerberosTime} timestamp.
+ *
+ * @param timestamp
+ */
public void setTimestamp( KerberosTime timestamp )
{
this.timestamp = timestamp;
}
+ /**
+ * Sets the microsecond.
+ *
+ * @param usec
+ */
public void setMicroSecond( Integer usec )
{
this.usec = usec;
}
+ /**
+ * Sets the user data.
+ *
+ * @param data
+ */
public void setUserData( byte[] data )
{
userData = data;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java Wed May 23 17:26:40 2007
@@ -38,13 +38,24 @@
public class EncTgsRepPart extends EncKdcRepPart
{
/**
- * Class constructor
+ * Creates a new instance of EncTgsRepPart.
+ *
+ * @param key
+ * @param lastReq
+ * @param nonce
+ * @param keyExpiration
+ * @param flags
+ * @param authtime
+ * @param starttime
+ * @param endtime
+ * @param renewTill
+ * @param serverPrincipal
+ * @param caddr
*/
public EncTgsRepPart(EncryptionKey key, LastRequest lastReq, int nonce, KerberosTime keyExpiration,
TicketFlags flags, KerberosTime authtime, KerberosTime starttime, KerberosTime endtime, KerberosTime renewTill,
KerberosPrincipal serverPrincipal, HostAddresses caddr)
{
-
super( key, lastReq, nonce, keyExpiration, flags, authtime, starttime, endtime, renewTill, serverPrincipal,
caddr, MessageComponentType.KRB_ENC_TGS_REP_PART );
}
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPart.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPart.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPart.java Wed May 23 17:26:40 2007
@@ -51,11 +51,24 @@
private AuthorizationData authorizationData; //optional
- public EncTicketPart(TicketFlags flags, EncryptionKey key, KerberosPrincipal clientPrincipal,
+ /**
+ * Creates a new instance of EncTicketPart.
+ *
+ * @param flags
+ * @param key
+ * @param clientPrincipal
+ * @param transited
+ * @param authtime
+ * @param starttime
+ * @param endtime
+ * @param renewTill
+ * @param caddr
+ * @param authorizationData
+ */
+ public EncTicketPart( TicketFlags flags, EncryptionKey key, KerberosPrincipal clientPrincipal,
TransitedEncoding transited, KerberosTime authtime, KerberosTime starttime, KerberosTime endtime,
- KerberosTime renewTill, HostAddresses caddr, AuthorizationData authorizationData)
+ KerberosTime renewTill, HostAddresses caddr, AuthorizationData authorizationData )
{
-
this.flags = flags;
this.sessionKey = key;
this.clientPrincipal = clientPrincipal;
@@ -69,66 +82,121 @@
}
+ /**
+ * Returns the {@link AuthorizationData}.
+ *
+ * @return The {@link AuthorizationData}.
+ */
public AuthorizationData getAuthorizationData()
{
return authorizationData;
}
+ /**
+ * Returns the auth {@link KerberosTime}
+ *
+ * @return The auth {@link KerberosTime}
+ */
public KerberosTime getAuthTime()
{
return authtime;
}
+ /**
+ * Returns the client {@link HostAddresses}.
+ *
+ * @return The client {@link HostAddresses}.
+ */
public HostAddresses getClientAddresses()
{
return clientAddresses;
}
+ /**
+ * Returns the client {@link KerberosPrincipal}.
+ *
+ * @return The client {@link KerberosPrincipal}.
+ */
public KerberosPrincipal getClientPrincipal()
{
return clientPrincipal;
}
+ /**
+ * Returns the client realm.
+ *
+ * @return The client realm.
+ */
public String getClientRealm()
{
return clientPrincipal.getRealm();
}
+ /**
+ * Returns the end {@link KerberosTime}
+ *
+ * @return The end {@link KerberosTime}
+ */
public KerberosTime getEndTime()
{
return endTime;
}
+ /**
+ * Returns the {@link TicketFlags}.
+ *
+ * @return The {@link TicketFlags}.
+ */
public TicketFlags getFlags()
{
return flags;
}
+ /**
+ * Returns the session {@link EncryptionKey}.
+ *
+ * @return The session {@link EncryptionKey}.
+ */
public EncryptionKey getSessionKey()
{
return sessionKey;
}
+ /**
+ * Returns the renew till {@link KerberosTime}
+ *
+ * @return The renew till {@link KerberosTime}
+ */
public KerberosTime getRenewTill()
{
return renewTill;
}
+ /**
+ * Returns the start {@link KerberosTime}
+ *
+ * @return The start {@link KerberosTime}
+ */
public KerberosTime getStartTime()
{
return startTime;
}
+ /**
+ * Returns the {@link TransitedEncoding}.
+ *
+ * @return The {@link TransitedEncoding}.
+ */
public TransitedEncoding getTransitedEncoding()
{
return transitedEncoding;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPartModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPartModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPartModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPartModifier.java Wed May 23 17:26:40 2007
@@ -53,6 +53,11 @@
private AuthorizationData authorizationData; //optional
+ /**
+ * Returns the {@link EncTicketPart}.
+ *
+ * @return The {@link EncTicketPart}.
+ */
public EncTicketPart getEncTicketPart()
{
if ( clientPrincipal == null )
@@ -65,84 +70,154 @@
}
+ /**
+ * Sets the client {@link PrincipalName}.
+ *
+ * @param name
+ */
public void setClientName( PrincipalName name )
{
modifier.setPrincipalName( name );
}
+ /**
+ * Sets the client realm.
+ *
+ * @param realm
+ */
public void setClientRealm( String realm )
{
modifier.setRealm( realm );
}
+ /**
+ * Sets the client {@link KerberosPrincipal}.
+ *
+ * @param principal
+ */
public void setClientPrincipal( KerberosPrincipal principal )
{
clientPrincipal = principal;
}
+ /**
+ * Sets the {@link AuthorizationData}.
+ *
+ * @param data
+ */
public void setAuthorizationData( AuthorizationData data )
{
authorizationData = data;
}
+ /**
+ * Sets the auth {@link KerberosTime}.
+ *
+ * @param authtime
+ */
public void setAuthTime( KerberosTime authtime )
{
authTime = authtime;
}
+ /**
+ * Sets the client {@link HostAddresses}.
+ *
+ * @param addresses
+ */
public void setClientAddresses( HostAddresses addresses )
{
clientAddresses = addresses;
}
+ /**
+ * Sets the end {@link KerberosTime}.
+ *
+ * @param time
+ */
public void setEndTime( KerberosTime time )
{
endTime = time;
}
+ /**
+ * Sets the {@link TicketFlags}.
+ *
+ * @param flags
+ */
public void setFlags( TicketFlags flags )
{
this.flags = flags;
}
+ /**
+ * Sets the flag at the given index.
+ *
+ * @param flag
+ */
public void setFlag( int flag )
{
flags.set( flag );
}
+ /**
+ * Clears the flag at the given index.
+ *
+ * @param flag
+ */
public void clearFlag( int flag )
{
flags.clear( flag );
}
+ /**
+ * Sets the renew till {@link KerberosTime}.
+ *
+ * @param till
+ */
public void setRenewTill( KerberosTime till )
{
renewTill = till;
}
+ /**
+ * Sets the sesson {@link EncryptionKey}.
+ *
+ * @param key
+ */
public void setSessionKey( EncryptionKey key )
{
sessionKey = key;
}
+ /**
+ * Sets the start {@link KerberosTime}.
+ *
+ * @param time
+ */
public void setStartTime( KerberosTime time )
{
startTime = time;
}
+ /**
+ * Sets the {@link TransitedEncoding}.
+ *
+ * @param encoding
+ */
public void setTransitedEncoding( TransitedEncoding encoding )
{
transitedEncoding = encoding;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/MessageComponentType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/MessageComponentType.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/MessageComponentType.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/MessageComponentType.java Wed May 23 17:26:40 2007
@@ -34,47 +34,94 @@
public class MessageComponentType implements Comparable
{
/**
- * Enumeration elements are constructed once upon class loading.
- * Order of appearance here determines the order of compareTo.
+ * Constant for the "null" message component type.
*/
public static final MessageComponentType NULL = new MessageComponentType( 0, "null" );
+
+ /**
+ * Constant for the "ticket" message component type.
+ */
public static final MessageComponentType KRB_TKT = new MessageComponentType( 1, "ticket" );
+
+ /**
+ * Constant for the "authenticator" message component type.
+ */
public static final MessageComponentType KRB_AUTHENTICATOR = new MessageComponentType( 2, "authenticator" );
+
+ /**
+ * Constant for the "encrypted ticket part" message component type.
+ */
public static final MessageComponentType KRB_ENC_TKT_PART = new MessageComponentType( 3, "encrypted ticket part" );
+
+ /**
+ * Constant for the "encrypted initial authentication part" message component type.
+ */
public static final MessageComponentType KRB_ENC_AS_REP_PART = new MessageComponentType( 25,
"encrypted initial authentication part" );
+
+ /**
+ * Constant for the "encrypted TGS request part" message component type.
+ */
public static final MessageComponentType KRB_ENC_TGS_REP_PART = new MessageComponentType( 26,
"encrypted TGS request part" );
+
+ /**
+ * Constant for the "encrypted application request part" message component type.
+ */
public static final MessageComponentType KRB_ENC_AP_REP_PART = new MessageComponentType( 27,
"encrypted application request part" );
+
+ /**
+ * Constant for the "encrypted application message part" message component type.
+ */
public static final MessageComponentType KRB_ENC_KRB_PRIV_PART = new MessageComponentType( 28,
"encrypted application message part" );
+
+ /**
+ * Constant for the "encrypted credentials forward part" message component type.
+ */
public static final MessageComponentType KRB_ENC_KRB_CRED_PART = new MessageComponentType( 29,
"encrypted credentials forward part" );
/**
- * These two lines are all that's necessary to export a List of VALUES.
+ * Array for building a List of VALUES.
*/
private static final MessageComponentType[] values =
{ NULL, KRB_TKT, KRB_AUTHENTICATOR, KRB_ENC_TKT_PART, KRB_ENC_AS_REP_PART, KRB_ENC_TGS_REP_PART,
KRB_ENC_AP_REP_PART, KRB_ENC_KRB_PRIV_PART, KRB_ENC_KRB_CRED_PART };
+ /**
+ * A List of all the message component type constants.
+ */
public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
+ /**
+ * The name of the message component type.
+ */
private final String name;
+
+ /**
+ * The value/code for the message component type.
+ */
private final int ordinal;
/**
* Private constructor prevents construction outside of this class.
*/
- private MessageComponentType(int ordinal, String name)
+ private MessageComponentType( int ordinal, String name )
{
this.ordinal = ordinal;
this.name = name;
}
+ /**
+ * Returns the message component type when specified by its ordinal.
+ *
+ * @param type
+ * @return The message component type.
+ */
public static MessageComponentType getTypeByOrdinal( int type )
{
for ( int ii = 0; ii < values.length; ii++ )
@@ -89,20 +136,25 @@
}
+ /**
+ * Returns the number associated with this message component type.
+ *
+ * @return The message component type ordinal.
+ */
public int getOrdinal()
{
return ordinal;
}
- public String toString()
+ public int compareTo( Object that )
{
- return name + " (" + ordinal + ")";
+ return ordinal - ( ( MessageComponentType ) that ).ordinal;
}
- public int compareTo( Object that )
+ public String toString()
{
- return ordinal - ( ( MessageComponentType ) that ).ordinal;
+ return name + " (" + ordinal + ")";
}
}
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java Wed May 23 17:26:40 2007
@@ -39,6 +39,9 @@
*/
public class Ticket
{
+ /**
+ * Constant for the {@link Ticket} version number (5).
+ */
public static final int TICKET_VNO = 5;
private int versionNumber;
@@ -47,13 +50,26 @@
private EncTicketPart encTicketPart;
- public Ticket(KerberosPrincipal serverPrincipal, EncryptedData encPart)
+ /**
+ * Creates a new instance of Ticket.
+ *
+ * @param serverPrincipal
+ * @param encPart
+ */
+ public Ticket( KerberosPrincipal serverPrincipal, EncryptedData encPart )
{
this( TICKET_VNO, serverPrincipal, encPart );
}
- public Ticket(int versionNumber, KerberosPrincipal serverPrincipal, EncryptedData encPart)
+ /**
+ * Creates a new instance of Ticket.
+ *
+ * @param versionNumber
+ * @param serverPrincipal
+ * @param encPart
+ */
+ public Ticket( int versionNumber, KerberosPrincipal serverPrincipal, EncryptedData encPart )
{
this.versionNumber = versionNumber;
this.serverPrincipal = serverPrincipal;
@@ -61,111 +77,199 @@
}
+ /**
+ * Sets the {@link EncTicketPart}.
+ *
+ * @param decryptedPart
+ */
public void setEncTicketPart( EncTicketPart decryptedPart )
{
encTicketPart = decryptedPart;
}
- // getters
+ /**
+ * Returns the version number.
+ *
+ * @return The version number.
+ */
public int getVersionNumber()
{
return versionNumber;
}
+ /**
+ * Returns the server {@link KerberosPrincipal}.
+ *
+ * @return The server {@link KerberosPrincipal}.
+ */
public KerberosPrincipal getServerPrincipal()
{
return serverPrincipal;
}
+ /**
+ * Returns the server realm.
+ *
+ * @return The server realm.
+ */
public String getRealm()
{
return serverPrincipal.getRealm();
}
+ /**
+ * Returns the {@link EncryptedData}.
+ *
+ * @return The {@link EncryptedData}.
+ */
public EncryptedData getEncPart()
{
return encPart;
}
+ /**
+ * Returns the {@link EncTicketPart}.
+ *
+ * @return The {@link EncTicketPart}.
+ */
public EncTicketPart getEncTicketPart()
{
return encTicketPart;
}
- // EncTicketPart delegate getters
+ /**
+ * Returns the {@link AuthorizationData}.
+ *
+ * @return The {@link AuthorizationData}.
+ */
public AuthorizationData getAuthorizationData()
{
return encTicketPart.getAuthorizationData();
}
+ /**
+ * Returns the auth {@link KerberosTime}.
+ *
+ * @return The auth {@link KerberosTime}.
+ */
public KerberosTime getAuthTime()
{
return encTicketPart.getAuthTime();
}
+ /**
+ * Returns the client {@link HostAddresses}.
+ *
+ * @return The client {@link HostAddresses}.
+ */
public HostAddresses getClientAddresses()
{
return encTicketPart.getClientAddresses();
}
+ /**
+ * Returns the client {@link KerberosPrincipal}.
+ *
+ * @return The client {@link KerberosPrincipal}.
+ */
public KerberosPrincipal getClientPrincipal()
{
return encTicketPart.getClientPrincipal();
}
+ /**
+ * Returns the client realm.
+ *
+ * @return The client realm.
+ */
public String getClientRealm()
{
return encTicketPart.getClientPrincipal().getRealm();
}
+ /**
+ * Returns the end {@link KerberosTime}.
+ *
+ * @return The end {@link KerberosTime}.
+ */
public KerberosTime getEndTime()
{
return encTicketPart.getEndTime();
}
+ /**
+ * Returns the {@link TicketFlags}.
+ *
+ * @return The {@link TicketFlags}.
+ */
public TicketFlags getFlags()
{
return encTicketPart.getFlags();
}
+ /**
+ * Returns the renew till {@link KerberosTime}.
+ *
+ * @return The renew till {@link KerberosTime}.
+ */
public KerberosTime getRenewTill()
{
return encTicketPart.getRenewTill();
}
+ /**
+ * Returns the session {@link EncryptionKey}.
+ *
+ * @return The session {@link EncryptionKey}.
+ */
public EncryptionKey getSessionKey()
{
return encTicketPart.getSessionKey();
}
+ /**
+ * Returns the start {@link KerberosTime}.
+ *
+ * @return The start {@link KerberosTime}.
+ */
public KerberosTime getStartTime()
{
return encTicketPart.getStartTime();
}
+ /**
+ * Returns the {@link TransitedEncoding}.
+ *
+ * @return The {@link TransitedEncoding}.
+ */
public TransitedEncoding getTransitedEncoding()
{
return encTicketPart.getTransitedEncoding();
}
- // EncTicketPart TicketFlag delegates
+ /**
+ * Returns the flag at the given index.
+ *
+ * @param flag
+ * @return true if the flag at the given index is set.
+ */
public boolean getFlag( int flag )
{
return encTicketPart.getFlags().get( flag );
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/TicketModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/TicketModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/TicketModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/TicketModifier.java Wed May 23 17:26:40 2007
@@ -38,6 +38,11 @@
private EncryptedData encPart;
+ /**
+ * Returns the {@link Ticket}.
+ *
+ * @return The {@link Ticket}.
+ */
public Ticket getTicket()
{
KerberosPrincipal serverPrincipal = serverModifier.getKerberosPrincipal();
@@ -45,24 +50,44 @@
}
+ /**
+ * Sets the {@link Ticket} version number.
+ *
+ * @param versionNumber
+ */
public void setTicketVersionNumber( int versionNumber )
{
ticketVersionNumber = versionNumber;
}
+ /**
+ * Sets the {@link EncryptedData}.
+ *
+ * @param part
+ */
public void setEncPart( EncryptedData part )
{
encPart = part;
}
+ /**
+ * Sets the server {@link PrincipalName}.
+ *
+ * @param name
+ */
public void setServerName( PrincipalName name )
{
serverModifier.setPrincipalName( name );
}
+ /**
+ * Sets the server realm.
+ *
+ * @param realm
+ */
public void setServerRealm( String realm )
{
serverModifier.setRealm( realm );
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/ApOptions.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/ApOptions.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/ApOptions.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/ApOptions.java Wed May 23 17:26:40 2007
@@ -26,19 +26,29 @@
*/
public class ApOptions extends Options
{
- // AP Request option - reserved
+ /**
+ * AP Request option - reserved
+ */
public static final int RESERVED = 0;
- // AP Request option - use session key
+
+ /**
+ * AP Request option - use session key
+ */
public static final int USE_SESSION_KEY = 1;
- // AP Request option - mutual authentication required
+
+ /**
+ * AP Request option - mutual authentication required
+ */
public static final int MUTUAL_REQUIRED = 2;
- // AP Request option - maximum value
+ /**
+ * AP Request option - maximum value
+ */
public static final int MAX_VALUE = 32;
/**
- * Class constructors
+ * Creates a new instance of ApOptions.
*/
public ApOptions()
{
@@ -46,7 +56,12 @@
}
- public ApOptions(byte[] options)
+ /**
+ * Creates a new instance of ApOptions.
+ *
+ * @param options
+ */
+ public ApOptions( byte[] options )
{
super( MAX_VALUE );
setBytes( options );
@@ -54,7 +69,7 @@
/**
- * Converts the object to a printable string
+ * Converts the object to a printable string.
*/
public String toString()
{
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java Wed May 23 17:26:40 2007
@@ -33,11 +33,11 @@
*/
public class AuthorizationData implements Encodable
{
- private List entries = new ArrayList();
+ private List<AuthorizationDataEntry> entries = new ArrayList<AuthorizationDataEntry>();
/**
- * Class constructor
+ * Creates a new instance of AuthorizationData.
*/
public AuthorizationData()
{
@@ -45,18 +45,33 @@
}
+ /**
+ * Adds all {@link AuthorizationData} entries to this {@link AuthorizationData}.
+ *
+ * @param data
+ */
public void add( AuthorizationData data )
{
entries.addAll( data.entries );
}
+ /**
+ * Adds an {@link AuthorizationDataEntry} to this {@link AuthorizationData}.
+ *
+ * @param entry
+ */
public void add( AuthorizationDataEntry entry )
{
entries.add( entry );
}
+ /**
+ * Returns an {@link Iterator} over the entries in this {@link AuthorizationData}.
+ *
+ * @return An {@link Iterator} over the entries in this {@link AuthorizationData}.
+ */
public Iterator iterator()
{
return entries.iterator();
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataEntry.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataEntry.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationDataEntry.java Wed May 23 17:26:40 2007
@@ -31,21 +31,34 @@
/**
- * Class constructor
+ * Creates a new instance of AuthorizationDataEntry.
+ *
+ * @param adType
+ * @param adData
*/
- public AuthorizationDataEntry(AuthorizationType adType, byte[] adData)
+ public AuthorizationDataEntry( AuthorizationType adType, byte[] adData )
{
authorizationDataType = adType;
authorizationData = adData;
}
+ /**
+ * Returns the raw bytes of the authorization data.
+ *
+ * @return The raw bytes of the authorization data.
+ */
public byte[] getAuthorizationData()
{
return authorizationData;
}
+ /**
+ * Returns the {@link AuthorizationType}.
+ *
+ * @return The {@link AuthorizationType}.
+ */
public AuthorizationType getAuthorizationDataType()
{
return authorizationDataType;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationType.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationType.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationType.java Wed May 23 17:26:40 2007
@@ -32,35 +32,96 @@
public final class AuthorizationType implements Comparable
{
/**
- * Enumeration elements are constructed once upon class loading.
- * Order of appearance here determines the order of compareTo.
+ * Constant for the "null" authorization type.
*/
public static final AuthorizationType NULL = new AuthorizationType( 0, "null" );
+
+ /**
+ * Constant for the "if relevant" authorization type.
+ */
public static final AuthorizationType IF_RELEVANT = new AuthorizationType( 1, "if relevant" );
+
+ /**
+ * Constant for the "intended for server" authorization type.
+ */
public static final AuthorizationType INTENDED_FOR_SERVER = new AuthorizationType( 2, "intended for server" );
+
+ /**
+ * Constant for the "intended for application class" authorization type.
+ */
public static final AuthorizationType INTENDED_FOR_APPLICATION_CLASS = new AuthorizationType( 3,
"intended for application class" );
+
+ /**
+ * Constant for the "kdc issued" authorization type.
+ */
public static final AuthorizationType KDC_ISSUED = new AuthorizationType( 4, "kdc issued" );
+
+ /**
+ * Constant for the "or" authorization type.
+ */
public static final AuthorizationType OR = new AuthorizationType( 5, "or" );
+
+ /**
+ * Constant for the "mandatory ticket extensions" authorization type.
+ */
public static final AuthorizationType MANDATORY_TICKET_EXTENSIONS = new AuthorizationType( 6,
"mandatory ticket extensions" );
+
+ /**
+ * Constant for the "in ticket extensions" authorization type.
+ */
public static final AuthorizationType IN_TICKET_EXTENSIONS = new AuthorizationType( 7, "in ticket extensions" );
+
+ /**
+ * Constant for the "OSF DCE" authorization type.
+ */
public static final AuthorizationType OSF_DCE = new AuthorizationType( 64, "OSF DCE" );
+
+ /**
+ * Constant for the "sesame" authorization type.
+ */
public static final AuthorizationType SESAME = new AuthorizationType( 65, "sesame" );
+ /**
+ * Array for building a List of VALUES.
+ */
+ private static final AuthorizationType[] values =
+ { NULL, IF_RELEVANT, INTENDED_FOR_SERVER, INTENDED_FOR_APPLICATION_CLASS, KDC_ISSUED, OR,
+ MANDATORY_TICKET_EXTENSIONS, IN_TICKET_EXTENSIONS, OSF_DCE, SESAME };
- public String toString()
- {
- return name + " (" + ordinal + ")";
- }
+ /**
+ * A List of all the authorization type constants.
+ */
+ public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
+ /**
+ * The name of the authorization type.
+ */
+ private final String name;
- public int compareTo( Object that )
+ /**
+ * The value/code for the authorization type.
+ */
+ private final int ordinal;
+
+
+ /**
+ * Private constructor prevents construction outside of this class.
+ */
+ private AuthorizationType( int ordinal, String name )
{
- return ordinal - ( ( AuthorizationType ) that ).ordinal;
+ this.ordinal = ordinal;
+ this.name = name;
}
+ /**
+ * Returns the authorization type when specified by its ordinal.
+ *
+ * @param type
+ * @return The authorization type.
+ */
public static AuthorizationType getTypeByOrdinal( int type )
{
for ( int ii = 0; ii < values.length; ii++ )
@@ -73,31 +134,25 @@
}
+ /**
+ * Returns the number associated with this authorization type.
+ *
+ * @return The authorization type ordinal.
+ */
public int getOrdinal()
{
return ordinal;
}
- /// PRIVATE /////
- private final String name;
- private final int ordinal;
-
- /**
- * Private constructor prevents construction outside of this class.
- */
- private AuthorizationType(int ordinal, String name)
+ public int compareTo( Object that )
{
- this.ordinal = ordinal;
- this.name = name;
+ return ordinal - ( ( AuthorizationType ) that ).ordinal;
}
- /**
- * These two lines are all that's necessary to export a List of VALUES.
- */
- private static final AuthorizationType[] values =
- { NULL, IF_RELEVANT, INTENDED_FOR_SERVER, INTENDED_FOR_APPLICATION_CLASS, KDC_ISSUED, OR,
- MANDATORY_TICKET_EXTENSIONS, IN_TICKET_EXTENSIONS, OSF_DCE, SESAME };
- // VALUES needs to be located here, otherwise illegal forward reference
- public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
+
+ public String toString()
+ {
+ return name + " (" + ordinal + ")";
+ }
}
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java Wed May 23 17:26:40 2007
@@ -35,7 +35,13 @@
private byte[] checksum;
- public Checksum(ChecksumType checksumType, byte[] checksum)
+ /**
+ * Creates a new instance of Checksum.
+ *
+ * @param checksumType
+ * @param checksum
+ */
+ public Checksum( ChecksumType checksumType, byte[] checksum )
{
this.checksumType = checksumType;
this.checksum = checksum;
@@ -60,12 +66,22 @@
}
+ /**
+ * Returns the checksum value.
+ *
+ * @return The checksum value.
+ */
public byte[] getChecksumValue()
{
return checksum;
}
+ /**
+ * Returns the {@link ChecksumType}.
+ *
+ * @return The {@link ChecksumType}.
+ */
public ChecksumType getChecksumType()
{
return checksumType;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java Wed May 23 17:26:40 2007
@@ -34,7 +34,14 @@
private byte[] cipherText;
- public EncryptedData(EncryptionType type, int version, byte[] cipherText)
+ /**
+ * Creates a new instance of EncryptedData.
+ *
+ * @param type
+ * @param version
+ * @param cipherText
+ */
+ public EncryptedData( EncryptionType type, int version, byte[] cipherText )
{
encryptionType = type;
keyVersion = version;
@@ -42,18 +49,33 @@
}
+ /**
+ * Returns the {@link EncryptionType}.
+ *
+ * @return The {@link EncryptionType}.
+ */
public EncryptionType getEncryptionType()
{
return encryptionType;
}
+ /**
+ * Returns the key version.
+ *
+ * @return The key version.
+ */
public int getKeyVersion()
{
return keyVersion;
}
+ /**
+ * Returns the raw cipher text.
+ *
+ * @return The raw cipher text.
+ */
public byte[] getCipherText()
{
return cipherText;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedDataModifier.java Wed May 23 17:26:40 2007
@@ -34,24 +34,44 @@
private byte[] cipherText;
+ /**
+ * Returns the {@link EncryptedData}.
+ *
+ * @return The {@link EncryptedData}.
+ */
public EncryptedData getEncryptedData()
{
return new EncryptedData( encryptionType, keyVersion, cipherText );
}
+ /**
+ * Sets the raw cipher text bytes.
+ *
+ * @param cipherText
+ */
public void setCipherText( byte[] cipherText )
{
this.cipherText = cipherText;
}
+ /**
+ * Sets the {@link EncryptionType}.
+ *
+ * @param type
+ */
public void setEncryptionType( EncryptionType type )
{
encryptionType = type;
}
+ /**
+ * Sets the key version.
+ *
+ * @param version
+ */
public void setKeyVersion( int version )
{
keyVersion = version;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedTimeStamp.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedTimeStamp.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedTimeStamp.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedTimeStamp.java Wed May 23 17:26:40 2007
@@ -35,19 +35,35 @@
private int microSeconds; //optional
- public EncryptedTimeStamp(KerberosTime timeStamp, int microSeconds)
+ /**
+ * Creates a new instance of EncryptedTimeStamp.
+ *
+ * @param timeStamp
+ * @param microSeconds
+ */
+ public EncryptedTimeStamp( KerberosTime timeStamp, int microSeconds )
{
this.timeStamp = timeStamp;
this.microSeconds = microSeconds;
}
+ /**
+ * Returns the {@link KerberosTime}.
+ *
+ * @return The {@link KerberosTime}.
+ */
public KerberosTime getTimeStamp()
{
return timeStamp;
}
+ /**
+ * Returns the microseconds.
+ *
+ * @return The microseconds.
+ */
public int getMicroSeconds()
{
return microSeconds;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedTimeStampModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedTimeStampModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedTimeStampModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedTimeStampModifier.java Wed May 23 17:26:40 2007
@@ -30,18 +30,33 @@
private int microSecond; //optional
+ /**
+ * Returns the {@link EncryptedTimeStamp}.
+ *
+ * @return The {@link EncryptedTimeStamp}.
+ */
public EncryptedTimeStamp getEncryptedTimestamp()
{
return new EncryptedTimeStamp( timeStamp, microSecond );
}
+ /**
+ * Sets the {@link KerberosTime}.
+ *
+ * @param timeStamp
+ */
public void setKerberosTime( KerberosTime timeStamp )
{
this.timeStamp = timeStamp;
}
+ /**
+ * Sets the microseconds.
+ *
+ * @param microSecond
+ */
public void setMicroSecond( int microSecond )
{
this.microSecond = microSecond;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java Wed May 23 17:26:40 2007
@@ -26,6 +26,9 @@
/**
+ * A Kerberos symmetric encryption key, which includes metadata support for
+ * the associated key type and key version number.
+ *
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
*/
@@ -36,46 +39,41 @@
private int keyVersion;
- public EncryptionKey(EncryptionType keyType, byte[] keyValue)
+ /**
+ * Creates a new instance of EncryptionKey.
+ *
+ * @param keyType
+ * @param keyValue
+ */
+ public EncryptionKey( EncryptionType keyType, byte[] keyValue )
{
this.keyType = keyType;
this.keyValue = keyValue;
}
- public EncryptionKey(EncryptionType keyType, byte[] keyValue, int keyVersion)
+ /**
+ * Creates a new instance of EncryptionKey. This constructor supports 'keyVersion',
+ * which is sent over the wire as part of EncryptedData but makes more sense
+ * in the domain model to have here as part of the key itself. Therefore, the
+ * keyVersion should only be constructor-injected when EncryptionKey's are
+ * retrieved from persisted storage.
+ *
+ * @param keyType
+ * @param keyValue
+ * @param keyVersion
+ */
+ public EncryptionKey( EncryptionType keyType, byte[] keyValue, int keyVersion )
{
this.keyType = keyType;
this.keyValue = keyValue;
- /**
- * keyVersion is sent over the wire as part of EncryptedData but makes more sense
- * in the domain model to have here as part of the key itself. Therefore, the
- * keyVersion should only be constructor-injected when EncryptionKey's are
- * retrieved from persisted storage.
- *
- * TODO - keyVersion may move into persisted user configuration
- */
this.keyVersion = keyVersion;
}
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
-
- if ( !( o instanceof EncryptionKey ) )
- {
- return false;
- }
-
- EncryptionKey that = ( EncryptionKey ) o;
- return ( this.keyType == that.keyType ) && ( Arrays.equals( this.keyValue, that.keyValue ) );
- }
-
-
+ /**
+ * Destroys this key by overwriting the symmetric key material with zeros.
+ */
public synchronized void destroy()
{
if ( keyValue != null )
@@ -88,26 +86,58 @@
}
- public String toString()
- {
- return keyType.toString() + " (" + keyType.getOrdinal() + ")";
- }
-
-
+ /**
+ * Returns the key type.
+ *
+ * @return The key type.
+ */
public EncryptionType getKeyType()
{
return keyType;
}
+ /**
+ * Returns the key value.
+ *
+ * @return The key value.
+ */
public byte[] getKeyValue()
{
return keyValue;
}
+ /**
+ * Returns the key version.
+ *
+ * @return The key version.
+ */
public int getKeyVersion()
{
return keyVersion;
+ }
+
+
+ public boolean equals( Object o )
+ {
+ if ( this == o )
+ {
+ return true;
+ }
+
+ if ( !( o instanceof EncryptionKey ) )
+ {
+ return false;
+ }
+
+ EncryptionKey that = ( EncryptionKey ) o;
+ return ( this.keyType == that.keyType ) && ( Arrays.equals( this.keyValue, that.keyValue ) );
+ }
+
+
+ public String toString()
+ {
+ return keyType.toString() + " (" + keyType.getOrdinal() + ")";
}
}
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionTypeInfoEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionTypeInfoEntry.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionTypeInfoEntry.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionTypeInfoEntry.java Wed May 23 17:26:40 2007
@@ -33,19 +33,35 @@
private byte[] salt;
- public EncryptionTypeInfoEntry(EncryptionType encryptionType, byte[] salt)
+ /**
+ * Creates a new instance of EncryptionTypeInfoEntry.
+ *
+ * @param encryptionType
+ * @param salt
+ */
+ public EncryptionTypeInfoEntry( EncryptionType encryptionType, byte[] salt )
{
this.encryptionType = encryptionType;
this.salt = salt;
}
+ /**
+ * Returns the salt.
+ *
+ * @return The salt.
+ */
public byte[] getSalt()
{
return salt;
}
+ /**
+ * Returns the {@link EncryptionType}.
+ *
+ * @return The {@link EncryptionType}.
+ */
public EncryptionType getEncryptionType()
{
return encryptionType;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java Wed May 23 17:26:40 2007
@@ -37,16 +37,24 @@
/**
- * Class constructors
+ * Creates a new instance of HostAddress.
+ *
+ * @param addressType
+ * @param address
*/
- public HostAddress(HostAddressType addressType, byte[] address)
+ public HostAddress( HostAddressType addressType, byte[] address )
{
this.addressType = addressType;
this.address = address;
}
- public HostAddress(InetAddress internetAddress)
+ /**
+ * Creates a new instance of HostAddress.
+ *
+ * @param internetAddress
+ */
+ public HostAddress( InetAddress internetAddress )
{
addressType = HostAddressType.ADDRTYPE_INET;
byte[] newAddress = internetAddress.getAddress();
@@ -55,6 +63,12 @@
}
+ /**
+ * Returns whether one {@link HostAddress} is equal to another.
+ *
+ * @param that
+ * @return true if the {@link HostAddress}'s are equal.
+ */
public boolean equals( HostAddress that )
{
if ( this.addressType != that.addressType || ( this.address != null && that.address == null )
@@ -83,12 +97,22 @@
}
+ /**
+ * Get the bytes for this address.
+ *
+ * @return The bytes of this address.
+ */
public byte[] getAddress()
{
return address;
}
+ /**
+ * Returns the {@link HostAddressType} of this {@link HostAddress}.
+ *
+ * @return The {@link HostAddressType}.
+ */
public HostAddressType getAddressType()
{
return addressType;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressType.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressType.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressType.java Wed May 23 17:26:40 2007
@@ -32,36 +32,127 @@
public final class HostAddressType implements Comparable
{
/**
- * Enumeration elements are constructed once upon class loading.
- * Order of appearance here determines the order of compareTo.
+ * Constant for the "null" host address type.
*/
public static final HostAddressType NULL = new HostAddressType( 0, "null" );
+
+ /**
+ * Constant for the "Unix" host address type.
+ */
public static final HostAddressType ADDRTYPE_UNIX = new HostAddressType( 1, "Unix" );
+
+ /**
+ * Constant for the "Internet" host address type.
+ */
public static final HostAddressType ADDRTYPE_INET = new HostAddressType( 2, "Internet" );
+
+ /**
+ * Constant for the "Arpanet" host address type.
+ */
public static final HostAddressType ADDRTYPE_IMPLINK = new HostAddressType( 3, "Arpanet" );
+
+ /**
+ * Constant for the "PUP" host address type.
+ */
public static final HostAddressType ADDRTYPE_PUP = new HostAddressType( 4, "PUP" );
+
+ /**
+ * Constant for the "CHAOS" host address type.
+ */
public static final HostAddressType ADDRTYPE_CHAOS = new HostAddressType( 5, "CHAOS" );
+
+ /**
+ * Constant for the "XEROX Network Services" host address type.
+ */
public static final HostAddressType ADDRTYPE_XNS = new HostAddressType( 6, "XEROX Network Services" );
+
+ /**
+ * Constant for the "IPX" host address type.
+ */
public static final HostAddressType ADDRTYPE_IPX = new HostAddressType( 6, "IPX" );
+
+ /**
+ * Constant for the "OSI" host address type.
+ */
public static final HostAddressType ADDRTYPE_OSI = new HostAddressType( 7, "OSI" );
+
+ /**
+ * Constant for the "European Computer Manufacturers" host address type.
+ */
public static final HostAddressType ADDRTYPE_ECMA = new HostAddressType( 8, "European Computer Manufacturers" );
+
+ /**
+ * Constant for the "Datakit" host address type.
+ */
public static final HostAddressType ADDRTYPE_DATAKIT = new HostAddressType( 9, "Datakit" );
+
+ /**
+ * Constant for the "CCITT" host address type.
+ */
public static final HostAddressType ADDRTYPE_CCITT = new HostAddressType( 10, "CCITT" );
+
+ /**
+ * Constant for the "SNA" host address type.
+ */
public static final HostAddressType ADDRTYPE_SNA = new HostAddressType( 11, "SNA" );
+
+ /**
+ * Constant for the "DECnet" host address type.
+ */
public static final HostAddressType ADDRTYPE_DECNET = new HostAddressType( 12, "DECnet" );
+
+ /**
+ * Constant for the "Direct Data Link Interface" host address type.
+ */
public static final HostAddressType ADDRTYPE_DLI = new HostAddressType( 13, "Direct Data Link Interface" );
+
+ /**
+ * Constant for the "LAT" host address type.
+ */
public static final HostAddressType ADDRTYPE_LAT = new HostAddressType( 14, "LAT" );
+
+ /**
+ * Constant for the "NSC Hyperchannel" host address type.
+ */
public static final HostAddressType ADDRTYPE_HYLINK = new HostAddressType( 15, "NSC Hyperchannel" );
+
+ /**
+ * Constant for the "AppleTalk" host address type.
+ */
public static final HostAddressType ADDRTYPE_APPLETALK = new HostAddressType( 16, "AppleTalk" );
+
+ /**
+ * Constant for the "NetBios" host address type.
+ */
public static final HostAddressType ADDRTYPE_NETBIOS = new HostAddressType( 17, "NetBios" );
+
+ /**
+ * Constant for the "VoiceView" host address type.
+ */
public static final HostAddressType ADDRTYPE_VOICEVIEW = new HostAddressType( 18, "VoiceView" );
+
+ /**
+ * Constant for the "Firefox" host address type.
+ */
public static final HostAddressType ADDRTYPE_FIREFOX = new HostAddressType( 19, "Firefox" );
+
+ /**
+ * Constant for the "Banyan" host address type.
+ */
public static final HostAddressType ADDRTYPE_BAN = new HostAddressType( 21, "Banyan" );
+
+ /**
+ * Constant for the "ATM" host address type.
+ */
public static final HostAddressType ADDRTYPE_ATM = new HostAddressType( 22, "ATM" );
+
+ /**
+ * Constant for the "Internet Protocol V6" host address type.
+ */
public static final HostAddressType ADDRTYPE_INET6 = new HostAddressType( 23, "Internet Protocol V6" );
/**
- * These two lines are all that's necessary to export a List of VALUES.
+ * Array for building a List of VALUES.
*/
private static final HostAddressType[] values =
{ NULL, ADDRTYPE_UNIX, ADDRTYPE_INET, ADDRTYPE_IMPLINK, ADDRTYPE_PUP, ADDRTYPE_CHAOS, ADDRTYPE_XNS,
@@ -69,34 +160,38 @@
ADDRTYPE_DLI, ADDRTYPE_LAT, ADDRTYPE_HYLINK, ADDRTYPE_APPLETALK, ADDRTYPE_NETBIOS, ADDRTYPE_VOICEVIEW,
ADDRTYPE_FIREFOX, ADDRTYPE_BAN, ADDRTYPE_ATM, ADDRTYPE_INET6 };
+ /**
+ * A List of all the host address type constants.
+ */
public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
+ /**
+ * The name of the host address type.
+ */
private final String name;
+
+ /**
+ * The value/code for the host address type.
+ */
private final int ordinal;
/**
* Private constructor prevents construction outside of this class.
*/
- private HostAddressType(int ordinal, String name)
+ private HostAddressType( int ordinal, String name )
{
this.ordinal = ordinal;
this.name = name;
}
- public String toString()
- {
- return name + " (" + ordinal + ")";
- }
-
-
- public int compareTo( Object that )
- {
- return ordinal - ( ( HostAddressType ) that ).ordinal;
- }
-
-
+ /**
+ * Returns the host address type when specified by its ordinal.
+ *
+ * @param type
+ * @return The host address type.
+ */
public static HostAddressType getTypeByOrdinal( int type )
{
for ( int ii = 0; ii < values.length; ii++ )
@@ -111,8 +206,25 @@
}
+ /**
+ * Returns the number associated with this host address type.
+ *
+ * @return The host address type ordinal.
+ */
public int getOrdinal()
{
return ordinal;
+ }
+
+
+ public int compareTo( Object that )
+ {
+ return ordinal - ( ( HostAddressType ) that ).ordinal;
+ }
+
+
+ public String toString()
+ {
+ return name + " (" + ordinal + ")";
}
}
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java Wed May 23 17:26:40 2007
@@ -30,14 +30,22 @@
/**
- * Class constructors
+ * Creates a new instance of HostAddresses.
+ *
+ * @param addresses
*/
- public HostAddresses(HostAddress[] addresses)
+ public HostAddresses( HostAddress[] addresses )
{
this.addresses = addresses;
}
+ /**
+ * Returns true if this {@link HostAddresses} contains a specified {@link HostAddress}.
+ *
+ * @param address
+ * @return true if this {@link HostAddresses} contains a specified {@link HostAddress}.
+ */
public boolean contains( HostAddress address )
{
if ( addresses != null )
@@ -55,6 +63,12 @@
}
+ /**
+ * Returns true if two {@link HostAddresses} are equal.
+ *
+ * @param that
+ * @return true if two {@link HostAddresses} are equal.
+ */
public boolean equals( HostAddresses that )
{
if ( ( this.addresses == null && that.addresses != null )
@@ -83,6 +97,11 @@
}
+ /**
+ * Returns the contained {@link HostAddress}s as an array.
+ *
+ * @return An array of {@link HostAddress}s.
+ */
public HostAddress[] getAddresses()
{
return addresses;
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KdcOptions.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KdcOptions.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KdcOptions.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KdcOptions.java Wed May 23 17:26:40 2007
@@ -26,51 +26,108 @@
*/
public class KdcOptions extends Options
{
- // KDC option - reserved
+ /**
+ * KDC option - reserved.
+ */
public static final int RESERVED = 0;
- // KDC option - forwardable
+ /**
+ * KDC option - forwardable.
+ */
public static final int FORWARDABLE = 1;
- // KDC option - forwarded
+
+ /**
+ * KDC option - forwarded.
+ */
public static final int FORWARDED = 2;
- // KDC option - proxiable
+
+ /**
+ * KDC option - proxiable.
+ */
public static final int PROXIABLE = 3;
- // KDC option - proxy
+
+ /**
+ * KDC option - proxy.
+ */
public static final int PROXY = 4;
- // KDC option - allow postdate
+
+ /**
+ * KDC option - allow postdate.
+ */
public static final int ALLOW_POSTDATE = 5;
- // KDC option - postdated
+
+ /**
+ * KDC option - postdated.
+ */
public static final int POSTDATED = 6;
- // KDC option - unused7
+
+ /**
+ * KDC option - unused7.
+ */
public static final int UNUSED7 = 7;
- // KDC option - renewable
+
+ /**
+ * KDC option - renewable.
+ */
public static final int RENEWABLE = 8;
- // KDC option - unused9
+
+ /**
+ * KDC option - unused9.
+ */
public static final int UNUSED9 = 9;
- // KDC option - unused10
+
+ /**
+ * KDC option - unused10.
+ */
public static final int UNUSED10 = 10;
- // KDC option - unused11
+
+ /**
+ * KDC option - unused11.
+ */
public static final int UNUSED11 = 11;
- // KDC option - unused12
+
+ /**
+ * KDC option - unused12.
+ */
public static final int UNUSED12 = 12;
- // KDC option - unused13
+
+ /**
+ * KDC option - unused13.
+ */
public static final int UNUSED13 = 13;
- // KDC option - disable transisted checked
+
+ /**
+ * KDC option - disable transisted checked.
+ */
public static final int DISABLE_TRANSISTED_CHECKED = 26;
- // KDC option - renewable is ok
+
+ /**
+ * KDC option - renewable is ok.
+ */
public static final int RENEWABLE_OK = 27;
- // KDC option - encrypted key in skey
+
+ /**
+ * KDC option - encrypted key in skey.
+ */
public static final int ENC_TKT_IN_SKEY = 28;
- // KDC option - renew
+
+ /**
+ * KDC option - renew.
+ */
public static final int RENEW = 30;
- // KDC option - validate
+
+ /**
+ * KDC option - validate.
+ */
public static final int VALIDATE = 31;
- // KDC option - maximum value
+ /**
+ * KDC option - maximum value.
+ */
public static final int MAX_VALUE = 32;
/**
- * Class constructors
+ * Creates a new instance of KdcOptions.
*/
public KdcOptions()
{
@@ -78,7 +135,12 @@
}
- public KdcOptions(byte[] bytes)
+ /**
+ * Creates a new instance of KdcOptions.
+ *
+ * @param bytes
+ */
+ public KdcOptions( byte[] bytes )
{
super( MAX_VALUE );
setBytes( bytes );
@@ -86,7 +148,7 @@
/**
- * Converts the object to a printable string
+ * Converts the object to a printable string.
*/
public String toString()
{
Modified: directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KerberosPrincipalModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KerberosPrincipalModifier.java?view=diff&rev=541123&r1=541122&r2=541123
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KerberosPrincipalModifier.java (original)
+++ directory/apacheds/branches/apacheds-sasl-branch/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KerberosPrincipalModifier.java Wed May 23 17:26:40 2007
@@ -35,6 +35,11 @@
String realm;
+ /**
+ * Returns the {@link KerberosPrincipal}.
+ *
+ * @return The {@link KerberosPrincipal}.
+ */
public KerberosPrincipal getKerberosPrincipal()
{
if ( nameComponent != null )
@@ -55,12 +60,22 @@
}
+ /**
+ * Sets the {@link PrincipalName}.
+ *
+ * @param principalName
+ */
public void setPrincipalName( PrincipalName principalName )
{
nameComponent = principalName;
}
+ /**
+ * Sets the realm.
+ *
+ * @param realm
+ */
public void setRealm( String realm )
{
this.realm = realm;