OSID Logo
OSID Specifications
authentication package
Version 3.1.0
Interfaceosid.authentication.AgentQuery
Implementsosid.OsidObjectQuery
Used Byosid.OsidRequestQuery
osid.assessment.AssessmentTakenQuery
osid.authentication.AgencyQuery
osid.authentication.AgentQuerySession
osid.authentication.AgentSearchSession
osid.authentication.AgentSmartAgencySession
osid.authentication.keys.KeyQuery
osid.authorization.AuthorizationQuery
osid.bidding.BidQuery
osid.blogging.EntryQuery
show 22 more…
osid.commenting.CommentQuery
osid.filing.DirectoryEntryQuery
osid.forum.PostQuery
osid.forum.ReplyQuery
osid.grading.GradeEntryQuery
osid.hold.HoldQuery
osid.inquiry.ResponseQuery
osid.installation.InstallationQuery
osid.journaling.JournalEntryQuery
osid.logging.LogEntryQuery
osid.messaging.MessageQuery
osid.messaging.ReceiptQuery
osid.ordering.OrderQuery
osid.profile.ProfileEntryQuery
osid.provisioning.ProvisionReturnQuery
osid.provisioning.RequestQuery
osid.provisioning.RequestTransactionQuery
osid.resource.ResourceQuery
osid.tracking.IssueQuery
osid.tracking.LogEntryQuery
osid.voting.VoteQuery
osid.workflow.event.WorkflowEventQuery
Description

This is the query for searching agents. Each method specifies an AND term while multiple invocations of the same method produce a nested OR.

The following example returns agents whose display name begins with "Tom" and whose "login name" is "tom" or "tjcoppet" in an agent record specified by companyAgentType.

Agent Query query = session.getAgentQuery();

query.matchDisplayName("Tom*", wildcardStringMatchType, true);

companyAgentQuery = query.getAgentQueryRecord(companyAgentType);
companyAgentQuery.matchLoginName("tom");
companyAgentQuery = query.getAgentQueryRecord(companyAgentType);
companyAgentQuery.matchLoginName("tjcoppet");

AgentList agentList = session.getAgentsByQuery(query);
                
MethodmatchResourceId
Description

Sets the resource Id for this query.

Parametersosid.id.IdagencyId a resource Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT agencyId is null
Compliancemandatory This method must be implemented.
MethodclearResourceIdTerms
Description

Clears the resource Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsResourceQuery
Description

Tests if a ResourceQuery is available.

Returnboolean true if a resource query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetResourceQuery
Description

Gets the query for a resource. Multiple retrievals produce a nested OR term.

Returnosid.resource.ResourceQuery the resource query
ErrorsUNIMPLEMENTED supportsResourceQuery() is false
Complianceoptional This method must be implemented if supportsResourceQuery() is true.
MethodmatchAnyResource
Description

Matches agents with any resource.

Parametersbooleanmatch true if to match agents with a resource, false to match agents with no resource
Compliancemandatory This method must be implemented.
MethodclearResourceTerms
Description

Clears the resource terms.

Compliancemandatory This method must be implemented.
MethodmatchAgencyId
Description

Sets the agency Id for this query.

Parametersosid.id.IdagencyId an agency Id
booleanmatch true for a positive match, false for negative match
ErrorsNULL_ARGUMENT agencyId is null
Compliancemandatory This method must be implemented.
MethodclearAgencyIdTerms
Description

Clears the agency Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsAgencyQuery
Description

Tests if an AgencyQuery is available.

Returnboolean true if an agency query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetAgencyQuery
Description

Gets the query for an agency. Multiple retrievals produce a nested OR term.

Returnosid.authentication.AgencyQuery the agency query
ErrorsUNIMPLEMENTED supportsAgencyQuery() is false
Complianceoptional This method must be implemented if supportsAgencyQuery() is true.
MethodclearAgencyTerms
Description

Clears the agency terms.

Compliancemandatory This method must be implemented.
MethodgetAgentQueryRecord
Description

Gets the agent query record corresponding to the given Agent record Type.Multiple retrievals produce a nested OR term.

Parametersosid.type.TypeagentRecordType an agent record type
Returnosid.authentication.records.AgentQueryRecord the agent query record
ErrorsNULL_ARGUMENT agentRecordType is null
OPERATION_FAILED unable to complete request
UNSUPPORTED hasRecordType(agentRecordType) is false
Compliancemandatory This method must be implemented.