/** * Default constructor creates a PersistentSearch Control automatically * wrapped in a decorator object inside this container. * * @param codec The LDAP service instance */ public PersistentSearchDecorator( LdapApiService codec ) { this( codec, new PersistentSearchImpl() ); }
public static Control getSearchContinuationControl(LdapServerType serverType) throws LscServiceConfigurationException { switch(serverType) { case OPEN_LDAP: case APACHE_DS: DefaultLdapCodecService codec = new DefaultLdapCodecService(); SyncRequestValueDecorator syncControl = new SyncRequestValueDecorator(codec); syncControl.setMode(SynchronizationModeEnum.REFRESH_AND_PERSIST); return syncControl; case OPEN_DS: case OPEN_DJ: case ORACLE_DS: case SUN_DS: case NETSCAPE_DS: case NOVELL_E_DIRECTORY: PersistentSearchImpl searchControl = new PersistentSearchImpl(); searchControl.setCritical(true); searchControl.setChangesOnly(true); searchControl.setReturnECs(false); searchControl.setChangeTypes(PersistentSearch.CHANGE_TYPES_MAX); return searchControl; case ACTIVE_DIRECTORY: return new AbstractControl("1.2.840.113556.1.4.528", true) {}; default: throw new LscServiceConfigurationException("Unknown or unsupported server type !"); } }
} else if (PersistentSearchRequestControl.OID.equals(requestControl.getOID())) { final PersistentSearchRequestControl c = (PersistentSearchRequestControl) requestControl; ctl = new PersistentSearchImpl(); for (PersistentSearchChangeType type : c.getChangeTypes()) { ((PersistentSearchImpl) ctl).enableNotification(ChangeType.getChangeType(type.value())); ((PersistentSearchImpl) ctl).setChangesOnly(c.getChangesOnly()); ((PersistentSearchImpl) ctl).setReturnECs(c.getReturnEcs()); ctl.setCritical(c.getCriticality()); } else if (DirSyncControl.OID.equals(requestControl.getOID())) {
/** * Return a String representing this PSearchControl. */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( " Persistant Search Control\n" ); sb.append( " oid : " ).append( getOid() ).append( '\n' ); sb.append( " critical : " ).append( isCritical() ).append( '\n' ); sb.append( " changeTypes : '" ).append( changeTypes ).append( "'\n" ); sb.append( " changesOnly : '" ).append( changesOnly ).append( "'\n" ); sb.append( " returnECs : '" ).append( returnECs ).append( "'\n" ); return sb.toString(); } }
/** * Return a String representing this PSearchControl. */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( " Persistant Search Control\n" ); sb.append( " oid : " ).append( getOid() ).append( '\n' ); sb.append( " critical : " ).append( isCritical() ).append( '\n' ); sb.append( " changeTypes : '" ).append( changeTypes ).append( "'\n" ); sb.append( " changesOnly : '" ).append( changesOnly ).append( "'\n" ); sb.append( " returnECs : '" ).append( returnECs ).append( "'\n" ); return sb.toString(); } }
/** * Return a String representing this PSearchControl. */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( " Persistant Search Control\n" ); sb.append( " oid : " ).append( getOid() ).append( '\n' ); sb.append( " critical : " ).append( isCritical() ).append( '\n' ); sb.append( " changeTypes : '" ).append( changeTypes ).append( "'\n" ); sb.append( " changesOnly : '" ).append( changesOnly ).append( "'\n" ); sb.append( " returnECs : '" ).append( returnECs ).append( "'\n" ); return sb.toString(); } }
/** * Default constructor creates a PersistentSearch Control automatically * wrapped in a decorator object inside this container. * * @param codec The LDAP service instance */ public PersistentSearchDecorator( LdapApiService codec ) { this( codec, new PersistentSearchImpl() ); }
/** * Default constructor creates a PersistentSearch Control automatically * wrapped in a decorator object inside this container. * * @param codec The LDAP service instance */ public PersistentSearchDecorator( LdapApiService codec ) { this( codec, new PersistentSearchImpl() ); }