1 17 package org.apache.ldap.server.db; 18 19 20 import org.apache.ldap.common.schema.AttributeType; 21 22 import javax.naming.Name ; 23 import javax.naming.NamingEnumeration ; 24 import javax.naming.NamingException ; 25 import javax.naming.directory.Attributes ; 26 import javax.naming.directory.ModificationItem ; 27 import java.math.BigInteger ; 28 import java.util.Iterator ; 29 30 31 37 public interface Database 38 { 39 41 String ALIAS_OBJECT = "alias"; 42 46 String ALIAS_ATTRIBUTE = "aliasedObjectName"; 47 48 49 53 54 60 void addIndexOn( AttributeType attribute ) throws NamingException ; 61 62 68 boolean hasUserIndexOn( String attribute ); 69 70 76 boolean hasSystemIndexOn( String attribute ); 77 78 85 Index getExistanceIndex(); 86 87 93 Index getHierarchyIndex(); 94 95 101 Index getUpdnIndex(); 102 103 109 Index getNdnIndex(); 110 111 118 Index getOneAliasIndex(); 119 120 127 Index getSubAliasIndex(); 128 129 135 Index getAliasIndex(); 136 137 143 void setAliasIndexOn( AttributeType attrType ) throws NamingException ; 144 145 150 void setExistanceIndexOn( AttributeType attrType ) throws NamingException ; 151 152 157 void setHierarchyIndexOn( AttributeType attrType ) throws NamingException ; 158 159 164 void setUpdnIndexOn( AttributeType attrType ) throws NamingException ; 165 166 171 void setNdnIndexOn( AttributeType attrType ) throws NamingException ; 172 173 180 void setOneAliasIndexOn( AttributeType attrType ) throws NamingException ; 181 182 189 void setSubAliasIndexOn( AttributeType attrType ) throws NamingException ; 190 191 198 Index getUserIndex( String attribute ) throws IndexNotFoundException; 199 200 207 Index getSystemIndex( String attribute ) throws IndexNotFoundException; 208 209 216 BigInteger getEntryId( String dn ) throws NamingException ; 217 218 225 String getEntryDn( BigInteger id ) throws NamingException ; 226 227 234 BigInteger getParentId( String dn ) throws NamingException ; 235 236 243 BigInteger getParentId( BigInteger childId ) throws NamingException ; 244 245 252 String getEntryUpdn( BigInteger id ) throws NamingException ; 253 254 261 String getEntryUpdn( String dn ) throws NamingException ; 262 263 271 void add( String updn, Name dn, Attributes entry ) throws NamingException ; 272 273 280 Attributes lookup( BigInteger id ) throws NamingException ; 281 282 288 void delete( BigInteger id ) throws NamingException ; 289 290 297 NamingEnumeration list( BigInteger id ) throws NamingException ; 298 299 306 int getChildCount( BigInteger id ) throws NamingException ; 307 308 311 Name getSuffix(); 312 313 319 Attributes getSuffixEntry() throws NamingException ; 320 321 326 void sync() throws NamingException ; 327 328 333 void close() throws NamingException ; 334 335 341 boolean isClosed(); 342 343 350 void setProperty( String key, String value ) throws NamingException ; 351 352 359 String getProperty( String key ) throws NamingException ; 360 361 366 Iterator getUserIndices(); 367 368 373 Iterator getSystemIndices(); 374 375 382 Attributes getIndices( BigInteger id ) throws NamingException ; 383 384 392 void modify( Name dn, int modOp, Attributes mods ) throws NamingException ; 393 394 401 void modify( Name dn, ModificationItem [] mods ) throws NamingException ; 402 403 411 void modifyRdn( Name dn, String newRdn, boolean deleteOldRdn ) throws NamingException ; 412 413 420 void move( Name oldChildDn, Name newParentDn ) throws NamingException ; 421 422 433 void move( Name oldChildDn, Name newParentDn, String newRdn, 434 boolean deleteOldRdn ) throws NamingException ; 435 436 444 int count() throws NamingException ; 445 } 446 | Popular Tags |