public interface CompositionRepositoryAssignmentSession extends OsidSession
This session provides methods to re-assign Compositions
to Repository
objects. A Composition
may be
associated with multiple Repository
objects. Removing the
last reference to a Composition
is the equivalent of
deleting it. Each Repository
may have its own
authorizations governing who is allowed to operate on it.
Moving or adding a reference of a Composition
to
another Repository
is not a copy operation (eg: does not
change its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignCompositionToRepository(Id compositionId,
Id repositoryId)
Adds an existing
Composition to a Repository. |
boolean |
canAssignCompositions()
Tests if this user can alter composition/repository mappings.
|
boolean |
canAssignCompositionsToRepository(Id repositoryId)
Tests if this user can alter composition/repository mappings.
|
IdList |
getAssignableRepositoryIds(Id repositoryId)
Gets a list of repositories including and under the given repository
node in which any composition can be assigned.
|
IdList |
getAssignableRepositoryIdsForComposition(Id repositoryId,
Id compositionId)
Gets a list of repositories including and under the given repository
node in which a specific composition can be assigned.
|
void |
unassignCompositionFromRepository(Id compositionId,
Id repositoryId)
Removes
Composition from a Repository. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignCompositions()
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 canAssignCompositionsToRepository(Id repositoryId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.repositoryId
- the Id
of the Repository
false
if mapping is not authorized, true
otherwiseNullArgumentException
- repositoryId
is
null
mandatory
- This method must be implemented. IdList getAssignableRepositoryIds(Id repositoryId) throws OperationFailedException
repositoryId
- the Id
of the Repository
Ids
NullArgumentException
- repositoryId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableRepositoryIdsForComposition(Id repositoryId, Id compositionId) throws OperationFailedException
repositoryId
- the Id
of the Repository
compositionId
- the Id
of the Composition
Ids
NullArgumentException
- repositoryId
or
compositionId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignCompositionToRepository(Id compositionId, Id repositoryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Composition
to a Repository.
compositionId
- the Id
of the Composition
repositoryId
- the Id
of the Repository
AlreadyExistsException
- compositionId
already assigned to repositoryId
NotFoundException
- compositionId
or
repositoryId
not foundNullArgumentException
- compositionId
or
repositoryId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignCompositionFromRepository(Id compositionId, Id repositoryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Composition
from a Repository.
compositionId
- the Id
of the Composition
repositoryId
- the Id
of the Repository
NotFoundException
- compositionId
or
repositoryId
not found or compositionId
not assigned to repositoryId
NullArgumentException
- compositionId
or
repositoryId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.