You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2011/03/13 17:58:32 UTC
svn commit: r1081151 [2/2] - in /directory:
apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/entry/
apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/
...
Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ComparatorRegistry.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ComparatorRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ComparatorRegistry.java Sun Mar 13 16:58:31 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.schema.AbstractLdapComparator;
+import org.apache.directory.shared.ldap.model.schema.LdapComparator;
/**
@@ -29,8 +29,7 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public interface ComparatorRegistry extends SchemaObjectRegistry<AbstractLdapComparator<?>>,
- Iterable<AbstractLdapComparator<?>>
+public interface ComparatorRegistry<E extends LdapComparator<?>> extends SchemaObjectRegistry<E>, Iterable<E>
{
/**
* Registers a new LdapComparator with this registry.
@@ -39,7 +38,7 @@ public interface ComparatorRegistry exte
* @throws LdapException if the LdapComparator is already registered or
* the registration operation is not supported
*/
- void register( AbstractLdapComparator<?> comparator ) throws LdapException;
+ void register( E comparator ) throws LdapException;
/**
@@ -49,7 +48,7 @@ public interface ComparatorRegistry exte
* @param numericOid the numeric identifier
* @throws LdapException if the numeric identifier is invalid
*/
- AbstractLdapComparator<?> unregister( String numericOid ) throws LdapException;
+ E unregister( String numericOid ) throws LdapException;
/**
@@ -64,5 +63,5 @@ public interface ComparatorRegistry exte
/**
* Copy the ComparatorRegistry
*/
- ComparatorRegistry copy();
+ ComparatorRegistry<E> copy();
}
Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java Sun Mar 13 16:58:31 2011
@@ -30,7 +30,7 @@ import java.util.Set;
import org.apache.directory.shared.ldap.model.exception.LdapException;
import org.apache.directory.shared.ldap.model.exception.LdapNoSuchAttributeException;
import org.apache.directory.shared.ldap.model.schema.AttributeType;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
import org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer;
import org.apache.directory.shared.ldap.model.schema.normalizers.OidNormalizer;
@@ -257,7 +257,7 @@ public class DefaultAttributeTypeRegistr
*/
public void addMappingFor( AttributeType attributeType ) throws LdapException
{
- MutableMatchingRuleImpl equality = attributeType.getEquality();
+ MatchingRule equality = attributeType.getEquality();
OidNormalizer oidNormalizer;
String oid = attributeType.getOid();
Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultComparatorRegistry.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultComparatorRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultComparatorRegistry.java Sun Mar 13 16:58:31 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.schema.AbstractLdapComparator;
+import org.apache.directory.shared.ldap.model.schema.MutableLdapComparator;
import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
import org.slf4j.Logger;
@@ -33,8 +33,8 @@ import org.slf4j.LoggerFactory;
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class DefaultComparatorRegistry extends DefaultSchemaObjectRegistry<AbstractLdapComparator<?>>
- implements ComparatorRegistry
+public class DefaultComparatorRegistry extends DefaultSchemaObjectRegistry<MutableLdapComparator<?>>
+ implements ComparatorRegistry<MutableLdapComparator<?>>
{
/** static class logger */
private static final Logger LOG = LoggerFactory.getLogger( DefaultComparatorRegistry.class );
@@ -48,7 +48,7 @@ public class DefaultComparatorRegistry e
*/
public DefaultComparatorRegistry()
{
- super( SchemaObjectType.COMPARATOR, new OidRegistry<AbstractLdapComparator<?>>() );
+ super( SchemaObjectType.COMPARATOR, new OidRegistry<MutableLdapComparator<?>>() );
}
@@ -64,7 +64,7 @@ public class DefaultComparatorRegistry e
// Loop on all the SchemaObjects stored and remove those associated
// with the give schemaName
- for ( AbstractLdapComparator<?> comparator : this )
+ for ( MutableLdapComparator<?> comparator : this )
{
if ( schemaName.equalsIgnoreCase( comparator.getSchemaName() ) )
{
@@ -115,7 +115,7 @@ public class DefaultComparatorRegistry e
sb.append( ", " );
}
- AbstractLdapComparator<?> comparator = byName.get( name );
+ MutableLdapComparator<?> comparator = byName.get( name );
String fqcn = comparator.getFqcn();
int lastDotPos = fqcn.lastIndexOf( '.' );
Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultMatchingRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultMatchingRuleRegistry.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultMatchingRuleRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultMatchingRuleRegistry.java Sun Mar 13 16:58:31 2011
@@ -20,7 +20,7 @@
package org.apache.directory.shared.ldap.model.schema.registries;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
@@ -29,15 +29,15 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class DefaultMatchingRuleRegistry extends DefaultSchemaObjectRegistry<MutableMatchingRuleImpl>
- implements MatchingRuleRegistry
+public class DefaultMatchingRuleRegistry extends DefaultSchemaObjectRegistry<MutableMatchingRule>
+ implements MatchingRuleRegistry<MutableMatchingRule>
{
/**
* Creates a new default MatchingRuleRegistry instance.
*/
public DefaultMatchingRuleRegistry()
{
- super( SchemaObjectType.MATCHING_RULE, new OidRegistry<MutableMatchingRuleImpl>() );
+ super( SchemaObjectType.MATCHING_RULE, new OidRegistry<MutableMatchingRule>() );
}
Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableComparatorRegistry.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableComparatorRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableComparatorRegistry.java Sun Mar 13 16:58:31 2011
@@ -26,7 +26,7 @@ import org.apache.directory.shared.i18n.
import org.apache.directory.shared.ldap.model.exception.LdapException;
import org.apache.directory.shared.ldap.model.exception.LdapUnwillingToPerformException;
import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.model.schema.AbstractLdapComparator;
+import org.apache.directory.shared.ldap.model.schema.LdapComparator;
import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
@@ -35,10 +35,10 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class ImmutableComparatorRegistry implements ComparatorRegistry
+public class ImmutableComparatorRegistry implements ComparatorRegistry<LdapComparator<?>>
{
/** The wrapped LdapComparator registry */
- ComparatorRegistry immutableComparatorRegistry;
+ ComparatorRegistry<LdapComparator<?>> immutableComparatorRegistry;
/**
@@ -46,7 +46,8 @@ public class ImmutableComparatorRegistry
*
* @param comparatorRegistry The wrapped LdapComparator registry
*/
- public ImmutableComparatorRegistry( ComparatorRegistry comparatorRegistry )
+ @SuppressWarnings("unchecked")
+ public ImmutableComparatorRegistry( @SuppressWarnings("rawtypes") ComparatorRegistry comparatorRegistry )
{
immutableComparatorRegistry = comparatorRegistry;
}
@@ -55,7 +56,7 @@ public class ImmutableComparatorRegistry
/**
* {@inheritDoc}
*/
- public void register( AbstractLdapComparator<?> comparator ) throws LdapException
+ public void register( LdapComparator<?> comparator ) throws LdapException
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04276 ) );
}
@@ -64,7 +65,7 @@ public class ImmutableComparatorRegistry
/**
* {@inheritDoc}
*/
- public AbstractLdapComparator<?> unregister( String numericOid ) throws LdapException
+ public LdapComparator<?> unregister( String numericOid ) throws LdapException
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04276 ) );
}
@@ -136,7 +137,7 @@ public class ImmutableComparatorRegistry
/**
* {@inheritDoc}
*/
- public Iterator<AbstractLdapComparator<?>> iterator()
+ public Iterator<LdapComparator<?>> iterator()
{
return immutableComparatorRegistry.iterator();
}
@@ -145,7 +146,7 @@ public class ImmutableComparatorRegistry
/**
* {@inheritDoc}
*/
- public AbstractLdapComparator<?> lookup( String oid ) throws LdapException
+ public LdapComparator<?> lookup( String oid ) throws LdapException
{
return immutableComparatorRegistry.lookup( oid );
}
@@ -172,7 +173,7 @@ public class ImmutableComparatorRegistry
/**
* {@inheritDoc}
*/
- public AbstractLdapComparator<?> get( String oid )
+ public LdapComparator<?> get( String oid )
{
return immutableComparatorRegistry.get( oid );
}
@@ -190,7 +191,7 @@ public class ImmutableComparatorRegistry
/**
* {@inheritDoc}
*/
- public AbstractLdapComparator<?> unregister( AbstractLdapComparator<?> schemaObject ) throws LdapException
+ public LdapComparator<?> unregister( LdapComparator<?> schemaObject ) throws LdapException
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04276 ) );
}
Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableMatchingRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableMatchingRuleRegistry.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableMatchingRuleRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableMatchingRuleRegistry.java Sun Mar 13 16:58:31 2011
@@ -27,7 +27,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.exception.LdapUnwillingToPerformException;
import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.model.schema.MatchingRule;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
@@ -36,10 +35,10 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class ImmutableMatchingRuleRegistry implements MatchingRuleRegistry
+public class ImmutableMatchingRuleRegistry implements MatchingRuleRegistry<MatchingRule>
{
/** The wrapped MatchingRule registry */
- MatchingRuleRegistry immutableMatchingRuleRegistry;
+ MatchingRuleRegistry<MatchingRule> immutableMatchingRuleRegistry;
/**
@@ -47,7 +46,8 @@ public class ImmutableMatchingRuleRegist
*
* @param matchingRuleRegistry The wrapped MatchingRule registry
*/
- public ImmutableMatchingRuleRegistry( MatchingRuleRegistry matchingRuleRegistry )
+ @SuppressWarnings("unchecked")
+ public ImmutableMatchingRuleRegistry( @SuppressWarnings("rawtypes") MatchingRuleRegistry matchingRuleRegistry )
{
immutableMatchingRuleRegistry = matchingRuleRegistry;
}
@@ -110,7 +110,7 @@ public class ImmutableMatchingRuleRegist
/**
* {@inheritDoc}
*/
- public Iterator<MutableMatchingRuleImpl> iterator()
+ public Iterator<MatchingRule> iterator()
{
return immutableMatchingRuleRegistry.iterator();
}
@@ -119,7 +119,7 @@ public class ImmutableMatchingRuleRegist
/**
* {@inheritDoc}
*/
- public MutableMatchingRuleImpl lookup( String oid ) throws LdapException
+ public MatchingRule lookup( String oid ) throws LdapException
{
return immutableMatchingRuleRegistry.lookup( oid );
}
@@ -137,7 +137,7 @@ public class ImmutableMatchingRuleRegist
/**
* {@inheritDoc}
*/
- public void register( MutableMatchingRuleImpl schemaObject ) throws LdapException
+ public void register( MatchingRule schemaObject ) throws LdapException
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04280 ) );
}
@@ -155,7 +155,7 @@ public class ImmutableMatchingRuleRegist
/**
* {@inheritDoc}
*/
- public MutableMatchingRuleImpl unregister( String numericOid ) throws LdapException
+ public MatchingRule unregister( String numericOid ) throws LdapException
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04280 ) );
}
@@ -191,7 +191,7 @@ public class ImmutableMatchingRuleRegist
/**
* {@inheritDoc}
*/
- public MutableMatchingRuleImpl unregister( MutableMatchingRuleImpl schemaObject ) throws LdapException
+ public MatchingRule unregister( MatchingRule schemaObject ) throws LdapException
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04280 ) );
}
Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableSyntaxCheckerRegistry.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableSyntaxCheckerRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/ImmutableSyntaxCheckerRegistry.java Sun Mar 13 16:58:31 2011
@@ -35,10 +35,10 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class ImmutableSyntaxCheckerRegistry<R extends SyntaxChecker> implements SyntaxCheckerRegistry<R>
+public class ImmutableSyntaxCheckerRegistry implements SyntaxCheckerRegistry<SyntaxChecker>
{
/** The wrapped SyntaxChecker registry */
- SyntaxCheckerRegistry<R> immutableSyntaxCheckerRegistry;
+ SyntaxCheckerRegistry<SyntaxChecker> immutableSyntaxCheckerRegistry;
/**
@@ -46,7 +46,8 @@ public class ImmutableSyntaxCheckerRegis
*
* @param syntaxCheckerRegistry The wrapped SyntaxChecker registry
*/
- public ImmutableSyntaxCheckerRegistry( SyntaxCheckerRegistry<R> syntaxCheckerRegistry )
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public ImmutableSyntaxCheckerRegistry( SyntaxCheckerRegistry syntaxCheckerRegistry )
{
immutableSyntaxCheckerRegistry = syntaxCheckerRegistry;
}
@@ -64,7 +65,7 @@ public class ImmutableSyntaxCheckerRegis
/**
* {@inheritDoc}
*/
- public R unregister( String numericOid ) throws LdapException
+ public SyntaxChecker unregister( String numericOid ) throws LdapException
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
}
@@ -82,9 +83,9 @@ public class ImmutableSyntaxCheckerRegis
/**
* {@inheritDoc}
*/
- public ImmutableSyntaxCheckerRegistry<R> copy()
+ public ImmutableSyntaxCheckerRegistry copy()
{
- return new ImmutableSyntaxCheckerRegistry<R>( immutableSyntaxCheckerRegistry );
+ return new ImmutableSyntaxCheckerRegistry( immutableSyntaxCheckerRegistry );
}
@@ -136,7 +137,7 @@ public class ImmutableSyntaxCheckerRegis
/**
* {@inheritDoc}
*/
- public Iterator<R> iterator()
+ public Iterator<SyntaxChecker> iterator()
{
return immutableSyntaxCheckerRegistry.iterator();
}
@@ -145,7 +146,7 @@ public class ImmutableSyntaxCheckerRegis
/**
* {@inheritDoc}
*/
- public R lookup( String oid ) throws LdapException
+ public SyntaxChecker lookup( String oid ) throws LdapException
{
return immutableSyntaxCheckerRegistry.lookup( oid );
}
@@ -172,7 +173,7 @@ public class ImmutableSyntaxCheckerRegis
/**
* {@inheritDoc}
*/
- public R get( String oid )
+ public SyntaxChecker get( String oid )
{
return immutableSyntaxCheckerRegistry.get( oid );
}
@@ -190,7 +191,7 @@ public class ImmutableSyntaxCheckerRegis
/**
* {@inheritDoc}
*/
- public R unregister( SyntaxChecker schemaObject ) throws LdapException
+ public SyntaxChecker unregister( SyntaxChecker schemaObject ) throws LdapException
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.NO_SUCH_OPERATION, I18n.err( I18n.ERR_04285 ) );
}
Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/MatchingRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/MatchingRuleRegistry.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/MatchingRuleRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/MatchingRuleRegistry.java Sun Mar 13 16:58:31 2011
@@ -20,7 +20,7 @@
package org.apache.directory.shared.ldap.model.schema.registries;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
/**
@@ -28,11 +28,10 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public interface MatchingRuleRegistry extends SchemaObjectRegistry<MutableMatchingRuleImpl>,
- Iterable<MutableMatchingRuleImpl>
+public interface MatchingRuleRegistry<E extends MatchingRule> extends SchemaObjectRegistry<E>, Iterable<E>
{
/**
* Copy the MatchingRuleRegistry
*/
- MatchingRuleRegistry copy();
+ MatchingRuleRegistry<E> copy();
}
Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java Sun Mar 13 16:58:31 2011
@@ -42,9 +42,11 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.schema.DITStructureRule;
import org.apache.directory.shared.ldap.model.schema.AbstractLdapComparator;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.model.schema.MutableLdapComparator;
import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax;
import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl;
import org.apache.directory.shared.ldap.model.schema.MutableLoadableSchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse;
import org.apache.directory.shared.ldap.model.schema.MutableNormalizer;
@@ -86,7 +88,7 @@ public class Registries implements Schem
protected ObjectClassRegistry objectClassRegistry;
/** The LdapSyntax registry */
- protected ComparatorRegistry comparatorRegistry;
+ protected ComparatorRegistry<MutableLdapComparator<?>> comparatorRegistry;
/** The DitContentRule registry */
protected DITContentRuleRegistry ditContentRuleRegistry;
@@ -95,7 +97,7 @@ public class Registries implements Schem
protected DITStructureRuleRegistry ditStructureRuleRegistry;
/** The MatchingRule registry */
- protected MatchingRuleRegistry matchingRuleRegistry;
+ protected MatchingRuleRegistry<MutableMatchingRule> matchingRuleRegistry;
/** The MatchingRuleUse registry */
protected MatchingRuleUseRegistry matchingRuleUseRegistry;
@@ -140,11 +142,6 @@ public class Registries implements Schem
*/
protected Map<SchemaObjectWrapper, Set<SchemaObjectWrapper>> using;
- /** A reference on the schema Manager */
- @SuppressWarnings({ "PMD.UnusedPrivateField", "unused" })
- // False positive
- private SchemaManager schemaManager;
-
/**
* Creates a new instance of Registries.
@@ -171,7 +168,6 @@ public class Registries implements Schem
isRelaxed = STRICT;
disabledAccepted = false;
- this.schemaManager = schemaManager;
}
@@ -187,7 +183,7 @@ public class Registries implements Schem
/**
* @return The Comparator registry
*/
- public ComparatorRegistry getComparatorRegistry()
+ public ComparatorRegistry<MutableLdapComparator<?>> getComparatorRegistry()
{
return comparatorRegistry;
}
@@ -214,7 +210,7 @@ public class Registries implements Schem
/**
* @return The MatchingRule registry
*/
- public MatchingRuleRegistry getMatchingRuleRegistry()
+ public MatchingRuleRegistry<MutableMatchingRule> getMatchingRuleRegistry()
{
return matchingRuleRegistry;
}
@@ -290,8 +286,6 @@ public class Registries implements Schem
* @param name The name we are looking at
* @return The associated OID
*/
- // This will suppress PMD.EmptyCatchBlock warnings in this method
- @SuppressWarnings("PMD.EmptyCatchBlock")
public String getOid( String name )
{
// we have many possible Registries to look at.
@@ -343,7 +337,7 @@ public class Registries implements Schem
// MatchingRule
try
{
- MutableMatchingRuleImpl matchingRule = matchingRuleRegistry.lookup( name );
+ MutableMatchingRule matchingRule = matchingRuleRegistry.lookup( name );
if ( matchingRule != null )
{
@@ -479,7 +473,7 @@ public class Registries implements Schem
}
// Check the Comparators
- for ( AbstractLdapComparator<?> comparator : comparatorRegistry )
+ for ( MutableLdapComparator<?> comparator : comparatorRegistry )
{
resolve( comparator, errors );
}
@@ -499,7 +493,7 @@ public class Registries implements Schem
// Step 3 :
// Check the matchingRules
- for ( MutableMatchingRuleImpl matchingRule : matchingRuleRegistry )
+ for ( MutableMatchingRule matchingRule : matchingRuleRegistry )
{
resolve( matchingRule, errors );
}
@@ -665,7 +659,7 @@ public class Registries implements Schem
*/
private void buildComparatorReferences( List<Throwable> errors )
{
- for ( AbstractLdapComparator<?> comparator : comparatorRegistry )
+ for ( MutableLdapComparator<?> comparator : comparatorRegistry )
{
buildReference( errors, comparator );
}
@@ -675,8 +669,6 @@ public class Registries implements Schem
/**
* Build the DitContentRule references
*/
- // Remove me when TODO is implemented
- @SuppressWarnings("PMD.UnusedFormalParameter")
private void buildDitContentRuleReferences( List<Throwable> errors )
{
for ( @SuppressWarnings("unused") DITContentRule ditContentRule : ditContentRuleRegistry )
@@ -689,8 +681,6 @@ public class Registries implements Schem
/**
* Build the DitStructureRule references
*/
- // Remove me when TODO is implemented
- @SuppressWarnings("PMD.UnusedFormalParameter")
private void buildDitStructureRuleReferences( List<Throwable> errors )
{
for ( @SuppressWarnings("unused") DITStructureRule ditStructureRule : ditStructureRuleRegistry )
@@ -772,7 +762,7 @@ public class Registries implements Schem
*/
private void buildMatchingRuleReferences( List<Throwable> errors )
{
- for ( MutableMatchingRuleImpl matchingRule : matchingRuleRegistry )
+ for ( MutableMatchingRule matchingRule : matchingRuleRegistry )
{
buildReference( errors, matchingRule );
}
@@ -794,8 +784,6 @@ public class Registries implements Schem
/**
* Build the NameForm references
*/
- // Remove me when TODO is implemented
- @SuppressWarnings("PMD.UnusedFormalParameter")
private void buildNameFormReferences( List<Throwable> errors )
{
for ( @SuppressWarnings("unused") NameForm nameFormRule : nameFormRegistry )
@@ -958,7 +946,7 @@ public class Registries implements Schem
* @param comparator the LdapComparator
* @param errors the list of errors to add exceptions to
*/
- private void resolve( AbstractLdapComparator<?> comparator, List<Throwable> errors )
+ private void resolve( MutableLdapComparator<?> comparator, List<Throwable> errors )
{
// This is currently doing nothing.
try
@@ -996,7 +984,7 @@ public class Registries implements Schem
* Check if the Comparator, Normalizer and the syntax are
* existing for a matchingRule.
*/
- private void resolve( MutableMatchingRuleImpl matchingRule, List<Throwable> errors )
+ private void resolve( MutableMatchingRule matchingRule, List<Throwable> errors )
{
// Process the Syntax. It can't be null
String syntaxOid = matchingRule.getSyntaxOid();
@@ -1038,7 +1026,7 @@ public class Registries implements Schem
}
// Process the Comparator
- AbstractLdapComparator<?> comparator = matchingRule.getLdapComparator();
+ MutableLdapComparator<?> comparator = matchingRule.getLdapComparator();
if ( comparator == null )
{
@@ -1267,8 +1255,6 @@ public class Registries implements Schem
}
- // This will suppress PMD.EmptyCatchBlock warnings in this method
- @SuppressWarnings("PMD.EmptyCatchBlock")
private void resolveRecursive( ObjectClass objectClass, Set<String> processed, List<Throwable> errors )
{
// Process the Superiors, if any
@@ -1378,9 +1364,6 @@ public class Registries implements Schem
// Build the SchemaObject references
buildReference( errors, schemaObject );
- // Lock the SchemaObject
- schemaObject.lock();
-
if ( errors.isEmpty() )
{
// Check the registries now
@@ -1541,8 +1524,6 @@ public class Registries implements Schem
/**
* Register the given SchemaObject into the associated Registry
*/
- // Remove SuppressWarnings when TODO is fixed
- @SuppressWarnings("PMD.EmptyIfStmt")
private void register( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
{
LOG.debug( "Registering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
@@ -1760,9 +1741,6 @@ public class Registries implements Schem
* @param schemaObject The SchemaObject we want to deregister
* @throws LdapException If the removal failed
*/
- // Remove me when TODO is implemented
- @SuppressWarnings(
- { "PMD.UnusedFormalParameter", "PMD.EmptyIfStmt" })
private MutableSchemaObject unregister( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
{
LOG.debug( "Unregistering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
@@ -2276,7 +2254,7 @@ public class Registries implements Schem
// Check the MatchingRules : check for a Normalizer, a Comparator and a Syntax
LOG.debug( "Checking MatchingRules..." );
- for ( MutableMatchingRuleImpl matchingRule : matchingRuleRegistry )
+ for ( MutableMatchingRule matchingRule : matchingRuleRegistry )
{
// Check that each MatchingRule has a Normalizer
if ( matchingRule.getNormalizer() == null )
@@ -2524,8 +2502,6 @@ public class Registries implements Schem
* - first clone the SchemaObjetc registries
* - second restore the relation between them
*/
- // False positive
- @SuppressWarnings("PMD.EmptyCatchBlock")
public Registries clone() throws CloneNotSupportedException
{
// First clone the structure
@@ -2563,7 +2539,7 @@ public class Registries implements Schem
clone.globalOidRegistry.put( ditStructureRule );
}
- for ( MutableMatchingRuleImpl matchingRule : clone.matchingRuleRegistry )
+ for ( MutableMatchingRule matchingRule : clone.matchingRuleRegistry )
{
clone.globalOidRegistry.put( matchingRule );
}
Modified: directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java (original)
+++ directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java Sun Mar 13 16:58:31 2011
@@ -44,10 +44,15 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.EntityFactory;
import org.apache.directory.shared.ldap.model.schema.AbstractLdapComparator;
+import org.apache.directory.shared.ldap.model.schema.LdapComparator;
+import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableLdapComparator;
import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax;
import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl;
import org.apache.directory.shared.ldap.model.schema.LoadableSchemaObject;
import org.apache.directory.shared.ldap.model.schema.MutableLoadableSchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.shared.ldap.model.schema.MutableNormalizer;
import org.apache.directory.shared.ldap.model.schema.AbstractNormalizer;
@@ -1423,7 +1428,7 @@ public class DefaultSchemaManager implem
/**
* {@inheritDoc}
*/
- public ComparatorRegistry getComparatorRegistry()
+ public ComparatorRegistry<LdapComparator<?>> getComparatorRegistry()
{
return new ImmutableComparatorRegistry( registries.getComparatorRegistry() );
}
@@ -1450,7 +1455,7 @@ public class DefaultSchemaManager implem
/**
* {@inheritDoc}
*/
- public MatchingRuleRegistry getMatchingRuleRegistry()
+ public MatchingRuleRegistry<MatchingRule> getMatchingRuleRegistry()
{
return new ImmutableMatchingRuleRegistry( registries.getMatchingRuleRegistry() );
}
@@ -1495,7 +1500,7 @@ public class DefaultSchemaManager implem
/**
* {@inheritDoc}
*/
- public LdapSyntaxRegistry getLdapSyntaxRegistry()
+ public LdapSyntaxRegistry<LdapSyntax> getLdapSyntaxRegistry()
{
return new ImmutableLdapSyntaxRegistry( registries.getLdapSyntaxRegistry() );
}
@@ -1538,7 +1543,7 @@ public class DefaultSchemaManager implem
/**
* {@inheritDoc}
*/
- public AbstractLdapComparator<?> lookupComparatorRegistry( String oid ) throws LdapException
+ public MutableLdapComparator<?> lookupComparatorRegistry( String oid ) throws LdapException
{
return registries.getComparatorRegistry().lookup( oid );
}
@@ -1547,7 +1552,7 @@ public class DefaultSchemaManager implem
/**
* {@inheritDoc}
*/
- public MutableMatchingRuleImpl lookupMatchingRuleRegistry( String oid ) throws LdapException
+ public MutableMatchingRule lookupMatchingRuleRegistry( String oid ) throws LdapException
{
return registries.getMatchingRuleRegistry().lookup( Strings.toLowerCase( oid ).trim() );
}
Modified: directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/MatchingRuleTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/MatchingRuleTest.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/MatchingRuleTest.java (original)
+++ directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/MatchingRuleTest.java Sun Mar 13 16:58:31 2011
@@ -32,12 +32,10 @@ import org.apache.commons.io.FileUtils;
import com.mycila.junit.concurrent.Concurrency;
import com.mycila.junit.concurrent.ConcurrentJunitRunner;
import org.apache.directory.shared.ldap.model.schema.AttributeType;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.LdapComparator;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.SchemaManager;
import org.apache.directory.shared.ldap.model.schema.comparators.*;
-import org.apache.directory.shared.ldap.model.schema.comparators.GeneralizedTimeComparator;
-import org.apache.directory.shared.ldap.model.schema.comparators.NumericStringComparator;
-import org.apache.directory.shared.ldap.model.schema.comparators.TelephoneNumberComparator;
import org.apache.directory.shared.ldap.model.schema.normalizers.GeneralizedTimeNormalizer;
import org.apache.directory.shared.ldap.model.schema.normalizers.NumericNormalizer;
import org.apache.directory.shared.ldap.model.schema.normalizers.TelephoneNumberNormalizer;
@@ -111,19 +109,23 @@ public class MatchingRuleTest
@Test
public void testTelephoneNumberMatch() throws Exception
{
+ LdapComparator<Object> comparator;
+
// matching rule: telephoneNumberMatch
- MutableMatchingRuleImpl mr1 = schemaManager.lookupMatchingRuleRegistry( "telephoneNumberMatch" );
+ MatchingRule mr1 = schemaManager.lookupMatchingRuleRegistry( "telephoneNumberMatch" );
assertEquals( TelephoneNumberNormalizer.class.getName(), mr1.getNormalizer().getClass().getName() );
assertEquals( "+1234567890", mr1.getNormalizer().normalize( " +1 234-567 890 " ) );
assertEquals( TelephoneNumberComparator.class.getName(), mr1.getLdapComparator().getClass().getName() );
- assertEquals( 0, mr1.getLdapComparator().compare( " +1 234-567 890 ", "+1234567890" ) );
+ comparator = mr1.getLdapComparator();
+ assertEquals( 0, comparator.compare( " +1 234-567 890 ", "+1234567890" ) );
// matching rule: telephoneNumberSubstringsMatch
- MutableMatchingRuleImpl mr2 = schemaManager.lookupMatchingRuleRegistry( "telephoneNumberSubstringsMatch" );
+ MatchingRule mr2 = schemaManager.lookupMatchingRuleRegistry( "telephoneNumberSubstringsMatch" );
assertEquals( TelephoneNumberNormalizer.class.getName(), mr2.getNormalizer().getClass().getName() );
assertEquals( "+1234567890", mr2.getNormalizer().normalize( " +1 234-567 890 " ) );
assertEquals( TelephoneNumberComparator.class.getName(), mr2.getLdapComparator().getClass().getName() );
- assertEquals( 0, mr2.getLdapComparator().compare( " +1 234-567 890 ", "+1234567890" ) );
+ comparator = mr2.getLdapComparator();
+ assertEquals( 0, comparator.compare( " +1 234-567 890 ", "+1234567890" ) );
// test a real attribute: telephoneNumber
AttributeType at = schemaManager.lookupAttributeTypeRegistry( "telephoneNumber" );
@@ -132,7 +134,8 @@ public class MatchingRuleTest
assertEquals( "+1234567890", at.getEquality().getNormalizer().normalize( " +1 234-567 890 " ) );
assertEquals( TelephoneNumberComparator.class.getName(), at.getEquality().getLdapComparator().getClass()
.getName() );
- assertEquals( 0, at.getEquality().getLdapComparator().compare( " +1 234-567 890 ", "+1234567890" ) );
+ comparator = at.getEquality().getLdapComparator();
+ assertEquals( 0, comparator.compare( " +1 234-567 890 ", "+1234567890" ) );
assertNotNull( at.getSubstring() );
assertEquals( TelephoneNumberNormalizer.class.getName(), at.getEquality().getNormalizer().getClass().getName() );
assertEquals( "+1234567890", at.getSubstring().getNormalizer().normalize( " +1 234-567 890 " ) );
@@ -143,19 +146,23 @@ public class MatchingRuleTest
@Test
public void testIntegerMatch() throws Exception
{
- MutableMatchingRuleImpl mr1 = schemaManager.lookupMatchingRuleRegistry( "integerMatch" );
+ LdapComparator<Object> comparator;
+
+ MatchingRule mr1 = schemaManager.lookupMatchingRuleRegistry( "integerMatch" );
assertEquals( NumericNormalizer.class.getName(), mr1.getNormalizer().getClass().getName() );
assertEquals( "1234567890", mr1.getNormalizer().normalize( " 1 234 567 890 " ) );
//assertEquals( IntegerComparator.class.getName(), mr1.getLdapComparator().getClass().getName() );
//assertEquals( 0, mr1.getLdapComparator().compare( " 1 234 567 890 ", "1234567890" ) );
- MutableMatchingRuleImpl mr2 = schemaManager.lookupMatchingRuleRegistry( "integerOrderingMatch" );
+ MatchingRule mr2 = schemaManager.lookupMatchingRuleRegistry( "integerOrderingMatch" );
assertEquals( NumericNormalizer.class.getName(), mr2.getNormalizer().getClass().getName() );
assertEquals( "1234567890", mr2.getNormalizer().normalize( " 1 234 567 890 " ) );
assertEquals( IntegerComparator.class.getName(), mr2.getLdapComparator().getClass().getName() );
- assertEquals( 0, mr2.getLdapComparator().compare( 1234567890L, 1234567890L ) );
- assertTrue( mr2.getLdapComparator().compare( 123L, 234L ) < 0 );
- assertTrue( mr2.getLdapComparator().compare( 1234L, 234L ) > 0 );
+
+ comparator = mr2.getLdapComparator();
+ assertEquals( 0, comparator.compare( 1234567890L, 1234567890L ) );
+ assertTrue( comparator.compare( 123L, 234L ) < 0 );
+ assertTrue( comparator.compare( 1234L, 234L ) > 0 );
// test a real attribute type: uidNumber
AttributeType at = schemaManager.lookupAttributeTypeRegistry( "uidNumber" );
@@ -171,32 +178,40 @@ public class MatchingRuleTest
@Test
public void testNumericStringMatch() throws Exception
{
- MutableMatchingRuleImpl mr1 = schemaManager.lookupMatchingRuleRegistry( "numericStringMatch" );
+ LdapComparator<Object> comparator;
+
+ MatchingRule mr1 = schemaManager.lookupMatchingRuleRegistry( "numericStringMatch" );
assertEquals( NumericNormalizer.class.getName(), mr1.getNormalizer().getClass().getName() );
assertEquals( "1234567890", mr1.getNormalizer().normalize( " 1 234 567 890 " ) );
assertEquals( NumericStringComparator.class.getName(), mr1.getLdapComparator().getClass().getName() );
- assertEquals( 0, mr1.getLdapComparator().compare( " 1 234 567 890 ", "1234567890" ) );
+ comparator = mr1.getLdapComparator();
+ assertEquals( 0, comparator.compare( " 1 234 567 890 ", "1234567890" ) );
- MutableMatchingRuleImpl mr2 = schemaManager.lookupMatchingRuleRegistry( "numericStringSubstringsMatch" );
+ MatchingRule mr2 = schemaManager.lookupMatchingRuleRegistry( "numericStringSubstringsMatch" );
+ comparator = mr2.getLdapComparator();
assertEquals( NumericNormalizer.class.getName(), mr2.getNormalizer().getClass().getName() );
assertEquals( "1234567890", mr2.getNormalizer().normalize( " 1 234 567 890 " ) );
assertEquals( NumericStringComparator.class.getName(), mr2.getLdapComparator().getClass().getName() );
- assertEquals( 0, mr2.getLdapComparator().compare( " 1 234 567 890 ", "1234567890" ) );
+ assertEquals( 0, comparator.compare( " 1 234 567 890 ", "1234567890" ) );
- MutableMatchingRuleImpl mr3 = schemaManager.lookupMatchingRuleRegistry( "numericStringOrderingMatch" );
+ MatchingRule mr3 = schemaManager.lookupMatchingRuleRegistry( "numericStringOrderingMatch" );
assertEquals( NumericNormalizer.class.getName(), mr3.getNormalizer().getClass().getName() );
assertEquals( "1234567890", mr3.getNormalizer().normalize( " 1 234 567 890 " ) );
assertEquals( NumericStringComparator.class.getName(), mr3.getLdapComparator().getClass().getName() );
- assertEquals( 0, mr3.getLdapComparator().compare( " 1 234 567 890 ", "1234567890" ) );
- assertTrue( mr3.getLdapComparator().compare( " 1 2 3 ", " 2 3 4" ) < 0 );
- assertTrue( mr3.getLdapComparator().compare( " 1 2 3 4 ", " 2 3 4" ) < 0 );
+
+ comparator = mr2.getLdapComparator();
+ assertEquals( 0, comparator.compare( " 1 234 567 890 ", "1234567890" ) );
+ assertTrue( comparator.compare( " 1 2 3 ", " 2 3 4" ) < 0 );
+ assertTrue( comparator.compare( " 1 2 3 4 ", " 2 3 4" ) < 0 );
}
@Test
public void testGeneralizedTimeStringMatch() throws Exception
{
- MutableMatchingRuleImpl mr1 = schemaManager.lookupMatchingRuleRegistry( "generalizedTimeMatch" );
+ LdapComparator<Object> c;
+
+ MatchingRule mr1 = schemaManager.lookupMatchingRuleRegistry( "generalizedTimeMatch" );
assertEquals( GeneralizedTimeNormalizer.class.getName(), mr1.getNormalizer().getClass().getName() );
String normalized = mr1.getNormalizer().normalize( "2010031415Z" );
@@ -206,12 +221,13 @@ public class MatchingRuleTest
assertEquals( GeneralizedTimeComparator.class.getName(), mr1.getLdapComparator().getClass().getName() );
// Deal with +HH:30 and +HH:45 TZ
- int compare1 = mr1.getLdapComparator().compare( "2010031415Z", "20100314150000.000+0000" );
- int compare2 = mr1.getLdapComparator().compare( "2010031415Z", "20100314153000.000+0000" );
- int compare3 = mr1.getLdapComparator().compare( "2010031415Z", "20100314154500.000+0000" );
+ c = mr1.getLdapComparator();
+ int compare1 = c.compare( "2010031415Z", "20100314150000.000+0000" );
+ int compare2 = c.compare( "2010031415Z", "20100314153000.000+0000" );
+ int compare3 = c.compare( "2010031415Z", "20100314154500.000+0000" );
assertTrue( ( compare1 == 0 ) || ( compare2 == 0 ) || ( compare3 == 0 ) );
- MutableMatchingRuleImpl mr2 = schemaManager.lookupMatchingRuleRegistry( "generalizedTimeOrderingMatch" );
+ MatchingRule mr2 = schemaManager.lookupMatchingRuleRegistry( "generalizedTimeOrderingMatch" );
assertEquals( GeneralizedTimeNormalizer.class.getName(), mr2.getNormalizer().getClass().getName() );
normalized = mr2.getNormalizer().normalize( "2010031415Z" );
assertTrue( "20100314150000.000Z".equals( normalized ) || "20100314153000.000Z".equals( normalized )
@@ -220,11 +236,12 @@ public class MatchingRuleTest
assertEquals( GeneralizedTimeComparator.class.getName(), mr2.getLdapComparator().getClass().getName() );
// Deal with +HH:30 and +HH:45 TZ
- compare1 = mr2.getLdapComparator().compare( "2010031415Z", "20100314150000.000+0000" );
- compare2 = mr2.getLdapComparator().compare( "2010031415Z", "20100314153000.000+0000" );
- compare3 = mr2.getLdapComparator().compare( "2010031415Z", "20100314154500.000+0000" );
+ c = mr2.getLdapComparator();
+ compare1 = c.compare( "2010031415Z", "20100314150000.000+0000" );
+ compare2 = c.compare( "2010031415Z", "20100314153000.000+0000" );
+ compare3 = c.compare( "2010031415Z", "20100314154500.000+0000" );
assertTrue( ( compare1 == 0 ) || ( compare2 == 0 ) || ( compare3 == 0 ) );
- assertTrue( mr2.getLdapComparator().compare( "2010031415Z", "2010031414Z" ) > 0 );
- assertTrue( mr2.getLdapComparator().compare( "2010031415Z", "2010031416Z" ) < 0 );
+ assertTrue( c.compare( "2010031415Z", "2010031414Z" ) > 0 );
+ assertTrue( c.compare( "2010031415Z", "2010031416Z" ) < 0 );
}
}
Modified: directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java (original)
+++ directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java Sun Mar 13 16:58:31 2011
@@ -39,9 +39,12 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.exception.LdapSchemaException;
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.AbstractLdapComparator;
+import org.apache.directory.shared.ldap.model.schema.LdapComparator;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax;
import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl;
+import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.shared.ldap.model.schema.MutableNormalizer;
import org.apache.directory.shared.ldap.model.schema.AbstractNormalizer;
@@ -153,7 +156,7 @@ public class SchemaManagerAddTest
{
try
{
- MutableMatchingRuleImpl matchingRule = schemaManager.lookupMatchingRuleRegistry( oid );
+ MatchingRule matchingRule = schemaManager.lookupMatchingRuleRegistry( oid );
return matchingRule != null;
}
@@ -842,7 +845,7 @@ public class SchemaManagerAddTest
assertEquals( ctrSize + 1, schemaManager.getComparatorRegistry().size() );
assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() );
- AbstractLdapComparator<?> added = schemaManager.lookupComparatorRegistry( oid );
+ LdapComparator<?> added = schemaManager.lookupComparatorRegistry( oid );
assertNotNull( added );
assertEquals( lc.getClass().getName(), added.getFqcn() );
@@ -861,7 +864,7 @@ public class SchemaManagerAddTest
assertTrue( schemaManager.add( bc ) );
- AbstractLdapComparator<?> added = schemaManager.lookupComparatorRegistry( oid );
+ LdapComparator<?> added = schemaManager.lookupComparatorRegistry( oid );
assertNotNull( added );
assertEquals( bc.getClass().getName(), added.getFqcn() );
@@ -958,7 +961,7 @@ public class SchemaManagerAddTest
assertTrue( isMRPresent( schemaManager, "1.1.0" ) );
// The C and N must have default values
- MutableMatchingRuleImpl added = schemaManager.lookupMatchingRuleRegistry( "1.1.0" );
+ MatchingRule added = schemaManager.lookupMatchingRuleRegistry( "1.1.0" );
assertEquals( NoOpNormalizer.class.getName(), added.getNormalizer().getClass().getName() );
assertEquals( ComparableComparator.class.getName(), added.getLdapComparator().getClass().getName() );
@@ -1020,7 +1023,7 @@ public class SchemaManagerAddTest
// Check that the existing MR has not been replaced
assertTrue( isMRPresent( schemaManager, "2.5.13.0" ) );
- MutableMatchingRuleImpl existing = schemaManager.lookupMatchingRuleRegistry( "2.5.13.0" );
+ MutableMatchingRule existing = schemaManager.lookupMatchingRuleRegistry( "2.5.13.0" );
assertEquals( "objectIdentifierMatch", existing.getName() );
@@ -1039,7 +1042,7 @@ public class SchemaManagerAddTest
int mrrSize = schemaManager.getMatchingRuleRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableMatchingRuleImpl matchingRule = new MutableMatchingRuleImpl( "1.1.0" );
+ MutableMatchingRule matchingRule = new MutableMatchingRuleImpl( "1.1.0" );
matchingRule.setNames( "Test", "objectIdentifierMatch" );
matchingRule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.26" );
@@ -1080,7 +1083,7 @@ public class SchemaManagerAddTest
// Check that the new MR has been injected
assertTrue( isMRPresent( schemaManager, "1.1.0" ) );
- MutableMatchingRuleImpl added = schemaManager.lookupMatchingRuleRegistry( "1.1.0" );
+ MutableMatchingRule added = schemaManager.lookupMatchingRuleRegistry( "1.1.0" );
assertTrue( added.getNames().contains( "cn" ) );
assertTrue( added.getNames().contains( "Test" ) );
Modified: directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java (original)
+++ directory/shared/branches/akarasulu/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java Sun Mar 13 16:58:31 2011
@@ -37,9 +37,13 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.exception.LdapProtocolErrorException;
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.AbstractLdapComparator;
+import org.apache.directory.shared.ldap.model.schema.LdapComparator;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableLdapComparator;
import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax;
import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl;
+import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.shared.ldap.model.schema.MutableNormalizer;
import org.apache.directory.shared.ldap.model.schema.AbstractNormalizer;
@@ -139,7 +143,7 @@ public class SchemaManagerDelTest
{
try
{
- AbstractLdapComparator<?> comparator = schemaManager.lookupComparatorRegistry( oid );
+ LdapComparator<?> comparator = schemaManager.lookupComparatorRegistry( oid );
return comparator != null;
}
@@ -169,7 +173,7 @@ public class SchemaManagerDelTest
{
try
{
- MutableMatchingRuleImpl matchingRule = schemaManager.lookupMatchingRuleRegistry( oid );
+ MatchingRule matchingRule = schemaManager.lookupMatchingRuleRegistry( oid );
return matchingRule != null;
}
@@ -352,7 +356,7 @@ public class SchemaManagerDelTest
int ctrSize = schemaManager.getComparatorRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- AbstractLdapComparator<?> lc = new BooleanComparator( "0.1.1" );
+ MutableLdapComparator<?> lc = new BooleanComparator( "0.1.1" );
assertTrue( schemaManager.add( lc ) );
assertEquals( ctrSize + 1, schemaManager.getComparatorRegistry().size() );
@@ -402,7 +406,7 @@ public class SchemaManagerDelTest
int ctrSize = schemaManager.getComparatorRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- AbstractLdapComparator<?> lc = schemaManager.lookupComparatorRegistry( "2.5.13.0" );
+ MutableLdapComparator<?> lc = schemaManager.lookupComparatorRegistry( "2.5.13.0" );
// shouldn't be deleted cause there is a MR associated with it
assertFalse( schemaManager.delete( lc ) );
@@ -436,7 +440,7 @@ public class SchemaManagerDelTest
assertTrue( isComparatorPresent( schemaManager, OID ) );
// Now try to remove the C
- AbstractLdapComparator<?> lc = schemaManager.lookupComparatorRegistry( OID );
+ MutableLdapComparator<?> lc = schemaManager.lookupComparatorRegistry( OID );
// shouldn't be deleted cause there is a MR associated with it
assertFalse( schemaManager.delete( lc ) );
@@ -543,7 +547,7 @@ public class SchemaManagerDelTest
assertTrue( isMatchingRulePresent( schemaManager, MR_OID ) );
// Now try to remove the MR
- MutableMatchingRuleImpl matchingRule = schemaManager.lookupMatchingRuleRegistry( MR_OID );
+ MutableMatchingRule matchingRule = schemaManager.lookupMatchingRuleRegistry( MR_OID );
// shouldn't be deleted cause there is a AT associated with it
assertFalse( schemaManager.delete( matchingRule ) );
Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java (original)
+++ directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java Sun Mar 13 16:58:31 2011
@@ -21,6 +21,7 @@
package org.apache.directory.studio.ldapbrowser.ui.editors.schemabrowser;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
@@ -167,7 +168,7 @@ public class MatchingRuleDescriptionPage
*/
public String getColumnText( Object obj, int index )
{
- if ( obj instanceof MutableMatchingRuleImpl )
+ if ( obj instanceof MatchingRule )
{
return SchemaUtils.toString( ( MutableMatchingRuleImpl ) obj );
}
@@ -196,11 +197,11 @@ public class MatchingRuleDescriptionPage
*/
public int compare( Viewer viewer, Object e1, Object e2 )
{
- if ( e1 instanceof MutableMatchingRuleImpl )
+ if ( e1 instanceof MatchingRule )
{
e1 = SchemaUtils.toString( ( MutableMatchingRuleImpl ) e1 );
}
- if ( e2 instanceof MutableMatchingRuleImpl )
+ if ( e2 instanceof MatchingRule )
{
e2 = SchemaUtils.toString( ( MutableMatchingRuleImpl ) e2 );
}
@@ -220,7 +221,7 @@ public class MatchingRuleDescriptionPage
*/
public boolean select( Viewer viewer, Object parentElement, Object element )
{
- if ( element instanceof MutableMatchingRuleImpl )
+ if ( element instanceof MatchingRule )
{
MutableMatchingRuleImpl mrd = ( MutableMatchingRuleImpl ) element;
boolean matched = SchemaUtils.toString( mrd ).toLowerCase()
Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowser.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowser.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowser.java (original)
+++ directory/studio/branches/akarasulu/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowser.java Sun Mar 13 16:58:31 2011
@@ -24,7 +24,7 @@ package org.apache.directory.studio.ldap
import org.apache.directory.shared.ldap.model.schema.AbstractSchemaObject;
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse;
import org.apache.directory.shared.ldap.model.schema.ObjectClass;
import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
@@ -214,7 +214,7 @@ public class SchemaBrowser extends Edito
atdPage.select( schemaElement );
tabFolder.setSelection( atdTab );
}
- else if ( schemaElement instanceof MutableMatchingRuleImpl )
+ else if ( schemaElement instanceof MatchingRule )
{
mrdPage.select( schemaElement );
tabFolder.setSelection( mrdTab );
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaAdapter.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaAdapter.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaAdapter.java Sun Mar 13 16:58:31 2011
@@ -22,7 +22,7 @@ package org.apache.directory.studio.sche
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.ObjectClass;
@@ -64,7 +64,7 @@ public abstract class SchemaAdapter impl
/* (non-Javadoc)
* @see org.apache.directory.studio.schemaeditor.model.SchemaListener#matchingRuleAdded(org.apache.directory.studio.schemaeditor.model.MatchingRuleImpl)
*/
- public void matchingRuleAdded( MutableMatchingRuleImpl mr )
+ public void matchingRuleAdded( MatchingRule mr )
{
}
@@ -72,7 +72,7 @@ public abstract class SchemaAdapter impl
/* (non-Javadoc)
* @see org.apache.directory.studio.schemaeditor.model.SchemaListener#matchingRuleModified(org.apache.directory.studio.schemaeditor.model.MatchingRuleImpl)
*/
- public void matchingRuleModified( MutableMatchingRuleImpl mr )
+ public void matchingRuleModified( MatchingRule mr )
{
}
@@ -80,7 +80,7 @@ public abstract class SchemaAdapter impl
/* (non-Javadoc)
* @see org.apache.directory.studio.schemaeditor.model.SchemaListener#matchingRuleRemoved(org.apache.directory.studio.schemaeditor.model.MatchingRuleImpl)
*/
- public void matchingRuleRemoved( MutableMatchingRuleImpl mr )
+ public void matchingRuleRemoved( MatchingRule mr )
{
}
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java Sun Mar 13 16:58:31 2011
@@ -27,6 +27,7 @@ import org.apache.commons.collections.Mu
import org.apache.commons.collections.map.MultiValueMap;
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.shared.ldap.model.schema.ObjectClass;
@@ -535,7 +536,7 @@ public class SchemaHandler
}
attributeTypesMap.put( at.getOid(), at );
}
- else if ( object instanceof MutableMatchingRuleImpl )
+ else if ( object instanceof MatchingRule )
{
MutableMatchingRuleImpl mr = ( MutableMatchingRuleImpl ) object;
matchingRulesList.add( mr );
@@ -642,7 +643,7 @@ public class SchemaHandler
}
attributeTypesMap.remove( at.getOid() );
}
- else if ( object instanceof MutableMatchingRuleImpl )
+ else if ( object instanceof MatchingRule )
{
MutableMatchingRuleImpl mr = ( MutableMatchingRuleImpl ) object;
matchingRulesList.remove( mr );
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandlerListener.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandlerListener.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandlerListener.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandlerListener.java Sun Mar 13 16:58:31 2011
@@ -22,7 +22,7 @@ package org.apache.directory.studio.sche
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.ObjectClass;
import org.apache.directory.studio.schemaeditor.model.Schema;
@@ -68,7 +68,7 @@ public interface SchemaHandlerListener
* @param mr
* the added matching rule
*/
- public void matchingRuleAdded( MutableMatchingRuleImpl mr );
+ public void matchingRuleAdded( MatchingRule mr );
/**
@@ -77,7 +77,7 @@ public interface SchemaHandlerListener
* @param mr
* the modified matching rule
*/
- public void matchingRuleModified( MutableMatchingRuleImpl mr );
+ public void matchingRuleModified( MatchingRule mr );
/**
@@ -86,7 +86,7 @@ public interface SchemaHandlerListener
* @param mr
* the removed matching rule
*/
- public void matchingRuleRemoved( MutableMatchingRuleImpl mr );
+ public void matchingRuleRemoved( MatchingRule mr );
/**
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaListener.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaListener.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaListener.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaListener.java Sun Mar 13 16:58:31 2011
@@ -22,7 +22,7 @@ package org.apache.directory.studio.sche
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.ObjectClass;
@@ -67,7 +67,7 @@ public interface SchemaListener
* @param mr
* the added matching rule
*/
- public void matchingRuleAdded( MutableMatchingRuleImpl mr );
+ public void matchingRuleAdded( MatchingRule mr );
/**
@@ -76,7 +76,7 @@ public interface SchemaListener
* @param mr
* the modified matching rule
*/
- public void matchingRuleModified( MutableMatchingRuleImpl mr );
+ public void matchingRuleModified( MatchingRule mr );
/**
@@ -85,7 +85,7 @@ public interface SchemaListener
* @param mr
* the removed matching rule
*/
- public void matchingRuleRemoved( MutableMatchingRuleImpl mr );
+ public void matchingRuleRemoved( MatchingRule mr );
/**
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboComparator.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboComparator.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboComparator.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboComparator.java Sun Mar 13 16:58:31 2011
@@ -23,6 +23,7 @@ package org.apache.directory.studio.sche
import java.util.Comparator;
import java.util.List;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.studio.schemaeditor.view.editors.NonExistingMatchingRule;
@@ -39,7 +40,7 @@ public class ATEMatchingRulesComboCompar
*/
public int compare( Object o1, Object o2 )
{
- if ( o1 instanceof MutableMatchingRuleImpl && o2 instanceof MutableMatchingRuleImpl )
+ if ( o1 instanceof MatchingRule && o2 instanceof MatchingRule )
{
List<String> mr1Names = ( ( MutableMatchingRuleImpl ) o1 ).getNames();
List<String> mr2Names = ( ( MutableMatchingRuleImpl ) o2 ).getNames();
@@ -49,7 +50,7 @@ public class ATEMatchingRulesComboCompar
return mr1Names.get( 0 ).compareToIgnoreCase( mr2Names.get( 0 ) );
}
}
- else if ( o1 instanceof MutableMatchingRuleImpl && o2 instanceof NonExistingMatchingRule )
+ else if ( o1 instanceof MatchingRule && o2 instanceof NonExistingMatchingRule )
{
List<String> mr1Names = ( ( MutableMatchingRuleImpl ) o1 ).getNames();
String mr2Name = ( ( NonExistingMatchingRule ) o2 ).getName();
@@ -59,7 +60,7 @@ public class ATEMatchingRulesComboCompar
return mr1Names.get( 0 ).compareToIgnoreCase( mr2Name );
}
}
- else if ( o1 instanceof NonExistingMatchingRule && o2 instanceof MutableMatchingRuleImpl )
+ else if ( o1 instanceof NonExistingMatchingRule && o2 instanceof MatchingRule )
{
String mr1Name = ( ( NonExistingMatchingRule ) o1 ).getName();
List<String> mr2Names = ( ( MutableMatchingRuleImpl ) o2 ).getNames();
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboContentProvider.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboContentProvider.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboContentProvider.java Sun Mar 13 16:58:31 2011
@@ -23,6 +23,7 @@ package org.apache.directory.studio.sche
import java.util.Collections;
import java.util.List;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.studio.schemaeditor.Activator;
import org.apache.directory.studio.schemaeditor.view.editors.NonExistingMatchingRule;
@@ -54,7 +55,7 @@ public class ATEMatchingRulesComboConten
// Creating Children
List<MutableMatchingRuleImpl> equalityMatchingRules = Activator.getDefault().getSchemaHandler()
.getMatchingRules();
- for ( MutableMatchingRuleImpl matchingRule : equalityMatchingRules )
+ for ( MatchingRule matchingRule : equalityMatchingRules )
{
input.addChild( matchingRule );
}
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboLabelProvider.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboLabelProvider.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/ATEMatchingRulesComboLabelProvider.java Sun Mar 13 16:58:31 2011
@@ -20,6 +20,7 @@
package org.apache.directory.studio.schemaeditor.view.editors.attributetype;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.studio.schemaeditor.view.editors.NonExistingMatchingRule;
import org.eclipse.jface.viewers.LabelProvider;
@@ -38,7 +39,7 @@ public class ATEMatchingRulesComboLabelP
*/
public String getText( Object obj )
{
- if ( obj instanceof MutableMatchingRuleImpl )
+ if ( obj instanceof MatchingRule )
{
MutableMatchingRuleImpl mr = ( MutableMatchingRuleImpl ) obj;
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorSourceCodePage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorSourceCodePage.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorSourceCodePage.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorSourceCodePage.java Sun Mar 13 16:58:31 2011
@@ -23,7 +23,7 @@ package org.apache.directory.studio.sche
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.ObjectClass;
import org.apache.directory.studio.schemaeditor.Activator;
import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -95,7 +95,7 @@ public class SchemaEditorSourceCodePage
/* (non-Javadoc)
* @see org.apache.directory.studio.schemaeditor.controller.SchemaListener#matchingRuleAdded(org.apache.directory.studio.schemaeditor.model.MatchingRuleImpl)
*/
- public void matchingRuleAdded( MutableMatchingRuleImpl mr )
+ public void matchingRuleAdded( MatchingRule mr )
{
fillInUiFields();
}
@@ -104,7 +104,7 @@ public class SchemaEditorSourceCodePage
/* (non-Javadoc)
* @see org.apache.directory.studio.schemaeditor.controller.SchemaListener#matchingRuleModified(org.apache.directory.studio.schemaeditor.model.MatchingRuleImpl)
*/
- public void matchingRuleModified( MutableMatchingRuleImpl mr )
+ public void matchingRuleModified( MatchingRule mr )
{
fillInUiFields();
}
@@ -113,7 +113,7 @@ public class SchemaEditorSourceCodePage
/* (non-Javadoc)
* @see org.apache.directory.studio.schemaeditor.controller.SchemaListener#matchingRuleRemoved(org.apache.directory.studio.schemaeditor.model.MatchingRuleImpl)
*/
- public void matchingRuleRemoved( MutableMatchingRuleImpl mr )
+ public void matchingRuleRemoved( MatchingRule mr )
{
fillInUiFields();
}
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java Sun Mar 13 16:58:31 2011
@@ -23,7 +23,7 @@ package org.apache.directory.studio.sche
import org.apache.directory.shared.ldap.model.exception.LdapSchemaException;
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.ObjectClass;
import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
import org.apache.directory.shared.ldap.model.schema.SchemaObject;
@@ -496,7 +496,7 @@ public class ProblemsViewLabelProvider e
{
schemaObject = schemaHandler.getSyntax( so.getOid() );
}
- else if ( so instanceof MutableMatchingRuleImpl )
+ else if ( so instanceof MatchingRule )
{
schemaObject = schemaHandler.getMatchingRule( so.getOid() );
}
Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java?rev=1081151&r1=1081150&r2=1081151&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeMatchingRulesWizardPage.java Sun Mar 13 16:58:31 2011
@@ -25,6 +25,7 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
+import org.apache.directory.shared.ldap.model.schema.MatchingRule;
import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl;
import org.apache.directory.studio.schemaeditor.Activator;
import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -65,7 +66,7 @@ public class NewAttributeTypeMatchingRul
*/
public String getText( Object element )
{
- if ( element instanceof MutableMatchingRuleImpl )
+ if ( element instanceof MatchingRule )
{
MutableMatchingRuleImpl mr = ( MutableMatchingRuleImpl ) element;
@@ -176,7 +177,7 @@ public class NewAttributeTypeMatchingRul
public int compare( Object o1, Object o2 )
{
- if ( ( o1 instanceof MutableMatchingRuleImpl ) && ( o2 instanceof MutableMatchingRuleImpl ) )
+ if ( ( o1 instanceof MatchingRule ) && ( o2 instanceof MatchingRule ) )
{
List<String> o1Names = ( ( MutableMatchingRuleImpl ) o1 ).getNames();
List<String> o2Names = ( ( MutableMatchingRuleImpl ) o2 ).getNames();
@@ -197,11 +198,11 @@ public class NewAttributeTypeMatchingRul
return o1Names.get( 0 ).compareToIgnoreCase( "" ); //$NON-NLS-1$
}
}
- else if ( ( o1 instanceof String ) && ( o2 instanceof MutableMatchingRuleImpl ) )
+ else if ( ( o1 instanceof String ) && ( o2 instanceof MatchingRule ) )
{
return Integer.MIN_VALUE;
}
- else if ( ( o1 instanceof MutableMatchingRuleImpl ) && ( o2 instanceof String ) )
+ else if ( ( o1 instanceof MatchingRule ) && ( o2 instanceof String ) )
{
return Integer.MAX_VALUE;
}
@@ -235,7 +236,7 @@ public class NewAttributeTypeMatchingRul
{
Object selection = ( ( StructuredSelection ) equalityComboViewer.getSelection() ).getFirstElement();
- if ( selection instanceof MutableMatchingRuleImpl )
+ if ( selection instanceof MatchingRule )
{
MutableMatchingRuleImpl mr = ( ( MutableMatchingRuleImpl ) selection );
@@ -264,7 +265,7 @@ public class NewAttributeTypeMatchingRul
{
Object selection = ( ( StructuredSelection ) orderingComboViewer.getSelection() ).getFirstElement();
- if ( selection instanceof MutableMatchingRuleImpl )
+ if ( selection instanceof MatchingRule )
{
MutableMatchingRuleImpl mr = ( ( MutableMatchingRuleImpl ) selection );
@@ -293,7 +294,7 @@ public class NewAttributeTypeMatchingRul
{
Object selection = ( ( StructuredSelection ) substringComboViewer.getSelection() ).getFirstElement();
- if ( selection instanceof MutableMatchingRuleImpl )
+ if ( selection instanceof MatchingRule )
{
MutableMatchingRuleImpl mr = ( ( MutableMatchingRuleImpl ) selection );