public interface CompositionEnablerAdminSession extends OsidSession
This session creates and removes composition enablers. The data for
create and update is provided via the CompositionEnablerForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasCompositionEnabler(Id compositionEnablerId,
Id aliasId)
Adds an
Id to a CompositionEnabler for
the purpose of creating compatibility. |
boolean |
canCreateCompositionEnabler()
Tests if this user can create composition enablers.
|
boolean |
canCreateCompositionEnablerWithRecordTypes(Type[] compositionEnablerRecordTypes)
Tests if this user can create a single
CompositionEnabler
using the desired record types. |
boolean |
canDeleteCompositionEnablers()
Tests if this user can delete composition enablers.
|
boolean |
canManageCompositionEnablerAliases()
Tests if this user can manage
Id aliases for
composition enablers. |
boolean |
canUpdateCompositionEnablers()
Tests if this user can update composition enablers.
|
CompositionEnabler |
createCompositionEnabler(CompositionEnablerForm compositionEnablerForm)
Creates a new
CompositionEnabler. |
void |
deleteCompositionEnabler(Id compositionEnablerId)
Deletes a
CompositionEnabler. |
CompositionEnablerForm |
getCompositionEnablerFormForCreate(Type[] compositionEnablerRecordTypes)
Gets the composition enabler form for creating new composition
enablers.
|
CompositionEnablerForm |
getCompositionEnablerFormForUpdate(Id compositionEnablerId)
Gets the composition enabler form for updating an existing composition
enabler.
|
Repository |
getRepository()
Gets the
Repository associated with this session. |
Id |
getRepositoryId()
Gets the
Repository Id associated with
this session. |
void |
updateCompositionEnabler(CompositionEnablerForm compositionEnablerForm)
Updates an existing composition enabler.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getRepositoryId()
Repository
Id
associated with
this session. Repository Id
associated with this sessionmandatory
- This method must be implemented. Repository getRepository() throws OperationFailedException, PermissionDeniedException
Repository
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateCompositionEnabler()
CompositionEnabler
will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer create
operations to an unauthorized user. false
if CompositionEnabler
creation is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateCompositionEnablerWithRecordTypes(Type[] compositionEnablerRecordTypes)
CompositionEnabler
using the desired record types. While
RepositoryRulesManager.getCompositionEnablerRecordTypes()
can
be used to examine which records are supported, this method tests
which record(s) are required for creating a specific
CompositionEnabler.
Providing an empty array tests if a
CompositionEnabler
can be created with no records.compositionEnablerRecordTypes
- array of composition enabler
types true
if CompositionEnabler
creation using the specified record Types
is
supported, false
otherwiseNullArgumentException
-
compositionEnablerRecordTypes
is null
mandatory
- This method must be implemented. CompositionEnablerForm getCompositionEnablerFormForCreate(Type[] compositionEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
compositionEnablerRecordTypes
- array of composition enabler
typesNullArgumentException
-
compositionEnablerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. CompositionEnabler createCompositionEnabler(CompositionEnablerForm compositionEnablerForm) throws OperationFailedException, PermissionDeniedException
CompositionEnabler.
compositionEnablerForm
- the form for this
CompositionEnabler
CompositionEnabler
IllegalStateException
- compositionEnablerForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- compositionEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- compositionEnablerForm
did not originate from
getCompositionEnablerFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateCompositionEnablers()
CompositionEnabler
will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer update
operations to an unauthorized user. false
if CompositionEnabler
modification is not authorized, true
otherwisemandatory
- This method must be implemented. CompositionEnablerForm getCompositionEnablerFormForUpdate(Id compositionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
compositionEnablerId
- the Id
of the
CompositionEnabler
NotFoundException
- compositionEnablerId
is not foundNullArgumentException
- compositionEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateCompositionEnabler(CompositionEnablerForm compositionEnablerForm) throws OperationFailedException, PermissionDeniedException
compositionEnablerForm
- the form containing the elements to be
updatedIllegalStateException
- compositionEnablerForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- compositionEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- compositionEnablerForm
did not originate from
getCompositionEnablerFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteCompositionEnablers()
CompositionEnabler
will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer delete
operations to an unauthorized user. false
if CompositionEnabler
deletion is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteCompositionEnabler(Id compositionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CompositionEnabler.
compositionEnablerId
- the Id
of the
CompositionEnabler
to removeNotFoundException
- compositionEnablerId
not foundNullArgumentException
- compositionEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageCompositionEnablerAliases()
Id
aliases for
composition enablers. A return of true does not guarantee successful
authorization. A return of false indicates that it is known changing
an alias will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false
if CompositionEnabler
aliasing is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasCompositionEnabler(Id compositionEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a CompositionEnabler
for
the purpose of creating compatibility. The primary Id
of the CompositionEnabler
is determined by the
provider. The new Id
performs as an alias to the
primary Id
. If the alias is a pointer to another
composition enabler. it is reassigned to the given composition enabler
Id.
compositionEnablerId
- the Id
of a
CompositionEnabler
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- compositionEnablerId
not foundNullArgumentException
- compositionEnablerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.