Class Requests
All copy constructors of the form copyOfXXXRequest perform deep
copies of their request parameter. More specifically, any controls,
modifications, and attributes contained within the response will be
duplicated.
Similarly, all unmodifiable views of request returned by methods of the form
unmodifiableXXXRequest return deep unmodifiable views of their
request parameter. More specifically, any controls, modifications, and
attributes contained within the returned request will be unmodifiable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AbandonRequestcopyOfAbandonRequest(AbandonRequest request) Creates a new abandon request that is an exact copy of the provided request.static AddRequestcopyOfAddRequest(AddRequest request) Creates a new add request that is an exact copy of the provided request.static AnonymousSASLBindRequestCreates a new anonymous SASL bind request that is an exact copy of the provided request.static CancelExtendedRequestCreates a new cancel extended request that is an exact copy of the provided request.static CompareRequestcopyOfCompareRequest(CompareRequest request) Creates a new compare request that is an exact copy of the provided request.static CRAMMD5SASLBindRequestCreates a new CRAM MD5 SASL bind request that is an exact copy of the provided request.static DeleteRequestcopyOfDeleteRequest(DeleteRequest request) Creates a new delete request that is an exact copy of the provided request.static DigestMD5SASLBindRequestCreates a new digest MD5 SASL bind request that is an exact copy of the provided request.static ExternalSASLBindRequestCreates a new external SASL bind request that is an exact copy of the provided request.static GenericBindRequestCreates a new generic bind request that is an exact copy of the provided request.static GenericExtendedRequestCreates a new generic extended request that is an exact copy of the provided request.static GSSAPISASLBindRequestCreates a new GSSAPI SASL bind request that is an exact copy of the provided request.static ModifyDNRequestcopyOfModifyDNRequest(ModifyDNRequest request) Creates a new modify DN request that is an exact copy of the provided request.static ModifyRequestcopyOfModifyRequest(ModifyRequest request) Creates a new modify request that is an exact copy of the provided request.Creates a new password modify extended request that is an exact copy of the provided request.static PlainSASLBindRequestCreates a new plain SASL bind request that is an exact copy of the provided request.static SearchRequestcopyOfSearchRequest(SearchRequest request) Creates a new search request that is an exact copy of the provided request.static SimpleBindRequestcopyOfSimpleBindRequest(SimpleBindRequest request) Creates a new simple bind request that is an exact copy of the provided request.static StartTLSExtendedRequestCreates a new startTLS extended request that is an exact copy of the provided request.static UnbindRequestcopyOfUnbindRequest(UnbindRequest request) Creates a new unbind request that is an exact copy of the provided request.static WhoAmIExtendedRequestCreates a new Who Am I extended request that is an exact copy of the provided request.static AbandonRequestnewAbandonRequest(int requestID) Creates a new abandon request using the provided message ID.static AddRequestnewAddRequest(String name) Creates a new add request using the provided distinguished name decoded using the default schema.static AddRequestnewAddRequest(String... ldifLines) Creates a new add request using the provided lines of LDIF decoded using the default schema.static AddRequestnewAddRequest(DN name) Creates a new add request using the provided distinguished name.static AddRequestnewAddRequest(Entry entry) Creates a new add request backed by the provided entry.static AnonymousSASLBindRequestnewAnonymousSASLBindRequest(String traceString) Creates a new anonymous SASL bind request having the provided trace string.static CancelExtendedRequestnewCancelExtendedRequest(int requestID) Creates a new cancel extended request using the provided message ID.static ChangeRecordnewChangeRecord(String... ldifLines) Creates a new change record (an add, delete, modify, or modify DN request) using the provided lines of LDIF decoded using the default schema.static CompareRequestnewCompareRequest(String name, String attributeDescription, Object assertionValue) Creates a new compare request using the provided distinguished name, attribute name, and assertion value decoded using the default schema.static CompareRequestnewCompareRequest(DN name, AttributeDescription attributeDescription, Object assertionValue) Creates a new compare request using the provided distinguished name, attribute name, and assertion value.static CRAMMD5SASLBindRequestnewCRAMMD5SASLBindRequest(String authenticationID, byte[] password) Creates a new CRAM-MD5 SASL bind request having the provided authentication ID and password.static CRAMMD5SASLBindRequestnewCRAMMD5SASLBindRequest(String authenticationID, char[] password) Creates a new CRAM-MD5 SASL bind request having the provided authentication ID and password.static DeleteRequestnewDeleteRequest(String name) Creates a new delete request using the provided distinguished name decoded using the default schema.static DeleteRequestnewDeleteRequest(DN name) Creates a new delete request using the provided distinguished name.static DigestMD5SASLBindRequestnewDigestMD5SASLBindRequest(String authenticationID, byte[] password) Creates a new DIGEST-MD5 SASL bind request having the provided authentication ID and password, but no realm or authorization ID.static DigestMD5SASLBindRequestnewDigestMD5SASLBindRequest(String authenticationID, char[] password) Creates a new DIGEST-MD5 SASL bind request having the provided authentication ID and password, but no realm or authorization ID.static ExternalSASLBindRequestCreates a new External SASL bind request with no authorization ID.static GenericBindRequestnewGenericBindRequest(byte authenticationType, byte[] authenticationValue) Creates a new generic bind request using an empty distinguished name, authentication type, and authentication information.static GenericBindRequestnewGenericBindRequest(String name, byte authenticationType, byte[] authenticationValue) Creates a new generic bind request using the provided name, authentication type, and authentication information.static GenericExtendedRequestnewGenericExtendedRequest(String requestName) Creates a new generic extended request using the provided name and no value.static GenericExtendedRequestnewGenericExtendedRequest(String requestName, Object requestValue) Creates a new generic extended request using the provided name and optional value.static GSSAPISASLBindRequestnewGSSAPISASLBindRequest(String authenticationID, byte[] password) Creates a new GSSAPI SASL bind request having the provided authentication ID and password, but no realm, KDC address, or authorization ID.static GSSAPISASLBindRequestnewGSSAPISASLBindRequest(String authenticationID, char[] password) Creates a new GSSAPI SASL bind request having the provided authentication ID and password, but no realm, KDC address, or authorization ID.static GSSAPISASLBindRequestnewGSSAPISASLBindRequest(Subject subject) Creates a new GSSAPI SASL bind request having the provided subject, but no authorization ID.static ModifyDNRequestnewModifyDNRequest(String name, String newRDN) Creates a new modify DN request using the provided distinguished name and new RDN decoded using the default schema.static ModifyDNRequestnewModifyDNRequest(DN name, RDN newRDN) Creates a new modify DN request using the provided distinguished name and new RDN.static ModifyRequestnewModifyRequest(String name) Creates a new modify request using the provided distinguished name decoded using the default schema.static ModifyRequestnewModifyRequest(String... ldifLines) Creates a new modify request using the provided lines of LDIF decoded using the default schema.static ModifyRequestnewModifyRequest(DN name) Creates a new modify request using the provided distinguished name.static ModifyRequestnewModifyRequest(Entry fromEntry, Entry toEntry) Creates a new modify request containing a list of modifications which can be used to transformfromEntryinto entrytoEntry.Creates a new password modify extended request, with no user identity, old password, or new password.static PlainSASLBindRequestnewPlainSASLBindRequest(String authenticationID, byte[] password) Creates a new Plain SASL bind request having the provided authentication ID and password, but no authorization ID.static PlainSASLBindRequestnewPlainSASLBindRequest(String authenticationID, char[] password) Creates a new Plain SASL bind request having the provided authentication ID and password, but no authorization ID.static SearchRequestnewSearchRequest(String name, SearchScope scope, String filter, String... attributeDescriptions) Creates a new search request using the provided distinguished name, scope, and filter, decoded using the default schema.static SearchRequestnewSearchRequest(DN name, SearchScope scope, Filter filter, String... attributeDescriptions) Creates a new search request using the provided distinguished name, scope, and filter.static SimpleBindRequestCreates a new simple bind request having an empty name and password suitable for anonymous authentication.static SimpleBindRequestnewSimpleBindRequest(String name, byte[] password) Creates a new simple bind request having the provided name and password suitable for name/password authentication.static SimpleBindRequestnewSimpleBindRequest(String name, char[] password) Creates a new simple bind request having the provided name and password suitable for name/password authentication.static SearchRequestnewSingleEntrySearchRequest(String name, SearchScope scope, String filter, String... attributeDescriptions) Creates a new search request for a single entry, using the provided distinguished name, scope, and filter, decoded using the default schema.static SearchRequestnewSingleEntrySearchRequest(DN name, SearchScope scope, Filter filter, String... attributeDescriptions) Creates a new search request for a single entry, using the provided distinguished name, scope, and filter.static StartTLSExtendedRequestnewStartTLSExtendedRequest(SSLContext sslContext) Creates a new start TLS extended request which will use the provided SSL context.static UnbindRequestCreates a new unbind request.static WhoAmIExtendedRequestCreates a new Who Am I extended request.static RequestshallowCopyOfRequest(Request request, String... excludeControlOids) Creates a new request that is a shallow copy of the provided request, except for controls list which is a new list containing the original controls (and not the original list of controls) possibly filtered by the provided exclusion parameter.static AbandonRequestunmodifiableAbandonRequest(AbandonRequest request) Creates an unmodifiable abandon request of the provided request.static AddRequestunmodifiableAddRequest(AddRequest request) Creates an unmodifiable add request of the provided request.static AnonymousSASLBindRequestCreates an unmodifiable anonymous SASL bind request of the provided request.static CancelExtendedRequestCreates an unmodifiable cancel extended request of the provided request.static CompareRequestunmodifiableCompareRequest(CompareRequest request) Creates an unmodifiable compare request of the provided request.static CRAMMD5SASLBindRequestCreates an unmodifiable CRAM MD5 SASL bind request of the provided request.static DeleteRequestunmodifiableDeleteRequest(DeleteRequest request) Creates an unmodifiable delete request of the provided request.static DigestMD5SASLBindRequestCreates an unmodifiable digest MD5 SASL bind request of the provided request.static ExternalSASLBindRequestCreates an unmodifiable external SASL bind request of the provided request.static GenericBindRequestCreates an unmodifiable generic bind request of the provided request.static GenericExtendedRequestCreates an unmodifiable generic extended request of the provided request.static GSSAPISASLBindRequestCreates an unmodifiable GSSAPI SASL bind request of the provided request.static ModifyDNRequestCreates an unmodifiable modify DN request of the provided request.static ModifyRequestunmodifiableModifyRequest(ModifyRequest request) Creates an unmodifiable modify request of the provided request.Creates an unmodifiable password modify extended request of the provided request.static PlainSASLBindRequestCreates an unmodifiable plain SASL bind request of the provided request.static SearchRequestunmodifiableSearchRequest(SearchRequest request) Creates an unmodifiable search request of the provided request.static SimpleBindRequestCreates an unmodifiable simple bind request of the provided request.static StartTLSExtendedRequestCreates an unmodifiable startTLS extended request of the provided request.static UnbindRequestunmodifiableUnbindRequest(UnbindRequest request) Creates an unmodifiable unbind request of the provided request.static WhoAmIExtendedRequestCreates an unmodifiable new Who Am I extended request of the provided request.
-
Method Details
-
shallowCopyOfRequest
Creates a new request that is a shallow copy of the provided request, except for controls list which is a new list containing the original controls (and not the original list of controls) possibly filtered by the provided exclusion parameter.The intended usage is to be able to perform modification of the controls of a request without affecting the original request.
- Parameters:
request- the original requestexcludeControlOids- OIDs of controls to exclude from the new request- Returns:
- the new request
-
copyOfAbandonRequest
Creates a new abandon request that is an exact copy of the provided request.- Parameters:
request- The abandon request to be copied.- Returns:
- The new abandon request.
- Throws:
NullPointerException- Ifrequestwasnull
-
copyOfAddRequest
Creates a new add request that is an exact copy of the provided request.- Parameters:
request- The add request to be copied.- Returns:
- The new add request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfAnonymousSASLBindRequest
public static AnonymousSASLBindRequest copyOfAnonymousSASLBindRequest(AnonymousSASLBindRequest request) Creates a new anonymous SASL bind request that is an exact copy of the provided request.- Parameters:
request- The anonymous SASL bind request to be copied.- Returns:
- The new anonymous SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfCancelExtendedRequest
Creates a new cancel extended request that is an exact copy of the provided request.- Parameters:
request- The cancel extended request to be copied.- Returns:
- The new cancel extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfCompareRequest
Creates a new compare request that is an exact copy of the provided request.- Parameters:
request- The compare request to be copied.- Returns:
- The new compare request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfCRAMMD5SASLBindRequest
Creates a new CRAM MD5 SASL bind request that is an exact copy of the provided request.- Parameters:
request- The CRAM MD5 SASL bind request to be copied.- Returns:
- The new CRAM-MD5 SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfDeleteRequest
Creates a new delete request that is an exact copy of the provided request.- Parameters:
request- The add request to be copied.- Returns:
- The new delete request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfDigestMD5SASLBindRequest
public static DigestMD5SASLBindRequest copyOfDigestMD5SASLBindRequest(DigestMD5SASLBindRequest request) Creates a new digest MD5 SASL bind request that is an exact copy of the provided request.- Parameters:
request- The digest MD5 SASL bind request to be copied.- Returns:
- The new DIGEST-MD5 SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfExternalSASLBindRequest
public static ExternalSASLBindRequest copyOfExternalSASLBindRequest(ExternalSASLBindRequest request) Creates a new external SASL bind request that is an exact copy of the provided request.- Parameters:
request- The external SASL bind request to be copied.- Returns:
- The new External SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfGenericBindRequest
Creates a new generic bind request that is an exact copy of the provided request.- Parameters:
request- The generic bind request to be copied.- Returns:
- The new generic bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfGenericExtendedRequest
Creates a new generic extended request that is an exact copy of the provided request.- Parameters:
request- The generic extended request to be copied.- Returns:
- The new generic extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfGSSAPISASLBindRequest
Creates a new GSSAPI SASL bind request that is an exact copy of the provided request.- Parameters:
request- The GSSAPI SASL bind request to be copied.- Returns:
- The new GSSAPI SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfModifyDNRequest
Creates a new modify DN request that is an exact copy of the provided request.- Parameters:
request- The modify DN request to be copied.- Returns:
- The new modify DN request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfModifyRequest
Creates a new modify request that is an exact copy of the provided request.- Parameters:
request- The modify request to be copied.- Returns:
- The new modify request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfPasswordModifyExtendedRequest
public static PasswordModifyExtendedRequest copyOfPasswordModifyExtendedRequest(PasswordModifyExtendedRequest request) Creates a new password modify extended request that is an exact copy of the provided request.- Parameters:
request- The password modify extended request to be copied.- Returns:
- The new password modify extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfPlainSASLBindRequest
Creates a new plain SASL bind request that is an exact copy of the provided request.- Parameters:
request- The plain SASL bind request to be copied.- Returns:
- The new Plain SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfSearchRequest
Creates a new search request that is an exact copy of the provided request.- Parameters:
request- The search request to be copied.- Returns:
- The new search request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfSimpleBindRequest
Creates a new simple bind request that is an exact copy of the provided request.- Parameters:
request- The simple bind request to be copied.- Returns:
- The new simple bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfStartTLSExtendedRequest
public static StartTLSExtendedRequest copyOfStartTLSExtendedRequest(StartTLSExtendedRequest request) Creates a new startTLS extended request that is an exact copy of the provided request.- Parameters:
request- The startTLS extended request to be copied.- Returns:
- The new start TLS extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfUnbindRequest
Creates a new unbind request that is an exact copy of the provided request.- Parameters:
request- The unbind request to be copied.- Returns:
- The new unbind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
copyOfWhoAmIExtendedRequest
Creates a new Who Am I extended request that is an exact copy of the provided request.- Parameters:
request- The who Am I extended request to be copied.- Returns:
- The new Who Am I extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
newAbandonRequest
Creates a new abandon request using the provided message ID.- Parameters:
requestID- The request ID of the request to be abandoned.- Returns:
- The new abandon request.
-
newAddRequest
Creates a new add request using the provided distinguished name.- Parameters:
name- The distinguished name of the entry to be added.- Returns:
- The new add request.
- Throws:
NullPointerException- Ifnamewasnull.
-
newAddRequest
Creates a new add request backed by the provided entry. Modifications made toentrywill be reflected in the returned add request. The returned add request supports updates to its list of controls, as well as updates to the name and attributes if the underlying entry allows.- Parameters:
entry- The entry to be added.- Returns:
- The new add request.
- Throws:
NullPointerException- Ifentrywasnull.
-
newAddRequest
Creates a new add request using the provided distinguished name decoded using the default schema.- Parameters:
name- The distinguished name of the entry to be added.- Returns:
- The new add request.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- Ifnamecould not be decoded using the default schema.NullPointerException- Ifnamewasnull.
-
newAddRequest
Creates a new add request using the provided lines of LDIF decoded using the default schema.- Parameters:
ldifLines- Lines of LDIF containing an LDIF add change record or an LDIF entry record.- Returns:
- The new add request.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- IfldifLineswas empty, or contained invalid LDIF, or could not be decoded using the default schema.NullPointerException- IfldifLineswasnull.
-
newAnonymousSASLBindRequest
Creates a new anonymous SASL bind request having the provided trace string.- Parameters:
traceString- The trace information, which has no semantic value, and can be used by administrators in order to identify the user.- Returns:
- The new anonymous SASL bind request.
- Throws:
NullPointerException- IftraceStringwasnull.
-
newCancelExtendedRequest
Creates a new cancel extended request using the provided message ID.- Parameters:
requestID- The request ID of the request to be abandoned.- Returns:
- The new cancel extended request.
-
newChangeRecord
Creates a new change record (an add, delete, modify, or modify DN request) using the provided lines of LDIF decoded using the default schema.- Parameters:
ldifLines- Lines of LDIF containing an LDIF change record or an LDIF entry record.- Returns:
- The new change record.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- IfldifLineswas empty, or contained invalid LDIF, or could not be decoded using the default schema.NullPointerException- IfldifLineswasnull.
-
newCompareRequest
public static CompareRequest newCompareRequest(DN name, AttributeDescription attributeDescription, Object assertionValue) Creates a new compare request using the provided distinguished name, attribute name, and assertion value.If the assertion value is not an instance of
ByteStringthen it will be converted using theByteString.valueOfObject(Object)method.- Parameters:
name- The distinguished name of the entry to be compared.attributeDescription- The name of the attribute to be compared.assertionValue- The assertion value to be compared.- Returns:
- The new compare request.
- Throws:
NullPointerException- Ifname,attributeDescription, orassertionValuewasnull.
-
newCompareRequest
public static CompareRequest newCompareRequest(String name, String attributeDescription, Object assertionValue) Creates a new compare request using the provided distinguished name, attribute name, and assertion value decoded using the default schema.If the assertion value is not an instance of
ByteStringthen it will be converted using theByteString.valueOfObject(Object)method.- Parameters:
name- The distinguished name of the entry to be compared.attributeDescription- The name of the attribute to be compared.assertionValue- The assertion value to be compared.- Returns:
- The new compare request.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- IfnameorattributeDescriptioncould not be decoded using the default schema.NullPointerException- Ifname,attributeDescription, orassertionValuewasnull.
-
newCRAMMD5SASLBindRequest
public static CRAMMD5SASLBindRequest newCRAMMD5SASLBindRequest(String authenticationID, byte[] password) Creates a new CRAM-MD5 SASL bind request having the provided authentication ID and password.- Parameters:
authenticationID- The authentication ID of the user. The authentication ID usually has the form "dn:" immediately followed by the distinguished name of the user, or "u:" followed by a user ID string, but other forms are permitted.password- The password of the user that the client wishes to bind as.- Returns:
- The new CRAM-MD5 SASL bind request.
- Throws:
NullPointerException- IfauthenticationIDorpasswordwasnull.
-
newCRAMMD5SASLBindRequest
public static CRAMMD5SASLBindRequest newCRAMMD5SASLBindRequest(String authenticationID, char[] password) Creates a new CRAM-MD5 SASL bind request having the provided authentication ID and password.- Parameters:
authenticationID- The authentication ID of the user. The authentication ID usually has the form "dn:" immediately followed by the distinguished name of the user, or "u:" followed by a user ID string, but other forms are permitted.password- The password of the user that the client wishes to bind as. The password will be converted to a UTF-8 octet string.- Returns:
- The new CRAM-MD5 SASL bind request.
- Throws:
NullPointerException- IfauthenticationIDorpasswordwasnull.
-
newDeleteRequest
Creates a new delete request using the provided distinguished name.- Parameters:
name- The distinguished name of the entry to be deleted.- Returns:
- The new delete request.
- Throws:
NullPointerException- Ifnamewasnull.
-
newDeleteRequest
Creates a new delete request using the provided distinguished name decoded using the default schema.- Parameters:
name- The distinguished name of the entry to be deleted.- Returns:
- The new delete request.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- Ifnamecould not be decoded using the default schema.NullPointerException- Ifnamewasnull.
-
newDigestMD5SASLBindRequest
public static DigestMD5SASLBindRequest newDigestMD5SASLBindRequest(String authenticationID, byte[] password) Creates a new DIGEST-MD5 SASL bind request having the provided authentication ID and password, but no realm or authorization ID.- Parameters:
authenticationID- The authentication ID of the user. The authentication ID usually has the form "dn:" immediately followed by the distinguished name of the user, or "u:" followed by a user ID string, but other forms are permitted.password- The password of the user that the client wishes to bind as.- Returns:
- The new DIGEST-MD5 SASL bind request.
- Throws:
NullPointerException- IfauthenticationIDorpasswordwasnull.
-
newDigestMD5SASLBindRequest
public static DigestMD5SASLBindRequest newDigestMD5SASLBindRequest(String authenticationID, char[] password) Creates a new DIGEST-MD5 SASL bind request having the provided authentication ID and password, but no realm or authorization ID.- Parameters:
authenticationID- The authentication ID of the user. The authentication ID usually has the form "dn:" immediately followed by the distinguished name of the user, or "u:" followed by a user ID string, but other forms are permitted.password- The password of the user that the client wishes to bind as. The password will be converted to a UTF-8 octet string.- Returns:
- The new DIGEST-MD5 SASL bind request.
- Throws:
NullPointerException- IfauthenticationIDorpasswordwasnull.
-
newExternalSASLBindRequest
Creates a new External SASL bind request with no authorization ID.- Returns:
- The new External SASL bind request.
-
newGenericBindRequest
public static GenericBindRequest newGenericBindRequest(byte authenticationType, byte[] authenticationValue) Creates a new generic bind request using an empty distinguished name, authentication type, and authentication information.- Parameters:
authenticationType- The authentication mechanism identifier for this generic bind request.authenticationValue- The authentication information for this generic bind request in a form defined by the authentication mechanism.- Returns:
- The new generic bind request.
- Throws:
NullPointerException- IfauthenticationValuewasnull.
-
newGenericBindRequest
public static GenericBindRequest newGenericBindRequest(String name, byte authenticationType, byte[] authenticationValue) Creates a new generic bind request using the provided name, authentication type, and authentication information.The LDAP protocol defines the Bind name to be a distinguished name, however some LDAP implementations have relaxed this constraint and allow other identities to be used, such as the user's email address.
- Parameters:
name- The name of the Directory object that the client wishes to bind as (may be empty).authenticationType- The authentication mechanism identifier for this generic bind request.authenticationValue- The authentication information for this generic bind request in a form defined by the authentication mechanism.- Returns:
- The new generic bind request.
- Throws:
NullPointerException- IfnameorauthenticationValuewasnull.
-
newGenericExtendedRequest
Creates a new generic extended request using the provided name and no value.- Parameters:
requestName- The dotted-decimal representation of the unique OID corresponding to this extended request.- Returns:
- The new generic extended request.
- Throws:
NullPointerException- IfrequestNamewasnull.
-
newGenericExtendedRequest
public static GenericExtendedRequest newGenericExtendedRequest(String requestName, Object requestValue) Creates a new generic extended request using the provided name and optional value.If the request value is not an instance of
ByteStringthen it will be converted using theByteString.valueOfObject(Object)method.- Parameters:
requestName- The dotted-decimal representation of the unique OID corresponding to this extended request.requestValue- The content of this generic extended request in a form defined by the extended operation, ornullif there is no content.- Returns:
- The new generic extended request.
- Throws:
NullPointerException- IfrequestNamewasnull.
-
newGSSAPISASLBindRequest
public static GSSAPISASLBindRequest newGSSAPISASLBindRequest(String authenticationID, byte[] password) Creates a new GSSAPI SASL bind request having the provided authentication ID and password, but no realm, KDC address, or authorization ID.- Parameters:
authenticationID- The authentication ID of the user. The authentication ID usually has the form "dn:" immediately followed by the distinguished name of the user, or "u:" followed by a user ID string, but other forms are permitted.password- The password of the user that the client wishes to bind as.- Returns:
- The new GSSAPI SASL bind request.
- Throws:
NullPointerException- IfauthenticationIDorpasswordwasnull.
-
newGSSAPISASLBindRequest
public static GSSAPISASLBindRequest newGSSAPISASLBindRequest(String authenticationID, char[] password) Creates a new GSSAPI SASL bind request having the provided authentication ID and password, but no realm, KDC address, or authorization ID.- Parameters:
authenticationID- The authentication ID of the user. The authentication ID usually has the form "dn:" immediately followed by the distinguished name of the user, or "u:" followed by a user ID string, but other forms are permitted.password- The password of the user that the client wishes to bind as. The password will be converted to a UTF-8 octet string.- Returns:
- The new GSSAPI SASL bind request.
- Throws:
NullPointerException- IfauthenticationIDorpasswordwasnull.
-
newGSSAPISASLBindRequest
Creates a new GSSAPI SASL bind request having the provided subject, but no authorization ID.- Parameters:
subject- The Kerberos subject of the user to be authenticated.- Returns:
- The new GSSAPI SASL bind request.
- Throws:
NullPointerException- Ifsubjectwasnull.
-
newModifyDNRequest
Creates a new modify DN request using the provided distinguished name and new RDN. The new superior will benull, indicating that the renamed entry will remain under the same parent entry, and the old RDN attribute values will not be deleted.- Parameters:
name- The distinguished name of the entry to be renamed.newRDN- The new RDN of the entry.- Returns:
- The new modify DN request.
- Throws:
NullPointerException- IfnameornewRDNwasnull.
-
newModifyDNRequest
Creates a new modify DN request using the provided distinguished name and new RDN decoded using the default schema. The new superior will benull, indicating that the renamed entry will remain under the same parent entry, and the old RDN attribute values will not be deleted.- Parameters:
name- The distinguished name of the entry to be renamed.newRDN- The new RDN of the entry.- Returns:
- The new modify DN request.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- IfnameornewRDNcould not be decoded using the default schema.NullPointerException- IfnameornewRDNwasnull.
-
newModifyRequest
Creates a new modify request using the provided distinguished name.- Parameters:
name- The distinguished name of the entry to be modified.- Returns:
- The new modify request.
- Throws:
NullPointerException- Ifnamewasnull.
-
newModifyRequest
Creates a new modify request containing a list of modifications which can be used to transformfromEntryinto entrytoEntry.The changes will be generated using a default set of
options. More specifically, only user attributes will be compared, attributes will be compared using their matching rules, and all generated changes will be reversible: it will contain only modifications of typeDELETEthenADD.Finally, the modify request will use the distinguished name taken from
fromEntry. Moreover, this method will not check to see if bothfromEntryandtoEntryhave the same distinguished name.This method is equivalent to:
ModifyRequest request = Entries.diffEntries(fromEntry, toEntry);
Or:ModifyRequest request = Entries.diffEntries(fromEntry, toEntry, Entries.diffOptions());
- Parameters:
fromEntry- The source entry.toEntry- The destination entry.- Returns:
- A modify request containing a list of modifications which can be
used to transform
fromEntryinto entrytoEntry. The returned request will always be non-nullbut may not contain any modifications. - Throws:
NullPointerException- IffromEntryortoEntrywerenull.- See Also:
-
newModifyRequest
Creates a new modify request using the provided distinguished name decoded using the default schema.- Parameters:
name- The distinguished name of the entry to be modified.- Returns:
- The new modify request.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- Ifnamecould not be decoded using the default schema.NullPointerException- Ifnamewasnull.
-
newModifyRequest
Creates a new modify request using the provided lines of LDIF decoded using the default schema.- Parameters:
ldifLines- Lines of LDIF containing a single LDIF modify change record.- Returns:
- The new modify request.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- IfldifLineswas empty, or contained invalid LDIF, or could not be decoded using the default schema.NullPointerException- IfldifLineswasnull.
-
newPasswordModifyExtendedRequest
Creates a new password modify extended request, with no user identity, old password, or new password.- Returns:
- The new password modify extended request.
-
newPlainSASLBindRequest
public static PlainSASLBindRequest newPlainSASLBindRequest(String authenticationID, byte[] password) Creates a new Plain SASL bind request having the provided authentication ID and password, but no authorization ID.- Parameters:
authenticationID- The authentication ID of the user. The authentication ID usually has the form "dn:" immediately followed by the distinguished name of the user, or "u:" followed by a user ID string, but other forms are permitted.password- The password of the user that the client wishes to bind as.- Returns:
- The new Plain SASL bind request.
- Throws:
NullPointerException- IfauthenticationIDorpasswordwasnull.
-
newPlainSASLBindRequest
public static PlainSASLBindRequest newPlainSASLBindRequest(String authenticationID, char[] password) Creates a new Plain SASL bind request having the provided authentication ID and password, but no authorization ID.- Parameters:
authenticationID- The authentication ID of the user. The authentication ID usually has the form "dn:" immediately followed by the distinguished name of the user, or "u:" followed by a user ID string, but other forms are permitted.password- The password of the user that the client wishes to bind as. The password will be converted to a UTF-8 octet string.- Returns:
- The new Plain SASL bind request.
- Throws:
NullPointerException- IfauthenticationIDorpasswordwasnull.
-
newSearchRequest
public static SearchRequest newSearchRequest(DN name, SearchScope scope, Filter filter, String... attributeDescriptions) Creates a new search request using the provided distinguished name, scope, and filter.- Parameters:
name- The distinguished name of the base entry relative to which the search is to be performed.scope- The scope of the search.filter- The filter that defines the conditions that must be fulfilled in order for an entry to be returned.attributeDescriptions- The names of the attributes to be included with each entry.- Returns:
- The new search request.
- Throws:
NullPointerException- If thename,scope, orfilterwerenull.
-
newSearchRequest
public static SearchRequest newSearchRequest(String name, SearchScope scope, String filter, String... attributeDescriptions) Creates a new search request using the provided distinguished name, scope, and filter, decoded using the default schema.- Parameters:
name- The distinguished name of the base entry relative to which the search is to be performed.scope- The scope of the search.filter- The filter that defines the conditions that must be fulfilled in order for an entry to be returned.attributeDescriptions- The names of the attributes to be included with each entry.- Returns:
- The new search request.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- Ifnamecould not be decoded using the default schema, or iffilteris not a valid LDAP string representation of a filter.NullPointerException- If thename,scope, orfilterwerenull.
-
newSingleEntrySearchRequest
public static SearchRequest newSingleEntrySearchRequest(DN name, SearchScope scope, Filter filter, String... attributeDescriptions) Creates a new search request for a single entry, using the provided distinguished name, scope, and filter.- Parameters:
name- The distinguished name of the base entry relative to which the search is to be performed.scope- The scope of the search.filter- The filter that defines the conditions that must be fulfilled in order for an entry to be returned.attributeDescriptions- The names of the attributes to be included with each entry.- Returns:
- The new search request.
- Throws:
NullPointerException- If thename,scope, orfilterwerenull.
-
newSingleEntrySearchRequest
public static SearchRequest newSingleEntrySearchRequest(String name, SearchScope scope, String filter, String... attributeDescriptions) Creates a new search request for a single entry, using the provided distinguished name, scope, and filter, decoded using the default schema.- Parameters:
name- The distinguished name of the base entry relative to which the search is to be performed.scope- The scope of the search.filter- The filter that defines the conditions that must be fulfilled in order for an entry to be returned.attributeDescriptions- The names of the attributes to be included with each entry.- Returns:
- The new search request.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- Ifnamecould not be decoded using the default schema, or iffilteris not a valid LDAP string representation of a filter.NullPointerException- If thename,scope, orfilterwerenull.
-
newSimpleBindRequest
Creates a new simple bind request having an empty name and password suitable for anonymous authentication.- Returns:
- The new simple bind request.
-
newSimpleBindRequest
Creates a new simple bind request having the provided name and password suitable for name/password authentication. The name will be decoded using the default schema.The LDAP protocol defines the Bind name to be a distinguished name, however some LDAP implementations have relaxed this constraint and allow other identities to be used, such as the user's email address.
- Parameters:
name- The name of the Directory object that the client wishes to bind as, which may be empty.password- The password of the Directory object that the client wishes to bind as, which may be empty indicating that an unauthenticated bind is to be performed.- Returns:
- The new simple bind request.
- Throws:
NullPointerException- Ifnameorpasswordwasnull.
-
newSimpleBindRequest
Creates a new simple bind request having the provided name and password suitable for name/password authentication. The name will be decoded using the default schema.The LDAP protocol defines the Bind name to be a distinguished name, however some LDAP implementations have relaxed this constraint and allow other identities to be used, such as the user's email address.
- Parameters:
name- The name of the Directory object that the client wishes to bind as, which may be empty.password- The password of the Directory object that the client wishes to bind as, which may be empty indicating that an unauthenticated bind is to be performed. The password will be converted to a UTF-8 octet string.- Returns:
- The new simple bind request.
- Throws:
NullPointerException- Ifnameorpasswordwasnull.
-
newStartTLSExtendedRequest
Creates a new start TLS extended request which will use the provided SSL context.- Parameters:
sslContext- The SSLContext that should be used when installing the TLS layer.- Returns:
- The new start TLS extended request.
- Throws:
NullPointerException- IfsslContextwasnull.
-
newUnbindRequest
Creates a new unbind request.- Returns:
- The new unbind request.
-
newWhoAmIExtendedRequest
Creates a new Who Am I extended request.- Returns:
- The new Who Am I extended request.
-
unmodifiableAbandonRequest
Creates an unmodifiable abandon request of the provided request.- Parameters:
request- The abandon request to be copied.- Returns:
- The new abandon request.
- Throws:
NullPointerException- Ifrequestwasnull
-
unmodifiableAddRequest
Creates an unmodifiable add request of the provided request.- Parameters:
request- The add request to be copied.- Returns:
- The new add request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableAnonymousSASLBindRequest
public static AnonymousSASLBindRequest unmodifiableAnonymousSASLBindRequest(AnonymousSASLBindRequest request) Creates an unmodifiable anonymous SASL bind request of the provided request.- Parameters:
request- The anonymous SASL bind request to be copied.- Returns:
- The new anonymous SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableCancelExtendedRequest
public static CancelExtendedRequest unmodifiableCancelExtendedRequest(CancelExtendedRequest request) Creates an unmodifiable cancel extended request of the provided request.- Parameters:
request- The cancel extended request to be copied.- Returns:
- The new cancel extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableCompareRequest
Creates an unmodifiable compare request of the provided request.- Parameters:
request- The compare request to be copied.- Returns:
- The new compare request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableCRAMMD5SASLBindRequest
public static CRAMMD5SASLBindRequest unmodifiableCRAMMD5SASLBindRequest(CRAMMD5SASLBindRequest request) Creates an unmodifiable CRAM MD5 SASL bind request of the provided request.The returned bind request creates defensive copies of the password in order to maintain immutability.
- Parameters:
request- The CRAM MD5 SASL bind request to be copied.- Returns:
- The new CRAM-MD5 SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableDeleteRequest
Creates an unmodifiable delete request of the provided request.- Parameters:
request- The add request to be copied.- Returns:
- The new delete request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableDigestMD5SASLBindRequest
public static DigestMD5SASLBindRequest unmodifiableDigestMD5SASLBindRequest(DigestMD5SASLBindRequest request) Creates an unmodifiable digest MD5 SASL bind request of the provided request.The returned bind request creates defensive copies of the password in order to maintain immutability.
- Parameters:
request- The digest MD5 SASL bind request to be copied.- Returns:
- The new DIGEST-MD5 SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableExternalSASLBindRequest
public static ExternalSASLBindRequest unmodifiableExternalSASLBindRequest(ExternalSASLBindRequest request) Creates an unmodifiable external SASL bind request of the provided request.- Parameters:
request- The external SASL bind request to be copied.- Returns:
- The new External SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableGenericBindRequest
Creates an unmodifiable generic bind request of the provided request.The returned bind request creates defensive copies of the authentication value in order to maintain immutability.
- Parameters:
request- The generic bind request to be copied.- Returns:
- The new generic bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableGenericExtendedRequest
public static GenericExtendedRequest unmodifiableGenericExtendedRequest(GenericExtendedRequest request) Creates an unmodifiable generic extended request of the provided request.- Parameters:
request- The generic extended request to be copied.- Returns:
- The new generic extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableGSSAPISASLBindRequest
public static GSSAPISASLBindRequest unmodifiableGSSAPISASLBindRequest(GSSAPISASLBindRequest request) Creates an unmodifiable GSSAPI SASL bind request of the provided request.The returned bind request creates defensive copies of the password in order to maintain immutability.
- Parameters:
request- The GSSAPI SASL bind request to be copied.- Returns:
- The new GSSAPI SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableModifyDNRequest
Creates an unmodifiable modify DN request of the provided request.- Parameters:
request- The modify DN request to be copied.- Returns:
- The new modify DN request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableModifyRequest
Creates an unmodifiable modify request of the provided request.- Parameters:
request- The modify request to be copied.- Returns:
- The new modify request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiablePasswordModifyExtendedRequest
public static PasswordModifyExtendedRequest unmodifiablePasswordModifyExtendedRequest(PasswordModifyExtendedRequest request) Creates an unmodifiable password modify extended request of the provided request.- Parameters:
request- The password modify extended request to be copied.- Returns:
- The new password modify extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiablePlainSASLBindRequest
Creates an unmodifiable plain SASL bind request of the provided request.The returned bind request creates defensive copies of the password in order to maintain immutability.
- Parameters:
request- The plain SASL bind request to be copied.- Returns:
- The new Plain SASL bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableSearchRequest
Creates an unmodifiable search request of the provided request.- Parameters:
request- The search request to be copied.- Returns:
- The new search request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableSimpleBindRequest
Creates an unmodifiable simple bind request of the provided request.The returned bind request creates defensive copies of the password in order to maintain immutability.
- Parameters:
request- The simple bind request to be copied.- Returns:
- The new simple bind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableStartTLSExtendedRequest
public static StartTLSExtendedRequest unmodifiableStartTLSExtendedRequest(StartTLSExtendedRequest request) Creates an unmodifiable startTLS extended request of the provided request.- Parameters:
request- The startTLS extended request to be copied.- Returns:
- The new start TLS extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableUnbindRequest
Creates an unmodifiable unbind request of the provided request.- Parameters:
request- The unbind request to be copied.- Returns:
- The new unbind request.
- Throws:
NullPointerException- Ifrequestwasnull.
-
unmodifiableWhoAmIExtendedRequest
public static WhoAmIExtendedRequest unmodifiableWhoAmIExtendedRequest(WhoAmIExtendedRequest request) Creates an unmodifiable new Who Am I extended request of the provided request.- Parameters:
request- The who Am I extended request to be copied.- Returns:
- The new Who Am I extended request.
- Throws:
NullPointerException- Ifrequestwasnull.
-