public AttributesToGetSearchResultsHandler(final ResultsHandler handler, final String[] attrsToGet) { super(attrsToGet); Assertions.nullCheck(handler, "handler"); this.handler = handler; }
public ApplicationClassLoaderHandler(final ClassLoader applicationClassLoader, final ObjectStreamHandler target) { Assertions.nullCheck(applicationClassLoader, "applicationClassLoader"); Assertions.nullCheck(target, "target"); this.applicationClassLoader = applicationClassLoader; this.target = target; }
/** * Keep the attribute to get.. */ public AttributesToGetResultsHandler(String[] attributesToGet) { Assertions.nullCheck(attributesToGet, "attrsToGet"); this.attrsToGet = attributesToGet; }
/** * Convenience method to set {@link OperationOptions#OP_SORT_KEYS}. * * @param sortKeys The sort keys. May not be null. * @return A this reference to allow chaining * @since 1.4 */ public OperationOptionsBuilder setSortKeys(final SortKey... sortKeys) { Assertions.nullCheck(sortKeys, "sortKeys"); options.put(OperationOptions.OP_SORT_KEYS, sortKeys); return this; }
/** * Convenience method to set {@link OperationOptions#OP_PAGED_RESULTS_COOKIE}. * * @param pagedResultsCookie The pagedResultsCookie. May not be null. * @return A this reference to allow chaining * @since 1.4 */ public OperationOptionsBuilder setPagedResultsCookie(final String pagedResultsCookie) { Assertions.nullCheck(pagedResultsCookie, "pagedResultsCookie"); options.put(OperationOptions.OP_PAGED_RESULTS_COOKIE, pagedResultsCookie); return this; }
/** * Set the run with password option. * * @return A this reference to allow chaining */ public OperationOptionsBuilder setRunWithPassword(final GuardedString password) { Assertions.nullCheck(password, "password"); options.put(OperationOptions.OP_RUN_WITH_PASSWORD, password); return this; }
/** * Convenience method to set {@link OperationOptions#OP_SCOPE}. * * @param scope The scope. May not be null. * @return A this reference to allow chaining */ public OperationOptionsBuilder setScope(final String scope) { Assertions.nullCheck(scope, "scope"); options.put(OperationOptions.OP_SCOPE, scope); return this; }
/** * Convenience method to set {@link OperationOptions#OP_PAGE_SIZE}. * * @param pageSize The pageSize. May not be null. * @return A this reference to allow chaining * @since 1.4 */ public OperationOptionsBuilder setPageSize(final Integer pageSize) { Assertions.nullCheck(pageSize, "pageSize"); options.put(OperationOptions.OP_PAGE_SIZE, pageSize); return this; }
/** * Convenience method to set {@link OperationOptions#OP_SORT_KEYS}. * * @param sortKeys The sort keys. May not be null. * @return A this reference to allow chaining * @since 1.4 */ public OperationOptionsBuilder setSortKeys(final SortKey... sortKeys) { Assertions.nullCheck(sortKeys, "sortKeys"); options.put(OperationOptions.OP_SORT_KEYS, sortKeys); return this; }
/** * Convenience method to set {@link OperationOptions#OP_SORT_KEYS}. * * @param sortKeys The sort keys. May not be null. * @return A this reference to allow chaining * @since 1.4 */ public OperationOptionsBuilder setSortKeys(final List<SortKey> sortKeys) { Assertions.nullCheck(sortKeys, "sortKeys"); options.put(OperationOptions.OP_SORT_KEYS, sortKeys.toArray(new SortKey[sortKeys.size()])); return this; }
/** * Creates a new * * @param value * May not be null. TODO: define set of allowed value types * (currently same as set of allowed attribute values). */ public SyncToken(Object value) { Assertions.nullCheck(value, "value"); FrameworkUtil.checkAttributeValue(value); this.value = value; }
Script(String scriptLanguage, String scriptText) { Assertions.blankCheck(scriptLanguage, "scriptLanguage"); Assertions.nullCheck(scriptText, "scriptText"); // Allow empty text. this.scriptLanguage = scriptLanguage; this.scriptText = scriptText; }
/** * Adds one or many attributes to the {@link ConnectorObject}. */ public ConnectorObjectBuilder addAttribute(Attribute... attrs) { Assertions.nullCheck(attrs, "attrs"); for (Attribute a : attrs) { attributeMap.put(a.getName(), a); } return this; }
/** * Creates a new * * @param value * May not be null. TODO: define set of allowed value types * (currently same as set of allowed attribute values). */ public SyncToken(Object value) { Assertions.nullCheck(value, "value"); FrameworkUtil.checkAttributeValue(value); _value = value; }
/** * Add all the {@link Attribute}s of a {@link Collection}. */ public ConnectorObjectBuilder addAttributes(Collection<Attribute> attrs) { Assertions.nullCheck(attrs, "attrs"); for (Attribute a : attrs) { attributeMap.put(a.getName(), a); } return this; }
/** * Creates a new * * @param value * May not be null. TODO: define set of allowed value types * (currently same as set of allowed attribute values). */ public SyncToken(Object value) { Assertions.nullCheck(value, "value"); FrameworkUtil.checkAttributeValue(value); this.value = value; }
public boolean handle(final Object obj) { Assertions.nullCheck(obj, "obj"); try { _buffer.put(obj); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw ConnectorException.wrap(e); } return !isStopped(); }