Interface CompositionEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes composition enablers. The data for
create and update is provided via the CompositionEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasCompositionEnabler(Id compositionEnablerId, Id aliasId) Adds anIdto aCompositionEnablerfor the purpose of creating compatibility.booleanTests if this user can create composition enablers.booleancanCreateCompositionEnablerWithRecordTypes(Type[] compositionEnablerRecordTypes) Tests if this user can create a singleCompositionEnablerusing the desired record types.booleanTests if this user can delete composition enablers.booleanTests if this user can manageIdaliases for composition enablers.booleanTests if this user can update composition enablers.createCompositionEnabler(CompositionEnablerForm compositionEnablerForm) Creates a newCompositionEnabler.voiddeleteCompositionEnabler(Id compositionEnablerId) Deletes aCompositionEnabler.getCompositionEnablerFormForCreate(Type[] compositionEnablerRecordTypes) Gets the composition enabler form for creating new composition enablers.getCompositionEnablerFormForUpdate(Id compositionEnablerId) Gets the composition enabler form for updating an existing composition enabler.Gets theRepositoryassociated with this session.Gets theRepositoryIdassociated with this session.voidupdateCompositionEnabler(CompositionEnablerForm compositionEnablerForm) Updates an existing composition enabler.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getRepositoryId
Id getRepositoryId()Gets theRepositoryIdassociated with this session.- Returns:
- the
Repository Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getRepository
Gets theRepositoryassociated with this session.- Returns:
- the repository
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateCompositionEnabler
boolean canCreateCompositionEnabler()Tests if this user can create composition enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aCompositionEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifCompositionEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateCompositionEnablerWithRecordTypes
Tests if this user can create a singleCompositionEnablerusing the desired record types. WhileRepositoryRulesManager.getCompositionEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificCompositionEnabler. Providing an empty array tests if aCompositionEnablercan be created with no records.- Parameters:
compositionEnablerRecordTypes- array of composition enabler types- Returns:
trueifCompositionEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-compositionEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getCompositionEnablerFormForCreate
CompositionEnablerForm getCompositionEnablerFormForCreate(Type[] compositionEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the composition enabler form for creating new composition enablers. A new form should be requested for each create transaction.- Parameters:
compositionEnablerRecordTypes- array of composition enabler types- Returns:
- the composition enabler form
- Throws:
NullArgumentException-compositionEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createCompositionEnabler
CompositionEnabler createCompositionEnabler(CompositionEnablerForm compositionEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newCompositionEnabler.- Parameters:
compositionEnablerForm- the form for thisCompositionEnabler- Returns:
- the new
CompositionEnabler - Throws:
IllegalStateException-compositionEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-compositionEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-compositionEnablerFormdid not originate fromgetCompositionEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateCompositionEnablers
boolean canUpdateCompositionEnablers()Tests if this user can update composition enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aCompositionEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifCompositionEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getCompositionEnablerFormForUpdate
CompositionEnablerForm getCompositionEnablerFormForUpdate(Id compositionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the composition enabler form for updating an existing composition enabler. A new composition enabler form should be requested for each update transaction.- Parameters:
compositionEnablerId- theIdof theCompositionEnabler- Returns:
- the composition enabler form
- Throws:
NotFoundException-compositionEnablerIdis not foundNullArgumentException-compositionEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateCompositionEnabler
void updateCompositionEnabler(CompositionEnablerForm compositionEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing composition enabler.- Parameters:
compositionEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-compositionEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-compositionEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-compositionEnablerFormdid not originate fromgetCompositionEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteCompositionEnablers
boolean canDeleteCompositionEnablers()Tests if this user can delete composition enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aCompositionEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifCompositionEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteCompositionEnabler
void deleteCompositionEnabler(Id compositionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aCompositionEnabler.- Parameters:
compositionEnablerId- theIdof theCompositionEnablerto remove- Throws:
NotFoundException-compositionEnablerIdnot foundNullArgumentException-compositionEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageCompositionEnablerAliases
boolean canManageCompositionEnablerAliases()Tests if this user can manageIdaliases 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifCompositionEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasCompositionEnabler
void aliasCompositionEnabler(Id compositionEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aCompositionEnablerfor the purpose of creating compatibility. The primaryIdof theCompositionEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another composition enabler. it is reassigned to the given composition enablerId.- Parameters:
compositionEnablerId- theIdof aCompositionEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-compositionEnablerIdnot foundNullArgumentException-compositionEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-