public interface DispatchPublisherAssignmentSession extends OsidSession
This session provides methods to re-assign Dispatches
to
Publishers.
A Dispatch
may map to multiple
Publishers
and removing the last reference to a
Dispatch
is the equivalent of deleting it. Each Publisher
may have its own authorizations governing who is allowed to
operate on it.
Adding a reference of a Dispatch
to another
Publisher
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignDispatchToPublisher(Id dispatchId,
Id publisherId)
Adds an existing
Dispatch to a Publisher. |
boolean |
canAssignDispatches()
Tests if this user can alter dispatch/publisher mappings.
|
boolean |
canAssignDispatchesToPublisher(Id publisherId)
Tests if this user can alter dispatch/publisher mappings.
|
IdList |
getAssignablePublisherIds(Id publisherId)
Gets a list of publishers including and under the given publisher node
in which any dispatch can be assigned.
|
IdList |
getAssignablePublisherIdsForDispatch(Id publisherId,
Id dispatchId)
Gets a list of publishers including and under the given publisher node
in which a specific dispatch can be assigned.
|
void |
reassignDispatchToPublisher(Id dispatchId,
Id fromPublisherId,
Id toPublisherId)
Moves a
Dispatch from one Publisher to
another. |
void |
unassignDispatchFromPublisher(Id dispatchId,
Id publisherId)
Removes a
Dispatch from a Publisher. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignDispatches()
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 canAssignDispatchesToPublisher(Id publisherId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.publisherId
- the Id
of the Publisher
false
if mapping is not authorized, true
otherwiseNullArgumentException
- publisherId
is
null
mandatory
- This method must be implemented. IdList getAssignablePublisherIds(Id publisherId) throws OperationFailedException
publisherId
- the Id
of the Publisher
Ids
NullArgumentException
- publisherId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignablePublisherIdsForDispatch(Id publisherId, Id dispatchId) throws OperationFailedException
publisherId
- the Id
of the Publisher
dispatchId
- the Id
of the Dispatch
Ids
NullArgumentException
- publisherId
or
dispatchId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignDispatchToPublisher(Id dispatchId, Id publisherId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Dispatch
to a Publisher.
dispatchId
- the Id
of the Dispatch
publisherId
- the Id
of the Publisher
AlreadyExistsException
- dispatchId
is
already assigned to publisherId
NotFoundException
- dispatchId
or
publisherId
not foundNullArgumentException
- dispatchId
or
publisherId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignDispatchFromPublisher(Id dispatchId, Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Dispatch
from a Publisher.
dispatchId
- the Id
of the Dispatch
publisherId
- the Id
of the Publisher
NotFoundException
- dispatchId
or
publisherId
not found or dispatchId
not
assigned to publisherId
NullArgumentException
- dispatchId
or
publisherId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignDispatchToPublisher(Id dispatchId, Id fromPublisherId, Id toPublisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Dispatch
from one Publisher
to
another. Mappings to other Publishers
are unaffected.dispatchId
- the Id
of the Dispatch
fromPublisherId
- the Id
of the current
Publisher
toPublisherId
- the Id
of the destination
Publisher
NotFoundException
- dispatchId, fromPublisherId,
or toPublisherId
not found or
dispatchId,
not mapped to fromPublisherId
NullArgumentException
- dispatchId,
fromPublisherId,
or toPublisherId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.