Class Indication
- java.lang.Object
-
- com.isode.dsapi.Indication
-
- All Implemented Interfaces:
SWIG_DSAPIConstants
,java.lang.Iterable<Entry>
public class Indication extends java.lang.Object implements SWIG_DSAPIConstants, java.lang.Iterable<Entry>
An Indication contains information about a directory operation. Indications are returned by the class library; they cannot be created by a user application.Indication objects may contain:
- an
errorType
and, optionally, anerrorValue
which represent the result of the operation. - for LDAP operations, the Indication may contain extra
supplementary text
returned by the server - information about whether a read or search
was subject to some kind of
limit
Password Policy Status
, if this was returned by the directory- for a
compare
operation, theresult
of the comparison - In the case of a successful
read
orsearch
operation, one or moreEntry
objects, as well as zero or morereferral
objects representing reference or referrals returned by the directory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Indication.PasswordPolicyResponse
A convenience class which contains any information from a password policy response that was returned as part of the Indication from a directory server.static class
Indication.PasswordPolicyStatus
Values that may be returned from a call to getPasswordPolicyErrorCode.
-
Field Summary
Fields Modifier and Type Field Description static int
AdminLimitExceeded
Value returned by getLimitProblem() to indicate that an administrative limit was reached.static int
NoLimitProblem
Value returned by getLimitProblem() to indicate that all results were received.static int
SizeLimitExceeded
Value returned by getLimitProblem() to indicate that a size limit was reached.static int
TimeLimitExceeded
Value returned by getLimitProblem() to indicate that a time limit was reached-
Fields inherited from interface com.isode.dsapi.SWIG_DSAPIConstants
DS_BOOL_TYPE, DS_BYTES_TYPE, DS_E_AB_CANNOTABANDON, DS_E_AB_NOSUCHOPERATION, DS_E_AB_TOOLATE, DS_E_ABANDONED, DS_E_ABANDONFAILED, DS_E_ABORTED, DS_E_AT_CONSTRAINTVIOLATION, DS_E_AT_INAPPROPRIATEMATCHING, DS_E_AT_INVALIDATTRIBUTESYNTAX, DS_E_AT_NOSUCHATTRIBUTE, DS_E_AT_TYPEORVALUEEXISTS, DS_E_AT_UNDEFINEDATTRIBUTETYPE, DS_E_ATTRIBUTE, DS_E_BADADDR, DS_E_BADATTRSYNTAX, DS_E_BADATTRTYPE, DS_E_BADATTRVALUE, DS_E_BADDN, DS_E_BADENTRY, DS_E_BADFILTER, DS_E_BADPARAM, DS_E_CONNECTIONLOST, DS_E_DSAREFERRAL, DS_E_DSOPFAILED, DS_E_INTERNAL, DS_E_LOCAL, DS_E_NAME, DS_E_NAME_ALIASDEREFERENCE, DS_E_NAME_ALIASPROBLEM, DS_E_NAME_INVALIDATTRIBUTESYNTAX, DS_E_NAME_NOSUCHOBJECT, DS_E_NOERROR, DS_E_NOINFO, DS_E_NOMEMORY, DS_E_NOSPACE, DS_E_NOTBOUND, DS_E_NOTFOUND, DS_E_NOTIMPLEMENTED, DS_E_OPFAILED, DS_E_REFERRAL, DS_E_REMOTE, DS_E_SEC_ACCESSRIGHTS, DS_E_SEC_AUTHENTICATION, DS_E_SEC_INVALIDCREDENTIALS, DS_E_SEC_INVALIDSIGNATURE, DS_E_SEC_NOINFORMATION, DS_E_SEC_PROTECTIONREQUIRED, DS_E_SECURITY, DS_E_SERVICE, DS_E_SIGNEDOPFAILED, DS_E_SUCCESS, DS_E_SVC_ADMINISTRATIVELIMITEXCEEDED, DS_E_SVC_BUSY, DS_E_SVC_CHAININGREQUIRED, DS_E_SVC_DITERROR, DS_E_SVC_INVALIDQUERYREFERENCE, DS_E_SVC_INVALIDREFERENCE, DS_E_SVC_LOOPDETECTED, DS_E_SVC_OUTOFSCOPE, DS_E_SVC_TIMELIMITEXCEEDED, DS_E_SVC_UNABLETOPROCEED, DS_E_SVC_UNAVAILABLE, DS_E_SVC_UNAVAILABLECRITICALEXTENSION, DS_E_SVC_UNWILLINGTOPERFORM, DS_E_UNKNOWN, DS_E_UPD_AFFECTSMULTIPLEDSAS, DS_E_UPD_ALREADYEXISTS, DS_E_UPD_NAMINGVIOLATION, DS_E_UPD_NOOBJECTCLASSMODS, DS_E_UPD_NOTONNONLEAF, DS_E_UPD_NOTONRDN, DS_E_UPD_OBJECTCLASSVIOLATION, DS_E_UPDATE, DS_E_X509, DS_E_X509_RESULTSDISCARDED, DS_EXT_OPT_MANAGEDSAIT, DS_EXT_OPT_USEALIASONUPDATE, DS_INT_TYPE, DS_PARAM_TYPE_MASK, DS_PP_ACCOUNT_LOCKED, DS_PP_CHANGE_AFTER_RESET, DS_PP_INSUFFICIENT_PASSWORD_QUALITY, DS_PP_MUST_SUPPLY_OLD_PASSWORD, DS_PP_NO_ERROR, DS_PP_PASSWORD_EXPIRED, DS_PP_PASSWORD_IN_HISTORY, DS_PP_PASSWORD_MOD_NOT_ALLOWED, DS_PP_PASSWORD_TOO_SHORT, DS_PP_PASSWORD_TOO_YOUNG, DS_SASL_BEST_SSF, DS_SEC_DISABLEVERIFICATION, DS_SEC_ENCRYPTED, DS_SEC_SIGNED, DS_STR_TYPE, DS_SVC_OPT_ATTRSONLY, DS_SVC_OPT_CHAININGPROHIBIT, DS_SVC_OPT_COPYSHALLDO, DS_SVC_OPT_DONTDEREFALIAS, DS_SVC_OPT_DONTUSECOPY, DS_SVC_OPT_LOCALSCOPE, DS_SVC_OPT_PAGESIZE, DS_SVC_OPT_PREFERCHAIN, DS_SVC_OPT_SEARCHALIASES, DS_SVC_OPT_SUBENTRIES, DS_SVC_OPT_TXNID, DS_SVC_PASSWORDPOLICY, DS_SVC_PRIORITY, DS_SVC_SIZELIMIT, DS_SVC_TIMELIMIT, DSActionAbort, DSActionContinue, DSAnonymous, DSAPI_VERSION, DSConnectionAnonymous, DSConnectionBound, DSConnectionLost, DSConnectionSasl, DSConnectionSimple, DSConnectionStrong, DSEntryAdd, DSEntryDelete, DSEntryModify, DSEntryNormal, DSEntryRename, DSLimitAdminLimitExceeded, DSLimitNoProblem, DSLimitSizeExceeded, DSLimitTimeExceeded, DSModAdd, DSModDelete, DSModReplace, DSNotYetConnected, DSSASL, DSScopeBaseObject, DSScopeOneLevel, DSScopeSubtree, DSSimple, DSStrong, DSUnbound, DSVerificationFailed, JAVADSAPI_VERSION
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
compareMatched()
Determine whether an Indication returned from a compare operation shows that a match was successful.protected void
finalize()
Releases any native structures associated with this object.DirectorySession
getDirectorySession()
Determine the DirectorySession associated with this IndicationDN
getDN()
Determine the DN (if any) that relates to this Indication.Entry
getEntry(int index)
Return a specific Entry from the Indicationint
getEntryCount()
Return a count of the set of entries contained in the operation outcome.int
getErrorType()
Returns the value of the "error type" field for this Indication.int
getErrorValue()
Returns the value of the "error value" field for this Indication.java.lang.String
getExtraErrorText()
Determine the extra error text (if any) associated with this Indication.int
getLimitProblem()
Returns a value to indicate what, if anything, limited the results in this set.java.lang.String
getLimitProblemText()
Get user-friendly string corresponding to the limit problem, if any.boolean
getNextResultsPage()
Update the Indication with the next set of paged results.java.lang.String
getOperation()
Determine the operation which returned this Indication.java.lang.String
getOperationAndDN()
Return a String representing the operation (and DN if possible) that resulted in this Indication.int
getPasswordPolicyExpiryWarning()
Determine the expiry time of the current account's password.int
getPasswordPolicyGraceWarning()
Determine the number of grace authentications left for the current account's password.Indication.PasswordPolicyResponse
getPasswordPolicyResponse()
Returns any information related to a password policy response associated with this Indication in a single object.Indication.PasswordPolicyStatus
getPasswordPolicyStatus()
Determine the error relating to the current account's password.Referral
getReference(int index)
Return a specific continuation reference from the Indicationint
getReferenceCount()
Return a count of the set of continuation references contained in the operation outcome.Referral
getReferral(int index)
Return a specific referral from the Indicationint
getReferralCount()
Return a count of the set of referrals contained in the operation outcome.java.util.List<java.lang.String>
getRestrictionWarnings()
Check to see if the results have been subject to some kind of limit, and if so return a list of strings describing those limits.java.util.List<java.lang.String>
getRestrictionWarnings(java.util.List<DN> chop)
Check to see if the results have been subject to some kind of limit, and if so return a list of strings describing those limits.int
getTxnEndResult()
Return result codefrom an Indication from a TxnEndbyte[]
getTxnStartResult()
Return transaction ID from an Indication from a TxnStartboolean
hasContinuationReferences()
Determine whether this Indication contains any continuation references.boolean
hasDSASignatureVerificationError()
Determine whether there was a DSA signature verification failure whilst obtaining any of the results requested in the operation that generated this Indication.boolean
hasDUASignatureVerificationError()
Determine whether there was a DUA signature verification failure on the operation sent to the DSA.boolean
hasLimitProblem()
Determines whether this indication was constrained by some limit problem.boolean
hasMorePagedResults()
Determine whether more pages are available for a paged-results search.boolean
isPagedResultsIndication()
Determine whether this Indication relates to a search that requested paged results.boolean
isReferral()
Determine whether this Indication represents a referral error.java.util.Iterator<Entry>
iterator()
Returns an iterator over the entries in this Indicationvoid
nextPagedResultsPage()
Update the Indication with the next set of paged results.java.util.Iterator<Referral>
referenceIterator()
Returns an iterator over the continuation references in this Indicationjava.util.Iterator<Referral>
referralIterator()
Returns an iterator over the referrals in this Indicationvoid
sortByDN()
Sort the entries in the indication by DN.java.lang.String
toString()
A user-friendly String representation of an Indication, which contains as much information about it as possible.
-
-
-
Field Detail
-
NoLimitProblem
public static final int NoLimitProblem
Value returned by getLimitProblem() to indicate that all results were received.- See Also:
- Constant Field Values
-
TimeLimitExceeded
public static final int TimeLimitExceeded
Value returned by getLimitProblem() to indicate that a time limit was reached- See Also:
- Constant Field Values
-
SizeLimitExceeded
public static final int SizeLimitExceeded
Value returned by getLimitProblem() to indicate that a size limit was reached.- See Also:
- Constant Field Values
-
AdminLimitExceeded
public static final int AdminLimitExceeded
Value returned by getLimitProblem() to indicate that an administrative limit was reached.- See Also:
- Constant Field Values
-
-
Method Detail
-
finalize
protected void finalize() throws java.lang.Throwable
Releases any native structures associated with this object.- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
toString
public java.lang.String toString() throws NativeLibraryException
A user-friendly String representation of an Indication, which contains as much information about it as possible. This is primarily useful for debugging.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String representation of the Indication
- Throws:
NativeLibraryException
- if an unrecoverable error was detected by the native library
-
getOperationAndDN
public java.lang.String getOperationAndDN()
Return a String representing the operation (and DN if possible) that resulted in this Indication. In no DN is present, then the method simply returns the operation name. Example values returned could beRead(cn=jim,c=gb)
orModify(<root>)
orAnonymous Bind
.- Returns:
- a String containing the operation and DN, if applicable, for this indication
-
getLimitProblem
public int getLimitProblem() throws NativeLibraryException
Returns a value to indicate what, if anything, limited the results in this set. The value returned will be one of- Indication.NoLimitProblem
- Indication.TimeLimitExceeded
- Indication.SizeLimitExceeded
- Indication.AdminLimitExceeded
- Returns:
- an integer value.
- Throws:
NativeLibraryException
- if an unrecoverable error was detected by the native library
-
compareMatched
public boolean compareMatched() throws NativeLibraryException
Determine whether an Indication returned from a compare operation shows that a match was successful.- Returns:
- true if this object represents an Indication returned by a call DirectorySession.compare() where the specified value exists in the directory. If the directory indicated that there was no such value, or if this Indication was not returned by a compare operation, then false will be returned.
- Throws:
NativeLibraryException
- if an unrecoverable error was detected by the native library.- See Also:
DirectorySession.compare(DN, Attribute, CommonArgs)
-
getEntryCount
public int getEntryCount()
Return a count of the set of entries contained in the operation outcome. Only read and search operations return entries, so it only makes sense to use this call for Indication objects returned from reads or searches.- Returns:
- the number of entries (will be zero for an Indication object that does not represent a read or a search).
-
getReferenceCount
public int getReferenceCount()
Return a count of the set of continuation references contained in the operation outcome. Only read and search operations return continuation references, so it only makes sense to use this call for Indication objects returned from searches.- Returns:
- the number of continuation references (which will be zero for an Indication object that does not represent a search).
-
getReferralCount
public int getReferralCount()
Return a count of the set of referrals contained in the operation outcome. This will only be non-zero when the Indication represents an operation which failed with a referral error.- Returns:
- the number of referrals (which will be zero for an Indication object that does not represent an operation which failed with a ReferralException).
- See Also:
ReferralException
-
hasLimitProblem
public boolean hasLimitProblem() throws NativeLibraryException
Determines whether this indication was constrained by some limit problem.- Returns:
- true if the results for this indication were constrained by a limit, false otherwise.
- Throws:
NativeLibraryException
- if an unrecoverable error was detected by the native library- See Also:
getLimitProblem()
-
getEntry
public Entry getEntry(int index) throws java.lang.ArrayIndexOutOfBoundsException
Return a specific Entry from the Indication- Parameters:
index
- the index of the Entry to be returned (starting from zero)- Returns:
- an Entry
- Throws:
java.lang.ArrayIndexOutOfBoundsException
- if index is greater than or equal to the value returned by getEntryCount().
-
getReference
public Referral getReference(int index) throws java.lang.ArrayIndexOutOfBoundsException
Return a specific continuation reference from the Indication- Parameters:
index
- the index of the reference to be returned (starting from zero)- Returns:
- a Referral object containing information about the specified continuation reference
- Throws:
java.lang.ArrayIndexOutOfBoundsException
- if index is greater than or equal to the value returned by getReferenceCount().
-
getReferral
public Referral getReferral(int index) throws java.lang.ArrayIndexOutOfBoundsException
Return a specific referral from the Indication- Parameters:
index
- the index of the referral to be returned (starting from zero)- Returns:
- a Referral object containing information about the specified referral
- Throws:
java.lang.ArrayIndexOutOfBoundsException
- if index is greater than or equal to the value returned by getReferralCount().
-
iterator
public java.util.Iterator<Entry> iterator()
Returns an iterator over the entries in this Indication- Specified by:
iterator
in interfacejava.lang.Iterable<Entry>
- Returns:
- an iterator that can be used to process all the entries in this Indication
-
referenceIterator
public java.util.Iterator<Referral> referenceIterator()
Returns an iterator over the continuation references in this Indication- Returns:
- an iterator that can be used to process all the continuation references in this Indication
-
referralIterator
public java.util.Iterator<Referral> referralIterator()
Returns an iterator over the referrals in this Indication- Returns:
- an iterator that can be used to process all the referrals in this Indication
-
getErrorType
public int getErrorType()
Returns the value of the "error type" field for this Indication.The table below shows the values (defined in
SWIG_DSAPIConstants
) that may be returned by this method; in cases noted, the value returned bygetErrorValue()
will provide supplementary information.The
IndicationException.getErrorTypeString(int)
method can be used to obtain textual versions of error types.DS_E_ATTRIBUTE
Attribute error. Will be accompanied by a DS_E_AT_xxxx error value DS_E_NAME
Name error. Will be accompanied by a DS_E_NAME_xxxx error value DS_E_SERVICE
Service error. Will be accompanied by a DS_E_SVC_xxxx error value DS_E_REFERRAL
Referral error. DS_E_ABANDONED
Operation abandoned error. DS_E_SECURITY
Security error. Will be accompanied by a DS_E_SEC_xxxx error value DS_E_ABANDONFAILED
Abandon failed error. Will be accompanied by a DS_E_AB_xxxx error value DS_E_UPDATE
Update error. Will be accompanied by a DS_E_UPD_xxxx error value DS_E_DSAREFERRAL
DSA referral error. DS_E_LOCAL
Unknown local error. DS_E_REMOTE
Unknown remote error. DS_E_UNKNOWN
Unknown error. DS_E_X509
Error detected by X509 library. Will be accompanied by a DS_E_X509_xxxx error value - Returns:
- error type
- See Also:
IndicationException.getErrorTypeString(int)
-
getErrorValue
public int getErrorValue()
Returns the value of the "error value" field for this Indication.The table below shows the values (defined in
SWIG_DSAPIConstants
) which may be returned by this method:- Returns:
- error value
- See Also:
IndicationException.getErrorValueString(int)
-
hasDSASignatureVerificationError
public boolean hasDSASignatureVerificationError()
Determine whether there was a DSA signature verification failure whilst obtaining any of the results requested in the operation that generated this Indication. This only tests for indications of bad signatures received from the DSAs involved in the operation.- Returns:
- true if this Indication is associated with a signed operation which reported an error on DSA signature verification, false if no such error was reported, or if the associated operation was not signed.
-
hasDUASignatureVerificationError
public boolean hasDUASignatureVerificationError()
Determine whether there was a DUA signature verification failure on the operation sent to the DSA. This means that the DSA rejected our signature and refused to perform the operation.- Returns:
- true if this Indication is associated with a signed operation which failed due to the DSA rejecting our signature, or otherwise false
-
getOperation
public java.lang.String getOperation()
Determine the operation which returned this Indication.- Returns:
- the name of the operation which returned this indication (such as "Read", "Modify", etc.).
-
getDN
public DN getDN()
Determine the DN (if any) that relates to this Indication. For an Add, Delete, Modify, Read, this will be the DN of the entry that was read. For a Search it will be the base DN of the search. for a Rename, it will be the DN of the entry being renamed. There may be no DN associated with the operation, so callers should check for a null return.- Returns:
- the DN (which may be null) that relates to the operation which resulted in this indication.
-
hasContinuationReferences
public boolean hasContinuationReferences()
Determine whether this Indication contains any continuation references.- Returns:
- true if there are some continuation references in this Indication, false otherwise.
-
isReferral
public boolean isReferral()
Determine whether this Indication represents a referral error.- Returns:
- true if this indication corresponds with an operation that resulted in a referral, false otherwise.
-
sortByDN
public void sortByDN()
Sort the entries in the indication by DN. This gives a heirarchical sorted order, parents before children, in order of RDN type and value.
-
getPasswordPolicyResponse
public Indication.PasswordPolicyResponse getPasswordPolicyResponse()
Returns any information related to a password policy response associated with this Indication in a single object. If no such information was returned by the server, then this method returns null.- Returns:
- a PasswordPolicyResponse object, or null if no password policy response information was returned.
- See Also:
getPasswordPolicyStatus()
,getPasswordPolicyExpiryWarning()
,getPasswordPolicyGraceWarning()
-
getPasswordPolicyExpiryWarning
public int getPasswordPolicyExpiryWarning()
Determine the expiry time of the current account's password.This method returns -1 if the Indication does not contain the requested information: this may be because the requesting operation did not use the ReadPasswordPolicy flag in the CommonArgs, or if the directory was not willing or able to return the information.
- Returns:
- an integer value representing the number of seconds remaining before the current password expires, or a value of -1 to indicate that no such information was contained in the Indication.
- See Also:
getPasswordPolicyResponse()
,CommonArgs.setRequestPasswordPolicy(boolean)
-
getPasswordPolicyGraceWarning
public int getPasswordPolicyGraceWarning()
Determine the number of grace authentications left for the current account's password. The value returned indicates the remaining number of times a user will be able to authenticate with an expired password.This method will return -1 if the Indication does not contain the requested information: this may be because the requesting operation did not use the ReadPasswordPolicy flag in the CommonArgs, or if the directory was not willing or able to return the information.
- Returns:
- an integer value representing the number of grace authentications remaining; a value of -1 indicates that no such information was contained in the Indication.
- See Also:
getPasswordPolicyResponse()
,CommonArgs.setRequestPasswordPolicy(boolean)
-
getPasswordPolicyStatus
public Indication.PasswordPolicyStatus getPasswordPolicyStatus()
Determine the error relating to the current account's password.This method returns null if the Indication does not contain the requested information: this may be because the requesting operation did not use the ReadPasswordPolicy flag in the CommonArgs, or if the directory was not willing or able to return the information.
- Returns:
- a PasswordPolicyStatus representing the status returned by the directory, or null if no such information was contained in the Indication.
- See Also:
getPasswordPolicyResponse()
,CommonArgs.setRequestPasswordPolicy(boolean)
-
getExtraErrorText
public java.lang.String getExtraErrorText() throws NativeLibraryException
Determine the extra error text (if any) associated with this Indication. Certain directory operations may return supplementary error text (specifically, responses to LDAP operations may contain a text string containing extra information from the directory server).- Returns:
- a String with supplementary text about this operation (which will be null if no such text is available).
- Throws:
NativeLibraryException
- if an unrecoverable error was detected by the native library
-
getDirectorySession
public DirectorySession getDirectorySession()
Determine the DirectorySession associated with this Indication- Returns:
- the DirectorySession associated with this Indication.
- Since:
- 14.4
-
hasMorePagedResults
public boolean hasMorePagedResults() throws NativeLibraryException
Determine whether more pages are available for a paged-results search.For an Indication which is being used to process a series of paged results, this method can be used to determine whether the server has indicated that not all results have yet been returned (i.e. that it is worth calling
nextPagedResultsPage()
).- Returns:
- true if this is an Indication for a paged results request that has more results still to be read from the server, false otherwise.
- Throws:
NativeLibraryException
- if an unrecoverable error was detected by the native library- Since:
- 14.4
- See Also:
nextPagedResultsPage()
,DirectorySession.search(DN, String, int, Selection, CommonArgs, int)
-
getTxnStartResult
public byte[] getTxnStartResult() throws NativeLibraryException
Return transaction ID from an Indication from a TxnStartIf the last operation was to start a transaction, this returns the transaction ID.
- Returns:
- byte[] Transaction ID.
- Throws:
NativeLibraryException
- if an unrecoverable error was detected by the native library- Since:
- 14.4
- See Also:
nextPagedResultsPage()
,DirectorySession.search(DN, String, int, Selection, CommonArgs, int)
-
getTxnEndResult
public int getTxnEndResult() throws NativeLibraryException
Return result codefrom an Indication from a TxnEndIf the last operation was to end a transaction, this returns the result code.
- Returns:
- int result code.
- Throws:
NativeLibraryException
- if an unrecoverable error was detected by the native library- Since:
- 14.4
-
nextPagedResultsPage
public void nextPagedResultsPage() throws OperationFailedException, NotBoundException, SignedOpFailedException, DirectoryOperationFailedException, NoMorePagedResultsException
Update the Indication with the next set of paged results.For an Indication which is being used to process a series of paged results, this method requests that the server return the next page of results. The Indication object will be updated to contain the next set of results (and any previous results will be discarded).
In the case of an error, any previous entries in the Indication will be lost.
For an alternative version of this method which does not throw an exception when no more pages are available, use
getNextResultsPage()
- Throws:
OperationFailedException
- if this Indication is not one that was returned by a paged-results search.NoMorePagedResultsException
- if no more paged results are available.NotBoundException
- if the DirectorySession corresponding to this Indication is no longer bound.SignedOpFailedException
- if for a signed operation, an error occurred when attempting to sign the request.DirectoryOperationFailedException
- if the operation was sent to the directory, and the directory returned an "operation failed" status with no extra indication or information.NativeLibraryException
- if an unrecoverable error was detected by the native library- Since:
- 14.4
- See Also:
hasMorePagedResults()
,isPagedResultsIndication()
,DirectorySession.search(DN, String, int, Selection, CommonArgs, int)
,getNextResultsPage()
-
getNextResultsPage
public boolean getNextResultsPage() throws OperationFailedException, NotBoundException, SignedOpFailedException, DirectoryOperationFailedException
Update the Indication with the next set of paged results.For an Indication which is being used to process a series of paged results, this method requests that the server return the next page of results. The Indication object will be updated to contain the next set of results (and any previous results will be discarded).
In the case of an error, any previous entries in the Indication will be lost.
For an alternative version of this method which will throw an exception when no more pages are available, use
nextPagedResultsPage()
- Returns:
- true if the next page of results was returned, false if no more pages are available.
- Throws:
OperationFailedException
- if this Indication is not one that was returned by a paged-results search.NotBoundException
- if the DirectorySession corresponding to this Indication is no longer bound.SignedOpFailedException
- if for a signed operation, an error occurred when attempting to sign the request.DirectoryOperationFailedException
- if the operation was sent to the directory, and the directory returned an "operation failed" status with no extra indication or information.NativeLibraryException
- if an unrecoverable error was detected by the native library- Since:
- 14.6
-
isPagedResultsIndication
public boolean isPagedResultsIndication()
Determine whether this Indication relates to a search that requested paged results. Note that the value returned by this method does not take into account whether the server was able/willing to honour the request.- Returns:
- true if the search that returned this Indication requested paged results, false otherwise.
- Since:
- 14.4
- See Also:
DirectorySession.search(DN, String, int, Selection, CommonArgs, int)
,nextPagedResultsPage()
-
getRestrictionWarnings
public java.util.List<java.lang.String> getRestrictionWarnings()
Check to see if the results have been subject to some kind of limit, and if so return a list of strings describing those limits. The checks made are for a result set that has been constrained by a size/admin/time limit, and for the case when some results have been discarded from a signed search operation because the X.509 library was unable to verify their signature.- Returns:
- a list of Strings each of which describes a reason that has caused the results to be constrained in some way. The method will return null if no such problems occurred.
- Since:
- 14.6
-
getRestrictionWarnings
public java.util.List<java.lang.String> getRestrictionWarnings(java.util.List<DN> chop)
Check to see if the results have been subject to some kind of limit, and if so return a list of strings describing those limits. The checks made are for a result set that has been constrained by a size/admin/time limit, and for the case when some results have been discarded from a signed search operation because the X.509 library was unable to verify their signature.- Parameters:
chop
- List of DNs to ignore, or null if not required; this affects reference warnings, omitting them if they are not relevant due to the DN being a chop point- Returns:
- a list of Strings each of which describes a reason that has caused the results to be constrained in some way. The method will return null if no such problems occurred.
- Since:
- 14.6
-
getLimitProblemText
public java.lang.String getLimitProblemText()
Get user-friendly string corresponding to the limit problem, if any.- Returns:
- String corresponding to the limit problem if there is one, null if there is no limit problem
- Since:
- 15.0
-
-