You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2010/10/04 00:43:52 UTC
svn commit: r1004064 [2/3] - in
/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap:
./ codec/ codec/actions/ codec/controls/replication/syncRequestValue/
codec/extended/operations/certGeneration/ csn/ entry/ message/ message/ex...
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitPresentFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitPresentFilterAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitPresentFilterAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitPresentFilterAction.java Sun Oct 3 22:43:50 2010
@@ -41,18 +41,24 @@ import org.slf4j.LoggerFactory;
public class InitPresentFilterAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( InitPresentFilterAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( InitPresentFilterAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new init present filter action.
+ */
public InitPresentFilterAction()
{
super( "Init present filter Value" );
}
+ /**
+ * {@inheritDoc}
+ */
public void action( Asn1Container container ) throws DecoderException
{
LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer ) container;
@@ -86,7 +92,7 @@ public class InitPresentFilterAction ext
if ( IS_DEBUG )
{
- log.debug( "Initialize Present filter" );
+ LOG.debug( "Initialize Present filter" );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java Sun Oct 3 22:43:50 2010
@@ -42,12 +42,15 @@ import org.slf4j.LoggerFactory;
public class InitReferralsAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( InitReferralsAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( InitReferralsAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new init referrals action.
+ */
public InitReferralsAction()
{
super( "Init the referrals list" );
@@ -55,7 +58,7 @@ public class InitReferralsAction extends
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -67,7 +70,7 @@ public class InitReferralsAction extends
if ( tlv.getLength() == 0 )
{
String msg = I18n.err( I18n.ERR_04011 );
- log.error( msg );
+ LOG.error( msg );
// This will generate a PROTOCOL_ERROR
throw new DecoderException( msg );
@@ -81,7 +84,7 @@ public class InitReferralsAction extends
if ( IS_DEBUG )
{
- log.debug( "Initialising a referrals list" );
+ LOG.debug( "Initialising a referrals list" );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java Sun Oct 3 22:43:50 2010
@@ -42,12 +42,15 @@ import org.slf4j.LoggerFactory;
public class InitSubstringsFilterAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( InitSubstringsFilterAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( InitSubstringsFilterAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new init substrings filter action.
+ */
public InitSubstringsFilterAction()
{
super( "Initialize Substrings filter" );
@@ -55,7 +58,7 @@ public class InitSubstringsFilterAction
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -69,7 +72,7 @@ public class InitSubstringsFilterAction
if ( expectedLength == 0 )
{
String msg = I18n.err( I18n.ERR_04012 );
- log.error( msg );
+ LOG.error( msg );
throw new DecoderException( msg );
}
@@ -81,7 +84,7 @@ public class InitSubstringsFilterAction
if ( IS_DEBUG )
{
- log.debug( "Initialize Substrings filter" );
+ LOG.debug( "Initialize Substrings filter" );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java Sun Oct 3 22:43:50 2010
@@ -44,12 +44,15 @@ import org.slf4j.LoggerFactory;
public class MatchedDNAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( MatchedDNAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( MatchedDNAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new matched dn action.
+ */
public MatchedDNAction()
{
super( "Store matched DN" );
@@ -57,7 +60,7 @@ public class MatchedDNAction extends Gra
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -102,7 +105,7 @@ public class MatchedDNAction extends Gra
// This is for the client side. We will never decode LdapResult on the server
String msg = I18n.err( I18n.ERR_04013, dnStr, StringTools.dumpBytes( dnBytes ), ine
.getLocalizedMessage() );
- log.error( msg );
+ LOG.error( msg );
throw new DecoderException( I18n.err( I18n.ERR_04014, ine.getLocalizedMessage() ) );
}
@@ -110,7 +113,7 @@ public class MatchedDNAction extends Gra
break;
default:
- log.warn( "The matched DN should not be set when the result code is one of NoSuchObject,"
+ LOG.warn( "The matched DN should not be set when the result code is one of NoSuchObject,"
+ " AliasProblem, InvalidDNSyntax or AliasDreferencingProblem" );
matchedDN = DN.EMPTY_DN;
@@ -120,7 +123,7 @@ public class MatchedDNAction extends Gra
if ( IS_DEBUG )
{
- log.debug( "The matchedDN is " + matchedDN );
+ LOG.debug( "The matchedDN is " + matchedDN );
}
ldapResult.setMatchedDn( matchedDN );
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java Sun Oct 3 22:43:50 2010
@@ -39,12 +39,15 @@ import org.slf4j.LoggerFactory;
public class ModifyAttributeValueAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( ModifyAttributeValueAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( ModifyAttributeValueAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new modify attribute value action.
+ */
public ModifyAttributeValueAction()
{
super( "Stores AttributeValue" );
@@ -52,7 +55,7 @@ public class ModifyAttributeValueAction
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container )
{
@@ -88,7 +91,7 @@ public class ModifyAttributeValueAction
if ( IS_DEBUG )
{
- log.debug( "Value modified : {}", value );
+ LOG.debug( "Value modified : {}", value );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java Sun Oct 3 22:43:50 2010
@@ -46,12 +46,15 @@ import org.slf4j.LoggerFactory;
public class ReferralAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( ReferralAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( ReferralAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new referral action.
+ */
public ReferralAction()
{
super( "Add a referral" );
@@ -59,7 +62,7 @@ public class ReferralAction extends Gram
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -86,13 +89,13 @@ public class ReferralAction extends Gram
catch ( LdapURLEncodingException luee )
{
String badUrl = StringTools.utf8ToString( tlv.getValue().getData() );
- log.error( I18n.err( I18n.ERR_04015, badUrl, luee.getMessage() ) );
+ LOG.error( I18n.err( I18n.ERR_04015, badUrl, luee.getMessage() ) );
throw new DecoderException( I18n.err( I18n.ERR_04016, luee.getMessage() ) );
}
}
else
{
- log.warn( "The Referral error message is not allowed when havind an error code no equals to REFERRAL" );
+ LOG.warn( "The Referral error message is not allowed when havind an error code no equals to REFERRAL" );
referral.addLdapUrl( LdapURL.EMPTY_URL.toString() );
}
}
@@ -116,7 +119,7 @@ public class ReferralAction extends Gram
sb.append( url );
}
- log.debug( "The referral error message is set to " + sb.toString() );
+ LOG.debug( "The referral error message is set to " + sb.toString() );
}
// We can have an END transition
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseAction.java Sun Oct 3 22:43:50 2010
@@ -39,12 +39,15 @@ import org.slf4j.LoggerFactory;
public class ResponseAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( ResponseAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( ResponseAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new response action.
+ */
public ResponseAction()
{
super( "Store response" );
@@ -52,7 +55,7 @@ public class ResponseAction extends Gram
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -81,7 +84,7 @@ public class ResponseAction extends Gram
if ( IS_DEBUG )
{
- log.debug( "Extended value : {}", extendedResponse.getResponseValue() );
+ LOG.debug( "Extended value : {}", extendedResponse.getResponseValue() );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java Sun Oct 3 22:43:50 2010
@@ -41,12 +41,15 @@ import org.slf4j.LoggerFactory;
public class ResponseNameAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( ResponseNameAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( ResponseNameAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new response name action.
+ */
public ResponseNameAction()
{
super( "Store response name" );
@@ -54,7 +57,7 @@ public class ResponseNameAction extends
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -71,7 +74,7 @@ public class ResponseNameAction extends
if ( tlv.getLength() == 0 )
{
String msg = I18n.err( I18n.ERR_04017 );
- log.error( msg );
+ LOG.error( msg );
throw new DecoderException( msg );
}
else
@@ -85,7 +88,7 @@ public class ResponseNameAction extends
if ( IS_DEBUG )
{
- log.debug( "OID read : {}", extendedResponse.getResponseName() );
+ LOG.debug( "OID read : {}", extendedResponse.getResponseName() );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java Sun Oct 3 22:43:50 2010
@@ -45,12 +45,15 @@ import org.slf4j.LoggerFactory;
public class ResultCodeAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( ResultCodeAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( ResultCodeAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new result code action.
+ */
public ResultCodeAction()
{
super( "Store resultCode" );
@@ -58,7 +61,7 @@ public class ResultCodeAction extends Gr
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -78,7 +81,7 @@ public class ResultCodeAction extends Gr
}
catch ( IntegerDecoderException ide )
{
- log.error( I18n.err( I18n.ERR_04018, StringTools.dumpBytes( value.getData() ), ide.getMessage() ) );
+ LOG.error( I18n.err( I18n.ERR_04018, StringTools.dumpBytes( value.getData() ), ide.getMessage() ) );
throw new DecoderException( ide.getMessage() );
}
@@ -130,14 +133,14 @@ public class ResultCodeAction extends Gr
break;
default:
- log.warn( "The resultCode " + resultCode + " is unknown." );
+ LOG.warn( "The resultCode " + resultCode + " is unknown." );
resultCode = ResultCodeEnum.OTHER;
break;
}
if ( IS_DEBUG )
{
- log.debug( "The result code is set to " + resultCode );
+ LOG.debug( "The result code is set to " + resultCode );
}
ResultResponse response = ( ResultResponse ) ldapMessageContainer.getMessage();
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java Sun Oct 3 22:43:50 2010
@@ -38,12 +38,15 @@ import org.slf4j.LoggerFactory;
public class SearchResultAttributeValueAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( SearchResultAttributeValueAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( SearchResultAttributeValueAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new search result attribute value action.
+ */
public SearchResultAttributeValueAction()
{
super( "Stores AttributeValue" );
@@ -51,7 +54,7 @@ public class SearchResultAttributeValueA
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container )
{
@@ -67,7 +70,7 @@ public class SearchResultAttributeValueA
{
searchResultEntry.addAttributeValue( "" );
- log.debug( "The attribute value is null" );
+ LOG.debug( "The attribute value is null" );
}
else
{
@@ -77,14 +80,14 @@ public class SearchResultAttributeValueA
if ( IS_DEBUG )
{
- log.debug( "Attribute value {}", StringTools.dumpBytes( ( byte[] ) value ) );
+ LOG.debug( "Attribute value {}", StringTools.dumpBytes( ( byte[] ) value ) );
}
}
else
{
value = StringTools.utf8ToString( tlv.getValue().getData() );
- log.debug( "Attribute value {}", value );
+ LOG.debug( "Attribute value {}", value );
}
searchResultEntry.addAttributeValue( value );
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ServerSASLCredsAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ServerSASLCredsAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ServerSASLCredsAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ServerSASLCredsAction.java Sun Oct 3 22:43:50 2010
@@ -39,12 +39,15 @@ import org.slf4j.LoggerFactory;
public class ServerSASLCredsAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( ServerSASLCredsAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( ServerSASLCredsAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new server sasl creds action.
+ */
public ServerSASLCredsAction()
{
super( "Store server sasl credentials value" );
@@ -52,7 +55,7 @@ public class ServerSASLCredsAction exten
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -82,7 +85,7 @@ public class ServerSASLCredsAction exten
if ( IS_DEBUG )
{
- log.debug( "The SASL credentials value is : {}", StringTools.dumpBytes( serverSaslCreds ) );
+ LOG.debug( "The SASL credentials value is : {}", StringTools.dumpBytes( serverSaslCreds ) );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java Sun Oct 3 22:43:50 2010
@@ -42,12 +42,15 @@ import org.slf4j.LoggerFactory;
public class StoreAnyAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( StoreAnyAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( StoreAnyAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new store any action.
+ */
public StoreAnyAction()
{
super( "Store a any value" );
@@ -55,7 +58,7 @@ public class StoreAnyAction extends Gram
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -71,7 +74,7 @@ public class StoreAnyAction extends Gram
if ( tlv.getLength() == 0 )
{
String msg = I18n.err( I18n.ERR_04019 );
- log.error( msg );
+ LOG.error( msg );
throw new DecoderException( msg );
}
@@ -84,7 +87,7 @@ public class StoreAnyAction extends Gram
if ( IS_DEBUG )
{
- log.debug( "Stored a any substring : {}", any );
+ LOG.debug( "Stored a any substring : {}", any );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java Sun Oct 3 22:43:50 2010
@@ -42,12 +42,15 @@ import org.slf4j.LoggerFactory;
public class StoreFinalAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( StoreFinalAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( StoreFinalAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new store final action.
+ */
public StoreFinalAction()
{
super( "Store a final value" );
@@ -55,7 +58,7 @@ public class StoreFinalAction extends Gr
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -71,7 +74,7 @@ public class StoreFinalAction extends Gr
if ( tlv.getLength() == 0 )
{
String msg = I18n.err( I18n.ERR_04020 );
- log.error( msg );
+ LOG.error( msg );
throw new DecoderException( msg );
}
@@ -84,7 +87,7 @@ public class StoreFinalAction extends Gr
if ( IS_DEBUG )
{
- log.debug( "Stored a any substring : {}", finalValue );
+ LOG.debug( "Stored a any substring : {}", finalValue );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreMatchValueAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreMatchValueAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreMatchValueAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreMatchValueAction.java Sun Oct 3 22:43:50 2010
@@ -41,12 +41,15 @@ import org.slf4j.LoggerFactory;
public class StoreMatchValueAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( StoreMatchValueAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( StoreMatchValueAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new store match value action.
+ */
public StoreMatchValueAction()
{
super( "Store match Value" );
@@ -54,7 +57,7 @@ public class StoreMatchValueAction exten
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -75,7 +78,7 @@ public class StoreMatchValueAction exten
if ( IS_DEBUG )
{
- log.debug( "Stored a match value : {}", value );
+ LOG.debug( "Stored a match value : {}", value );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java Sun Oct 3 22:43:50 2010
@@ -44,12 +44,15 @@ import org.slf4j.LoggerFactory;
public class StoreReferenceAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( StoreReferenceAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( StoreReferenceAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new store reference action.
+ */
public StoreReferenceAction()
{
super( "Store a reference" );
@@ -57,7 +60,7 @@ public class StoreReferenceAction extend
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -96,14 +99,14 @@ public class StoreReferenceAction extend
}
catch ( LdapURLEncodingException luee )
{
- log.error( I18n.err( I18n.ERR_04021, urlStr, luee.getMessage() ) );
+ LOG.error( I18n.err( I18n.ERR_04021, urlStr, luee.getMessage() ) );
throw new DecoderException( I18n.err( I18n.ERR_04016, luee.getMessage() ) );
}
}
if ( IS_DEBUG )
{
- log.debug( "Search reference URL found : {}", url );
+ LOG.debug( "Search reference URL found : {}", url );
}
// We can have an END transition
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java Sun Oct 3 22:43:50 2010
@@ -41,13 +41,17 @@ import org.slf4j.LoggerFactory;
*/
public class StoreTypeMatchingRuleAction extends GrammarAction
{
- /** The logger */
- private static final Logger log = LoggerFactory.getLogger( StoreTypeMatchingRuleAction.class );
+
+ /** The logger. */
+ private static final Logger LOG = LoggerFactory.getLogger( StoreTypeMatchingRuleAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new store type matching rule action.
+ */
public StoreTypeMatchingRuleAction()
{
super( "Store matching type Value" );
@@ -55,7 +59,7 @@ public class StoreTypeMatchingRuleAction
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container ) throws DecoderException
{
@@ -67,7 +71,7 @@ public class StoreTypeMatchingRuleAction
if ( tlv.getLength() == 0 )
{
String msg = I18n.err( I18n.ERR_04022 );
- log.error( msg );
+ LOG.error( msg );
throw new DecoderException( msg );
}
else
@@ -81,7 +85,7 @@ public class StoreTypeMatchingRuleAction
if ( IS_DEBUG )
{
- log.debug( "Stored a type matching rule : {}", type );
+ LOG.debug( "Stored a type matching rule : {}", type );
}
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java Sun Oct 3 22:43:50 2010
@@ -38,12 +38,15 @@ import org.slf4j.LoggerFactory;
public class ValueAction extends GrammarAction
{
/** The logger */
- private static final Logger log = LoggerFactory.getLogger( ValueAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( ValueAction.class );
/** Speedup for logs */
- private static final boolean IS_DEBUG = log.isDebugEnabled();
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+ /**
+ * Instantiates a new value action.
+ */
public ValueAction()
{
super( "Store a value" );
@@ -51,7 +54,7 @@ public class ValueAction extends Grammar
/**
- * The initialization action
+ * {@inheritDoc}
*/
public void action( Asn1Container container )
{
@@ -76,7 +79,7 @@ public class ValueAction extends Grammar
if ( IS_DEBUG )
{
- log.debug( "Adding value {}", StringTools.dumpBytes( ( byte[] ) value ) );
+ LOG.debug( "Adding value {}", StringTools.dumpBytes( ( byte[] ) value ) );
}
addRequest.addAttributeValue( ( byte[] ) value );
@@ -87,7 +90,7 @@ public class ValueAction extends Grammar
if ( IS_DEBUG )
{
- log.debug( "Adding value {}" + value );
+ LOG.debug( "Adding value {}" + value );
}
addRequest.addAttributeValue( ( String ) value );
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java Sun Oct 3 22:43:50 2010
@@ -117,8 +117,8 @@ public final class SyncRequestValueContr
{
public void action( Asn1Container container ) throws DecoderException
{
- SyncRequestValueControlContainer SyncRequestValueContainer = ( SyncRequestValueControlContainer ) container;
- Value value = SyncRequestValueContainer.getCurrentTLV().getValue();
+ SyncRequestValueControlContainer syncRequestValueContainer = ( SyncRequestValueControlContainer ) container;
+ Value value = syncRequestValueContainer.getCurrentTLV().getValue();
try
{
@@ -134,10 +134,10 @@ public final class SyncRequestValueContr
LOG.debug( "Mode = " + modeEnum );
}
- SyncRequestValueContainer.getSyncRequestValueControl().setMode( modeEnum );
+ syncRequestValueContainer.getSyncRequestValueControl().setMode( modeEnum );
// We can have an END transition
- SyncRequestValueContainer.grammarEndAllowed( true );
+ syncRequestValueContainer.grammarEndAllowed( true );
}
catch ( IntegerDecoderException e )
{
@@ -165,8 +165,8 @@ public final class SyncRequestValueContr
{
public void action( Asn1Container container ) throws DecoderException
{
- SyncRequestValueControlContainer SyncRequestValueContainer = ( SyncRequestValueControlContainer ) container;
- Value value = SyncRequestValueContainer.getCurrentTLV().getValue();
+ SyncRequestValueControlContainer syncRequestValueContainer = ( SyncRequestValueControlContainer ) container;
+ Value value = syncRequestValueContainer.getCurrentTLV().getValue();
byte[] cookie = value.getData();
@@ -175,10 +175,10 @@ public final class SyncRequestValueContr
LOG.debug( "cookie = " + StringTools.dumpBytes( cookie ) );
}
- SyncRequestValueContainer.getSyncRequestValueControl().setCookie( cookie );
+ syncRequestValueContainer.getSyncRequestValueControl().setCookie( cookie );
// We can have an END transition
- SyncRequestValueContainer.grammarEndAllowed( true );
+ syncRequestValueContainer.grammarEndAllowed( true );
}
} );
@@ -199,8 +199,8 @@ public final class SyncRequestValueContr
{
public void action( Asn1Container container ) throws DecoderException
{
- SyncRequestValueControlContainer SyncRequestValueContainer = ( SyncRequestValueControlContainer ) container;
- Value value = SyncRequestValueContainer.getCurrentTLV().getValue();
+ SyncRequestValueControlContainer syncRequestValueContainer = ( SyncRequestValueControlContainer ) container;
+ Value value = syncRequestValueContainer.getCurrentTLV().getValue();
try
{
@@ -211,10 +211,10 @@ public final class SyncRequestValueContr
LOG.debug( "reloadHint = " + reloadHint );
}
- SyncRequestValueContainer.getSyncRequestValueControl().setReloadHint( reloadHint );
+ syncRequestValueContainer.getSyncRequestValueControl().setReloadHint( reloadHint );
// We can have an END transition
- SyncRequestValueContainer.grammarEndAllowed( true );
+ syncRequestValueContainer.grammarEndAllowed( true );
}
catch ( BooleanDecoderException e )
{
@@ -242,8 +242,8 @@ public final class SyncRequestValueContr
{
public void action( Asn1Container container ) throws DecoderException
{
- SyncRequestValueControlContainer SyncRequestValueContainer = ( SyncRequestValueControlContainer ) container;
- Value value = SyncRequestValueContainer.getCurrentTLV().getValue();
+ SyncRequestValueControlContainer syncRequestValueContainer = ( SyncRequestValueControlContainer ) container;
+ Value value = syncRequestValueContainer.getCurrentTLV().getValue();
try
{
@@ -254,10 +254,10 @@ public final class SyncRequestValueContr
LOG.debug( "reloadHint = " + reloadHint );
}
- SyncRequestValueContainer.getSyncRequestValueControl().setReloadHint( reloadHint );
+ syncRequestValueContainer.getSyncRequestValueControl().setReloadHint( reloadHint );
// We can have an END transition
- SyncRequestValueContainer.grammarEndAllowed( true );
+ syncRequestValueContainer.grammarEndAllowed( true );
}
catch ( BooleanDecoderException e )
{
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java Sun Oct 3 22:43:50 2010
@@ -110,8 +110,8 @@ public class CertGenerationGrammar exten
{
public void action( Asn1Container container ) throws DecoderException
{
- CertGenerationContainer CertGenContainer = ( CertGenerationContainer ) container;
- Value value = CertGenContainer.getCurrentTLV().getValue();
+ CertGenerationContainer certGenContainer = ( CertGenerationContainer ) container;
+ Value value = certGenContainer.getCurrentTLV().getValue();
String targetDN = StringTools.utf8ToString( value.getData() );
@@ -129,7 +129,7 @@ public class CertGenerationGrammar exten
throw new DecoderException( msg );
}
- CertGenContainer.getCertGenerationObject().setTargetDN( targetDN );
+ certGenContainer.getCertGenerationObject().setTargetDN( targetDN );
}
else
{
@@ -156,8 +156,8 @@ public class CertGenerationGrammar exten
{
public void action( Asn1Container container ) throws DecoderException
{
- CertGenerationContainer CertGenContainer = ( CertGenerationContainer ) container;
- Value value = CertGenContainer.getCurrentTLV().getValue();
+ CertGenerationContainer certGenContainer = ( CertGenerationContainer ) container;
+ Value value = certGenContainer.getCurrentTLV().getValue();
String issuerDN = StringTools.utf8ToString( value.getData() );
@@ -175,7 +175,7 @@ public class CertGenerationGrammar exten
throw new DecoderException( msg );
}
- CertGenContainer.getCertGenerationObject().setIssuerDN( issuerDN );
+ certGenContainer.getCertGenerationObject().setIssuerDN( issuerDN );
}
}
} );
@@ -196,8 +196,8 @@ public class CertGenerationGrammar exten
{
public void action( Asn1Container container ) throws DecoderException
{
- CertGenerationContainer CertGenContainer = ( CertGenerationContainer ) container;
- Value value = CertGenContainer.getCurrentTLV().getValue();
+ CertGenerationContainer certGenContainer = ( CertGenerationContainer ) container;
+ Value value = certGenContainer.getCurrentTLV().getValue();
String subjectDN = StringTools.utf8ToString( value.getData() );
@@ -215,7 +215,7 @@ public class CertGenerationGrammar exten
throw new DecoderException( msg );
}
- CertGenContainer.getCertGenerationObject().setSubjectDN( subjectDN );
+ certGenContainer.getCertGenerationObject().setSubjectDN( subjectDN );
}
else
{
@@ -241,8 +241,8 @@ public class CertGenerationGrammar exten
{
public void action( Asn1Container container ) throws DecoderException
{
- CertGenerationContainer CertGenContainer = ( CertGenerationContainer ) container;
- Value value = CertGenContainer.getCurrentTLV().getValue();
+ CertGenerationContainer certGenContainer = ( CertGenerationContainer ) container;
+ Value value = certGenContainer.getCurrentTLV().getValue();
String keyAlgorithm = StringTools.utf8ToString( value.getData() );
@@ -253,10 +253,10 @@ public class CertGenerationGrammar exten
if ( keyAlgorithm != null && ( keyAlgorithm.trim().length() > 0 ) )
{
- CertGenContainer.getCertGenerationObject().setKeyAlgorithm( keyAlgorithm );
+ certGenContainer.getCertGenerationObject().setKeyAlgorithm( keyAlgorithm );
}
- CertGenContainer.grammarEndAllowed( true );
+ certGenContainer.grammarEndAllowed( true );
}
} );
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/csn/Csn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/csn/Csn.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/csn/Csn.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/csn/Csn.java Sun Oct 3 22:43:50 2010
@@ -87,10 +87,12 @@ public class Csn implements Serializable
private transient byte[] bytes;
/** The Timestamp syntax. The last 'z' is _not_ the Time Zone */
- private static final SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddHHmmss" );
+ private static final SimpleDateFormat SDF = new SimpleDateFormat( "yyyyMMddHHmmss" );
/** Padding used to format number with a fixed size */
private static final String[] PADDING_6 = new String[] { "00000", "0000", "000", "00", "0", "" };
+
+ /** Padding used to format number with a fixed size */
private static final String[] PADDING_3 = new String[] { "00", "0", "" };
@@ -119,6 +121,7 @@ public class Csn implements Serializable
* <timestamp> # <changeCount> # <replica ID> # <operation number>
*
* @param value The String containing the CSN
+ * @throws InvalidCSNException if the value doesn't contain a valid CSN
*/
public Csn( String value ) throws InvalidCSNException
{
@@ -160,11 +163,11 @@ public class Csn implements Serializable
long tempTimestamp = 0L;
- synchronized ( sdf )
+ synchronized ( SDF )
{
try
{
- tempTimestamp = sdf.parse( realTimestamp ).getTime();
+ tempTimestamp = SDF.parse( realTimestamp ).getTime();
}
catch ( ParseException pe )
{
@@ -306,11 +309,11 @@ public class Csn implements Serializable
// Let's transform the Timestamp by removing the mulliseconds and microseconds
String realTimestamp = timestampStr.substring( 0, 14 );
- synchronized ( sdf )
+ synchronized ( SDF )
{
try
{
- sdf.parse( realTimestamp ).getTime();
+ SDF.parse( realTimestamp ).getTime();
}
catch ( ParseException pe )
{
@@ -534,9 +537,9 @@ public class Csn implements Serializable
{
StringBuilder buf = new StringBuilder( 40 );
- synchronized( sdf )
+ synchronized( SDF )
{
- buf.append( sdf.format( new Date( timestamp ) ) );
+ buf.append( SDF.format( new Date( timestamp ) ) );
}
// Add the milliseconds part
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java Sun Oct 3 22:43:50 2010
@@ -63,22 +63,22 @@ public class DefaultEntry implements Ent
private static final Logger LOG = LoggerFactory.getLogger( DefaultEntry.class );
/** The DN for this entry */
- protected DN dn;
+ private DN dn;
/** A map containing all the attributes for this entry */
- protected Map<String, EntryAttribute> attributes = new HashMap<String, EntryAttribute>();
+ private Map<String, EntryAttribute> attributes = new HashMap<String, EntryAttribute>();
/** A speedup to get the ObjectClass attribute */
- protected static transient AttributeType OBJECT_CLASS_AT;
+ private static transient AttributeType objectClassAttributeType;
/** The SchemaManager */
- protected SchemaManager schemaManager;
+ private SchemaManager schemaManager;
/** The computed hashcode. We don't want to compute it each time the hashcode() method is called */
private volatile int h;
/** A mutex to manage synchronization*/
- private static transient Object MUTEX = new Object();
+ private static final transient Object MUTEX = new Object();
//-------------------------------------------------------------------------
@@ -450,11 +450,11 @@ public class DefaultEntry implements Ent
{
try
{
- if ( OBJECT_CLASS_AT == null )
+ if ( objectClassAttributeType == null )
{
synchronized ( MUTEX )
{
- OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
+ objectClassAttributeType = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
}
}
}
@@ -594,7 +594,7 @@ public class DefaultEntry implements Ent
}
// ObjectClass with binary values are not allowed
- if ( attributeType.equals( OBJECT_CLASS_AT ) )
+ if ( attributeType.equals( objectClassAttributeType ) )
{
String message = I18n.err( I18n.ERR_04461 );
LOG.error( message );
@@ -685,7 +685,7 @@ public class DefaultEntry implements Ent
public void add( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
{
// ObjectClass with binary values are not allowed
- if ( attributeType.equals( OBJECT_CLASS_AT ) )
+ if ( attributeType.equals( objectClassAttributeType ) )
{
String message = I18n.err( I18n.ERR_04461 );
LOG.error( message );
@@ -1747,7 +1747,7 @@ public class DefaultEntry implements Ent
}
}
- if ( attributeType.equals( OBJECT_CLASS_AT ) )
+ if ( attributeType.equals( objectClassAttributeType ) )
{
String message = I18n.err( I18n.ERR_04461 );
LOG.error( message );
@@ -2795,7 +2795,7 @@ public class DefaultEntry implements Ent
{
if ( schemaManager != null )
{
- return contains( OBJECT_CLASS_AT, objectClass );
+ return contains( objectClassAttributeType, objectClass );
}
else
@@ -2816,12 +2816,12 @@ public class DefaultEntry implements Ent
}
// We have to check that we are checking the ObjectClass attributeType
- if ( !objectClass.getAttributeType().equals( OBJECT_CLASS_AT ) )
+ if ( !objectClass.getAttributeType().equals( objectClassAttributeType ) )
{
return false;
}
- EntryAttribute attribute = attributes.get( OBJECT_CLASS_AT.getOid() );
+ EntryAttribute attribute = attributes.get( objectClassAttributeType.getOid() );
if ( attribute == null )
{
@@ -2923,9 +2923,9 @@ public class DefaultEntry implements Ent
if ( schemaManager != null )
{
// First dump the ObjectClass attribute
- if ( containsAttribute( OBJECT_CLASS_AT.getOid() ) )
+ if ( containsAttribute( objectClassAttributeType.getOid() ) )
{
- EntryAttribute objectClass = get( OBJECT_CLASS_AT );
+ EntryAttribute objectClass = get( objectClassAttributeType );
sb.append( objectClass );
}
@@ -2950,7 +2950,7 @@ public class DefaultEntry implements Ent
{
AttributeType attributeType = schemaManager.getAttributeType( id );
- if ( attributeType != OBJECT_CLASS_AT )
+ if ( attributeType != objectClassAttributeType )
{
sb.append( attribute );
continue;
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageException.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageException.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageException.java Sun Oct 3 22:43:50 2010
@@ -31,6 +31,8 @@ import org.apache.directory.shared.ldap.
*/
public class MessageException extends RuntimeMultiException
{
+
+ /** The serialVersionUID. */
static final long serialVersionUID = -155089078576745029L;
@@ -46,11 +48,11 @@ public class MessageException extends Ru
/**
* Constructs an Exception with a detailed message.
*
- * @param a_message
+ * @param message
* The message associated with the exception.
*/
- public MessageException(String a_message)
+ public MessageException( String message )
{
- super( a_message );
+ super( message );
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchParams.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchParams.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchParams.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchParams.java Sun Oct 3 22:43:50 2010
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.message;
+
import java.util.HashSet;
import java.util.Set;
@@ -35,6 +36,7 @@ import org.apache.directory.shared.ldap.
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
/**
* A container for Search parameters. It replaces the SearchControls.
*
@@ -43,34 +45,32 @@ import org.slf4j.LoggerFactory;
public class SearchParams
{
/** The LoggerFactory used by this class */
- private static Logger LOG = LoggerFactory.getLogger( SearchParams.class );
-
+ private static final Logger LOG = LoggerFactory.getLogger( SearchParams.class );
+
/** The search scope. Default to OBJECT */
private SearchScope scope = SearchScope.OBJECT;
-
+
/** The time limit. Default to 0 (infinite) */
private int timeLimit = 0;
-
+
/** The size limit. Default to 0 (infinite) */
private long sizeLimit = 0;
-
+
/** If we should return only types. Default to false */
private boolean typesOnly = false;
-
+
/** The aliasDerefMode. Default to DEREF_ALWAYS */
private AliasDerefMode aliasDerefMode = AliasDerefMode.DEREF_ALWAYS;
-
+
/** The list of attributes to return, as Strings. Default to an empty set */
private Set<String> returningAttributesStr;
-
+
/** The list of attributes to return, once it has been normalized. Default to an empty set */
private Set<AttributeTypeOptions> returningAttributes;
-
+
/** The set of controls for this search. Default to an empty set */
private Set<Control> controls;
-
- /** TODO : Remove me ! */
- private SearchControls searchControls;
+
/**
* Creates a new instance of SearchContext, with all the values set to
@@ -83,7 +83,7 @@ public class SearchParams
controls = new HashSet<Control>();
}
-
+
/**
* @return the scope
*/
@@ -91,7 +91,7 @@ public class SearchParams
{
return scope;
}
-
+
/**
* @param scope the scope to set
@@ -100,7 +100,7 @@ public class SearchParams
{
this.scope = scope;
}
-
+
/**
* @return the timeLimit
@@ -109,7 +109,7 @@ public class SearchParams
{
return timeLimit;
}
-
+
/**
* @param timeLimit the timeLimit to set
@@ -118,7 +118,7 @@ public class SearchParams
{
this.timeLimit = timeLimit;
}
-
+
/**
* @return the sizeLimit
@@ -127,7 +127,7 @@ public class SearchParams
{
return sizeLimit;
}
-
+
/**
* @param sizeLimit the sizeLimit to set
@@ -136,7 +136,7 @@ public class SearchParams
{
this.sizeLimit = sizeLimit;
}
-
+
/**
* @return the typesOnly
@@ -145,7 +145,7 @@ public class SearchParams
{
return typesOnly;
}
-
+
/**
* @param typesOnly the typesOnly to set
@@ -154,7 +154,7 @@ public class SearchParams
{
this.typesOnly = typesOnly;
}
-
+
/**
* @return the aliasDerefMode
@@ -163,7 +163,7 @@ public class SearchParams
{
return aliasDerefMode;
}
-
+
/**
* @param aliasDerefMode the aliasDerefMode to set
@@ -172,7 +172,7 @@ public class SearchParams
{
this.aliasDerefMode = aliasDerefMode;
}
-
+
/**
* @return the returningAttributes
@@ -182,7 +182,7 @@ public class SearchParams
return returningAttributes;
}
-
+
/**
* @return the returningAttributes
*/
@@ -191,7 +191,7 @@ public class SearchParams
return returningAttributesStr;
}
-
+
/**
* Normalize the ReturningAttributes. It reads all the String from the returningAttributesString,
* and grab the associated AttributeType from the schema to store it into the returningAttributes
@@ -207,10 +207,10 @@ public class SearchParams
{
String id = SchemaUtils.stripOptions( returnAttribute );
Set<String> options = SchemaUtils.getOptions( returnAttribute );
-
+
AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( id );
AttributeTypeOptions attrOptions = new AttributeTypeOptions( attributeType, options );
-
+
returningAttributes.add( attrOptions );
}
catch ( LdapException ne )
@@ -221,7 +221,7 @@ public class SearchParams
}
}
-
+
/**
* @param returningAttributes the returningAttributes to set
*/
@@ -271,24 +271,25 @@ public class SearchParams
{
this.controls.add( control );
}
-
-
- public SearchControls getSearchControls()
- {
- return searchControls;
- }
+ /**
+ * Creates a {@link SearchParams} from JNDI search controls.
+ *
+ * @param searchControls the search controls
+ * @param aliasDerefMode the alias deref mode
+ * @return the search params
+ */
public static SearchParams toSearchParams( SearchControls searchControls, AliasDerefMode aliasDerefMode )
{
SearchParams searchParams = new SearchParams();
-
+
searchParams.setAliasDerefMode( aliasDerefMode );
searchParams.setTimeLimit( searchControls.getTimeLimit() );
searchParams.setSizeLimit( searchControls.getCountLimit() );
searchParams.setScope( SearchScope.getSearchScope( searchControls.getSearchScope() ) );
searchParams.setTypesOnly( searchControls.getReturningObjFlag() );
-
+
if ( searchControls.getReturningAttributes() != null )
{
for ( String returningAttribute : searchControls.getReturningAttributes() )
@@ -296,14 +297,11 @@ public class SearchParams
searchParams.addReturningAttributes( returningAttribute );
}
}
-
- searchParams.searchControls = searchControls;
-
+
return searchParams;
}
-
-
-
+
+
/**
* {@inheritDoc}
*/
@@ -315,12 +313,13 @@ public class SearchParams
sb.append( " scope : " ).append( scope ).append( "\n" );
sb.append( " Alias dereferencing : " ).append( aliasDerefMode ).append( "\n" );
sb.append( " types only : " ).append( typesOnly ).append( "\n" );
-
+
if ( returningAttributesStr.size() != 0 )
{
- sb.append( " returning attributes : " ).append( StringTools.setToString( returningAttributesStr ) ).append( "\n" );
+ sb.append( " returning attributes : " ).append( StringTools.setToString( returningAttributesStr ) )
+ .append( "\n" );
}
-
+
if ( timeLimit > 0 )
{
sb.append( " timeLimit : " ).append( timeLimit ).append( "\n" );
@@ -348,7 +347,7 @@ public class SearchParams
append( control.getClass().getName() ).append( "\n" );
}
}
-
+
return sb.toString();
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java Sun Oct 3 22:43:50 2010
@@ -21,7 +21,6 @@ package org.apache.directory.shared.ldap
import java.nio.ByteBuffer;
-import java.util.Iterator;
import java.util.List;
import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -51,13 +50,16 @@ import org.slf4j.LoggerFactory;
*/
public class GracefulDisconnect extends ExtendedResponseImpl
{
+ /** The serialVersionUID. */
private static final long serialVersionUID = -4682291068700593492L;
+ /** The OID for the graceful disconnect extended operation response. */
public static final String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.5";
- private static final Logger log = LoggerFactory.getLogger( GracefulDisconnect.class );
+ /** The logger. */
+ private static final Logger LOG = LoggerFactory.getLogger( GracefulDisconnect.class );
- /** offline Time after disconnection */
+ /** Offline time after disconnection */
private int timeOffline;
/** Delay before disconnection */
@@ -67,6 +69,12 @@ public class GracefulDisconnect extends
private Referral replicatedContexts = new ReferralImpl();
+ /**
+ * Instantiates a new graceful disconnect.
+ *
+ * @param responseValue the response value
+ * @throws DecoderException if the response value can't be decoded
+ */
public GracefulDisconnect( byte[] responseValue ) throws DecoderException
{
super( 0, EXTENSION_OID );
@@ -85,6 +93,12 @@ public class GracefulDisconnect extends
}
+ /**
+ * Instantiates a new graceful disconnect.
+ *
+ * @param timeOffline the offline time after disconnect, in minutes
+ * @param delay the delay before disconnect, in seconds
+ */
public GracefulDisconnect( int timeOffline, int delay )
{
super( 0, EXTENSION_OID );
@@ -125,7 +139,7 @@ public class GracefulDisconnect extends
}
catch ( DecoderException e )
{
- log.error( I18n.err( I18n.ERR_04169 ), e );
+ LOG.error( I18n.err( I18n.ERR_04169 ), e );
throw e;
}
}
@@ -136,7 +150,6 @@ public class GracefulDisconnect extends
org.apache.directory.shared.ldap.codec.extended.operations.gracefulDisconnect.GracefulDisconnect codec = new org.apache.directory.shared.ldap.codec.extended.operations.gracefulDisconnect.GracefulDisconnect();
codec.setTimeOffline( this.timeOffline );
codec.setDelay( this.delay );
- Iterator<String> contexts = this.replicatedContexts.getLdapUrls().iterator();
for ( String ldapUrlStr : replicatedContexts.getLdapUrls() )
{
@@ -148,7 +161,7 @@ public class GracefulDisconnect extends
}
catch ( LdapURLEncodingException e )
{
- log.error( I18n.err( I18n.ERR_04170, ldapUrlStr ), e );
+ LOG.error( I18n.err( I18n.ERR_04170, ldapUrlStr ), e );
continue;
}
@@ -161,7 +174,7 @@ public class GracefulDisconnect extends
}
catch ( EncoderException e )
{
- log.error( I18n.err( I18n.ERR_04171 ), e );
+ LOG.error( I18n.err( I18n.ERR_04171 ), e );
throw new RuntimeException( e );
}
}
@@ -192,7 +205,7 @@ public class GracefulDisconnect extends
/**
* Sets the reponse OID specific encoded response values.
*
- * @param value the response specific encoded response values.
+ * @param responseValue the response specific encoded response values.
*/
public void setResponseValue( byte[] responseValue )
{
@@ -206,14 +219,13 @@ public class GracefulDisconnect extends
}
catch ( DecoderException e )
{
- log.error( I18n.err( I18n.ERR_04172 ), e );
+ LOG.error( I18n.err( I18n.ERR_04172 ), e );
}
org.apache.directory.shared.ldap.codec.extended.operations.gracefulDisconnect.GracefulDisconnect codec = container
.getGracefulDisconnect();
this.delay = codec.getDelay();
this.timeOffline = codec.getTimeOffline();
- List<LdapURL> contexts = codec.getReplicatedContexts();
for ( LdapURL ldapUrl : codec.getReplicatedContexts() )
{
@@ -260,30 +272,55 @@ public class GracefulDisconnect extends
// Parameters of the Extended Response Value
// -----------------------------------------------------------------------
- public void setDelay( int delay )
+ /**
+ * Gets the delay before disconnection, in seconds.
+ *
+ * @return the delay before disconnection
+ */
+ public int getDelay()
{
- this.delay = delay;
+ return delay;
}
- public void setTimeOffline( int timeOffline )
+ /**
+ * Sets the delay befor disconnection, in seconds.
+ *
+ * @param delay the new delay before disconnection
+ */
+ public void setDelay( int delay )
{
- this.timeOffline = timeOffline;
+ this.delay = delay;
}
- public int getDelay()
+ /**
+ * Gets the offline time after disconnection, in minutes.
+ *
+ * @return the offline time after disconnection
+ */
+ public int getTimeOffline()
{
- return delay;
+ return timeOffline;
}
- public int getTimeOffline()
+ /**
+ * Sets the time offline after disconnection, in minutes.
+ *
+ * @param timeOffline the new time offline after disconnection
+ */
+ public void setTimeOffline( int timeOffline )
{
- return timeOffline;
+ this.timeOffline = timeOffline;
}
+ /**
+ * Gets the replicated contexts.
+ *
+ * @return the replicated contexts
+ */
public Referral getReplicatedContexts()
{
return replicatedContexts;
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java Sun Oct 3 22:43:50 2010
@@ -38,38 +38,53 @@ import org.slf4j.LoggerFactory;
* An extended operation requesting the server to shutdown it's LDAP service
* port while allowing established clients to complete or abandon operations
* already in progress. More information about this extended request is
- * available here: <a href="ahttp://docs.safehaus.org:8080/x/GR">LDAP Extensions
+ * available here: <a href="http://docs.safehaus.org:8080/x/GR">LDAP Extensions
* for Graceful Shutdown</a>.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class GracefulShutdownRequest extends ExtendedRequestImpl
{
- private static final Logger log = LoggerFactory.getLogger( GracefulShutdownRequest.class );
+ /** The logger. */
+ private static final Logger LOG = LoggerFactory.getLogger( GracefulShutdownRequest.class );
+ /** The serialVersionUID. */
private static final long serialVersionUID = -4682291068700593492L;
+ /** The OID for the graceful shutdown extended operation request. */
public static final String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.3";
- /** Undetermined value used for timeOffline */
+ /** Undetermined value used for offline time */
public static final int UNDETERMINED = 0;
/** The shutdown is immediate */
public static final int NOW = 0;
- /** offline Time after disconnection */
+ /** Offline time after disconnection */
private int timeOffline;
/** Delay before disconnection */
private int delay;
+ /**
+ * Instantiates a new graceful shutdown request.
+ *
+ * @param messageId the message id
+ */
public GracefulShutdownRequest( int messageId )
{
this( messageId, UNDETERMINED, NOW );
}
+ /**
+ * Instantiates a new graceful shutdown request.
+ *
+ * @param messageId the message id
+ * @param timeOffline the offline time after disconnection, in minutes
+ * @param delay the delay before disconnection, in seconds
+ */
public GracefulShutdownRequest( int messageId, int timeOffline, int delay )
{
super( messageId );
@@ -79,6 +94,9 @@ public class GracefulShutdownRequest ext
}
+ /**
+ * {@inheritDoc}
+ */
public void setRequestValue( byte[] requestValue )
{
GracefulShutdownDecoder decoder = new GracefulShutdownDecoder();
@@ -102,12 +120,15 @@ public class GracefulShutdownRequest ext
}
catch ( DecoderException e )
{
- log.error( I18n.err( I18n.ERR_04165 ), e );
+ LOG.error( I18n.err( I18n.ERR_04165 ), e );
throw new RuntimeException( e );
}
}
+ /**
+ * {@inheritDoc}
+ */
public ExtendedResponse createExtendedResponse( String id, byte[] berValue, int offset, int length )
throws NamingException
{
@@ -131,7 +152,7 @@ public class GracefulShutdownRequest ext
}
catch ( EncoderException e )
{
- log.error( I18n.err( I18n.ERR_04164 ), e );
+ LOG.error( I18n.err( I18n.ERR_04164 ), e );
throw new RuntimeException( e );
}
}
@@ -140,6 +161,9 @@ public class GracefulShutdownRequest ext
}
+ /**
+ * {@inheritDoc}
+ */
public ResultResponse getResultResponse()
{
if ( response == null )
@@ -156,24 +180,44 @@ public class GracefulShutdownRequest ext
// Parameters of the Extended Request Payload
// -----------------------------------------------------------------------
+ /**
+ * Gets the delay before disconnection, in seconds.
+ *
+ * @return the delay before disconnection
+ */
public int getDelay()
{
return delay;
}
+ /**
+ * Sets the delay befor disconnection, in seconds.
+ *
+ * @param delay the new delay before disconnection
+ */
public void setDelay( int delay )
{
this.delay = delay;
}
+ /**
+ * Gets the offline time after disconnection, in minutes.
+ *
+ * @return the offline time after disconnection
+ */
public int getTimeOffline()
{
return timeOffline;
}
+ /**
+ * Sets the time offline after disconnection, in minutes.
+ *
+ * @param timeOffline the new time offline after disconnection
+ */
public void setTimeOffline( int timeOffline )
{
this.timeOffline = timeOffline;
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java Sun Oct 3 22:43:50 2010
@@ -34,13 +34,22 @@ import org.apache.directory.shared.ldap.
*/
public class GracefulShutdownResponse extends ExtendedResponseImpl
{
+ /** The Constant serialVersionUID. */
private static final long serialVersionUID = -3824715470944544189L;
+ /** The OID for the graceful shutdown extended operation response. */
public static final String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.4";
+ /** The empty response. */
private static final byte[] EMPTY_RESPONSE = new byte[0];
+ /**
+ * Instantiates a new graceful shutdown response.
+ *
+ * @param messageId the message id
+ * @param rcode the result code
+ */
public GracefulShutdownResponse( int messageId, ResultCodeEnum rcode )
{
super( messageId, EXTENSION_OID );
@@ -66,6 +75,11 @@ public class GracefulShutdownResponse ex
}
+ /**
+ * Instantiates a new graceful shutdown response.
+ *
+ * @param messageId the message id
+ */
public GracefulShutdownResponse( int messageId )
{
super( messageId, EXTENSION_OID );
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java Sun Oct 3 22:43:50 2010
@@ -46,13 +46,25 @@ import org.slf4j.LoggerFactory;
*/
public class StoredProcedureRequest extends ExtendedRequestImpl
{
- private static final Logger log = LoggerFactory.getLogger( StoredProcedureRequest.class );
+
+ /** The logger. */
+ private static final Logger LOG = LoggerFactory.getLogger( StoredProcedureRequest.class );
+
+ /** The serialVersionUID. */
private static final long serialVersionUID = -4682291068700593492L;
+
+ /** The OID for the stored procedure extended operation request. */
public static final String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.6";
+ /** The procedure. */
private StoredProcedure procedure;
+ /**
+ * Instantiates a new stored procedure request.
+ *
+ * @param messageId the message id
+ */
public StoredProcedureRequest( int messageId )
{
super( messageId );
@@ -61,6 +73,13 @@ public class StoredProcedureRequest exte
}
+ /**
+ * Instantiates a new stored procedure request.
+ *
+ * @param messageId the message id
+ * @param procedure the procedure
+ * @param language the language
+ */
public StoredProcedureRequest( int messageId, String procedure, String language )
{
super( messageId );
@@ -71,6 +90,9 @@ public class StoredProcedureRequest exte
}
+ /**
+ * {@inheritDoc}
+ */
public void setRequestValue( byte[] payload )
{
StoredProcedureDecoder decoder = new StoredProcedureDecoder();
@@ -83,12 +105,15 @@ public class StoredProcedureRequest exte
}
catch ( Exception e )
{
- log.error( I18n.err( I18n.ERR_04165 ), e );
+ LOG.error( I18n.err( I18n.ERR_04165 ), e );
throw new RuntimeException( e );
}
}
+ /**
+ * {@inheritDoc}
+ */
public ExtendedResponse createExtendedResponse( String id, byte[] berValue, int offset, int length )
throws NamingException
{
@@ -112,7 +137,7 @@ public class StoredProcedureRequest exte
}
catch ( EncoderException e )
{
- log.error( I18n.err( I18n.ERR_04174 ), e );
+ LOG.error( I18n.err( I18n.ERR_04174 ), e );
throw new RuntimeException( e );
}
}
@@ -121,6 +146,9 @@ public class StoredProcedureRequest exte
}
+ /**
+ * {@inheritDoc}
+ */
public ResultResponse getResultResponse()
{
if ( response == null )
@@ -138,36 +166,67 @@ public class StoredProcedureRequest exte
// Parameters of the Extended Request Payload
// -----------------------------------------------------------------------
+ /**
+ * Gets the language.
+ *
+ * @return the language
+ */
public String getLanguage()
{
return procedure.getLanguage();
}
+ /**
+ * Sets the language.
+ *
+ * @param language the new language
+ */
public void setLanguage( String language )
{
this.procedure.setLanguage( language );
}
+ /**
+ * Sets the procedure.
+ *
+ * @param procedure the new procedure
+ */
public void setProcedure( String procedure )
{
this.procedure.setProcedure( StringTools.getBytesUtf8( procedure ) );
}
+ /**
+ * Gets the procedure specification.
+ *
+ * @return the procedure specification
+ */
public String getProcedureSpecification()
{
return StringTools.utf8ToString( procedure.getProcedure() );
}
+ /**
+ * Size.
+ *
+ * @return the int
+ */
public int size()
{
return this.procedure.getParameters().size();
}
+ /**
+ * Gets the parameter type.
+ *
+ * @param index the index
+ * @return the parameter type
+ */
public Object getParameterType( int index )
{
if ( !this.procedure.getLanguage().equals( "java" ) )
@@ -179,12 +238,24 @@ public class StoredProcedureRequest exte
}
+ /**
+ * Gets the java parameter type.
+ *
+ * @param index the index
+ * @return the java parameter type
+ */
public Class<?> getJavaParameterType( int index )
{
throw new NotImplementedException( I18n.err( I18n.ERR_04175 ) );
}
+ /**
+ * Gets the parameter value.
+ *
+ * @param index the index
+ * @return the parameter value
+ */
public Object getParameterValue( int index )
{
if ( !this.procedure.getLanguage().equals( "java" ) )
@@ -196,12 +267,24 @@ public class StoredProcedureRequest exte
}
+ /**
+ * Gets the java parameter value.
+ *
+ * @param index the index
+ * @return the java parameter value
+ */
public Object getJavaParameterValue( int index )
{
throw new NotImplementedException( I18n.err( I18n.ERR_04176 ) );
}
+ /**
+ * Adds the parameter.
+ *
+ * @param type the type
+ * @param value the value
+ */
public void addParameter( Object type, Object value )
{
/**
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureResponse.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureResponse.java Sun Oct 3 22:43:50 2010
@@ -23,13 +23,28 @@ package org.apache.directory.shared.ldap
import org.apache.directory.shared.ldap.message.ExtendedResponseImpl;
+/**
+ * The response sent back from the server when a {@link StoredProcedureRequest}
+ * is sent.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
public class StoredProcedureResponse extends ExtendedResponseImpl
{
+ /** The Constant serialVersionUID. */
+ private static final long serialVersionUID = 7689434378578829994L;
+
+ /** The OID for the stored procedure extended operation response. */
+ public static final String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.7";
+
+
+ /**
+ * Instantiates a new stored procedure response.
+ *
+ * @param messageId the message id
+ */
public StoredProcedureResponse( int messageId )
{
super( messageId, EXTENSION_OID );
}
-
- private static final long serialVersionUID = 1L;
- public static final String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.7";
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/spi/ProviderException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/spi/ProviderException.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/spi/ProviderException.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/spi/ProviderException.java Sun Oct 3 22:43:50 2010
@@ -31,10 +31,12 @@ import org.apache.directory.shared.ldap.
*/
public class ProviderException extends MessageException
{
+
+ /** The serialVersionUID */
static final long serialVersionUID = 8915445282948982052L;
/** The provider this exception resulted on */
- private final Provider m_provider;
+ private final Provider provider;
/**
@@ -44,34 +46,34 @@ public class ProviderException extends M
*/
public Provider getProvider()
{
- return m_provider;
+ return provider;
}
/**
* Constructs an Exception without a message.
*
- * @param a_provider
+ * @param provider
* The offending Provider that caused the exception.
*/
- public ProviderException(final Provider a_provider)
+ public ProviderException( final Provider provider )
{
super();
- m_provider = a_provider;
+ this.provider = provider;
}
/**
* Constructs an Exception with a detailed message.
*
- * @param a_provider
+ * @param provider
* The offending Provider that caused the exception.
- * @param a_message
+ * @param message
* The message associated with the exception.
*/
- public ProviderException(final Provider a_provider, String a_message)
+ public ProviderException( final Provider provider, String message )
{
- super( a_message );
- m_provider = a_provider;
+ super( message );
+ this.provider = provider;
}
}
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java?rev=1004064&r1=1004063&r2=1004064&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java Sun Oct 3 22:43:50 2010
@@ -65,7 +65,7 @@ public class AVA implements Cloneable, C
private static final long serialVersionUID = 1L;
/** The LoggerFactory used by this class */
- private static Logger LOG = LoggerFactory.getLogger( AVA.class );
+ private static final Logger LOG = LoggerFactory.getLogger( AVA.class );
/** The normalized Name type */
private String normType;
@@ -89,9 +89,10 @@ public class AVA implements Cloneable, C
/** The length of this atav upName */
private int length;
- /** Two values used for comparizon */
+ /** Two values used for comparison, case sensitive */
private static final boolean CASE_SENSITIVE = true;
+ /** Two values used for comparison, case insensitive */
private static final boolean CASE_INSENSITIVE = false;