Interface ContactEnablerAddressBookAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign ContactEnabler to
AddressBook mappings. A ContactEnabler may appear in
multiple AddressBook objects and removing the last reference to a
ContactEnabler is the equivalent of deleting it. Each
AddressBook may have its own authorizations governing who is allowed to
operate on it.
Adding a reference of a ContactEnabler to another
AddressBook is not a copy operation (eg: does not change its Id
).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignContactEnablerToAddressBook(Id contactEnablerId, Id addressBookId) Adds an existingContactEnablerto anAddressBook.booleanTests if this user can alter contact enabler/address book mappings.booleancanAssignContactEnablersToAddressBook(Id addressBookId) Tests if this user can alter contact enabler/address book mappings.getAssignableAddressBookIds(Id addressBookId) Gets a list of address books including and under the given address book node in which any contact enabler can be assigned.getAssignableAddressBookIdsForContactEnabler(Id addressBookId, Id contactEnablerId) Gets a list of address books including and under the given address book node in which a specific contact enabler can be assigned.voidreassignContactEnablerToAddressBook(Id contactEnablerId, Id fromAddressBookId, Id toAddressBookId) Moves aContactEnablerfrom oneAddressBookto another.voidunassignContactEnablerFromAddressBook(Id contactEnablerId, Id addressBookId) Removes aContactEnablerfrom anAddressBook.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
-
canAssignContactEnablers
boolean canAssignContactEnablers()Tests if this user can alter contact enabler/address book mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignContactEnablersToAddressBook
Tests if this user can alter contact enabler/address book mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
addressBookId- theIdof theAddressBook- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-addressBookIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableAddressBookIds
Gets a list of address books including and under the given address book node in which any contact enabler can be assigned.- Parameters:
addressBookId- theIdof theAddressBook- Returns:
- list of assignable address book
Ids - Throws:
NullArgumentException-addressBookIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableAddressBookIdsForContactEnabler
IdList getAssignableAddressBookIdsForContactEnabler(Id addressBookId, Id contactEnablerId) throws OperationFailedException Gets a list of address books including and under the given address book node in which a specific contact enabler can be assigned.- Parameters:
addressBookId- theIdof theAddressBookcontactEnablerId- theIdof theContactEnabler- Returns:
- list of assignable address book
Ids - Throws:
NullArgumentException-addressBookIdorcontactEnablerIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignContactEnablerToAddressBook
void assignContactEnablerToAddressBook(Id contactEnablerId, Id addressBookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingContactEnablerto anAddressBook.- Parameters:
contactEnablerId- theIdof theContactEnableraddressBookId- theIdof theAddressBook- Throws:
AlreadyExistsException-contactEnablerIdis already assigned toaddressBookIdNotFoundException-contactEnablerIdoraddressBookIdnot foundNullArgumentException-contactEnablerIdoraddressBookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignContactEnablerFromAddressBook
void unassignContactEnablerFromAddressBook(Id contactEnablerId, Id addressBookId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aContactEnablerfrom anAddressBook.- Parameters:
contactEnablerId- theIdof theContactEnableraddressBookId- theIdof theAddressBook- Throws:
NotFoundException-contactEnablerIdoraddressBookIdnot found orcontactEnablerIdis not assigned toaddressBookIdNullArgumentException-contactEnablerIdoraddressBookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignContactEnablerToAddressBook
void reassignContactEnablerToAddressBook(Id contactEnablerId, Id fromAddressBookId, Id toAddressBookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aContactEnablerfrom oneAddressBookto another. Mappings to otherAddressBooksare unaffected.- Parameters:
contactEnablerId- theIdof theContactEnablerfromAddressBookId- theIdof the currentAddressBooktoAddressBookId- theIdof the destinationAddressBook- Throws:
AlreadyExistsException-contactEnablerIdalready assigned totoAddressBookIdNotFoundException-contactEnablerId, fromAddressBookId, ortoAddressBookIdnot found orcontactEnablerIdnot mapped tofromAddressBookIdNullArgumentException-contactEnablerId, fromAddressBookId, ortoAddressBookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-