/** * {@inheritDoc} */ @Override public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException { LOG.debug( ">>> Entering into the Administrative Interceptor, moveAndRenameRequest" ); Entry entry = moveAndRenameContext.getOriginalEntry(); // Check if we are moving and renaming an Administrative Point Attribute adminPoint = entry.get( directoryService.getAtProvider().getAdministrativeRole() ); if ( adminPoint == null ) { // Nope, go on. next( moveAndRenameContext ); LOG.debug( "Exit from Administrative Interceptor" ); return; } // Else throw an UnwillingToPerform exception ATM String message = "Cannot move and rename an Administrative Point in the current version"; LOG.error( message ); throw new LdapUnwillingToPerformException( message ); }
/** * {@inheritDoc} */ @Override public void rename( RenameOperationContext renameContext ) throws LdapException { LOG.debug( ">>> Entering into the Administrative Interceptor, renameRequest" ); Entry entry = renameContext.getEntry(); // Check if we are renaming an Administrative Point Attribute adminPoint = entry.get( directoryService.getAtProvider().getAdministrativeRole() ); if ( adminPoint == null ) { // Nope, go on. next( renameContext ); LOG.debug( "Exit from Administrative Interceptor" ); return; } // Else throw an UnwillingToPerform exception ATM String message = "Cannot rename an Administrative Point in the current version"; LOG.error( message ); throw new LdapUnwillingToPerformException( message ); } }
/** * {@inheritDoc} */ @Override public void move( MoveOperationContext moveContext ) throws LdapException { LOG.debug( ">>> Entering into the Administrative Interceptor, moveRequest" ); Entry entry = moveContext.getOriginalEntry(); // Check if we are moving an Administrative Point Attribute adminPoint = entry.get( directoryService.getAtProvider().getAdministrativeRole() ); if ( adminPoint == null ) { // Nope, go on. next( moveContext ); LOG.debug( "Exit from Administrative Interceptor" ); return; } // Else throw an UnwillingToPerform exception ATM String message = "Cannot move an Administrative Point in the current version"; LOG.error( message ); throw new LdapUnwillingToPerformException( message ); }
Attribute adminPoint = entry.get( directoryService.getAtProvider().getAdministrativeRole() );
ExprNode filter = new PresenceNode( directoryService.getAtProvider().getAdministrativeRole() );
/** * Update The Administrative Points cache, adding the given AdminPoints */ private void addAdminPointCache( List<Entry> adminPointEntries ) throws LdapException { for ( Entry adminPointEntry : adminPointEntries ) { // update the cache Dn dn = adminPointEntry.getDn(); String uuid = adminPointEntry.get( directoryService.getAtProvider().getEntryUUID() ).getString(); Attribute adminPoint = adminPointEntry.get( directoryService.getAtProvider().getAdministrativeRole() ); createAdministrativePoints( adminPoint, dn, uuid ); } }
ExprNode filter = new PresenceNode( directoryService.getAtProvider().getAdministrativeRole() ); SearchControls controls = new SearchControls(); controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
Attribute adminPoint = entry.get( directoryService.getAtProvider().getAdministrativeRole() );
/** * Get the administrativePoint role */ private void checkAdministrativeRole( OperationContext opContext, Dn apDn ) throws LdapException { CoreSession session = opContext.getSession(); LookupOperationContext lookupContext = new LookupOperationContext( session, apDn, SchemaConstants.ALL_ATTRIBUTES_ARRAY ); lookupContext.setPartition( opContext.getPartition() ); lookupContext.setTransaction( opContext.getTransaction() ); Entry administrationPoint = directoryService.getPartitionNexus().lookup( lookupContext ); // The administrativeRole AT must exist and not be null Attribute administrativeRole = administrationPoint.get( directoryService.getAtProvider() .getAdministrativeRole() ); // check that administrativeRole has something valid in it for us if ( ( administrativeRole == null ) || ( administrativeRole.size() <= 0 ) ) { LOG.error( "The entry on {} is not an AdministrativePoint", apDn ); throw new LdapNoSuchAttributeException( I18n.err( I18n.ERR_306, apDn ) ); } }
if ( modification.getAttribute().getAttributeType() == directoryService.getAtProvider().getAdministrativeRole() ) directoryService.getAtProvider().getAdministrativeRole() ); modifiedAdminRole = new DefaultAttribute( directoryService.getAtProvider().getAdministrativeRole() ); if ( attribute.getAttributeType() == directoryService.getAtProvider().getAdministrativeRole() )