Fix OPENDJ-394: Do not declare unchecked exceptions in method declarations
| | |
| | | <module name="FinalClass" /> |
| | | <module name="HideUtilityClassConstructor" /> |
| | | <module name="UpperEll" /> |
| | | <module name="RedundantThrows"> |
| | | <property name="allowSubclasses" value="true"/> |
| | | </module> |
| | | </module> |
| | | <module name="JavadocPackage" /> |
| | | <module name="RegexpHeader"> |
| | | <property name="headerFile" value="${checkstyle.header.file}" /> |
| | | <property name="header" value="^/\*$\n^ \* CDDL HEADER START$\n^ \*$\n^ \* The contents of this file are subject to the terms of the$\n^ \* Common Development and Distribution License, Version 1.0 only$\n^ \* \(the "License"\). You may not use this file except in compliance$\n^ \* with the License.$\n^ \*$\n^ \* You can obtain a copy of the license at$\n^ \* trunk/opendj3/legal-notices/CDDLv1_0.txt$\n^ \* or http://forgerock.org/license/CDDLv1.0.html.$\n^ \* See the License for the specific language governing permissions$\n^ \* and limitations under the License.$\n^ \*\n^ \* When distributing Covered Code, include this CDDL HEADER in each$\n^ \* file and include the License file at$\n^ \* trunk/opendj3/legal-notices/CDDLv1_0.txt. If applicable,$\n^ \* add the following below this CDDL HEADER, with the fields enclosed$\n^ \* by brackets "\[\]" replaced with your own identifying information:$\n^ \* Portions Copyright \[yyyy\] \[name of copyright owner\]$\n^ \*$\n^ \* CDDL HEADER END$\n"/> |
| | | </module> |
| | | <module name="FileTabCharacter"> |
| | | <property name="eachLine" value="true" /> |
| | |
| | | |
| | | <module name="Checker"> |
| | | <module name="RegexpHeader"> |
| | | <property name="headerFile" value="${checkstyle.header.file}" /> |
| | | <property name="header" value="^/\*$\n^ \* CDDL HEADER START$\n^ \*$\n^ \* The contents of this file are subject to the terms of the$\n^ \* Common Development and Distribution License, Version 1.0 only$\n^ \* \(the "License"\). You may not use this file except in compliance$\n^ \* with the License.$\n^ \*$\n^ \* You can obtain a copy of the license at$\n^ \* trunk/opendj3/legal-notices/CDDLv1_0.txt$\n^ \* or http://forgerock.org/license/CDDLv1.0.html.$\n^ \* See the License for the specific language governing permissions$\n^ \* and limitations under the License.$\n^ \*\n^ \* When distributing Covered Code, include this CDDL HEADER in each$\n^ \* file and include the License file at$\n^ \* trunk/opendj3/legal-notices/CDDLv1_0.txt. If applicable,$\n^ \* add the following below this CDDL HEADER, with the fields enclosed$\n^ \* by brackets "\[\]" replaced with your own identifying information:$\n^ \* Portions Copyright \[yyyy\] \[name of copyright owner\]$\n^ \*$\n^ \* CDDL HEADER END$\n"/> |
| | | </module> |
| | | <module name="FileTabCharacter"> |
| | | <property name="eachLine" value="true" /> |
| | |
| | | */ |
| | | package org.forgerock.opendj.examples.getinfo; |
| | | |
| | | |
| | | |
| | | import java.io.IOException; |
| | | |
| | | import org.forgerock.opendj.ldap.Connection; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | | import org.forgerock.opendj.ldap.LDAPConnectionFactory; |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | import org.forgerock.opendj.ldap.SearchScope; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldap.responses.SearchResultEntry; |
| | | import org.forgerock.opendj.ldif.LDIFEntryWriter; |
| | | |
| | |
| | | * Access the directory over LDAP to request information about capabilities |
| | | * and schema. |
| | | * |
| | | * @param args The command line arguments |
| | | * @param args |
| | | * The command line arguments |
| | | */ |
| | | public static void main(final String[] args) |
| | | { |
| | |
| | | */ |
| | | private static void connect() |
| | | { |
| | | final LDAPConnectionFactory factory = new LDAPConnectionFactory( |
| | | host, port); |
| | | final LDAPConnectionFactory factory = new LDAPConnectionFactory(host, port); |
| | | Connection connection = null; |
| | | |
| | | try |
| | |
| | | |
| | | final String attributeList; |
| | | if (infoType.toLowerCase().equals("controls")) |
| | | { |
| | | attributeList = "supportedControl"; |
| | | } |
| | | else if (infoType.toLowerCase().equals("extops")) |
| | | { |
| | | attributeList = "supportedExtension"; |
| | | } |
| | | else |
| | | attributeList = "+"; // All operational attributes |
| | | { |
| | | attributeList = "+"; // All operational attributes |
| | | } |
| | | |
| | | final SearchResultEntry entry = connection.searchSingleEntry( |
| | | "", // DN is "" for root DSE. |
| | | SearchScope.BASE_OBJECT, // Read only the root DSE. |
| | | "objectclass=*", // Every object matches this filter. |
| | | attributeList); // Return these requested attributes. |
| | | "", // DN is "" for root DSE. |
| | | SearchScope.BASE_OBJECT, // Read only the root DSE. |
| | | "objectclass=*", // Every object matches this filter. |
| | | attributeList); // Return these requested attributes. |
| | | |
| | | final LDIFEntryWriter writer = new LDIFEntryWriter(System.out); |
| | | writer.writeComment("Root DSE for LDAP server at " + host + ":" + port); |
| | | if (entry != null) writer.writeEntry(entry); |
| | | if (entry != null) |
| | | { |
| | | writer.writeEntry(entry); |
| | | } |
| | | writer.flush(); |
| | | } |
| | | catch (final ErrorResultException e) |
| | |
| | | System.exit(ResultCode.CLIENT_SIDE_USER_CANCELLED.intValue()); |
| | | return; |
| | | } |
| | | catch (IOException e) |
| | | catch (final IOException e) |
| | | { |
| | | System.err.println(e.getMessage()); |
| | | System.exit(ResultCode.CLIENT_SIDE_LOCAL_ERROR.intValue()); |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (connection != null) connection.close(); |
| | | if (connection != null) |
| | | { |
| | | connection.close(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Parse command line arguments. |
| | | * @param args host port bind-dn bind-password info-type |
| | | */ |
| | | private static void parseArgs(String[] args) |
| | | { |
| | | if (args.length != 3) giveUp(); |
| | | |
| | | host = args[0]; |
| | | port = Integer.parseInt(args[1]); |
| | | infoType = args[2]; // all, controls, or extops |
| | | if (! |
| | | ( |
| | | infoType.toLowerCase().equals("all") || |
| | | infoType.toLowerCase().equals("controls") || |
| | | infoType.toLowerCase().equals("extops") |
| | | ) |
| | | ) |
| | | giveUp(); |
| | | } |
| | | |
| | | |
| | | |
| | | private static void giveUp() |
| | | { |
| | | printUsage(); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Parse command line arguments. |
| | | * |
| | | * @param args |
| | | * host port bind-dn bind-password info-type |
| | | */ |
| | | private static void parseArgs(final String[] args) |
| | | { |
| | | if (args.length != 3) |
| | | { |
| | | giveUp(); |
| | | } |
| | | |
| | | host = args[0]; |
| | | port = Integer.parseInt(args[1]); |
| | | infoType = args[2]; // all, controls, or extops |
| | | if (!(infoType.toLowerCase().equals("all") |
| | | || infoType.toLowerCase().equals("controls") |
| | | || infoType.toLowerCase().equals("extops"))) |
| | | { |
| | | giveUp(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | private static void printUsage() |
| | | { |
| | | System.err.println( |
| | | "Usage: host port info-type"); |
| | | System.err.println( |
| | | "\tAll arguments are required."); |
| | | System.err.println( |
| | | "\tinfo-type to get can be either all, controls, or extops."); |
| | | System.err.println("Usage: host port info-type"); |
| | | System.err.println("\tAll arguments are required."); |
| | | System.err |
| | | .println("\tinfo-type to get can be either all, controls, or extops."); |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.examples.proxy; |
| | |
| | | final AddRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | addProxiedAuthControl(request); |
| | | final ConnectionCompletionHandler<Result> outerHandler = |
| | |
| | | final int version, final BindRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | |
| | | if (request.getAuthenticationType() != ((byte) 0x80)) |
| | |
| | | final CompareRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super CompareResult> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | addProxiedAuthControl(request); |
| | | final ConnectionCompletionHandler<CompareResult> outerHandler = |
| | |
| | | final DeleteRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | addProxiedAuthControl(request); |
| | | final ConnectionCompletionHandler<Result> outerHandler = |
| | |
| | | final RequestContext requestContext, final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super R> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | if (request.getOID().equals(CancelExtendedRequest.OID)) |
| | | { |
| | |
| | | final ModifyRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | addProxiedAuthControl(request); |
| | | final ConnectionCompletionHandler<Result> outerHandler = |
| | |
| | | final ModifyDNRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | addProxiedAuthControl(request); |
| | | final ConnectionCompletionHandler<Result> outerHandler = |
| | |
| | | final SearchRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final SearchResultHandler resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | addProxiedAuthControl(request); |
| | | final ConnectionCompletionHandler<Result> outerHandler = |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.examples.server; |
| | |
| | | final AddRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | // TODO: controls. |
| | | entryLock.writeLock().lock(); |
| | |
| | | final int version, final BindRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | if (request.getAuthenticationType() != ((byte) 0x80)) |
| | | { |
| | |
| | | final CompareRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super CompareResult> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | // TODO: |
| | | } |
| | |
| | | final DeleteRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | // TODO: controls. |
| | | entryLock.writeLock().lock(); |
| | |
| | | final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super R> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | // TODO: not implemented. |
| | | resultHandler.handleErrorResult(newErrorResult( |
| | |
| | | final ModifyRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | // TODO: controls. |
| | | // TODO: read lock is not really enough since concurrent updates may |
| | |
| | | final ModifyDNRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | // TODO: not implemented. |
| | | resultHandler.handleErrorResult(newErrorResult( |
| | |
| | | final SearchRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final SearchResultHandler resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | // TODO: controls, limits, etc. |
| | | entryLock.readLock().lock(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.ldap; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public void readEndSequence() throws IOException, IllegalStateException |
| | | public void readEndSequence() throws IOException |
| | | { |
| | | readLimiter = readLimiter.endSequence(); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package com.forgerock.opendj.ldap; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public ASN1Writer writeEndSequence() throws IOException, |
| | | IllegalStateException |
| | | public ASN1Writer writeEndSequence() throws IOException |
| | | { |
| | | sequenceBuffer = sequenceBuffer.endSequence(); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.ldap; |
| | |
| | | */ |
| | | @Override |
| | | public FutureResult<Void> abandonAsync(final AbandonRequest request) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final int i = messageID.getAndIncrement(); |
| | | serverConnection.handleAbandon(i, request); |
| | |
| | | public FutureResult<Result> addAsync(final AddRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final int i = messageID.getAndIncrement(); |
| | | final LDAPFutureResultImpl future = new LDAPFutureResultImpl(i, request, |
| | |
| | | */ |
| | | @Override |
| | | public void addConnectionEventListener(final ConnectionEventListener listener) |
| | | throws IllegalStateException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(listener); |
| | | listeners.add(listener); |
| | |
| | | public FutureResult<BindResult> bindAsync(final BindRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final int i = messageID.getAndIncrement(); |
| | | final InternalBindFutureResultImpl future = new InternalBindFutureResultImpl( |
| | |
| | | public FutureResult<CompareResult> compareAsync(final CompareRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super CompareResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final int i = messageID.getAndIncrement(); |
| | | final LDAPCompareFutureResultImpl future = new LDAPCompareFutureResultImpl( |
| | |
| | | public FutureResult<Result> deleteAsync(final DeleteRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final int i = messageID.getAndIncrement(); |
| | | final LDAPFutureResultImpl future = new LDAPFutureResultImpl(i, request, |
| | |
| | | final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super R> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final int i = messageID.getAndIncrement(); |
| | | final LDAPExtendedFutureResultImpl<R> future = new LDAPExtendedFutureResultImpl<R>( |
| | |
| | | public FutureResult<Result> modifyAsync(final ModifyRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final int i = messageID.getAndIncrement(); |
| | | final LDAPFutureResultImpl future = new LDAPFutureResultImpl(i, request, |
| | |
| | | public FutureResult<Result> modifyDNAsync(final ModifyDNRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final int i = messageID.getAndIncrement(); |
| | | final LDAPFutureResultImpl future = new LDAPFutureResultImpl(i, request, |
| | |
| | | */ |
| | | @Override |
| | | public void removeConnectionEventListener( |
| | | final ConnectionEventListener listener) throws NullPointerException |
| | | final ConnectionEventListener listener) |
| | | { |
| | | Validator.ensureNotNull(listener); |
| | | listeners.remove(listener); |
| | |
| | | public FutureResult<Result> searchAsync(final SearchRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final SearchResultHandler resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final int i = messageID.getAndIncrement(); |
| | | final LDAPSearchFutureResultImpl future = new LDAPSearchFutureResultImpl(i, |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package com.forgerock.opendj.ldap; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public void addConnectionEventListener(final ConnectionEventListener listener) |
| | | throws IllegalStateException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(listener); |
| | | listeners.add(listener); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public void close(final UnbindRequest request, final String reason) |
| | | throws NullPointerException |
| | | { |
| | | // FIXME: I18N need to internationalize this message. |
| | | Validator.ensureNotNull(request); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public void removeConnectionEventListener( |
| | | final ConnectionEventListener listener) throws NullPointerException |
| | | final ConnectionEventListener listener) |
| | | { |
| | | Validator.ensureNotNull(listener); |
| | | listeners.remove(listener); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.ldap; |
| | |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | | import org.glassfish.grizzly.AbstractTransformer; |
| | | import org.glassfish.grizzly.Buffer; |
| | | import org.glassfish.grizzly.TransformationException; |
| | | import org.glassfish.grizzly.TransformationResult; |
| | | import org.glassfish.grizzly.attributes.AttributeStorage; |
| | | import org.glassfish.grizzly.memory.Buffers; |
| | |
| | | @Override |
| | | public TransformationResult<Buffer, Buffer> transformImpl( |
| | | final AttributeStorage storage, final Buffer input) |
| | | throws TransformationException |
| | | { |
| | | |
| | | final int len = Math.min(buffer.length, input.remaining()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.ldap; |
| | |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | | import org.glassfish.grizzly.AbstractTransformer; |
| | | import org.glassfish.grizzly.Buffer; |
| | | import org.glassfish.grizzly.TransformationException; |
| | | import org.glassfish.grizzly.TransformationResult; |
| | | import org.glassfish.grizzly.attributes.AttributeStorage; |
| | | import org.glassfish.grizzly.memory.Buffers; |
| | |
| | | @Override |
| | | public TransformationResult<Buffer, Buffer> transformImpl( |
| | | final AttributeStorage storage, final Buffer input) |
| | | throws TransformationException |
| | | { |
| | | |
| | | final int len = Math.min(buffer.length, input.remaining()); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.ldap.extensions; |
| | |
| | | */ |
| | | public static GetConnectionIDExtendedResult newResult( |
| | | final ResultCode resultCode, final int connectionID) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(resultCode); |
| | | return new GetConnectionIDExtendedResult(resultCode, connectionID); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package com.forgerock.opendj.util; |
| | | |
| | |
| | | * If {@code base64} was {@code null}. |
| | | */ |
| | | public static ByteString decode(final String base64) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | ensureNotNull(base64); |
| | | |
| | |
| | | * If {@code bytes} was {@code null}. |
| | | */ |
| | | public static String encode(final ByteSequence bytes) |
| | | throws NullPointerException |
| | | { |
| | | ensureNotNull(bytes); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.util; |
| | |
| | | * If {@code errorResult} was {@code null}. |
| | | */ |
| | | public CompletedFutureResult(final ErrorResultException errorResult) |
| | | throws NullPointerException |
| | | { |
| | | this(errorResult, -1); |
| | | } |
| | |
| | | * If {@code errorResult} was {@code null}. |
| | | */ |
| | | public CompletedFutureResult(final ErrorResultException errorResult, |
| | | final int requestID) throws NullPointerException |
| | | final int requestID) |
| | | { |
| | | Validator.ensureNotNull(errorResult); |
| | | this.result = null; |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package com.forgerock.opendj.util; |
| | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldap.requests.*; |
| | | import org.forgerock.opendj.ldap.responses.*; |
| | |
| | | */ |
| | | @Override |
| | | public FutureResult<Void> abandonAsync(final AbandonRequest request) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.abandonAsync(request); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Result add(final AddRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.add(request); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Result add(final Entry entry) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.add(entry); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Result add(final String... ldifLines) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.add(ldifLines); |
| | | } |
| | |
| | | public FutureResult<Result> addAsync(final AddRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.addAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | */ |
| | | @Override |
| | | public void addConnectionEventListener(final ConnectionEventListener listener) |
| | | throws IllegalStateException, NullPointerException |
| | | { |
| | | connection.addConnectionEventListener(listener); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public BindResult bind(final BindRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.bind(request); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public BindResult bind(final String name, final char[] password) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.bind(name, password); |
| | | } |
| | |
| | | public FutureResult<BindResult> bindAsync(final BindRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.bindAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | */ |
| | | @Override |
| | | public void close(final UnbindRequest request, final String reason) |
| | | throws NullPointerException |
| | | { |
| | | connection.close(request, reason); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public CompareResult compare(final CompareRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.compare(request); |
| | | } |
| | |
| | | @Override |
| | | public CompareResult compare(final String name, |
| | | final String attributeDescription, final String assertionValue) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.compare(name, attributeDescription, assertionValue); |
| | | } |
| | |
| | | public FutureResult<CompareResult> compareAsync(final CompareRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super CompareResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.compareAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | */ |
| | | @Override |
| | | public Result delete(final DeleteRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.delete(request); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Result delete(final String name) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.delete(name); |
| | | } |
| | |
| | | public FutureResult<Result> deleteAsync(final DeleteRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.deleteAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | @Override |
| | | public <R extends ExtendedResult> R extendedRequest( |
| | | final ExtendedRequest<R> request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.extendedRequest(request); |
| | | } |
| | |
| | | public <R extends ExtendedResult> R extendedRequest( |
| | | final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler handler) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.extendedRequest(request, handler); |
| | | } |
| | |
| | | @Override |
| | | public GenericExtendedResult extendedRequest(final String requestName, |
| | | final ByteString requestValue) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.extendedRequest(requestName, requestValue); |
| | | } |
| | |
| | | final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super R> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.extendedRequestAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | */ |
| | | @Override |
| | | public Result modify(final ModifyRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.modify(request); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Result modify(final String... ldifLines) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.modify(ldifLines); |
| | | } |
| | |
| | | public FutureResult<Result> modifyAsync(final ModifyRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.modifyAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | */ |
| | | @Override |
| | | public Result modifyDN(final ModifyDNRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.modifyDN(request); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Result modifyDN(final String name, final String newRDN) |
| | | throws ErrorResultException, LocalizedIllegalArgumentException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.modifyDN(name, newRDN); |
| | | } |
| | |
| | | public FutureResult<Result> modifyDNAsync(final ModifyDNRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.modifyDNAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | @Override |
| | | public SearchResultEntry readEntry(final DN name, |
| | | final String... attributeDescriptions) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.readEntry(name, attributeDescriptions); |
| | | } |
| | |
| | | @Override |
| | | public SearchResultEntry readEntry(final String name, |
| | | final String... attributeDescriptions) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.readEntry(name, attributeDescriptions); |
| | | } |
| | |
| | | public FutureResult<SearchResultEntry> readEntryAsync(final DN name, |
| | | final Collection<String> attributeDescriptions, |
| | | final ResultHandler<? super SearchResultEntry> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.readEntryAsync(name, attributeDescriptions, handler); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public void removeConnectionEventListener( |
| | | final ConnectionEventListener listener) throws NullPointerException |
| | | final ConnectionEventListener listener) |
| | | { |
| | | connection.removeConnectionEventListener(listener); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public ConnectionEntryReader search(final SearchRequest request) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.search(request); |
| | | } |
| | |
| | | @Override |
| | | public Result search(final SearchRequest request, |
| | | final Collection<? super SearchResultEntry> entries) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.search(request, entries); |
| | | } |
| | |
| | | public Result search(final SearchRequest request, |
| | | final Collection<? super SearchResultEntry> entries, |
| | | final Collection<? super SearchResultReference> references) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.search(request, entries, references); |
| | | } |
| | |
| | | @Override |
| | | public Result search(final SearchRequest request, |
| | | final SearchResultHandler handler) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.search(request, handler); |
| | | } |
| | |
| | | public ConnectionEntryReader search(final String baseObject, |
| | | final SearchScope scope, final String filter, |
| | | final String... attributeDescriptions) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.search(baseObject, scope, filter, attributeDescriptions); |
| | | } |
| | |
| | | public FutureResult<Result> searchAsync(final SearchRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final SearchResultHandler resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.searchAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | */ |
| | | @Override |
| | | public SearchResultEntry searchSingleEntry(final SearchRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return connection.searchSingleEntry(request); |
| | | } |
| | |
| | | public SearchResultEntry searchSingleEntry(final String baseObject, |
| | | final SearchScope scope, final String filter, |
| | | final String... attributeDescriptions) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return connection.searchSingleEntry(baseObject, scope, filter, |
| | | attributeDescriptions); |
| | |
| | | public FutureResult<SearchResultEntry> searchSingleEntryAsync( |
| | | final SearchRequest request, |
| | | final ResultHandler<? super SearchResultEntry> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return connection.searchSingleEntryAsync(request, handler); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package com.forgerock.opendj.util; |
| | |
| | | * If {@code date} was {@code null}. |
| | | */ |
| | | public static String formatAsGeneralizedTime(final Date date) |
| | | throws NullPointerException |
| | | { |
| | | return formatAsGeneralizedTime(date.getTime()); |
| | | } |
| | |
| | | * If {@code date} was invalid. |
| | | */ |
| | | public static String formatAsGeneralizedTime(final long date) |
| | | throws IllegalArgumentException |
| | | { |
| | | // Generalized time has the format yyyyMMddHHmmss.SSS'Z' |
| | | |
| | |
| | | * If {@code c} or {@code separator} were {@code null}. |
| | | */ |
| | | public static String joinCollection(Collection<?> c, String separator) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(c, separator); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.util; |
| | |
| | | * @throws StringIndexOutOfBoundsException If there is no more data |
| | | * available to read. |
| | | */ |
| | | public char read() throws StringIndexOutOfBoundsException |
| | | public char read() |
| | | { |
| | | if (pos >= length) |
| | | { |
| | |
| | | * @throws StringIndexOutOfBoundsException If the length exceeds the |
| | | * allowed length. |
| | | */ |
| | | public String read(final int length) throws StringIndexOutOfBoundsException |
| | | public String read(final int length) |
| | | { |
| | | if (length > this.length || pos + length > this.length) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.util; |
| | |
| | | * If any of the provided arguments are {@code null}. |
| | | */ |
| | | public static void ensureNotNull(final Object... objects) |
| | | throws NullPointerException |
| | | { |
| | | for (final Object o : objects) |
| | | { |
| | |
| | | * If any of the provided arguments are {@code null}. |
| | | */ |
| | | public static void ensureNotNull(final Object o1, final Object o2) |
| | | throws NullPointerException |
| | | { |
| | | if (o1 == null || o2 == null) |
| | | { |
| | |
| | | * If any of the provided arguments are {@code null}. |
| | | */ |
| | | public static void ensureNotNull(final Object o1, final Object o2, |
| | | final Object o3) throws NullPointerException |
| | | final Object o3) |
| | | { |
| | | if (o1 == null || o2 == null || o3 == null) |
| | | { |
| | |
| | | * If any of the provided arguments are {@code null}. |
| | | */ |
| | | public static void ensureNotNull(final Object o1, final Object o2, |
| | | final Object o3, final Object o4) throws NullPointerException |
| | | final Object o3, final Object o4) |
| | | { |
| | | if (o1 == null || o2 == null || o3 == null || o4 == null) |
| | | { |
| | |
| | | */ |
| | | public static void ensureNotNull(final Object o1, final Object o2, |
| | | final Object o3, final Object o4, final Object o5) |
| | | throws NullPointerException |
| | | { |
| | | if (o1 == null || o2 == null || o3 == null || o4 == null || o5 == null) |
| | | { |
| | |
| | | * @throws NullPointerException |
| | | * If the provided argument is {@code null}. |
| | | */ |
| | | public static <T> T ensureNotNull(final T o1) throws NullPointerException |
| | | public static <T> T ensureNotNull(final T o1) |
| | | { |
| | | if (o1 == null) |
| | | { |
| | |
| | | * If {@code condition} was {@code false}. |
| | | */ |
| | | public static void ensureTrue(final boolean condition, final String message) |
| | | throws IllegalArgumentException |
| | | { |
| | | if (!condition) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.asn1; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public void readEndSequence() throws IOException, IllegalStateException |
| | | public void readEndSequence() throws IOException |
| | | { |
| | | if (readerStack.isEmpty()) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.asn1; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public void readEndSequence() throws IOException, IllegalStateException |
| | | public void readEndSequence() throws IOException |
| | | { |
| | | if (streamStack.isEmpty()) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.asn1; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public ASN1Writer writeEndSequence() throws IOException, |
| | | IllegalStateException |
| | | public ASN1Writer writeEndSequence() throws IOException |
| | | { |
| | | if (stackDepth < 0) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.asn1; |
| | |
| | | * @throws IllegalStateException |
| | | * If there is no sequence being read. |
| | | */ |
| | | void readEndSequence() throws DecodeException, IOException, |
| | | IllegalStateException; |
| | | void readEndSequence() throws DecodeException, IOException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws IllegalStateException |
| | | * If there is no set being read. |
| | | */ |
| | | void readEndSet() throws DecodeException, IOException, IllegalStateException; |
| | | void readEndSet() throws DecodeException, IOException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | package org.forgerock.opendj.asn1; |
| | | |
| | |
| | | * @throws IllegalStateException |
| | | * If there is no sequence being written. |
| | | */ |
| | | ASN1Writer writeEndSequence() throws IOException, IllegalStateException; |
| | | ASN1Writer writeEndSequence() throws IOException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws IOException |
| | | * If an error occurs while writing the element. |
| | | * @throws IllegalStateException |
| | | * If there is no set being written, IllegalStateException. |
| | | * If there is no set being written. |
| | | */ |
| | | ASN1Writer writeEndSet() throws IOException, IllegalStateException; |
| | | ASN1Writer writeEndSet() throws IOException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code ava} was {@code null}. |
| | | */ |
| | | public static AVA valueOf(final String ava) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return valueOf(ava, Schema.getDefaultSchema()); |
| | | } |
| | |
| | | * If {@code ava} or {@code schema} was {@code null}. |
| | | */ |
| | | public static AVA valueOf(final String ava, final Schema schema) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | final SubstringReader reader = new SubstringReader(ava); |
| | | try |
| | |
| | | |
| | | |
| | | static AVA decode(final SubstringReader reader, final Schema schema) |
| | | throws LocalizedIllegalArgumentException, UnknownSchemaElementException |
| | | { |
| | | // Skip over any spaces at the beginning. |
| | | reader.skipWhitespaces(); |
| | |
| | | |
| | | |
| | | private static AttributeType readAttributeName(final SubstringReader reader, |
| | | final Schema schema) throws LocalizedIllegalArgumentException, |
| | | UnknownSchemaElementException |
| | | final Schema schema) |
| | | { |
| | | int length = 1; |
| | | reader.mark(); |
| | |
| | | |
| | | |
| | | private static ByteString readAttributeValue(final SubstringReader reader) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | // All leading spaces have already been stripped so we can start |
| | | // reading the value. However, it may be empty so check for that. |
| | |
| | | * {@code null}. |
| | | */ |
| | | public AVA(final AttributeType attributeType, final ByteString attributeValue) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeType, attributeValue); |
| | | |
| | |
| | | * {@code null}. |
| | | */ |
| | | public AVA(final String attributeType, final Object attributeValue) |
| | | throws UnknownSchemaElementException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeType, attributeValue); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | */ |
| | | @Override |
| | | public Result add(final AddRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | final FutureResult<Result> future = addAsync(request, null, null); |
| | | try |
| | |
| | | */ |
| | | @Override |
| | | public BindResult bind(final BindRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | final FutureResult<BindResult> future = bindAsync(request, null, null); |
| | | try |
| | |
| | | */ |
| | | @Override |
| | | public CompareResult compare(final CompareRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | final FutureResult<CompareResult> future = compareAsync(request, null, null); |
| | | try |
| | |
| | | */ |
| | | @Override |
| | | public Result delete(final DeleteRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | final FutureResult<Result> future = deleteAsync(request, null, null); |
| | | try |
| | |
| | | public <R extends ExtendedResult> R extendedRequest( |
| | | final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler handler) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | final FutureResult<R> future = extendedRequestAsync(request, handler, null); |
| | | try |
| | |
| | | */ |
| | | @Override |
| | | public Result modify(final ModifyRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | final FutureResult<Result> future = modifyAsync(request, null, null); |
| | | try |
| | |
| | | */ |
| | | @Override |
| | | public Result modifyDN(final ModifyDNRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | final FutureResult<Result> future = modifyDNAsync(request, null, null); |
| | | try |
| | |
| | | @Override |
| | | public Result search(final SearchRequest request, |
| | | final SearchResultHandler handler) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | final FutureResult<Result> future = searchAsync(request, null, handler); |
| | | try |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public abstract boolean add(ByteString value) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | public abstract boolean add(ByteString value); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean add(final Object firstValue, final Object... remainingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(firstValue); |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public boolean addAll(final Collection<? extends ByteString> values) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return addAll(values, null); |
| | | } |
| | |
| | | */ |
| | | public boolean addAll(final Collection<? extends ByteString> values, |
| | | final Collection<? super ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | boolean modified = false; |
| | | for (final ByteString value : values) |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public abstract boolean contains(Object value) throws NullPointerException; |
| | | public abstract boolean contains(Object value); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public boolean containsAll(final Collection<?> values) |
| | | throws NullPointerException |
| | | { |
| | | for (final Object value : values) |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public ByteString firstValue() throws NoSuchElementException |
| | | public ByteString firstValue() |
| | | { |
| | | return iterator().next(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public String firstValueAsString() throws NoSuchElementException |
| | | public String firstValueAsString() |
| | | { |
| | | return firstValue().toString(); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public abstract boolean remove(Object value) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | public abstract boolean remove(Object value); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public boolean removeAll(final Collection<?> values) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return removeAll(values, null); |
| | | } |
| | |
| | | */ |
| | | public <T> boolean removeAll(final Collection<T> values, |
| | | final Collection<? super T> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | boolean modified = false; |
| | | for (final T value : values) |
| | |
| | | */ |
| | | @Override |
| | | public boolean retainAll(final Collection<?> values) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return retainAll(values, null); |
| | | } |
| | |
| | | */ |
| | | public <T> boolean retainAll(final Collection<T> values, |
| | | final Collection<? super T> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | if (values.isEmpty()) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.concurrent.TimeoutException; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.requests.*; |
| | | import org.forgerock.opendj.ldap.responses.*; |
| | | import org.forgerock.opendj.ldif.ConnectionEntryReader; |
| | |
| | | */ |
| | | @Override |
| | | public Result add(final Entry entry) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return add(Requests.newAddRequest(entry)); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Result add(final String... ldifLines) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return add(Requests.newAddRequest(ldifLines)); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public BindResult bind(final String name, final char[] password) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return bind(Requests.newSimpleBindRequest(name, password)); |
| | | } |
| | |
| | | @Override |
| | | public CompareResult compare(final String name, |
| | | final String attributeDescription, final String assertionValue) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return compare(Requests.newCompareRequest(name, attributeDescription, |
| | | assertionValue)); |
| | |
| | | */ |
| | | @Override |
| | | public Result delete(final String name) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return delete(Requests.newDeleteRequest(name)); |
| | | } |
| | |
| | | @Override |
| | | public <R extends ExtendedResult> R extendedRequest( |
| | | final ExtendedRequest<R> request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return extendedRequest(request, null); |
| | | } |
| | |
| | | @Override |
| | | public GenericExtendedResult extendedRequest(final String requestName, |
| | | final ByteString requestValue) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return extendedRequest(Requests.newGenericExtendedRequest(requestName, |
| | | requestValue)); |
| | |
| | | */ |
| | | @Override |
| | | public Result modify(final String... ldifLines) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return modify(Requests.newModifyRequest(ldifLines)); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Result modifyDN(final String name, final String newRDN) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return modifyDN(Requests.newModifyDNRequest(name, newRDN)); |
| | | } |
| | |
| | | @Override |
| | | public SearchResultEntry readEntry(final DN baseObject, |
| | | final String... attributeDescriptions) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | final SearchRequest request = Requests.newSearchRequest(baseObject, |
| | | SearchScope.BASE_OBJECT, Filter.getObjectClassPresentFilter(), |
| | |
| | | @Override |
| | | public SearchResultEntry readEntry(final String baseObject, |
| | | final String... attributeDescriptions) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return readEntry(DN.valueOf(baseObject)); |
| | | } |
| | |
| | | public FutureResult<SearchResultEntry> readEntryAsync(final DN name, |
| | | final Collection<String> attributeDescriptions, |
| | | final ResultHandler<? super SearchResultEntry> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final SearchRequest request = Requests.newSearchRequest(name, |
| | | SearchScope.BASE_OBJECT, Filter.getObjectClassPresentFilter()); |
| | |
| | | */ |
| | | @Override |
| | | public ConnectionEntryReader search(final SearchRequest request) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return new ConnectionEntryReader(this, request); |
| | | } |
| | |
| | | @Override |
| | | public Result search(final SearchRequest request, |
| | | final Collection<? super SearchResultEntry> entries) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return search(request, entries, null); |
| | | } |
| | |
| | | public Result search(final SearchRequest request, |
| | | final Collection<? super SearchResultEntry> entries, |
| | | final Collection<? super SearchResultReference> references) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | Validator.ensureNotNull(request, entries); |
| | | |
| | |
| | | public ConnectionEntryReader search(final String baseObject, |
| | | final SearchScope scope, final String filter, |
| | | final String... attributeDescriptions) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final SearchRequest request = Requests.newSearchRequest(baseObject, scope, |
| | | filter, attributeDescriptions); |
| | |
| | | */ |
| | | @Override |
| | | public SearchResultEntry searchSingleEntry(final SearchRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | final SingleEntryHandler handler = new SingleEntryHandler(); |
| | | search(request, handler); |
| | |
| | | public SearchResultEntry searchSingleEntry(final String baseObject, |
| | | final SearchScope scope, final String filter, |
| | | final String... attributeDescriptions) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | final SearchRequest request = Requests.newSearchRequest(baseObject, scope, |
| | | filter, attributeDescriptions); |
| | |
| | | public FutureResult<SearchResultEntry> searchSingleEntryAsync( |
| | | final SearchRequest request, |
| | | final ResultHandler<? super SearchResultEntry> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final SingleEntryFuture innerFuture = new SingleEntryFuture(handler); |
| | | final FutureResult<Result> future = searchAsync(request, null, innerFuture); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | import com.forgerock.opendj.util.Iterables; |
| | | import com.forgerock.opendj.util.Predicate; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean addAttribute(final Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return addAttribute(attribute, null); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Entry addAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | addAttribute(new LinkedAttribute(attributeDescription, values), null); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean containsAttribute(final Attribute attribute, |
| | | final Collection<ByteString> missingValues) throws NullPointerException |
| | | final Collection<ByteString> missingValues) |
| | | { |
| | | final Attribute a = getAttribute(attribute.getAttributeDescription()); |
| | | if (a == null) |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean containsAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final Object... values) |
| | | { |
| | | return containsAttribute(new LinkedAttribute(attributeDescription, values), |
| | | null); |
| | |
| | | */ |
| | | public Iterable<Attribute> getAllAttributes( |
| | | final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeDescription); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Iterable<Attribute> getAllAttributes(final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return getAllAttributes(AttributeDescription.valueOf(attributeDescription)); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Attribute getAttribute(final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return getAttribute(AttributeDescription.valueOf(attributeDescription)); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean removeAttribute(final AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return removeAttribute( |
| | | Attributes.emptyAttribute(attributeDescription), null); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Entry removeAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | removeAttribute(new LinkedAttribute(attributeDescription, values), null); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean replaceAttribute(final Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | if (attribute.isEmpty()) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Entry replaceAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | replaceAttribute(new LinkedAttribute(attributeDescription, values)); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Entry setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | return setName(DN.valueOf(dn)); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | */ |
| | | AbstractMapEntry(final DN name, |
| | | final Map<AttributeDescription, Attribute> attributes) |
| | | throws NullPointerException |
| | | { |
| | | this.name = name; |
| | | this.attributes = attributes; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public final boolean addAttribute(final Attribute attribute, |
| | | final Collection<ByteString> duplicateValues) throws NullPointerException |
| | | final Collection<ByteString> duplicateValues) |
| | | { |
| | | Validator.ensureNotNull(attribute); |
| | | |
| | |
| | | */ |
| | | public final Attribute getAttribute( |
| | | final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeDescription); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public final boolean removeAttribute(final Attribute attribute, |
| | | final Collection<ByteString> missingValues) throws NullPointerException |
| | | final Collection<ByteString> missingValues) |
| | | { |
| | | Validator.ensureNotNull(attribute); |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public final Entry setName(final DN dn) throws NullPointerException |
| | | public final Entry setName(final DN dn) |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = dn; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | | |
| | | |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Iterator; |
| | | import java.util.NoSuchElementException; |
| | | import java.util.Set; |
| | | import java.util.*; |
| | | |
| | | |
| | | |
| | |
| | | * } |
| | | * </pre> |
| | | * <p> |
| | | * TODO: matching against attribute value assertions. |
| | | */ |
| | | public interface Attribute extends Set<ByteString> |
| | | { |
| | | // TODO: matching against attribute value assertions. |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds {@code value} to this attribute if it is not already present (optional |
| | | * operation). If this attribute already contains {@code value}, the call |
| | |
| | | * @throws NullPointerException |
| | | * If {@code value} was {@code null}. |
| | | */ |
| | | boolean add(ByteString value) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | boolean add(ByteString value); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code firstValue} was {@code null}. |
| | | */ |
| | | boolean add(Object firstValue, Object... remainingValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean add(Object firstValue, Object... remainingValues); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code values} was {@code null}. |
| | | */ |
| | | boolean addAll(Collection<? extends ByteString> values) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean addAll(Collection<? extends ByteString> values); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code values} was {@code null}. |
| | | */ |
| | | boolean addAll(Collection<? extends ByteString> values, |
| | | Collection<? super ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Collection<? super ByteString> duplicateValues); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this attribute does not support removal of attribute values. |
| | | */ |
| | | void clear() throws UnsupportedOperationException; |
| | | void clear(); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code value} was {@code null}. |
| | | */ |
| | | boolean contains(Object value) throws NullPointerException; |
| | | boolean contains(Object value); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code values} was {@code null}. |
| | | */ |
| | | boolean containsAll(Collection<?> values) throws NullPointerException; |
| | | boolean containsAll(Collection<?> values); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NoSuchElementException |
| | | * If this attribute is empty. |
| | | */ |
| | | ByteString firstValue() throws NoSuchElementException; |
| | | ByteString firstValue(); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NoSuchElementException |
| | | * If this attribute is empty. |
| | | */ |
| | | String firstValueAsString() throws NoSuchElementException; |
| | | String firstValueAsString(); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code value} was {@code null}. |
| | | */ |
| | | boolean remove(Object value) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | boolean remove(Object value); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code values} was {@code null}. |
| | | */ |
| | | boolean removeAll(Collection<?> values) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | boolean removeAll(Collection<?> values); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code values} was {@code null}. |
| | | */ |
| | | <T> boolean removeAll(Collection<T> values, |
| | | Collection<? super T> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Collection<? super T> missingValues); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code values} was {@code null}. |
| | | */ |
| | | boolean retainAll(Collection<?> values) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | boolean retainAll(Collection<?> values); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code values} was {@code null}. |
| | | */ |
| | | <T> boolean retainAll(Collection<T> values, |
| | | Collection<? super T> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Collection<? super T> missingValues); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code array} was {@code null}. |
| | | */ |
| | | <T> T[] toArray(T[] array) throws ArrayStoreException, NullPointerException; |
| | | <T> T[] toArray(T[] array); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.ldap.schema.Schema; |
| | | import org.forgerock.opendj.ldap.schema.UnknownSchemaElementException; |
| | | import org.forgerock.opendj.ldap.schema.*; |
| | | |
| | | import com.forgerock.opendj.util.ASCIICharProp; |
| | | import com.forgerock.opendj.util.Iterators; |
| | |
| | | * {@code null}. |
| | | */ |
| | | public AttributeDescription withOption(final String option) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(option); |
| | | |
| | |
| | | * If {@code attributeType} was {@code null}. |
| | | */ |
| | | public static AttributeDescription create(final AttributeType attributeType) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeType); |
| | | |
| | |
| | | * If {@code attributeType} or {@code option} was {@code null}. |
| | | */ |
| | | public static AttributeDescription create(final AttributeType attributeType, |
| | | final String option) throws NullPointerException |
| | | final String option) |
| | | { |
| | | Validator.ensureNotNull(attributeType, option); |
| | | |
| | |
| | | * If {@code attributeType} or {@code options} was {@code null}. |
| | | */ |
| | | public static AttributeDescription create(final AttributeType attributeType, |
| | | final String... options) throws NullPointerException |
| | | final String... options) |
| | | { |
| | | Validator.ensureNotNull(attributeType, options); |
| | | |
| | |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | public static AttributeDescription valueOf(final String attributeDescription) |
| | | throws UnknownSchemaElementException, LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | { |
| | | return valueOf(attributeDescription, Schema.getDefaultSchema()); |
| | | } |
| | |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | public static AttributeDescription valueOf(final String attributeDescription, |
| | | final Schema schema) throws UnknownSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final Schema schema) |
| | | { |
| | | Validator.ensureNotNull(attributeDescription, schema); |
| | | |
| | |
| | | |
| | | |
| | | private static int skipTrailingWhiteSpace(final String attributeDescription, |
| | | int i, final int length) throws LocalizedIllegalArgumentException |
| | | int i, final int length) |
| | | { |
| | | char c; |
| | | while (i < length) |
| | |
| | | // Uncached valueOf implementation. |
| | | private static AttributeDescription valueOf0( |
| | | final String attributeDescription, final Schema schema) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | final boolean allowMalformedNamesAndOptions = schema |
| | | .allowMalformedNamesAndOptions(); |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public int compareTo(final AttributeDescription other) |
| | | throws NullPointerException |
| | | { |
| | | final int result = attributeType.compareTo(other.attributeType); |
| | | if (result != 0) |
| | |
| | | * If {@code option} was {@code null}. |
| | | */ |
| | | public boolean containsOption(final String option) |
| | | throws NullPointerException |
| | | { |
| | | final String normalizedOption = toLowerCase(option); |
| | | return pimpl.containsOption(normalizedOption); |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public boolean isSubTypeOf(final AttributeDescription other) |
| | | throws NullPointerException |
| | | { |
| | | if (!attributeType.isSubTypeOf(other.attributeType)) |
| | | { |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public boolean isSuperTypeOf(final AttributeDescription other) |
| | | throws NullPointerException |
| | | { |
| | | if (!other.attributeType.isSubTypeOf(attributeType)) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | Attribute newAttribute(AttributeDescription attributeDescription) |
| | | throws NullPointerException; |
| | | Attribute newAttribute(AttributeDescription attributeDescription); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Iterator; |
| | | import java.util.NoSuchElementException; |
| | | |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | |
| | |
| | | |
| | | @Override |
| | | public boolean add(final ByteString value) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public void clear() throws UnsupportedOperationException |
| | | public void clear() |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public boolean contains(final Object value) throws NullPointerException |
| | | public boolean contains(final Object value) |
| | | { |
| | | return false; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public boolean remove(final Object value) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean add(final ByteString value) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return attribute.add(value); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean add(final Object firstValue, final Object... remainingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return attribute.add(firstValue, remainingValues); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean addAll(final Collection<? extends ByteString> values) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return attribute.addAll(values); |
| | | } |
| | |
| | | |
| | | public boolean addAll(final Collection<? extends ByteString> values, |
| | | final Collection<? super ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return attribute.addAll(values, duplicateValues); |
| | | } |
| | | |
| | | |
| | | |
| | | public void clear() throws UnsupportedOperationException |
| | | public void clear() |
| | | { |
| | | attribute.clear(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean contains(final Object value) throws NullPointerException |
| | | public boolean contains(final Object value) |
| | | { |
| | | return attribute.contains(value); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean containsAll(final Collection<?> values) |
| | | throws NullPointerException |
| | | { |
| | | return attribute.containsAll(values); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | public ByteString firstValue() throws NoSuchElementException |
| | | public ByteString firstValue() |
| | | { |
| | | return attribute.firstValue(); |
| | | } |
| | | |
| | | |
| | | |
| | | public String firstValueAsString() throws NoSuchElementException |
| | | public String firstValueAsString() |
| | | { |
| | | return attribute.firstValueAsString(); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean remove(final Object value) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return attribute.remove(value); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean removeAll(final Collection<?> values) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return attribute.removeAll(values); |
| | | } |
| | |
| | | |
| | | public <T> boolean removeAll(final Collection<T> values, |
| | | final Collection<? super T> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return attribute.removeAll(values, missingValues); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean retainAll(final Collection<?> values) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return attribute.retainAll(values); |
| | | } |
| | |
| | | |
| | | public <T> boolean retainAll(final Collection<T> values, |
| | | final Collection<? super T> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return attribute.retainAll(values, missingValues); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | public <T> T[] toArray(final T[] array) throws ArrayStoreException, |
| | | NullPointerException |
| | | public <T> T[] toArray(final T[] array) |
| | | { |
| | | return attribute.toArray(array); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean add(final ByteString value) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean add(final Object firstValue, final Object... remainingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean addAll(final Collection<? extends ByteString> values) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | public boolean addAll(final Collection<? extends ByteString> values, |
| | | final Collection<? super ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public void clear() throws UnsupportedOperationException |
| | | public void clear() |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean contains(final Object value) throws NullPointerException |
| | | public boolean contains(final Object value) |
| | | { |
| | | return attribute.contains(value); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean containsAll(final Collection<?> values) |
| | | throws NullPointerException |
| | | { |
| | | return attribute.containsAll(values); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | public ByteString firstValue() throws NoSuchElementException |
| | | public ByteString firstValue() |
| | | { |
| | | return attribute.firstValue(); |
| | | } |
| | | |
| | | |
| | | |
| | | public String firstValueAsString() throws NoSuchElementException |
| | | public String firstValueAsString() |
| | | { |
| | | return attribute.firstValueAsString(); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean remove(final Object value) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean removeAll(final Collection<?> values) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | public <T> boolean removeAll(final Collection<T> values, |
| | | final Collection<? super T> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | public boolean retainAll(final Collection<?> values) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | public <T> boolean retainAll(final Collection<T> values, |
| | | final Collection<? super T> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | public <T> T[] toArray(final T[] array) throws ArrayStoreException, |
| | | NullPointerException |
| | | public <T> T[] toArray(final T[] array) |
| | | { |
| | | return attribute.toArray(array); |
| | | } |
| | |
| | | */ |
| | | public static final Attribute emptyAttribute( |
| | | final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | return new EmptyAttribute(attributeDescription); |
| | | } |
| | |
| | | */ |
| | | public static final Attribute renameAttribute(final Attribute attribute, |
| | | final AttributeDescription attributeDescription) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | final AttributeType oldType = attribute.getAttributeDescription() |
| | | .getAttributeType(); |
| | |
| | | * If {@code attribute} was {@code null}. |
| | | */ |
| | | public static final Attribute unmodifiableAttribute(final Attribute attribute) |
| | | throws NullPointerException |
| | | { |
| | | if (attribute instanceof UnmodifiableAttribute) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | | |
| | | |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.requests.BindRequest; |
| | | import org.forgerock.opendj.ldap.responses.BindResult; |
| | | |
| | |
| | | public FutureResult<BindResult> bindAsync(final BindRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public BindResult bind(BindRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public BindResult bind(String name, char[] password) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | package org.forgerock.opendj.ldap; |
| | | |
| | |
| | | * @throws IndexOutOfBoundsException |
| | | * If the index argument is negative or not less than length(). |
| | | */ |
| | | byte byteAt(int index) throws IndexOutOfBoundsException; |
| | | byte byteAt(int index); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code offset} is negative or if {@code length} is negative or |
| | | * if {@code offset + length} is greater than {@code bytes.length}. |
| | | */ |
| | | int compareTo(byte[] bytes, int offset, int length) |
| | | throws IndexOutOfBoundsException; |
| | | int compareTo(byte[] bytes, int offset, int length); |
| | | |
| | | |
| | | |
| | |
| | | * @throws IndexOutOfBoundsException |
| | | * If {@code offset} is negative. |
| | | */ |
| | | byte[] copyTo(byte[] bytes, int offset) throws IndexOutOfBoundsException; |
| | | byte[] copyTo(byte[] bytes, int offset); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code offset} is negative or if {@code length} is negative or |
| | | * if {@code offset + length} is greater than {@code bytes.length}. |
| | | */ |
| | | boolean equals(byte[] bytes, int offset, int length) |
| | | throws IndexOutOfBoundsException; |
| | | boolean equals(byte[] bytes, int offset, int length); |
| | | |
| | | |
| | | |
| | |
| | | * greater than {@code length()}, or if {@code start} is greater |
| | | * than {@code end}. |
| | | */ |
| | | ByteSequence subSequence(int start, int end) throws IndexOutOfBoundsException; |
| | | ByteSequence subSequence(int start, int end); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap; |
| | | |
| | |
| | | * required to satisfy the request, that is, if {@code remaining() |
| | | * < 1}. |
| | | */ |
| | | public byte get() throws IndexOutOfBoundsException |
| | | public byte get() |
| | | { |
| | | final byte b = sequence.byteAt(pos); |
| | | pos++; |
| | |
| | | * required to satisfy the request, that is, if {@code remaining() |
| | | * < b.length}. |
| | | */ |
| | | public void get(final byte[] b) throws IndexOutOfBoundsException |
| | | public void get(final byte[] b) |
| | | { |
| | | get(b, 0, b.length); |
| | | } |
| | |
| | | * < length}. |
| | | */ |
| | | public void get(final byte[] b, final int offset, final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | if (offset < 0 || length < 0 || offset + length > b.length |
| | | || length > remaining()) |
| | |
| | | * If there are fewer bytes remaining in this reader than are |
| | | * required to satisfy the request. |
| | | */ |
| | | public int getBERLength() throws IndexOutOfBoundsException |
| | | public int getBERLength() |
| | | { |
| | | // Make sure we have at least one byte to read. |
| | | int newPos = pos + 1; |
| | |
| | | * < length}. |
| | | */ |
| | | public ByteSequence getByteSequence(final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | final int newPos = pos + length; |
| | | final ByteSequence subSequence = sequence.subSequence(pos, newPos); |
| | |
| | | * < length}. |
| | | */ |
| | | public ByteString getByteString(final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | return getByteSequence(length).toByteString(); |
| | | } |
| | |
| | | * required to satisfy the request, that is, if {@code remaining() |
| | | * < 4}. |
| | | */ |
| | | public int getInt() throws IndexOutOfBoundsException |
| | | public int getInt() |
| | | { |
| | | if (remaining() < 4) |
| | | { |
| | |
| | | * required to satisfy the request, that is, if {@code remaining() |
| | | * < 8}. |
| | | */ |
| | | public long getLong() throws IndexOutOfBoundsException |
| | | public long getLong() |
| | | { |
| | | if (remaining() < 8) |
| | | { |
| | |
| | | * required to satisfy the request, that is, if {@code remaining() |
| | | * < 2}. |
| | | */ |
| | | public short getShort() throws IndexOutOfBoundsException |
| | | public short getShort() |
| | | { |
| | | if (remaining() < 2) |
| | | { |
| | |
| | | * required to satisfy the request, that is, if {@code remaining() |
| | | * < length}. |
| | | */ |
| | | public String getString(final int length) throws IndexOutOfBoundsException |
| | | public String getString(final int length) |
| | | { |
| | | if (remaining() < length) |
| | | { |
| | |
| | | * If the position is negative or larger than the length of the |
| | | * underlying byte sequence. |
| | | */ |
| | | public void position(final int pos) throws IndexOutOfBoundsException |
| | | public void position(final int pos) |
| | | { |
| | | if (pos > sequence.length() || pos < 0) |
| | | { |
| | |
| | | * If the new position is less than 0 or greater than the length of |
| | | * the underlying byte sequence. |
| | | */ |
| | | public void skip(final int length) throws IndexOutOfBoundsException |
| | | public void skip(final int length) |
| | | { |
| | | position(pos + length); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | package org.forgerock.opendj.ldap; |
| | | |
| | |
| | | * if {@code offset + length} is greater than {@code bytes.length}. |
| | | */ |
| | | public static ByteString wrap(final byte[] bytes, final int offset, |
| | | final int length) throws IndexOutOfBoundsException |
| | | final int length) |
| | | { |
| | | checkArrayBounds(bytes, offset, length); |
| | | return new ByteString(bytes, offset, length); |
| | |
| | | * if {@code offset + length} is greater than {@code b.length}. |
| | | */ |
| | | static void checkArrayBounds(final byte[] b, final int offset, |
| | | final int length) throws IndexOutOfBoundsException |
| | | final int length) |
| | | { |
| | | if (offset < 0 || offset > b.length || length < 0 |
| | | || offset + length > b.length || offset + length < 0) |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public byte byteAt(final int index) throws IndexOutOfBoundsException |
| | | public byte byteAt(final int index) |
| | | { |
| | | if (index >= length || index < 0) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public int compareTo(final byte[] bytes, final int offset, final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | checkArrayBounds(bytes, offset, length); |
| | | return compareTo(this.buffer, this.offset, this.length, bytes, offset, |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public byte[] copyTo(final byte[] bytes, final int offset) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | if (offset < 0) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean equals(final byte[] bytes, final int offset, final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | checkArrayBounds(bytes, offset, length); |
| | | return equals(this.buffer, this.offset, this.length, bytes, offset, length); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ByteString subSequence(final int start, final int end) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | if (start < 0 || start > end || end > length) |
| | | { |
| | |
| | | * @throws IndexOutOfBoundsException |
| | | * If this byte string has less than four bytes. |
| | | */ |
| | | public int toInt() throws IndexOutOfBoundsException |
| | | public int toInt() |
| | | { |
| | | if (length < 4) |
| | | { |
| | |
| | | * @throws IndexOutOfBoundsException |
| | | * If this byte string has less than eight bytes. |
| | | */ |
| | | public long toLong() throws IndexOutOfBoundsException |
| | | public long toLong() |
| | | { |
| | | if (length < 8) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | package org.forgerock.opendj.ldap; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public byte byteAt(final int index) throws IndexOutOfBoundsException |
| | | public byte byteAt(final int index) |
| | | { |
| | | if (index >= subLength || index < 0) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public int compareTo(final byte[] b, final int offset, final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | ByteString.checkArrayBounds(b, offset, length); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public byte[] copyTo(final byte[] b, final int offset) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | if (offset < 0) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean equals(final byte[] b, final int offset, final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | ByteString.checkArrayBounds(b, offset, length); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ByteSequence subSequence(final int start, final int end) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | if (start < 0 || start > end || end > subLength) |
| | | { |
| | |
| | | * @throws IllegalArgumentException |
| | | * If the {@code capacity} is negative. |
| | | */ |
| | | public ByteStringBuilder(final int capacity) throws IllegalArgumentException |
| | | public ByteStringBuilder(final int capacity) |
| | | { |
| | | if (capacity < 0) |
| | | { |
| | |
| | | * if {@code offset + length} is greater than {@code bytes.length}. |
| | | */ |
| | | public ByteStringBuilder append(final byte[] bytes, final int offset, |
| | | final int length) throws IndexOutOfBoundsException |
| | | final int length) |
| | | { |
| | | ByteString.checkArrayBounds(bytes, offset, length); |
| | | |
| | |
| | | * buffer.remaining()}. |
| | | */ |
| | | public ByteStringBuilder append(final ByteBuffer buffer, final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | if (length < 0 || length > buffer.remaining()) |
| | | { |
| | |
| | | * reader.remaining()}. |
| | | */ |
| | | public ByteStringBuilder append(final ByteSequenceReader reader, |
| | | final int length) throws IndexOutOfBoundsException |
| | | final int length) |
| | | { |
| | | if (length < 0 || length > reader.remaining()) |
| | | { |
| | |
| | | * If an I/O error occurs. |
| | | */ |
| | | public int append(final InputStream stream, final int length) |
| | | throws IndexOutOfBoundsException, IOException |
| | | throws IOException |
| | | { |
| | | if (length < 0) |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public byte byteAt(final int index) throws IndexOutOfBoundsException |
| | | public byte byteAt(final int index) |
| | | { |
| | | if (index >= length || index < 0) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public int compareTo(final byte[] bytes, final int offset, final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | ByteString.checkArrayBounds(bytes, offset, length); |
| | | return ByteString.compareTo(this.buffer, 0, this.length, bytes, offset, |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public byte[] copyTo(final byte[] bytes, final int offset) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | if (offset < 0) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean equals(final byte[] bytes, final int offset, final int length) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | ByteString.checkArrayBounds(bytes, offset, length); |
| | | return ByteString |
| | |
| | | * If the <code>newLength</code> argument is negative. |
| | | */ |
| | | public ByteStringBuilder setLength(final int newLength) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | if (newLength < 0) |
| | | { |
| | |
| | | * @param end |
| | | * The end index, exclusive. |
| | | * @return The newly created byte subsequence. |
| | | * @throws IndexOutOfBoundsException |
| | | * If {@code start} or {@code end} are negative, if {@code end} is |
| | | * greater than {@code length()}, or if {@code start} is greater |
| | | * than {@code end}. |
| | | */ |
| | | public ByteSequence subSequence(final int start, final int end) |
| | | throws IndexOutOfBoundsException |
| | | { |
| | | if (start < 0 || start > end || end > length) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | import java.io.Closeable; |
| | | import java.util.Collection; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.requests.*; |
| | | import org.forgerock.opendj.ldap.responses.*; |
| | | import org.forgerock.opendj.ldif.ConnectionEntryReader; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | FutureResult<Void> abandonAsync(AbandonRequest request) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | FutureResult<Void> abandonAsync(AbandonRequest request); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result add(AddRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code entry} was {@code null} . |
| | | */ |
| | | Result add(Entry entry) throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | Result add(Entry entry) throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | Result add(String... ldifLines) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException, IllegalStateException, |
| | | NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | FutureResult<Result> addAsync(AddRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ResultHandler<? super Result> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If the {@code listener} was {@code null}. |
| | | */ |
| | | void addConnectionEventListener(ConnectionEventListener listener) |
| | | throws IllegalStateException, NullPointerException; |
| | | void addConnectionEventListener(ConnectionEventListener listener); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | BindResult bind(BindRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * If {@code name} or {@code password} was {@code null}. |
| | | */ |
| | | BindResult bind(String name, char[] password) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | FutureResult<BindResult> bindAsync(BindRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ResultHandler<? super BindResult> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | void close(UnbindRequest request, String reason) throws NullPointerException; |
| | | void close(UnbindRequest request, String reason); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | CompareResult compare(CompareRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * {@code assertionValue} was {@code null}. |
| | | */ |
| | | CompareResult compare(String name, String attributeDescription, |
| | | String assertionValue) throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | String assertionValue) throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | FutureResult<CompareResult> compareAsync(CompareRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super CompareResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ResultHandler<? super CompareResult> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result delete(DeleteRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | Result delete(String name) throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | Result delete(String name) throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | FutureResult<Result> deleteAsync(DeleteRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ResultHandler<? super Result> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | <R extends ExtendedResult> R extendedRequest(ExtendedRequest<R> request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | <R extends ExtendedResult> R extendedRequest(ExtendedRequest<R> request, |
| | | IntermediateResponseHandler handler) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | GenericExtendedResult extendedRequest(String requestName, |
| | | ByteString requestValue) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | <R extends ExtendedResult> FutureResult<R> extendedRequestAsync( |
| | | ExtendedRequest<R> request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super R> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ResultHandler<? super R> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result modify(ModifyRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | Result modify(String... ldifLines) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException, IllegalStateException, |
| | | NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | FutureResult<Result> modifyAsync(ModifyRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ResultHandler<? super Result> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result modifyDN(ModifyDNRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * If {@code name} or {@code newRDN} was {@code null}. |
| | | */ |
| | | Result modifyDN(String name, String newRDN) throws ErrorResultException, |
| | | LocalizedIllegalArgumentException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | FutureResult<Result> modifyDNAsync(ModifyDNRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ResultHandler<? super Result> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | * If the {@code name} was {@code null}. |
| | | */ |
| | | SearchResultEntry readEntry(DN name, String... attributeDescriptions) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * If the {@code name} was {@code null}. |
| | | */ |
| | | SearchResultEntry readEntry(String name, String... attributeDescriptions) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | FutureResult<SearchResultEntry> readEntryAsync(DN name, |
| | | Collection<String> attributeDescriptions, |
| | | ResultHandler<? super SearchResultEntry> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ResultHandler<? super SearchResultEntry> handler); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If the {@code listener} was {@code null}. |
| | | */ |
| | | void removeConnectionEventListener(ConnectionEventListener listener) |
| | | throws NullPointerException; |
| | | void removeConnectionEventListener(ConnectionEventListener listener); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} or {@code entries} was {@code null}. |
| | | */ |
| | | ConnectionEntryReader search(SearchRequest request) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ConnectionEntryReader search(SearchRequest request); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | Result search(SearchRequest request, |
| | | Collection<? super SearchResultEntry> entries) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | Result search(SearchRequest request, |
| | | Collection<? super SearchResultEntry> entries, |
| | | Collection<? super SearchResultReference> references) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result search(SearchRequest request, SearchResultHandler handler) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * {@code null}. |
| | | */ |
| | | ConnectionEntryReader search(String baseObject, SearchScope scope, |
| | | String filter, String... attributeDescriptions) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | String filter, String... attributeDescriptions); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | FutureResult<Result> searchAsync(SearchRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | SearchResultHandler resultHandler) throws UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | SearchResultHandler resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | * If the {@code request} was {@code null}. |
| | | */ |
| | | SearchResultEntry searchSingleEntry(SearchRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | SearchResultEntry searchSingleEntry(String baseObject, SearchScope scope, |
| | | String filter, String... attributeDescriptions) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException; |
| | | throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * If the {@code request} was {@code null}. |
| | | */ |
| | | FutureResult<SearchResultEntry> searchSingleEntryAsync(SearchRequest request, |
| | | ResultHandler<? super SearchResultEntry> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException; |
| | | ResultHandler<? super SearchResultEntry> handler); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | */ |
| | | public static ConnectionFactory newAuthenticatedConnectionFactory( |
| | | final ConnectionFactory factory, final BindRequest request) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(factory, request); |
| | | |
| | |
| | | */ |
| | | public static ConnectionPool newFixedConnectionPool( |
| | | final ConnectionFactory factory, final int poolSize) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(factory); |
| | | Validator.ensureTrue(poolSize >= 0, "negative pool size"); |
| | |
| | | * If {@code factory} was {@code null}. |
| | | */ |
| | | public static ConnectionFactory newHeartBeatConnectionFactory( |
| | | final ConnectionFactory factory) throws NullPointerException |
| | | final ConnectionFactory factory) |
| | | { |
| | | return new HeartBeatConnectionFactory(factory); |
| | | } |
| | |
| | | */ |
| | | public static ConnectionFactory newHeartBeatConnectionFactory( |
| | | final ConnectionFactory factory, final long interval, final TimeUnit unit) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | return new HeartBeatConnectionFactory(factory, interval, unit); |
| | | } |
| | |
| | | */ |
| | | public static ConnectionFactory newHeartBeatConnectionFactory( |
| | | final ConnectionFactory factory, final long interval, final TimeUnit unit, |
| | | final SearchRequest heartBeat) throws IllegalArgumentException, |
| | | NullPointerException |
| | | final SearchRequest heartBeat) |
| | | { |
| | | return new HeartBeatConnectionFactory(factory, interval, unit, heartBeat); |
| | | } |
| | |
| | | final ConnectionFactory factory, final long interval, |
| | | final TimeUnit unit, final SearchRequest heartBeat, |
| | | final ScheduledExecutorService scheduler) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | return new HeartBeatConnectionFactory(factory, interval, unit, heartBeat, |
| | | scheduler); |
| | |
| | | */ |
| | | public static <C> ConnectionFactory newInternalConnectionFactory( |
| | | final ServerConnectionFactory<C, Integer> factory, final C clientContext) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(factory); |
| | | return new InternalConnectionFactory<C>(factory, clientContext); |
| | |
| | | * If {@code algorithm} was {@code null}. |
| | | */ |
| | | public static ConnectionFactory newLoadBalancer( |
| | | final LoadBalancingAlgorithm algorithm) throws NullPointerException |
| | | final LoadBalancingAlgorithm algorithm) |
| | | { |
| | | return new LoadBalancer(algorithm); |
| | | } |
| | |
| | | */ |
| | | public static ConnectionFactory newNamedConnectionFactory( |
| | | final ConnectionFactory factory, final String name) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(factory, name); |
| | | |
| | |
| | | */ |
| | | public static <C> ServerConnectionFactory<C, Integer> newServerConnectionFactory( |
| | | final RequestHandler<RequestContext> requestHandler) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(requestHandler); |
| | | |
| | |
| | | */ |
| | | public static <C> ServerConnectionFactory<C, Integer> newServerConnectionFactory( |
| | | final RequestHandlerFactory<C, RequestContext> factory) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(factory); |
| | | return new RequestHandlerFactoryAdapter<C>(factory); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public static DN valueOf(final String dn) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return valueOf(dn, Schema.getDefaultSchema()); |
| | | } |
| | |
| | | * If {@code dn} or {@code schema} was {@code null}. |
| | | */ |
| | | public static DN valueOf(final String dn, final Schema schema) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn, schema); |
| | | if (dn.length() == 0) |
| | |
| | | // Decodes a DN using the provided reader and schema. |
| | | private static DN decode(final String dnString, final SubstringReader reader, |
| | | final Schema schema, final Map<String, DN> cache) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | reader.skipWhitespaces(); |
| | | if (reader.remaining() == 0) |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public DN child(final DN dn) throws NullPointerException |
| | | public DN child(final DN dn) |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | |
| | |
| | | * If {@code rdn} was {@code null}. |
| | | * @see RDN#maxValue() |
| | | */ |
| | | public DN child(final RDN rdn) throws NullPointerException |
| | | public DN child(final RDN rdn) |
| | | { |
| | | Validator.ensureNotNull(rdn); |
| | | return new DN(this, rdn, null); |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public DN child(final String dn) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | public DN child(final String dn) |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | return child(valueOf(dn)); |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public boolean isChildOf(final DN dn) throws NullPointerException |
| | | public boolean isChildOf(final DN dn) |
| | | { |
| | | // If this is the Root DN then parent will be null but this is ok. |
| | | return dn.equals(parent); |
| | |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public boolean isChildOf(final String dn) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | // If this is the Root DN then parent will be null but this is ok. |
| | | return isChildOf(valueOf(dn)); |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public boolean isParentOf(final DN dn) throws NullPointerException |
| | | public boolean isParentOf(final DN dn) |
| | | { |
| | | // If dn is the Root DN then parent will be null but this is ok. |
| | | return equals(dn.parent); |
| | |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public boolean isParentOf(final String dn) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | // If dn is the Root DN then parent will be null but this is ok. |
| | | return isParentOf(valueOf(dn)); |
| | |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public boolean isSubordinateOrEqualTo(final DN dn) |
| | | throws NullPointerException |
| | | { |
| | | if (size < dn.size) |
| | | { |
| | |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public boolean isSubordinateOrEqualTo(final String dn) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return isSubordinateOrEqualTo(valueOf(dn)); |
| | | } |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public boolean isSuperiorOrEqualTo(final DN dn) throws NullPointerException |
| | | public boolean isSuperiorOrEqualTo(final DN dn) |
| | | { |
| | | if (size > dn.size) |
| | | { |
| | |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | public boolean isSuperiorOrEqualTo(final String dn) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return isSuperiorOrEqualTo(valueOf(dn)); |
| | | } |
| | |
| | | * @throws IllegalArgumentException |
| | | * If {@code index} is less than zero. |
| | | */ |
| | | public DN localName(final int index) throws IllegalArgumentException |
| | | public DN localName(final int index) |
| | | { |
| | | Validator.ensureTrue(index >= 0, "index less than zero"); |
| | | |
| | |
| | | * @throws IllegalArgumentException |
| | | * If {@code index} is less than zero. |
| | | */ |
| | | public DN parent(final int index) throws IllegalArgumentException |
| | | public DN parent(final int index) |
| | | { |
| | | // We allow size + 1 so that we can return null as the parent of the |
| | | // Root DN. |
| | |
| | | * @throws NullPointerException |
| | | * If {@code fromDN} or {@code toDN} was {@code null}. |
| | | */ |
| | | public DN rename(final DN fromDN, final DN toDN) throws NullPointerException |
| | | public DN rename(final DN fromDN, final DN toDN) |
| | | { |
| | | Validator.ensureNotNull(fromDN, toDN); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code factory} was {@code null}. |
| | | */ |
| | | public final DecodeOptions setAttributeFactory(final AttributeFactory factory) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(factory); |
| | | this.attributeFactory = factory; |
| | |
| | | * If {@code factory} was {@code null}. |
| | | */ |
| | | public final DecodeOptions setEntryFactory(final EntryFactory factory) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(factory); |
| | | this.entryFactory = factory; |
| | |
| | | * If {@code schema} was {@code null}. |
| | | */ |
| | | public final DecodeOptions setSchema(final Schema schema) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(schema); |
| | | this.schemaResolver = new FixedSchemaResolver(schema); |
| | |
| | | * If {@code resolver} was {@code null}. |
| | | */ |
| | | public final DecodeOptions setSchemaResolver(final SchemaResolver resolver) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(resolver); |
| | | this.schemaResolver = resolver; |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | import java.util.*; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.requests.ModifyRequest; |
| | | import org.forgerock.opendj.ldap.requests.Requests; |
| | | import org.forgerock.opendj.ldap.schema.*; |
| | |
| | | */ |
| | | @Override |
| | | public boolean addAttribute(final Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | @Override |
| | | public boolean addAttribute(final Attribute attribute, |
| | | final Collection<ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Entry addAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public Entry clearAttributes() throws UnsupportedOperationException |
| | | public Entry clearAttributes() |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public boolean containsAttribute(final Attribute attribute, |
| | | final Collection<ByteString> missingValues) throws NullPointerException |
| | | final Collection<ByteString> missingValues) |
| | | { |
| | | return entry.containsAttribute(attribute, missingValues); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public boolean containsAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final Object... values) |
| | | { |
| | | return entry.containsAttribute(attributeDescription, values); |
| | | } |
| | |
| | | @Override |
| | | public Iterable<Attribute> getAllAttributes( |
| | | final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable( |
| | | entry.getAllAttributes(attributeDescription), |
| | |
| | | */ |
| | | @Override |
| | | public Attribute getAttribute(final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | final Attribute attribute = entry.getAttribute(attributeDescription); |
| | | if (attribute != null) |
| | |
| | | @Override |
| | | public boolean removeAttribute(final Attribute attribute, |
| | | final Collection<ByteString> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | @Override |
| | | public boolean removeAttribute( |
| | | final AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Entry removeAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean replaceAttribute(final Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Entry replaceAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public Entry setName(final DN dn) throws UnsupportedOperationException, |
| | | NullPointerException |
| | | public Entry setName(final DN dn) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Entry setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | * @see Requests#newModifyRequest(Entry, Entry) |
| | | */ |
| | | public static ModifyRequest diffEntries(final Entry fromEntry, |
| | | final Entry toEntry) throws NullPointerException |
| | | final Entry toEntry) |
| | | { |
| | | Validator.ensureNotNull(fromEntry, toEntry); |
| | | |
| | |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | public static Entry unmodifiableEntry(final Entry entry) |
| | | throws NullPointerException |
| | | { |
| | | if (entry instanceof UnmodifiableEntry) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attribute} was {@code null}. |
| | | */ |
| | | boolean addAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean addAttribute(Attribute attribute); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code attribute} was {@code null}. |
| | | */ |
| | | boolean addAttribute(Attribute attribute, |
| | | Collection<ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Collection<ByteString> duplicateValues); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | Entry addAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | Entry addAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this entry does not permit attributes to be removed. |
| | | */ |
| | | Entry clearAttributes() throws UnsupportedOperationException; |
| | | Entry clearAttributes(); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code attribute} was {@code null}. |
| | | */ |
| | | boolean containsAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) throws NullPointerException; |
| | | Collection<ByteString> missingValues); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | boolean containsAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | boolean containsAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | Iterable<Attribute> getAllAttributes(AttributeDescription attributeDescription) |
| | | throws NullPointerException; |
| | | Iterable<Attribute> getAllAttributes(AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | Iterable<Attribute> getAllAttributes(String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | Iterable<Attribute> getAllAttributes(String attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | Attribute getAttribute(AttributeDescription attributeDescription) |
| | | throws NullPointerException; |
| | | Attribute getAttribute(AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | Attribute getAttribute(String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | Attribute getAttribute(String attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code attribute} was {@code null}. |
| | | */ |
| | | boolean removeAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Collection<ByteString> missingValues); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | boolean removeAttribute(AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean removeAttribute(AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | Entry removeAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | Entry removeAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attribute} was {@code null}. |
| | | */ |
| | | boolean replaceAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean replaceAttribute(Attribute attribute); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attribute} was {@code null}. |
| | | */ |
| | | Entry replaceAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | Entry replaceAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | Entry setName(DN dn) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | Entry setName(DN dn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | Entry setName(String dn) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException; |
| | | Entry setName(String dn); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | Entry newEntry(DN name) throws NullPointerException; |
| | | Entry newEntry(DN name); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | public static ErrorResultException newErrorResult( |
| | | ResultCode resultCode) throws IllegalArgumentException, |
| | | NullPointerException |
| | | ResultCode resultCode) |
| | | { |
| | | return newErrorResult(resultCode, null, null); |
| | | } |
| | |
| | | */ |
| | | public static ErrorResultException newErrorResult( |
| | | ResultCode resultCode, String diagnosticMessage) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | return newErrorResult(resultCode, diagnosticMessage, null); |
| | | } |
| | |
| | | */ |
| | | public static ErrorResultException newErrorResult( |
| | | ResultCode resultCode, Throwable cause) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | return newErrorResult(resultCode, null, cause); |
| | | } |
| | |
| | | */ |
| | | public static ErrorResultException newErrorResult( |
| | | ResultCode resultCode, String diagnosticMessage, Throwable cause) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | final Result result = Responses.newResult(resultCode); |
| | | if (diagnosticMessage != null) |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static ErrorResultException newErrorResult( |
| | | final Result result) throws IllegalArgumentException, |
| | | NullPointerException |
| | | final Result result) |
| | | { |
| | | if (!result.getResultCode().isExceptional()) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code cause} was {@code null}. |
| | | */ |
| | | public ErrorResultIOException(final ErrorResultException cause) |
| | | throws NullPointerException |
| | | { |
| | | super(Validator.ensureNotNull(cause)); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2011 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * filter. |
| | | */ |
| | | public static Filter valueOf(final String string) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | Validator.ensureNotNull(string); |
| | | |
| | |
| | | // Converts an assertion value to a substring filter. |
| | | private static Filter assertionValue2SubstringFilter( |
| | | final String filterString, final String attrType, final int equalPos, |
| | | final int endPos) throws LocalizedIllegalArgumentException |
| | | final int endPos) |
| | | { |
| | | // Get a binary representation of the value. |
| | | final byte[] valueBytes = getBytes(filterString.substring(equalPos, endPos)); |
| | |
| | | private static void escapeHexChars(final ByteStringBuilder valueBuffer, |
| | | final String string, final byte[] valueBytes, final int fromIndex, |
| | | final int len, final int errorIndex) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | for (int i = fromIndex; i < len; i++) |
| | | { |
| | |
| | | |
| | | private static Filter valueOf0(final String string, |
| | | final int beginIndex /* inclusive */, final int endIndex /* exclusive */) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | if (beginIndex >= endIndex) |
| | | { |
| | |
| | | |
| | | private static ByteString valueOfAssertionValue(final String string, |
| | | final int startIndex, final int endIndex) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | boolean hasEscape = false; |
| | | final byte[] valueBytes = getBytes(string.substring(startIndex, endIndex)); |
| | |
| | | |
| | | private static String valueOfAttributeDescription(final String string, |
| | | final int startIndex, final int endIndex) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | // The part of the filter string before the equal sign should be the |
| | | // attribute type. Make sure that the characters it contains are |
| | |
| | | |
| | | private static Filter valueOfExtensibleFilter(final String string, |
| | | final int startIndex, final int equalIndex, final int endIndex) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | String attributeDescription = null; |
| | | boolean dnAttributes = false; |
| | |
| | | |
| | | private static List<Filter> valueOfFilterList(final String string, |
| | | final int startIndex, final int endIndex) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | // If the end index is equal to the start index, then there are no |
| | | // components. |
| | |
| | | |
| | | private static Filter valueOfGenericFilter(final String string, |
| | | final String attributeDescription, final int startIndex, |
| | | final int endIndex) throws LocalizedIllegalArgumentException |
| | | final int endIndex) |
| | | { |
| | | final int asteriskIdx = string.indexOf('*', startIndex); |
| | | if (startIndex >= endIndex) |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.logging.Level; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.requests.*; |
| | | import org.forgerock.opendj.ldap.responses.*; |
| | | import org.forgerock.opendj.ldif.ConnectionEntryReader; |
| | |
| | | |
| | | @Override |
| | | public FutureResult<Void> abandonAsync(final AbandonRequest request) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().abandonAsync(request); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Result add(final AddRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().add(request); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Result add(final Entry entry) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().add(entry); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Result add(final String... ldifLines) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().add(ldifLines); |
| | | } |
| | |
| | | public FutureResult<Result> addAsync(final AddRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().addAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | */ |
| | | @Override |
| | | public void addConnectionEventListener( |
| | | final ConnectionEventListener listener) throws IllegalStateException, |
| | | NullPointerException |
| | | final ConnectionEventListener listener) |
| | | { |
| | | Validator.ensureNotNull(listener); |
| | | checkState(); |
| | |
| | | |
| | | @Override |
| | | public BindResult bind(final BindRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().bind(request); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public BindResult bind(final String name, final char[] password) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().bind(name, password); |
| | | } |
| | |
| | | public FutureResult<BindResult> bindAsync(final BindRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().bindAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | */ |
| | | @Override |
| | | public void close(final UnbindRequest request, final String reason) |
| | | throws NullPointerException |
| | | { |
| | | close(); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public CompareResult compare(final CompareRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().compare(request); |
| | | } |
| | |
| | | @Override |
| | | public CompareResult compare(final String name, |
| | | final String attributeDescription, final String assertionValue) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().compare(name, attributeDescription, assertionValue); |
| | | } |
| | |
| | | final CompareRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super CompareResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().compareAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | |
| | | @Override |
| | | public Result delete(final DeleteRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().delete(request); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Result delete(final String name) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().delete(name); |
| | | } |
| | |
| | | public FutureResult<Result> deleteAsync(final DeleteRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().deleteAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | @Override |
| | | public <R extends ExtendedResult> R extendedRequest( |
| | | final ExtendedRequest<R> request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().extendedRequest(request); |
| | | } |
| | |
| | | public <R extends ExtendedResult> R extendedRequest( |
| | | final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler handler) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().extendedRequest(request, handler); |
| | | } |
| | |
| | | @Override |
| | | public GenericExtendedResult extendedRequest(final String requestName, |
| | | final ByteString requestValue) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().extendedRequest(requestName, requestValue); |
| | | } |
| | |
| | | final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super R> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().extendedRequestAsync(request, |
| | | intermediateResponseHandler, resultHandler); |
| | |
| | | |
| | | @Override |
| | | public Result modify(final ModifyRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().modify(request); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Result modify(final String... ldifLines) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, LocalizedIllegalArgumentException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().modify(ldifLines); |
| | | } |
| | |
| | | public FutureResult<Result> modifyAsync(final ModifyRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().modifyAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | |
| | | @Override |
| | | public Result modifyDN(final ModifyDNRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().modifyDN(request); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Result modifyDN(final String name, final String newRDN) |
| | | throws ErrorResultException, LocalizedIllegalArgumentException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().modifyDN(name, newRDN); |
| | | } |
| | |
| | | public FutureResult<Result> modifyDNAsync(final ModifyDNRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().modifyDNAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | @Override |
| | | public SearchResultEntry readEntry(final DN name, |
| | | final String... attributeDescriptions) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().readEntry(name, attributeDescriptions); |
| | | } |
| | |
| | | @Override |
| | | public SearchResultEntry readEntry(final String name, |
| | | final String... attributeDescriptions) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().readEntry(name, attributeDescriptions); |
| | | } |
| | |
| | | public FutureResult<SearchResultEntry> readEntryAsync(final DN name, |
| | | final Collection<String> attributeDescriptions, |
| | | final ResultHandler<? super SearchResultEntry> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().readEntryAsync(name, attributeDescriptions, handler); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public void removeConnectionEventListener( |
| | | final ConnectionEventListener listener) throws NullPointerException |
| | | final ConnectionEventListener listener) |
| | | { |
| | | Validator.ensureNotNull(listener); |
| | | checkState(); |
| | |
| | | |
| | | @Override |
| | | public ConnectionEntryReader search(final SearchRequest request) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().search(request); |
| | | } |
| | |
| | | @Override |
| | | public Result search(final SearchRequest request, |
| | | final Collection<? super SearchResultEntry> entries) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().search(request, entries); |
| | | } |
| | |
| | | public Result search(final SearchRequest request, |
| | | final Collection<? super SearchResultEntry> entries, |
| | | final Collection<? super SearchResultReference> references) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().search(request, entries, references); |
| | | } |
| | |
| | | @Override |
| | | public Result search(final SearchRequest request, |
| | | final SearchResultHandler handler) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().search(request, handler); |
| | | } |
| | |
| | | public ConnectionEntryReader search(final String baseObject, |
| | | final SearchScope scope, final String filter, |
| | | final String... attributeDescriptions) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().search(baseObject, scope, filter, |
| | | attributeDescriptions); |
| | |
| | | public FutureResult<Result> searchAsync(final SearchRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final SearchResultHandler resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().searchAsync(request, intermediateResponseHandler, |
| | | resultHandler); |
| | |
| | | |
| | | @Override |
| | | public SearchResultEntry searchSingleEntry(final SearchRequest request) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return checkState().searchSingleEntry(request); |
| | | } |
| | |
| | | public SearchResultEntry searchSingleEntry(final String baseObject, |
| | | final SearchScope scope, final String filter, |
| | | final String... attributeDescriptions) throws ErrorResultException, |
| | | InterruptedException, LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | InterruptedException |
| | | { |
| | | return checkState().searchSingleEntry(baseObject, scope, filter, |
| | | attributeDescriptions); |
| | |
| | | public FutureResult<SearchResultEntry> searchSingleEntryAsync( |
| | | final SearchRequest request, |
| | | final ResultHandler<? super SearchResultEntry> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | return checkState().searchSingleEntryAsync(request, handler); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code file} was {@code null}. |
| | | */ |
| | | public static X509KeyManager useKeyStoreFile(final String file) |
| | | throws GeneralSecurityException, IOException, NullPointerException |
| | | throws GeneralSecurityException, IOException |
| | | { |
| | | return useKeyStoreFile(file, null, null); |
| | | } |
| | |
| | | */ |
| | | public static X509KeyManager useKeyStoreFile(final String file, |
| | | final char[] password, final String format) |
| | | throws GeneralSecurityException, IOException, NullPointerException |
| | | throws GeneralSecurityException, IOException |
| | | { |
| | | Validator.ensureNotNull(file); |
| | | |
| | |
| | | * If {@code keyManager} or {@code alias} was {@code null}. |
| | | */ |
| | | public static X509KeyManager useSingleCertificate(final String alias, |
| | | final X509KeyManager keyManager) throws NullPointerException |
| | | final X509KeyManager keyManager) |
| | | { |
| | | Validator.ensureNotNull(alias, keyManager); |
| | | return new SelectCertificate(keyManager, alias); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code address} was {@code null}. |
| | | */ |
| | | public LDAPConnectionFactory(final SocketAddress address) |
| | | throws NullPointerException |
| | | { |
| | | this(address, new LDAPOptions()); |
| | | } |
| | |
| | | * If {@code address} or {@code options} was {@code null}. |
| | | */ |
| | | public LDAPConnectionFactory(final SocketAddress address, |
| | | final LDAPOptions options) throws NullPointerException |
| | | final LDAPOptions options) |
| | | { |
| | | Validator.ensureNotNull(address, options); |
| | | this.impl = new LDAPConnectionFactoryImpl(address, options); |
| | |
| | | * If {@code host} was {@code null}. |
| | | */ |
| | | public LDAPConnectionFactory(final String host, final int port) |
| | | throws NullPointerException |
| | | { |
| | | this(host, port, new LDAPOptions()); |
| | | } |
| | |
| | | * If {@code host} or {@code options} was {@code null}. |
| | | */ |
| | | public LDAPConnectionFactory(final String host, final int port, |
| | | final LDAPOptions options) throws NullPointerException |
| | | final LDAPOptions options) |
| | | { |
| | | Validator.ensureNotNull(host, options); |
| | | final SocketAddress address = new InetSocketAddress(host, port); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | */ |
| | | public LDAPListener(final int port, |
| | | final ServerConnectionFactory<LDAPClientContext, Integer> factory) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | this(port, factory, new LDAPListenerOptions()); |
| | | } |
| | |
| | | */ |
| | | public LDAPListener(final int port, |
| | | final ServerConnectionFactory<LDAPClientContext, Integer> factory, |
| | | final LDAPListenerOptions options) throws IOException, |
| | | NullPointerException |
| | | final LDAPListenerOptions options) throws IOException |
| | | { |
| | | Validator.ensureNotNull(factory, options); |
| | | final SocketAddress address = new InetSocketAddress(port); |
| | |
| | | */ |
| | | public LDAPListener(final SocketAddress address, |
| | | final ServerConnectionFactory<LDAPClientContext, Integer> factory) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | this(address, factory, new LDAPListenerOptions()); |
| | | } |
| | |
| | | */ |
| | | public LDAPListener(final SocketAddress address, |
| | | final ServerConnectionFactory<LDAPClientContext, Integer> factory, |
| | | final LDAPListenerOptions options) throws IOException, |
| | | NullPointerException |
| | | final LDAPListenerOptions options) throws IOException |
| | | { |
| | | Validator.ensureNotNull(address, factory, options); |
| | | this.impl = new LDAPListenerImpl(address, factory, options); |
| | |
| | | */ |
| | | public LDAPListener(final String host, final int port, |
| | | final ServerConnectionFactory<LDAPClientContext, Integer> factory) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | this(host, port, factory, new LDAPListenerOptions()); |
| | | } |
| | |
| | | */ |
| | | public LDAPListener(final String host, final int port, |
| | | final ServerConnectionFactory<LDAPClientContext, Integer> factory, |
| | | final LDAPListenerOptions options) throws IOException, |
| | | NullPointerException |
| | | final LDAPListenerOptions options) throws IOException |
| | | { |
| | | Validator.ensureNotNull(host, factory, options); |
| | | final SocketAddress address = new InetSocketAddress(host, port); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code decodeOptions} was {@code null}. |
| | | */ |
| | | public final LDAPListenerOptions setDecodeOptions( |
| | | final DecodeOptions decodeOptions) throws NullPointerException |
| | | final DecodeOptions decodeOptions) |
| | | { |
| | | Validator.ensureNotNull(decodeOptions); |
| | | this.decodeOptions = decodeOptions; |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code decodeOptions} was {@code null}. |
| | | */ |
| | | public final LDAPOptions setDecodeOptions(final DecodeOptions decodeOptions) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(decodeOptions); |
| | | this.decodeOptions = decodeOptions; |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code url} was {@code null}. |
| | | */ |
| | | public static LDAPUrl valueOf(final String url) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return valueOf(url, Schema.getDefaultSchema()); |
| | | } |
| | |
| | | * If {@code url} or {@code schema} was {@code null}. |
| | | */ |
| | | public static LDAPUrl valueOf(final String url, final Schema schema) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(url, schema); |
| | | return new LDAPUrl(url, schema); |
| | |
| | | |
| | | |
| | | private static int decodeHex(final String url, final int index, |
| | | final char hexChar) throws LocalizedIllegalArgumentException |
| | | final char hexChar) |
| | | { |
| | | if (hexChar >= '0' && hexChar <= '9') |
| | | { |
| | |
| | | |
| | | private static void percentDecoder(final String urlString, final int index, |
| | | final String s, final StringBuilder decoded) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | Validator.ensureNotNull(s, decoded); |
| | | decoded.append(s); |
| | |
| | | */ |
| | | public LDAPUrl(final boolean isSecured, final String host, |
| | | final Integer port, final DN name) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | this(isSecured, host, port, name, DEFAULT_SCOPE, DEFAULT_FILTER); |
| | | } |
| | |
| | | public LDAPUrl(final boolean isSecured, final String host, |
| | | final Integer port, final DN name, final SearchScope scope, |
| | | final Filter filter, final String... attributes) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | // The buffer storing the encoded url. |
| | | final StringBuilder urlBuffer = new StringBuilder(); |
| | |
| | | |
| | | |
| | | private LDAPUrl(final String urlString, final Schema schema) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | this.urlString = urlString; |
| | | |
| | |
| | | |
| | | |
| | | private int parseHostPort(final String urlString, final String hostAndPort, |
| | | final StringBuilder host) throws LocalizedIllegalArgumentException |
| | | final StringBuilder host) |
| | | { |
| | | Validator.ensureNotNull(hostAndPort, port, host); |
| | | int urlPort = isSecured ? DEFAULT_SSL_PORT : DEFAULT_PORT; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | |
| | | import java.util.*; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | |
| | | import com.forgerock.opendj.util.Validator; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | abstract ByteString firstValue(LinkedAttribute attribute) |
| | | throws NoSuchElementException; |
| | | abstract ByteString firstValue(LinkedAttribute attribute); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | @Override |
| | | ByteString firstValue(final LinkedAttribute attribute) |
| | | throws NoSuchElementException |
| | | { |
| | | return attribute.multipleValues.values().iterator().next(); |
| | | } |
| | |
| | | |
| | | @Override |
| | | ByteString firstValue(final LinkedAttribute attribute) |
| | | throws NoSuchElementException |
| | | { |
| | | if (attribute.singleValue != null) |
| | | { |
| | |
| | | |
| | | @Override |
| | | ByteString firstValue(final LinkedAttribute attribute) |
| | | throws NoSuchElementException |
| | | { |
| | | throw new NoSuchElementException(); |
| | | } |
| | |
| | | @Override |
| | | public Attribute newAttribute( |
| | | final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | return new LinkedAttribute(attributeDescription); |
| | | } |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attribute} was {@code null}. |
| | | */ |
| | | public LinkedAttribute(final Attribute attribute) throws NullPointerException |
| | | public LinkedAttribute(final Attribute attribute) |
| | | { |
| | | this.attributeDescription = attribute.getAttributeDescription(); |
| | | |
| | |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | public LinkedAttribute(final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeDescription); |
| | | this.attributeDescription = attributeDescription; |
| | |
| | | * . |
| | | */ |
| | | public LinkedAttribute(final AttributeDescription attributeDescription, |
| | | final ByteString value) throws NullPointerException |
| | | final ByteString value) |
| | | { |
| | | this(attributeDescription); |
| | | add(value); |
| | |
| | | * {@code null}. |
| | | */ |
| | | public LinkedAttribute(final AttributeDescription attributeDescription, |
| | | final ByteString... values) throws NullPointerException |
| | | final ByteString... values) |
| | | { |
| | | this(attributeDescription); |
| | | addAll(Arrays.asList(values)); |
| | |
| | | * {@code null}. |
| | | */ |
| | | public LinkedAttribute(final AttributeDescription attributeDescription, |
| | | final Collection<ByteString> values) throws NullPointerException |
| | | final Collection<ByteString> values) |
| | | { |
| | | this(attributeDescription); |
| | | addAll(values); |
| | |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | public LinkedAttribute(final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | this(AttributeDescription.valueOf(attributeDescription)); |
| | | } |
| | |
| | | * . |
| | | */ |
| | | public LinkedAttribute(final String attributeDescription, final Object value) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | this(attributeDescription); |
| | | add(ByteString.valueOf(value)); |
| | |
| | | * {@code null}. |
| | | */ |
| | | public LinkedAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final Object... values) |
| | | { |
| | | this(attributeDescription); |
| | | for (final Object value : values) |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean add(final ByteString value) throws NullPointerException |
| | | public boolean add(final ByteString value) |
| | | { |
| | | Validator.ensureNotNull(value); |
| | | return pimpl.add(this, value); |
| | |
| | | @Override |
| | | public boolean addAll(final Collection<? extends ByteString> values, |
| | | final Collection<? super ByteString> duplicateValues) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(values); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean contains(final Object value) throws NullPointerException |
| | | public boolean contains(final Object value) |
| | | { |
| | | Validator.ensureNotNull(value); |
| | | return pimpl.contains(this, ByteString.valueOf(value)); |
| | |
| | | */ |
| | | @Override |
| | | public boolean containsAll(final Collection<?> values) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(values); |
| | | return pimpl.containsAll(this, values); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ByteString firstValue() throws NoSuchElementException |
| | | public ByteString firstValue() |
| | | { |
| | | return pimpl.firstValue(this); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean remove(final Object value) throws NullPointerException |
| | | public boolean remove(final Object value) |
| | | { |
| | | Validator.ensureNotNull(value); |
| | | return pimpl.remove(this, ByteString.valueOf(value)); |
| | |
| | | */ |
| | | @Override |
| | | public <T> boolean removeAll(final Collection<T> values, |
| | | final Collection<? super T> missingValues) throws NullPointerException |
| | | final Collection<? super T> missingValues) |
| | | { |
| | | Validator.ensureNotNull(values); |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public <T> boolean retainAll(final Collection<T> values, |
| | | final Collection<? super T> missingValues) throws NullPointerException |
| | | final Collection<? super T> missingValues) |
| | | { |
| | | Validator.ensureNotNull(values); |
| | | return pimpl.retainAll(this, values, missingValues); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | |
| | | import java.util.LinkedHashMap; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.requests.Requests; |
| | | |
| | | import com.forgerock.opendj.util.Validator; |
| | |
| | | */ |
| | | public static final EntryFactory FACTORY = new EntryFactory() |
| | | { |
| | | public Entry newEntry(final DN name) throws NullPointerException |
| | | public Entry newEntry(final DN name) |
| | | { |
| | | return new LinkedHashMapEntry(name); |
| | | } |
| | |
| | | * @see #LinkedHashMapEntry(Entry) |
| | | */ |
| | | public static LinkedHashMapEntry deepCopyOfEntry(final Entry entry) |
| | | throws NullPointerException |
| | | { |
| | | LinkedHashMapEntry copy = new LinkedHashMapEntry(entry.getName()); |
| | | for (final Attribute attribute : entry.getAllAttributes()) |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public LinkedHashMapEntry(final DN name) throws NullPointerException |
| | | public LinkedHashMapEntry(final DN name) |
| | | { |
| | | super(Validator.ensureNotNull(name), |
| | | new LinkedHashMap<AttributeDescription, Attribute>()); |
| | |
| | | * If {@code entry} was {@code null}. |
| | | * @see #deepCopyOfEntry(Entry) |
| | | */ |
| | | public LinkedHashMapEntry(final Entry entry) throws NullPointerException |
| | | public LinkedHashMapEntry(final Entry entry) |
| | | { |
| | | this(entry.getName()); |
| | | for (final Attribute attribute : entry.getAllAttributes()) |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public LinkedHashMapEntry(final String name) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | this(DN.valueOf(name)); |
| | | } |
| | |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | public LinkedHashMapEntry(final String... ldifLines) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | this(Requests.newAddRequest(ldifLines)); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code rdn} was {@code null}. |
| | | */ |
| | | public static RDN valueOf(final String rdn) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return valueOf(rdn, Schema.getDefaultSchema()); |
| | | } |
| | |
| | | * If {@code rdn} or {@code schema} was {@code null}. |
| | | */ |
| | | public static RDN valueOf(final String rdn, final Schema schema) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | final SubstringReader reader = new SubstringReader(rdn); |
| | | try |
| | |
| | | // FIXME: ensure that the decoded RDN does not contain multiple AVAs |
| | | // with the same type. |
| | | static RDN decode(final String rdnString, final SubstringReader reader, |
| | | final Schema schema) throws LocalizedIllegalArgumentException, |
| | | UnknownSchemaElementException |
| | | final Schema schema) |
| | | { |
| | | final AVA firstAVA = AVA.decode(reader, schema); |
| | | |
| | |
| | | * null}. |
| | | */ |
| | | public RDN(final AttributeType attributeType, final ByteString attributeValue) |
| | | throws NullPointerException |
| | | { |
| | | this.avas = new AVA[] { new AVA(attributeType, attributeValue) }; |
| | | } |
| | |
| | | * null}. |
| | | */ |
| | | public RDN(final String attributeType, final Object attributeValue) |
| | | throws UnknownSchemaElementException, NullPointerException |
| | | { |
| | | this.avas = new AVA[] { new AVA(attributeType, attributeValue) }; |
| | | } |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2011 ForgeRock AS |
| | | * Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If the {@code listener} was {@code null}. |
| | | * @see #checkIfCancelled |
| | | */ |
| | | void addCancelRequestListener(CancelRequestListener listener) |
| | | throws NullPointerException; |
| | | void addCancelRequestListener(CancelRequestListener listener); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If the {@code listener} was {@code null}. |
| | | */ |
| | | void removeCancelRequestListener(CancelRequestListener listener) |
| | | throws NullPointerException; |
| | | void removeCancelRequestListener(CancelRequestListener listener); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | */ |
| | | void handleAdd(C requestContext, AddRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException; |
| | | ResultHandler<? super Result> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | void handleBind(C requestContext, int version, BindRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException; |
| | | ResultHandler<? super BindResult> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | void handleCompare(C requestContext, CompareRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super CompareResult> resultHandler) |
| | | throws UnsupportedOperationException; |
| | | ResultHandler<? super CompareResult> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | void handleDelete(C requestContext, DeleteRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException; |
| | | ResultHandler<? super Result> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | <R extends ExtendedResult> void handleExtendedRequest(C requestContext, |
| | | ExtendedRequest<R> request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super R> resultHandler) |
| | | throws UnsupportedOperationException; |
| | | ResultHandler<? super R> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | void handleModify(C requestContext, ModifyRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException; |
| | | ResultHandler<? super Result> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | void handleModifyDN(C requestContext, ModifyDNRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException; |
| | | ResultHandler<? super Result> resultHandler); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | void handleSearch(C requestContext, SearchRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | SearchResultHandler resultHandler) throws UnsupportedOperationException; |
| | | SearchResultHandler resultHandler); |
| | | } |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2011 ForgeRock AS |
| | | * Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | */ |
| | | @Override |
| | | public void addCancelRequestListener(final CancelRequestListener listener) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(listener); |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void removeCancelRequestListener(final CancelRequestListener listener) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(listener); |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void handleAbandon(final Integer messageID, |
| | | final AbandonRequest request) throws UnsupportedOperationException |
| | | final AbandonRequest request) |
| | | { |
| | | final RequestContextImpl<?, ?> abandonedRequest = getPendingRequest(request |
| | | .getRequestID()); |
| | |
| | | public void handleAdd(final Integer messageID, final AddRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | final RequestContextImpl<Result, ResultHandler<? super Result>> requestContext = |
| | | new RequestContextImpl<Result, ResultHandler<? super Result>>( |
| | |
| | | final BindRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | final RequestContextImpl<BindResult, ResultHandler<? super BindResult>> requestContext = |
| | | new RequestContextImpl<BindResult, ResultHandler<? super BindResult>>( |
| | |
| | | final CompareRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super CompareResult> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | final RequestContextImpl<CompareResult, ResultHandler<? super CompareResult>> requestContext = |
| | | new RequestContextImpl<CompareResult, ResultHandler<? super CompareResult>>( |
| | |
| | | final DeleteRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | final RequestContextImpl<Result, ResultHandler<? super Result>> requestContext = |
| | | new RequestContextImpl<Result, ResultHandler<? super Result>>( |
| | |
| | | final Integer messageID, final ExtendedRequest<R> request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super R> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | if (request.getOID().equals(CancelExtendedRequest.OID)) |
| | | { |
| | |
| | | final ModifyRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | final RequestContextImpl<Result, ResultHandler<? super Result>> requestContext = |
| | | new RequestContextImpl<Result, ResultHandler<? super Result>>( |
| | |
| | | final ModifyDNRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | final RequestContextImpl<Result, ResultHandler<? super Result>> requestContext = |
| | | new RequestContextImpl<Result, ResultHandler<? super Result>>( |
| | |
| | | final SearchRequest request, |
| | | final IntermediateResponseHandler intermediateResponseHandler, |
| | | final SearchResultHandler resultHandler) |
| | | throws UnsupportedOperationException |
| | | { |
| | | final SearchRequestContextImpl requestContext = new SearchRequestContextImpl( |
| | | this, resultHandler, messageID, true); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | */ |
| | | public static FutureResult<RootDSE> readRootDSEAsync( |
| | | final Connection connection, final ResultHandler<? super RootDSE> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final FutureResultTransformer<SearchResultEntry, RootDSE> future = |
| | | new FutureResultTransformer<SearchResultEntry, RootDSE>(handler) |
| | |
| | | * If the {@code connection} was {@code null}. |
| | | */ |
| | | public static RootDSE readRootDSE(final Connection connection) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | final Entry entry = connection.searchSingleEntry(SEARCH_REQUEST); |
| | | return valueOf(entry); |
| | |
| | | * @throws NullPointerException |
| | | * If {@code entry} was {@code null} . |
| | | */ |
| | | public static RootDSE valueOf(Entry entry) throws NullPointerException |
| | | public static RootDSE valueOf(Entry entry) |
| | | { |
| | | Validator.ensureNotNull(entry); |
| | | return new RootDSE(entry); |
| | |
| | | |
| | | |
| | | // Prevent direct instantiation. |
| | | private RootDSE(final Entry entry) throws NullPointerException |
| | | private RootDSE(final Entry entry) |
| | | { |
| | | this.entry = entry; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * If {@code reference} was {@code null}. |
| | | */ |
| | | public SearchResultReferenceIOException(final SearchResultReference reference) |
| | | throws NullPointerException |
| | | { |
| | | super(Validator.ensureNotNull(reference).toString()); |
| | | this.reference = reference; |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this server connection does not handle abandon requests. |
| | | */ |
| | | void handleAbandon(C requestContext, AbandonRequest request) |
| | | throws UnsupportedOperationException; |
| | | void handleAbandon(C requestContext, AbandonRequest request); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap; |
| | | |
| | |
| | | * If {@code keys} was {@code null}. |
| | | */ |
| | | public static Comparator<Entry> comparator(final Collection<SortKey> keys) |
| | | throws LocalizedIllegalArgumentException, IllegalArgumentException, |
| | | NullPointerException |
| | | { |
| | | return comparator(Schema.getDefaultSchema(), keys); |
| | | } |
| | |
| | | * If {@code schema} or {@code keys} was {@code null}. |
| | | */ |
| | | public static Comparator<Entry> comparator(final Schema schema, |
| | | final Collection<SortKey> keys) throws LocalizedIllegalArgumentException, |
| | | IllegalArgumentException, NullPointerException |
| | | final Collection<SortKey> keys) |
| | | { |
| | | Validator.ensureNotNull(schema, keys); |
| | | Validator.ensureTrue(!keys.isEmpty(), "keys must not be empty"); |
| | |
| | | */ |
| | | public static Comparator<Entry> comparator(final Schema schema, |
| | | final SortKey firstKey, final SortKey... remainingKeys) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(schema, firstKey, remainingKeys); |
| | | |
| | |
| | | * If {@code firstKey} was {@code null}. |
| | | */ |
| | | public static Comparator<Entry> comparator(final SortKey firstKey, |
| | | final SortKey... remainingKeys) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final SortKey... remainingKeys) |
| | | { |
| | | return comparator(Schema.getDefaultSchema(), firstKey, remainingKeys); |
| | | } |
| | |
| | | * If {@code sortKeys} was {@code null}. |
| | | */ |
| | | public static Comparator<Entry> comparator(final String sortKeys) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(sortKeys); |
| | | |
| | |
| | | * If {@code sortKey} was {@code null}. |
| | | */ |
| | | public static final SortKey valueOf(String sortKey) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(sortKey); |
| | | |
| | |
| | | */ |
| | | public SortKey(final AttributeDescription attributeDescription, |
| | | final boolean isReverseOrder, final MatchingRule orderingMatchingRule) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeDescription); |
| | | this.attributeDescription = attributeDescription.toString(); |
| | |
| | | * @throws NullPointerException |
| | | * If {@code AttributeDescription} was {@code null}. |
| | | */ |
| | | public SortKey(final String attributeDescription) throws NullPointerException |
| | | public SortKey(final String attributeDescription) |
| | | { |
| | | this(attributeDescription, false, null); |
| | | } |
| | |
| | | * If {@code AttributeDescription} was {@code null}. |
| | | */ |
| | | public SortKey(final String attributeDescription, final boolean isReverseOrder) |
| | | throws NullPointerException |
| | | { |
| | | this(attributeDescription, isReverseOrder, null); |
| | | } |
| | |
| | | */ |
| | | public SortKey(final String attributeDescription, |
| | | final boolean isReverseOrder, final String orderingMatchingRule) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeDescription); |
| | | this.attributeDescription = attributeDescription; |
| | |
| | | * found. |
| | | */ |
| | | public Comparator<Entry> comparator() |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | return comparator(Schema.getDefaultSchema()); |
| | | } |
| | |
| | | * If {@code schema} was {@code null}. |
| | | */ |
| | | public Comparator<Entry> comparator(final Schema schema) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(schema); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | |
| | | import java.util.TreeMap; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.requests.Requests; |
| | | |
| | | import com.forgerock.opendj.util.Validator; |
| | |
| | | */ |
| | | public static final EntryFactory FACTORY = new EntryFactory() |
| | | { |
| | | public Entry newEntry(final DN name) throws NullPointerException |
| | | public Entry newEntry(final DN name) |
| | | { |
| | | return new TreeMapEntry(name); |
| | | } |
| | |
| | | * @see #TreeMapEntry(Entry) |
| | | */ |
| | | public static TreeMapEntry deepCopyOfEntry(final Entry entry) |
| | | throws NullPointerException |
| | | { |
| | | TreeMapEntry copy = new TreeMapEntry(entry.getName()); |
| | | for (final Attribute attribute : entry.getAllAttributes()) |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public TreeMapEntry(final DN name) throws NullPointerException |
| | | public TreeMapEntry(final DN name) |
| | | { |
| | | super(Validator.ensureNotNull(name), |
| | | new TreeMap<AttributeDescription, Attribute>()); |
| | |
| | | * If {@code entry} was {@code null}. |
| | | * @see #deepCopyOfEntry(Entry) |
| | | */ |
| | | public TreeMapEntry(final Entry entry) throws NullPointerException |
| | | public TreeMapEntry(final Entry entry) |
| | | { |
| | | this(entry.getName()); |
| | | for (final Attribute attribute : entry.getAllAttributes()) |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public TreeMapEntry(final String name) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | this(DN.valueOf(name)); |
| | | } |
| | |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | public TreeMapEntry(final String... ldifLines) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | this(Requests.newAddRequest(ldifLines)); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * null}. |
| | | */ |
| | | public static X509TrustManager checkHostName(final String hostNamePattern, |
| | | final X509TrustManager trustManager) throws NullPointerException |
| | | final X509TrustManager trustManager) |
| | | { |
| | | Validator.ensureNotNull(trustManager, hostNamePattern); |
| | | return new CheckHostName(trustManager, hostNamePattern); |
| | |
| | | * If {@code file} was {@code null}. |
| | | */ |
| | | public static X509TrustManager checkUsingTrustStore(final String file) |
| | | throws GeneralSecurityException, IOException, NullPointerException |
| | | throws GeneralSecurityException, IOException |
| | | { |
| | | return checkUsingTrustStore(file, null, null); |
| | | } |
| | |
| | | */ |
| | | public static X509TrustManager checkUsingTrustStore(final String file, |
| | | final char[] password, final String format) |
| | | throws GeneralSecurityException, IOException, NullPointerException |
| | | throws GeneralSecurityException, IOException |
| | | { |
| | | Validator.ensureNotNull(file); |
| | | |
| | |
| | | * If {@code trustManager} was {@code null}. |
| | | */ |
| | | public static X509TrustManager checkValidityDates( |
| | | final X509TrustManager trustManager) throws NullPointerException |
| | | final X509TrustManager trustManager) |
| | | { |
| | | Validator.ensureNotNull(trustManager); |
| | | return new CheckValidatyDates(trustManager); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.controls; |
| | |
| | | * If {@code filter} was {@code null}. |
| | | */ |
| | | public static AssertionRequestControl newControl(final boolean isCritical, |
| | | final Filter filter) throws NullPointerException |
| | | final Filter filter) |
| | | { |
| | | return new AssertionRequestControl(isCritical, filter); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | * If {@code authorizationID} was {@code null}. |
| | | */ |
| | | public static AuthorizationIdentityResponseControl newControl( |
| | | final String authorizationID) throws NullPointerException |
| | | final String authorizationID) |
| | | { |
| | | return new AuthorizationIdentityResponseControl(false, authorizationID); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | */ |
| | | public static EntryChangeNotificationResponseControl newControl( |
| | | final PersistentSearchChangeType type, final DN previousName, |
| | | final long changeNumber) throws NullPointerException |
| | | final long changeNumber) |
| | | { |
| | | return new EntryChangeNotificationResponseControl(false, type, |
| | | previousName, changeNumber); |
| | |
| | | */ |
| | | public static EntryChangeNotificationResponseControl newControl( |
| | | final PersistentSearchChangeType type, final String previousName, |
| | | final long changeNumber) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final long changeNumber) |
| | | { |
| | | return new EntryChangeNotificationResponseControl(false, type, DN |
| | | .valueOf(previousName), changeNumber); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | * If {@code control} was {@code null}. |
| | | */ |
| | | public static GenericControl newControl(final Control control) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(control); |
| | | |
| | |
| | | * If {@code oid} was {@code null}. |
| | | */ |
| | | public static GenericControl newControl(final String oid) |
| | | throws NullPointerException |
| | | { |
| | | return new GenericControl(oid, false, null); |
| | | } |
| | |
| | | * If {@code oid} was {@code null}. |
| | | */ |
| | | public static GenericControl newControl(final String oid, |
| | | final boolean isCritical) throws NullPointerException |
| | | final boolean isCritical) |
| | | { |
| | | return new GenericControl(oid, isCritical, null); |
| | | } |
| | |
| | | * If {@code oid} was {@code null}. |
| | | */ |
| | | public static GenericControl newControl(final String oid, |
| | | final boolean isCritical, final Object value) throws NullPointerException |
| | | final boolean isCritical, final Object value) |
| | | { |
| | | return new GenericControl(oid, isCritical, (value == null) ? null |
| | | : ByteString.valueOf(value)); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | */ |
| | | public static GetEffectiveRightsRequestControl newControl( |
| | | final boolean isCritical, final DN authorizationName, |
| | | final Collection<AttributeType> attributes) throws NullPointerException |
| | | final Collection<AttributeType> attributes) |
| | | { |
| | | Validator.ensureNotNull(attributes); |
| | | |
| | |
| | | */ |
| | | public static GetEffectiveRightsRequestControl newControl( |
| | | final boolean isCritical, final String authorizationName, |
| | | final String... attributes) throws UnknownSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final String... attributes) |
| | | { |
| | | Validator.ensureNotNull((Object) attributes); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.controls; |
| | |
| | | */ |
| | | public static MatchedValuesRequestControl newControl( |
| | | final boolean isCritical, final Collection<Filter> filters) |
| | | throws LocalizedIllegalArgumentException, IllegalArgumentException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(filters); |
| | | Validator.ensureTrue(filters.size() > 0, "filters is empty"); |
| | |
| | | public static MatchedValuesRequestControl newControl( |
| | | final boolean isCritical, final String firstFilter, |
| | | final String... remainingFilters) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(firstFilter); |
| | | |
| | |
| | | |
| | | |
| | | private static Filter validateFilter(final Filter filter) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | final LocalizedIllegalArgumentException e = filter.accept(FILTER_VALIDATOR, |
| | | filter); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | * If {@code errorType} was {@code null}. |
| | | */ |
| | | public static PasswordPolicyResponseControl newControl( |
| | | final PasswordPolicyErrorType errorType) throws NullPointerException |
| | | final PasswordPolicyErrorType errorType) |
| | | { |
| | | Validator.ensureNotNull(errorType); |
| | | |
| | |
| | | */ |
| | | public static PasswordPolicyResponseControl newControl( |
| | | final PasswordPolicyWarningType warningType, final int warningValue) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(warningType); |
| | | Validator.ensureTrue(warningValue >= 0, "warningValue is negative"); |
| | |
| | | */ |
| | | public static PasswordPolicyResponseControl newControl( |
| | | final PasswordPolicyWarningType warningType, final int warningValue, |
| | | final PasswordPolicyErrorType errorType) throws IllegalArgumentException, |
| | | NullPointerException |
| | | final PasswordPolicyErrorType errorType) |
| | | { |
| | | Validator.ensureNotNull(warningType, errorType); |
| | | Validator.ensureTrue(warningValue >= 0, "warningValue is negative"); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | final boolean isCritical, final boolean changesOnly, |
| | | final boolean returnECs, |
| | | final Collection<PersistentSearchChangeType> changeTypes) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(changeTypes); |
| | | |
| | |
| | | public static PersistentSearchRequestControl newControl( |
| | | final boolean isCritical, final boolean changesOnly, |
| | | final boolean returnECs, final PersistentSearchChangeType... changeTypes) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull((Object) changeTypes); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.controls; |
| | |
| | | * If {@code attributes} was {@code null}. |
| | | */ |
| | | public static PostReadRequestControl newControl(final boolean isCritical, |
| | | final Collection<String> attributes) throws NullPointerException |
| | | final Collection<String> attributes) |
| | | { |
| | | Validator.ensureNotNull(attributes); |
| | | |
| | |
| | | * If {@code attributes} was {@code null}. |
| | | */ |
| | | public static PostReadRequestControl newControl(final boolean isCritical, |
| | | final String... attributes) throws NullPointerException |
| | | final String... attributes) |
| | | { |
| | | Validator.ensureNotNull((Object) attributes); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.controls; |
| | |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | public static PostReadResponseControl newControl(final Entry entry) |
| | | throws NullPointerException |
| | | { |
| | | /** |
| | | * FIXME: all other control implementations are fully immutable. We should |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.controls; |
| | |
| | | * If {@code attributes} was {@code null}. |
| | | */ |
| | | public static PreReadRequestControl newControl(final boolean isCritical, |
| | | final Collection<String> attributes) throws NullPointerException |
| | | final Collection<String> attributes) |
| | | { |
| | | Validator.ensureNotNull(attributes); |
| | | |
| | |
| | | * If {@code attributes} was {@code null}. |
| | | */ |
| | | public static PreReadRequestControl newControl(final boolean isCritical, |
| | | final String... attributes) throws NullPointerException |
| | | final String... attributes) |
| | | { |
| | | Validator.ensureNotNull((Object) attributes); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.controls; |
| | |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | public static PreReadResponseControl newControl(final Entry entry) |
| | | throws NullPointerException |
| | | { |
| | | /** |
| | | * FIXME: all other control implementations are fully immutable. We should |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | * If {@code authorizationName} was {@code null}. |
| | | */ |
| | | public static ProxiedAuthV1RequestControl newControl( |
| | | final DN authorizationName) throws NullPointerException |
| | | final DN authorizationName) |
| | | { |
| | | Validator.ensureNotNull(authorizationName); |
| | | return new ProxiedAuthV1RequestControl(authorizationName); |
| | |
| | | * If {@code authorizationName} was {@code null}. |
| | | */ |
| | | public static ProxiedAuthV1RequestControl newControl( |
| | | final String authorizationName) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final String authorizationName) |
| | | { |
| | | Validator.ensureNotNull(authorizationName); |
| | | return new ProxiedAuthV1RequestControl(DN.valueOf(authorizationName)); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | * If {@code authorizationName} was {@code null}. |
| | | */ |
| | | public static final ProxiedAuthV2RequestControl newControl( |
| | | final String authorizationID) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final String authorizationID) |
| | | { |
| | | if (authorizationID.length() == 0) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | */ |
| | | public static ServerSideSortRequestControl newControl( |
| | | final boolean isCritical, final Collection<SortKey> keys) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(keys); |
| | | Validator.ensureTrue(!keys.isEmpty(), "keys must not be empty"); |
| | |
| | | */ |
| | | public static ServerSideSortRequestControl newControl( |
| | | final boolean isCritical, final SortKey firstKey, |
| | | final SortKey... remainingKeys) throws NullPointerException |
| | | final SortKey... remainingKeys) |
| | | { |
| | | Validator.ensureNotNull(firstKey, remainingKeys); |
| | | |
| | |
| | | */ |
| | | public static ServerSideSortRequestControl newControl( |
| | | final boolean isCritical, final String sortKeys) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(sortKeys); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static ServerSideSortResponseControl newControl(final ResultCode result) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(result); |
| | | |
| | |
| | | */ |
| | | public static ServerSideSortResponseControl newControl( |
| | | final ResultCode result, final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(result); |
| | | |
| | |
| | | */ |
| | | public static ServerSideSortResponseControl newControl( |
| | | final ResultCode result, final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(result); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | * If {@code cookie} was {@code null}. |
| | | */ |
| | | public static SimplePagedResultsControl newControl(final boolean isCritical, |
| | | final int size, final ByteString cookie) throws NullPointerException |
| | | final int size, final ByteString cookie) |
| | | { |
| | | Validator.ensureNotNull(cookie); |
| | | return new SimplePagedResultsControl(isCritical, size, cookie); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | public static VirtualListViewRequestControl newAssertionControl( |
| | | final boolean isCritical, final ByteString assertionValue, |
| | | final int beforeCount, final int afterCount, final ByteString contextID) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(assertionValue); |
| | | Validator.ensureTrue(beforeCount >= 0, "beforeCount is less than 0"); |
| | |
| | | public static VirtualListViewRequestControl newOffsetControl( |
| | | final boolean isCritical, final int offset, final int contentCount, |
| | | final int beforeCount, final int afterCount, final ByteString contextID) |
| | | throws IllegalArgumentException |
| | | { |
| | | Validator.ensureTrue(beforeCount >= 0, "beforeCount is less than 0"); |
| | | Validator.ensureTrue(afterCount >= 0, "afterCount is less than 0"); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.controls; |
| | | |
| | |
| | | public static VirtualListViewResponseControl newControl( |
| | | final int targetPosition, final int contentCount, |
| | | final ResultCode result, final ByteString contextID) |
| | | throws IllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(result); |
| | | Validator.ensureTrue(targetPosition >= 0, "targetPosition is less than 0"); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | AbandonRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | AbandonRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this abandon request does not permit the request ID to be set. |
| | | */ |
| | | AbandonRequest setRequestID(int id) throws UnsupportedOperationException; |
| | | AbandonRequest setRequestID(int id); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public AbandonRequest setRequestID(final int id) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.requestID = id; |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * If {@code extendedRequest} was {@code null} . |
| | | */ |
| | | protected AbstractExtendedRequest(ExtendedRequest<S> extendedRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(extendedRequest); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | AbstractRequestImpl(Request request) throws NullPointerException |
| | | AbstractRequestImpl(Request request) |
| | | { |
| | | Validator.ensureNotNull(request); |
| | | for (Control control : request.getControls()) |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public final R addControl(final Control control) throws NullPointerException |
| | | public final R addControl(final Control control) |
| | | { |
| | | Validator.ensureNotNull(control); |
| | | controls.add(control); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | @Override |
| | | public final R addControl(final Control control) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | @Override |
| | | public final <C extends Control> C getControl( |
| | | final ControlDecoder<C> decoder, final DecodeOptions options) |
| | | throws NullPointerException, DecodeException |
| | | throws DecodeException |
| | | { |
| | | Validator.ensureNotNull(decoder, options); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldap.controls.Control; |
| | | import org.forgerock.opendj.ldap.controls.ControlDecoder; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean addAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean addAttribute(Attribute attribute); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean addAttribute(Attribute attribute, |
| | | Collection<ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Collection<ByteString> duplicateValues); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | AddRequest addAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | AddRequest addAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | AddRequest addControl(Control control) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | AddRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | AddRequest clearAttributes() throws UnsupportedOperationException; |
| | | AddRequest clearAttributes(); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean containsAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) throws NullPointerException; |
| | | Collection<ByteString> missingValues); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean containsAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | boolean containsAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | Iterable<Attribute> getAllAttributes(AttributeDescription attributeDescription) |
| | | throws NullPointerException; |
| | | Iterable<Attribute> getAllAttributes(AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | Iterable<Attribute> getAllAttributes(String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | Iterable<Attribute> getAllAttributes(String attributeDescription); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | Attribute getAttribute(AttributeDescription attributeDescription) |
| | | throws NullPointerException; |
| | | Attribute getAttribute(AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | Attribute getAttribute(String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | Attribute getAttribute(String attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean removeAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Collection<ByteString> missingValues); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean removeAttribute(AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean removeAttribute(AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | AddRequest removeAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | AddRequest removeAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean replaceAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean replaceAttribute(Attribute attribute); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | AddRequest replaceAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | AddRequest replaceAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | AddRequest setName(DN dn) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | AddRequest setName(DN dn); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | AddRequest setName(String dn) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException; |
| | | AddRequest setName(String dn); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldif.ChangeRecordVisitor; |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code entry} was {@code null} . |
| | | */ |
| | | AddRequestImpl(final Entry entry) throws NullPointerException |
| | | AddRequestImpl(final Entry entry) |
| | | { |
| | | this.entry = entry; |
| | | } |
| | |
| | | * @throws NullPointerException |
| | | * If {@code addRequest} was {@code null} . |
| | | */ |
| | | AddRequestImpl(final AddRequest addRequest) throws NullPointerException |
| | | AddRequestImpl(final AddRequest addRequest) |
| | | { |
| | | super(addRequest); |
| | | this.entry = LinkedHashMapEntry.deepCopyOfEntry(addRequest); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean addAttribute(final Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.addAttribute(attribute); |
| | | } |
| | |
| | | */ |
| | | public boolean addAttribute(final Attribute attribute, |
| | | final Collection<ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.addAttribute(attribute, duplicateValues); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public AddRequest addAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | entry.addAttribute(attributeDescription, values); |
| | | return this; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public AddRequest clearAttributes() throws UnsupportedOperationException |
| | | public AddRequest clearAttributes() |
| | | { |
| | | entry.clearAttributes(); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean containsAttribute(final Attribute attribute, |
| | | final Collection<ByteString> missingValues) throws NullPointerException |
| | | final Collection<ByteString> missingValues) |
| | | { |
| | | return entry.containsAttribute(attribute, missingValues); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean containsAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final Object... values) |
| | | { |
| | | return entry.containsAttribute(attributeDescription, values); |
| | | } |
| | |
| | | */ |
| | | public Iterable<Attribute> getAllAttributes( |
| | | final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | return entry.getAllAttributes(attributeDescription); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Iterable<Attribute> getAllAttributes(final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return entry.getAllAttributes(attributeDescription); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Attribute getAttribute(final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | return entry.getAttribute(attributeDescription); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Attribute getAttribute(final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return entry.getAttribute(attributeDescription); |
| | | } |
| | |
| | | */ |
| | | public boolean removeAttribute(final Attribute attribute, |
| | | final Collection<ByteString> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.removeAttribute(attribute, missingValues); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean removeAttribute(final AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.removeAttribute(attributeDescription); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public AddRequest removeAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | entry.removeAttribute(attributeDescription, values); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean replaceAttribute(final Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.replaceAttribute(attribute); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public AddRequest replaceAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | entry.replaceAttribute(attributeDescription, values); |
| | | return this; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public AddRequest setName(final DN dn) throws UnsupportedOperationException, |
| | | NullPointerException |
| | | public AddRequest setName(final DN dn) |
| | | { |
| | | entry.setName(dn); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public AddRequest setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | entry.setName(dn); |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | AnonymousSASLBindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | AnonymousSASLBindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code traceString} was {@code null}. |
| | | */ |
| | | AnonymousSASLBindRequest setTraceString(String traceString) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | AnonymousSASLBindRequest setTraceString(String traceString); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public AnonymousSASLBindRequest setTraceString(final String traceString) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(traceString); |
| | | this.traceString = traceString; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | BindRequest addControl(Control control) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | BindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | CRAMMD5SASLBindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CRAMMD5SASLBindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code authenticationID} was {@code null}. |
| | | */ |
| | | CRAMMD5SASLBindRequest setAuthenticationID(String authenticationID) |
| | | throws UnsupportedOperationException, LocalizedIllegalArgumentException, |
| | | NullPointerException; |
| | | CRAMMD5SASLBindRequest setAuthenticationID(String authenticationID); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | CRAMMD5SASLBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CRAMMD5SASLBindRequest setPassword(byte[] password); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | CRAMMD5SASLBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CRAMMD5SASLBindRequest setPassword(char[] password); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | CRAMMD5SASLBindRequestImpl( |
| | | final CRAMMD5SASLBindRequest cramMD5SASLBindRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(cramMD5SASLBindRequest); |
| | | this.authenticationID = cramMD5SASLBindRequest.getAuthenticationID(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public CRAMMD5SASLBindRequest setAuthenticationID( |
| | | final String authenticationID) throws NullPointerException |
| | | final String authenticationID) |
| | | { |
| | | Validator.ensureNotNull(authenticationID); |
| | | this.authenticationID = authenticationID; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public CRAMMD5SASLBindRequest setPassword(final byte[] password) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(password); |
| | | this.password = password; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public CRAMMD5SASLBindRequest setPassword(final char[] password) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(password); |
| | | this.password = StaticUtils.getBytes(password); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | CancelExtendedRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CancelExtendedRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this abandon request does not permit the request ID to be set. |
| | | */ |
| | | CancelExtendedRequest setRequestID(int id) |
| | | throws UnsupportedOperationException; |
| | | CancelExtendedRequest setRequestID(int id); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * If {@code cancelExtendedRequest} was {@code null} . |
| | | */ |
| | | CancelExtendedRequestImpl(final CancelExtendedRequest cancelExtendedRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(cancelExtendedRequest); |
| | | this.requestID = cancelExtendedRequest.getRequestID(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldap.controls.Control; |
| | | import org.forgerock.opendj.ldap.controls.ControlDecoder; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | CompareRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CompareRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code value} was {@code null}. |
| | | */ |
| | | CompareRequest setAssertionValue(ByteString value) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CompareRequest setAssertionValue(ByteString value); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code value} was {@code null}. |
| | | */ |
| | | CompareRequest setAssertionValue(Object value) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CompareRequest setAssertionValue(Object value); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | CompareRequest setAttributeDescription( |
| | | AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescription} was {@code null}. |
| | | */ |
| | | CompareRequest setAttributeDescription(String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | CompareRequest setAttributeDescription(String attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | CompareRequest setName(DN dn) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | CompareRequest setName(DN dn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | CompareRequest setName(String dn) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException; |
| | | CompareRequest setName(String dn); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.AttributeDescription; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.DN; |
| | |
| | | */ |
| | | CompareRequestImpl(final DN name, |
| | | final AttributeDescription attributeDescription, |
| | | final ByteString assertionValue) throws NullPointerException |
| | | final ByteString assertionValue) |
| | | { |
| | | this.name = name; |
| | | this.attributeDescription = attributeDescription; |
| | |
| | | * If {@code compareRequest} was {@code null} . |
| | | */ |
| | | CompareRequestImpl(final CompareRequest compareRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(compareRequest); |
| | | this.name = compareRequest.getName(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public CompareRequest setAssertionValue(final ByteString value) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(value); |
| | | this.assertionValue = value; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public CompareRequest setAssertionValue(final Object value) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(value); |
| | | this.assertionValue = ByteString.valueOf(value); |
| | |
| | | */ |
| | | public CompareRequest setAttributeDescription( |
| | | final AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeDescription); |
| | | this.attributeDescription = attributeDescription; |
| | |
| | | */ |
| | | public CompareRequest setAttributeDescription( |
| | | final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(attributeDescription); |
| | | this.attributeDescription = AttributeDescription |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public CompareRequest setName(final DN dn) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = dn; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public CompareRequest setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = DN.valueOf(dn); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | DeleteRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | DeleteRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | DeleteRequest setName(DN dn) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | DeleteRequest setName(DN dn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | DeleteRequest setName(String dn) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException; |
| | | DeleteRequest setName(String dn); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldif.ChangeRecordVisitor; |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | DeleteRequestImpl(final DN name) throws NullPointerException |
| | | DeleteRequestImpl(final DN name) |
| | | { |
| | | this.name = name; |
| | | } |
| | |
| | | * If {@code addRequest} was {@code null} . |
| | | */ |
| | | DeleteRequestImpl(final DeleteRequest deleteRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(deleteRequest); |
| | | this.name = deleteRequest.getName(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public DeleteRequest setName(final DN dn) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = dn; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public DeleteRequest setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = DN.valueOf(dn); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} or {@code value} was {@code null}. |
| | | */ |
| | | DigestMD5SASLBindRequest addAdditionalAuthParam(String name, String value) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | DigestMD5SASLBindRequest addAdditionalAuthParam(String name, String value); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | DigestMD5SASLBindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | DigestMD5SASLBindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * @see #QOP_AUTH_INT |
| | | * @see #QOP_AUTH_CONF |
| | | */ |
| | | DigestMD5SASLBindRequest addQOP(String... qopValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | DigestMD5SASLBindRequest addQOP(String... qopValues); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | @Override |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code authenticationID} was {@code null}. |
| | | */ |
| | | DigestMD5SASLBindRequest setAuthenticationID(String authenticationID) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | DigestMD5SASLBindRequest setAuthenticationID(String authenticationID); |
| | | |
| | | |
| | | |
| | |
| | | * If this bind request does not permit the authorization ID to be |
| | | * set. |
| | | */ |
| | | DigestMD5SASLBindRequest setAuthorizationID(String authorizationID) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException; |
| | | DigestMD5SASLBindRequest setAuthorizationID(String authorizationID); |
| | | |
| | | |
| | | |
| | |
| | | * @see #CIPHER_MEDIUM |
| | | * @see #CIPHER_LOW |
| | | */ |
| | | DigestMD5SASLBindRequest setCipher(String cipher) |
| | | throws UnsupportedOperationException; |
| | | DigestMD5SASLBindRequest setCipher(String cipher); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this bind request does not permit the buffer size to be set. |
| | | */ |
| | | DigestMD5SASLBindRequest setMaxReceiveBufferSize(int size) |
| | | throws UnsupportedOperationException; |
| | | DigestMD5SASLBindRequest setMaxReceiveBufferSize(int size); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this bind request does not permit the buffer size to be set. |
| | | */ |
| | | DigestMD5SASLBindRequest setMaxSendBufferSize(int size) |
| | | throws UnsupportedOperationException; |
| | | DigestMD5SASLBindRequest setMaxSendBufferSize(int size); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | DigestMD5SASLBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | DigestMD5SASLBindRequest setPassword(byte[] password); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | DigestMD5SASLBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | DigestMD5SASLBindRequest setPassword(char[] password); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code realm} was {@code null}. |
| | | */ |
| | | DigestMD5SASLBindRequest setRealm(String realm) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | DigestMD5SASLBindRequest setRealm(String realm); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this bind request does not permit server auth to be set. |
| | | */ |
| | | DigestMD5SASLBindRequest setServerAuth(boolean serverAuth) |
| | | throws UnsupportedOperationException; |
| | | DigestMD5SASLBindRequest setServerAuth(boolean serverAuth); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | DigestMD5SASLBindRequestImpl( |
| | | final DigestMD5SASLBindRequest digestMD5SASLBindRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(digestMD5SASLBindRequest); |
| | | this.additionalAuthParams.putAll( |
| | |
| | | */ |
| | | @Override |
| | | public DigestMD5SASLBindRequest addAdditionalAuthParam(final String name, |
| | | final String value) throws UnsupportedOperationException, |
| | | NullPointerException |
| | | final String value) |
| | | { |
| | | Validator.ensureNotNull(name, value); |
| | | additionalAuthParams.put(name, value); |
| | |
| | | */ |
| | | @Override |
| | | public DigestMD5SASLBindRequest addQOP(final String... qopValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | for (final String qopValue : qopValues) |
| | | { |
| | |
| | | */ |
| | | @Override |
| | | public DigestMD5SASLBindRequest setAuthenticationID( |
| | | final String authenticationID) throws NullPointerException |
| | | final String authenticationID) |
| | | { |
| | | Validator.ensureNotNull(authenticationID); |
| | | this.authenticationID = authenticationID; |
| | |
| | | */ |
| | | @Override |
| | | public DigestMD5SASLBindRequest setCipher(final String cipher) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.cipher = cipher; |
| | | return this; |
| | |
| | | */ |
| | | @Override |
| | | public DigestMD5SASLBindRequest setMaxReceiveBufferSize(final int size) |
| | | throws UnsupportedOperationException |
| | | { |
| | | maxReceiveBufferSize = size; |
| | | return this; |
| | |
| | | */ |
| | | @Override |
| | | public DigestMD5SASLBindRequest setMaxSendBufferSize(final int size) |
| | | throws UnsupportedOperationException |
| | | { |
| | | maxSendBufferSize = size; |
| | | return this; |
| | |
| | | */ |
| | | @Override |
| | | public DigestMD5SASLBindRequest setPassword(final byte[] password) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(password); |
| | | this.password = password; |
| | |
| | | */ |
| | | @Override |
| | | public DigestMD5SASLBindRequest setPassword(final char[] password) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(password); |
| | | this.password = StaticUtils.getBytes(password); |
| | |
| | | */ |
| | | @Override |
| | | public DigestMD5SASLBindRequest setServerAuth(final boolean serverAuth) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.serverAuth = serverAuth; |
| | | return this; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ExtendedRequest<S> addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | ExtendedRequest<S> addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ExternalSASLBindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | ExternalSASLBindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * If {@code authorizationID} was non-empty and did not contain a |
| | | * valid authorization ID type. |
| | | */ |
| | | ExternalSASLBindRequest setAuthorizationID(String authorizationID) |
| | | throws UnsupportedOperationException, LocalizedIllegalArgumentException; |
| | | |
| | | ExternalSASLBindRequest setAuthorizationID(String authorizationID); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | ExternalSASLBindRequestImpl( |
| | | final ExternalSASLBindRequest externalSASLBindRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(externalSASLBindRequest); |
| | | this.authorizationID = externalSASLBindRequest.getAuthorizationID(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import javax.security.auth.Subject; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} or {@code value} was {@code null}. |
| | | */ |
| | | GSSAPISASLBindRequest addAdditionalAuthParam(String name, String value) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GSSAPISASLBindRequest addAdditionalAuthParam(String name, String value); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | GSSAPISASLBindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GSSAPISASLBindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * @see #QOP_AUTH_INT |
| | | * @see #QOP_AUTH_CONF |
| | | */ |
| | | GSSAPISASLBindRequest addQOP(String... qopValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GSSAPISASLBindRequest addQOP(String... qopValues); |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | @Override |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code authenticationID} was {@code null}. |
| | | */ |
| | | GSSAPISASLBindRequest setAuthenticationID(String authenticationID) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | GSSAPISASLBindRequest setAuthenticationID(String authenticationID); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code authorizationID} was non-empty and did not contain a |
| | | * valid authorization ID type. |
| | | */ |
| | | GSSAPISASLBindRequest setAuthorizationID(String authorizationID) |
| | | throws LocalizedIllegalArgumentException; |
| | | GSSAPISASLBindRequest setAuthorizationID(String authorizationID); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code address} was {@code null}. |
| | | */ |
| | | GSSAPISASLBindRequest setKDCAddress(String address) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GSSAPISASLBindRequest setKDCAddress(String address); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this bind request does not permit the buffer size to be set. |
| | | */ |
| | | GSSAPISASLBindRequest setMaxReceiveBufferSize(int size) |
| | | throws UnsupportedOperationException; |
| | | GSSAPISASLBindRequest setMaxReceiveBufferSize(int size); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this bind request does not permit the buffer size to be set. |
| | | */ |
| | | GSSAPISASLBindRequest setMaxSendBufferSize(int size) |
| | | throws UnsupportedOperationException; |
| | | GSSAPISASLBindRequest setMaxSendBufferSize(int size); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | GSSAPISASLBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GSSAPISASLBindRequest setPassword(byte[] password); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | GSSAPISASLBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GSSAPISASLBindRequest setPassword(char[] password); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code realm} was {@code null}. |
| | | */ |
| | | GSSAPISASLBindRequest setRealm(String realm) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GSSAPISASLBindRequest setRealm(String realm); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this bind request does not permit server auth to be set. |
| | | */ |
| | | GSSAPISASLBindRequest setServerAuth(boolean serverAuth) |
| | | throws UnsupportedOperationException; |
| | | GSSAPISASLBindRequest setServerAuth(boolean serverAuth); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code subject} was {@code null}. |
| | | */ |
| | | GSSAPISASLBindRequest setSubject(Subject subject) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GSSAPISASLBindRequest setSubject(Subject subject); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | GSSAPISASLBindRequestImpl( |
| | | final GSSAPISASLBindRequest gssapiSASLBindRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(gssapiSASLBindRequest); |
| | | this.subject = gssapiSASLBindRequest.getSubject(); |
| | |
| | | */ |
| | | @Override |
| | | public GSSAPISASLBindRequest addAdditionalAuthParam(final String name, |
| | | final String value) throws UnsupportedOperationException, |
| | | NullPointerException |
| | | final String value) |
| | | { |
| | | Validator.ensureNotNull(name, value); |
| | | additionalAuthParams.put(name, value); |
| | |
| | | */ |
| | | @Override |
| | | public GSSAPISASLBindRequest addQOP(final String... qopValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | for (final String qopValue : qopValues) |
| | | { |
| | |
| | | */ |
| | | @Override |
| | | public GSSAPISASLBindRequest setAuthenticationID(final String authenticationID) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(authenticationID); |
| | | this.authenticationID = authenticationID; |
| | |
| | | */ |
| | | @Override |
| | | public GSSAPISASLBindRequest setMaxReceiveBufferSize(final int size) |
| | | throws UnsupportedOperationException |
| | | { |
| | | maxReceiveBufferSize = size; |
| | | return this; |
| | |
| | | */ |
| | | @Override |
| | | public GSSAPISASLBindRequest setMaxSendBufferSize(final int size) |
| | | throws UnsupportedOperationException |
| | | { |
| | | maxSendBufferSize = size; |
| | | return this; |
| | |
| | | */ |
| | | @Override |
| | | public GSSAPISASLBindRequest setPassword(final byte[] password) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(password); |
| | | this.password = password; |
| | |
| | | */ |
| | | @Override |
| | | public GSSAPISASLBindRequest setPassword(final char[] password) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(password); |
| | | this.password = StaticUtils.getBytes(password); |
| | |
| | | */ |
| | | @Override |
| | | public GSSAPISASLBindRequest setServerAuth(final boolean serverAuth) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.serverAuth = serverAuth; |
| | | return this; |
| | |
| | | */ |
| | | @Override |
| | | public GSSAPISASLBindRequest setSubject(final Subject subject) |
| | | throws NullPointerException |
| | | { |
| | | this.subject = subject; |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | GenericBindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GenericBindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * If this generic bind request does not permit the authentication |
| | | * type to be set. |
| | | */ |
| | | GenericBindRequest setAuthenticationType(byte type) |
| | | throws UnsupportedOperationException; |
| | | GenericBindRequest setAuthenticationType(byte type); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code bytes} was {@code null}. |
| | | */ |
| | | GenericBindRequest setAuthenticationValue(byte[] bytes) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | |
| | | GenericBindRequest setAuthenticationValue(byte[] bytes); |
| | | |
| | | |
| | | /** |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | GenericBindRequest setName(String name) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | GenericBindRequest setName(String name); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | GenericBindRequestImpl( |
| | | final GenericBindRequest genericBindRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(genericBindRequest); |
| | | this.name = genericBindRequest.getName(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public GenericBindRequest setAuthenticationType(final byte type) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.authenticationType = type; |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public GenericBindRequest setAuthenticationValue(final byte[] bytes) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(bytes); |
| | | this.authenticationValue = bytes; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public GenericBindRequest setName(final String name) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(name); |
| | | this.name = name; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | GenericExtendedRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GenericExtendedRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code oid} was {@code null}. |
| | | */ |
| | | GenericExtendedRequest setOID(String oid) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | |
| | | GenericExtendedRequest setOID(String oid); |
| | | |
| | | |
| | | /** |
| | |
| | | * If this generic extended request does not permit the request |
| | | * value to be set. |
| | | */ |
| | | GenericExtendedRequest setValue(ByteString bytes) |
| | | throws UnsupportedOperationException; |
| | | |
| | | GenericExtendedRequest setValue(ByteString bytes); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * If {@code requestName} was {@code null}. |
| | | */ |
| | | GenericExtendedRequestImpl(final String requestName, |
| | | final ByteString requestValue) throws NullPointerException |
| | | final ByteString requestValue) |
| | | { |
| | | this.requestName = requestName; |
| | | this.requestValue = requestValue; |
| | |
| | | */ |
| | | protected GenericExtendedRequestImpl( |
| | | GenericExtendedRequest genericExtendedRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(genericExtendedRequest); |
| | | this.requestName = genericExtendedRequest.getOID(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public GenericExtendedRequest setOID(final String oid) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(oid); |
| | | this.requestName = oid; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public GenericExtendedRequest setValue(final ByteString bytes) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.requestValue = bytes; |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ModifyDNRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | ModifyDNRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * If this modify DN request does not permit the delete old RDN |
| | | * parameter to be set. |
| | | */ |
| | | ModifyDNRequest setDeleteOldRDN(boolean deleteOldRDN) |
| | | throws UnsupportedOperationException; |
| | | ModifyDNRequest setDeleteOldRDN(boolean deleteOldRDN); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | ModifyDNRequest setName(DN dn) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | ModifyDNRequest setName(DN dn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | ModifyDNRequest setName(String dn) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException; |
| | | ModifyDNRequest setName(String dn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code rdn} was {@code null}. |
| | | */ |
| | | ModifyDNRequest setNewRDN(RDN rdn) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | ModifyDNRequest setNewRDN(RDN rdn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code rdn} was {@code null}. |
| | | */ |
| | | ModifyDNRequest setNewRDN(String rdn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | ModifyDNRequest setNewRDN(String rdn); |
| | | |
| | | |
| | | |
| | |
| | | * If this modify DN request does not permit the new superior to be |
| | | * set. |
| | | */ |
| | | ModifyDNRequest setNewSuperior(DN dn) throws UnsupportedOperationException; |
| | | ModifyDNRequest setNewSuperior(DN dn); |
| | | |
| | | |
| | | |
| | |
| | | * If this modify DN request does not permit the new superior to be |
| | | * set. |
| | | */ |
| | | ModifyDNRequest setNewSuperior(String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException; |
| | | ModifyDNRequest setNewSuperior(String dn); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.RDN; |
| | | import org.forgerock.opendj.ldif.ChangeRecordVisitor; |
| | |
| | | * If {@code name} or {@code newRDN} was {@code null}. |
| | | */ |
| | | ModifyDNRequestImpl(final DN name, final RDN newRDN) |
| | | throws NullPointerException |
| | | { |
| | | this.name = name; |
| | | this.newRDN = newRDN; |
| | |
| | | * If {@code modifyDNRequest} was {@code null} . |
| | | */ |
| | | ModifyDNRequestImpl(final ModifyDNRequest modifyDNRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(modifyDNRequest); |
| | | this.name = modifyDNRequest.getName(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequestImpl setDeleteOldRDN(final boolean deleteOldRDN) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.deleteOldRDN = deleteOldRDN; |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setName(final DN dn) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = dn; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = DN.valueOf(dn); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setNewRDN(final RDN rdn) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(rdn); |
| | | this.newRDN = rdn; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setNewRDN(final String rdn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(rdn); |
| | | this.newRDN = RDN.valueOf(rdn); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setNewSuperior(final DN dn) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.newSuperior = dn; |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyDNRequest setNewSuperior(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException |
| | | { |
| | | this.newSuperior = (dn != null) ? DN.valueOf(dn) : null; |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldap.controls.Control; |
| | | import org.forgerock.opendj.ldap.controls.ControlDecoder; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ModifyRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | ModifyRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code modification} was {@code null}. |
| | | */ |
| | | ModifyRequest addModification(Modification modification) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | ModifyRequest addModification(Modification modification); |
| | | |
| | | |
| | | |
| | |
| | | * was {@code null}. |
| | | */ |
| | | ModifyRequest addModification(ModificationType type, |
| | | String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | ModifyRequest setName(DN dn) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | ModifyRequest setName(DN dn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | ModifyRequest setName(String dn) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException; |
| | | ModifyRequest setName(String dn); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldif.ChangeRecordVisitor; |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | ModifyRequestImpl(final DN name) throws NullPointerException |
| | | ModifyRequestImpl(final DN name) |
| | | { |
| | | this.name = name; |
| | | } |
| | |
| | | * If {@code modifyRequest} was {@code null} . |
| | | */ |
| | | ModifyRequestImpl(final ModifyRequest modifyRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(modifyRequest); |
| | | this.name = modifyRequest.getName(); |
| | |
| | | public ModifyRequest addChange(final ModificationType type, |
| | | final String attributeDescription, final Object firstValue, |
| | | final Object... remainingValues) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | // TODO Auto-generated method stub |
| | | return null; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyRequest addModification(final Modification change) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | changes.add(change); |
| | |
| | | */ |
| | | public ModifyRequest addModification(final ModificationType type, |
| | | final String attributeDescription, final Object... values) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(type, attributeDescription, values); |
| | | changes.add(new Modification(type, new LinkedAttribute( |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyRequest setName(final DN dn) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = dn; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public ModifyRequest setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | this.name = DN.valueOf(dn); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | PasswordModifyExtendedRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | PasswordModifyExtendedRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * If this password modify extended request does not permit the new |
| | | * password to be set. |
| | | */ |
| | | PasswordModifyExtendedRequest setNewPassword(ByteString newPassword) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedRequest setNewPassword(ByteString newPassword); |
| | | |
| | | |
| | | |
| | |
| | | * If this password modify extended request does not permit the new |
| | | * password to be set. |
| | | */ |
| | | PasswordModifyExtendedRequest setNewPassword(char[] newPassword) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedRequest setNewPassword(char[] newPassword); |
| | | |
| | | |
| | | |
| | |
| | | * If this password modify extended request does not permit the old |
| | | * password to be set. |
| | | */ |
| | | PasswordModifyExtendedRequest setOldPassword(ByteString oldPassword) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedRequest setOldPassword(ByteString oldPassword); |
| | | |
| | | |
| | | |
| | |
| | | * If this password modify extended request does not permit the old |
| | | * password to be set. |
| | | */ |
| | | PasswordModifyExtendedRequest setOldPassword(char[] oldPassword) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedRequest setOldPassword(char[] oldPassword); |
| | | |
| | | |
| | | |
| | |
| | | * If this password modify extended request does not permit the user |
| | | * identity to be set. |
| | | */ |
| | | PasswordModifyExtendedRequest setUserIdentity(ByteString userIdentity) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedRequest setUserIdentity(ByteString userIdentity); |
| | | |
| | | |
| | | |
| | |
| | | * If this password modify extended request does not permit the user |
| | | * identity to be set. |
| | | */ |
| | | PasswordModifyExtendedRequest setUserIdentity(String userIdentity) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedRequest setUserIdentity(String userIdentity); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | PasswordModifyExtendedRequestImpl( |
| | | final PasswordModifyExtendedRequest passwordModifyExtendedRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(passwordModifyExtendedRequest); |
| | | this.userIdentity = passwordModifyExtendedRequest.getUserIdentity(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | PlainSASLBindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | PlainSASLBindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code authenticationID} was {@code null}. |
| | | */ |
| | | PlainSASLBindRequest setAuthenticationID(String authenticationID) |
| | | throws UnsupportedOperationException, LocalizedIllegalArgumentException, |
| | | NullPointerException; |
| | | PlainSASLBindRequest setAuthenticationID(String authenticationID); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code authorizationID} was non-empty and did not contain a |
| | | * valid authorization ID type. |
| | | */ |
| | | PlainSASLBindRequest setAuthorizationID(String authorizationID) |
| | | throws UnsupportedOperationException, LocalizedIllegalArgumentException; |
| | | PlainSASLBindRequest setAuthorizationID(String authorizationID); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | PlainSASLBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | PlainSASLBindRequest setPassword(byte[] password); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | PlainSASLBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | PlainSASLBindRequest setPassword(char[] password); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | PlainSASLBindRequestImpl( |
| | | final PlainSASLBindRequest plainSASLBindRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(plainSASLBindRequest); |
| | | this.authenticationID = plainSASLBindRequest.getAuthenticationID(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public PlainSASLBindRequest setPassword(final char[] password) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(password); |
| | | this.password = StaticUtils.getBytes(password); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code control} was {@code null}. |
| | | */ |
| | | Request addControl(Control control) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | Request addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code decoder} or {@code options} was {@code null}. |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws DecodeException, NullPointerException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public static AddRequest newAddRequest(final DN name) |
| | | throws NullPointerException |
| | | { |
| | | final Entry entry = new LinkedHashMapEntry().setName(name); |
| | | return new AddRequestImpl(entry); |
| | |
| | | * If {@code entry} was {@code null} . |
| | | */ |
| | | public static AddRequest newAddRequest(final Entry entry) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(entry); |
| | | return new AddRequestImpl(entry); |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public static AddRequest newAddRequest(final String name) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | final Entry entry = new LinkedHashMapEntry().setName(name); |
| | | return new AddRequestImpl(entry); |
| | |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | public static AddRequest newAddRequest(final String... ldifLines) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | // LDIF change record reader is tolerant to missing change types. |
| | | final ChangeRecord record = LDIFChangeRecordReader |
| | |
| | | * If {@code traceString} was {@code null}. |
| | | */ |
| | | public static AnonymousSASLBindRequest newAnonymousSASLBindRequest( |
| | | final String traceString) throws NullPointerException |
| | | final String traceString) |
| | | { |
| | | return new AnonymousSASLBindRequestImpl(traceString); |
| | | } |
| | |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | public static ChangeRecord newChangeRecord(final String... ldifLines) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | // LDIF change record reader is tolerant to missing change types. |
| | | return LDIFChangeRecordReader.valueOfLDIFChangeRecord(ldifLines); |
| | |
| | | */ |
| | | public static CompareRequest newCompareRequest(final DN name, |
| | | final AttributeDescription attributeDescription, |
| | | final ByteString assertionValue) throws NullPointerException |
| | | final ByteString assertionValue) |
| | | { |
| | | Validator.ensureNotNull(name, attributeDescription, assertionValue); |
| | | return new CompareRequestImpl(name, attributeDescription, assertionValue); |
| | |
| | | */ |
| | | public static CompareRequest newCompareRequest(final String name, |
| | | final String attributeDescription, final Object assertionValue) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(name, attributeDescription, assertionValue); |
| | | return new CompareRequestImpl(DN.valueOf(name), |
| | |
| | | */ |
| | | public static CRAMMD5SASLBindRequest newCRAMMD5SASLBindRequest( |
| | | final String authenticationID, final byte[] password) |
| | | throws NullPointerException |
| | | { |
| | | return new CRAMMD5SASLBindRequestImpl(authenticationID, password); |
| | | } |
| | |
| | | */ |
| | | public static CRAMMD5SASLBindRequest newCRAMMD5SASLBindRequest( |
| | | final String authenticationID, final char[] password) |
| | | throws NullPointerException |
| | | { |
| | | return new CRAMMD5SASLBindRequestImpl(authenticationID, getBytes(password)); |
| | | } |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public static DeleteRequest newDeleteRequest(final DN name) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(name); |
| | | return new DeleteRequestImpl(name); |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public static DeleteRequest newDeleteRequest(final String name) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(name); |
| | | return new DeleteRequestImpl(DN.valueOf(name)); |
| | |
| | | */ |
| | | public static DigestMD5SASLBindRequest newDigestMD5SASLBindRequest( |
| | | final String authenticationID, final byte[] password) |
| | | throws NullPointerException |
| | | { |
| | | return new DigestMD5SASLBindRequestImpl(authenticationID, password); |
| | | } |
| | |
| | | */ |
| | | public static DigestMD5SASLBindRequest newDigestMD5SASLBindRequest( |
| | | final String authenticationID, final char[] password) |
| | | throws NullPointerException |
| | | { |
| | | return new DigestMD5SASLBindRequestImpl(authenticationID, |
| | | getBytes(password)); |
| | |
| | | */ |
| | | public static GenericBindRequest newGenericBindRequest( |
| | | final byte authenticationType, final byte[] authenticationValue) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(authenticationValue); |
| | | return new GenericBindRequestImpl("", authenticationType, |
| | |
| | | */ |
| | | public static GenericBindRequest newGenericBindRequest(final String name, |
| | | final byte authenticationType, final byte[] authenticationValue) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(name, authenticationValue); |
| | | return new GenericBindRequestImpl(name, authenticationType, |
| | |
| | | * If {@code requestName} was {@code null}. |
| | | */ |
| | | public static GenericExtendedRequest newGenericExtendedRequest( |
| | | final String requestName) throws NullPointerException |
| | | final String requestName) |
| | | { |
| | | Validator.ensureNotNull(requestName); |
| | | return new GenericExtendedRequestImpl(requestName, null); |
| | |
| | | */ |
| | | public static GenericExtendedRequest newGenericExtendedRequest( |
| | | final String requestName, final ByteString requestValue) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(requestName); |
| | | return new GenericExtendedRequestImpl(requestName, requestValue); |
| | |
| | | */ |
| | | public static GSSAPISASLBindRequest newGSSAPISASLBindRequest( |
| | | final String authenticationID, final byte[] password) |
| | | throws NullPointerException |
| | | { |
| | | return new GSSAPISASLBindRequestImpl(authenticationID, password); |
| | | } |
| | |
| | | */ |
| | | public static GSSAPISASLBindRequest newGSSAPISASLBindRequest( |
| | | final String authenticationID, final char[] password) |
| | | throws NullPointerException |
| | | { |
| | | return new GSSAPISASLBindRequestImpl(authenticationID, getBytes(password)); |
| | | } |
| | |
| | | * If {@code subject} was {@code null}. |
| | | */ |
| | | public static GSSAPISASLBindRequest newGSSAPISASLBindRequest( |
| | | final Subject subject) throws NullPointerException |
| | | final Subject subject) |
| | | { |
| | | return new GSSAPISASLBindRequestImpl(subject); |
| | | } |
| | |
| | | * If {@code name} or {@code newRDN} was {@code null}. |
| | | */ |
| | | public static ModifyDNRequest newModifyDNRequest(final DN name, |
| | | final RDN newRDN) throws NullPointerException |
| | | final RDN newRDN) |
| | | { |
| | | Validator.ensureNotNull(name, newRDN); |
| | | return new ModifyDNRequestImpl(name, newRDN); |
| | |
| | | * If {@code name} or {@code newRDN} was {@code null}. |
| | | */ |
| | | public static ModifyDNRequest newModifyDNRequest(final String name, |
| | | final String newRDN) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final String newRDN) |
| | | { |
| | | Validator.ensureNotNull(name, newRDN); |
| | | return new ModifyDNRequestImpl(DN.valueOf(name), RDN.valueOf(newRDN)); |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public static ModifyRequest newModifyRequest(final DN name) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(name); |
| | | return new ModifyRequestImpl(name); |
| | |
| | | * @see Entries#diffEntries(Entry, Entry) |
| | | */ |
| | | public static final ModifyRequest newModifyRequest(Entry fromEntry, |
| | | Entry toEntry) throws NullPointerException |
| | | Entry toEntry) |
| | | { |
| | | return Entries.diffEntries(fromEntry, toEntry); |
| | | } |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public static ModifyRequest newModifyRequest(final String name) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(name); |
| | | return new ModifyRequestImpl(DN.valueOf(name)); |
| | |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | public static ModifyRequest newModifyRequest(final String... ldifLines) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | // LDIF change record reader is tolerant to missing change types. |
| | | final ChangeRecord record = LDIFChangeRecordReader |
| | |
| | | */ |
| | | public static PlainSASLBindRequest newPlainSASLBindRequest( |
| | | final String authenticationID, final byte[] password) |
| | | throws NullPointerException |
| | | { |
| | | return new PlainSASLBindRequestImpl(authenticationID, password); |
| | | } |
| | |
| | | */ |
| | | public static PlainSASLBindRequest newPlainSASLBindRequest( |
| | | final String authenticationID, final char[] password) |
| | | throws NullPointerException |
| | | { |
| | | return new PlainSASLBindRequestImpl(authenticationID, getBytes(password)); |
| | | } |
| | |
| | | */ |
| | | public static SearchRequest newSearchRequest(final DN name, |
| | | final SearchScope scope, final Filter filter, |
| | | final String... attributeDescriptions) throws NullPointerException |
| | | final String... attributeDescriptions) |
| | | { |
| | | Validator.ensureNotNull(name, scope, filter); |
| | | final SearchRequest request = new SearchRequestImpl(name, scope, filter); |
| | |
| | | public static SearchRequest newSearchRequest(final String name, |
| | | final SearchScope scope, final String filter, |
| | | final String... attributeDescriptions) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(name, scope, filter); |
| | | final SearchRequest request = new SearchRequestImpl(DN.valueOf(name), |
| | |
| | | * If {@code name} or {@code password} was {@code null}. |
| | | */ |
| | | public static SimpleBindRequest newSimpleBindRequest(final String name, |
| | | final byte[] password) throws NullPointerException |
| | | final byte[] password) |
| | | { |
| | | Validator.ensureNotNull(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) throws NullPointerException |
| | | final char[] password) |
| | | { |
| | | Validator.ensureNotNull(name, password); |
| | | return new SimpleBindRequestImpl(name, getBytes(password)); |
| | |
| | | * If {@code sslContext} was {@code null}. |
| | | */ |
| | | public static StartTLSExtendedRequest newStartTLSExtendedRequest( |
| | | final SSLContext sslContext) throws NullPointerException |
| | | final SSLContext sslContext) |
| | | { |
| | | return new StartTLSExtendedRequestImpl(sslContext); |
| | | } |
| | |
| | | * If {@code request} was {@code null} |
| | | */ |
| | | public static AbandonRequest unmodifiableAbandonRequest( |
| | | final AbandonRequest request) throws NullPointerException |
| | | final AbandonRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableAbandonRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static AddRequest unmodifiableAddRequest(final AddRequest request) |
| | | throws NullPointerException |
| | | { |
| | | if (request instanceof UnmodifiableAddRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static AnonymousSASLBindRequest unmodifiableAnonymousSASLBindRequest( |
| | | final AnonymousSASLBindRequest request) throws NullPointerException |
| | | final AnonymousSASLBindRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableAnonymousSASLBindRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static CancelExtendedRequest unmodifiableCancelExtendedRequest( |
| | | final CancelExtendedRequest request) throws NullPointerException |
| | | final CancelExtendedRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableCancelExtendedRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static CompareRequest unmodifiableCompareRequest( |
| | | final CompareRequest request) throws NullPointerException |
| | | final CompareRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableCompareRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | public static CRAMMD5SASLBindRequest unmodifiableCRAMMD5SASLBindRequest( |
| | | final CRAMMD5SASLBindRequest request) throws NullPointerException |
| | | final CRAMMD5SASLBindRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableCRAMMD5SASLBindRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | public static DeleteRequest unmodifiableDeleteRequest( |
| | | final DeleteRequest request) throws NullPointerException |
| | | final DeleteRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableDeleteRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | public static DigestMD5SASLBindRequest unmodifiableDigestMD5SASLBindRequest( |
| | | final DigestMD5SASLBindRequest request) throws NullPointerException |
| | | final DigestMD5SASLBindRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableDigestMD5SASLBindRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static ExternalSASLBindRequest unmodifiableExternalSASLBindRequest( |
| | | final ExternalSASLBindRequest request) throws NullPointerException |
| | | final ExternalSASLBindRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableExternalSASLBindRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static GenericBindRequest unmodifiableGenericBindRequest( |
| | | final GenericBindRequest request) throws NullPointerException |
| | | final GenericBindRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableGenericBindRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static GenericExtendedRequest unmodifiableGenericExtendedRequest( |
| | | GenericExtendedRequest request) throws NullPointerException |
| | | GenericExtendedRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableGenericExtendedRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | public static GSSAPISASLBindRequest unmodifiableGSSAPISASLBindRequest( |
| | | final GSSAPISASLBindRequest request) throws NullPointerException |
| | | final GSSAPISASLBindRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableGSSAPISASLBindRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static ModifyDNRequest unmodifiableModifyDNRequest( |
| | | final ModifyDNRequest request) throws NullPointerException |
| | | final ModifyDNRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableModifyDNRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static ModifyRequest unmodifiableModifyRequest( |
| | | final ModifyRequest request) throws NullPointerException |
| | | final ModifyRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableModifyRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static PasswordModifyExtendedRequest unmodifiablePasswordModifyExtendedRequest( |
| | | final PasswordModifyExtendedRequest request) throws NullPointerException |
| | | final PasswordModifyExtendedRequest request) |
| | | { |
| | | if (request instanceof UnmodifiablePasswordModifyExtendedRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static PlainSASLBindRequest unmodifiablePlainSASLBindRequest( |
| | | final PlainSASLBindRequest request) throws NullPointerException |
| | | final PlainSASLBindRequest request) |
| | | { |
| | | if (request instanceof UnmodifiablePlainSASLBindRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static SearchRequest unmodifiableSearchRequest( |
| | | final SearchRequest request) throws NullPointerException |
| | | final SearchRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableSearchRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static SimpleBindRequest unmodifiableSimpleBindRequest( |
| | | final SimpleBindRequest request) throws NullPointerException |
| | | final SimpleBindRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableSimpleBindRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static StartTLSExtendedRequest unmodifiableStartTLSExtendedRequest( |
| | | final StartTLSExtendedRequest request) throws NullPointerException |
| | | final StartTLSExtendedRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableStartTLSExtendedRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static UnbindRequest unmodifiableUnbindRequest( |
| | | final UnbindRequest request) throws NullPointerException |
| | | final UnbindRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableUnbindRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static WhoAmIExtendedRequest unmodifiableWhoAmIExtendedRequest( |
| | | final WhoAmIExtendedRequest request) throws NullPointerException |
| | | final WhoAmIExtendedRequest request) |
| | | { |
| | | if (request instanceof UnmodifiableWhoAmIExtendedRequestImpl) |
| | | { |
| | |
| | | * If {@code request} was {@code null} |
| | | */ |
| | | public static AbandonRequest copyOfAbandonRequest(final AbandonRequest request) |
| | | throws NullPointerException |
| | | { |
| | | return new AbandonRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static AddRequest copyOfAddRequest(final AddRequest request) |
| | | throws NullPointerException |
| | | { |
| | | return new AddRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static AnonymousSASLBindRequest copyOfAnonymousSASLBindRequest( |
| | | final AnonymousSASLBindRequest request) throws NullPointerException |
| | | final AnonymousSASLBindRequest request) |
| | | { |
| | | return new AnonymousSASLBindRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static CancelExtendedRequest copyOfCancelExtendedRequest( |
| | | final CancelExtendedRequest request) throws NullPointerException |
| | | final CancelExtendedRequest request) |
| | | { |
| | | return new CancelExtendedRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static CompareRequest copyOfCompareRequest(final CompareRequest request) |
| | | throws NullPointerException |
| | | { |
| | | return new CompareRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | public static CRAMMD5SASLBindRequest copyOfCRAMMD5SASLBindRequest( |
| | | final CRAMMD5SASLBindRequest request) throws NullPointerException |
| | | final CRAMMD5SASLBindRequest request) |
| | | { |
| | | return new CRAMMD5SASLBindRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | public static DeleteRequest copyOfDeleteRequest(final DeleteRequest request) |
| | | throws NullPointerException |
| | | { |
| | | return new DeleteRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | public static DigestMD5SASLBindRequest copyOfDigestMD5SASLBindRequest( |
| | | final DigestMD5SASLBindRequest request) throws NullPointerException |
| | | final DigestMD5SASLBindRequest request) |
| | | { |
| | | return new DigestMD5SASLBindRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static ExternalSASLBindRequest copyOfExternalSASLBindRequest( |
| | | final ExternalSASLBindRequest request) throws NullPointerException |
| | | final ExternalSASLBindRequest request) |
| | | { |
| | | return new ExternalSASLBindRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static GenericBindRequest copyOfGenericBindRequest( |
| | | final GenericBindRequest request) throws NullPointerException |
| | | final GenericBindRequest request) |
| | | { |
| | | return new GenericBindRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static GenericExtendedRequest copyOfGenericExtendedRequest( |
| | | GenericExtendedRequest request) throws NullPointerException |
| | | GenericExtendedRequest request) |
| | | { |
| | | return new GenericExtendedRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | public static GSSAPISASLBindRequest copyOfGSSAPISASLBindRequest( |
| | | final GSSAPISASLBindRequest request) throws NullPointerException |
| | | final GSSAPISASLBindRequest request) |
| | | { |
| | | return new GSSAPISASLBindRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static ModifyDNRequest copyOfModifyDNRequest( |
| | | final ModifyDNRequest request) throws NullPointerException |
| | | final ModifyDNRequest request) |
| | | { |
| | | return new ModifyDNRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static ModifyRequest copyOfModifyRequest(final ModifyRequest request) |
| | | throws NullPointerException |
| | | { |
| | | return new ModifyRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static PasswordModifyExtendedRequest copyOfPasswordModifyExtendedRequest( |
| | | final PasswordModifyExtendedRequest request) throws NullPointerException |
| | | final PasswordModifyExtendedRequest request) |
| | | { |
| | | return new PasswordModifyExtendedRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static PlainSASLBindRequest copyOfPlainSASLBindRequest( |
| | | final PlainSASLBindRequest request) throws NullPointerException |
| | | final PlainSASLBindRequest request) |
| | | { |
| | | return new PlainSASLBindRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static SearchRequest copyOfSearchRequest(final SearchRequest request) |
| | | throws NullPointerException |
| | | { |
| | | return new SearchRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static SimpleBindRequest copyOfSimpleBindRequest( |
| | | final SimpleBindRequest request) throws NullPointerException |
| | | final SimpleBindRequest request) |
| | | { |
| | | return new SimpleBindRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static StartTLSExtendedRequest copyOfStartTLSExtendedRequest( |
| | | final StartTLSExtendedRequest request) throws NullPointerException |
| | | final StartTLSExtendedRequest request) |
| | | { |
| | | return new StartTLSExtendedRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static UnbindRequest copyOfUnbindRequest(final UnbindRequest request) |
| | | throws NullPointerException |
| | | { |
| | | return new UnbindRequestImpl(request); |
| | | } |
| | |
| | | * If {@code request} was {@code null} . |
| | | */ |
| | | public static WhoAmIExtendedRequest copyOfWhoAmIExtendedRequest( |
| | | final WhoAmIExtendedRequest request) throws NullPointerException |
| | | final WhoAmIExtendedRequest request) |
| | | { |
| | | return new WhoAmIExtendedRequestImpl(request); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | SASLBindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SASLBindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldap.controls.Control; |
| | | import org.forgerock.opendj.ldap.controls.ControlDecoder; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code attributeDescriptions} was {@code null}. |
| | | */ |
| | | SearchRequest addAttribute(String... attributeDescriptions) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SearchRequest addAttribute(String... attributeDescriptions); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | SearchRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SearchRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code policy} was {@code null}. |
| | | */ |
| | | SearchRequest setDereferenceAliasesPolicy(DereferenceAliasesPolicy policy) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SearchRequest setDereferenceAliasesPolicy(DereferenceAliasesPolicy policy); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code filter} was {@code null}. |
| | | */ |
| | | SearchRequest setFilter(Filter filter) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | SearchRequest setFilter(Filter filter); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code filter} was {@code null}. |
| | | */ |
| | | SearchRequest setFilter(String filter) throws UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException, NullPointerException; |
| | | SearchRequest setFilter(String filter); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | SearchRequest setName(DN dn) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | SearchRequest setName(DN dn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code dn} was {@code null}. |
| | | */ |
| | | SearchRequest setName(String dn) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException; |
| | | SearchRequest setName(String dn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code scope} was {@code null}. |
| | | */ |
| | | SearchRequest setScope(SearchScope scope) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SearchRequest setScope(SearchScope scope); |
| | | |
| | | |
| | | |
| | |
| | | * @throws LocalizedIllegalArgumentException |
| | | * If {@code limit} was negative. |
| | | */ |
| | | SearchRequest setSizeLimit(int limit) throws UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException; |
| | | SearchRequest setSizeLimit(int limit); |
| | | |
| | | |
| | | |
| | |
| | | * @throws LocalizedIllegalArgumentException |
| | | * If {@code limit} was negative. |
| | | */ |
| | | SearchRequest setTimeLimit(int limit) throws UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException; |
| | | SearchRequest setTimeLimit(int limit); |
| | | |
| | | |
| | | |
| | |
| | | * If this search request does not permit the types-only parameter |
| | | * to be set. |
| | | */ |
| | | SearchRequest setTypesOnly(boolean typesOnly) |
| | | throws UnsupportedOperationException; |
| | | SearchRequest setTypesOnly(boolean typesOnly); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.DereferenceAliasesPolicy; |
| | | import org.forgerock.opendj.ldap.Filter; |
| | |
| | | * {@code null}. |
| | | */ |
| | | SearchRequestImpl(final DN name, final SearchScope scope, final Filter filter) |
| | | throws NullPointerException |
| | | { |
| | | this.name = name; |
| | | this.scope = scope; |
| | |
| | | * If {@code searchRequest} was {@code null} . |
| | | */ |
| | | SearchRequestImpl(final SearchRequest searchRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(searchRequest); |
| | | this.attributes.addAll(searchRequest.getAttributes()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchRequest addAttribute(final String... attributeDescriptions) |
| | | throws NullPointerException |
| | | { |
| | | for (String attributeDescription : attributeDescriptions) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchRequest setDereferenceAliasesPolicy( |
| | | final DereferenceAliasesPolicy policy) throws NullPointerException |
| | | final DereferenceAliasesPolicy policy) |
| | | { |
| | | Validator.ensureNotNull(policy); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchRequest setFilter(final Filter filter) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(filter); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchRequest setFilter(final String filter) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | this.filter = Filter.valueOf(filter); |
| | | return this; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchRequest setName(final DN dn) throws NullPointerException |
| | | public SearchRequest setName(final DN dn) |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchRequest setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(dn); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchRequest setScope(final SearchScope scope) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(scope); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchRequest setSizeLimit(final int limit) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | // FIXME: I18N error message. |
| | | Validator.ensureTrue(limit >= 0, "negative size limit"); |
| | | |
| | | this.sizeLimit = limit; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchRequest setTimeLimit(final int limit) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | // FIXME: I18N error message. |
| | | Validator.ensureTrue(limit >= 0, "negative time limit"); |
| | | |
| | | this.timeLimit = limit; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | SimpleBindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SimpleBindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | SimpleBindRequest setName(String name) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | SimpleBindRequest setName(String name); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | SimpleBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SimpleBindRequest setPassword(byte[] password); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code password} was {@code null}. |
| | | */ |
| | | SimpleBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SimpleBindRequest setPassword(char[] password); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * If {@code name} or {@code password} was {@code null}. |
| | | */ |
| | | SimpleBindRequestImpl(final String name, final byte[] password) |
| | | throws NullPointerException |
| | | { |
| | | this.name = name; |
| | | this.password = password; |
| | |
| | | * If {@code simpleBindRequest} was {@code null} . |
| | | */ |
| | | SimpleBindRequestImpl(final SimpleBindRequest simpleBindRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(simpleBindRequest); |
| | | this.name = simpleBindRequest.getName(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SimpleBindRequest setName(final String name) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(name); |
| | | this.name = name; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SimpleBindRequest setPassword(final byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(password); |
| | | this.password = password; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SimpleBindRequest setPassword(final char[] password) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(password); |
| | | this.password = StaticUtils.getBytes(password); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | StartTLSExtendedRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | StartTLSExtendedRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * If this start TLS extended request does not permit the enabled |
| | | * protocols to be set. |
| | | */ |
| | | StartTLSExtendedRequest addEnabledProtocol(String... protocols) |
| | | throws UnsupportedOperationException; |
| | | StartTLSExtendedRequest addEnabledProtocol(String... protocols); |
| | | |
| | | |
| | | /** |
| | |
| | | * If this start TLS extended request does not permit the enabled |
| | | * cipher suites to be set. |
| | | */ |
| | | StartTLSExtendedRequest addEnabledCipherSuite(String... suites) |
| | | throws UnsupportedOperationException; |
| | | StartTLSExtendedRequest addEnabledCipherSuite(String... suites); |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | StartTLSExtendedRequestImpl( |
| | | final StartTLSExtendedRequest startTLSExtendedRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(startTLSExtendedRequest); |
| | | this.sslContext = startTLSExtendedRequest.getSSLContext(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | UnbindRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | UnbindRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | * If {@code unbindRequest} was {@code null} . |
| | | */ |
| | | UnbindRequestImpl(final UnbindRequest unbindRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(unbindRequest); |
| | | } |
| | |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable abandon request implementation. |
| | | */ |
| | | final class UnmodifiableAbandonRequestImpl |
| | | extends AbstractUnmodifiableRequest<AbandonRequest> |
| | | implements AbandonRequest |
| | | final class UnmodifiableAbandonRequestImpl extends |
| | | AbstractUnmodifiableRequest<AbandonRequest> implements AbandonRequest |
| | | { |
| | | UnmodifiableAbandonRequestImpl(AbandonRequest request) { |
| | | UnmodifiableAbandonRequestImpl(AbandonRequest request) |
| | | { |
| | | super(request); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public int getRequestID() { |
| | | public int getRequestID() |
| | | { |
| | | return impl.getRequestID(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public AbandonRequest setRequestID(int id) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldif.ChangeRecordVisitor; |
| | | |
| | | import com.forgerock.opendj.util.Function; |
| | | import com.forgerock.opendj.util.Iterables; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable add request implementation. |
| | | */ |
| | | final class UnmodifiableAddRequestImpl |
| | | extends AbstractUnmodifiableRequest<AddRequest> |
| | | implements AddRequest |
| | | final class UnmodifiableAddRequestImpl extends |
| | | AbstractUnmodifiableRequest<AddRequest> implements AddRequest |
| | | { |
| | | private static final Function<Attribute, Attribute, Void> |
| | | UNMODIFIABLE_ATTRIBUTE_FUNCTION = |
| | | new Function<Attribute, Attribute, Void>() |
| | | UNMODIFIABLE_ATTRIBUTE_FUNCTION = new Function<Attribute, Attribute, Void>() |
| | | { |
| | | |
| | | public Attribute apply(final Attribute value, final Void p) |
| | |
| | | |
| | | }; |
| | | |
| | | UnmodifiableAddRequestImpl(AddRequest impl) { |
| | | |
| | | |
| | | UnmodifiableAddRequestImpl(AddRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public <R, P> R accept(ChangeRecordVisitor<R, P> v, P p) { |
| | | |
| | | |
| | | public <R, P> R accept(ChangeRecordVisitor<R, P> v, P p) |
| | | { |
| | | return v.visitChangeRecord(p, this); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean addAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean addAttribute(Attribute attribute, |
| | | Collection<ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | Collection<ByteString> duplicateValues) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public AddRequest addAttribute(String attributeDescription, |
| | | Object... values) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | |
| | | |
| | | public AddRequest addAttribute(String attributeDescription, Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public AddRequest clearAttributes() |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean containsAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) |
| | | throws NullPointerException { |
| | | Collection<ByteString> missingValues) |
| | | { |
| | | return impl.containsAttribute(attribute, missingValues); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean containsAttribute(String attributeDescription, |
| | | Object... values) |
| | | throws LocalizedIllegalArgumentException, |
| | | NullPointerException { |
| | | Object... values) |
| | | { |
| | | return impl.containsAttribute(attributeDescription, values); |
| | | } |
| | | |
| | | public Iterable<Attribute> getAllAttributes() { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable(impl |
| | | .getAllAttributes(), UNMODIFIABLE_ATTRIBUTE_FUNCTION)); |
| | | |
| | | |
| | | public Iterable<Attribute> getAllAttributes() |
| | | { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable( |
| | | impl.getAllAttributes(), UNMODIFIABLE_ATTRIBUTE_FUNCTION)); |
| | | } |
| | | |
| | | |
| | | |
| | | public Iterable<Attribute> getAllAttributes( |
| | | AttributeDescription attributeDescription) |
| | | throws NullPointerException { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable(impl |
| | | .getAllAttributes(attributeDescription), |
| | | { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable( |
| | | impl.getAllAttributes(attributeDescription), |
| | | UNMODIFIABLE_ATTRIBUTE_FUNCTION)); |
| | | } |
| | | |
| | | public Iterable<Attribute> getAllAttributes( |
| | | String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, |
| | | NullPointerException { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable(impl |
| | | .getAllAttributes(attributeDescription), |
| | | |
| | | |
| | | public Iterable<Attribute> getAllAttributes(String attributeDescription) |
| | | { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable( |
| | | impl.getAllAttributes(attributeDescription), |
| | | UNMODIFIABLE_ATTRIBUTE_FUNCTION)); |
| | | } |
| | | |
| | | public Attribute getAttribute( |
| | | AttributeDescription attributeDescription) |
| | | throws NullPointerException { |
| | | final Attribute attribute = |
| | | impl.getAttribute(attributeDescription); |
| | | |
| | | |
| | | public Attribute getAttribute(AttributeDescription attributeDescription) |
| | | { |
| | | final Attribute attribute = impl.getAttribute(attributeDescription); |
| | | if (attribute != null) |
| | | { |
| | | return Attributes.unmodifiableAttribute(attribute); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public Attribute getAttribute(String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, |
| | | NullPointerException { |
| | | final Attribute attribute = |
| | | impl.getAttribute(attributeDescription); |
| | | { |
| | | final Attribute attribute = impl.getAttribute(attributeDescription); |
| | | if (attribute != null) |
| | | { |
| | | return Attributes.unmodifiableAttribute(attribute); |
| | |
| | | } |
| | | } |
| | | |
| | | public int getAttributeCount() { |
| | | |
| | | |
| | | public int getAttributeCount() |
| | | { |
| | | return impl.getAttributeCount(); |
| | | } |
| | | |
| | | public DN getName() { |
| | | |
| | | |
| | | public DN getName() |
| | | { |
| | | return impl.getName(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean removeAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | Collection<ByteString> missingValues) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public boolean removeAttribute( |
| | | AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | |
| | | |
| | | public boolean removeAttribute(AttributeDescription attributeDescription) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public AddRequest removeAttribute(String attributeDescription, |
| | | Object... values) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean replaceAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public AddRequest replaceAttribute(String attributeDescription, |
| | | Object... values) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public AddRequest setName(DN dn) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public AddRequest setName(String dn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable anonymous SASL bind request implementation. |
| | | */ |
| | |
| | | AbstractUnmodifiableSASLBindRequest<AnonymousSASLBindRequest> implements |
| | | AnonymousSASLBindRequest |
| | | { |
| | | UnmodifiableAnonymousSASLBindRequestImpl(AnonymousSASLBindRequest impl) { |
| | | UnmodifiableAnonymousSASLBindRequestImpl(AnonymousSASLBindRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getTraceString() { |
| | | public String getTraceString() |
| | | { |
| | | return impl.getTraceString(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public AnonymousSASLBindRequest setTraceString(String traceString) |
| | | throws NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | |
| | | import com.forgerock.opendj.util.StaticUtils; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable CRAM-MD5 SASL bind request implementation. |
| | | */ |
| | |
| | | AbstractUnmodifiableSASLBindRequest<CRAMMD5SASLBindRequest> implements |
| | | CRAMMD5SASLBindRequest |
| | | { |
| | | UnmodifiableCRAMMD5SASLBindRequestImpl(CRAMMD5SASLBindRequest impl) { |
| | | UnmodifiableCRAMMD5SASLBindRequestImpl(CRAMMD5SASLBindRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getAuthenticationID() { |
| | | public String getAuthenticationID() |
| | | { |
| | | return impl.getAuthenticationID(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public byte[] getPassword() { |
| | | public byte[] getPassword() |
| | | { |
| | | // Defensive copy. |
| | | return StaticUtils.copyOfBytes(impl.getPassword()); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public CRAMMD5SASLBindRequest setAuthenticationID(String authenticationID) |
| | | throws LocalizedIllegalArgumentException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public CRAMMD5SASLBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public CRAMMD5SASLBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.responses.ExtendedResult; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable cancel extended request implementation. |
| | | */ |
| | | final class UnmodifiableCancelExtendedRequestImpl |
| | | extends AbstractUnmodifiableExtendedRequest |
| | | <CancelExtendedRequest, ExtendedResult> |
| | | final class UnmodifiableCancelExtendedRequestImpl extends |
| | | AbstractUnmodifiableExtendedRequest<CancelExtendedRequest, ExtendedResult> |
| | | implements CancelExtendedRequest |
| | | { |
| | | UnmodifiableCancelExtendedRequestImpl( |
| | | CancelExtendedRequest impl) { |
| | | UnmodifiableCancelExtendedRequestImpl(CancelExtendedRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public int getRequestID() { |
| | | |
| | | |
| | | public int getRequestID() |
| | | { |
| | | return impl.getRequestID(); |
| | | } |
| | | |
| | | |
| | | |
| | | public CancelExtendedRequest setRequestID(int id) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.AttributeDescription; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable compare request implementation. |
| | | */ |
| | | final class UnmodifiableCompareRequestImpl |
| | | extends AbstractUnmodifiableRequest<CompareRequest> |
| | | implements CompareRequest |
| | | final class UnmodifiableCompareRequestImpl extends |
| | | AbstractUnmodifiableRequest<CompareRequest> implements CompareRequest |
| | | { |
| | | UnmodifiableCompareRequestImpl(CompareRequest impl) { |
| | | UnmodifiableCompareRequestImpl(CompareRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public ByteString getAssertionValue() { |
| | | |
| | | |
| | | public ByteString getAssertionValue() |
| | | { |
| | | return impl.getAssertionValue(); |
| | | } |
| | | |
| | | public String getAssertionValueAsString() { |
| | | |
| | | |
| | | public String getAssertionValueAsString() |
| | | { |
| | | return impl.getAssertionValueAsString(); |
| | | } |
| | | |
| | | public AttributeDescription getAttributeDescription() { |
| | | |
| | | |
| | | public AttributeDescription getAttributeDescription() |
| | | { |
| | | return impl.getAttributeDescription(); |
| | | } |
| | | |
| | | public DN getName() { |
| | | |
| | | |
| | | public DN getName() |
| | | { |
| | | return impl.getName(); |
| | | } |
| | | |
| | | |
| | | |
| | | public CompareRequest setAssertionValue(ByteString value) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public CompareRequest setAssertionValue(Object value) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public CompareRequest setAttributeDescription( |
| | | AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public CompareRequest setAttributeDescription( |
| | | String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | |
| | | |
| | | public CompareRequest setAttributeDescription(String attributeDescription) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public CompareRequest setName(DN dn) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public CompareRequest setName(String dn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldif.ChangeRecordVisitor; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable delete request implementation. |
| | | */ |
| | | final class UnmodifiableDeleteRequestImpl |
| | | extends AbstractUnmodifiableRequest<DeleteRequest> |
| | | implements DeleteRequest |
| | | final class UnmodifiableDeleteRequestImpl extends |
| | | AbstractUnmodifiableRequest<DeleteRequest> implements DeleteRequest |
| | | { |
| | | UnmodifiableDeleteRequestImpl(DeleteRequest impl) { |
| | | UnmodifiableDeleteRequestImpl(DeleteRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public <R, P> R accept(ChangeRecordVisitor<R, P> v, P p) { |
| | | |
| | | |
| | | public <R, P> R accept(ChangeRecordVisitor<R, P> v, P p) |
| | | { |
| | | return v.visitChangeRecord(p, this); |
| | | } |
| | | |
| | | public DN getName() { |
| | | |
| | | |
| | | public DN getName() |
| | | { |
| | | return impl.getName(); |
| | | } |
| | | |
| | | |
| | | |
| | | public DeleteRequest setName(DN dn) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public DeleteRequest setName(String dn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | import com.forgerock.opendj.util.StaticUtils; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable digest-MD5 SASL bind request implementation. |
| | | */ |
| | |
| | | AbstractUnmodifiableSASLBindRequest<DigestMD5SASLBindRequest> implements |
| | | DigestMD5SASLBindRequest |
| | | { |
| | | UnmodifiableDigestMD5SASLBindRequestImpl(DigestMD5SASLBindRequest impl) { |
| | | UnmodifiableDigestMD5SASLBindRequestImpl(DigestMD5SASLBindRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest addAdditionalAuthParam(String name, |
| | | String value) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | String value) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest addQOP(String... qopValues) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Map<String, String> getAdditionalAuthParams() { |
| | | public Map<String, String> getAdditionalAuthParams() |
| | | { |
| | | return Collections.unmodifiableMap(impl.getAdditionalAuthParams()); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getAuthenticationID() { |
| | | public String getAuthenticationID() |
| | | { |
| | | return impl.getAuthenticationID(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getAuthorizationID() { |
| | | public String getAuthorizationID() |
| | | { |
| | | return impl.getAuthorizationID(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getCipher() { |
| | | public String getCipher() |
| | | { |
| | | return impl.getCipher(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int getMaxReceiveBufferSize() { |
| | | public int getMaxReceiveBufferSize() |
| | | { |
| | | return impl.getMaxReceiveBufferSize(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int getMaxSendBufferSize() { |
| | | public int getMaxSendBufferSize() |
| | | { |
| | | return impl.getMaxSendBufferSize(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public byte[] getPassword() { |
| | | public byte[] getPassword() |
| | | { |
| | | // Defensive copy. |
| | | return StaticUtils.copyOfBytes(impl.getPassword()); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<String> getQOPs() { |
| | | public List<String> getQOPs() |
| | | { |
| | | return Collections.unmodifiableList(impl.getQOPs()); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getRealm() { |
| | | public String getRealm() |
| | | { |
| | | return impl.getRealm(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public boolean isServerAuth() { |
| | | public boolean isServerAuth() |
| | | { |
| | | return impl.isServerAuth(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest setAuthenticationID(String authenticationID) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest setAuthorizationID(String authorizationID) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest setCipher(String cipher) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest setMaxReceiveBufferSize(int size) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest setMaxSendBufferSize(int size) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest setRealm(String realm) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DigestMD5SASLBindRequest setServerAuth(boolean serverAuth) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable external SASL bind request implementation. |
| | |
| | | AbstractUnmodifiableSASLBindRequest<ExternalSASLBindRequest> implements |
| | | ExternalSASLBindRequest |
| | | { |
| | | UnmodifiableExternalSASLBindRequestImpl(ExternalSASLBindRequest impl) { |
| | | UnmodifiableExternalSASLBindRequestImpl(ExternalSASLBindRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getAuthorizationID() { |
| | | return impl.getAuthorizationID(); |
| | | public String getAuthorizationID() |
| | | { |
| | | return impl.getAuthorizationID(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ExternalSASLBindRequest setAuthorizationID(String authorizationID) |
| | | throws UnsupportedOperationException, LocalizedIllegalArgumentException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.security.auth.Subject; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | import com.forgerock.opendj.util.StaticUtils; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable GSSAPI SASL bind request implementation. |
| | | */ |
| | |
| | | AbstractUnmodifiableSASLBindRequest<GSSAPISASLBindRequest> implements |
| | | GSSAPISASLBindRequest |
| | | { |
| | | UnmodifiableGSSAPISASLBindRequestImpl(GSSAPISASLBindRequest impl) { |
| | | UnmodifiableGSSAPISASLBindRequestImpl(GSSAPISASLBindRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest addAdditionalAuthParam(String name, String value) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Map<String, String> getAdditionalAuthParams() { |
| | | public Map<String, String> getAdditionalAuthParams() |
| | | { |
| | | return Collections.unmodifiableMap(impl.getAdditionalAuthParams()); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest addQOP(String... qopValues) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getAuthenticationID() { |
| | | public String getAuthenticationID() |
| | | { |
| | | return impl.getAuthenticationID(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getAuthorizationID() { |
| | | public String getAuthorizationID() |
| | | { |
| | | return impl.getAuthorizationID(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getKDCAddress() { |
| | | public String getKDCAddress() |
| | | { |
| | | return impl.getKDCAddress(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int getMaxReceiveBufferSize() { |
| | | public int getMaxReceiveBufferSize() |
| | | { |
| | | return impl.getMaxReceiveBufferSize(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int getMaxSendBufferSize() { |
| | | public int getMaxSendBufferSize() |
| | | { |
| | | return impl.getMaxSendBufferSize(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public byte[] getPassword() { |
| | | public byte[] getPassword() |
| | | { |
| | | // Defensive copy. |
| | | return StaticUtils.copyOfBytes(impl.getPassword()); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<String> getQOPs() { |
| | | public List<String> getQOPs() |
| | | { |
| | | return Collections.unmodifiableList(impl.getQOPs()); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getRealm() { |
| | | public String getRealm() |
| | | { |
| | | return impl.getRealm(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Subject getSubject() { |
| | | public Subject getSubject() |
| | | { |
| | | return impl.getSubject(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public boolean isServerAuth() { |
| | | public boolean isServerAuth() |
| | | { |
| | | return impl.isServerAuth(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setAuthenticationID(String authenticationID) |
| | | throws LocalizedIllegalArgumentException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setAuthorizationID(String authorizationID) |
| | | throws LocalizedIllegalArgumentException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setKDCAddress(String address) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setMaxReceiveBufferSize(int size) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setMaxSendBufferSize(int size) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setRealm(String realm) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setServerAuth(boolean serverAuth) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GSSAPISASLBindRequest setSubject(Subject subject) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * Unmodifiable generic bind request implementation. |
| | | */ |
| | | final class UnmodifiableGenericBindRequestImpl |
| | | extends AbstractUnmodifiableBindRequest<GenericBindRequest> |
| | | implements GenericBindRequest |
| | | final class UnmodifiableGenericBindRequestImpl extends |
| | | AbstractUnmodifiableBindRequest<GenericBindRequest> implements |
| | | GenericBindRequest |
| | | { |
| | | UnmodifiableGenericBindRequestImpl(GenericBindRequest impl) { |
| | | UnmodifiableGenericBindRequestImpl(GenericBindRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public byte[] getAuthenticationValue() { |
| | | |
| | | |
| | | public byte[] getAuthenticationValue() |
| | | { |
| | | // Defensive copy. |
| | | return StaticUtils.copyOfBytes(impl.getAuthenticationValue()); |
| | | } |
| | | |
| | | |
| | | |
| | | public GenericBindRequest setAuthenticationType(byte type) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public GenericBindRequest setAuthenticationValue(byte[] bytes) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public GenericBindRequest setName(String name) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.responses.GenericExtendedResult; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable generic extended request implementation. |
| | | */ |
| | | final class UnmodifiableGenericExtendedRequestImpl |
| | | extends AbstractUnmodifiableExtendedRequest |
| | | <GenericExtendedRequest, GenericExtendedResult> |
| | | extends |
| | | AbstractUnmodifiableExtendedRequest<GenericExtendedRequest, GenericExtendedResult> |
| | | implements GenericExtendedRequest |
| | | { |
| | | UnmodifiableGenericExtendedRequestImpl(GenericExtendedRequest impl) { |
| | | UnmodifiableGenericExtendedRequestImpl(GenericExtendedRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | public GenericExtendedRequest setOID(String oid) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public GenericExtendedRequest setValue(ByteString bytes) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.RDN; |
| | | import org.forgerock.opendj.ldif.ChangeRecordVisitor; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable modify DN request implementation. |
| | | */ |
| | | final class UnmodifiableModifyDNRequestImpl |
| | | extends AbstractUnmodifiableRequest<ModifyDNRequest> |
| | | implements ModifyDNRequest |
| | | final class UnmodifiableModifyDNRequestImpl extends |
| | | AbstractUnmodifiableRequest<ModifyDNRequest> implements ModifyDNRequest |
| | | { |
| | | UnmodifiableModifyDNRequestImpl(ModifyDNRequest impl) { |
| | | UnmodifiableModifyDNRequestImpl(ModifyDNRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public <R, P> R accept(ChangeRecordVisitor<R, P> v, P p) { |
| | | |
| | | |
| | | public <R, P> R accept(ChangeRecordVisitor<R, P> v, P p) |
| | | { |
| | | return v.visitChangeRecord(p, this); |
| | | } |
| | | |
| | | public DN getName() { |
| | | |
| | | |
| | | public DN getName() |
| | | { |
| | | return impl.getName(); |
| | | } |
| | | |
| | | public RDN getNewRDN() { |
| | | |
| | | |
| | | public RDN getNewRDN() |
| | | { |
| | | return impl.getNewRDN(); |
| | | } |
| | | |
| | | public DN getNewSuperior() { |
| | | |
| | | |
| | | public DN getNewSuperior() |
| | | { |
| | | return impl.getNewSuperior(); |
| | | } |
| | | |
| | | public boolean isDeleteOldRDN() { |
| | | |
| | | |
| | | public boolean isDeleteOldRDN() |
| | | { |
| | | return impl.isDeleteOldRDN(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyDNRequest setDeleteOldRDN(boolean deleteOldRDN) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyDNRequest setName(DN dn) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyDNRequest setName(String dn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyDNRequest setNewRDN(RDN rdn) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyDNRequest setNewRDN(String rdn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyDNRequest setNewSuperior(DN dn) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyDNRequest setNewSuperior(String dn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldif.ChangeRecordVisitor; |
| | | |
| | |
| | | import com.forgerock.opendj.util.Function; |
| | | import com.forgerock.opendj.util.Functions; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable modify request implementation. |
| | | */ |
| | | final class UnmodifiableModifyRequestImpl |
| | | extends AbstractUnmodifiableRequest<ModifyRequest> |
| | | implements ModifyRequest |
| | | final class UnmodifiableModifyRequestImpl extends |
| | | AbstractUnmodifiableRequest<ModifyRequest> implements ModifyRequest |
| | | { |
| | | UnmodifiableModifyRequestImpl(ModifyRequest impl) { |
| | | UnmodifiableModifyRequestImpl(ModifyRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public <R, P> R accept(ChangeRecordVisitor<R, P> v, P p) { |
| | | |
| | | |
| | | public <R, P> R accept(ChangeRecordVisitor<R, P> v, P p) |
| | | { |
| | | return v.visitChangeRecord(p, this); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyRequest addModification(Modification modification) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyRequest addModification(ModificationType type, |
| | | String attributeDescription, |
| | | Object... values) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | String attributeDescription, Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public List<Modification> getModifications() |
| | | { |
| | | // We need to make all attributes unmodifiable as well. |
| | | Function<Modification, Modification, Void> function = |
| | | new Function<Modification, Modification, Void>() |
| | | new Function<Modification, Modification, Void>() |
| | | { |
| | | |
| | | public Modification apply(Modification value, Void p) |
| | |
| | | |
| | | }; |
| | | |
| | | List<Modification> unmodifiableModifications = Collections2.transformedList( |
| | | impl.getModifications(), function, |
| | | Functions.<Modification> identityFunction()); |
| | | List<Modification> unmodifiableModifications = Collections2 |
| | | .transformedList(impl.getModifications(), function, |
| | | Functions.<Modification> identityFunction()); |
| | | return Collections.unmodifiableList(unmodifiableModifications); |
| | | } |
| | | |
| | | public DN getName() { |
| | | |
| | | |
| | | public DN getName() |
| | | { |
| | | return impl.getName(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyRequest setName(DN dn) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ModifyRequest setName(String dn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.responses.PasswordModifyExtendedResult; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable password modify extended request implementation. |
| | | */ |
| | | final class UnmodifiablePasswordModifyExtendedRequestImpl |
| | | extends AbstractUnmodifiableExtendedRequest |
| | | <PasswordModifyExtendedRequest, PasswordModifyExtendedResult> |
| | | extends |
| | | AbstractUnmodifiableExtendedRequest<PasswordModifyExtendedRequest, PasswordModifyExtendedResult> |
| | | implements PasswordModifyExtendedRequest |
| | | { |
| | | UnmodifiablePasswordModifyExtendedRequestImpl( |
| | | PasswordModifyExtendedRequest impl) { |
| | | PasswordModifyExtendedRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public ByteString getNewPassword() { |
| | | |
| | | |
| | | public ByteString getNewPassword() |
| | | { |
| | | return impl.getNewPassword(); |
| | | } |
| | | |
| | | public ByteString getOldPassword() { |
| | | |
| | | |
| | | public ByteString getOldPassword() |
| | | { |
| | | return impl.getOldPassword(); |
| | | } |
| | | |
| | | public ByteString getUserIdentity() { |
| | | |
| | | |
| | | public ByteString getUserIdentity() |
| | | { |
| | | return impl.getUserIdentity(); |
| | | } |
| | | |
| | | public String getUserIdentityAsString() { |
| | | |
| | | |
| | | public String getUserIdentityAsString() |
| | | { |
| | | return impl.getUserIdentityAsString(); |
| | | } |
| | | |
| | | |
| | | |
| | | public PasswordModifyExtendedRequest setNewPassword(ByteString newPassword) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public PasswordModifyExtendedRequest setNewPassword(char[] newPassword) { |
| | | |
| | | |
| | | public PasswordModifyExtendedRequest setNewPassword(char[] newPassword) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public PasswordModifyExtendedRequest setOldPassword(ByteString oldPassword) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public PasswordModifyExtendedRequest setOldPassword(char[] oldPassword) { |
| | | |
| | | |
| | | public PasswordModifyExtendedRequest setOldPassword(char[] oldPassword) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public PasswordModifyExtendedRequest setUserIdentity( |
| | | ByteString userIdentity) { |
| | | |
| | | |
| | | public PasswordModifyExtendedRequest setUserIdentity(ByteString userIdentity) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public PasswordModifyExtendedRequest setUserIdentity(String userIdentity) { |
| | | |
| | | |
| | | public PasswordModifyExtendedRequest setUserIdentity(String userIdentity) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | |
| | | import com.forgerock.opendj.util.StaticUtils; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable plain SASL bind request implementation. |
| | | */ |
| | |
| | | AbstractUnmodifiableSASLBindRequest<PlainSASLBindRequest> implements |
| | | PlainSASLBindRequest |
| | | { |
| | | UnmodifiablePlainSASLBindRequestImpl(PlainSASLBindRequest impl) { |
| | | UnmodifiablePlainSASLBindRequestImpl(PlainSASLBindRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getAuthenticationID() { |
| | | public String getAuthenticationID() |
| | | { |
| | | return impl.getAuthenticationID(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getAuthorizationID() { |
| | | public String getAuthorizationID() |
| | | { |
| | | return impl.getAuthorizationID(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public byte[] getPassword() { |
| | | public byte[] getPassword() |
| | | { |
| | | // Defensive copy. |
| | | return StaticUtils.copyOfBytes(impl.getPassword()); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PlainSASLBindRequest setAuthenticationID(String authenticationID) |
| | | throws UnsupportedOperationException, LocalizedIllegalArgumentException, |
| | | NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PlainSASLBindRequest setAuthorizationID(String authorizationID) |
| | | throws UnsupportedOperationException, LocalizedIllegalArgumentException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PlainSASLBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PlainSASLBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.DereferenceAliasesPolicy; |
| | | import org.forgerock.opendj.ldap.Filter; |
| | | import org.forgerock.opendj.ldap.SearchScope; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable search request implementation. |
| | | */ |
| | | final class UnmodifiableSearchRequestImpl |
| | | extends AbstractUnmodifiableRequest<SearchRequest> |
| | | implements SearchRequest |
| | | final class UnmodifiableSearchRequestImpl extends |
| | | AbstractUnmodifiableRequest<SearchRequest> implements SearchRequest |
| | | { |
| | | UnmodifiableSearchRequestImpl(SearchRequest impl) { |
| | | UnmodifiableSearchRequestImpl(SearchRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest addAttribute(String... attributeDescriptions) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public List<String> getAttributes() { |
| | | |
| | | |
| | | public List<String> getAttributes() |
| | | { |
| | | return Collections.unmodifiableList(impl.getAttributes()); |
| | | } |
| | | |
| | | public DereferenceAliasesPolicy getDereferenceAliasesPolicy() { |
| | | |
| | | |
| | | public DereferenceAliasesPolicy getDereferenceAliasesPolicy() |
| | | { |
| | | return impl.getDereferenceAliasesPolicy(); |
| | | } |
| | | |
| | | public Filter getFilter() { |
| | | |
| | | |
| | | public Filter getFilter() |
| | | { |
| | | return impl.getFilter(); |
| | | } |
| | | |
| | | public DN getName() { |
| | | |
| | | |
| | | public DN getName() |
| | | { |
| | | return impl.getName(); |
| | | } |
| | | |
| | | public SearchScope getScope() { |
| | | |
| | | |
| | | public SearchScope getScope() |
| | | { |
| | | return impl.getScope(); |
| | | } |
| | | |
| | | public int getSizeLimit() { |
| | | |
| | | |
| | | public int getSizeLimit() |
| | | { |
| | | return impl.getSizeLimit(); |
| | | } |
| | | |
| | | public int getTimeLimit() { |
| | | |
| | | |
| | | public int getTimeLimit() |
| | | { |
| | | return impl.getTimeLimit(); |
| | | } |
| | | |
| | | public boolean isTypesOnly() { |
| | | |
| | | |
| | | public boolean isTypesOnly() |
| | | { |
| | | return impl.isTypesOnly(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest setDereferenceAliasesPolicy( |
| | | DereferenceAliasesPolicy policy) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest setFilter(Filter filter) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest setFilter(String filter) |
| | | throws UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest setName(DN dn) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest setName(String dn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest setScope(SearchScope scope) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest setSizeLimit(int limit) |
| | | throws UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest setTimeLimit(int limit) |
| | | throws UnsupportedOperationException, |
| | | LocalizedIllegalArgumentException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchRequest setTypesOnly(boolean typesOnly) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | /** |
| | | * Unmodifiable simple bind request implementation. |
| | | */ |
| | | final class UnmodifiableSimpleBindRequestImpl |
| | | extends AbstractUnmodifiableBindRequest<SimpleBindRequest> |
| | | implements SimpleBindRequest |
| | | final class UnmodifiableSimpleBindRequestImpl extends |
| | | AbstractUnmodifiableBindRequest<SimpleBindRequest> implements |
| | | SimpleBindRequest |
| | | { |
| | | UnmodifiableSimpleBindRequestImpl(SimpleBindRequest impl) { |
| | | UnmodifiableSimpleBindRequestImpl(SimpleBindRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public byte[] getPassword() { |
| | | |
| | | |
| | | public byte[] getPassword() |
| | | { |
| | | // Defensive copy. |
| | | return StaticUtils.copyOfBytes(impl.getPassword()); |
| | | } |
| | | |
| | | |
| | | |
| | | public SimpleBindRequest setName(String name) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SimpleBindRequest setPassword(byte[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SimpleBindRequest setPassword(char[] password) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | import org.forgerock.opendj.ldap.responses.ExtendedResult; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable start TLS extended request implementation. |
| | | */ |
| | | final class UnmodifiableStartTLSExtendedRequestImpl |
| | | extends AbstractUnmodifiableExtendedRequest |
| | | <StartTLSExtendedRequest, ExtendedResult> |
| | | extends |
| | | AbstractUnmodifiableExtendedRequest<StartTLSExtendedRequest, ExtendedResult> |
| | | implements StartTLSExtendedRequest |
| | | { |
| | | UnmodifiableStartTLSExtendedRequestImpl(StartTLSExtendedRequest impl) { |
| | | UnmodifiableStartTLSExtendedRequestImpl(StartTLSExtendedRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | public SSLContext getSSLContext() { |
| | | |
| | | |
| | | public SSLContext getSSLContext() |
| | | { |
| | | return impl.getSSLContext(); |
| | | } |
| | | |
| | | public StartTLSExtendedRequest addEnabledProtocol(String... protocols) { |
| | | |
| | | |
| | | public StartTLSExtendedRequest addEnabledProtocol(String... protocols) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public StartTLSExtendedRequest addEnabledCipherSuite(String... suites) { |
| | | |
| | | |
| | | public StartTLSExtendedRequest addEnabledCipherSuite(String... suites) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public List<String> getEnabledProtocols() { |
| | | |
| | | |
| | | public List<String> getEnabledProtocols() |
| | | { |
| | | return Collections.unmodifiableList(impl.getEnabledProtocols()); |
| | | } |
| | | |
| | | public List<String> getEnabledCipherSuites() { |
| | | |
| | | |
| | | public List<String> getEnabledCipherSuites() |
| | | { |
| | | return Collections.unmodifiableList(impl.getEnabledCipherSuites()); |
| | | } |
| | | |
| | | public StartTLSExtendedRequest setSSLContext(SSLContext sslContext) { |
| | | |
| | | |
| | | public StartTLSExtendedRequest setSSLContext(SSLContext sslContext) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable unbind request implementation. |
| | | */ |
| | | final class UnmodifiableUnbindRequestImpl |
| | | extends AbstractUnmodifiableRequest<UnbindRequest> |
| | | implements UnbindRequest |
| | | final class UnmodifiableUnbindRequestImpl extends |
| | | AbstractUnmodifiableRequest<UnbindRequest> implements UnbindRequest |
| | | { |
| | | UnmodifiableUnbindRequestImpl(UnbindRequest impl) { |
| | | UnmodifiableUnbindRequestImpl(UnbindRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | } |
| | |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | | |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.responses.WhoAmIExtendedResult; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable Who Am I extended request implementation. |
| | | */ |
| | | final class UnmodifiableWhoAmIExtendedRequestImpl |
| | | extends AbstractUnmodifiableExtendedRequest |
| | | <WhoAmIExtendedRequest, WhoAmIExtendedResult> |
| | | extends |
| | | AbstractUnmodifiableExtendedRequest<WhoAmIExtendedRequest, WhoAmIExtendedResult> |
| | | implements WhoAmIExtendedRequest |
| | | { |
| | | UnmodifiableWhoAmIExtendedRequestImpl(WhoAmIExtendedRequest impl) { |
| | | UnmodifiableWhoAmIExtendedRequestImpl(WhoAmIExtendedRequest impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | WhoAmIExtendedRequest addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | WhoAmIExtendedRequest addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | */ |
| | | WhoAmIExtendedRequestImpl( |
| | | final WhoAmIExtendedRequest whoAmIExtendedRequest) |
| | | throws NullPointerException |
| | | { |
| | | super(whoAmIExtendedRequest); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | protected AbstractExtendedResult(final ResultCode resultCode) |
| | | throws NullPointerException |
| | | { |
| | | super(resultCode); |
| | | } |
| | |
| | | * If {@code extendedResult} was {@code null} . |
| | | */ |
| | | protected AbstractExtendedResult(ExtendedResult extendedResult) |
| | | throws NullPointerException |
| | | { |
| | | super(extendedResult); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | */ |
| | | @Override |
| | | public S adaptDecodeException(final DecodeException exception) |
| | | throws NullPointerException |
| | | { |
| | | final S adaptedResult = newExtendedErrorResult(ResultCode.PROTOCOL_ERROR, |
| | | "", exception.getMessage()); |
| | |
| | | */ |
| | | @Override |
| | | public abstract S newExtendedErrorResult(ResultCode resultCode, |
| | | String matchedDN, String diagnosticMessage) throws NullPointerException; |
| | | String matchedDN, String diagnosticMessage); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | */ |
| | | protected AbstractIntermediateResponse( |
| | | IntermediateResponse intermediateResponse) |
| | | throws NullPointerException |
| | | { |
| | | super(intermediateResponse); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code response} was {@code null} . |
| | | */ |
| | | AbstractResponseImpl(Response response) throws NullPointerException |
| | | AbstractResponseImpl(Response response) |
| | | { |
| | | Validator.ensureNotNull(response); |
| | | for (Control control : response.getControls()) |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public final S addControl(final Control control) throws NullPointerException |
| | | public final S addControl(final Control control) |
| | | { |
| | | Validator.ensureNotNull(control); |
| | | controls.add(control); |
| | |
| | | */ |
| | | public final <C extends Control> C getControl( |
| | | final ControlDecoder<C> decoder, final DecodeOptions options) |
| | | throws NullPointerException, DecodeException |
| | | throws DecodeException |
| | | { |
| | | Validator.ensureNotNull(decoder, options); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | AbstractResultImpl(final ResultCode resultCode) throws NullPointerException |
| | | AbstractResultImpl(final ResultCode resultCode) |
| | | { |
| | | this.resultCode = resultCode; |
| | | } |
| | |
| | | * @throws NullPointerException |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | AbstractResultImpl(Result result) throws NullPointerException |
| | | AbstractResultImpl(Result result) |
| | | { |
| | | super(result); |
| | | this.cause = result.getCause(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public final S addReferralURI(final String uri) throws NullPointerException |
| | | public final S addReferralURI(final String uri) |
| | | { |
| | | Validator.ensureNotNull(uri); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public final S setResultCode(final ResultCode resultCode) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(resultCode); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | */ |
| | | @Override |
| | | public final S addControl(final Control control) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | @Override |
| | | public final <C extends Control> C getControl( |
| | | final ControlDecoder<C> decoder, final DecodeOptions options) |
| | | throws NullPointerException, DecodeException |
| | | throws DecodeException |
| | | { |
| | | Validator.ensureNotNull(decoder, options); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | |
| | | |
| | | public final S addReferralURI(final String uri) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | public final S setCause(final Throwable cause) |
| | | throws UnsupportedOperationException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | public final S setDiagnosticMessage(final String message) |
| | | throws UnsupportedOperationException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | public final S setMatchedDN(final String dn) |
| | | throws UnsupportedOperationException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | |
| | | |
| | | public final S setResultCode(final ResultCode resultCode) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | BindResult addControl(Control control) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | BindResult addControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | BindResult addReferralURI(String uri) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | BindResult addReferralURI(String uri); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | BindResult setCause(Throwable cause) throws UnsupportedOperationException; |
| | | BindResult setCause(Throwable cause); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | BindResult setDiagnosticMessage(String message) |
| | | throws UnsupportedOperationException; |
| | | BindResult setDiagnosticMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | BindResult setMatchedDN(String dn) throws UnsupportedOperationException; |
| | | BindResult setMatchedDN(String dn); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | BindResult setResultCode(ResultCode resultCode) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | BindResult setResultCode(ResultCode resultCode); |
| | | |
| | | |
| | | |
| | |
| | | * If this bind result does not permit the server SASL credentials |
| | | * to be set. |
| | | */ |
| | | BindResult setServerSASLCredentials(ByteString credentials) |
| | | throws UnsupportedOperationException; |
| | | BindResult setServerSASLCredentials(ByteString credentials); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | BindResultImpl(final ResultCode resultCode) throws NullPointerException |
| | | BindResultImpl(final ResultCode resultCode) |
| | | { |
| | | super(resultCode); |
| | | } |
| | |
| | | * If {@code bindResult} was {@code null} . |
| | | */ |
| | | BindResultImpl(final BindResult bindResult) |
| | | throws NullPointerException |
| | | { |
| | | super(bindResult); |
| | | this.credentials = bindResult.getServerSASLCredentials(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public BindResult setServerSASLCredentials(final ByteString credentials) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.credentials = credentials; |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | CompareResult addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CompareResult addControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | CompareResult addReferralURI(String uri) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CompareResult addReferralURI(String uri); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | CompareResult setCause(Throwable cause) throws UnsupportedOperationException; |
| | | CompareResult setCause(Throwable cause); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | CompareResult setDiagnosticMessage(String message) |
| | | throws UnsupportedOperationException; |
| | | CompareResult setDiagnosticMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | CompareResult setMatchedDN(String dn) throws UnsupportedOperationException; |
| | | CompareResult setMatchedDN(String dn); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | CompareResult setResultCode(ResultCode resultCode) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | CompareResult setResultCode(ResultCode resultCode); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | CompareResultImpl(final ResultCode resultCode) throws NullPointerException |
| | | CompareResultImpl(final ResultCode resultCode) |
| | | { |
| | | super(resultCode); |
| | | } |
| | |
| | | * If {@code compareResult} was {@code null} . |
| | | */ |
| | | CompareResultImpl(final CompareResult compareResult) |
| | | throws NullPointerException |
| | | { |
| | | super(compareResult); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ExtendedResult addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | ExtendedResult addControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ExtendedResult addReferralURI(String uri) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | ExtendedResult addReferralURI(String uri); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ExtendedResult setCause(Throwable cause) throws UnsupportedOperationException; |
| | | ExtendedResult setCause(Throwable cause); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ExtendedResult setDiagnosticMessage(String message) |
| | | throws UnsupportedOperationException; |
| | | ExtendedResult setDiagnosticMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ExtendedResult setMatchedDN(String dn) throws UnsupportedOperationException; |
| | | ExtendedResult setMatchedDN(String dn); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | ExtendedResult setResultCode(ResultCode resultCode) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | ExtendedResult setResultCode(ResultCode resultCode); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code exception} was {@code null}. |
| | | */ |
| | | S adaptDecodeException(DecodeException exception) throws NullPointerException; |
| | | S adaptDecodeException(DecodeException exception); |
| | | |
| | | |
| | | |
| | |
| | | * {@code diagnosticMessage} were {@code null}. |
| | | */ |
| | | S newExtendedErrorResult(ResultCode resultCode, String matchedDN, |
| | | String diagnosticMessage) throws NullPointerException; |
| | | String diagnosticMessage); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | GenericExtendedResult addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GenericExtendedResult addControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | GenericExtendedResult addReferralURI(String uri) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GenericExtendedResult addReferralURI(String uri); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | GenericExtendedResult setCause(Throwable cause) |
| | | throws UnsupportedOperationException; |
| | | GenericExtendedResult setCause(Throwable cause); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | GenericExtendedResult setDiagnosticMessage(String message) |
| | | throws UnsupportedOperationException; |
| | | GenericExtendedResult setDiagnosticMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | GenericExtendedResult setMatchedDN(String dn) |
| | | throws UnsupportedOperationException; |
| | | GenericExtendedResult setMatchedDN(String dn); |
| | | |
| | | |
| | | |
| | |
| | | * If this generic extended result does not permit the result name |
| | | * to be set. |
| | | */ |
| | | GenericExtendedResult setOID(String oid) throws UnsupportedOperationException; |
| | | GenericExtendedResult setOID(String oid); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | GenericExtendedResult setResultCode(ResultCode resultCode) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GenericExtendedResult setResultCode(ResultCode resultCode); |
| | | |
| | | |
| | | |
| | |
| | | * If this generic extended result does not permit the result value |
| | | * to be set. |
| | | */ |
| | | GenericExtendedResult setValue(ByteString bytes) |
| | | throws UnsupportedOperationException; |
| | | GenericExtendedResult setValue(ByteString bytes); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | GenericExtendedResultImpl(final ResultCode resultCode) |
| | | throws NullPointerException |
| | | { |
| | | super(resultCode); |
| | | } |
| | |
| | | * If {@code genericExtendedResult} was {@code null} . |
| | | */ |
| | | GenericExtendedResultImpl(final GenericExtendedResult genericExtendedResult) |
| | | throws NullPointerException |
| | | { |
| | | super(genericExtendedResult); |
| | | this.responseName = genericExtendedResult.getOID(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public GenericExtendedResult setOID(final String oid) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.responseName = oid; |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public GenericExtendedResult setValue(final ByteString bytes) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.responseValue = bytes; |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | GenericIntermediateResponse addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | GenericIntermediateResponse addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * If this intermediate response does not permit the response name |
| | | * to be set. |
| | | */ |
| | | GenericIntermediateResponse setOID(String oid) |
| | | throws UnsupportedOperationException; |
| | | GenericIntermediateResponse setOID(String oid); |
| | | |
| | | |
| | | |
| | |
| | | * If this intermediate response does not permit the response value |
| | | * to be set. |
| | | */ |
| | | GenericIntermediateResponse setValue(ByteString bytes) |
| | | throws UnsupportedOperationException; |
| | | GenericIntermediateResponse setValue(ByteString bytes); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | */ |
| | | GenericIntermediateResponseImpl( |
| | | final GenericIntermediateResponse genericIntermediateResponse) |
| | | throws NullPointerException |
| | | { |
| | | super(genericIntermediateResponse); |
| | | this.responseName = genericIntermediateResponse.getOID(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public GenericIntermediateResponse setOID(final String oid) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.responseName = oid; |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public GenericIntermediateResponse setValue(final ByteString bytes) |
| | | throws UnsupportedOperationException |
| | | { |
| | | this.responseValue = bytes; |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | IntermediateResponse addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | IntermediateResponse addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | PasswordModifyExtendedResult addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | PasswordModifyExtendedResult addControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | PasswordModifyExtendedResult addReferralURI(String uri) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | PasswordModifyExtendedResult addReferralURI(String uri); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | PasswordModifyExtendedResult setCause(Throwable cause) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedResult setCause(Throwable cause); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | PasswordModifyExtendedResult setDiagnosticMessage(String message) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedResult setDiagnosticMessage(String message); |
| | | |
| | | |
| | | |
| | |
| | | * If this password modify extended result does not permit the |
| | | * generated password to be set. |
| | | */ |
| | | PasswordModifyExtendedResult setGeneratedPassword(ByteString password) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedResult setGeneratedPassword(ByteString password); |
| | | |
| | | |
| | | |
| | |
| | | * If this password modify extended result does not permit the |
| | | * generated password to be set. |
| | | */ |
| | | PasswordModifyExtendedResult setGeneratedPassword(char[] password) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedResult setGeneratedPassword(char[] password); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | PasswordModifyExtendedResult setMatchedDN(String dn) |
| | | throws UnsupportedOperationException; |
| | | PasswordModifyExtendedResult setMatchedDN(String dn); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | PasswordModifyExtendedResult setResultCode(ResultCode resultCode) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | PasswordModifyExtendedResult setResultCode(ResultCode resultCode); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | */ |
| | | PasswordModifyExtendedResultImpl( |
| | | final PasswordModifyExtendedResult passwordModifyExtendedResult) |
| | | throws NullPointerException |
| | | { |
| | | super(passwordModifyExtendedResult); |
| | | this.password = passwordModifyExtendedResult.getGeneratedPassword(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public PasswordModifyExtendedResult setGeneratedPassword( |
| | | final ByteString password) throws UnsupportedOperationException |
| | | final ByteString password) |
| | | { |
| | | this.password = password; |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public PasswordModifyExtendedResult setGeneratedPassword( |
| | | final char[] password) throws UnsupportedOperationException |
| | | final char[] password) |
| | | { |
| | | this.password = (password != null) ? ByteString.valueOf(password) : null; |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | /** |
| | | * The base class of all Responses provides methods for querying and |
| | | * manipulating the set of Controls included with a Response. |
| | | * <p> |
| | | * TODO: added complete description including sub-types. |
| | | */ |
| | | public interface Response |
| | | { |
| | |
| | | * @throws NullPointerException |
| | | * If {@code control} was {@code null}. |
| | | */ |
| | | Response addControl(Control control) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | Response addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * If {@code decoder} or {@code options} was {@code null}. |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.*; |
| | | |
| | | import com.forgerock.opendj.util.Validator; |
| | |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | public static BindResult newBindResult(final ResultCode resultCode) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(resultCode); |
| | | return new BindResultImpl(resultCode); |
| | |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | public static CompareResult newCompareResult(final ResultCode resultCode) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(resultCode); |
| | | return new CompareResultImpl(resultCode); |
| | |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | public static GenericExtendedResult newGenericExtendedResult( |
| | | final ResultCode resultCode) throws NullPointerException |
| | | final ResultCode resultCode) |
| | | { |
| | | Validator.ensureNotNull(resultCode); |
| | | return new GenericExtendedResultImpl(resultCode); |
| | |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | public static PasswordModifyExtendedResult newPasswordModifyExtendedResult( |
| | | final ResultCode resultCode) throws NullPointerException |
| | | final ResultCode resultCode) |
| | | { |
| | | Validator.ensureNotNull(resultCode); |
| | | return new PasswordModifyExtendedResultImpl(resultCode); |
| | |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | public static Result newResult(final ResultCode resultCode) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(resultCode); |
| | | return new ResultImpl(resultCode); |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public static SearchResultEntry newSearchResultEntry(final DN name) |
| | | throws NullPointerException |
| | | { |
| | | final Entry entry = new LinkedHashMapEntry().setName(name); |
| | | return new SearchResultEntryImpl(entry); |
| | |
| | | * If {@code entry} was {@code null} . |
| | | */ |
| | | public static SearchResultEntry newSearchResultEntry(final Entry entry) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(entry); |
| | | return new SearchResultEntryImpl(entry); |
| | |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public static SearchResultEntry newSearchResultEntry(final String name) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | final Entry entry = new LinkedHashMapEntry().setName(name); |
| | | return new SearchResultEntryImpl(entry); |
| | |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | public static SearchResultEntry newSearchResultEntry( |
| | | final String... ldifLines) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final String... ldifLines) |
| | | { |
| | | return newSearchResultEntry(new LinkedHashMapEntry(ldifLines)); |
| | | } |
| | |
| | | * If {@code uri} was {@code null}. |
| | | */ |
| | | public static SearchResultReference newSearchResultReference(final String uri) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(uri); |
| | | return new SearchResultReferenceImpl(uri); |
| | |
| | | * If {@code resultCode} was {@code null} . |
| | | */ |
| | | public static WhoAmIExtendedResult newWhoAmIExtendedResult( |
| | | final ResultCode resultCode) throws NullPointerException |
| | | final ResultCode resultCode) |
| | | { |
| | | Validator.ensureNotNull(resultCode); |
| | | return new WhoAmIExtendedResultImpl(ResultCode.SUCCESS); |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static BindResult unmodifiableBindResult(final BindResult result) |
| | | throws NullPointerException |
| | | { |
| | | if (result instanceof UnmodifiableBindResultImpl) |
| | | { |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static CompareResult unmodifiableCompareResult( |
| | | final CompareResult result) throws NullPointerException |
| | | final CompareResult result) |
| | | { |
| | | if (result instanceof UnmodifiableCompareResultImpl) |
| | | { |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static GenericExtendedResult unmodifiableGenericExtendedResult( |
| | | final GenericExtendedResult result) throws NullPointerException |
| | | final GenericExtendedResult result) |
| | | { |
| | | if (result instanceof UnmodifiableGenericExtendedResultImpl) |
| | | { |
| | |
| | | * If {@code response} was {@code null}. |
| | | */ |
| | | public static GenericIntermediateResponse unmodifiableGenericIntermediateResponse( |
| | | final GenericIntermediateResponse response) throws NullPointerException |
| | | final GenericIntermediateResponse response) |
| | | { |
| | | if (response instanceof UnmodifiableGenericIntermediateResponseImpl) |
| | | { |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static PasswordModifyExtendedResult unmodifiablePasswordModifyExtendedResult( |
| | | final PasswordModifyExtendedResult result) throws NullPointerException |
| | | final PasswordModifyExtendedResult result) |
| | | { |
| | | if (result instanceof UnmodifiablePasswordModifyExtendedResultImpl) |
| | | { |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static Result unmodifiableResult(final Result result) |
| | | throws NullPointerException |
| | | { |
| | | if (result instanceof UnmodifiableResultImpl) |
| | | { |
| | |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | public static SearchResultEntry unmodifiableSearchResultEntry( |
| | | final SearchResultEntry entry) throws NullPointerException |
| | | final SearchResultEntry entry) |
| | | { |
| | | if (entry instanceof UnmodifiableSearchResultEntryImpl) |
| | | { |
| | |
| | | * If {@code searchResultReference} was {@code null}. |
| | | */ |
| | | public static SearchResultReference unmodifiableSearchResultReference( |
| | | final SearchResultReference reference) throws NullPointerException |
| | | final SearchResultReference reference) |
| | | { |
| | | if (reference instanceof UnmodifiableSearchResultReferenceImpl) |
| | | { |
| | |
| | | * If {@code result} was {@code null} . |
| | | */ |
| | | public static WhoAmIExtendedResult unmodifiableWhoAmIExtendedResult( |
| | | final WhoAmIExtendedResult result) throws NullPointerException |
| | | final WhoAmIExtendedResult result) |
| | | { |
| | | if (result instanceof UnmodifiableSearchResultReferenceImpl) |
| | | { |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static BindResult copyOfBindResult(final BindResult result) |
| | | throws NullPointerException |
| | | { |
| | | return new BindResultImpl(result); |
| | | } |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static CompareResult copyOfCompareResult(final CompareResult result) |
| | | throws NullPointerException |
| | | { |
| | | return new CompareResultImpl(result); |
| | | } |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static GenericExtendedResult copyOfGenericExtendedResult( |
| | | final GenericExtendedResult result) throws NullPointerException |
| | | final GenericExtendedResult result) |
| | | { |
| | | return new GenericExtendedResultImpl(result); |
| | | } |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static GenericIntermediateResponse copyOfGenericIntermediateResponse( |
| | | final GenericIntermediateResponse result) throws NullPointerException |
| | | final GenericIntermediateResponse result) |
| | | { |
| | | return new GenericIntermediateResponseImpl(result); |
| | | } |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static PasswordModifyExtendedResult copyOfPasswordModifyExtendedResult( |
| | | final PasswordModifyExtendedResult result) throws NullPointerException |
| | | final PasswordModifyExtendedResult result) |
| | | { |
| | | return new PasswordModifyExtendedResultImpl(result); |
| | | } |
| | |
| | | * If {@code result} was {@code null}. |
| | | */ |
| | | public static Result copyOfResult(final Result result) |
| | | throws NullPointerException |
| | | { |
| | | return new ResultImpl(result); |
| | | } |
| | |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | public static SearchResultEntry copyOfSearchResultEntry( |
| | | final SearchResultEntry entry) throws NullPointerException |
| | | final SearchResultEntry entry) |
| | | { |
| | | return new SearchResultEntryImpl(entry); |
| | | } |
| | |
| | | * If {@code reference} was {@code null}. |
| | | */ |
| | | public static SearchResultReference copyOfSearchResultReference( |
| | | final SearchResultReference reference) throws NullPointerException |
| | | final SearchResultReference reference) |
| | | { |
| | | return new SearchResultReferenceImpl(reference); |
| | | } |
| | |
| | | * If {@code result} was {@code null} . |
| | | */ |
| | | public static WhoAmIExtendedResult copyOfWhoAmIExtendedResult( |
| | | final WhoAmIExtendedResult result) throws NullPointerException |
| | | final WhoAmIExtendedResult result) |
| | | { |
| | | return new WhoAmIExtendedResultImpl(result); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | Result addControl(Control control) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | Result addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code uri} was {@code null}. |
| | | */ |
| | | Result addReferralURI(String uri) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | Result addReferralURI(String uri); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this result does not permit the cause to be set. |
| | | */ |
| | | Result setCause(Throwable cause) throws UnsupportedOperationException; |
| | | Result setCause(Throwable cause); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this result does not permit the diagnostic message to be set. |
| | | */ |
| | | Result setDiagnosticMessage(String message) |
| | | throws UnsupportedOperationException; |
| | | Result setDiagnosticMessage(String message); |
| | | |
| | | |
| | | |
| | |
| | | * @throws UnsupportedOperationException |
| | | * If this result does not permit the matched DN to be set. |
| | | */ |
| | | Result setMatchedDN(String dn) throws UnsupportedOperationException; |
| | | Result setMatchedDN(String dn); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | Result setResultCode(ResultCode resultCode) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Result setResultCode(ResultCode resultCode); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code resultCode} was {@code null}. |
| | | */ |
| | | ResultImpl(final ResultCode resultCode) throws NullPointerException |
| | | ResultImpl(final ResultCode resultCode) |
| | | { |
| | | super(resultCode); |
| | | } |
| | |
| | | * @throws NullPointerException |
| | | * If {@code result} was {@code null} . |
| | | */ |
| | | ResultImpl(final Result result) throws NullPointerException |
| | | ResultImpl(final Result result) |
| | | { |
| | | super(result); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldap.controls.Control; |
| | | import org.forgerock.opendj.ldap.controls.ControlDecoder; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean addAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean addAttribute(Attribute attribute); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean addAttribute(Attribute attribute, |
| | | Collection<ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Collection<ByteString> duplicateValues); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | SearchResultEntry addAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | SearchResultEntry addAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | SearchResultEntry addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SearchResultEntry addControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | SearchResultEntry clearAttributes() throws UnsupportedOperationException; |
| | | SearchResultEntry clearAttributes(); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean containsAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) throws NullPointerException; |
| | | Collection<ByteString> missingValues); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean containsAttribute(String attributeDescription, Object... values) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | boolean containsAttribute(String attributeDescription, Object... values); |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | Iterable<Attribute> getAllAttributes(AttributeDescription attributeDescription) |
| | | throws NullPointerException; |
| | | Iterable<Attribute> getAllAttributes(AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | Iterable<Attribute> getAllAttributes(String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | Iterable<Attribute> getAllAttributes(String attributeDescription); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | Attribute getAttribute(AttributeDescription attributeDescription) |
| | | throws NullPointerException; |
| | | Attribute getAttribute(AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | Attribute getAttribute(String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException; |
| | | Attribute getAttribute(String attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean removeAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | Collection<ByteString> missingValues); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean removeAttribute(AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean removeAttribute(AttributeDescription attributeDescription); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | SearchResultEntry removeAttribute(String attributeDescription, |
| | | Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException; |
| | | Object... values); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | boolean replaceAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | boolean replaceAttribute(Attribute attribute); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | SearchResultEntry replaceAttribute(String attributeDescription, |
| | | Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException; |
| | | Object... values); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | SearchResultEntry setName(DN dn) throws UnsupportedOperationException, |
| | | NullPointerException; |
| | | SearchResultEntry setName(DN dn); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | SearchResultEntry setName(String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException; |
| | | SearchResultEntry setName(String dn); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code entry} was {@code null} . |
| | | */ |
| | | SearchResultEntryImpl(final Entry entry) throws NullPointerException |
| | | SearchResultEntryImpl(final Entry entry) |
| | | { |
| | | this.entry = entry; |
| | | } |
| | |
| | | * If {@code searchResultEntry} was {@code null} . |
| | | */ |
| | | SearchResultEntryImpl(final SearchResultEntry searchResultEntry) |
| | | throws NullPointerException |
| | | { |
| | | super(searchResultEntry); |
| | | this.entry = LinkedHashMapEntry.deepCopyOfEntry(searchResultEntry); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean addAttribute(final Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.addAttribute(attribute); |
| | | } |
| | |
| | | */ |
| | | public boolean addAttribute(final Attribute attribute, |
| | | final Collection<ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.addAttribute(attribute, duplicateValues); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchResultEntry addAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | entry.addAttribute(attributeDescription, values); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchResultEntry clearAttributes() |
| | | throws UnsupportedOperationException |
| | | { |
| | | entry.clearAttributes(); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean containsAttribute(final Attribute attribute, |
| | | final Collection<ByteString> missingValues) throws NullPointerException |
| | | final Collection<ByteString> missingValues) |
| | | { |
| | | return entry.containsAttribute(attribute, missingValues); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean containsAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | NullPointerException |
| | | final Object... values) |
| | | { |
| | | return entry.containsAttribute(attributeDescription, values); |
| | | } |
| | |
| | | */ |
| | | public Iterable<Attribute> getAllAttributes( |
| | | final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | return entry.getAllAttributes(attributeDescription); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Iterable<Attribute> getAllAttributes(final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return entry.getAllAttributes(attributeDescription); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Attribute getAttribute(final AttributeDescription attributeDescription) |
| | | throws NullPointerException |
| | | { |
| | | return entry.getAttribute(attributeDescription); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public Attribute getAttribute(final String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | return entry.getAttribute(attributeDescription); |
| | | } |
| | |
| | | */ |
| | | public boolean removeAttribute(final Attribute attribute, |
| | | final Collection<ByteString> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.removeAttribute(attribute, missingValues); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean removeAttribute(final AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.removeAttribute(attributeDescription); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchResultEntry removeAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | entry.removeAttribute(attributeDescription, values); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean replaceAttribute(final Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return entry.replaceAttribute(attribute); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchResultEntry replaceAttribute(final String attributeDescription, |
| | | final Object... values) throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException |
| | | final Object... values) |
| | | { |
| | | entry.replaceAttribute(attributeDescription, values); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchResultEntry setName(final DN dn) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | entry.setName(dn); |
| | | return this; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchResultEntry setName(final String dn) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | NullPointerException |
| | | { |
| | | entry.setName(dn); |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | SearchResultReference addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SearchResultReference addControl(Control control); |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code uri} was {@code null}. |
| | | */ |
| | | SearchResultReference addURI(String uri) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | SearchResultReference addURI(String uri); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code uri} was {@code null}. |
| | | */ |
| | | SearchResultReferenceImpl(final String uri) throws NullPointerException |
| | | SearchResultReferenceImpl(final String uri) |
| | | { |
| | | addURI(uri); |
| | | } |
| | |
| | | * If {@code searchResultReference} was {@code null} . |
| | | */ |
| | | SearchResultReferenceImpl(final SearchResultReference searchResultReference) |
| | | throws NullPointerException |
| | | { |
| | | super(searchResultReference); |
| | | this.uris.addAll(searchResultReference.getURIs()); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public SearchResultReference addURI(final String uri) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(uri); |
| | | uris.add(uri); |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable Bind result implementation. |
| | | */ |
| | | class UnmodifiableBindResultImpl |
| | | extends AbstractUnmodifiableResultImpl<BindResult> implements BindResult |
| | | class UnmodifiableBindResultImpl extends |
| | | AbstractUnmodifiableResultImpl<BindResult> implements BindResult |
| | | { |
| | | public UnmodifiableBindResultImpl(BindResult impl) { |
| | | public UnmodifiableBindResultImpl(BindResult impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ByteString getServerSASLCredentials() { |
| | | public ByteString getServerSASLCredentials() |
| | | { |
| | | return impl.getServerSASLCredentials(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public boolean isSASLBindInProgress() { |
| | | public boolean isSASLBindInProgress() |
| | | { |
| | | return impl.isSASLBindInProgress(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public BindResult setServerSASLCredentials(ByteString credentials) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable Compare result implementation. |
| | | */ |
| | | class UnmodifiableCompareResultImpl |
| | | extends AbstractUnmodifiableResultImpl<CompareResult> |
| | | implements CompareResult |
| | | class UnmodifiableCompareResultImpl extends |
| | | AbstractUnmodifiableResultImpl<CompareResult> implements CompareResult |
| | | { |
| | | UnmodifiableCompareResultImpl(CompareResult impl) { |
| | | UnmodifiableCompareResultImpl(CompareResult impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public boolean matched() { |
| | | public boolean matched() |
| | | { |
| | | return impl.matched(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable Generic extended result implementation. |
| | | */ |
| | | class UnmodifiableGenericExtendedResultImpl extends |
| | | AbstractUnmodifiableExtendedResultImpl<GenericExtendedResult> |
| | | implements ExtendedResult, GenericExtendedResult |
| | | AbstractUnmodifiableExtendedResultImpl<GenericExtendedResult> implements |
| | | ExtendedResult, GenericExtendedResult |
| | | { |
| | | UnmodifiableGenericExtendedResultImpl(GenericExtendedResult impl) { |
| | | UnmodifiableGenericExtendedResultImpl(GenericExtendedResult impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GenericExtendedResult setOID(String oid) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GenericExtendedResult setValue(ByteString bytes) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable Generic extended result implementation. |
| | | */ |
| | |
| | | AbstractUnmodifiableIntermediateResponseImpl<GenericIntermediateResponse> |
| | | implements GenericIntermediateResponse |
| | | { |
| | | UnmodifiableGenericIntermediateResponseImpl( |
| | | GenericIntermediateResponse impl) { |
| | | UnmodifiableGenericIntermediateResponseImpl(GenericIntermediateResponse impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GenericIntermediateResponse setOID(String oid) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GenericIntermediateResponse setValue(ByteString bytes) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | |
| | | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable Password modify extended result implementation. |
| | | */ |
| | |
| | | AbstractUnmodifiableExtendedResultImpl<PasswordModifyExtendedResult> |
| | | implements PasswordModifyExtendedResult |
| | | { |
| | | UnmodifiablePasswordModifyExtendedResultImpl( |
| | | PasswordModifyExtendedResult impl) { |
| | | UnmodifiablePasswordModifyExtendedResultImpl(PasswordModifyExtendedResult impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ByteString getGeneratedPassword() { |
| | | public ByteString getGeneratedPassword() |
| | | { |
| | | return impl.getGeneratedPassword(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PasswordModifyExtendedResult setGeneratedPassword(ByteString password) |
| | | throws UnsupportedOperationException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PasswordModifyExtendedResult setGeneratedPassword(char[] password) |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | |
| | | |
| | | /** |
| | | * A unmodifiable generic result indicates the final status of an operation. |
| | | */ |
| | | class UnmodifiableResultImpl |
| | | extends AbstractUnmodifiableResultImpl<Result> implements Result |
| | | class UnmodifiableResultImpl extends AbstractUnmodifiableResultImpl<Result> |
| | | implements Result |
| | | { |
| | | UnmodifiableResultImpl(Result impl) { |
| | | UnmodifiableResultImpl(Result impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | |
| | | |
| | | import java.util.Collection; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | |
| | | import com.forgerock.opendj.util.Function; |
| | | import com.forgerock.opendj.util.Iterables; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable Search result entry implementation. |
| | | */ |
| | | class UnmodifiableSearchResultEntryImpl extends |
| | | AbstractUnmodifiableResponseImpl<SearchResultEntry> |
| | | implements SearchResultEntry |
| | | class UnmodifiableSearchResultEntryImpl extends |
| | | AbstractUnmodifiableResponseImpl<SearchResultEntry> implements |
| | | SearchResultEntry |
| | | { |
| | | private static final Function<Attribute, Attribute, Void> |
| | | UNMODIFIABLE_ATTRIBUTE_FUNCTION = |
| | | new Function<Attribute, Attribute, Void>() |
| | | { |
| | | UNMODIFIABLE_ATTRIBUTE_FUNCTION = new Function<Attribute, Attribute, Void>() |
| | | { |
| | | |
| | | public Attribute apply(final Attribute value, final Void p) |
| | | { |
| | | return Attributes.unmodifiableAttribute(value); |
| | | } |
| | | public Attribute apply(final Attribute value, final Void p) |
| | | { |
| | | return Attributes.unmodifiableAttribute(value); |
| | | } |
| | | |
| | | }; |
| | | }; |
| | | |
| | | UnmodifiableSearchResultEntryImpl(SearchResultEntry impl) { |
| | | |
| | | |
| | | UnmodifiableSearchResultEntryImpl(SearchResultEntry impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean addAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean addAttribute(Attribute attribute, |
| | | Collection<ByteString> duplicateValues) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | Collection<ByteString> duplicateValues) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchResultEntry addAttribute(String attributeDescription, |
| | | Object... values) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchResultEntry clearAttributes() |
| | | throws UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean containsAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) |
| | | throws NullPointerException { |
| | | Collection<ByteString> missingValues) |
| | | { |
| | | return impl.containsAttribute(attribute, missingValues); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean containsAttribute(String attributeDescription, |
| | | Object... values) |
| | | throws LocalizedIllegalArgumentException, |
| | | NullPointerException { |
| | | Object... values) |
| | | { |
| | | return impl.containsAttribute(attributeDescription, values); |
| | | } |
| | | |
| | | public Iterable<Attribute> getAllAttributes() { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable(impl |
| | | .getAllAttributes(), UNMODIFIABLE_ATTRIBUTE_FUNCTION)); |
| | | |
| | | |
| | | public Iterable<Attribute> getAllAttributes() |
| | | { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable( |
| | | impl.getAllAttributes(), UNMODIFIABLE_ATTRIBUTE_FUNCTION)); |
| | | } |
| | | |
| | | |
| | | |
| | | public Iterable<Attribute> getAllAttributes( |
| | | AttributeDescription attributeDescription) |
| | | throws NullPointerException { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable(impl |
| | | .getAllAttributes(attributeDescription), |
| | | { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable( |
| | | impl.getAllAttributes(attributeDescription), |
| | | UNMODIFIABLE_ATTRIBUTE_FUNCTION)); |
| | | } |
| | | |
| | | public Iterable<Attribute> getAllAttributes( |
| | | String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, |
| | | NullPointerException { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable(impl |
| | | .getAllAttributes(attributeDescription), |
| | | |
| | | |
| | | public Iterable<Attribute> getAllAttributes(String attributeDescription) |
| | | { |
| | | return Iterables.unmodifiableIterable(Iterables.transformedIterable( |
| | | impl.getAllAttributes(attributeDescription), |
| | | UNMODIFIABLE_ATTRIBUTE_FUNCTION)); |
| | | } |
| | | |
| | | public Attribute getAttribute( |
| | | AttributeDescription attributeDescription) |
| | | throws NullPointerException { |
| | | final Attribute attribute = |
| | | impl.getAttribute(attributeDescription); |
| | | |
| | | |
| | | public Attribute getAttribute(AttributeDescription attributeDescription) |
| | | { |
| | | final Attribute attribute = impl.getAttribute(attributeDescription); |
| | | if (attribute != null) |
| | | { |
| | | return Attributes.unmodifiableAttribute(attribute); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public Attribute getAttribute(String attributeDescription) |
| | | throws LocalizedIllegalArgumentException, |
| | | NullPointerException { |
| | | final Attribute attribute = |
| | | impl.getAttribute(attributeDescription); |
| | | { |
| | | final Attribute attribute = impl.getAttribute(attributeDescription); |
| | | if (attribute != null) |
| | | { |
| | | return Attributes.unmodifiableAttribute(attribute); |
| | |
| | | } |
| | | } |
| | | |
| | | public int getAttributeCount() { |
| | | |
| | | |
| | | public int getAttributeCount() |
| | | { |
| | | return impl.getAttributeCount(); |
| | | } |
| | | |
| | | public DN getName() { |
| | | |
| | | |
| | | public DN getName() |
| | | { |
| | | return impl.getName(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean removeAttribute(Attribute attribute, |
| | | Collection<ByteString> missingValues) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | Collection<ByteString> missingValues) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | public boolean removeAttribute( |
| | | AttributeDescription attributeDescription) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | |
| | | |
| | | public boolean removeAttribute(AttributeDescription attributeDescription) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchResultEntry removeAttribute(String attributeDescription, |
| | | Object... values) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public boolean replaceAttribute(Attribute attribute) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchResultEntry replaceAttribute(String attributeDescription, |
| | | Object... values) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | Object... values) |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchResultEntry setName(DN dn) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | public SearchResultEntry setName(String dn) |
| | | throws LocalizedIllegalArgumentException, |
| | | UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable Search result reference implementation. |
| | | */ |
| | |
| | | AbstractUnmodifiableResponseImpl<SearchResultReference> implements |
| | | SearchResultReference |
| | | { |
| | | UnmodifiableSearchResultReferenceImpl(SearchResultReference impl) { |
| | | UnmodifiableSearchResultReferenceImpl(SearchResultReference impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public SearchResultReference addURI(String uri) |
| | | throws UnsupportedOperationException, NullPointerException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<String> getURIs() { |
| | | public List<String> getURIs() |
| | | { |
| | | return impl.getURIs(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | |
| | | |
| | | /** |
| | | * Unmodifiable Who Am I extended result implementation. |
| | |
| | | AbstractUnmodifiableExtendedResultImpl<WhoAmIExtendedResult> implements |
| | | WhoAmIExtendedResult |
| | | { |
| | | UnmodifiableWhoAmIExtendedResultImpl(WhoAmIExtendedResult impl) { |
| | | UnmodifiableWhoAmIExtendedResultImpl(WhoAmIExtendedResult impl) |
| | | { |
| | | super(impl); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getAuthorizationID() { |
| | | public String getAuthorizationID() |
| | | { |
| | | return impl.getAuthorizationID(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public WhoAmIExtendedResult setAuthorizationID(String authorizationID) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException { |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.i18n.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | WhoAmIExtendedResult addControl(Control control) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | WhoAmIExtendedResult addControl(Control control); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | WhoAmIExtendedResult addReferralURI(String uri) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | WhoAmIExtendedResult addReferralURI(String uri); |
| | | |
| | | |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | <C extends Control> C getControl(ControlDecoder<C> decoder, |
| | | DecodeOptions options) throws NullPointerException, DecodeException; |
| | | DecodeOptions options) throws DecodeException; |
| | | |
| | | |
| | | |
| | |
| | | * If this who am I extended result does not permit the |
| | | * authorization ID to be set. |
| | | */ |
| | | WhoAmIExtendedResult setAuthorizationID(String authorizationID) |
| | | throws LocalizedIllegalArgumentException, UnsupportedOperationException; |
| | | WhoAmIExtendedResult setAuthorizationID(String authorizationID); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | WhoAmIExtendedResult setCause(Throwable cause) |
| | | throws UnsupportedOperationException; |
| | | WhoAmIExtendedResult setCause(Throwable cause); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | WhoAmIExtendedResult setDiagnosticMessage(String message) |
| | | throws UnsupportedOperationException; |
| | | WhoAmIExtendedResult setDiagnosticMessage(String message); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | WhoAmIExtendedResult setMatchedDN(String dn) |
| | | throws UnsupportedOperationException; |
| | | WhoAmIExtendedResult setMatchedDN(String dn); |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | WhoAmIExtendedResult setResultCode(ResultCode resultCode) |
| | | throws UnsupportedOperationException, NullPointerException; |
| | | WhoAmIExtendedResult setResultCode(ResultCode resultCode); |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.responses; |
| | |
| | | * If {@code whoAmIExtendedResult} was {@code null} . |
| | | */ |
| | | WhoAmIExtendedResultImpl(final WhoAmIExtendedResult whoAmIExtendedResult) |
| | | throws NullPointerException |
| | | { |
| | | super(whoAmIExtendedResult); |
| | | this.authorizationID = whoAmIExtendedResult.getAuthorizationID(); |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public WhoAmIExtendedResult setAuthorizationID(final String authorizationID) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | if (authorizationID != null && authorizationID.length() != 0) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.schema; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | public int compareTo(final AttributeType type) throws NullPointerException |
| | | public int compareTo(final AttributeType type) |
| | | { |
| | | if (isObjectClassType) |
| | | { |
| | |
| | | * If {@code type} was {@code null}. |
| | | */ |
| | | public boolean isSubTypeOf(final AttributeType type) |
| | | throws NullPointerException |
| | | { |
| | | AttributeType tmp = this; |
| | | do |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | package org.forgerock.opendj.ldap.schema; |
| | | |
| | |
| | | |
| | | @Override |
| | | public DITContentRule getDITContentRule(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | throw new UnknownSchemaElementException(WARN_DCR_UNKNOWN.get(name)); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public DITStructureRule getDITStructureRule(final int ruleID) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | throw new UnknownSchemaElementException(WARN_DSR_UNKNOWN.get(String |
| | | .valueOf(ruleID))); |
| | |
| | | |
| | | @Override |
| | | public MatchingRule getMatchingRule(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | throw new UnknownSchemaElementException(WARN_MR_UNKNOWN.get(name)); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public MatchingRuleUse getMatchingRuleUse(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | throw new UnknownSchemaElementException(WARN_MRU_UNKNOWN.get(name)); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public NameForm getNameForm(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | throw new UnknownSchemaElementException(WARN_NAMEFORM_UNKNOWN.get(name)); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public ObjectClass getObjectClass(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | throw new UnknownSchemaElementException( |
| | | WARN_OBJECTCLASS_UNKNOWN.get(name)); |
| | |
| | | |
| | | private static interface Impl |
| | | { |
| | | AttributeType getAttributeType(String name) |
| | | throws UnknownSchemaElementException; |
| | | AttributeType getAttributeType(String name); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | DITContentRule getDITContentRule(String name) |
| | | throws UnknownSchemaElementException; |
| | | DITContentRule getDITContentRule(String name); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | DITStructureRule getDITStructureRule(int ruleID) |
| | | throws UnknownSchemaElementException; |
| | | DITStructureRule getDITStructureRule(int ruleID); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | MatchingRule getMatchingRule(String name) |
| | | throws UnknownSchemaElementException; |
| | | MatchingRule getMatchingRule(String name); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | MatchingRuleUse getMatchingRuleUse(String name) |
| | | throws UnknownSchemaElementException; |
| | | MatchingRuleUse getMatchingRuleUse(String name); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | NameForm getNameForm(String name) throws UnknownSchemaElementException; |
| | | NameForm getNameForm(String name); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | ObjectClass getObjectClass(String name) |
| | | throws UnknownSchemaElementException; |
| | | ObjectClass getObjectClass(String name); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | Syntax getSyntax(String numericOID) throws UnknownSchemaElementException; |
| | | Syntax getSyntax(String numericOID); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | @Override |
| | | public AttributeType getAttributeType(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | if (!strictImpl.hasAttributeType(name)) |
| | | { |
| | |
| | | |
| | | @Override |
| | | public DITContentRule getDITContentRule(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return strictImpl.getDITContentRule(name); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public DITStructureRule getDITStructureRule(final int ruleID) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return strictImpl.getDITStructureRule(ruleID); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public MatchingRule getMatchingRule(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return strictImpl.getMatchingRule(name); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public MatchingRuleUse getMatchingRuleUse(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return strictImpl.getMatchingRuleUse(name); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public NameForm getNameForm(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return strictImpl.getNameForm(name); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public ObjectClass getObjectClass(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return strictImpl.getObjectClass(name); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public AttributeType getAttributeType(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | final AttributeType type = numericOID2AttributeTypes.get(name); |
| | | if (type != null) |
| | |
| | | |
| | | @Override |
| | | public DITContentRule getDITContentRule(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | final DITContentRule rule = numericOID2ContentRules.get(name); |
| | | if (rule != null) |
| | |
| | | |
| | | @Override |
| | | public DITStructureRule getDITStructureRule(final int ruleID) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | final DITStructureRule rule = id2StructureRules.get(ruleID); |
| | | if (rule == null) |
| | |
| | | |
| | | @Override |
| | | public MatchingRule getMatchingRule(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | final MatchingRule rule = numericOID2MatchingRules.get(name); |
| | | if (rule != null) |
| | |
| | | |
| | | @Override |
| | | public MatchingRuleUse getMatchingRuleUse(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | final MatchingRuleUse rule = numericOID2MatchingRuleUses.get(name); |
| | | if (rule != null) |
| | |
| | | |
| | | @Override |
| | | public NameForm getNameForm(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | final NameForm form = numericOID2NameForms.get(name); |
| | | if (form != null) |
| | |
| | | |
| | | @Override |
| | | public ObjectClass getObjectClass(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | final ObjectClass oc = numericOID2ObjectClasses.get(name); |
| | | if (oc != null) |
| | |
| | | |
| | | @Override |
| | | public Syntax getSyntax(final String numericOID) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | final Syntax syntax = numericOID2Syntaxes.get(numericOID); |
| | | if (syntax == null) |
| | |
| | | public static FutureResult<Schema> readSchemaAsync( |
| | | final Connection connection, final DN name, |
| | | final ResultHandler<? super Schema> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final FutureResultTransformer<SchemaBuilder, Schema> future = |
| | | new FutureResultTransformer<SchemaBuilder, Schema>(handler) |
| | |
| | | * If the {@code connection} or {@code name} was {@code null}. |
| | | */ |
| | | public static Schema readSchema(final Connection connection, final DN name) |
| | | throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | return new SchemaBuilder().addSchema(connection, name, true).toSchema(); |
| | | } |
| | |
| | | public static FutureResult<Schema> readSchemaForEntryAsync( |
| | | final Connection connection, final DN name, |
| | | final ResultHandler<? super Schema> handler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | final FutureResultTransformer<SchemaBuilder, Schema> future = |
| | | new FutureResultTransformer<SchemaBuilder, Schema>(handler) |
| | |
| | | * If the {@code connection} or {@code name} was {@code null}. |
| | | */ |
| | | public static Schema readSchemaForEntry(final Connection connection, |
| | | final DN name) throws ErrorResultException, InterruptedException, |
| | | UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | final DN name) throws ErrorResultException, InterruptedException |
| | | { |
| | | return new SchemaBuilder().addSchemaForEntry(connection, name, true) |
| | | .toSchema(); |
| | |
| | | * not found or if the provided name is ambiguous. |
| | | */ |
| | | public AttributeType getAttributeType(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return impl.getAttributeType(name); |
| | | } |
| | |
| | | * not found or if the provided name is ambiguous. |
| | | */ |
| | | public DITContentRule getDITContentRule(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return impl.getDITContentRule(name); |
| | | } |
| | |
| | | * was not found. |
| | | */ |
| | | public DITStructureRule getDITStructureRule(final int ruleID) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return impl.getDITStructureRule(ruleID); |
| | | } |
| | |
| | | * not found or if the provided name is ambiguous. |
| | | */ |
| | | public MatchingRule getMatchingRule(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return impl.getMatchingRule(name); |
| | | } |
| | |
| | | * was not found or if the provided name is ambiguous. |
| | | */ |
| | | public MatchingRuleUse getMatchingRuleUse(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return impl.getMatchingRuleUse(name); |
| | | } |
| | |
| | | * found or if the provided name is ambiguous. |
| | | */ |
| | | public NameForm getNameForm(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return impl.getNameForm(name); |
| | | } |
| | |
| | | * found or if the provided name is ambiguous. |
| | | */ |
| | | public ObjectClass getObjectClass(final String name) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return impl.getObjectClass(name); |
| | | } |
| | |
| | | * or if the provided name is ambiguous. |
| | | */ |
| | | public Syntax getSyntax(final String numericOID) |
| | | throws UnknownSchemaElementException |
| | | { |
| | | return impl.getSyntax(numericOID); |
| | | } |
| | |
| | | * @throws NullPointerException |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | public Entry toEntry(final Entry entry) throws NullPointerException |
| | | public Entry toEntry(final Entry entry) |
| | | { |
| | | Attribute attr = new LinkedAttribute(Schema.ATTR_LDAP_SYNTAXES); |
| | | for (final Syntax syntax : getSyntaxes()) |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.schema; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | public SchemaBuilder(final Entry entry) throws NullPointerException |
| | | public SchemaBuilder(final Entry entry) |
| | | { |
| | | preLazyInitBuilder(entry.getName().toString(), null); |
| | | addSchema(entry, true); |
| | |
| | | * @throws NullPointerException |
| | | * If {@code schema} was {@code null}. |
| | | */ |
| | | public SchemaBuilder(final Schema schema) throws NullPointerException |
| | | public SchemaBuilder(final Schema schema) |
| | | { |
| | | preLazyInitBuilder(schema.getSchemaName(), schema); |
| | | } |
| | |
| | | * If {@code definition} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addAttributeType(final String definition, |
| | | final boolean overwrite) throws ConflictingSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | Validator.ensureNotNull(definition); |
| | | |
| | |
| | | final String syntax, final boolean singleValue, final boolean collective, |
| | | final boolean noUserModification, final AttributeUsage attributeUsage, |
| | | final Map<String, List<String>> extraProperties, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | lazyInitBuilder(); |
| | | |
| | |
| | | * If {@code definition} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addDITContentRule(final String definition, |
| | | final boolean overwrite) throws ConflictingSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | Validator.ensureNotNull(definition); |
| | | |
| | |
| | | final Set<String> prohibitedAttributes, |
| | | final Set<String> requiredAttributes, |
| | | final Map<String, List<String>> extraProperties, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | lazyInitBuilder(); |
| | | |
| | |
| | | final boolean obsolete, final String nameForm, |
| | | final Set<Integer> superiorRules, |
| | | final Map<String, List<String>> extraProperties, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | lazyInitBuilder(); |
| | | |
| | |
| | | * If {@code definition} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addDITStructureRule(final String definition, |
| | | final boolean overwrite) throws ConflictingSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | Validator.ensureNotNull(definition); |
| | | |
| | |
| | | */ |
| | | public SchemaBuilder addEnumerationSyntax(final String oid, |
| | | final String description, final boolean overwrite, |
| | | final String... enumerations) throws ConflictingSchemaElementException |
| | | final String... enumerations) |
| | | { |
| | | Validator.ensureNotNull((Object) enumerations); |
| | | |
| | |
| | | * If {@code definition} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addMatchingRule(final String definition, |
| | | final boolean overwrite) throws ConflictingSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | Validator.ensureNotNull(definition); |
| | | |
| | |
| | | final boolean obsolete, final String assertionSyntax, |
| | | final Map<String, List<String>> extraProperties, |
| | | final MatchingRuleImpl implementation, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | Validator.ensureNotNull(implementation); |
| | | |
| | |
| | | * If {@code definition} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addMatchingRuleUse(final String definition, |
| | | final boolean overwrite) throws ConflictingSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | Validator.ensureNotNull(definition); |
| | | |
| | |
| | | final List<String> names, final String description, |
| | | final boolean obsolete, final Set<String> attributeOIDs, |
| | | final Map<String, List<String>> extraProperties, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | lazyInitBuilder(); |
| | | |
| | |
| | | * If {@code definition} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addNameForm(final String definition, |
| | | final boolean overwrite) throws ConflictingSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | Validator.ensureNotNull(definition); |
| | | |
| | |
| | | final String structuralClass, final Set<String> requiredAttributes, |
| | | final Set<String> optionalAttributes, |
| | | final Map<String, List<String>> extraProperties, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | lazyInitBuilder(); |
| | | |
| | |
| | | * If {@code definition} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addObjectClass(final String definition, |
| | | final boolean overwrite) throws ConflictingSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | Validator.ensureNotNull(definition); |
| | | |
| | |
| | | final Set<String> optionalAttributeOIDs, |
| | | final ObjectClassType objectClassType, |
| | | final Map<String, List<String>> extraProperties, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | lazyInitBuilder(); |
| | | |
| | |
| | | */ |
| | | public SchemaBuilder addPatternSyntax(final String oid, |
| | | final String description, final Pattern pattern, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | Validator.ensureNotNull(pattern); |
| | | |
| | |
| | | public FutureResult<SchemaBuilder> addSchemaAsync( |
| | | final Connection connection, final DN name, |
| | | final ResultHandler<? super SchemaBuilder> handler, |
| | | final boolean overwrite) throws UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | // The call to addSchema will perform copyOnWrite. |
| | | final SearchRequest request = getReadSchemaSearchRequest(name); |
| | |
| | | */ |
| | | public SchemaBuilder addSchema(final Connection connection, final DN name, |
| | | final boolean overwrite) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | // The call to addSchema will perform copyOnWrite. |
| | | final SearchRequest request = getReadSchemaSearchRequest(name); |
| | |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addSchema(final Entry entry, final boolean overwrite) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(entry); |
| | | |
| | |
| | | * If {@code schema} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addSchema(final Schema schema, final boolean overwrite) |
| | | throws ConflictingSchemaElementException, NullPointerException |
| | | { |
| | | Validator.ensureNotNull(schema); |
| | | |
| | |
| | | public FutureResult<SchemaBuilder> addSchemaForEntryAsync( |
| | | final Connection connection, final DN name, |
| | | final ResultHandler<? super SchemaBuilder> handler, |
| | | final boolean overwrite) throws UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | // The call to addSchema will perform copyOnWrite. |
| | | final RecursiveFutureResult<SearchResultEntry, SchemaBuilder> future = |
| | |
| | | */ |
| | | public SchemaBuilder addSchemaForEntry(final Connection connection, |
| | | final DN name, final boolean overwrite) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | // The call to addSchema will perform copyOnWrite. |
| | | final SearchRequest request = getReadSchemaForEntrySearchRequest(name); |
| | |
| | | */ |
| | | public SchemaBuilder addSubstitutionSyntax(final String oid, |
| | | final String description, final String substituteSyntax, |
| | | final boolean overwrite) throws ConflictingSchemaElementException |
| | | final boolean overwrite) |
| | | { |
| | | Validator.ensureNotNull(substituteSyntax); |
| | | |
| | |
| | | * If {@code definition} was {@code null}. |
| | | */ |
| | | public SchemaBuilder addSyntax(final String definition, |
| | | final boolean overwrite) throws ConflictingSchemaElementException, |
| | | LocalizedIllegalArgumentException, NullPointerException |
| | | final boolean overwrite) |
| | | { |
| | | Validator.ensureNotNull(definition); |
| | | |
| | |
| | | public SchemaBuilder addSyntax(final String oid, final String description, |
| | | final Map<String, List<String>> extraProperties, |
| | | final SyntaxImpl implementation, final boolean overwrite) |
| | | throws ConflictingSchemaElementException, NullPointerException |
| | | { |
| | | lazyInitBuilder(); |
| | | |
| | |
| | | |
| | | |
| | | private void addAttributeType(final AttributeType attribute, |
| | | final boolean overwrite) throws ConflictingSchemaElementException |
| | | final boolean overwrite) |
| | | { |
| | | AttributeType conflictingAttribute; |
| | | if (numericOID2AttributeTypes.containsKey(attribute.getOID())) |
| | |
| | | |
| | | |
| | | private void addDITContentRule(final DITContentRule rule, |
| | | final boolean overwrite) throws ConflictingSchemaElementException |
| | | final boolean overwrite) |
| | | { |
| | | DITContentRule conflictingRule; |
| | | if (numericOID2ContentRules.containsKey(rule.getStructuralClassOID())) |
| | |
| | | |
| | | |
| | | private void addDITStructureRule(final DITStructureRule rule, |
| | | final boolean overwrite) throws ConflictingSchemaElementException |
| | | final boolean overwrite) |
| | | { |
| | | DITStructureRule conflictingRule; |
| | | if (id2StructureRules.containsKey(rule.getRuleID())) |
| | |
| | | |
| | | |
| | | private void addMatchingRule(final MatchingRule rule, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | MatchingRule conflictingRule; |
| | | if (numericOID2MatchingRules.containsKey(rule.getOID())) |
| | |
| | | |
| | | |
| | | private void addMatchingRuleUse(final MatchingRuleUse use, |
| | | final boolean overwrite) throws ConflictingSchemaElementException |
| | | final boolean overwrite) |
| | | { |
| | | MatchingRuleUse conflictingUse; |
| | | if (numericOID2MatchingRuleUses.containsKey(use.getMatchingRuleOID())) |
| | |
| | | |
| | | |
| | | private void addNameForm(final NameForm form, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | NameForm conflictingForm; |
| | | if (numericOID2NameForms.containsKey(form.getOID())) |
| | |
| | | |
| | | |
| | | private void addObjectClass(final ObjectClass oc, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | ObjectClass conflictingOC; |
| | | if (numericOID2ObjectClasses.containsKey(oc.getOID())) |
| | |
| | | |
| | | |
| | | private void addSyntax(final Syntax syntax, final boolean overwrite) |
| | | throws ConflictingSchemaElementException |
| | | { |
| | | Syntax conflictingSyntax; |
| | | if (numericOID2Syntaxes.containsKey(syntax.getOID())) |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2011 ForgeRock AS |
| | | * Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.schema; |
| | |
| | | * {@code REJECT}. |
| | | */ |
| | | public SchemaValidationPolicy checkDITStructureRules(final Policy policy, |
| | | final EntryResolver resolver) throws IllegalArgumentException |
| | | final EntryResolver resolver) |
| | | { |
| | | if (checkDITStructureRules.needsChecking() && resolver == null) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | |
| | | |
| | | |
| | | final void writeComment0(final CharSequence comment) throws IOException, |
| | | NullPointerException |
| | | final void writeComment0(final CharSequence comment) throws IOException |
| | | { |
| | | Validator.ensureNotNull(comment); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | |
| | | import java.io.Closeable; |
| | | import java.io.IOException; |
| | | import java.util.NoSuchElementException; |
| | | import java.util.*; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NoSuchElementException |
| | | * If this reader does not contain any more change records. |
| | | */ |
| | | ChangeRecord readChangeRecord() throws IOException, NoSuchElementException; |
| | | ChangeRecord readChangeRecord() throws IOException; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code change} was {@code null}. |
| | | */ |
| | | ChangeRecordWriter writeChangeRecord(AddRequest change) throws IOException, |
| | | NullPointerException; |
| | | ChangeRecordWriter writeChangeRecord(AddRequest change) throws IOException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code change} was {@code null}. |
| | | */ |
| | | ChangeRecordWriter writeChangeRecord(ChangeRecord change) throws IOException, |
| | | NullPointerException; |
| | | ChangeRecordWriter writeChangeRecord(ChangeRecord change) throws IOException; |
| | | |
| | | |
| | | |
| | |
| | | * If {@code change} was {@code null}. |
| | | */ |
| | | ChangeRecordWriter writeChangeRecord(DeleteRequest change) |
| | | throws IOException, NullPointerException; |
| | | throws IOException; |
| | | |
| | | |
| | | |
| | |
| | | * If {@code change} was {@code null}. |
| | | */ |
| | | ChangeRecordWriter writeChangeRecord(ModifyDNRequest change) |
| | | throws IOException, NullPointerException; |
| | | throws IOException; |
| | | |
| | | |
| | | |
| | |
| | | * If {@code change} was {@code null}. |
| | | */ |
| | | ChangeRecordWriter writeChangeRecord(ModifyRequest change) |
| | | throws IOException, NullPointerException; |
| | | throws IOException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code comment} was {@code null}. |
| | | */ |
| | | ChangeRecordWriter writeComment(CharSequence comment) throws IOException, |
| | | NullPointerException; |
| | | ChangeRecordWriter writeComment(CharSequence comment) throws IOException; |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * If {@code connection} was {@code null}. |
| | | */ |
| | | public ConnectionChangeRecordWriter(final Connection connection) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(connection); |
| | | this.connection = connection; |
| | |
| | | * If {@code change} was {@code null}. |
| | | */ |
| | | public ConnectionChangeRecordWriter writeChangeRecord(final AddRequest change) |
| | | throws ErrorResultIOException, InterruptedIOException, |
| | | NullPointerException |
| | | throws ErrorResultIOException, InterruptedIOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | try |
| | |
| | | */ |
| | | public ConnectionChangeRecordWriter writeChangeRecord( |
| | | final ChangeRecord change) throws ErrorResultIOException, |
| | | InterruptedIOException, NullPointerException |
| | | InterruptedIOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | |
| | |
| | | */ |
| | | public ConnectionChangeRecordWriter writeChangeRecord( |
| | | final DeleteRequest change) throws ErrorResultIOException, |
| | | InterruptedIOException, NullPointerException |
| | | InterruptedIOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | try |
| | |
| | | */ |
| | | public ConnectionChangeRecordWriter writeChangeRecord( |
| | | final ModifyDNRequest change) throws ErrorResultIOException, |
| | | InterruptedIOException, NullPointerException |
| | | InterruptedIOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | try |
| | |
| | | */ |
| | | public ConnectionChangeRecordWriter writeChangeRecord( |
| | | final ModifyRequest change) throws ErrorResultIOException, |
| | | InterruptedIOException, NullPointerException |
| | | InterruptedIOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | try |
| | |
| | | * If {@code comment} was {@code null}. |
| | | */ |
| | | public ConnectionChangeRecordWriter writeComment(final CharSequence comment) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(comment); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * If {@code connection} was {@code null}. |
| | | */ |
| | | public ConnectionEntryReader(final Connection connection, |
| | | final SearchRequest searchRequest) throws NullPointerException |
| | | final SearchRequest searchRequest) |
| | | { |
| | | this(connection, searchRequest, new LinkedBlockingQueue<Response>()); |
| | | } |
| | |
| | | */ |
| | | public ConnectionEntryReader(final Connection connection, |
| | | final SearchRequest searchRequest, final BlockingQueue<Response> entries) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(connection); |
| | | buffer = new BufferHandler(entries); |
| | |
| | | * search result code indicates that the search operation succeeded. |
| | | */ |
| | | public boolean isEntry() throws ErrorResultIOException, |
| | | InterruptedIOException, NoSuchElementException |
| | | InterruptedIOException |
| | | { |
| | | // Throws ErrorResultIOException if search returned error. |
| | | if (!hasNext()) |
| | |
| | | * search result code indicates that the search operation succeeded. |
| | | */ |
| | | public boolean isReference() throws ErrorResultIOException, |
| | | InterruptedIOException, NoSuchElementException |
| | | InterruptedIOException |
| | | { |
| | | return !isEntry(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public SearchResultEntry readEntry() throws SearchResultReferenceIOException, |
| | | ErrorResultIOException, InterruptedIOException, NoSuchElementException |
| | | ErrorResultIOException, InterruptedIOException |
| | | { |
| | | if (isEntry()) |
| | | { |
| | |
| | | * search result code indicates that the search operation succeeded. |
| | | */ |
| | | public SearchResultReference readReference() throws ErrorResultIOException, |
| | | InterruptedIOException, NoSuchElementException |
| | | InterruptedIOException |
| | | { |
| | | if (isReference()) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * If {@code connection} was {@code null}. |
| | | */ |
| | | public ConnectionEntryWriter(final Connection connection) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(connection); |
| | | this.connection = connection; |
| | |
| | | * If {@code comment} was {@code null}. |
| | | */ |
| | | public ConnectionEntryWriter writeComment(final CharSequence comment) |
| | | throws NullPointerException |
| | | { |
| | | Validator.ensureNotNull(comment); |
| | | |
| | |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | public ConnectionEntryWriter writeEntry(final Entry entry) |
| | | throws ErrorResultIOException, InterruptedIOException, |
| | | NullPointerException |
| | | throws ErrorResultIOException, InterruptedIOException |
| | | { |
| | | Validator.ensureNotNull(entry); |
| | | try |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | |
| | | import java.io.Closeable; |
| | | import java.io.IOException; |
| | | import java.util.NoSuchElementException; |
| | | import java.util.*; |
| | | |
| | | import org.forgerock.opendj.ldap.Entry; |
| | | |
| | |
| | | * @throws NoSuchElementException |
| | | * If this reader does not contain any more entries. |
| | | */ |
| | | Entry readEntry() throws IOException, NoSuchElementException; |
| | | Entry readEntry() throws IOException; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * @throws NullPointerException |
| | | * If {@code comment} was {@code null}. |
| | | */ |
| | | EntryWriter writeComment(CharSequence comment) throws IOException, |
| | | NullPointerException; |
| | | EntryWriter writeComment(CharSequence comment) throws IOException; |
| | | |
| | | |
| | | |
| | |
| | | * @throws NullPointerException |
| | | * If {@code entry} was {@code null}. |
| | | */ |
| | | EntryWriter writeEntry(Entry entry) throws IOException, NullPointerException; |
| | | EntryWriter writeEntry(Entry entry) throws IOException; |
| | | |
| | | } |
| | |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * Copyright 2011 ForgeRock AS |
| | | * Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | |
| | | |
| | | @Override |
| | | public ChangeRecord readChangeRecord() throws IOException, |
| | | NoSuchElementException |
| | | public ChangeRecord readChangeRecord() throws IOException |
| | | { |
| | | if (sourceEntry != null && targetEntry != null) |
| | | { |
| | |
| | | |
| | | |
| | | @Override |
| | | public Entry readEntry() throws IOException, NoSuchElementException |
| | | public Entry readEntry() throws IOException |
| | | { |
| | | return iterator.next(); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | public Entry readEntry() throws IOException, NoSuchElementException |
| | | public Entry readEntry() throws IOException |
| | | { |
| | | if (hasNext()) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * If {@code ldifLines} was {@code null}. |
| | | */ |
| | | public static ChangeRecord valueOfLDIFChangeRecord(final String... ldifLines) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | // LDIF change record reader is tolerant to missing change types. |
| | | final LDIFChangeRecordReader reader = new LDIFChangeRecordReader(ldifLines); |
| | |
| | | * If {@code in} was {@code null}. |
| | | */ |
| | | public LDIFChangeRecordReader(final InputStream in) |
| | | throws NullPointerException |
| | | { |
| | | super(in); |
| | | } |
| | |
| | | * If {@code ldifLines} was {@code null}. |
| | | */ |
| | | public LDIFChangeRecordReader(final List<String> ldifLines) |
| | | throws NullPointerException |
| | | { |
| | | super(ldifLines); |
| | | } |
| | |
| | | * If {@code ldifLines} was {@code null}. |
| | | */ |
| | | public LDIFChangeRecordReader(final String... ldifLines) |
| | | throws NullPointerException |
| | | { |
| | | super(Arrays.asList(ldifLines)); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFChangeRecordWriter writeChangeRecord(final AddRequest change) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFChangeRecordWriter writeChangeRecord(final ChangeRecord change) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFChangeRecordWriter writeChangeRecord(final DeleteRequest change) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFChangeRecordWriter writeChangeRecord(final ModifyDNRequest change) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFChangeRecordWriter writeChangeRecord(final ModifyRequest change) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | Validator.ensureNotNull(change); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFChangeRecordWriter writeComment(final CharSequence comment) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | writeComment0(comment); |
| | | return this; |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * If {@code ldifLines} was {@code null}. |
| | | */ |
| | | public static Entry valueOfLDIFEntry(final String... ldifLines) |
| | | throws LocalizedIllegalArgumentException, NullPointerException |
| | | { |
| | | final LDIFEntryReader reader = new LDIFEntryReader(ldifLines); |
| | | try |
| | |
| | | * @throws NullPointerException |
| | | * If {@code in} was {@code null}. |
| | | */ |
| | | public LDIFEntryReader(final InputStream in) throws NullPointerException |
| | | public LDIFEntryReader(final InputStream in) |
| | | { |
| | | super(in); |
| | | } |
| | |
| | | * If {@code ldifLines} was {@code null}. |
| | | */ |
| | | public LDIFEntryReader(final List<String> ldifLines) |
| | | throws NullPointerException |
| | | { |
| | | super(ldifLines); |
| | | } |
| | |
| | | * @throws NullPointerException |
| | | * If {@code ldifLines} was {@code null}. |
| | | */ |
| | | public LDIFEntryReader(final String... ldifLines) throws NullPointerException |
| | | public LDIFEntryReader(final String... ldifLines) |
| | | { |
| | | super(Arrays.asList(ldifLines)); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldif; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFEntryWriter writeComment(final CharSequence comment) |
| | | throws IOException, NullPointerException |
| | | throws IOException |
| | | { |
| | | writeComment0(comment); |
| | | return this; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public LDIFEntryWriter writeEntry(final Entry entry) throws IOException, |
| | | NullPointerException |
| | | public LDIFEntryWriter writeEntry(final Entry entry) throws IOException |
| | | { |
| | | Validator.ensureNotNull(entry); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public FutureResult<Void> abandonAsync(AbandonRequest request) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | if (!resultCode.isExceptional()) |
| | | { |
| | |
| | | public FutureResult<Result> addAsync(AddRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | if (!resultCode.isExceptional()) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public void addConnectionEventListener(ConnectionEventListener listener) |
| | | throws IllegalStateException, NullPointerException |
| | | { |
| | | // Do nothing. |
| | | } |
| | |
| | | public FutureResult<BindResult> bindAsync(BindRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | if (!resultCode.isExceptional()) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public void close(UnbindRequest request, String reason) |
| | | throws NullPointerException |
| | | { |
| | | // Do nothing. |
| | | } |
| | |
| | | public FutureResult<CompareResult> compareAsync(CompareRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super CompareResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | if (!resultCode.isExceptional()) |
| | | { |
| | |
| | | public FutureResult<Result> deleteAsync(DeleteRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | if (!resultCode.isExceptional()) |
| | | { |
| | |
| | | ExtendedRequest<R> request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super R> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | if (!resultCode.isExceptional()) |
| | | { |
| | |
| | | public FutureResult<Result> modifyAsync(ModifyRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | if (!resultCode.isExceptional()) |
| | | { |
| | |
| | | public FutureResult<Result> modifyDNAsync(ModifyDNRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super Result> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | if (!resultCode.isExceptional()) |
| | | { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public void removeConnectionEventListener(ConnectionEventListener listener) |
| | | throws NullPointerException |
| | | { |
| | | // Do nothing. |
| | | } |
| | |
| | | public FutureResult<Result> searchAsync(SearchRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | SearchResultHandler resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | if (entry != null) |
| | | { |
| | |
| | | |
| | | |
| | | public Request addControl(final Control cntrl) |
| | | throws UnsupportedOperationException, NullPointerException |
| | | { |
| | | return request.addControl(cntrl); |
| | | } |
| | |
| | | |
| | | |
| | | public <C extends Control> C getControl(final ControlDecoder<C> decoder, |
| | | final DecodeOptions options) throws DecodeException, |
| | | NullPointerException |
| | | final DecodeOptions options) throws DecodeException |
| | | { |
| | | return request.getControl(decoder, options); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | */ |
| | | |
| | | package com.forgerock.opendj.ldap.tools; |
| | | |
| | | |
| | | |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldap.requests.BindRequest; |
| | | import org.forgerock.opendj.ldap.responses.BindResult; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public BindResult bind(BindRequest request) throws ErrorResultException, |
| | | InterruptedException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | InterruptedException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public BindResult bind(String name, char[] password) |
| | | throws ErrorResultException, InterruptedException, |
| | | LocalizedIllegalArgumentException, UnsupportedOperationException, |
| | | IllegalStateException, NullPointerException |
| | | throws ErrorResultException, InterruptedException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | public FutureResult<BindResult> bindAsync(BindRequest request, |
| | | IntermediateResponseHandler intermediateResponseHandler, |
| | | ResultHandler<? super BindResult> resultHandler) |
| | | throws UnsupportedOperationException, IllegalStateException, |
| | | NullPointerException |
| | | { |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | |
| | | */ |
| | | public FutureResult<BindResult> rebindAsync( |
| | | final ResultHandler<? super BindResult> handler) |
| | | throws UnsupportedOperationException, IllegalStateException |
| | | { |
| | | if (request == null) |
| | | { |
| | |
| | | * If {@code factory} or {@code request} was {@code null}. |
| | | */ |
| | | public AuthenticatedConnectionFactory(final ConnectionFactory factory, |
| | | final BindRequest request) throws NullPointerException |
| | | final BindRequest request) |
| | | { |
| | | Validator.ensureNotNull(factory, request); |
| | | this.parentFactory = factory; |