public void registerSupportedExtensions( Set extensionOids ) { Attribute supportedExtension = rootDSE.get( "supportedExtension" ); if ( supportedExtension == null ) { supportedExtension = new LockableAttributeImpl( "supportedExtension" ); rootDSE.put( supportedExtension ); } for ( Iterator oids = extensionOids.iterator(); oids.hasNext(); ) { supportedExtension.add( ( String ) oids.next() ); } } }
LockableAttributeImpl attr = new LockableAttributeImpl( id ); int pos = ( id.length() << 1 ) + 4; attr.add( value ); attr.add( value );
protected void removeSpi( String key ) { Attribute attr = new LockableAttributeImpl( key ); ModificationItemImpl mi = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr ); addDelta( mi ); }
final LockableAttributeImpl attr = new LockableAttributeImpl( id ); int pos = ( id.length() << 1 ) + 4 + offset; attr.add( value ); attr.add( value );
return new LockableAttributeImpl( "objectClass" ); return new LockableAttributeImpl( "objectClasses" );
LockableAttributeImpl attr = new LockableAttributeImpl( id ); pos += ( id.length() << 1 ) + 4; attr.add( value ); attr.add( value );
protected void putSpi( String key, String value ) { Attribute attr = new LockableAttributeImpl( key ); attr.add( value ); ModificationItemImpl mi = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr ); addDelta( mi ); }
attr = new LockableAttributeImpl( "objectClasses" ); Iterator list = globalRegistries.getObjectClassRegistry().list(); while ( list.hasNext() ) attr.add( SchemaUtils.render( oc ).toString() ); attr = new LockableAttributeImpl( "attributeTypes" ); Iterator list = globalRegistries.getAttributeTypeRegistry().list(); while ( list.hasNext() ) attr.add( SchemaUtils.render( at ).toString() ); attr = new LockableAttributeImpl( "matchingRules" ); Iterator list = globalRegistries.getMatchingRuleRegistry().list(); while ( list.hasNext() ) attr.add( SchemaUtils.render( mr ).toString() ); attr = new LockableAttributeImpl( "matchingRuleUse" ); Iterator list = globalRegistries.getMatchingRuleUseRegistry().list(); while ( list.hasNext() ) attr.add( SchemaUtils.render( mru ).toString() ); attr = new LockableAttributeImpl( "ldapSyntaxes" ); Iterator list = globalRegistries.getSyntaxRegistry().list(); while ( list.hasNext() ) attr.add( SchemaUtils.render( syntax ).toString() );
Attribute attr = new LockableAttributeImpl( SUBENTRY_OPATTRS[ii] ); attr.add( dn ); modList.add( new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr ) );
Attribute attr = new LockableAttributeImpl( "subschemaSubentry" ); attr.add( "cn=schema,ou=system" ); rootDSE.put( attr ); attr = new LockableAttributeImpl( "supportedLDAPVersion" ); rootDSE.put( attr ); attr.add( "3" ); attr = new LockableAttributeImpl( "supportedFeatures" ); rootDSE.put( attr ); attr.add( "1.3.6.1.4.1.4203.1.5.1" ); attr = new LockableAttributeImpl( "supportedExtension" ); rootDSE.put( attr ); attr.add( NoticeOfDisconnect.EXTENSION_OID ); attr = new LockableAttributeImpl( "supportedControl" ); rootDSE.put( attr ); attr.add( PersistentSearchControl.CONTROL_OID ); attr = new LockableAttributeImpl( "objectClass" ); rootDSE.put( attr ); attr.add( "top" ); attr.add( "extensibleObject" ); attr = new LockableAttributeImpl( NAMINGCTXS_ATTR ); rootDSE.put( attr ); attr = new LockableAttributeImpl( VENDORNAME_ATTR );
Attribute result = new LockableAttributeImpl( opAttrId ); Attribute opAttrAdditions = operational.get( opAttrId ); Attribute opAttrInEntry = entry.get( opAttrId );
private void filterObjectClass( Attributes entry ) throws NamingException { List objectClasses = new ArrayList(); Attribute oc = entry.get( "objectClass" ); if ( oc != null ) { getObjectClasses( oc, objectClasses ); entry.remove( "objectClass" ); Attribute newOc = new LockableAttributeImpl( "objectClass" ); for ( int i = 0; i < objectClasses.size(); i++ ) { Object currentOC = objectClasses.get(i); if ( currentOC instanceof String ) { newOc.add( currentOC ); } else { newOc.add( ( (ObjectClass)currentOC ).getName() ); } } newOc.add( "top" ); entry.put( newOc ); } }
/** * Adds extra operational attributes to the entry before it is added. */ public void add(NextInterceptor nextInterceptor, LdapDN normName, Attributes entry) throws NamingException { String principal = getPrincipal().getName(); Attribute attribute = new LockableAttributeImpl( "creatorsName" ); attribute.add( principal ); entry.put( attribute ); attribute = new LockableAttributeImpl( "createTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); entry.put( attribute ); nextInterceptor.add(normName, entry ); }
if ( operational == null ) operational = new LockableAttributeImpl( AC_SUBENTRIES ); operational.add( newName.toString() ); if ( operational == null ) operational = new LockableAttributeImpl( SCHEMA_SUBENTRY ); operational.add( newName.toString() ); if ( operational == null ) operational = new LockableAttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES ); operational.add( newName.toString() );
public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName ) throws NamingException { nextInterceptor.move( name, newParentName ); // add operational attributes after call in case the operation fails Attributes attributes = new LockableAttributesImpl( true ); Attribute attribute = new LockableAttributeImpl( "modifiersName" ); attribute.add( getPrincipal().getName() ); attributes.put( attribute ); attribute = new LockableAttributeImpl( "modifyTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); attributes.put( attribute ); nexus.modify( newParentName, DirContext.REPLACE_ATTRIBUTE, attributes ); }
if ( attr == null ) attr = new LockableAttributeImpl( attrId ); if ( attr == null ) attr = new LockableAttributeImpl( valStr ); Attribute childAttr = new LockableAttributeImpl( "_child" ); attributes.put( childAttr ); while ( list.hasMore() )
public void modify( NextInterceptor nextInterceptor, LdapDN name, ModificationItemImpl[] items ) throws NamingException { nextInterceptor.modify( name, items ); // add operational attributes after call in case the operation fails Attributes attributes = new LockableAttributesImpl( true ); Attribute attribute = new LockableAttributeImpl( "modifiersName" ); attribute.add( getPrincipal().getName() ); attributes.put( attribute ); attribute = new LockableAttributeImpl( "modifyTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); attributes.put( attribute ); nexus.modify( name, DirContext.REPLACE_ATTRIBUTE, attributes ); }
Attribute objectClass = new LockableAttributeImpl( "objectClass" ); objectClass.add( TOP_ATTR ); objectClass.add( JOBJECT_ATTR ); Attribute javaClassNames = new LockableAttributeImpl( JCLASSNAMES_ATTR );
public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName, String newRn, boolean deleteOldRn ) throws NamingException { nextInterceptor.move( name, newParentName, newRn, deleteOldRn ); // add operational attributes after call in case the operation fails Attributes attributes = new LockableAttributesImpl( true ); Attribute attribute = new LockableAttributeImpl( "modifiersName" ); attribute.add( getPrincipal().getName() ); attributes.put( attribute ); attribute = new LockableAttributeImpl( "modifyTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); attributes.put( attribute ); nexus.modify( newParentName, DirContext.REPLACE_ATTRIBUTE, attributes ); }
public void modify( NextInterceptor nextInterceptor, LdapDN name, int modOp, Attributes attrs ) throws NamingException { nextInterceptor.modify( name, modOp, attrs ); // add operational attributes after call in case the operation fails Attributes attributes = new LockableAttributesImpl( true ); Attribute attribute = new LockableAttributeImpl( "modifiersName" ); attribute.add( getPrincipal().getName() ); attributes.put( attribute ); attribute = new LockableAttributeImpl( "modifyTimestamp" ); attribute.add( DateUtils.getGeneralizedTime() ); attributes.put( attribute ); nexus.modify( name, DirContext.REPLACE_ATTRIBUTE, attributes ); }