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 2009/08/27 00:11:39 UTC
svn commit: r808204 - in
/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core:
collective/ event/ normalization/
Author: elecharny
Date: Wed Aug 26 22:11:38 2009
New Revision: 808204
URL: http://svn.apache.org/viewvc?rev=808204&view=rev
Log:
Some more compilation fixes
Modified:
directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java
directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java
directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java
Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java?rev=808204&r1=808203&r2=808204&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java Wed Aug 26 22:11:38 2009
@@ -284,7 +284,7 @@
while ( superType != null )
{
- superType = superType.getSuperior();
+ superType = superType.getSup();
if ( superType != null )
{
Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java?rev=808204&r1=808203&r2=808204&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java Wed Aug 26 22:11:38 2009
@@ -113,7 +113,7 @@
if ( attrType == null )
{
- if ( !attrTypeRegistry.hasAttributeType( attr.getUpId() ) )
+ if ( !attrTypeRegistry.contains( attr.getUpId() ) )
{
throw new LdapInvalidAttributeIdentifierException();
}
Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java?rev=808204&r1=808203&r2=808204&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java Wed Aug 26 22:11:38 2009
@@ -71,7 +71,7 @@
public ExpressionEvaluator(OidRegistry oidRegistry, AttributeTypeRegistry attributeTypeRegistry)
{
SubstringEvaluator substringEvaluator = null;
- substringEvaluator = new SubstringEvaluator( oidRegistry, attributeTypeRegistry );
+ substringEvaluator = new SubstringEvaluator( attributeTypeRegistry );
leafEvaluator = new LeafEvaluator( attributeTypeRegistry, substringEvaluator );
}
Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java?rev=808204&r1=808203&r2=808204&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java Wed Aug 26 22:11:38 2009
@@ -34,7 +34,6 @@
import org.apache.directory.shared.ldap.schema.MatchingRule;
import org.apache.directory.shared.ldap.schema.Normalizer;
import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
-import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
/**
@@ -45,10 +44,8 @@
*/
public class SubstringEvaluator implements Evaluator
{
- /** Oid Registry used to translate attributeIds to OIDs */
- private OidRegistry oidRegistry;
/** AttributeType registry needed for normalizing and comparing values */
- private AttributeTypeRegistry attributeTypeRegistry;
+ private AttributeTypeRegistry atRegistry;
/**
@@ -57,10 +54,9 @@
* @param oidRegistry the OID registry for name to OID mapping
* @param attributeTypeRegistry the attributeType registry
*/
- public SubstringEvaluator(OidRegistry oidRegistry, AttributeTypeRegistry attributeTypeRegistry)
+ public SubstringEvaluator( AttributeTypeRegistry atRegistry )
{
- this.oidRegistry = oidRegistry;
- this.attributeTypeRegistry = attributeTypeRegistry;
+ this.atRegistry = atRegistry;
}
@@ -71,8 +67,8 @@
{
Pattern regex = null;
SubstringNode snode = (SubstringNode)node;
- String oid = oidRegistry.getOid( snode.getAttribute() );
- AttributeType type = attributeTypeRegistry.lookup( oid );
+ String oid = atRegistry.getOid( snode.getAttribute() );
+ AttributeType type = atRegistry.lookup( oid );
MatchingRule matchingRule = type.getSubstr();
if ( matchingRule == null )
Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java?rev=808204&r1=808203&r2=808204&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java Wed Aug 26 22:11:38 2009
@@ -26,7 +26,6 @@
import javax.naming.NamingException;
import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
import org.apache.directory.shared.ldap.filter.AndNode;
import org.apache.directory.shared.ldap.filter.BranchNode;
@@ -40,6 +39,7 @@
import org.apache.directory.shared.ldap.filter.SubstringNode;
import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
import org.apache.directory.shared.ldap.schema.registries.Registries;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -72,6 +72,9 @@
/** the global registries used to resolve OIDs for attributeType ids */
private final Registries registries;
+
+ /** The AttributeType registry */
+ private AttributeTypeRegistry atRegistry;
/**
@@ -122,6 +125,7 @@
{
this.ncn = ncn;
this.registries = registries;
+ atRegistry = registries.getAttributeTypeRegistry();
}
@@ -172,16 +176,8 @@
*/
private ExprNode visitPresenceNode( PresenceNode node )
{
- try
- {
- node.setAttribute( registries.getOidRegistry().getOid( node.getAttribute() ) );
- return node;
- }
- catch ( NamingException ne )
- {
- log.warn( "Failed to normalize filter node attribute: {}, error: {}", node.getAttribute(), ne.getMessage() );
- return null;
- }
+ node.setAttribute( atRegistry.getOid( node.getAttribute() ) );
+ return node;
}
@@ -212,17 +208,10 @@
return null;
}
- try
- {
- node.setAttribute( registries.getOidRegistry().getOid( node.getAttribute() ) );
- node.setValue( normalized );
- return node;
- }
- catch ( NamingException ne )
- {
- log.warn( "Failed to normalize filter node attribute: {}, error: {}", node.getAttribute(), ne.getMessage() );
- return null;
- }
+ node.setAttribute( atRegistry.getOid( node.getAttribute() ) );
+ node.setValue( normalized );
+
+ return node;
}
@@ -290,37 +279,29 @@
}
}
- try
- {
- node.setAttribute( registries.getOidRegistry().getOid( node.getAttribute() ) );
-
- if ( normInitial != null )
- {
- node.setInitial( normInitial.getString() );
- }
- else
- {
- node.setInitial( null );
- }
+ node.setAttribute( atRegistry.getOid( node.getAttribute() ) );
- node.setAny( normAnys );
+ if ( normInitial != null )
+ {
+ node.setInitial( normInitial.getString() );
+ }
+ else
+ {
+ node.setInitial( null );
+ }
- if ( normFinal != null )
- {
- node.setFinal( normFinal.getString() );
- }
- else
- {
- node.setFinal( null );
- }
+ node.setAny( normAnys );
- return node;
+ if ( normFinal != null )
+ {
+ node.setFinal( normFinal.getString() );
}
- catch ( NamingException ne )
+ else
{
- log.warn( "Failed to normalize filter node attribute: {}, error: {}", node.getAttribute(), ne.getMessage() );
- return null;
+ node.setFinal( null );
}
+
+ return node;
}
@@ -335,16 +316,9 @@
*/
private ExprNode visitExtensibleNode( ExtensibleNode node )
{
- try
- {
- node.setAttribute( registries.getOidRegistry().getOid( node.getAttribute() ) );
- return node;
- }
- catch ( NamingException ne )
- {
- log.warn( "Failed to normalize filter node attribute: {}, error: {}", node.getAttribute(), ne.getMessage() );
- return null;
- }
+ node.setAttribute( atRegistry.getOid( node.getAttribute() ) );
+
+ return node;
}