public interface CanonicalUnitEnablerAdminSession extends OsidSession
This session creates and removes canonical unit enablers. The data for
create and update is provided via the CanonicalUnitEnablerForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasCanonicalUnitEnabler(Id canonicalUnitEnablerId,
Id aliasId)
Adds an
Id to a CanonicalUnitEnabler for
the purpose of creating compatibility. |
boolean |
canCreateCanonicalUnitEnabler()
Tests if this user can create canonical unit enablers.
|
boolean |
canCreateCanonicalUnitEnablerWithRecordTypes(Type[] canonicalUnitEnablerRecordTypes)
Tests if this user can create a single
CanonicalUnitEnabler
using the desired record types. |
boolean |
canDeleteCanonicalUnitEnablers()
Tests if this user can delete canonical unit enablers.
|
boolean |
canManageCanonicalUnitEnablerAliases()
Tests if this user can manage
Id aliases for canonical
unit enablers. |
boolean |
canUpdateCanonicalUnitEnablers()
Tests if this user can update canonical unit enablers.
|
CanonicalUnitEnabler |
createCanonicalUnitEnabler(CanonicalUnitEnablerForm canonicalUnitEnablerForm)
Creates a new
CanonicalUnitEnabler. |
void |
deleteCanonicalUnitEnabler(Id canonicalUnitEnablerId)
Deletes a
CanonicalUnitEnabler. |
CanonicalUnitEnablerForm |
getCanonicalUnitEnablerFormForCreate(Type[] canonicalUnitEnablerRecordTypes)
Gets the canonical unit enabler form for creating new canonical unit
enablers.
|
CanonicalUnitEnablerForm |
getCanonicalUnitEnablerFormForUpdate(Id canonicalUnitEnablerId)
Gets the canonical unit enabler form for updating an existing
canonical unit enabler.
|
Catalogue |
getCatalogue()
Gets the
Catalogue associated with this session. |
Id |
getCatalogueId()
Gets the
Catalogue Id associated with
this session. |
void |
updateCanonicalUnitEnabler(CanonicalUnitEnablerForm canonicalUnitEnablerForm)
Updates an existing canonical unit enabler.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCatalogueId()
Catalogue
Id
associated with
this session. Catalogue Id
associated with this sessionmandatory
- This method must be implemented. Catalogue getCatalogue() throws OperationFailedException, PermissionDeniedException
Catalogue
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateCanonicalUnitEnabler()
CanonicalUnitEnabler
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 CanonicalUnitEnabler
creation is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateCanonicalUnitEnablerWithRecordTypes(Type[] canonicalUnitEnablerRecordTypes)
CanonicalUnitEnabler
using the desired record types. While
OfferingRulesManager.getCanonicalUnitEnablerRecordTypes()
can
be used to examine which records are supported, this method tests
which record(s) are required for creating a specific
CanonicalUnitEnabler.
Providing an empty array tests if a
CanonicalUnitEnabler
can be created with no records.canonicalUnitEnablerRecordTypes
- array of canonical unit
enabler record types true
if CanonicalUnitEnabler
creation using the specified record Types
is
supported, false
otherwiseNullArgumentException
-
canonicalUnitEnablerRecordTypes
is null
mandatory
- This method must be implemented. CanonicalUnitEnablerForm getCanonicalUnitEnablerFormForCreate(Type[] canonicalUnitEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
canonicalUnitEnablerRecordTypes
- array of canonical unit
enabler record typesNullArgumentException
-
canonicalUnitEnablerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. CanonicalUnitEnabler createCanonicalUnitEnabler(CanonicalUnitEnablerForm canonicalUnitEnablerForm) throws OperationFailedException, PermissionDeniedException
CanonicalUnitEnabler.
canonicalUnitEnablerForm
- the form for this
CanonicalUnitEnabler
CanonicalUnitEnabler
IllegalStateException
- canonicalUnitEnablerForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- canonicalUnitEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- canonicalUnitEnablerForm
did not originate from getCanonicalUnitEnablerFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateCanonicalUnitEnablers()
CanonicalUnitEnabler
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 CanonicalUnitEnabler
modification is not authorized, true
otherwisemandatory
- This method must be implemented. CanonicalUnitEnablerForm getCanonicalUnitEnablerFormForUpdate(Id canonicalUnitEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
canonicalUnitEnablerId
- the Id
of the
CanonicalUnitEnabler
NotFoundException
- canonicalUnitEnablerId
is not foundNullArgumentException
- canonicalUnitEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateCanonicalUnitEnabler(CanonicalUnitEnablerForm canonicalUnitEnablerForm) throws OperationFailedException, PermissionDeniedException
canonicalUnitEnablerForm
- the form containing the elements to
be updatedIllegalStateException
- canonicalUnitEnablerForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- canonicalUnitEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- canonicalUnitEnablerForm
did not originate from
getCanonicalUnitEnablerFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteCanonicalUnitEnablers()
CanonicalUnitEnabler
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 CanonicalUnitEnabler
deletion is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteCanonicalUnitEnabler(Id canonicalUnitEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CanonicalUnitEnabler.
canonicalUnitEnablerId
- the Id
of the
CanonicalUnitEnabler
to removeNotFoundException
- canonicalUnitEnablerId
not foundNullArgumentException
- canonicalUnitEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageCanonicalUnitEnablerAliases()
Id
aliases for canonical
unit 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 CanonicalUnitEnabler
aliasing is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasCanonicalUnitEnabler(Id canonicalUnitEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a CanonicalUnitEnabler
for
the purpose of creating compatibility. The primary Id
of the CanonicalUnitEnabler
is determined by the
provider. The new Id
performs as an alias to the
primary Id
. If the alias is a pointer to another
canonical unit enabler. it is reassigned to the given canonical unit
enabler Id.
canonicalUnitEnablerId
- the Id
of a
CanonicalUnitEnabler
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- canonicalUnitEnablerId
not foundNullArgumentException
- canonicalUnitEnablerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.