directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r234118 - /directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/
Date Sat, 20 Aug 2005 19:33:05 GMT
Author: erodriguez
Date: Sat Aug 20 12:32:59 2005
New Revision: 234118

URL: http://svn.apache.org/viewcvs?rev=234118&view=rev
Log:
Reformatting:  imports, whitespace, line breaks, or code convention.

Modified:
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Authenticator.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/AuthenticatorModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPart.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPartModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncAsRepPart.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKdcRepPart.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbCredPart.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPart.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPartModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTgsRepPart.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPart.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPartModifier.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/MessageComponentType.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Ticket.java
    directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/TicketModifier.java

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Authenticator.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Authenticator.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Authenticator.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Authenticator.java Sat Aug 20 12:32:59 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.components;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
@@ -24,11 +23,10 @@
 import org.apache.kerberos.messages.value.EncryptionKey;
 import org.apache.kerberos.messages.value.KerberosTime;
 
-
 public class Authenticator
 {
 	public static final int AUTHENTICATOR_VNO = 5;
-	
+
 	private int               versionNumber;
 	private KerberosPrincipal clientPrincipal;
 	private Checksum          checksum;
@@ -37,67 +35,66 @@
 	private EncryptionKey     subSessionKey;
 	private int               sequenceNumber;
 	private AuthorizationData authorizationData;
-	
+
 	public Authenticator( KerberosPrincipal clientPrincipal, Checksum checksum,
-			int clientMicroSecond, KerberosTime clientTime, EncryptionKey subSessionKey,
-			int sequenceNumber, AuthorizationData authorizationData )
-	{
-		this( AUTHENTICATOR_VNO, clientPrincipal, checksum, clientMicroSecond, clientTime,
-		 		subSessionKey, sequenceNumber, authorizationData );
-	}
-
-	public Authenticator( int versionNumber, KerberosPrincipal clientPrincipal, Checksum checksum,
-			int clientMicroSecond, KerberosTime clientTime, EncryptionKey subSessionKey, int sequenceNumber,
-			AuthorizationData authorizationData )
-	{
-		this.versionNumber     = versionNumber;
-		this.clientPrincipal   = clientPrincipal;
-		this.checksum          = checksum;
-		this.clientMicroSecond = clientMicroSecond;
-		this.clientTime        = clientTime;
-		this.subSessionKey     = subSessionKey;
-		this.sequenceNumber    = sequenceNumber;
-		this.authorizationData = authorizationData;
-	}
-	
-	public KerberosPrincipal getClientPrincipal()
-	{
-		return clientPrincipal;
-	}
-	
-	public KerberosTime getClientTime()
-	{
-		return clientTime;
-	}
-	
-	public int getClientMicroSecond()
-	{
-		return clientMicroSecond;
-	}
-	
-	public AuthorizationData getAuthorizationData()
-	{
-		return authorizationData;
-	}
-	
-	public Checksum getChecksum()
-	{
-		return checksum;
-	}
-	
-	public int getSequenceNumber()
-	{
-		return sequenceNumber;
-	}
-	
-	public EncryptionKey getSubSessionKey()
-	{
-		return subSessionKey;
-	}
-	
-	public int getVersionNumber()
-	{
-		return versionNumber;
-	}
+            int clientMicroSecond, KerberosTime clientTime, EncryptionKey subSessionKey,
+            int sequenceNumber, AuthorizationData authorizationData )
+    {
+        this( AUTHENTICATOR_VNO, clientPrincipal, checksum, clientMicroSecond, clientTime,
+                subSessionKey, sequenceNumber, authorizationData );
+    }
+
+    public Authenticator( int versionNumber, KerberosPrincipal clientPrincipal, Checksum checksum,
+            int clientMicroSecond, KerberosTime clientTime, EncryptionKey subSessionKey,
+            int sequenceNumber, AuthorizationData authorizationData )
+    {
+        this.versionNumber     = versionNumber;
+        this.clientPrincipal   = clientPrincipal;
+        this.checksum          = checksum;
+        this.clientMicroSecond = clientMicroSecond;
+        this.clientTime        = clientTime;
+        this.subSessionKey     = subSessionKey;
+        this.sequenceNumber    = sequenceNumber;
+        this.authorizationData = authorizationData;
+    }
+
+    public KerberosPrincipal getClientPrincipal()
+    {
+        return clientPrincipal;
+    }
+
+    public KerberosTime getClientTime()
+    {
+        return clientTime;
+    }
+
+    public int getClientMicroSecond()
+    {
+        return clientMicroSecond;
+    }
+
+    public AuthorizationData getAuthorizationData()
+    {
+        return authorizationData;
+    }
+
+    public Checksum getChecksum()
+    {
+        return checksum;
+    }
+
+    public int getSequenceNumber()
+    {
+        return sequenceNumber;
+    }
+
+    public EncryptionKey getSubSessionKey()
+    {
+        return subSessionKey;
+    }
+
+    public int getVersionNumber()
+    {
+        return versionNumber;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/AuthenticatorModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/AuthenticatorModifier.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/AuthenticatorModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/AuthenticatorModifier.java Sat Aug 20 12:32:59 2005
@@ -16,55 +16,77 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.value.AuthorizationData;
+import org.apache.kerberos.messages.value.Checksum;
+import org.apache.kerberos.messages.value.EncryptionKey;
+import org.apache.kerberos.messages.value.KerberosPrincipalModifier;
+import org.apache.kerberos.messages.value.KerberosTime;
+import org.apache.kerberos.messages.value.PrincipalName;
 
-public class AuthenticatorModifier {
-	
-	private int                       _versionNumber;
-	private KerberosPrincipalModifier _clientModifier = new KerberosPrincipalModifier();
-	private Checksum                  _checksum;
-	private int                       _clientMicroSecond;
-	private KerberosTime              _clientTime;
-	private EncryptionKey             _subSessionKey;
-	private int                       _sequenceNumber;
-	private AuthorizationData         _authorizationData;
-	
-	public Authenticator getAuthenticator() {
-		
-		KerberosPrincipal clientPrincipal = _clientModifier.getKerberosPrincipal();
-		
-		return new Authenticator(_versionNumber, clientPrincipal, _checksum, _clientMicroSecond,
-			_clientTime, _subSessionKey, _sequenceNumber, _authorizationData);
-	}
-	
-	public void setVersionNumber(int versionNumber) {
-		_versionNumber = versionNumber;
-	}
-	public void setClientName(PrincipalName name) {
-		_clientModifier.setPrincipalName(name);
-	}
-	public void setClientRealm(String realm) {
-		_clientModifier.setRealm(realm);
-	}
-	public void setAuthorizationData(AuthorizationData data) {
-		_authorizationData = data;
-	}
-	public void setChecksum(Checksum checksum) {
-		_checksum = checksum;
-	}
-	public void setClientMicroSecond(int microSecond) {
-		_clientMicroSecond = microSecond;
-	}
-	public void setClientTime(KerberosTime time) {
-		_clientTime = time;
-	}
-	public void setSequenceNumber(int number) {
-		_sequenceNumber = number;
-	}
-	public void setSubSessionKey(EncryptionKey sessionKey) {
-		_subSessionKey = sessionKey;
-	}
-}
+public class AuthenticatorModifier
+{
+	private int                       versionNumber;
+	private KerberosPrincipalModifier clientModifier = new KerberosPrincipalModifier();
+	private Checksum                  checksum;
+	private int                       clientMicroSecond;
+	private KerberosTime              clientTime;
+	private EncryptionKey             subSessionKey;
+	private int                       sequenceNumber;
+	private AuthorizationData         authorizationData;
+
+	public Authenticator getAuthenticator()
+    {
+
+        KerberosPrincipal clientPrincipal = clientModifier.getKerberosPrincipal();
+
+        return new Authenticator( versionNumber, clientPrincipal, checksum, clientMicroSecond,
+                clientTime, subSessionKey, sequenceNumber, authorizationData );
+    }
+
+    public void setVersionNumber( int versionNumber )
+    {
+        this.versionNumber = versionNumber;
+    }
+
+    public void setClientName( PrincipalName name )
+    {
+        clientModifier.setPrincipalName( name );
+    }
+
+    public void setClientRealm( String realm )
+    {
+        clientModifier.setRealm( realm );
+    }
 
+    public void setAuthorizationData( AuthorizationData data )
+    {
+        authorizationData = data;
+    }
+
+    public void setChecksum( Checksum checksum )
+    {
+        this.checksum = checksum;
+    }
+
+    public void setClientMicroSecond( int microSecond )
+    {
+        clientMicroSecond = microSecond;
+    }
+
+    public void setClientTime( KerberosTime time )
+    {
+        clientTime = time;
+    }
+
+    public void setSequenceNumber( int number )
+    {
+        sequenceNumber = number;
+    }
+
+    public void setSubSessionKey( EncryptionKey sessionKey )
+    {
+        subSessionKey = sessionKey;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPart.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPart.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPart.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPart.java Sat Aug 20 12:32:59 2005
@@ -16,41 +16,49 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.*;
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.KerberosMessage;
+import org.apache.kerberos.messages.MessageType;
+import org.apache.kerberos.messages.value.EncryptionKey;
+import org.apache.kerberos.messages.value.KerberosTime;
 
 /**
  * Encrypted part of the application response
  */
-public class EncApRepPart extends KerberosMessage {
+public class EncApRepPart extends KerberosMessage
+{
+    private KerberosTime  clientTime;
+    private int           cusec;
+    private EncryptionKey subSessionKey; //optional
+    private Integer       sequenceNumber; //optional
 
-	private KerberosTime  _clientTime;
-	private int           _cusec;
-	private EncryptionKey _subSessionKey;  //optional
-	private Integer       _sequenceNumber; //optional
-
-	public EncApRepPart(KerberosTime clientTime, int cusec, EncryptionKey subSessionKey,
-			Integer sequenceNumber) {
-		
-		super(MessageType.ENC_AP_REP_PART);
-		
-		_clientTime     = clientTime;
-		_cusec          = cusec;
-		_subSessionKey  = subSessionKey;
-		_sequenceNumber = sequenceNumber;
-	}
-	
-	public KerberosTime getClientTime() {
-		return _clientTime;
-	}
-	public int getClientMicroSecond() {
-		return _cusec;
-	}
-	public Integer getSequenceNumber() {
-		return _sequenceNumber;
-	}
-	public EncryptionKey getSubSessionKey() {
-		return _subSessionKey;
-	}
-}
+    public EncApRepPart( KerberosTime clientTime, int cusec, EncryptionKey subSessionKey,
+            Integer sequenceNumber )
+    {
+        super( MessageType.ENC_AP_REP_PART );
+
+        this.clientTime     = clientTime;
+        this.cusec          = cusec;
+        this.subSessionKey  = subSessionKey;
+        this.sequenceNumber = sequenceNumber;
+    }
+
+    public KerberosTime getClientTime()
+    {
+        return clientTime;
+    }
 
+    public int getClientMicroSecond()
+    {
+        return cusec;
+    }
+
+    public Integer getSequenceNumber()
+    {
+        return sequenceNumber;
+    }
+
+    public EncryptionKey getSubSessionKey()
+    {
+        return subSessionKey;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPartModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPartModifier.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPartModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncApRepPartModifier.java Sat Aug 20 12:32:59 2005
@@ -16,31 +16,38 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.value.EncryptionKey;
+import org.apache.kerberos.messages.value.KerberosTime;
 
-public class EncApRepPartModifier {
+public class EncApRepPartModifier
+{
+    private KerberosTime  clientTime;
+    private int           cusec;
+    private EncryptionKey subSessionKey; //optional
+    private Integer       sequenceNumber; //optional
 
-	private KerberosTime  _clientTime;
-	private int           _cusec;
-	private EncryptionKey _subSessionKey;  //optional
-	private Integer       _sequenceNumber; //optional
-
-	public EncApRepPart getEncApRepPart() {
-		
-		return new EncApRepPart(_clientTime, _cusec, _subSessionKey, _sequenceNumber);
-	}
-	
-	public void setClientTime(KerberosTime clientTime) {
-		_clientTime = clientTime;
-	}
-	public void setClientMicroSecond(int cusec) {
-		_cusec = cusec;
-	}
-	public void setSubSessionKey(EncryptionKey subSessionKey) {
-		_subSessionKey = subSessionKey;
-	}
-	public void setSequenceNumber(Integer sequenceNumber) {
-		_sequenceNumber = sequenceNumber;
-	}
-}
+    public EncApRepPart getEncApRepPart()
+    {
+        return new EncApRepPart( clientTime, cusec, subSessionKey, sequenceNumber );
+    }
+
+    public void setClientTime( KerberosTime clientTime )
+    {
+        this.clientTime = clientTime;
+    }
+
+    public void setClientMicroSecond( int cusec )
+    {
+        this.cusec = cusec;
+    }
 
+    public void setSubSessionKey( EncryptionKey subSessionKey )
+    {
+        this.subSessionKey = subSessionKey;
+    }
+
+    public void setSequenceNumber( Integer sequenceNumber )
+    {
+        this.sequenceNumber = sequenceNumber;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncAsRepPart.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncAsRepPart.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncAsRepPart.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncAsRepPart.java Sat Aug 20 12:32:59 2005
@@ -16,26 +16,28 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.value.EncryptionKey;
+import org.apache.kerberos.messages.value.HostAddresses;
+import org.apache.kerberos.messages.value.KerberosTime;
+import org.apache.kerberos.messages.value.LastRequest;
+import org.apache.kerberos.messages.value.TicketFlags;
 
 /**
  * Encrypted part of the authentication service response
  */
-public class EncAsRepPart extends EncKdcRepPart {
-
-	/**
-	 * Class constructor
-	 */
-	public EncAsRepPart(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_AS_REP_PART);
-	}
+public class EncAsRepPart extends EncKdcRepPart
+{
+    /**
+     * Class constructor
+     */
+    public EncAsRepPart( 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_AS_REP_PART );
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKdcRepPart.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKdcRepPart.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKdcRepPart.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKdcRepPart.java Sat Aug 20 12:32:59 2005
@@ -16,128 +16,179 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.value.EncryptionKey;
+import org.apache.kerberos.messages.value.HostAddresses;
+import org.apache.kerberos.messages.value.KerberosTime;
+import org.apache.kerberos.messages.value.LastRequest;
+import org.apache.kerberos.messages.value.TicketFlags;
 
 /**
  * Base class for encrypted parts of KDC responses
  */
-public class EncKdcRepPart {
-
-	private EncryptionKey        _key;
-	private LastRequest          _lastRequest;
-	private int                  _nonce;
-	private KerberosTime         _keyExpiration;   //optional
-	private TicketFlags          _flags = new TicketFlags();
-	private KerberosTime         _authTime;
-	private KerberosTime         _startTime;       //optional
-	private KerberosTime         _endTime;
-	private KerberosTime         _renewTill;       //optional
-	private KerberosPrincipal    _serverPrincipal;
-	private HostAddresses        _clientAddresses; //optional
-	private MessageComponentType _componentType;
+public class EncKdcRepPart
+{
+	private EncryptionKey        key;
+	private LastRequest          lastRequest;
+	private int                  nonce;
+	private KerberosTime         keyExpiration;   //optional
+	private TicketFlags          flags = new TicketFlags();
+	private KerberosTime         authTime;
+	private KerberosTime         startTime;       //optional
+	private KerberosTime         endTime;
+	private KerberosTime         renewTill;       //optional
+	private KerberosPrincipal    serverPrincipal;
+	private HostAddresses        clientAddresses; //optional
+	private MessageComponentType componentType;
 
 	/**
-	 * Class constructors
-	 */
-	public EncKdcRepPart() {
-		// built up by setter during reply generation
-	}
-	
-	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) {
-		
-		_key             = key;
-		_lastRequest     = lastReq;
-		_nonce           = nonce;
-		_keyExpiration   = keyExpiration;
-		_flags           = flags;
-		_authTime        = authtime;
-		_startTime       = starttime;
-		_endTime         = endtime;
-		_renewTill       = renewTill;
-		_serverPrincipal = serverPrincipal;
-		_clientAddresses = caddr;
-		_componentType   = componentType;
-	}
-	
-	// getters
-	public KerberosTime getAuthTime() {
-		return _authTime;
-	}
-	public HostAddresses getClientAddresses() {
-		return _clientAddresses;
-	}
-	public KerberosTime getEndTime() {
-		return _endTime;
-	}
-	public TicketFlags getFlags() {
-		return _flags;
-	}
-	public EncryptionKey getKey() {
-		return _key;
-	}
-	public KerberosTime getKeyExpiration() {
-		return _keyExpiration;
-	}
-	public LastRequest getLastRequest() {
-		return _lastRequest;
-	}
-	public int getNonce() {
-		return _nonce;
-	}
-	public KerberosTime getRenewTill() {
-		return _renewTill;
-	}
-	public KerberosPrincipal getServerPrincipal() {
-		return _serverPrincipal;
-	}
-	public String getServerRealm() {
-		return _serverPrincipal.getRealm();
-	}
-	public KerberosTime getStartTime() {
-		return _startTime;
-	}
-	public MessageComponentType getComponentType() {
-		return _componentType;
-	}
-	
-	// setters
-	public void setAuthTime(KerberosTime time) {
-		_authTime = time;
-	}
-	public void setClientAddresses(HostAddresses addresses) {
-		_clientAddresses = addresses;
-	}
-	public void setEndTime(KerberosTime time) {
-		_endTime = time;
-	}
-	public void setFlags(TicketFlags flags) {
-		_flags = flags;
-	}
-	public void setKey(EncryptionKey key) {
-		_key = key;
-	}
-	public void setKeyExpiration(KerberosTime expiration) {
-		_keyExpiration = expiration;
-	}
-	public void setLastRequest(LastRequest request) {
-		_lastRequest = request;
-	}
-	public void setNonce(int nonce) {
-		_nonce = nonce;
-	}
-	public void setRenewTill(KerberosTime till) {
-		_renewTill = till;
-	}
-	public void setServerPrincipal(KerberosPrincipal principal) {
-		_serverPrincipal = principal;
-	}
-	public void setStartTime(KerberosTime time) {
-		_startTime = time;
+     * Class constructors
+     */
+    public EncKdcRepPart()
+    {
+        // built up by setter during reply generation
+    }
+
+    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 )
+    {
+		this.key             = key;
+		this.lastRequest     = lastReq;
+		this.nonce           = nonce;
+		this.keyExpiration   = keyExpiration;
+		this.flags           = flags;
+		this.authTime        = authtime;
+		this.startTime       = starttime;
+		this.endTime         = endtime;
+		this.renewTill       = renewTill;
+		this.serverPrincipal = serverPrincipal;
+		this.clientAddresses = caddr;
+		this.componentType   = componentType;
 	}
-}
 
+    // getters
+    public KerberosTime getAuthTime()
+    {
+        return authTime;
+    }
+
+    public HostAddresses getClientAddresses()
+    {
+        return clientAddresses;
+    }
+
+    public KerberosTime getEndTime()
+    {
+        return endTime;
+    }
+
+    public TicketFlags getFlags()
+    {
+        return flags;
+    }
+
+    public EncryptionKey getKey()
+    {
+        return key;
+    }
+
+    public KerberosTime getKeyExpiration()
+    {
+        return keyExpiration;
+    }
+
+    public LastRequest getLastRequest()
+    {
+        return lastRequest;
+    }
+
+    public int getNonce()
+    {
+        return nonce;
+    }
+
+    public KerberosTime getRenewTill()
+    {
+        return renewTill;
+    }
+
+    public KerberosPrincipal getServerPrincipal()
+    {
+        return serverPrincipal;
+    }
+
+    public String getServerRealm()
+    {
+        return serverPrincipal.getRealm();
+    }
+
+    public KerberosTime getStartTime()
+    {
+        return startTime;
+    }
+
+    public MessageComponentType getComponentType()
+    {
+        return componentType;
+    }
+
+    // setters
+    public void setAuthTime( KerberosTime time )
+    {
+        authTime = time;
+    }
+
+    public void setClientAddresses( HostAddresses addresses )
+    {
+        clientAddresses = addresses;
+    }
+
+    public void setEndTime( KerberosTime time )
+    {
+        endTime = time;
+    }
+
+    public void setFlags( TicketFlags flags )
+    {
+        this.flags = flags;
+    }
+
+    public void setKey( EncryptionKey key )
+    {
+        this.key = key;
+    }
+
+    public void setKeyExpiration( KerberosTime expiration )
+    {
+        keyExpiration = expiration;
+    }
+
+    public void setLastRequest( LastRequest request )
+    {
+        lastRequest = request;
+    }
+
+    public void setNonce( int nonce )
+    {
+        this.nonce = nonce;
+    }
+
+    public void setRenewTill( KerberosTime till )
+    {
+        renewTill = till;
+    }
+
+    public void setServerPrincipal( KerberosPrincipal principal )
+    {
+        serverPrincipal = principal;
+    }
+
+    public void setStartTime( KerberosTime time )
+    {
+        startTime = time;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbCredPart.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbCredPart.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbCredPart.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbCredPart.java Sat Aug 20 12:32:59 2005
@@ -16,33 +16,34 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.value.HostAddress;
+import org.apache.kerberos.messages.value.HostAddresses;
+import org.apache.kerberos.messages.value.KerberosTime;
+import org.apache.kerberos.messages.value.KrbCredInfo;
 
 /**
  * Encrypted part of credential message types
  */
-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
+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
 
 	/**
-	 * Class constructor
-	 */
-	public EncKrbCredPart(KrbCredInfo[] ticketInfo, KerberosTime timeStamp,
-			Integer usec, Integer nonce, HostAddress sAddress,
-			HostAddresses rAddress) {
-		
-		_ticketInfo = ticketInfo;
-		_nonce      = nonce;
-		_timeStamp  = timeStamp;
-		_usec       = usec;
-		_sAddress   = sAddress;
-		_rAddress   = rAddress;
-	}
+     * Class constructor
+     */
+    public EncKrbCredPart( KrbCredInfo[] ticketInfo, KerberosTime timeStamp, Integer usec,
+            Integer nonce, HostAddress sAddress, HostAddresses rAddress )
+    {
+        this.ticketInfo = ticketInfo;
+        this.nonce      = nonce;
+        this.timeStamp  = timeStamp;
+        this.usec       = usec;
+        this.sAddress   = sAddress;
+        this.rAddress   = rAddress;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPart.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPart.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPart.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPart.java Sat Aug 20 12:32:59 2005
@@ -16,51 +16,63 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.*;
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.KerberosMessage;
+import org.apache.kerberos.messages.MessageType;
+import org.apache.kerberos.messages.value.HostAddress;
+import org.apache.kerberos.messages.value.KerberosTime;
 
 /**
  * Encrypted part of private messages
  */
-public class EncKrbPrivPart extends KerberosMessage {
+public class EncKrbPrivPart extends KerberosMessage
+{
+	private byte[]       userData;
+	private KerberosTime timestamp;        //optional
+	private Integer      usec;             //optional
+	private Integer      sequenceNumber;   //optional
+	private HostAddress  senderAddress;    //optional
+	private HostAddress  recipientAddress; //optional
 
-	private byte[]       _userData;
-	private KerberosTime _timestamp;        //optional
-	private Integer      _usec;             //optional
-	private Integer      _sequenceNumber;   //optional
-	private HostAddress  _senderAddress;    //optional
-	private HostAddress  _recipientAddress; //optional
-
-	public EncKrbPrivPart(byte[] userData, KerberosTime timestamp, Integer usec,
-			Integer sequenceNumber, HostAddress senderAddress, HostAddress recipientAddress) {
-		
-		super(MessageType.ENC_PRIV_PART);
+	public EncKrbPrivPart( byte[] userData, KerberosTime timestamp, Integer usec,
+            Integer sequenceNumber, HostAddress senderAddress, HostAddress recipientAddress )
+    {
+        super( MessageType.ENC_PRIV_PART );
 		
-		_userData         = userData;
-		_timestamp        = timestamp;
-		_usec             = usec;
-		_sequenceNumber   = sequenceNumber;
-		_senderAddress    = senderAddress;
-		_recipientAddress = recipientAddress;
+		this.userData         = userData;
+		this.timestamp        = timestamp;
+		this.usec             = usec;
+		this.sequenceNumber   = sequenceNumber;
+		this.senderAddress    = senderAddress;
+		this.recipientAddress = recipientAddress;
 	}
 
-	public HostAddress getRecipientAddress() {
-		return _recipientAddress;
-	}
-	public HostAddress getSenderAddress() {
-		return _senderAddress;
-	}
-	public Integer getSequenceNumber() {
-		return _sequenceNumber;
-	}
-	public KerberosTime getTimestamp() {
-		return _timestamp;
-	}
-	public Integer getMicroSecond() {
-		return _usec;
-	}
-	public byte[] getUserData() {
-		return _userData;
-	}
-}
+    public HostAddress getRecipientAddress()
+    {
+        return recipientAddress;
+    }
+
+    public HostAddress getSenderAddress()
+    {
+        return senderAddress;
+    }
+
+    public Integer getSequenceNumber()
+    {
+        return sequenceNumber;
+    }
 
+    public KerberosTime getTimestamp()
+    {
+        return timestamp;
+    }
+
+    public Integer getMicroSecond()
+    {
+        return usec;
+    }
+
+    public byte[] getUserData()
+    {
+        return userData;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPartModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPartModifier.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPartModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncKrbPrivPartModifier.java Sat Aug 20 12:32:59 2005
@@ -16,40 +16,51 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import org.apache.kerberos.messages.value.HostAddress;
+import org.apache.kerberos.messages.value.KerberosTime;
 
-public class EncKrbPrivPartModifier {
+public class EncKrbPrivPartModifier
+{
+	private byte[]       userData;
+	private KerberosTime timestamp;        //optional
+	private Integer      usec;             //optional
+	private Integer      sequenceNumber;   //optional
+	private HostAddress  senderAddress;    //optional
+	private HostAddress  recipientAddress; //optional
 
-	private byte[]       _userData;
-	private KerberosTime _timestamp;        //optional
-	private Integer      _usec;             //optional
-	private Integer      _sequenceNumber;   //optional
-	private HostAddress  _senderAddress;    //optional
-	private HostAddress  _recipientAddress; //optional
-
-	public EncKrbPrivPart getEncKrbPrivPart() {
-		
-		return new EncKrbPrivPart(_userData, _timestamp, _usec, _sequenceNumber,
-				_senderAddress, _recipientAddress);
-	}
-
-	public void setRecipientAddress(HostAddress address) {
-		_recipientAddress = address;
-	}
-	public void setSenderAddress(HostAddress address) {
-		_senderAddress = address;
-	}
-	public void setSequenceNumber(Integer number) {
-		_sequenceNumber = number;
-	}
-	public void setTimestamp(KerberosTime timestamp) {
-		_timestamp = timestamp;
-	}
-	public void setMicroSecond(Integer usec) {
-		_usec = usec;
-	}
-	public void setUserData(byte[] data) {
-		_userData = data;
-	}
-}
+	public EncKrbPrivPart getEncKrbPrivPart()
+    {
+        return new EncKrbPrivPart( userData, timestamp, usec, sequenceNumber, senderAddress,
+                recipientAddress );
+    }
+
+    public void setRecipientAddress( HostAddress address )
+    {
+        recipientAddress = address;
+    }
+
+    public void setSenderAddress( HostAddress address )
+    {
+        senderAddress = address;
+    }
+
+    public void setSequenceNumber( Integer number )
+    {
+        sequenceNumber = number;
+    }
 
+    public void setTimestamp( KerberosTime timestamp )
+    {
+        this.timestamp = timestamp;
+    }
+
+    public void setMicroSecond( Integer usec )
+    {
+        this.usec = usec;
+    }
+
+    public void setUserData( byte[] data )
+    {
+        userData = data;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTgsRepPart.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTgsRepPart.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTgsRepPart.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTgsRepPart.java Sat Aug 20 12:32:59 2005
@@ -16,26 +16,29 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.value.EncryptionKey;
+import org.apache.kerberos.messages.value.HostAddresses;
+import org.apache.kerberos.messages.value.KerberosTime;
+import org.apache.kerberos.messages.value.LastRequest;
+import org.apache.kerberos.messages.value.TicketFlags;
 
 /**
  * Encrypted part of TGS responses
  */
-public class EncTgsRepPart extends EncKdcRepPart {
+public class EncTgsRepPart extends EncKdcRepPart
+{
+    /**
+     * Class constructor
+     */
+    public EncTgsRepPart( EncryptionKey key, LastRequest lastReq, int nonce,
+            KerberosTime keyExpiration, TicketFlags flags, KerberosTime authtime,
+            KerberosTime starttime, KerberosTime endtime, KerberosTime renewTill,
+            KerberosPrincipal serverPrincipal, HostAddresses caddr )
+    {
 
-	/**
-	 * Class constructor
-	 */
-	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);
-	}
+        super( key, lastReq, nonce, keyExpiration, flags, authtime, starttime, endtime, renewTill,
+                serverPrincipal, caddr, MessageComponentType.KRB_ENC_TGS_REP_PART );
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPart.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPart.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPart.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPart.java Sat Aug 20 12:32:59 2005
@@ -16,75 +16,100 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.value.AuthorizationData;
+import org.apache.kerberos.messages.value.EncryptionKey;
+import org.apache.kerberos.messages.value.HostAddresses;
+import org.apache.kerberos.messages.value.KerberosTime;
+import org.apache.kerberos.messages.value.TicketFlags;
+import org.apache.kerberos.messages.value.TransitedEncoding;
 
 /**
  * Encrypted part of Tickets
  */
-public class EncTicketPart {
-
-	private TicketFlags       _flags;
-	private EncryptionKey     _sessionKey;
-	private KerberosPrincipal _clientPrincipal;
-	private TransitedEncoding _transitedEncoding;
-	private KerberosTime      _authtime;
-	private KerberosTime      _startTime;         //optional
-	private KerberosTime      _endTime;
-	private KerberosTime      _renewTill;         //optional
-	private HostAddresses     _clientAddresses;   //optional
-	private AuthorizationData _authorizationData; //optional
+public class EncTicketPart
+{
+	private TicketFlags       flags;
+	private EncryptionKey     sessionKey;
+	private KerberosPrincipal clientPrincipal;
+	private TransitedEncoding transitedEncoding;
+	private KerberosTime      authtime;
+	private KerberosTime      startTime;         //optional
+	private KerberosTime      endTime;
+	private KerberosTime      renewTill;         //optional
+	private HostAddresses     clientAddresses;   //optional
+	private AuthorizationData authorizationData; //optional
 
 	public EncTicketPart(TicketFlags flags, EncryptionKey key, KerberosPrincipal clientPrincipal,
 			TransitedEncoding transited, KerberosTime authtime, KerberosTime starttime,
 			KerberosTime endtime, KerberosTime renewTill, HostAddresses caddr,
 			AuthorizationData authorizationData) {
 		
-		_flags             = flags;
-		_sessionKey        = key;
-		_clientPrincipal   = clientPrincipal;
-		_transitedEncoding = transited;
-		_authtime          = authtime;
-		_startTime         = starttime;
-		_endTime           = endtime;
-		_renewTill         = renewTill;
-		_clientAddresses   = caddr;
-		_authorizationData = authorizationData;
-	}
-
-	public AuthorizationData getAuthorizationData() {
-		return _authorizationData;
-	}
-	public KerberosTime getAuthTime() {
-		return _authtime;
-	}
-	public HostAddresses getClientAddresses() {
-		return _clientAddresses;
-	}
-	public KerberosPrincipal getClientPrincipal() {
-		return _clientPrincipal;
-	}
-	public String getClientRealm() {
-		return _clientPrincipal.getRealm();
-	}
-	public KerberosTime getEndTime() {
-		return _endTime;
-	}
-	public TicketFlags getFlags() {
-		return _flags;
-	}
-	public EncryptionKey getSessionKey() {
-		return _sessionKey;
-	}
-	public KerberosTime getRenewTill() {
-		return _renewTill;
-	}
-	public KerberosTime getStartTime() {
-		return _startTime;
-	}
-	public TransitedEncoding getTransitedEncoding() {
-		return _transitedEncoding;
-	}
+        this.flags             = flags;
+        this.sessionKey        = key;
+        this.clientPrincipal   = clientPrincipal;
+        this.transitedEncoding = transited;
+        this.authtime          = authtime;
+        this.startTime         = starttime;
+        this.endTime           = endtime;
+        this.renewTill         = renewTill;
+        this.clientAddresses   = caddr;
+        this.authorizationData = authorizationData;
+	}
+
+    public AuthorizationData getAuthorizationData()
+    {
+        return authorizationData;
+    }
+
+    public KerberosTime getAuthTime()
+    {
+        return authtime;
+    }
+
+    public HostAddresses getClientAddresses()
+    {
+        return clientAddresses;
+    }
+
+    public KerberosPrincipal getClientPrincipal()
+    {
+        return clientPrincipal;
+    }
+
+    public String getClientRealm()
+    {
+        return clientPrincipal.getRealm();
+    }
+
+    public KerberosTime getEndTime()
+    {
+        return endTime;
+    }
+
+    public TicketFlags getFlags()
+    {
+        return flags;
+    }
+
+    public EncryptionKey getSessionKey()
+    {
+        return sessionKey;
+    }
+
+    public KerberosTime getRenewTill()
+    {
+        return renewTill;
+    }
+
+    public KerberosTime getStartTime()
+    {
+        return startTime;
+    }
+
+    public TransitedEncoding getTransitedEncoding()
+    {
+        return transitedEncoding;
+    }
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPartModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPartModifier.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPartModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/EncTicketPartModifier.java Sat Aug 20 12:32:59 2005
@@ -16,78 +16,112 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.value.AuthorizationData;
+import org.apache.kerberos.messages.value.EncryptionKey;
+import org.apache.kerberos.messages.value.HostAddresses;
+import org.apache.kerberos.messages.value.KerberosPrincipalModifier;
+import org.apache.kerberos.messages.value.KerberosTime;
+import org.apache.kerberos.messages.value.PrincipalName;
+import org.apache.kerberos.messages.value.TicketFlags;
+import org.apache.kerberos.messages.value.TransitedEncoding;
 
 /**
  * Encrypted part of Tickets
  */
-public class EncTicketPartModifier {
+public class EncTicketPartModifier
+{
+	private TicketFlags               flags = new TicketFlags();
+	private EncryptionKey             sessionKey;
+	private KerberosPrincipalModifier modifier = new KerberosPrincipalModifier();
+	private KerberosPrincipal         clientPrincipal;
+	private TransitedEncoding         transitedEncoding;
+	private KerberosTime              authTime;
+	private KerberosTime              startTime;         //optional
+	private KerberosTime              endTime;
+	private KerberosTime              renewTill;         //optional
+	private HostAddresses             clientAddresses;   //optional
+	private AuthorizationData         authorizationData; //optional
 
-	private TicketFlags               _flags = new TicketFlags();
-	private EncryptionKey             _sessionKey;
-	private KerberosPrincipalModifier _modifier = new KerberosPrincipalModifier();
-	private KerberosPrincipal         _clientPrincipal;
-	private TransitedEncoding         _transitedEncoding;
-	private KerberosTime              _authTime;
-	private KerberosTime              _startTime;         //optional
-	private KerberosTime              _endTime;
-	private KerberosTime              _renewTill;         //optional
-	private HostAddresses             _clientAddresses;   //optional
-	private AuthorizationData         _authorizationData; //optional
-
-	public EncTicketPart getEncTicketPart() {
-		
-		if (_clientPrincipal == null) {
-			_clientPrincipal = _modifier.getKerberosPrincipal();
-		}
-		
-		return new EncTicketPart(_flags, _sessionKey, _clientPrincipal, _transitedEncoding,
-			_authTime, _startTime, _endTime, _renewTill, _clientAddresses, _authorizationData);
-	}
-	
-	public void setClientName(PrincipalName name) {
-		_modifier.setPrincipalName(name);
-	}
-	public void setClientRealm(String realm) {
-		_modifier.setRealm(realm);
-	}
-	public void setClientPrincipal(KerberosPrincipal principal) {
-		_clientPrincipal = principal;
-	}
-	public void setAuthorizationData(AuthorizationData data) {
-		_authorizationData = data;
-	}
-	public void setAuthTime(KerberosTime authtime) {
-		_authTime = authtime;
-	}
-	public void setClientAddresses(HostAddresses addresses) {
-		_clientAddresses = addresses;
-	}
-	public void setEndTime(KerberosTime time) {
-		_endTime = time;
-	}
-	public void setFlags(TicketFlags flags) {
-		_flags = flags;
-	}
-	public void setFlag(int flag) {
-		_flags.set(flag);
-	}
-	public void clearFlag(int flag) {
-		_flags.clear(flag);
-	}
-	public void setRenewTill(KerberosTime till) {
-		_renewTill = till;
-	}
-	public void setSessionKey(EncryptionKey key) {
-		_sessionKey = key;
-	}
-	public void setStartTime(KerberosTime time) {
-		_startTime = time;
-	}
-	public void setTransitedEncoding(TransitedEncoding encoding) {
-		_transitedEncoding = encoding;
-	}
-}
+	public EncTicketPart getEncTicketPart()
+    {
+        if ( clientPrincipal == null )
+        {
+            clientPrincipal = modifier.getKerberosPrincipal();
+        }
+
+        return new EncTicketPart( flags, sessionKey, clientPrincipal, transitedEncoding, authTime,
+                startTime, endTime, renewTill, clientAddresses, authorizationData );
+    }
+
+    public void setClientName( PrincipalName name )
+    {
+        modifier.setPrincipalName( name );
+    }
+
+    public void setClientRealm( String realm )
+    {
+        modifier.setRealm( realm );
+    }
+
+    public void setClientPrincipal( KerberosPrincipal principal )
+    {
+        clientPrincipal = principal;
+    }
+
+    public void setAuthorizationData( AuthorizationData data )
+    {
+        authorizationData = data;
+    }
+
+    public void setAuthTime( KerberosTime authtime )
+    {
+        authTime = authtime;
+    }
+
+    public void setClientAddresses( HostAddresses addresses )
+    {
+        clientAddresses = addresses;
+    }
 
+    public void setEndTime( KerberosTime time )
+    {
+        endTime = time;
+    }
+
+    public void setFlags( TicketFlags flags )
+    {
+        this.flags = flags;
+    }
+
+    public void setFlag( int flag )
+    {
+        flags.set( flag );
+    }
+
+    public void clearFlag( int flag )
+    {
+        flags.clear( flag );
+    }
+
+    public void setRenewTill( KerberosTime till )
+    {
+        renewTill = till;
+    }
+
+    public void setSessionKey( EncryptionKey key )
+    {
+        sessionKey = key;
+    }
+
+    public void setStartTime( KerberosTime time )
+    {
+        startTime = time;
+    }
+
+    public void setTransitedEncoding( TransitedEncoding encoding )
+    {
+        transitedEncoding = encoding;
+    }
+}

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/MessageComponentType.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/MessageComponentType.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/MessageComponentType.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/MessageComponentType.java Sat Aug 20 12:32:59 2005
@@ -16,12 +16,15 @@
  */
 package org.apache.kerberos.messages.components;
 
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 /**
  * Type-safe enumerator for message component types
  */
-public class MessageComponentType implements Comparable {
+public class MessageComponentType implements Comparable
+{
 	/**
 	 * Enumeration elements are constructed once upon class loading.
 	 * Order of appearance here determines the order of compareTo.
@@ -36,45 +39,50 @@
 	public static final MessageComponentType KRB_ENC_KRB_PRIV_PART = new MessageComponentType(28, "encrypted application message part");
 	public static final MessageComponentType KRB_ENC_KRB_CRED_PART = new MessageComponentType(29, "encrypted credentials forward part");
 
-	public String toString() {
-		return _fName + " (" + _fOrdinal + ")";
-	}
-
-	public int compareTo(Object that) {
-		return _fOrdinal - ((MessageComponentType) that)._fOrdinal;
-	}
-
-	public static MessageComponentType getTypeByOrdinal(int type) {
-		for (int i = 0; i < fValues.length; i++)
-			if (fValues[i]._fOrdinal == type)
-				return fValues[i];
-		return NULL;
-	}
-	
-	public int getOrdinal() {
-		return _fOrdinal;
-	}
-
-	/// PRIVATE /////
-	private final String _fName;
-	private final int    _fOrdinal;
-
-	/**
-	 * Private constructor prevents construction outside of this class.
-	 */
-	private MessageComponentType(int ordinal, String name) {
-		_fOrdinal = ordinal;
-		_fName    = name;
-	}
-
-	/**
-	 * These two lines are all that's necessary to export a List of VALUES.
-	 */
-	private static final MessageComponentType[] fValues = {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};
-	// VALUES needs to be located here, otherwise illegal forward reference
-	public static final List VALUES = Collections.unmodifiableList(Arrays.asList(fValues));
-
+	public String toString()
+    {
+        return name + " (" + ordinal + ")";
+    }
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( (MessageComponentType) that ).ordinal;
+    }
+
+    public static MessageComponentType getTypeByOrdinal( int type )
+    {
+        for ( int i = 0; i < values.length; i++ )
+        {
+            if ( values[ i ].ordinal == type ) return values[ i ];
+        }
+        
+        return NULL;
+    }
+
+    public int getOrdinal()
+    {
+        return ordinal;
+    }
+
+    /// PRIVATE /////
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private MessageComponentType( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name  = name;
+    }
+
+    /**
+     * These two lines are all that's necessary to export 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 };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 }
-

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Ticket.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Ticket.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Ticket.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/Ticket.java Sat Aug 20 12:32:59 2005
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.kerberos.messages.components;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
@@ -34,25 +33,24 @@
 {
     public static final int TICKET_VNO = 5;
 
-    private int versionNumber;
+    private int               versionNumber;
     private KerberosPrincipal serverPrincipal;
-    private EncryptedData encPart;
-
-    private EncTicketPart encTicketPart;
+    private EncryptedData     encPart;
+    private EncTicketPart     encTicketPart;
 
-    public Ticket(KerberosPrincipal serverPrincipal, EncryptedData encPart)
+    public Ticket( KerberosPrincipal serverPrincipal, EncryptedData encPart )
     {
-        this(TICKET_VNO, serverPrincipal, encPart);
+        this( TICKET_VNO, serverPrincipal, encPart );
     }
 
-    public Ticket(int versionNumber, KerberosPrincipal serverPrincipal, EncryptedData encPart)
+    public Ticket( int versionNumber, KerberosPrincipal serverPrincipal, EncryptedData encPart )
     {
-        this.versionNumber = versionNumber;
+        this.versionNumber   = versionNumber;
         this.serverPrincipal = serverPrincipal;
-        this.encPart = encPart;
+        this.encPart         = encPart;
     }
 
-    public void setEncTicketPart(EncTicketPart decryptedPart)
+    public void setEncTicketPart( EncTicketPart decryptedPart )
     {
         encTicketPart = decryptedPart;
     }
@@ -140,8 +138,8 @@
     }
 
     // EncTicketPart TicketFlag delegates
-    public boolean getFlag(int flag)
+    public boolean getFlag( int flag )
     {
-        return encTicketPart.getFlags().get(flag);
+        return encTicketPart.getFlags().get( flag );
     }
 }

Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/TicketModifier.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/TicketModifier.java?rev=234118&r1=234117&r2=234118&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/TicketModifier.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/messages/components/TicketModifier.java Sat Aug 20 12:32:59 2005
@@ -16,33 +16,41 @@
  */
 package org.apache.kerberos.messages.components;
 
-import org.apache.kerberos.messages.value.*;
+import javax.security.auth.kerberos.KerberosPrincipal;
 
-import javax.security.auth.kerberos.*;
+import org.apache.kerberos.messages.value.EncryptedData;
+import org.apache.kerberos.messages.value.KerberosPrincipalModifier;
+import org.apache.kerberos.messages.value.PrincipalName;
 
-public class TicketModifier {
+public class TicketModifier
+{
+	private int                       ticketVersionNumber;
+	private KerberosPrincipalModifier serverModifier = new KerberosPrincipalModifier();
+	private EncryptedData             encPart;
 	
-	private int                       _ticketVersionNumber;
-	private KerberosPrincipalModifier _serverModifier = new KerberosPrincipalModifier();
-	private EncryptedData             _encPart;
-	
-	public Ticket getTicket() {
-		
-		KerberosPrincipal serverPrincipal = _serverModifier.getKerberosPrincipal();
-		return new Ticket(_ticketVersionNumber, serverPrincipal, _encPart);
-	}
-	
-	public void setTicketVersionNumber(int versionNumber) {
-		_ticketVersionNumber = versionNumber;
-	}
-	public void setEncPart(EncryptedData part) {
-		_encPart = part;
-	}
-	public void setServerName(PrincipalName name) {
-		_serverModifier.setPrincipalName(name);
-	}
-	public void setServerRealm(String realm) {
-		_serverModifier.setRealm(realm);
-	}
-}
+	public Ticket getTicket()
+    {
+        KerberosPrincipal serverPrincipal = serverModifier.getKerberosPrincipal();
+        return new Ticket( ticketVersionNumber, serverPrincipal, encPart );
+    }
+
+    public void setTicketVersionNumber( int versionNumber )
+    {
+        ticketVersionNumber = versionNumber;
+    }
 
+    public void setEncPart( EncryptedData part )
+    {
+        encPart = part;
+    }
+
+    public void setServerName( PrincipalName name )
+    {
+        serverModifier.setPrincipalName( name );
+    }
+
+    public void setServerRealm( String realm )
+    {
+        serverModifier.setRealm( realm );
+    }
+}



Mime
View raw message