public interface SubscriptionPublisherAssignmentSession extends OsidSession
This session provides methods to re-assign Subscriptions
to Publishers.
A Subscription
may map to
multiple Publishers
and removing the last reference to a
Subscription
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 Subscription
to another
Publisher
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignSubscriptionToPublisher(Id subscriptionId,
Id publisherId)
Adds an existing
Subscription to a Publisher. |
boolean |
canAssignSubscriptions()
Tests if this user can alter subscription/publisher mappings.
|
boolean |
canAssignSubscriptionsToPublisher(Id publisherId)
Tests if this user can alter subscription/publisher mappings.
|
IdList |
getAssignablePublisherIds(Id publisherId)
Gets a list of publishers including and under the given publisher node
in which any subscription can be assigned.
|
IdList |
getAssignablePublisherIdsForSubscription(Id publisherId,
Id subscriptionId)
Gets a list of publishers including and under the given publisher node
in which a specific subscription can be assigned.
|
void |
reassignSubscriptionToPublisher(Id subscriptionId,
Id fromPublisherId,
Id toPublisherId)
Moves a
Subscription from one Publisher
to another. |
void |
unassignSubscriptionFromPublisher(Id subscriptionId,
Id publisherId)
Removes a
Subscription from a Publisher. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignSubscriptions()
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 canAssignSubscriptionsToPublisher(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 getAssignablePublisherIdsForSubscription(Id publisherId, Id subscriptionId) throws OperationFailedException
publisherId
- the Id
of the Publisher
subscriptionId
- the Id
of the
Subscription
Ids
NullArgumentException
- publisherId
or
subscriptionId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignSubscriptionToPublisher(Id subscriptionId, Id publisherId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Subscription
to a Publisher.
subscriptionId
- the Id
of the
Subscription
publisherId
- the Id
of the Publisher
AlreadyExistsException
- subscriptionId
is already assigned to publisherId
NotFoundException
- subscriptionId
or
publisherId
not foundNullArgumentException
- subscriptionId
or publisherId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignSubscriptionFromPublisher(Id subscriptionId, Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Subscription
from a Publisher.
subscriptionId
- the Id
of the
Subscription
publisherId
- the Id
of the Publisher
NotFoundException
- subscriptionId
or
publisherId
not found or subscriptionId
not assigned to publisherId
NullArgumentException
- subscriptionId
or publisherId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignSubscriptionToPublisher(Id subscriptionId, Id fromPublisherId, Id toPublisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Subscription
from one Publisher
to another. Mappings to other Publishers
are
unaffected.subscriptionId
- the Id
of the
Subscription
fromPublisherId
- the Id
of the current
Publisher
toPublisherId
- the Id
of the destination
Publisher
NotFoundException
- subscriptionId,
fromPublisherId,
or toPublisherId
not
found or subscriptionId
not mapped to
fromPublisherId
NullArgumentException
- subscriptionId,
fromPublisherId,
or toPublisherId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.