public interface MessageMailboxAssignmentSession extends OsidSession
This session provides methods to re-assign Messages
to
Mailboxes.
A Message
may map to multiple
Mailbox
objects and removing the last reference to a
Message
is the equivalent of deleting it. Each Mailbox
may have its own authorizations governing who is allowed to
operate on it.
Moving or adding a reference of a Message
to another
Mailbox
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignMessageToMailbox(Id messageId,
Id mailboxId)
Adds an existing
Message to a Mailbox. |
boolean |
canAssignMessages()
Tests if this user can alter message/mailbox mappings.
|
boolean |
canAssignMessagesToMailbox(Id mailboxId)
Tests if this user can alter message/mailbox mappings.
|
IdList |
getAssignableMailboxIds(Id mailboxId)
Gets a list of mailboxes including and under the given mailbox node in
which any message can be assigned.
|
IdList |
getAssignableMailboxIdsForMessage(Id mailboxId,
Id messageId)
Gets a list of mailboxes including and under the given mailbox node in
which a specific message can be assigned.
|
void |
unassignMessageFromMailbox(Id messageId,
Id mailboxId)
Removes a
Message from a Mailbox. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignMessages()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignMessagesToMailbox(Id mailboxId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.mailboxId
- the Id
of the Mailbox
false
if messaging is not authorized,
true
otherwiseNullArgumentException
- mailboxId
is
null
mandatory
- This method must be implemented. IdList getAssignableMailboxIds(Id mailboxId) throws OperationFailedException
mailboxId
- the Id
of the Mailbox
Ids
NullArgumentException
- mailboxId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableMailboxIdsForMessage(Id mailboxId, Id messageId) throws OperationFailedException
mailboxId
- the Id
of the Mailbox
messageId
- the Id
of the Message
Ids
NullArgumentException
- mailboxId
or
messageId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignMessageToMailbox(Id messageId, Id mailboxId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Message
to a Mailbox.
messageId
- the Id
of the Message
mailboxId
- the Id
of the Mailbox
AlreadyExistsException
- messageId
is
already assigned to mailboxId
NotFoundException
- messageId
or
mailboxId
not foundNullArgumentException
- messageId
or
mailboxId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignMessageFromMailbox(Id messageId, Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Message
from a Mailbox.
messageId
- the Id
of the Message
mailboxId
- the Id
of the Mailbox
NotFoundException
- messageId
or
mailboxId
or messageId
not assigned to
mailboxId
NullArgumentException
- messageId
or
mailboxId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.