@Override public void entryAdded( AddOperationContext addContext ) { Entry entry = addContext.getEntry(); updatePasswordPolicy( entry, false ); }
/** * {@inheritDoc} */ public void add( AddOperationContext addContext ) throws LdapException { super.add( addContext ); addEntry( addContext.getEntry() ); }
/** * {@inheritDoc} */ @Override public void add( AddOperationContext addContext ) throws LdapException { checkAdd( addContext.getDn(), addContext.getEntry() ); next( addContext ); }
/** * {@inheritDoc} */ @Override public void add( AddOperationContext addContext ) throws LdapException { if ( algorithm == null ) { next( addContext ); return; } for ( Attribute attribute : addContext.getEntry().getAttributes() ) { if ( attributeTypes.contains( attribute.getAttributeType() ) ) { includeHashed( attribute ); } } next( addContext ); }
Entry entry = addContext.getEntry();
Entry entry = addContext.getEntry();
/** * {@inheritDoc} */ @Override public void add( AddOperationContext addContext ) throws LdapException { synchronized ( lock ) { super.add( addContext ); if ( contextEntry == null ) { Entry entry = addContext.getEntry(); if ( entry.getDn().equals( suffixDn ) ) { contextEntry = entry; } } dirty = true; rewritePartitionData( addContext.getTransaction() ); } }
/** * {@inheritDoc} */ @Override public void add( AddOperationContext addContext ) throws LdapException { Dn name = addContext.getDn(); Entry entry = addContext.getEntry(); // Bypass trigger handling if the service is disabled. if ( !enabled ) { next( addContext ); return; } // Gather supplementary data. StoredProcedureParameterInjector injector = new AddStoredProcedureParameterInjector( addContext, name, entry ); // Gather Trigger Specifications which apply to the entry being added. List<TriggerSpecification> triggerSpecs = new ArrayList<>(); addPrescriptiveTriggerSpecs( addContext, triggerSpecs, name, entry ); /** * NOTE: We do not handle entryTriggerSpecs for ADD operation. */ Map<ActionTime, List<TriggerSpecification>> triggerMap = getActionTimeMappedTriggerSpecsForOperation( triggerSpecs, LdapOperation.ADD ); next( addContext ); triggerSpecCache.subentryAdded( name, entry ); // Fire AFTER Triggers. List<TriggerSpecification> afterTriggerSpecs = triggerMap.get( ActionTime.AFTER ); executeTriggers( addContext, afterTriggerSpecs, injector ); }
/** * {@inheritDoc} */ @Override public void add( AddOperationContext addContext ) throws LdapException { if ( algorithm == null ) { next( addContext ); return; } Entry entry = addContext.getEntry(); Attribute pwdAt = entry.get( SchemaConstants.USER_PASSWORD_AT ); Attribute hashedPwdAt = includeHashedPassword( pwdAt ); if ( hashedPwdAt != null ) { entry.remove( pwdAt ); entry.add( hashedPwdAt ); } next( addContext ); }
public void entryAdded( AddOperationContext addContext ) { try { Binding binding = new Binding( addContext.getDn().getName(), ServerEntryUtils.toBasicAttributes( addContext.getEntry() ), false ); NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_ADDED, binding, null, addContext ); if ( listener instanceof NamespaceChangeListener ) { ( ( NamespaceChangeListener ) listener ).objectAdded( evt ); } } catch ( Exception e ) { deliverNamingExceptionEvent( e ); } }
Entry entry = addContext.getEntry(); Dn dn = entry.getDn();
public void entryAdded( AddOperationContext addContext ) { if ( !psearchControl.isNotificationEnabled( ChangeType.ADD ) ) { return; } SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() ); respEntry.setObjectName( addContext.getDn() ); // the entry needs to be cloned cause addContext.getEntry() will only contain // the user provided values and all the operational attributes added during // Partition.add() will be applied in the cloned entry present inside it // if we don't clone then the attributes will not be filtered // e.x the operational attributes will also be sent even when a user requests // user attributes only Entry entry = new ClonedServerEntry( addContext.getEntry() ); filterEntry( entry ); respEntry.setEntry( entry ); setECResponseControl( respEntry, addContext, ChangeType.ADD ); session.getIoSession().write( respEntry ); }
Entry addEntry = addContext.getEntry();
Entry entry = addContext.getEntry();
/** * {@inheritDoc} */ @Override public void add( AddOperationContext addContext ) throws LdapException { next( addContext ); if ( !changeLog.isEnabled() ) { return; } Entry addEntry = addContext.getEntry(); // we don't want to record addition of a tag as a change if ( addEntry.get( REV_AT_OID ) != null ) { return; } LdifEntry forward = new LdifEntry(); forward.setChangeType( ChangeType.Add ); forward.setDn( addContext.getDn() ); for ( Attribute attribute : addEntry.getAttributes() ) { AttributeType attributeType = attribute.getAttributeType(); forward.addAttribute( addEntry.get( attributeType ).clone() ); } LdifEntry reverse = LdifRevertor.reverseAdd( addContext.getDn() ); addContext.setChangeLogEvent( changeLog.log( getPrincipal( addContext ), forward, reverse ) ); }
Entry entry = addContext.getEntry();
Entry entry = addContext.getEntry();
Entry entry = addContext.getEntry();