/** * {@inheritDoc} */ @Override public void add( Entry entry, LogChange log ) throws LdapException { AddOperationContext addContext = new AddOperationContext( this, entry ); addContext.setLogChange( log ); OperationManager operationManager = directoryService.getOperationManager(); operationManager.add( addContext ); }
/** * {@inheritDoc} */ @Override public void add( Entry entry, boolean ignoreReferral, LogChange log ) throws LdapException { AddOperationContext addContext = new AddOperationContext( this, entry ); addContext.setLogChange( log ); setReferralHandling( addContext, ignoreReferral ); OperationManager operationManager = directoryService.getOperationManager(); operationManager.add( addContext ); }
super.add( new AddOperationContext( null, contextEntry ) ); addMandatoryOpAt( entry ); super.add( new AddOperationContext( null, entry ) );
entry.add(SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString()); AddOperationContext addContext = new AddOperationContext(null, entry); super.add(addContext);
entry.add(SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString()); AddOperationContext addContext = new AddOperationContext(null, entry); super.add(addContext);
AddOperationContext addContext = new AddOperationContext( null, serverEntry ); PartitionTxn partitionTxn = beginWriteTransaction();
AddOperationContext addContext = new AddOperationContext( null, contextEntry ); addContext.setPartition( this ); addContext.setTransaction( this.beginWriteTransaction() ); AddOperationContext addContext = new AddOperationContext( null, entry ); addContext.setPartition( this ); addContext.setTransaction( this.beginWriteTransaction() );
AddOperationContext addContext = new AddOperationContext( session, remoteEntry ); addContext.setReplEvent( true ); addContext.setRid( rid );
AddOperationContext addContext = new AddOperationContext( null, entry ); addContext.setPartition( configPartition ); PartitionTxn partitionTxn = null;
/** * {@inheritDoc} */ @Override public void add( AddRequest addRequest, LogChange log ) throws LdapException { AddOperationContext addContext = new AddOperationContext( this, addRequest ); addContext.setLogChange( log ); OperationManager operationManager = directoryService.getOperationManager(); try { operationManager.add( addContext ); } catch ( LdapException e ) { addRequest.getResultResponse().addAllControls( addContext.getResponseControls() ); throw e; } addRequest.getResultResponse().addAllControls( addContext.getResponseControls() ); }
/** * Used to encapsulate [de]marshalling of controls before and after add operations. * * @param target The entry's Dn to add * @param entry The entry to add * @throws Exception If the add failed */ protected void doAddOperation( Dn target, Entry entry ) throws Exception { // setup the op context and populate with request controls AddOperationContext opCtx = new AddOperationContext( session, entry ); opCtx.addRequestControls( convertControls( true, requestControls ) ); // Inject the referral handling into the operation context injectReferralControl( opCtx ); // execute add operation OperationManager operationManager = service.getOperationManager(); operationManager.add( opCtx ); // clear the request controls and set the response controls requestControls = EMPTY_CONTROLS; responseControls = JndiUtils.toJndiControls( getDirectoryService().getLdapCodecService(), opCtx.getResponseControls() ); }
AddOperationContext addContext = new AddOperationContext( null, contextEntry ); addContext.setPartition( this ); PartitionTxn partitionTxn = null;
entry.add( SchemaConstants.ENTRY_CSN_AT, directoryService.getCSN().toString() ); AddOperationContext addContext = new AddOperationContext( directoryService.getAdminSession() ); addContext.setDn( numberHolder ); addContext.setEntry( new ClonedServerEntry( entry ) );
private void initializeSystemPartition() throws Exception { Partition system = getSystemPartition(); // Add root context entry for system partition Dn systemSuffixDn = getDnFactory().create( ServerDNConstants.SYSTEM_DN ); CoreSession adminSession = getAdminSession(); if ( !system.hasEntry( new HasEntryOperationContext( adminSession, systemSuffixDn ) ) ) { Entry systemEntry = new DefaultEntry( schemaManager, systemSuffixDn ); // Add the ObjectClasses systemEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, SchemaConstants.ORGANIZATIONAL_UNIT_OC, SchemaConstants.EXTENSIBLE_OBJECT_OC ); // Add some operational attributes systemEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN ); systemEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() ); systemEntry.add( SchemaConstants.ENTRY_CSN_AT, getCSN().toString() ); systemEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() ); systemEntry.put( DnUtils.getRdnAttributeType( ServerDNConstants.SYSTEM_DN ), DnUtils .getRdnValue( ServerDNConstants.SYSTEM_DN ) ); AddOperationContext addOperationContext = new AddOperationContext( adminSession, systemEntry ); system.add( addOperationContext ); } }
AddOperationContext addContext = new AddOperationContext( null, contextEntry );
partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) ); serverEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() ); partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) ); serverEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() ); partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) ); serverEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() ); partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) ); serverEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() ); partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) ); serverEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() ); partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) ); partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) ); partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) ); partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );