You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2012/01/24 15:11:01 UTC
svn commit: r1235258 [1/8] - in /directory/apacheds/trunk:
core-annotations/src/main/java/org/apache/directory/server/core/annotations/
core-annotations/src/main/java/org/apache/directory/server/core/factory/
core-annotations/src/test/java/org/apache/d...
Author: elecharny
Date: Tue Jan 24 14:10:56 2012
New Revision: 1235258
URL: http://svn.apache.org/viewvc?rev=1235258&view=rev
Log:
Formatted the code using Directory formatter
Modified:
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/AnnotationUtils.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifFiles.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifs.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ContextEntry.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateIndex.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreatePartition.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/AvlPartitionFactory.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/JdbmPartitionFactory.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/LdifPartitionFactory.java
directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/PartitionFactory.java
directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java
directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/AbstractLayout.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InterceptorEnum.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/LdapPrincipal.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/LdapPrincipalSerializer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/OperationEnum.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/OperationManager.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/ReferralHandlingMode.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/ReferralManager.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/administrative/AdministrativePoint.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/administrative/AutonomousAdministrativePoint.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/EncryptionMethod.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/PasswordUtil.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/ppolicy/PasswordPolicyConfiguration.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/ppolicy/PasswordPolicyException.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/authn/ppolicy/PasswordValidator.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/ChangeLog.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/ChangeLogEvent.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/ChangeLogEventSerializer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/ChangeLogSearchEngine.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/ChangeLogStore.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/LogChange.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/RevisionOrder.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/Scope.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/Tag.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/TagSearchEngine.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/TaggableChangeLogStore.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/changelog/TaggableSearchableChangeLogStore.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryFactory.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerSearchResult.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/TestServerEntryUtils.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/DirectoryListener.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/EventService.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/EventType.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/ExpressionEvaluator.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/LeafEvaluator.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/NotificationCriteria.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/RegistrationEntry.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/ScopeEvaluator.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/event/SubstringEvaluator.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractChangeOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/BindOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ChangeOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/DeleteOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/EmptyOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/GetRootDseOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/HasEntryOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/LookupOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModifyOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/RenameOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/SearchOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/SearchingOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/UnbindOperationContext.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/journal/Journal.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/journal/JournalEvent.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/journal/JournalStore.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/normalization/FilterNormalizingVisitor.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/AbstractPartition.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/DescriptionParsers.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AttributeTypeSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ComparatorSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/DitContentRuleSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/DitStructureRuleSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/MatchingRuleSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/MatchingRuleUseSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/NameFormSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/NormalizerSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ObjectClassSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/RegistrySynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/SchemaSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/SyntaxSynchronizer.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/LdapClassLoader.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/StoredProcEngine.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/StoredProcEngineConfig.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/StoredProcExecutionManager.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/StoredProcUtils.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/java/JavaStoredProcEngine.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/java/JavaStoredProcEngineConfig.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/sp/java/LdapJavaStoredProcClassLoader.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/subtree/RefinementEvaluator.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/subtree/RefinementLeafEvaluator.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/subtree/Subentry.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/subtree/SubentryCache.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/subtree/SubentryUtils.java
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/subtree/SubtreeEvaluator.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockCoreSession.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockCursor.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockOperationManager.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/changelog/TagTest.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/entry/ClonedServerEntryTest.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/entry/SchemaAwareEntryTest.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/entry/SchemaAwareModificationTest.java
directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/sp/StoredProcUtilsTest.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayMarshaller.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTree.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeImpl.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMap.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapImpl.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapNoDupsWrapperCursor.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMarshaller.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeSingleton.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/KeyTupleAvlCursor.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/LinkedAvlMapNode.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/LinkedAvlNode.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/Marshaller.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/SingletonOrOrderedSet.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/avl/AvlTreeSet.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/ArrayTreeCursorTest.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/ArrayTreeTest.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeCursorTest.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMapNoDupsCursorTest.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMapTest.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMarshallerTest.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreePerfTest.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeTest.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/DefaultMarshallerTest.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/IntegerKeyMarshaller.java
directory/apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/avl/AvlTreePerfTest.java
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/AnnotationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/AnnotationUtils.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/AnnotationUtils.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/AnnotationUtils.java Tue Jan 24 14:10:56 2012
@@ -19,9 +19,11 @@
*/
package org.apache.directory.server.core.annotations;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+
/**
* An helper class used to find annotations in methods and classes
*
@@ -40,15 +42,15 @@ public class AnnotationUtils
public static Object getInstance( Class<? extends Annotation> clazz ) throws ClassNotFoundException
{
Object instance = null;
-
+
// Get the caller by inspecting the stackTrace
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
// Iterate on the stack trace.
- for ( int i = stackTrace.length - 1; i >= 0 ; i-- )
+ for ( int i = stackTrace.length - 1; i >= 0; i-- )
{
Class<?> classCaller = null;
-
+
// Get the current class
try
{
@@ -59,37 +61,37 @@ public class AnnotationUtils
// Corner case : we just have to go higher in the stack in this case.
continue;
}
-
+
// Get the current method
String methodCaller = stackTrace[i].getMethodName();
-
+
// Check if we have any annotation associated with the method
Method[] methods = classCaller.getMethods();
-
+
for ( Method method : methods )
{
if ( methodCaller.equals( method.getName() ) )
{
instance = method.getAnnotation( clazz );
-
+
if ( instance != null )
{
break;
}
}
}
-
+
if ( instance == null )
{
instance = classCaller.getAnnotation( clazz );
}
-
+
if ( instance != null )
{
break;
}
}
-
+
return instance;
}
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifFiles.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifFiles.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifFiles.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifFiles.java Tue Jan 24 14:10:56 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.server.core.annotations;
+
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -27,8 +28,6 @@ import java.lang.annotation.RetentionPol
import java.lang.annotation.Target;
-
-
/**
* A annotation used to specify an array of ldif files to load and apply
* on the instance used for integration testing.
@@ -37,9 +36,10 @@ import java.lang.annotation.Target;
*/
@Documented
@Inherited
-@Retention ( RetentionPolicy.RUNTIME )
-@Target ( { ElementType.METHOD, ElementType.TYPE } )
+@Retention(RetentionPolicy.RUNTIME)
+@Target(
+ { ElementType.METHOD, ElementType.TYPE })
public @interface ApplyLdifFiles
{
- String[] value();
+ String[] value();
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifs.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifs.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifs.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ApplyLdifs.java Tue Jan 24 14:10:56 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.server.core.annotations;
+
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -35,9 +36,10 @@ import java.lang.annotation.Target;
*/
@Documented
@Inherited
-@Retention ( RetentionPolicy.RUNTIME )
-@Target ( { ElementType.METHOD, ElementType.TYPE } )
+@Retention(RetentionPolicy.RUNTIME)
+@Target(
+ { ElementType.METHOD, ElementType.TYPE })
public @interface ApplyLdifs
{
- String[] value();
+ String[] value();
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ContextEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ContextEntry.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ContextEntry.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/ContextEntry.java Tue Jan 24 14:10:56 2012
@@ -18,18 +18,21 @@
*/
package org.apache.directory.server.core.annotations;
+
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+
/**
* An annotation for the Partition context entry
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
@Retention(RetentionPolicy.RUNTIME)
-@Target( {ElementType.METHOD, ElementType.TYPE } )
+@Target(
+ { ElementType.METHOD, ElementType.TYPE })
public @interface ContextEntry
{
/** the context entry in LDIF to be added */
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateAuthenticator.java Tue Jan 24 14:10:56 2012
@@ -18,6 +18,7 @@
*/
package org.apache.directory.server.core.annotations;
+
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -26,6 +27,7 @@ import java.lang.annotation.Target;
import org.apache.directory.server.core.authn.AnonymousAuthenticator;
import org.apache.directory.server.core.authn.Authenticator;
+
/**
* An authenticator creation
* a name and a suffix, plus some other characteristics. Here is an example :
@@ -39,15 +41,18 @@ import org.apache.directory.server.core.
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
@Retention(RetentionPolicy.RUNTIME)
-@Target( {ElementType.METHOD, ElementType.TYPE } )
+@Target(
+ { ElementType.METHOD, ElementType.TYPE })
public @interface CreateAuthenticator
{
/** The authenticator implementation class */
Class<? extends Authenticator> type() default AnonymousAuthenticator.class;
-
+
+
/** Delegate host, use for testing DelegatingAuthenticator */
String delegateHost() default "localhost";
-
+
+
/** Delegate port, use for testing DelegatingAuthenticator */
int delegatePort() default -1;
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java Tue Jan 24 14:10:56 2012
@@ -18,6 +18,7 @@
*/
package org.apache.directory.server.core.annotations;
+
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -25,36 +26,48 @@ import java.lang.annotation.Target;
import org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory;
+
/**
* An anntation for the DirectoryService builder
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
@Retention(RetentionPolicy.RUNTIME)
-@Target( {ElementType.METHOD, ElementType.TYPE } )
+@Target(
+ { ElementType.METHOD, ElementType.TYPE })
public @interface CreateDS
{
/** The Factory to use to create a DirectoryService */
Class<?> factory() default DefaultDirectoryServiceFactory.class;
-
+
+
/** The DS name */
String name() default "defaultDS";
-
+
+
/** flag to enable/disable access control, default is false */
boolean enableAccessControl() default false;
-
+
+
/** flag to enable/disable anonymous access, default is false */
boolean allowAnonAccess() default false;
-
+
+
/** flag to enable/disable changelog, default is true */
boolean enableChangeLog() default true;
-
+
+
/** The list of partitions to create */
- CreatePartition[] partitions() default {};
-
+ CreatePartition[] partitions() default
+ {};
+
+
/** additional interceptors */
- Class<?>[] additionalInterceptors() default {};
-
+ Class<?>[] additionalInterceptors() default
+ {};
+
+
/** authenticators, when empty the default authenticators are used, else this must contain the complete list */
- CreateAuthenticator[] authenticators() default {};
+ CreateAuthenticator[] authenticators() default
+ {};
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateIndex.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateIndex.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateIndex.java Tue Jan 24 14:10:56 2012
@@ -18,6 +18,7 @@
*/
package org.apache.directory.server.core.annotations;
+
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -25,6 +26,7 @@ import java.lang.annotation.Target;
import org.apache.directory.server.xdbm.Index;
+
/**
* An annotation for the Index creation. It's used when we need to inject an
* indexed attribute into a given partition. Here is an exemple :
@@ -43,16 +45,19 @@ import org.apache.directory.server.xdbm.
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
@Retention(RetentionPolicy.RUNTIME)
-@Target( {ElementType.METHOD, ElementType.TYPE } )
+@Target(
+ { ElementType.METHOD, ElementType.TYPE })
public @interface CreateIndex
{
/** The index implementation class */
@SuppressWarnings("unchecked")
Class<? extends Index> type() default Index.class;
-
+
+
/** The cache size */
int cacheSize() default 1000;
-
+
+
/** The indexed attribute */
String attribute();
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreatePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreatePartition.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreatePartition.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreatePartition.java Tue Jan 24 14:10:56 2012
@@ -18,6 +18,7 @@
*/
package org.apache.directory.server.core.annotations;
+
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -25,6 +26,7 @@ import java.lang.annotation.Target;
import org.apache.directory.server.core.api.partition.Partition;
+
/**
* An annotation for the Partition creation. A partition is defined by
* a name and a suffix, plus some other characteristics. Here is an example :
@@ -49,24 +51,31 @@ import org.apache.directory.server.core.
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
@Retention(RetentionPolicy.RUNTIME)
-@Target( {ElementType.METHOD, ElementType.TYPE } )
+@Target(
+ { ElementType.METHOD, ElementType.TYPE })
public @interface CreatePartition
{
/** The partition implementation class */
Class<? extends Partition> type() default Partition.class;
-
+
+
/** The partition name */
String name();
-
+
+
/** The partition suffix */
String suffix();
-
+
+
/** The context entry */
- ContextEntry contextEntry() default @ContextEntry( entryLdif = "" );
-
+ ContextEntry contextEntry() default @ContextEntry(entryLdif = "");
+
+
/** The associated indexes */
- CreateIndex[] indexes() default {};
-
+ CreateIndex[] indexes() default
+ {};
+
+
/** The cache size */
int cacheSize() default 1000;
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/AvlPartitionFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/AvlPartitionFactory.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/AvlPartitionFactory.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/AvlPartitionFactory.java Tue Jan 24 14:10:56 2012
@@ -42,7 +42,8 @@ public class AvlPartitionFactory impleme
/**
* {@inheritDoc}
*/
- public AvlPartition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize, File workingDirectory )
+ public AvlPartition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize,
+ File workingDirectory )
throws Exception
{
AvlPartition partition = new AvlPartition( schemaManager );
@@ -50,7 +51,7 @@ public class AvlPartitionFactory impleme
partition.setSuffixDn( new Dn( suffix ) );
partition.setCacheSize( 500 );
partition.setPartitionPath( workingDirectory.toURI() );
-
+
return partition;
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java Tue Jan 24 14:10:56 2012
@@ -65,16 +65,17 @@ public class DSAnnotationProcessor
/** A logger for this class */
private static final Logger LOG = LoggerFactory.getLogger( DSAnnotationProcessor.class );
+
/**
* Create the DirectoryService
*/
public static DirectoryService createDS( CreateDS dsBuilder )
- throws Exception
+ throws Exception
{
LOG.debug( "Starting DS {}...", dsBuilder.name() );
Class<?> factory = dsBuilder.factory();
DirectoryServiceFactory dsf = ( DirectoryServiceFactory ) factory
- .newInstance();
+ .newInstance();
DirectoryService service = dsf.getDirectoryService();
service.setAccessControlEnabled( dsBuilder.enableAccessControl() );
@@ -93,7 +94,7 @@ public class DSAnnotationProcessor
if ( dsBuilder.authenticators().length != 0 )
{
AuthenticationInterceptor authenticationInterceptor = null;
-
+
for ( Interceptor interceptor : interceptorList )
{
if ( interceptor instanceof AuthenticationInterceptor )
@@ -102,27 +103,27 @@ public class DSAnnotationProcessor
break;
}
}
-
+
if ( authenticationInterceptor == null )
{
throw new IllegalStateException(
- "authentication interceptor not found" );
+ "authentication interceptor not found" );
}
-
+
Set<Authenticator> authenticators = new HashSet<Authenticator>();
for ( CreateAuthenticator createAuthenticator : dsBuilder
- .authenticators() )
+ .authenticators() )
{
Authenticator auth = createAuthenticator.type().newInstance();
-
+
if ( auth instanceof DelegatingAuthenticator )
{
DelegatingAuthenticator dauth = ( DelegatingAuthenticator ) auth;
dauth.setDelegateHost( createAuthenticator.delegateHost() );
dauth.setDelegatePort( createAuthenticator.delegatePort() );
}
-
+
authenticators.add( auth );
}
}
@@ -142,27 +143,29 @@ public class DSAnnotationProcessor
// instances.
PartitionFactory partitionFactory = dsf.getPartitionFactory();
partition = partitionFactory.createPartition(
- service.getSchemaManager(),
- createPartition.name(),
- createPartition.suffix(),
- createPartition.cacheSize(),
- new File( service.getInstanceLayout().getPartitionsDirectory(), createPartition.name() ) );
+ service.getSchemaManager(),
+ createPartition.name(),
+ createPartition.suffix(),
+ createPartition.cacheSize(),
+ new File( service.getInstanceLayout().getPartitionsDirectory(), createPartition.name() ) );
CreateIndex[] indexes = createPartition.indexes();
-
+
for ( CreateIndex createIndex : indexes )
{
partitionFactory.addIndex( partition,
- createIndex.attribute(), createIndex.cacheSize() );
+ createIndex.attribute(), createIndex.cacheSize() );
}
}
else
{
// The annotation contains a specific partition type, we use
// that type.
- Class<?> partypes[] = new Class[]{SchemaManager.class};
- Constructor<?> constructor = createPartition.type().getConstructor(partypes);
- partition = (Partition)constructor.newInstance( new Object[]{service.getSchemaManager()} );
+ Class<?> partypes[] = new Class[]
+ { SchemaManager.class };
+ Constructor<?> constructor = createPartition.type().getConstructor( partypes );
+ partition = ( Partition ) constructor.newInstance( new Object[]
+ { service.getSchemaManager() } );
partition.setId( createPartition.name() );
partition.setSuffixDn( new Dn( service.getSchemaManager(), createPartition.suffix() ) );
@@ -171,8 +174,8 @@ public class DSAnnotationProcessor
AbstractBTreePartition<?> btreePartition = ( AbstractBTreePartition<?> ) partition;
btreePartition.setCacheSize( createPartition.cacheSize() );
btreePartition.setPartitionPath( new File( service
- .getInstanceLayout().getPartitionsDirectory(),
- createPartition.name() ).toURI() );
+ .getInstanceLayout().getPartitionsDirectory(),
+ createPartition.name() ).toURI() );
// Process the indexes if any
CreateIndex[] indexes = createPartition.indexes();
@@ -216,7 +219,7 @@ public class DSAnnotationProcessor
* @return A valid DS
*/
public static DirectoryService getDirectoryService( Description description )
- throws Exception
+ throws Exception
{
CreateDS dsBuilder = description.getAnnotation( CreateDS.class );
@@ -230,8 +233,8 @@ public class DSAnnotationProcessor
return null;
}
}
-
-
+
+
/**
* Create a DirectoryService from an annotation. The @CreateDS annotation
* must be associated with either the method or the encapsulating class. We
@@ -244,15 +247,15 @@ public class DSAnnotationProcessor
{
Object instance = AnnotationUtils.getInstance( CreateDS.class );
CreateDS dsBuilder = null;
-
+
if ( instance != null )
{
- dsBuilder = (CreateDS)instance;
+ dsBuilder = ( CreateDS ) instance;
// Ok, we have found a CreateDS annotation. Process it now.
return createDS( dsBuilder );
}
-
+
throw new LdapException( I18n.err( I18n.ERR_114 ) );
}
@@ -267,18 +270,18 @@ public class DSAnnotationProcessor
* @throws Exception
*/
private static void injectEntry( LdifEntry entry, DirectoryService service )
- throws LdapException
+ throws LdapException
{
if ( entry.isChangeAdd() || entry.isLdifContent() )
{
service.getAdminSession().add(
- new DefaultEntry( service.getSchemaManager(), entry
- .getEntry() ) );
+ new DefaultEntry( service.getSchemaManager(), entry
+ .getEntry() ) );
}
else if ( entry.isChangeModify() )
{
service.getAdminSession().modify( entry.getDn(),
- entry.getModifications() );
+ entry.getModifications() );
}
else
{
@@ -298,18 +301,18 @@ public class DSAnnotationProcessor
* @throws Exception
*/
public static void injectLdifFiles( Class<?> clazz,
- DirectoryService service, String[] ldifFiles ) throws Exception
+ DirectoryService service, String[] ldifFiles ) throws Exception
{
if ( ( ldifFiles != null ) && ( ldifFiles.length > 0 ) )
{
for ( String ldifFile : ldifFiles )
{
InputStream is = clazz.getClassLoader().getResourceAsStream(
- ldifFile );
+ ldifFile );
if ( is == null )
{
throw new FileNotFoundException( "LDIF file '" + ldifFile
- + "' not found." );
+ + "' not found." );
}
else
{
@@ -338,7 +341,7 @@ public class DSAnnotationProcessor
* if there is a problem adding the entries from the LDIF
*/
public static void injectEntries( DirectoryService service, String ldif )
- throws Exception
+ throws Exception
{
LdifReader reader = new LdifReader();
List<LdifEntry> entries = reader.parseLdif( ldif );
@@ -357,7 +360,7 @@ public class DSAnnotationProcessor
* Apply the LDIF entries to the given service
*/
public static void applyLdifs( Description desc, DirectoryService service )
- throws Exception
+ throws Exception
{
if ( desc == null )
{
@@ -365,12 +368,12 @@ public class DSAnnotationProcessor
}
ApplyLdifFiles applyLdifFiles = desc
- .getAnnotation( ApplyLdifFiles.class );
+ .getAnnotation( ApplyLdifFiles.class );
if ( applyLdifFiles != null )
{
LOG.debug( "Applying {} to {}", applyLdifFiles.value(),
- desc.getDisplayName() );
+ desc.getDisplayName() );
injectLdifFiles( desc.getClass(), service, applyLdifFiles.value() );
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java Tue Jan 24 14:10:56 2012
@@ -69,7 +69,7 @@ public class DefaultDirectoryServiceFact
// we we can set some properties like accesscontrol, anon access
// before starting up the service
directoryService = new DefaultDirectoryService();
-
+
// no need to register a shutdown hook during tests because this
// starts a lot of threads and slows down test execution
directoryService.setShutdownHookEnabled( false );
@@ -82,7 +82,7 @@ public class DefaultDirectoryServiceFact
try
{
String typeName = System.getProperty( "apacheds.partition.factory" );
-
+
if ( typeName != null )
{
Class<? extends PartitionFactory> type = ( Class<? extends PartitionFactory> ) Class.forName( typeName );
@@ -128,19 +128,19 @@ public class DefaultDirectoryServiceFact
}
InstanceLayout instanceLayout = new InstanceLayout( instanceDirectory );
-
+
if ( instanceLayout.getInstanceDirectory().exists() )
{
try
{
FileUtils.deleteDirectory( instanceLayout.getInstanceDirectory() );
}
- catch( IOException e )
+ catch ( IOException e )
{
LOG.warn( "couldn't delete the instance directory before initializing the DirectoryService", e );
}
}
-
+
directoryService.setInstanceLayout( instanceLayout );
}
@@ -155,7 +155,7 @@ public class DefaultDirectoryServiceFact
// Extract the schema on disk (a brand new one) and load the registries
File schemaRepository = new File( workingDirectory, "schema" );
SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( workingDirectory );
-
+
try
{
extractor.extractOrCopy();
@@ -167,7 +167,7 @@ public class DefaultDirectoryServiceFact
SchemaLoader loader = new LdifSchemaLoader( schemaRepository );
SchemaManager schemaManager = new DefaultSchemaManager( loader );
-
+
// We have to load the schema now, otherwise we won't be able
// to initialize the Partitions, as we won't be able to parse
// and normalize their suffix Dn
@@ -177,7 +177,7 @@ public class DefaultDirectoryServiceFact
// Init the LdifPartition
LdifPartition ldifPartition = new LdifPartition( schemaManager );
- ldifPartition.setPartitionPath( new File(workingDirectory, "schema" ).toURI() );
+ ldifPartition.setPartitionPath( new File( workingDirectory, "schema" ).toURI() );
SchemaPartition schemaPartition = new SchemaPartition( schemaManager );
schemaPartition.setWrappedPartition( ldifPartition );
directoryService.setSchemaPartition( schemaPartition );
@@ -186,7 +186,7 @@ public class DefaultDirectoryServiceFact
if ( errors.size() != 0 )
{
- throw new Exception( I18n.err( I18n.ERR_317, Exceptions.printErrors(errors) ) );
+ throw new Exception( I18n.err( I18n.ERR_317, Exceptions.printErrors( errors ) ) );
}
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/JdbmPartitionFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/JdbmPartitionFactory.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/JdbmPartitionFactory.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/JdbmPartitionFactory.java Tue Jan 24 14:10:56 2012
@@ -42,7 +42,8 @@ public class JdbmPartitionFactory implem
/**
* {@inheritDoc}
*/
- public JdbmPartition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize, File workingDirectory )
+ public JdbmPartition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize,
+ File workingDirectory )
throws Exception
{
JdbmPartition partition = new JdbmPartition( schemaManager );
@@ -51,7 +52,7 @@ public class JdbmPartitionFactory implem
partition.setCacheSize( 500 );
partition.setPartitionPath( workingDirectory.toURI() );
partition.initialize();
-
+
return partition;
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/LdifPartitionFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/LdifPartitionFactory.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/LdifPartitionFactory.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/LdifPartitionFactory.java Tue Jan 24 14:10:56 2012
@@ -42,7 +42,8 @@ public class LdifPartitionFactory implem
/**
* {@inheritDoc}
*/
- public LdifPartition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize, File workingDirectory )
+ public LdifPartition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize,
+ File workingDirectory )
throws Exception
{
LdifPartition partition = new LdifPartition( schemaManager );
@@ -50,7 +51,7 @@ public class LdifPartitionFactory implem
partition.setSuffixDn( new Dn( suffix ) );
partition.setCacheSize( 500 );
partition.setPartitionPath( workingDirectory.toURI() );
-
+
return partition;
}
Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/PartitionFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/PartitionFactory.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/PartitionFactory.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/PartitionFactory.java Tue Jan 24 14:10:56 2012
@@ -45,7 +45,8 @@ public interface PartitionFactory
* @return the partition
* @throws Exception the exception
*/
- Partition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize, File workingDirectory ) throws Exception;
+ Partition createPartition( SchemaManager schemaManager, String id, String suffix, int cacheSize,
+ File workingDirectory ) throws Exception;
/**
Modified: directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java (original)
+++ directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceAnnotationTest.java Tue Jan 24 14:10:56 2012
@@ -20,6 +20,7 @@
package org.apache.directory.server.core.factory;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -42,75 +43,75 @@ import org.junit.Test;
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-@CreateDS( name = "classDS" )
+@CreateDS(name = "classDS")
public class DirectoryServiceAnnotationTest
{
@Test
public void testCreateDS() throws Exception
{
DirectoryService service = DSAnnotationProcessor.getDirectoryService();
-
+
assertTrue( service.isStarted() );
assertEquals( "classDS", service.getInstanceId() );
-
+
service.shutdown();
FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
}
@Test
- @CreateDS( name = "methodDS" )
+ @CreateDS(name = "methodDS")
public void testCreateMethodDS() throws Exception
{
DirectoryService service = DSAnnotationProcessor.getDirectoryService();
-
+
assertTrue( service.isStarted() );
assertEquals( "methodDS", service.getInstanceId() );
-
+
service.shutdown();
FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
}
-
-
+
+
@Test
- @CreateDS(
+ @CreateDS(
name = "MethodDSWithPartition",
partitions =
- {
- @CreatePartition(
- name = "example",
- suffix = "dc=example,dc=com",
- contextEntry = @ContextEntry(
- entryLdif =
+ {
+ @CreatePartition(
+ name = "example",
+ suffix = "dc=example,dc=com",
+ contextEntry = @ContextEntry(
+ entryLdif =
"dn: dc=example,dc=com\n" +
- "dc: example\n" +
- "objectClass: top\n" +
- "objectClass: domain\n\n" ),
- indexes =
- {
- @CreateIndex( attribute = "objectClass" ),
- @CreateIndex( attribute = "dc" ),
- @CreateIndex( attribute = "ou" )
- } )
- } )
+ "dc: example\n" +
+ "objectClass: top\n" +
+ "objectClass: domain\n\n"),
+ indexes =
+ {
+ @CreateIndex(attribute = "objectClass"),
+ @CreateIndex(attribute = "dc"),
+ @CreateIndex(attribute = "ou")
+ })
+ })
public void testCreateMethodDSWithPartition() throws Exception
{
DirectoryService service = DSAnnotationProcessor.getDirectoryService();
-
+
assertTrue( service.isStarted() );
assertEquals( "MethodDSWithPartition", service.getInstanceId() );
-
+
Set<String> expectedNames = new HashSet<String>();
-
+
expectedNames.add( "example" );
expectedNames.add( "schema" );
-
+
assertEquals( 2, service.getPartitions().size() );
-
+
for ( Partition partition : service.getPartitions() )
{
assertTrue( expectedNames.contains( partition.getId() ) );
-
+
if ( "example".equalsIgnoreCase( partition.getId() ) )
{
assertTrue( partition.isInitialized() );
@@ -122,22 +123,22 @@ public class DirectoryServiceAnnotationT
assertEquals( "ou=schema", partition.getSuffixDn().getName() );
}
}
-
+
service.shutdown();
FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
}
-
-
+
+
@Test
- @CreateDS(
+ @CreateDS(
name = "MethodDSWithAvlPartition",
partitions =
{
- @CreatePartition(
- type = AvlPartition.class,
- name = "example",
- suffix = "dc=example,dc=com" )
- } )
+ @CreatePartition(
+ type = AvlPartition.class,
+ name = "example",
+ suffix = "dc=example,dc=com")
+ })
public void testCreateMethodDSWithAvlPartition() throws Exception
{
DirectoryService service = DSAnnotationProcessor.getDirectoryService();
Modified: directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java (original)
+++ directory/apacheds/trunk/core-annotations/src/test/java/org/apache/directory/server/core/factory/DirectoryServiceFactoryTest.java Tue Jan 24 14:10:56 2012
@@ -20,6 +20,7 @@
package org.apache.directory.server.core.factory;
+
import static org.junit.Assert.assertTrue;
import org.apache.commons.io.FileUtils;
@@ -45,11 +46,11 @@ public class DirectoryServiceFactoryTest
{
DefaultDirectoryServiceFactory factory = new DefaultDirectoryServiceFactory();
factory.init( "test" );
-
+
DirectoryService service = factory.getDirectoryService();
-
+
assertTrue( service.isStarted() );
-
+
service.shutdown();
FileUtils.deleteDirectory( service.getInstanceLayout().getInstanceDirectory() );
}
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/AbstractLayout.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/AbstractLayout.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/AbstractLayout.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/AbstractLayout.java Tue Jan 24 14:10:56 2012
@@ -120,7 +120,7 @@ public abstract class AbstractLayout
{
if ( !requiredDirectory.mkdirs() )
{
- throw new IOException(I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECORY, requiredDirectory ) );
+ throw new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECORY, requiredDirectory ) );
}
}
}
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java Tue Jan 24 14:10:56 2012
@@ -67,7 +67,7 @@ public interface CoreSession
*/
DirectoryService getDirectoryService();
-
+
/**
* Gets the anonymous LDAP principal used to authenticate.
*
@@ -75,7 +75,7 @@ public interface CoreSession
*/
LdapPrincipal getAnonymousPrincipal();
-
+
/**
* Gets the LDAP principal used to authenticate. This is the identity
* used to establish this session on authentication.
@@ -83,8 +83,8 @@ public interface CoreSession
* @return the LdapPrincipal used to authenticate.
*/
LdapPrincipal getAuthenticatedPrincipal();
-
-
+
+
/**
* Gets the LDAP principal used for the effective identity associated with
* this session which may not be the same as the authenticated principal.
@@ -106,23 +106,23 @@ public interface CoreSession
*/
LdapPrincipal getEffectivePrincipal();
-
+
/**
* Gets whether or not confidentiality is enabled for this session.
*
* @return true if confidentiality is enabled, false otherwise
*/
boolean isConfidential();
-
-
+
+
/**
* Gets whether or not this user is anonymous.
*
* @return true if the identity is anonymous false otherwise
*/
boolean isAnonymous();
-
-
+
+
/**
* Returns true if the effective principal associated with this session is
* the administrator.
@@ -131,8 +131,8 @@ public interface CoreSession
* @return true if authorized as the administrator, false otherwise
*/
boolean isAdministrator();
-
-
+
+
/**
* Returns true if the effective principal associated with this session is
* the administrator or is within the administrators group.
@@ -142,24 +142,24 @@ public interface CoreSession
* @return true if authorized as an administrator, false otherwise
*/
boolean isAnAdministrator();
-
-
+
+
/**
* Gets the authentication level associated with this session.
*
* @return the authentication level associated with the session
*/
AuthenticationLevel getAuthenticationLevel();
-
-
+
+
/**
* Gets the controls enabled for this session.
*
* @return the session controls as a Set
*/
Set<Control> getControls();
-
-
+
+
/**
* Gets all outstanding operations currently being performed that have yet
* to be completed.
@@ -168,7 +168,7 @@ public interface CoreSession
*/
Set<OperationContext> getOutstandingOperations();
-
+
/**
* Gets whether or not this session is virtual. Virtual sessions verses
* real sessions represent logical sessions established by non-LDAP
@@ -177,8 +177,8 @@ public interface CoreSession
* @return true if the session is virtual, false otherwise
*/
boolean isVirtual();
-
-
+
+
/**
* Gets the socket address of the LDAP client or null if there is no LDAP
* client associated with the session. Some calls to the core can be made
@@ -202,8 +202,8 @@ public interface CoreSession
* associated with a real LDAP service
*/
SocketAddress getServiceAddress();
-
-
+
+
// -----------------------------------------------------------------------
// Operation Methods
// -----------------------------------------------------------------------
@@ -214,8 +214,8 @@ public interface CoreSession
* @exception Exception on failures to add the entry
*/
void add( Entry entry ) throws LdapException;
-
-
+
+
/**
* Adds an entry into the DirectoryService associated with this CoreSession.
*
@@ -224,8 +224,8 @@ public interface CoreSession
* @exception Exception on failures to add the entry
*/
void add( Entry entry, LogChange log ) throws LdapException;
-
-
+
+
/**
* Adds an entry into the DirectoryService associated with this CoreSession.
* The flag is used to tell the server to ignore the referrals and manipulate
@@ -236,8 +236,8 @@ public interface CoreSession
* @exception Exception on failures to add the entry
*/
void add( Entry entry, boolean ignoreReferral ) throws LdapException;
-
-
+
+
/**
* Adds an entry into the DirectoryService associated with this CoreSession.
* The flag is used to tell the server to ignore the referrals and manipulate
@@ -249,8 +249,8 @@ public interface CoreSession
* @exception Exception on failures to add the entry
*/
void add( Entry entry, boolean ignoreReferral, LogChange log ) throws LdapException;
-
-
+
+
/**
* Adds an entry into the DirectoryService associated with this CoreSession.
* The entry is built using the received AddRequest.
@@ -259,8 +259,8 @@ public interface CoreSession
* @exception Exception on failures to add the entry
*/
void add( AddRequest addRequest ) throws LdapException;
-
-
+
+
/**
* Adds an entry into the DirectoryService associated with this CoreSession.
* The entry is built using the received AddRequest.
@@ -270,8 +270,8 @@ public interface CoreSession
* @exception Exception on failures to add the entry
*/
void add( AddRequest addRequest, LogChange log ) throws LdapException;
-
-
+
+
/**
* Checks to see if an attribute in an entry contains a value.
*
@@ -281,8 +281,8 @@ public interface CoreSession
* @throws Exception if there are failures while comparing
*/
boolean compare( Dn dn, String oid, Object value ) throws LdapException;
-
-
+
+
/**
* Checks to see if an attribute in an entry contains a value.
* The flag is used to tell the server to ignore the referrals and manipulate
@@ -295,8 +295,8 @@ public interface CoreSession
* @throws Exception if there are failures while comparing
*/
boolean compare( Dn dn, String oid, Object value, boolean ignoreReferral ) throws LdapException;
-
-
+
+
/**
* Checks to see if an attribute in an entry contains a value.
*
@@ -305,7 +305,7 @@ public interface CoreSession
*/
boolean compare( CompareRequest compareRequest ) throws LdapException;
-
+
/**
* Deletes an entry in the server.
*
@@ -314,7 +314,7 @@ public interface CoreSession
*/
void delete( Dn dn ) throws LdapException;
-
+
/**
* Deletes an entry in the server.
*
@@ -323,8 +323,8 @@ public interface CoreSession
* @throws Exception if there are failures while deleting the entry
*/
void delete( Dn dn, LogChange log ) throws LdapException;
-
-
+
+
/**
* Deletes an entry in the server.
*
@@ -333,8 +333,8 @@ public interface CoreSession
* @throws Exception if there are failures while deleting the entry
*/
void delete( DeleteRequest deleteRequest ) throws LdapException;
-
-
+
+
/**
* Deletes an entry in the server. The operation can be logged if requested
*
@@ -345,7 +345,7 @@ public interface CoreSession
*/
void delete( DeleteRequest deleteRequest, LogChange log ) throws LdapException;
-
+
/**
* Deletes an entry in the server.
* The flag is used to tell the server to ignore the referrals and manipulate
@@ -356,8 +356,8 @@ public interface CoreSession
* @throws Exception if there are failures while deleting the entry
*/
void delete( Dn dn, boolean ignoreReferral ) throws LdapException;
-
-
+
+
/**
* Deletes an entry in the server.
* The flag is used to tell the server to ignore the referrals and manipulate
@@ -369,20 +369,20 @@ public interface CoreSession
* @throws Exception if there are failures while deleting the entry
*/
void delete( Dn dn, boolean ignoreReferral, LogChange log ) throws LdapException;
-
-
+
+
/**
* Checks to see if an entry exists.
*/
boolean exists( String dn ) throws LdapException;
-
-
+
+
/**
* Checks to see if an entry exists.
*/
boolean exists( Dn dn ) throws LdapException;
-
-
+
+
/**
* Looks up an entry in the server returning all attributes: both user and
* operational attributes.
@@ -392,7 +392,7 @@ public interface CoreSession
*/
Entry lookup( Dn dn ) throws LdapException;
-
+
/**
* Looks up an entry in the server returning all attributes: both user and
* operational attributes.
@@ -403,7 +403,7 @@ public interface CoreSession
*/
Entry lookup( Dn dn, String... atIds ) throws LdapException;
-
+
/**
* Looks up an entry in the server returning all attributes: both user and
* operational attributes.
@@ -415,7 +415,7 @@ public interface CoreSession
*/
Entry lookup( Dn dn, Control[] controls, String... atIds ) throws LdapException;
-
+
/**
* Modifies an entry within the server by applying a list of modifications
* to the entry.
@@ -426,7 +426,7 @@ public interface CoreSession
*/
void modify( Dn dn, List<Modification> mods ) throws LdapException;
-
+
/**
* Modifies an entry within the server by applying a list of modifications
* to the entry.
@@ -436,8 +436,8 @@ public interface CoreSession
* @throws Exception if there are failures while modifying the entry
*/
void modify( Dn dn, Modification... mods ) throws LdapException;
-
-
+
+
/**
* Modifies an entry within the server by applying a list of modifications
* to the entry.
@@ -448,8 +448,8 @@ public interface CoreSession
* @throws Exception if there are failures while modifying the entry
*/
void modify( Dn dn, List<Modification> mods, LogChange log ) throws LdapException;
-
-
+
+
/**
* Modifies an entry within the server by applying a list of modifications
* to the entry.
@@ -462,8 +462,8 @@ public interface CoreSession
* @throws Exception if there are failures while modifying the entry
*/
void modify( Dn dn, List<Modification> mods, boolean ignoreReferral ) throws LdapException;
-
-
+
+
/**
* Modifies an entry within the server by applying a list of modifications
* to the entry.
@@ -477,14 +477,14 @@ public interface CoreSession
* @throws Exception if there are failures while modifying the entry
*/
void modify( Dn dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws LdapException;
-
-
+
+
void modify( ModifyRequest modifyRequest ) throws LdapException;
-
-
+
+
void modify( ModifyRequest modifyRequest, LogChange log ) throws LdapException;
-
+
/**
* Moves an entry or a branch of entries at a specified distinguished name
* to a position under a new parent.
@@ -494,8 +494,8 @@ public interface CoreSession
* @exception if there are failures while moving the entry/branch
*/
void move( Dn dn, Dn newParent ) throws LdapException;
-
-
+
+
/**
* Moves an entry or a branch of entries at a specified distinguished name
* to a position under a new parent.
@@ -506,8 +506,8 @@ public interface CoreSession
* @exception if there are failures while moving the entry/branch
*/
void move( Dn dn, Dn newParent, LogChange log ) throws LdapException;
-
-
+
+
/**
* Moves an entry or a branch of entries at a specified distinguished name
* to a position under a new parent.
@@ -518,8 +518,8 @@ public interface CoreSession
* @exception if there are failures while moving the entry/branch
*/
void move( Dn dn, Dn newParent, boolean ignoreReferral ) throws Exception;
-
-
+
+
/**
* Moves an entry or a branch of entries at a specified distinguished name
* to a position under a new parent.
@@ -531,8 +531,8 @@ public interface CoreSession
* @exception if there are failures while moving the entry/branch
*/
void move( Dn dn, Dn newParent, boolean ignoreReferral, LogChange log ) throws LdapException;
-
-
+
+
/**
* Move an entry by changing its superior.
*
@@ -540,8 +540,8 @@ public interface CoreSession
* @throws Exception if there are failures while moving the entry/branch
*/
void move( ModifyDnRequest modifyDnRequest ) throws LdapException;
-
-
+
+
/**
* Move an entry by changing its superior.
*
@@ -550,8 +550,8 @@ public interface CoreSession
* @throws Exception if there are failures while moving the entry/branch
*/
void move( ModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException;
-
-
+
+
/**
* Moves and renames (the relative distinguished name of) an entry (or a
* branch if the entry has children) at a specified distinguished name to
@@ -565,8 +565,8 @@ public interface CoreSession
* or branch
*/
void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn ) throws LdapException;
-
-
+
+
/**
* Moves and renames (the relative distinguished name of) an entry (or a
* branch if the entry has children) at a specified distinguished name to
@@ -581,8 +581,8 @@ public interface CoreSession
* or branch
*/
void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException;
-
-
+
+
/**
* Moves and renames (the relative distinguished name of) an entry (or a
* branch if the entry has children) at a specified distinguished name to
@@ -596,9 +596,10 @@ public interface CoreSession
* @exception if there are failures while moving and renaming the entry
* or branch
*/
- void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException;
-
-
+ void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral )
+ throws LdapException;
+
+
/**
* Moves and renames (the relative distinguished name of) an entry (or a
* branch if the entry has children) at a specified distinguished name to
@@ -613,9 +614,10 @@ public interface CoreSession
* @exception if there are failures while moving and renaming the entry
* or branch
*/
- void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException;
-
-
+ void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log )
+ throws LdapException;
+
+
/**
* Move and rename an entry. We change the Rdn and the superior.
*
@@ -624,8 +626,8 @@ public interface CoreSession
* or branch
*/
void moveAndRename( ModifyDnRequest modifyDnRequest ) throws LdapException;
-
-
+
+
/**
* Move and rename an entry. We change the Rdn and the superior.
*
@@ -635,8 +637,8 @@ public interface CoreSession
* or branch
*/
void moveAndRename( ModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException;
-
-
+
+
/**
* Renames an entry by changing it's relative distinguished name. This
* has the side effect of changing the distinguished name of all entries
@@ -650,8 +652,8 @@ public interface CoreSession
* @throws Exception if there are failures while renaming the entry
*/
void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn ) throws LdapException;
-
-
+
+
/**
* Renames an entry by changing it's relative distinguished name. This
* has the side effect of changing the distinguished name of all entries
@@ -666,8 +668,8 @@ public interface CoreSession
* @throws Exception if there are failures while renaming the entry
*/
void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException;
-
-
+
+
/**
* Renames an entry by changing it's relative distinguished name. This
* has the side effect of changing the distinguished name of all entries
@@ -682,8 +684,8 @@ public interface CoreSession
* @throws Exception if there are failures while renaming the entry
*/
void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException;
-
-
+
+
/**
* Renames an entry by changing it's relative distinguished name. This
* has the side effect of changing the distinguished name of all entries
@@ -699,8 +701,8 @@ public interface CoreSession
* @throws Exception if there are failures while renaming the entry
*/
void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException;
-
-
+
+
/**
* Rename an entry applying the ModifyDN request
*
@@ -708,8 +710,8 @@ public interface CoreSession
* @throws Exception if there are failures while renaming the entry
*/
void rename( ModifyDnRequest modifyDnRequest ) throws LdapException;
-
-
+
+
/**
* Rename an entry applying the ModifyDN request
*
@@ -718,8 +720,8 @@ public interface CoreSession
* @throws Exception if there are failures while renaming the entry
*/
void rename( ModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException;
-
-
+
+
/**
* An optimized search operation using one level search scope which
* returns all the children of an entry specified by distinguished name.
@@ -733,8 +735,8 @@ public interface CoreSession
*/
EntryFilteringCursor list( Dn dn, AliasDerefMode aliasDerefMode,
Set<AttributeTypeOptions> returningAttributes ) throws LdapException;
-
-
+
+
/**
* An optimized search operation using one level search scope which
* applies size and time limit constraints and returns all the children
@@ -752,8 +754,8 @@ public interface CoreSession
*/
EntryFilteringCursor list( Dn dn, AliasDerefMode aliasDerefMode,
Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException;
-
-
+
+
/**
* Searches the directory using a specified filter. The scope is defaulting
* to 'base'. The alias dereferencing default to 'always'. the returned attributes
@@ -764,8 +766,8 @@ public interface CoreSession
* @throws Exception if there are failures while listing children
*/
EntryFilteringCursor search( Dn dn, String filter ) throws LdapException;
-
-
+
+
/**
* Searches the directory using a specified filter. The scope is defaulting
* to 'base'. The alias dereferencing default to 'always'. the returned attributes
@@ -777,8 +779,8 @@ public interface CoreSession
* @throws Exception if there are failures while listing children
*/
EntryFilteringCursor search( Dn dn, String filter, boolean ignoreReferrals ) throws LdapException;
-
-
+
+
/**
* Searches the directory using a specified search scope and filter.
*
@@ -791,8 +793,8 @@ public interface CoreSession
*/
EntryFilteringCursor search( Dn dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode,
Set<AttributeTypeOptions> returningAttributes ) throws LdapException;
-
-
+
+
/**
* Searches the directory using a specified search scope and filter.
*
@@ -817,8 +819,8 @@ public interface CoreSession
* @throws LdapException If the operation failed
*/
void unbind() throws LdapException;
-
-
+
+
/**
* Unbind from the current LdapSession.
*
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java Tue Jan 24 14:10:56 2012
@@ -58,6 +58,7 @@ public interface DirectoryService extend
{
String JNDI_KEY = DirectoryService.class.getName();
+
/**
* Reverts the server's state to an earlier revision. Note that the revsion number
* still increases to revert back even though the state reverted to is the same.
@@ -101,6 +102,7 @@ public interface DirectoryService extend
void removePartition( Partition partition ) throws Exception;
+
/**
* @return The Directory Service SchemaManager
*/
@@ -189,11 +191,13 @@ public interface DirectoryService extend
**/
SubentryCache getSubentryCache();
+
/**
* @return Returns the subentry evaluator
*/
SubtreeEvaluator getEvaluator();
+
/**
* Gets a logical session to perform operations on this DirectoryService
* as the anonymous user. This bypasses authentication without
@@ -352,6 +356,7 @@ public interface DirectoryService extend
*/
void addLast( Interceptor interceptor ) throws LdapException;
+
/**
* Add an interceptor after a given interceptor in the interceptor list.
* @param interceptorName The interceptor name to find
@@ -566,6 +571,7 @@ public interface DirectoryService extend
*/
long getSyncPeriodMillis();
+
/**
* @return the cache service
*/
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java?rev=1235258&r1=1235257&r2=1235258&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/InstanceLayout.java Tue Jan 24 14:10:56 2012
@@ -75,24 +75,24 @@ public class InstanceLayout extends Abst
// Static final fields for system property names
private static final String LOG_DIR = "apacheds.log.dir";
private static final String RUN_DIR = "apacheds.run.dir";
-
+
/** Static directory names */
private static final String LOG_NAME = "log";
private static final String RUN_NAME = "run";
private static final String CONF_NAME = "conf";
private static final String PARTITIONS_NAME = "partitions";
-
+
/** Static file names */
private static final String LOG4J_PROPERTIES = "log4j.properties";
private static final String WRAPPER_CONF = "wrapper.conf";
private static final String CONFIG_LDIF = "config.ldif";
-
+
/** The Log directory */
private File logDir;
/** The Partitions directory */
private File partitionsDir;
-
+
/** The Run directory */
private File runDir;
@@ -137,7 +137,7 @@ public class InstanceLayout extends Abst
getLogDirectory(),
getPartitionsDirectory(),
getRunDirectory()
- };
+ };
setRequiredDirectories( requiredDirectories );
// The required files
@@ -145,8 +145,8 @@ public class InstanceLayout extends Abst
{
getWrapperConfigurationFile(),
getLogConfigurationFile() /*,
- getApacheDsConfigurationLdifFile() */// TODO re-activate this when possible.
- };
+ getApacheDsConfigurationLdifFile() */// TODO re-activate this when possible.
+ };
setRequiredFiles( requiredFiles );
}
@@ -162,7 +162,7 @@ public class InstanceLayout extends Abst
{
confDir = new File( getInstanceDirectory(), CONF_NAME );
}
-
+
return confDir;
}
@@ -189,14 +189,14 @@ public class InstanceLayout extends Abst
if ( systemLogDir != null )
{
- logDir = new File( systemLogDir );
+ logDir = new File( systemLogDir );
}
else
{
logDir = new File( getInstanceDirectory(), LOG_NAME );
}
}
-
+
return logDir;
}
@@ -221,7 +221,7 @@ public class InstanceLayout extends Abst
{
partitionsDir = new File( getInstanceDirectory(), PARTITIONS_NAME );
}
-
+
return partitionsDir;
}
@@ -248,14 +248,14 @@ public class InstanceLayout extends Abst
if ( systemRunDir != null )
{
- runDir = new File( systemRunDir );
+ runDir = new File( systemRunDir );
}
else
{
runDir = new File( getInstanceDirectory(), RUN_NAME );
}
}
-
+
return runDir;
}
@@ -311,15 +311,15 @@ public class InstanceLayout extends Abst
{
return new File( getConfDirectory(), CONFIG_LDIF );
}
-
-
+
+
public String toString()
{
return "Instance Layout: \n" +
- " Instance dir : " + getInstanceDirectory() + "\n" +
- " Instance conf dir : " + getConfDirectory() + "\n" +
- " Instance log dir : " + getLogDirectory() + "\n" +
- " Instance run dir : " + getRunDirectory() + "\n" +
- " Instance partitions dir : " + getPartitionsDirectory() + "\n";
+ " Instance dir : " + getInstanceDirectory() + "\n" +
+ " Instance conf dir : " + getConfDirectory() + "\n" +
+ " Instance log dir : " + getLogDirectory() + "\n" +
+ " Instance run dir : " + getRunDirectory() + "\n" +
+ " Instance partitions dir : " + getPartitionsDirectory() + "\n";
}
}