Minor cleanup: combine multiple Reject.ifNull() calls if possible into varargs calls.
| | |
| | | */ |
| | | public <T> Class<? extends T> loadClass(String className, Class<T> instanceOf) |
| | | throws IllegalPropertyValueException, ClassCastException { |
| | | Reject.ifNull(className); |
| | | Reject.ifNull(instanceOf); |
| | | Reject.ifNull(className, instanceOf); |
| | | |
| | | // Make sure that the named class is valid. |
| | | validateClassName(className); |
| | |
| | | */ |
| | | protected PropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, Class<T> theClass, String propertyName, |
| | | EnumSet<PropertyOption> options, AdministratorAction adminAction, DefaultBehaviorProvider<T> defaultBehavior) { |
| | | Reject.ifNull(d); |
| | | Reject.ifNull(theClass); |
| | | Reject.ifNull(propertyName); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(adminAction); |
| | | Reject.ifNull(defaultBehavior); |
| | | Reject.ifNull(d, theClass, propertyName, options, adminAction, defaultBehavior); |
| | | |
| | | this.definition = d; |
| | | this.theClass = theClass; |
| | |
| | | * The string representation of the required property value. |
| | | */ |
| | | public ContainsCondition(String propertyName, String stringValue) { |
| | | Reject.ifNull(propertyName); |
| | | Reject.ifNull(stringValue); |
| | | Reject.ifNull(propertyName, stringValue); |
| | | this.propertyName = propertyName; |
| | | this.propertyStringValue = stringValue; |
| | | } |
| | |
| | | * If {@code c} or {@code separator} were {@code null}. |
| | | */ |
| | | public static String joinCollection(Collection<?> c, String separator) { |
| | | Reject.ifNull(c); |
| | | Reject.ifNull(separator); |
| | | Reject.ifNull(c, separator); |
| | | |
| | | switch (c.size()) { |
| | | case 0: |
| | |
| | | * @return The updated {@code StringBuilder}. |
| | | */ |
| | | public static StringBuilder toLowerCase(final ByteSequence b, final StringBuilder builder) { |
| | | Reject.ifNull(b); |
| | | Reject.ifNull(builder); |
| | | Reject.ifNull(b, builder); |
| | | |
| | | // FIXME: What locale should we use for non-ASCII characters? I |
| | | // think we should use default to the Unicode StringPrep. |
| | |
| | | */ |
| | | public static void prepareUnicode(final StringBuilder buffer, final ByteSequence sequence, |
| | | final boolean trim, final boolean foldCase) { |
| | | Reject.ifNull(buffer); |
| | | Reject.ifNull(sequence); |
| | | Reject.ifNull(buffer, sequence); |
| | | |
| | | // Optimize in the case of purely ascii characters which is the most |
| | | // common case. |
| | |
| | | * {@code null}. |
| | | */ |
| | | public AVA(final AttributeType attributeType, final Object attributeValue) { |
| | | Reject.ifNull(attributeType); |
| | | Reject.ifNull(attributeValue); |
| | | Reject.ifNull(attributeType, attributeValue); |
| | | |
| | | this.attributeType = attributeType; |
| | | this.attributeValue = ByteString.valueOf(attributeValue); |
| | |
| | | * {@code null}. |
| | | */ |
| | | public AVA(final String attributeType, final Object attributeValue) { |
| | | Reject.ifNull(attributeType); |
| | | Reject.ifNull(attributeValue); |
| | | Reject.ifNull(attributeType, attributeValue); |
| | | |
| | | this.attributeType = Schema.getDefaultSchema().getAttributeType(attributeType); |
| | | this.attributeValue = ByteString.valueOf(attributeValue); |
| | |
| | | public Result search(final SearchRequest request, |
| | | final Collection<? super SearchResultEntry> entries, |
| | | final Collection<? super SearchResultReference> references) throws ErrorResultException { |
| | | Reject.ifNull(request); |
| | | Reject.ifNull(entries); |
| | | Reject.ifNull(request, entries); |
| | | |
| | | // FIXME: does this need to be thread safe? |
| | | final SearchResultHandler handler = new SearchResultHandler() { |
| | |
| | | AbstractLoadBalancingAlgorithm(final Collection<? extends ConnectionFactory> factories, |
| | | final LoadBalancerEventListener listener, final long interval, final TimeUnit unit, |
| | | final ScheduledExecutorService scheduler) { |
| | | Reject.ifNull(factories); |
| | | Reject.ifNull(unit); |
| | | Reject.ifNull(factories, unit); |
| | | |
| | | this.monitoredFactories = new ArrayList<MonitoredConnectionFactory>(factories.size()); |
| | | int i = 0; |
| | |
| | | * If {@code attributeType} or {@code option} was {@code null}. |
| | | */ |
| | | public static AttributeDescription create(final AttributeType attributeType, final String option) { |
| | | Reject.ifNull(attributeType); |
| | | Reject.ifNull(option); |
| | | Reject.ifNull(attributeType, option); |
| | | |
| | | final String oid = attributeType.getNameOrOID(); |
| | | final StringBuilder builder = new StringBuilder(oid.length() + option.length() + 1); |
| | |
| | | @SuppressWarnings("serial") |
| | | public static AttributeDescription valueOf(final String attributeDescription, |
| | | final Schema schema) { |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(schema); |
| | | Reject.ifNull(attributeDescription, schema); |
| | | |
| | | // First look up the attribute description in the cache. |
| | | final WeakHashMap<Schema, Map<String, AttributeDescription>> threadLocalMap = CACHE.get(); |
| | |
| | | */ |
| | | public static final Attribute renameAttribute(final Attribute attribute, |
| | | final AttributeDescription attributeDescription) { |
| | | Reject.ifNull(attribute); |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(attribute, attributeDescription); |
| | | |
| | | // Optimize for the case where no renaming is required. |
| | | if (attribute.getAttributeDescription() == attributeDescription) { |
| | |
| | | */ |
| | | public static final Attribute renameAttribute(final Attribute attribute, |
| | | final String attributeDescription) { |
| | | Reject.ifNull(attribute); |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(attribute, attributeDescription); |
| | | return renameAttribute(attribute, AttributeDescription.valueOf(attributeDescription)); |
| | | } |
| | | |
| | |
| | | */ |
| | | public static ConnectionFactory newAuthenticatedConnectionFactory( |
| | | final ConnectionFactory factory, final BindRequest request) { |
| | | Reject.ifNull(factory); |
| | | Reject.ifNull(request); |
| | | Reject.ifNull(factory, request); |
| | | |
| | | return new AuthenticatedConnectionFactory(factory, request); |
| | | } |
| | |
| | | */ |
| | | public static ConnectionFactory newNamedConnectionFactory(final ConnectionFactory factory, |
| | | final String name) { |
| | | Reject.ifNull(factory); |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(factory, name); |
| | | |
| | | return new ConnectionFactory() { |
| | | |
| | |
| | | * @see #format(String, Schema, Object...) |
| | | */ |
| | | public static DN valueOf(final String dn, final Schema schema) { |
| | | Reject.ifNull(dn); |
| | | Reject.ifNull(schema); |
| | | Reject.ifNull(dn, schema); |
| | | if (dn.length() == 0) { |
| | | return ROOT_DN; |
| | | } |
| | |
| | | * If {@code fromDN} or {@code toDN} was {@code null}. |
| | | */ |
| | | public DN rename(final DN fromDN, final DN toDN) { |
| | | Reject.ifNull(fromDN); |
| | | Reject.ifNull(toDN); |
| | | Reject.ifNull(fromDN, toDN); |
| | | |
| | | if (!isSubordinateOrEqualTo(fromDN)) { |
| | | return this; |
| | |
| | | * @see Requests#newModifyRequest(Entry, Entry) |
| | | */ |
| | | public static ModifyRequest diffEntries(final Entry fromEntry, final Entry toEntry) { |
| | | Reject.ifNull(fromEntry); |
| | | Reject.ifNull(toEntry); |
| | | Reject.ifNull(fromEntry, toEntry); |
| | | |
| | | final ModifyRequest request = Requests.newModifyRequest(fromEntry.getName()); |
| | | |
| | |
| | | * @return The newly created {@code approximate match} filter. |
| | | */ |
| | | public static Filter approx(final String attributeDescription, final Object assertionValue) { |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(assertionValue); |
| | | Reject.ifNull(attributeDescription, assertionValue); |
| | | return new Filter(new ApproxMatchImpl(attributeDescription, ByteString |
| | | .valueOf(assertionValue))); |
| | | } |
| | |
| | | * @return The newly created {@code equality match} filter. |
| | | */ |
| | | public static Filter equality(final String attributeDescription, final Object assertionValue) { |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(assertionValue); |
| | | Reject.ifNull(attributeDescription, assertionValue); |
| | | return new Filter(new EqualityMatchImpl(attributeDescription, ByteString |
| | | .valueOf(assertionValue))); |
| | | } |
| | |
| | | */ |
| | | public static Filter greaterOrEqual(final String attributeDescription, |
| | | final Object assertionValue) { |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(assertionValue); |
| | | Reject.ifNull(attributeDescription, assertionValue); |
| | | return new Filter(new GreaterOrEqualImpl(attributeDescription, ByteString |
| | | .valueOf(assertionValue))); |
| | | } |
| | |
| | | * @return The newly created {@code less or equal} filter. |
| | | */ |
| | | public static Filter lessOrEqual(final String attributeDescription, final Object assertionValue) { |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(assertionValue); |
| | | Reject.ifNull(attributeDescription, assertionValue); |
| | | return new Filter(new LessOrEqualImpl(attributeDescription, ByteString |
| | | .valueOf(assertionValue))); |
| | | } |
| | |
| | | HeartBeatConnectionFactory(final ConnectionFactory factory, final long interval, |
| | | final long timeout, final TimeUnit unit, final SearchRequest heartBeat, |
| | | final ScheduledExecutorService scheduler) { |
| | | Reject.ifNull(factory); |
| | | Reject.ifNull(unit); |
| | | Reject.ifNull(factory, unit); |
| | | Reject.ifFalse(interval >= 0, "negative interval"); |
| | | Reject.ifFalse(timeout >= 0, "negative timeout"); |
| | | |
| | |
| | | */ |
| | | public static X509KeyManager useSingleCertificate(final String alias, |
| | | final X509KeyManager keyManager) { |
| | | Reject.ifNull(alias); |
| | | Reject.ifNull(keyManager); |
| | | Reject.ifNull(alias, keyManager); |
| | | return new SelectCertificate(keyManager, alias); |
| | | } |
| | | |
| | |
| | | * provider requested using options is not found. |
| | | */ |
| | | public LDAPConnectionFactory(final SocketAddress address, final LDAPOptions options) { |
| | | Reject.ifNull(address); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(address, options); |
| | | this.provider = getProvider(TransportProvider.class, options.getTransportProvider(), |
| | | options.getProviderClassLoader()); |
| | | this.impl = provider.getLDAPConnectionFactory(address, options); |
| | |
| | | * provider requested using options is not found. |
| | | */ |
| | | public LDAPConnectionFactory(final String host, final int port, final LDAPOptions options) { |
| | | Reject.ifNull(host); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(host, options); |
| | | final SocketAddress address = new InetSocketAddress(host, port); |
| | | this.provider = getProvider(TransportProvider.class, options.getTransportProvider(), |
| | | options.getProviderClassLoader()); |
| | |
| | | public LDAPListener(final int port, |
| | | final ServerConnectionFactory<LDAPClientContext, Integer> factory, |
| | | final LDAPListenerOptions options) throws IOException { |
| | | Reject.ifNull(factory); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(factory, options); |
| | | final SocketAddress address = new InetSocketAddress(port); |
| | | this.provider = getProvider(TransportProvider.class, options.getTransportProvider(), |
| | | options.getProviderClassLoader()); |
| | |
| | | public LDAPListener(final SocketAddress address, |
| | | final ServerConnectionFactory<LDAPClientContext, Integer> factory, |
| | | final LDAPListenerOptions options) throws IOException { |
| | | Reject.ifNull(address); |
| | | Reject.ifNull(factory); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(address, factory, options); |
| | | this.provider = getProvider(TransportProvider.class, options.getTransportProvider(), |
| | | options.getProviderClassLoader()); |
| | | this.impl = provider.getLDAPListener(address, factory, options); |
| | |
| | | public LDAPListener(final String host, final int port, |
| | | final ServerConnectionFactory<LDAPClientContext, Integer> factory, |
| | | final LDAPListenerOptions options) throws IOException { |
| | | Reject.ifNull(host); |
| | | Reject.ifNull(factory); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(host, factory, options); |
| | | final SocketAddress address = new InetSocketAddress(host, port); |
| | | this.provider = getProvider(TransportProvider.class, options.getTransportProvider(), |
| | | options.getProviderClassLoader()); |
| | |
| | | * If {@code url} or {@code schema} was {@code null}. |
| | | */ |
| | | public static LDAPUrl valueOf(final String url, final Schema schema) { |
| | | Reject.ifNull(url); |
| | | Reject.ifNull(schema); |
| | | Reject.ifNull(url, schema); |
| | | return new LDAPUrl(url, schema); |
| | | } |
| | | |
| | |
| | | * The the attribute containing the values to be modified. |
| | | */ |
| | | public Modification(final ModificationType modificationType, final Attribute attribute) { |
| | | Reject.ifNull(modificationType); |
| | | Reject.ifNull(attribute); |
| | | Reject.ifNull(modificationType, attribute); |
| | | this.modificationType = modificationType; |
| | | this.attribute = attribute; |
| | | } |
| | |
| | | * If {@code schema} or {@code keys} was {@code null}. |
| | | */ |
| | | public static Comparator<Entry> comparator(final Schema schema, final Collection<SortKey> keys) { |
| | | Reject.ifNull(schema); |
| | | Reject.ifNull(keys); |
| | | Reject.ifNull(schema, keys); |
| | | Reject.ifFalse(!keys.isEmpty(), "keys must not be empty"); |
| | | |
| | | final List<Comparator<Entry>> comparators = new ArrayList<Comparator<Entry>>(keys.size()); |
| | |
| | | */ |
| | | public static X509TrustManager checkHostName(final String hostNamePattern, |
| | | final X509TrustManager trustManager) { |
| | | Reject.ifNull(trustManager); |
| | | Reject.ifNull(hostNamePattern); |
| | | Reject.ifNull(trustManager, hostNamePattern); |
| | | return new CheckHostName(trustManager, hostNamePattern); |
| | | } |
| | | |
| | |
| | | |
| | | public EntryChangeNotificationResponseControl decodeControl(final Control control, |
| | | final DecodeOptions options) throws DecodeException { |
| | | Reject.ifNull(control); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(control, options); |
| | | |
| | | if (control instanceof EntryChangeNotificationResponseControl) { |
| | | return (EntryChangeNotificationResponseControl) control; |
| | |
| | | |
| | | public ServerSideSortResponseControl decodeControl(final Control control, |
| | | final DecodeOptions options) throws DecodeException { |
| | | Reject.ifNull(control); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(control, options); |
| | | |
| | | if (control instanceof ServerSideSortResponseControl) { |
| | | return (ServerSideSortResponseControl) control; |
| | |
| | | @Override |
| | | public final <C extends Control> C getControl(final ControlDecoder<C> decoder, |
| | | final DecodeOptions options) throws DecodeException { |
| | | Reject.ifNull(decoder); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(decoder, options); |
| | | final Control control = getControl(controls, decoder.getOID()); |
| | | return control != null ? decoder.decodeControl(control, options) : null; |
| | | } |
| | |
| | | @Override |
| | | public final <C extends Control> C getControl(final ControlDecoder<C> decoder, |
| | | final DecodeOptions options) throws DecodeException { |
| | | Reject.ifNull(decoder); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(decoder, options); |
| | | |
| | | final List<Control> controls = impl.getControls(); |
| | | final Control control = AbstractRequestImpl.getControl(controls, decoder.getOID()); |
| | |
| | | } |
| | | |
| | | CRAMMD5SASLBindRequestImpl(final String authenticationID, final byte[] password) { |
| | | Reject.ifNull(authenticationID); |
| | | Reject.ifNull(password); |
| | | Reject.ifNull(authenticationID, password); |
| | | this.authenticationID = authenticationID; |
| | | this.password = password; |
| | | } |
| | |
| | | } |
| | | |
| | | DigestMD5SASLBindRequestImpl(final String authenticationID, final byte[] password) { |
| | | Reject.ifNull(authenticationID); |
| | | Reject.ifNull(password); |
| | | Reject.ifNull(authenticationID, password); |
| | | this.authenticationID = authenticationID; |
| | | this.password = password; |
| | | } |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest addAdditionalAuthParam(final String name, final String value) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(value); |
| | | Reject.ifNull(name, value); |
| | | additionalAuthParams.put(name, value); |
| | | return this; |
| | | } |
| | |
| | | } |
| | | |
| | | GSSAPISASLBindRequestImpl(final String authenticationID, final byte[] password) { |
| | | Reject.ifNull(authenticationID); |
| | | Reject.ifNull(password); |
| | | Reject.ifNull(authenticationID, password); |
| | | this.authenticationID = authenticationID; |
| | | this.password = password; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest addAdditionalAuthParam(final String name, final String value) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(value); |
| | | Reject.ifNull(name, value); |
| | | additionalAuthParams.put(name, value); |
| | | return this; |
| | | } |
| | |
| | | @Override |
| | | public ModifyRequest addModification(final ModificationType type, |
| | | final String attributeDescription, final Object... values) { |
| | | Reject.ifNull(type); |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(type, attributeDescription); |
| | | Reject.ifNull(values); |
| | | changes.add(new Modification(type, new LinkedAttribute(attributeDescription, values))); |
| | | return this; |
| | |
| | | } |
| | | |
| | | PlainSASLBindRequestImpl(final String authenticationID, final byte[] password) { |
| | | Reject.ifNull(authenticationID); |
| | | Reject.ifNull(password); |
| | | Reject.ifNull(authenticationID, password); |
| | | this.authenticationID = authenticationID; |
| | | this.password = password; |
| | | } |
| | |
| | | */ |
| | | public static CompareRequest newCompareRequest(final DN name, |
| | | final AttributeDescription attributeDescription, final Object assertionValue) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(assertionValue); |
| | | Reject.ifNull(name, attributeDescription, assertionValue); |
| | | return new CompareRequestImpl(name, attributeDescription, ByteString |
| | | .valueOf(assertionValue)); |
| | | } |
| | |
| | | */ |
| | | public static CompareRequest newCompareRequest(final String name, |
| | | final String attributeDescription, final Object assertionValue) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(attributeDescription); |
| | | Reject.ifNull(assertionValue); |
| | | Reject.ifNull(name, attributeDescription, assertionValue); |
| | | return new CompareRequestImpl(DN.valueOf(name), AttributeDescription |
| | | .valueOf(attributeDescription), ByteString.valueOf(assertionValue)); |
| | | } |
| | |
| | | */ |
| | | public static GenericBindRequest newGenericBindRequest(final String name, |
| | | final byte authenticationType, final byte[] authenticationValue) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(authenticationValue); |
| | | Reject.ifNull(name, authenticationValue); |
| | | return new GenericBindRequestImpl(name, authenticationType, authenticationValue); |
| | | } |
| | | |
| | |
| | | * If {@code name} or {@code newRDN} was {@code null}. |
| | | */ |
| | | public static ModifyDNRequest newModifyDNRequest(final String name, final String newRDN) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(newRDN); |
| | | Reject.ifNull(name, newRDN); |
| | | return new ModifyDNRequestImpl(DN.valueOf(name), RDN.valueOf(newRDN)); |
| | | } |
| | | |
| | |
| | | */ |
| | | public static SearchRequest newSearchRequest(final DN name, final SearchScope scope, |
| | | final Filter filter, final String... attributeDescriptions) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(scope); |
| | | Reject.ifNull(filter); |
| | | Reject.ifNull(name, scope, filter); |
| | | final SearchRequest request = new SearchRequestImpl(name, scope, filter); |
| | | for (final String attributeDescription : attributeDescriptions) { |
| | | request.addAttribute(attributeDescription); |
| | |
| | | */ |
| | | public static SearchRequest newSearchRequest(final String name, final SearchScope scope, |
| | | final String filter, final String... attributeDescriptions) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(scope); |
| | | Reject.ifNull(filter); |
| | | Reject.ifNull(name, scope, filter); |
| | | final SearchRequest request = |
| | | new SearchRequestImpl(DN.valueOf(name), scope, Filter.valueOf(filter)); |
| | | for (final String attributeDescription : attributeDescriptions) { |
| | |
| | | * If {@code name} or {@code password} was {@code null}. |
| | | */ |
| | | public static SimpleBindRequest newSimpleBindRequest(final String name, final byte[] password) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(password); |
| | | Reject.ifNull(name, password); |
| | | return new SimpleBindRequestImpl(name, password); |
| | | } |
| | | |
| | |
| | | * If {@code name} or {@code password} was {@code null}. |
| | | */ |
| | | public static SimpleBindRequest newSimpleBindRequest(final String name, final char[] password) { |
| | | Reject.ifNull(name); |
| | | Reject.ifNull(password); |
| | | Reject.ifNull(name, password); |
| | | return new SimpleBindRequestImpl(name, getBytes(password)); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public final <C extends Control> C getControl(final ControlDecoder<C> decoder, |
| | | final DecodeOptions options) throws DecodeException { |
| | | Reject.ifNull(decoder); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(decoder, options); |
| | | final Control control = getControl(controls, decoder.getOID()); |
| | | return control != null ? decoder.decodeControl(control, options) : null; |
| | | } |
| | |
| | | @Override |
| | | public final <C extends Control> C getControl(final ControlDecoder<C> decoder, |
| | | final DecodeOptions options) throws DecodeException { |
| | | Reject.ifNull(decoder); |
| | | Reject.ifNull(options); |
| | | Reject.ifNull(decoder, options); |
| | | |
| | | final List<Control> controls = impl.getControls(); |
| | | final Control control = AbstractResponseImpl.getControl(controls, decoder.getOID()); |
| | |
| | | final String definition) { |
| | | super(description, extraProperties, definition); |
| | | |
| | | Reject.ifNull(oid); |
| | | Reject.ifNull(names); |
| | | Reject.ifNull(description); |
| | | Reject.ifNull(attributeUsage); |
| | | Reject.ifNull(oid, names, attributeUsage); |
| | | Reject.ifFalse(superiorType != null || syntax != null, "superiorType and/or syntax must not be null"); |
| | | Reject.ifNull(extraProperties); |
| | | |
| | | this.oid = oid; |
| | | this.names = names; |
| | |
| | | final Map<String, List<String>> extraProperties, final String definition) { |
| | | super(description, extraProperties, definition); |
| | | |
| | | Reject.ifNull(structuralClassOID); |
| | | Reject.ifNull(names); |
| | | Reject.ifNull(auxiliaryClassOIDs); |
| | | Reject.ifNull(optionalAttributeOIDs); |
| | | Reject.ifNull(prohibitedAttributeOIDs); |
| | | Reject.ifNull(requiredAttributeOIDs); |
| | | Reject.ifNull(structuralClassOID, names, auxiliaryClassOIDs, optionalAttributeOIDs, prohibitedAttributeOIDs, |
| | | requiredAttributeOIDs); |
| | | this.names = names; |
| | | this.isObsolete = obsolete; |
| | | this.structuralClassOID = structuralClassOID; |
| | |
| | | final Map<String, List<String>> extraProperties, final String definition) { |
| | | super(description, extraProperties, definition); |
| | | |
| | | Reject.ifNull(ruleID); |
| | | Reject.ifNull(nameFormOID); |
| | | Reject.ifNull(superiorRuleIDs); |
| | | Reject.ifNull(ruleID, nameFormOID, superiorRuleIDs); |
| | | this.ruleID = ruleID; |
| | | this.names = names; |
| | | this.isObsolete = obsolete; |
| | |
| | | private final List<String> entries; |
| | | |
| | | EnumSyntaxImpl(final String oid, final List<String> entries) { |
| | | Reject.ifNull(oid); |
| | | Reject.ifNull(entries); |
| | | Reject.ifNull(oid, entries); |
| | | this.oid = oid; |
| | | final List<String> entryStrings = new ArrayList<String>(entries.size()); |
| | | |
| | |
| | | final Map<String, List<String>> extraProperties, final String definition) { |
| | | super(description, extraProperties, definition); |
| | | |
| | | Reject.ifNull(oid); |
| | | Reject.ifNull(names); |
| | | Reject.ifNull(attributeOIDs); |
| | | Reject.ifNull(oid, names, attributeOIDs); |
| | | this.oid = oid; |
| | | this.names = names; |
| | | this.isObsolete = obsolete; |
| | |
| | | final String definition) { |
| | | super(description, extraProperties, definition); |
| | | |
| | | Reject.ifNull(oid); |
| | | Reject.ifNull(names); |
| | | Reject.ifNull(superiorClassOIDs); |
| | | Reject.ifNull(requiredAttributeOIDs); |
| | | Reject.ifNull(optionalAttributeOIDs); |
| | | Reject.ifNull(objectClassType); |
| | | Reject.ifNull(oid, names, superiorClassOIDs, requiredAttributeOIDs, optionalAttributeOIDs, objectClassType); |
| | | this.oid = oid; |
| | | this.names = names; |
| | | this.isObsolete = obsolete; |
| | |
| | | |
| | | SchemaElement(final String description, final Map<String, List<String>> extraProperties, |
| | | final String definition) { |
| | | Reject.ifNull(description); |
| | | Reject.ifNull(extraProperties); |
| | | Reject.ifNull(description, extraProperties); |
| | | this.description = description; |
| | | this.extraProperties = extraProperties; // Should already be unmodifiable. |
| | | this.definition = definition; |
| | |
| | | */ |
| | | TemplateFile(Schema schema, Map<String, String> constants, String resourcePath, Random random) |
| | | throws IOException { |
| | | Reject.ifNull(schema); |
| | | Reject.ifNull(random); |
| | | Reject.ifNull(schema, random); |
| | | this.schema = schema; |
| | | this.constants = constants != null ? constants : new HashMap<String, String>(); |
| | | this.resourcePath = resourcePath; |
| | |
| | | * If {@code factory} or {@code request} was {@code null}. |
| | | */ |
| | | AuthenticatedConnectionFactory(final ConnectionFactory factory, final BindRequest request) { |
| | | Reject.ifNull(factory); |
| | | Reject.ifNull(request); |
| | | Reject.ifNull(factory, request); |
| | | this.parentFactory = factory; |
| | | |
| | | // FIXME: should do a defensive copy. |
| | |
| | | PromptingTrustManager(final ConsoleApplication app, final String acceptedStorePath, |
| | | final X509TrustManager sourceTrustManager) throws KeyStoreException, IOException, |
| | | NoSuchAlgorithmException, CertificateException { |
| | | Reject.ifNull(app); |
| | | Reject.ifNull(acceptedStorePath); |
| | | Reject.ifNull(app, acceptedStorePath); |
| | | this.app = app; |
| | | this.nestedTrustManager = sourceTrustManager; |
| | | inMemoryTrustStore = KeyStore.getInstance(KeyStore.getDefaultType()); |
| | |
| | | * The types of event that have occurred in the data provider. |
| | | */ |
| | | public DataProviderEvent(final LocalizableMessage reason, final Set<Type> types) { |
| | | Reject.ifNull(reason); |
| | | Reject.ifNull(types); |
| | | Reject.ifNull(reason, types); |
| | | Reject.ifTrue(types.isEmpty()); |
| | | |
| | | this.reason = reason; |