directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1039719 - in /directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec: EncKdcRepPart/actions/ adKdcIssued/actions/ authenticator/actions/ encTicketPart/actions/ kdcRep/actions/ kdcReqBody/actions/ k...
Date Sat, 27 Nov 2010 18:54:13 GMT
Author: elecharny
Date: Sat Nov 27 18:54:12 2010
New Revision: 1039719

URL: http://svn.apache.org/viewvc?rev=1039719&view=rev
Log:
Using AbstractReadRealm all over

Modified:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/adKdcIssued/actions/StoreIRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTicketPart/actions/StoreCRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/StoreCRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreCRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/StoreRealm.java

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StoreSRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new StoreSRealm action.
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/adKdcIssued/actions/StoreIRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/adKdcIssued/actions/StoreIRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/adKdcIssued/actions/StoreIRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/adKdcIssued/actions/StoreIRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StoreIRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new StoreIRealm action.
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StoreCRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new StoreCRealm action.
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTicketPart/actions/StoreCRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTicketPart/actions/StoreCRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTicketPart/actions/StoreCRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encTicketPart/actions/StoreCRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StoreCRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new StoreCRealm action.
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/StoreCRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/StoreCRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/StoreCRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcRep/actions/StoreCRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StoreCRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new TicketRealm action.
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreRealm.java
Sat Nov 27 18:54:12 2010
@@ -21,16 +21,8 @@ package org.apache.directory.shared.kerb
 
 
 import org.apache.directory.shared.asn1.ber.Asn1Container;
-import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
-import org.apache.directory.shared.asn1.ber.tlv.TLV;
-import org.apache.directory.shared.asn1.ber.tlv.Value;
-import org.apache.directory.shared.asn1.codec.DecoderException;
-import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadRealm;
 import org.apache.directory.shared.kerberos.codec.kdcReqBody.KdcReqBodyContainer;
-import org.apache.directory.shared.kerberos.components.KdcReqBody;
-import org.apache.directory.shared.ldap.util.StringTools;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -38,15 +30,8 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreRealm extends GrammarAction
+public class StoreRealm extends AbstractReadRealm
 {
-    /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( StoreRealm.class );
-
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new StoreRealm action.
      */
@@ -59,31 +44,10 @@ public class StoreRealm extends GrammarA
     /**
      * {@inheritDoc}
      */
-    public void action( Asn1Container container ) throws DecoderException
+    @Override
+    protected void setRealm( String srealm, Asn1Container container )
     {
         KdcReqBodyContainer kdcReqBodyContainer = ( KdcReqBodyContainer ) container;
-
-        TLV tlv = kdcReqBodyContainer.getCurrentTLV();
-
-        // The Length should not be null
-        if ( tlv.getLength() == 0 )
-        {
-            LOG.error( I18n.err( I18n.ERR_04066 ) );
-
-            // This will generate a PROTOCOL_ERROR
-            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
-        }
-        
-        KdcReqBody kdcReqBody = kdcReqBodyContainer.getKdcReqBody();
-        
-        // The value is the realm
-        Value value = tlv.getValue();
-        String realm = StringTools.utf8ToString( value.getData() );
-        kdcReqBody.setRealm( realm );
-        
-        if ( IS_DEBUG )
-        {
-            LOG.debug( "Realm : {}", realm );
-        }
+        kdcReqBodyContainer.getKdcReqBody().setRealm( srealm );
     }
 }

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StorePRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new StorePRealm action.
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StoreSRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new StoreSRealm action.
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreCRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreCRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreCRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreCRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StoreCRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new StoreCRealm action.
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StoreRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new StoreRealm action.
      */

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/StoreRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/StoreRealm.java?rev=1039719&r1=1039718&r2=1039719&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/StoreRealm.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/ticket/actions/StoreRealm.java
Sat Nov 27 18:54:12 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.kerbe
  */
 public class StoreRealm extends AbstractReadRealm
 {
-
     /**
      * Instantiates a new StoreRealm action.
      */



Mime
View raw message