/** * Creates a new instance of RenameOperationContext. * * @param session The session to use */ public RenameOperationContext( CoreSession session ) { super( session ); if ( session != null ) { setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) ); } }
/** * Creates a new instance of RenameOperationContext. * * @param session The session to use * @param oldDn the dn of the entry before the rename * @param newRdn the new Rdn to use for the target * @param deleteOldRdn true if we delete the old Rdn value */ public RenameOperationContext( CoreSession session, Dn oldDn, Rdn newRdn, boolean deleteOldRdn ) { super( session, oldDn ); this.newRdn = newRdn; this.deleteOldRdn = deleteOldRdn; if ( session != null ) { setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) ); } }
/** * Creates a new instance of RenameOperationContext * * @param session The session to use * @param modifyDnRequest The ModDn operation to apply */ public RenameOperationContext( CoreSession session, ModifyDnRequest modifyDnRequest ) { super( session, modifyDnRequest.getName() ); this.newRdn = modifyDnRequest.getNewRdn(); if ( session != null ) { setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) ); } if ( newRdn == null ) { throw new IllegalStateException( I18n.err( I18n.ERR_328, modifyDnRequest ) ); } this.deleteOldRdn = modifyDnRequest.getDeleteOldRdn(); this.requestControls = modifyDnRequest.getControls(); if ( requestControls.containsKey( ManageDsaIT.OID ) ) { ignoreReferral(); } else { throwReferral(); } }