Interface AssetCompositionDesignSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides the means for adding assets to an asset
composition. The asset is identified inside a composition using its own
Id. To add the same asset to the composition, multiple compositions should
be used and placed at the same level in the Composition hierarchy.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAppends an asset to a composition.booleanTests if this user can manage mapping ofAssetstoCompositions.Gets theRepositoryassociated with this session.Gets theRepositoryIdassociated with this session.voidmoveAssetAhead(Id assetId, Id compositionId, Id referenceId) Reorders assets in a composition by moving the specified asset in front of a reference asset.voidmoveAssetBehind(Id assetId, Id compositionId, Id referenceId) Reorders assets in a composition by moving the specified asset behind of a reference asset.voidorderAssets(Id[] assetIds, Id compositionId) Reorders a set of assets in a composition.voidremoveAsset(Id assetId, Id compositionId) Removes anAssetfrom aComposition.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
Repositoryassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canComposeAssets
boolean canComposeAssets()Tests if this user can manage mapping ofAssetstoCompositions. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as an application hint that may opt not to offer composition operations.- Returns:
falseif asset composiion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
addAsset
void addAsset(Id assetId, Id compositionId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Appends an asset to a composition.- Parameters:
assetId-Idof theAssetcompositionId-Idof theComposition- Throws:
AlreadyExistsException-assetIdalready partcompositionIdNotFoundException-assetIdorcompositionIdnot foundNullArgumentException-assetIdorcompositionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization fauilure- Compliance:
mandatory- This method must be implemented.
-
moveAssetAhead
void moveAssetAhead(Id assetId, Id compositionId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders assets in a composition by moving the specified asset in front of a reference asset.- Parameters:
assetId-Idof theAssetcompositionId-Idof theCompositionreferenceId-Idof the referenceAsset- Throws:
NotFoundException-assetIdorreferenceIdnot found in compositionIdNullArgumentException-assetId, referenceIdorcompositionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization fauilure- Compliance:
mandatory- This method must be implemented.
-
moveAssetBehind
void moveAssetBehind(Id assetId, Id compositionId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders assets in a composition by moving the specified asset behind of a reference asset.- Parameters:
assetId-Idof theAssetcompositionId-Idof theCompositionreferenceId-Idof the referenceAsset- Throws:
NotFoundException-assetIdorreferenceIdnot found in compositionIdNullArgumentException-assetId, referenceIdorcompositionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization fauilure- Compliance:
mandatory- This method must be implemented.
-
orderAssets
void orderAssets(Id[] assetIds, Id compositionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders a set of assets in a composition.- Parameters:
assetIds-Idsfor a set ofAssetscompositionId-Idof theComposition- Throws:
NotFoundException-compositionIdnot found or, anassetIdnot related tocompositionIdNullArgumentException-instructionIdsoragendaIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeAsset
void removeAsset(Id assetId, Id compositionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anAssetfrom aComposition.- Parameters:
assetId-Idof theAssetcompositionId-Idof theComposition- Throws:
NotFoundException-assetIdnot found in compositionIdNullArgumentException-assetIdorcompositionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization fauilure- Compliance:
mandatory- This method must be implemented.
-