Interface AddressLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Addresses . The
Address represents a collection of contacts.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete view or is an error condition
- isolated address book view: All address methods in this session
operate, retrieve and pertain to addresses defined explicitly in the
current address book. Using an isolated view is useful for managing
addresses with the
AddressAdminSession. - federated address book view: All address lookup methods in this session operate, retrieve and pertain to all addresses defined in this address book and any other address books implicitly available in this address book through address book inheritence.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performAddresslookups.getAddress(Id addressId) Gets theAddressspecified by itsId.Gets theAddressBookassociated with this session.Gets theAddressBookIdassociated with this session.Gets allAddresses.getAddressesByGenusType(Type addressGenusType) Gets anAddressListcorresponding to the given address genusTypewhich does not include addresses of genus types derived from the specifiedType.In plenary mode, the returned list contains all known addresses or an error results.getAddressesByIds(IdList addressIds) Gets anAddressListcorresponding to the givenIdList.getAddressesByParentGenusType(Type addressGenusType) Gets anAddressListcorresponding to the given address genusTypeand include any additional addresses with genus types derived from the specifiedType.In plenary mode, the returned list contains all known addresses or an error results.getAddressesByRecordType(Type addressRecordType) Gets anAddressListcontaining the given address recordType.getAddressesByResource(Id resourceId) Gets anAddressListfor the given resource.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theAddressreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getAddressBookId
Id getAddressBookId()Gets theAddressBookIdassociated with this session.- Returns:
- the
AddressBook Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getAddressBook
Gets theAddressBookassociated with this session.- Returns:
- the address book
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupAddresses
boolean canLookupAddresses()Tests if this user can performAddresslookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may not offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeAddressView
void useComparativeAddressView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryAddressView
void usePlenaryAddressView()A complete view of theAddressreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedAddressBookView
void useFederatedAddressBookView()Federates the view for methods in this session. A federated view will include addresses in address books which are children of this address book in the address book hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedAddressBookView
void useIsolatedAddressBookView()Isolates the view for methods in this session. An isolated view restricts retrievals to this address book only.- Compliance:
mandatory- This method is must be implemented.
-
getAddress
Address getAddress(Id addressId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theAddressspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedAddressmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAddressand retained for compatibility.- Parameters:
addressId-Idof theAddress- Returns:
- the address
- Throws:
NotFoundException-addressIdnot foundNullArgumentException-addressIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getAddressesByIds
AddressList getAddressesByIds(IdList addressIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anAddressListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the addresses specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAddressesmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
addressIds- the list ofIdsto retrieve- Returns:
- the returned
Addresslist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-addressIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAddressesByGenusType
AddressList getAddressesByGenusType(Type addressGenusType) throws OperationFailedException, PermissionDeniedException Gets anAddressListcorresponding to the given address genusTypewhich does not include addresses of genus types derived from the specifiedType.In plenary mode, the returned list contains all known addresses or an error results. Otherwise, the returned list may contain only those addresses that are accessible through this session.- Parameters:
addressGenusType- an address genus type- Returns:
- the returned
Addresslist - Throws:
NullArgumentException-addressGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAddressesByParentGenusType
AddressList getAddressesByParentGenusType(Type addressGenusType) throws OperationFailedException, PermissionDeniedException Gets anAddressListcorresponding to the given address genusTypeand include any additional addresses with genus types derived from the specifiedType.In plenary mode, the returned list contains all known addresses or an error results. Otherwise, the returned list may contain only those addresses that are accessible through this session.- Parameters:
addressGenusType- an address genus type- Returns:
- the returned
Addresslist - Throws:
NullArgumentException-addressGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAddressesByRecordType
AddressList getAddressesByRecordType(Type addressRecordType) throws OperationFailedException, PermissionDeniedException Gets anAddressListcontaining the given address recordType. In plenary mode, the returned list contains all known addresses or an error results. Otherwise, the returned list may contain only those addresses that are accessible through this session.- Parameters:
addressRecordType- an address record type- Returns:
- the returned
Addresslist - Throws:
NullArgumentException-addressRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAddressesByResource
AddressList getAddressesByResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets anAddressListfor the given resource. In plenary mode, the returned list contains all known addresses or an error results. Otherwise, the returned list may contain only those addresses that are accessible through this session.- Parameters:
resourceId- a resourceId- Returns:
- the returned
Addresslist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAddresses
Gets allAddresses. In plenary mode, the returned list contains all known addresses or an error results. Otherwise, the returned list may contain only those addresses that are accessible through this session.- Returns:
- a list of
Addresses - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-