Project Aristotle - ArisID Attribute Services

org.openliberty.arisid
Interface ISearchInteraction

All Superinterfaces:
IInteraction
All Known Implementing Classes:
Interaction

public interface ISearchInteraction
extends IInteraction

An interaction used to search for one or more subjects in an ArisID Service.


Method Summary
 IResultSet doSearch(java.util.List<IAttributeValue> attrFilterVals, java.util.Map<java.lang.String,IPolicy> dynamicConstraintsMap, javax.security.auth.Subject user)
          The search operation can be used for reporting purposes to locate a set of subjects that match a particular condition.
 IResultSet doSearch(java.util.List<IAttributeValue> attrFilterVals, javax.security.auth.Subject user)
          The search operation can be used for reporting purposes to locate a set of subjects that match a particular condition.
 int getMaxReturns()
          Gets the maximum count of subjects that the client expects to process.
 int getPageSize()
          Preferred page size for those service providers that can optimize traffic and buffering.
 boolean isSearch()
           
 
Methods inherited from interface org.openliberty.arisid.IInteraction
appendNode, getAttributeDef, getAttributeIds, getAttributePolicyDef, getAttributeRef, getAttributeRefs, getAttributeService, getDescription, getEntityName, getFilter, getInteractionPolicyDef, getNameId, getOperationType, getPredicateDef, getPredicateIds, getPredicatePolicyDef, getPredicateRef, getPredicateRefs, getRoleDef, getRoleIds, getRolePolicyDef, getRoleRef, getRoleRefs, getTransactionPolicy, isAdd, isCompare, isDelete, isFind, isModify, isRead
 

Method Detail

isSearch

boolean isSearch()
Specified by:
isSearch in interface IInteraction

doSearch

IResultSet doSearch(java.util.List<IAttributeValue> attrFilterVals,
                    javax.security.auth.Subject user)
                    throws ConnectionException,
                           PolicyException,
                           NoSuchContextException,
                           NoSuchSubjectException,
                           SubjectNotUniqueException,
                           SchemaException,
                           MappingException,
                           DeclarationException,
                           InvalidFilterException
The search operation can be used for reporting purposes to locate a set of subjects that match a particular condition. The result set returns a List of SubjectKeys that match the filter and role conditions specified. Note that if reporting is desired, the caller may then issue doRead requests to pull back attributes, predicates, and roles of particular subjects returned from this method.

Parameters:
attrFilterVals - An array of IFilterValue or IAttributeValue objects that specify the comparison values for any AttrFilter objects contained in the declared filter for the transaction. The number of values specified must correspond exactly to the number specified in the declared filter. Use Filter.getCompareAttrValues() to obtain the values that need to be set.
IFilterValue allows for the capability for runtime setting of the comparison operator (contains, beginswith, etc).
user - The user context under which the operation is to be performed or null.
Returns:
A IResultSet of entries that were found in the search.
Throws:
ConnectionException - is thrown when a network or other connection problem has occurred causing the transaction to fail.
PolicyException - is thrown when the the transaction has failed due to policy or consent failure.
NoSuchContextException - is thrown when the subject cannot be mapped to an available context. This is usually suggestive of a configuration problem.
NoSuchSubjectException - is thrown when the user cannot be mapped within a context to perform the operation.
SubjectNotUniqueException - is thrown when the subject or user cannot be uniquely mapped to a single context or is not unique within a context.
SchemaException - is thrown when a filter or role cannot be matched or used appropriately.
MappingException - is thrown when an error has occurred in mapping a filter or role to an appropriate search filter or in mapping a result.
DeclarationException - is thrown if this method is called but the Interaction is not declared as a search.
InvalidFilterException - is thrown if an invalid filter or filter value has been specified.

doSearch

IResultSet doSearch(java.util.List<IAttributeValue> attrFilterVals,
                    java.util.Map<java.lang.String,IPolicy> dynamicConstraintsMap,
                    javax.security.auth.Subject user)
                    throws ConnectionException,
                           PolicyException,
                           NoSuchContextException,
                           NoSuchSubjectException,
                           SubjectNotUniqueException,
                           SchemaException,
                           MappingException,
                           DeclarationException,
                           InvalidFilterException
The search operation can be used for reporting purposes to locate a set of subjects that match a particular condition. The result set returns a List of SubjectKeys that match the filter and role conditions specified. Note that if reporting is desired, the caller may then issue doRead requests to pull back attributes, predicates, and roles of particular subjects returned from this method.

Parameters:
attrFilterVals - An array of IFilterValue or IAttributeValue objects that specify the comparison values for any AttrFilter objects contained in the declared filter for the transaction. The number of values specified must correspond exactly to the number specified in the declared filter. Use Filter.getCompareAttrValues() to obtain the values that need to be set.
IFilterValue allows for the capability for runtime setting of the comparison operator (contains, beginswith, etc).
dynamicConstraintsMap - A map containing a set of dynamic constraints relevant to the transaction. The map index is either an attribute, predicate, or role name, or interaction name (to define policy at the interaction level). This parameter is used for things like specifying a localization constraint on an attribute.
user - The user context under which the operation is to be performed or null.
Returns:
A IResultSet of entries that were found in the search.
Throws:
ConnectionException - is thrown when a network or other connection problem has occurred causing the transaction to fail.
PolicyException - is thrown when the the transaction has failed due to policy or consent failure.
NoSuchContextException - is thrown when the subject cannot be mapped to an available context. This is usually suggestive of a configuration problem.
NoSuchSubjectException - is thrown when the user cannot be mapped within a context to perform the operation.
SubjectNotUniqueException - is thrown when the subject or user cannot be uniquely mapped to a single context or is not unique within a context.
SchemaException - is thrown when a filter or role cannot be matched or used appropriately.
MappingException - is thrown when an error has occurred in mapping a filter or role to an appropriate search filter or in mapping a result.
DeclarationException - is thrown if this method is called but the Interaction is not declared as a search.
InvalidFilterException - is thrown if an invalid filter or filter value has been specified.

getPageSize

int getPageSize()
Preferred page size for those service providers that can optimize traffic and buffering. Page size means that the client would like to retrieve pageSize entries at a time from memory.


getMaxReturns

int getMaxReturns()
Gets the maximum count of subjects that the client expects to process. Once maxSubjects have been returned, the results should terminate with the result set indicating partial results received if more were available.


OpenLiberty.org - Licensed under Apache APL 2.0