1 17 package org.apache.ldap.server; 18 19 20 import org.apache.ldap.common.schema.AttributeType; 21 import org.apache.ldap.server.db.Database; 22 import org.apache.ldap.server.db.SearchEngine; 23 24 import javax.naming.Name ; 25 import javax.naming.NamingException ; 26 27 28 34 public class ApplicationPartition extends AbstractContextPartition 35 { 36 40 private Name upSuffix = null ; 41 42 46 private Name normalizedSuffix = null ; 47 48 49 53 54 63 public ApplicationPartition( Name upSuffix, Name normalizedSuffix, Database db, 64 SearchEngine searchEngine, 65 AttributeType[] indexAttributes ) 66 throws NamingException 67 { 68 super( db, searchEngine, indexAttributes ); 69 70 this.normalizedSuffix = normalizedSuffix; 71 this.upSuffix = upSuffix; 72 } 73 74 75 76 80 81 84 public Name getSuffix( boolean normalized ) 85 { 86 if ( normalized ) 87 { 88 return normalizedSuffix ; 89 } 90 91 return upSuffix ; 92 } 93 94 95 98 public boolean isSuffix( Name dn ) throws NamingException 99 { 100 return normalizedSuffix.equals( dn ) ; 101 } 102 } 103 | Popular Tags |