directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r917214 - in /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core: partition/Partition.java schema/SchemaPartition.java
Date Sun, 28 Feb 2010 17:31:32 GMT
Author: seelmann
Date: Sun Feb 28 17:31:31 2010
New Revision: 917214

URL: http://svn.apache.org/viewvc?rev=917214&view=rev
Log:
formatting

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java?rev=917214&r1=917213&r2=917214&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
Sun Feb 28 17:31:31 2010
@@ -55,7 +55,6 @@
     // C O N F I G U R A T I O N   M E T H O D S
     // -----------------------------------------------------------------------
 
-    
     /**
      * Gets the unique identifier for this partition.
      *
@@ -84,17 +83,17 @@
      * @param suffix the suffix String for this Partition.
      * @throws InvalidNameException if the suffix does not conform to LDAP DN syntax
      */
-    void setSuffix( String suffix )  throws InvalidNameException;
-    
-    
+    void setSuffix( String suffix ) throws InvalidNameException;
+
+
     /**
      * Gets the schema manager assigned to this Partition.
      *
      * @return the schema manager
      */
     SchemaManager getSchemaManager();
-    
-    
+
+
     /**
      * Sets the schema manager assigned to this Partition.
      *
@@ -107,7 +106,6 @@
     // E N D   C O N F I G U R A T I O N   M E T H O D S
     // -----------------------------------------------------------------------
 
-
     /**
      * Initializes this partition.
      *
@@ -226,8 +224,8 @@
      * @throws Exception if there are any problems
      */
     ClonedServerEntry lookup( LookupOperationContext lookupContext ) throws Exception;
-    
-   
+
+
     /**
      * Looks up an entry by id.
      *
@@ -236,7 +234,7 @@
      * @throws Exception if there are any problems
      */
     ClonedServerEntry lookup( Long id ) throws Exception;
-    
+
 
     /**
      * Fast operation to check and see if a particular entry exists.
@@ -247,6 +245,7 @@
      */
     boolean hasEntry( EntryOperationContext opContext ) throws Exception;
 
+
     /**
      * Modifies an entry by changing its relative name. Optionally attributes
      * associated with the old relative name can be removed from the entry.
@@ -294,7 +293,7 @@
      */
     void bind( BindOperationContext opContext ) throws Exception;
 
-    
+
     /**
      * Represents an unbind operation issued by an authenticated client.  Partitions
      * need not support this operation.  This operation is here to enable those

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=917214&r1=917213&r2=917214&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
Sun Feb 28 17:31:31 2010
@@ -108,23 +108,23 @@
 {
     /** the logger */
     private static final Logger LOG = LoggerFactory.getLogger( SchemaPartition.class );
-    
+
     /** the fixed id: 'schema' */
     private static final String ID = "schema";
-    
+
     /** the wrapped Partition */
     private Partition wrapped = new NullPartition();
-    
+
     /** schema manager */
     private SchemaManager schemaManager;
-    
+
     /** registry synchronizer adaptor */
     private RegistrySynchronizerAdaptor synchronizer;
-    
+
     /** A static DN for the ou=schemaModifications entry */
     private static LdapDN schemaModificationDN;
-    
-    
+
+
     /**
      * Sets the wrapped {@link Partition} which must be supplied or 
      * {@link Partition#initialize()} will fail with a NullPointerException.
@@ -137,11 +137,11 @@
         {
             throw new IllegalStateException( I18n.err( I18n.ERR_429 ) );
         }
-        
+
         this.wrapped = wrapped;
     }
-    
-    
+
+
     /**
      * Gets the {@link Partition} being wrapped.
      *
@@ -160,8 +160,8 @@
     {
         return ID;
     }
-    
-    
+
+
     /**
      * Has no affect: the id is fixed at {@link SchemaPartition#ID}: 'schema'.
      * A warning is logged.
@@ -180,7 +180,7 @@
         return wrapped.getSuffixDn();
     }
 
-    
+
     /**
      * Always returns {@link ServerDNConstants#OU_SCHEMA_DN}: 'ou=schema'.
      */
@@ -203,14 +203,13 @@
     // Partition Interface Method Overrides
     // -----------------------------------------------------------------------
 
-    
     @Override
     public void sync() throws Exception
     {
         wrapped.sync();
     }
-    
-    
+
+
     @Override
     protected void doInit() throws Exception
     {
@@ -224,18 +223,18 @@
         wrapped.setSuffix( SchemaConstants.OU_SCHEMA );
         wrapped.getSuffixDn().normalize( schemaManager.getNormalizerMapping() );
         wrapped.setSchemaManager( schemaManager );
-        
+
         try
         {
             wrapped.initialize();
-            
+
             PartitionSchemaLoader partitionLoader = new PartitionSchemaLoader( wrapped, schemaManager
);
             synchronizer = new RegistrySynchronizerAdaptor( schemaManager );
-            
+
             if ( wrapped instanceof NullPartition )
             {
-                LOG.warn( "BYPASSING CRITICAL SCHEMA PROCESSING CODE DURING HEAVY DEV.  "
+
-                		"PLEASE REMOVE THIS CONDITION BY USING A VALID SCHEMA PARTITION!!!" );
+                LOG.warn( "BYPASSING CRITICAL SCHEMA PROCESSING CODE DURING HEAVY DEV.  "
+                    + "PLEASE REMOVE THIS CONDITION BY USING A VALID SCHEMA PARTITION!!!"
);
                 return;
             }
         }
@@ -248,8 +247,8 @@
         schemaModificationDN = new LdapDN( ServerDNConstants.SCHEMA_MODIFICATIONS_DN );
         schemaModificationDN.normalize( schemaManager.getNormalizerMapping() );
     }
-    
-    
+
+
     @Override
     protected void doDestroy()
     {
@@ -263,13 +262,12 @@
             throw new RuntimeException( e );
         }
     }
-    
-    
+
+
     // -----------------------------------------------------------------------
     // Partition Interface Methods
     // -----------------------------------------------------------------------
 
-    
     /**
      * {@inheritDoc}
      */
@@ -279,7 +277,7 @@
         // We have to check if it's enabled and then inject it into the registries
         // but only if it does not break the server.
         synchronizer.add( opContext );
-        
+
         // Now, write the newly added SchemaObject into the schemaPartition
         try
         {
@@ -312,10 +310,10 @@
     public void delete( DeleteOperationContext opContext ) throws Exception
     {
         boolean cascade = opContext.hasRequestControl( CascadeControl.CONTROL_OID );
-        
+
         // The SchemaObject always exist when we reach this method.
         synchronizer.delete( opContext, cascade );
-        
+
         try
         {
             wrapped.delete( opContext );
@@ -329,7 +327,7 @@
         updateSchemaModificationAttributes( opContext );
     }
 
-    
+
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.Partition#list(org.apache.directory.server.core.interceptor.context.ListOperationContext)
      */
@@ -337,7 +335,7 @@
     {
         return wrapped.list( opContext );
     }
-    
+
 
     /**
      * {@inheritDoc}
@@ -363,25 +361,24 @@
     public void modify( ModifyOperationContext opContext ) throws Exception
     {
         ServerEntry entry = opContext.getEntry();
-        
+
         if ( entry == null )
         {
             LookupOperationContext lookupCtx = new LookupOperationContext( opContext.getSession(),
opContext.getDn() );
             entry = wrapped.lookup( lookupCtx );
         }
-        
-        ServerEntry targetEntry = ( ServerEntry ) SchemaUtils.getTargetEntry( 
-            opContext.getModItems(), entry );
-        
+
+        ServerEntry targetEntry = ( ServerEntry ) SchemaUtils.getTargetEntry( opContext.getModItems(),
entry );
+
         boolean cascade = opContext.hasRequestControl( CascadeControl.CONTROL_OID );
-        
+
         boolean hasModification = synchronizer.modify( opContext, targetEntry, cascade );
-        
+
         if ( hasModification )
         {
             wrapped.modify( opContext );
         }
-        
+
         if ( !opContext.getDn().equals( schemaModificationDN ) )
         {
             updateSchemaModificationAttributes( opContext );
@@ -421,13 +418,13 @@
     public void rename( RenameOperationContext opContext ) throws Exception
     {
         boolean cascade = opContext.hasRequestControl( CascadeControl.CONTROL_OID );
-        
+
         // First update the registries
         synchronizer.rename( opContext, cascade );
-        
+
         // Update the schema partition
         wrapped.rename( opContext );
-        
+
         // Update the SSSE operational attributes
         updateSchemaModificationAttributes( opContext );
     }
@@ -449,8 +446,8 @@
     {
         wrapped.unbind( opContext );
     }
-    
-    
+
+
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.Partition#lookup(org.apache.directory.server.core.interceptor.context.LookupOperationContext)
      */
@@ -458,8 +455,8 @@
     {
         return wrapped.lookup( lookupContext );
     }
-    
-    
+
+
     /**
      * Updates the schemaModifiersName and schemaModifyTimestamp attributes of
      * the schemaModificationAttributes entry for the global schema at 
@@ -475,21 +472,17 @@
     {
         String modifiersName = opContext.getSession().getEffectivePrincipal().getJndiName().getNormName();
         String modifyTimestamp = DateUtils.getGeneralizedTime();
-        
+
         List<Modification> mods = new ArrayList<Modification>( 2 );
-        
-        mods.add( new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, 
-            new DefaultServerAttribute( 
-                ApacheSchemaConstants.SCHEMA_MODIFY_TIMESTAMP_AT,
-                schemaManager.lookupAttributeTypeRegistry( ApacheSchemaConstants.SCHEMA_MODIFY_TIMESTAMP_AT
),
-                modifyTimestamp ) ) );
-        
-        mods.add( new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE,
-            new DefaultServerAttribute( 
-                ApacheSchemaConstants.SCHEMA_MODIFIERS_NAME_AT, 
-                schemaManager.lookupAttributeTypeRegistry( ApacheSchemaConstants.SCHEMA_MODIFIERS_NAME_AT
),
-                modifiersName ) ) );
-        
+
+        mods.add( new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, new DefaultServerAttribute(
+            ApacheSchemaConstants.SCHEMA_MODIFY_TIMESTAMP_AT, schemaManager
+                .lookupAttributeTypeRegistry( ApacheSchemaConstants.SCHEMA_MODIFY_TIMESTAMP_AT
), modifyTimestamp ) ) );
+
+        mods.add( new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, new DefaultServerAttribute(
+            ApacheSchemaConstants.SCHEMA_MODIFIERS_NAME_AT, schemaManager
+                .lookupAttributeTypeRegistry( ApacheSchemaConstants.SCHEMA_MODIFIERS_NAME_AT
), modifiersName ) ) );
+
         opContext.modify( schemaModificationDN, mods, ByPassConstants.SCHEMA_MODIFICATION_ATTRIBUTES_UPDATE_BYPASS
);
     }
 
@@ -501,8 +494,8 @@
     {
         this.schemaManager = schemaManager;
     }
-    
-    
+
+
     /**
      * @return The schemaManager
      */
@@ -510,8 +503,8 @@
     {
         return schemaManager;
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */



Mime
View raw message