/** * {@inheritDoc} */ @Override public Entry lookup( LookupOperationContext lookupContext ) throws LdapException { return session.getDirectoryService().getOperationManager().lookup( lookupContext ); }
/** * Creates a new instance of CompareOperationContext. * * @param session The session to use */ public CompareOperationContext( CoreSession session ) { super( session ); if ( session != null ) { setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) ); } }
/** * Creates a new instance of LookupOperationContext. * * @param session The session to use */ public LookupOperationContext( CoreSession session ) { super( session ); if ( session != null ) { setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LOOKUP ) ); } }
/** * Creates a new instance of HasEntryOperationContext. * * @param session The session to use */ public HasEntryOperationContext( CoreSession session ) { super( session ); if ( session != null ) { setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.HAS_ENTRY ) ); } }
/** * Creates a new instance of MoveAndRenameOperationContext. * * @param session The session to use */ public MoveAndRenameOperationContext( CoreSession session ) { super( session ); if ( session != null ) { setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) ); } }
/** * Creates a new instance of MoveOperationContext. * * @param session The session to use */ public MoveOperationContext( CoreSession session ) { super( session ); if ( session != null ) { setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE ) ); } }
/** * 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 ) ); } }
protected Dn getOperationPrincipal() throws LdapInvalidDnException { Principal principal = opContext.getSession().getEffectivePrincipal(); return opContext.getSession().getDirectoryService().getDnFactory().create( principal.getName() ); }
public PersistentSearchListener( LdapSession session, SearchRequest req ) { this.session = session; this.req = req; req.addAbandonListener( this ); this.psearchControl = ( PersistentSearch ) req.getControls().get( PersistentSearch.OID ); filterCtx = new LookupOperationContext( session.getCoreSession(), req.getAttributes().toArray( Strings.EMPTY_STRING_ARRAY ) ); schemaManager = session.getCoreSession().getDirectoryService().getSchemaManager(); }
/** * {@inheritDoc} */ @Override public void delete( Dn dn ) throws LdapException { DeleteOperationContext deleteContext = new DeleteOperationContext( session, dn ); setup( deleteContext ); session.getDirectoryService().getOperationManager().delete( deleteContext ); }
public Object inject( OperationContext opContext, StoredProcedureParameter param ) throws LdapInvalidDnException { // Return a safe copy constructed with user provided name. return opContext.getSession().getDirectoryService().getDnFactory().create( newSuperiorDn.getName() ); } };
/** * Creates a new instance of UnbindOperationContext. * * @param session The session to use */ public UnbindOperationContext( CoreSession session ) { super( session, session.getEffectivePrincipal().getDn() ); setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) ); }
public Object inject( OperationContext opContext, StoredProcedureParameter param ) throws LdapInvalidDnException { // Return a safe copy constructed with user provided name. return opContext.getSession().getDirectoryService().getDnFactory().create( oldDn.getName() ); } };
public Object inject( OperationContext opContext, StoredProcedureParameter param ) throws LdapInvalidDnException { // Return a safe copy constructed with user provided name. return opContext.getSession().getDirectoryService().getDnFactory().create( oldSuperiorDn.getName() ); } };
public Object inject( OperationContext opContext, StoredProcedureParameter param ) throws LdapInvalidDnException { // Return a safe copy constructed with user provided name. return opContext.getSession().getDirectoryService().getDnFactory().create( modifiedEntryName.getName() ); } };
public Object inject( OperationContext opContext, StoredProcedureParameter param ) throws LdapException { // Return a safe copy constructed with user provided name. return opContext.getSession().getDirectoryService().getDnFactory().create( deletedEntryName.getName() ); } };
public Object inject( OperationContext opContext, StoredProcedureParameter param ) throws LdapInvalidDnException { // Return a safe copy constructed with user provided name. return opContext.getSession().getDirectoryService().getDnFactory().create( newRdn.getName() ); } };
@Override public Object inject( OperationContext opContext, StoredProcedureParameter param ) throws LdapInvalidDnException { // Return a safe copy constructed with user provided name. return opContext.getSession().getDirectoryService().getDnFactory().create( addedEntryName.getName() ); } };
/** * Creates a new instance of UnbindOperationContext. * * @param session The session to use * @param unbindRequest The UnbindRequest to process */ public UnbindOperationContext( CoreSession session, UnbindRequest unbindRequest ) { super( session, session.getEffectivePrincipal().getDn() ); setRequestControls( unbindRequest.getControls() ); setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) ); }
/** * Try to authenticate the usr against the underlying LDAP server. */ private CoreSession authenticate( String user, String password ) throws InvalidNameException, Exception { BindOperationContext bindContext = new BindOperationContext( getLdapSession().getCoreSession() ); bindContext.setDn( new Dn( user ) ); bindContext.setCredentials( Strings.getBytesUtf8( password ) ); getAdminSession().getDirectoryService().getOperationManager().bind( bindContext ); return bindContext.getSession(); }