Class AssetRI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDELETE: assetarchiving/{key}voidassetArchivingTaskDelete(AssetArchivingTask assetArchivingTask) Deletes AssetArchivingTask from database with usage check.javax.ws.rs.core.ResponsePOST: assetarchiving/{key}?data=[datamap in json]javax.ws.rs.core.ResponsePOST: assetarchiving?data=[jsonDataMap]voidPOST: assetarchiving/{key}/performvoidassetArchivingTaskPerform(AssetArchivingTask assetArchivingTask) Starts workflow (SystemWfType.ASSET_ARCHIVING_WORKFLOW) to archive assets.assetArchivingTaskSave(AssetArchivingTask assetArchivingTask, DataMap dataMap) Inserts or updates given AssetArchivingTask by setting its fields from given dataMap.voidassetBasketAddAsset(String basketKey, String assetKey) POST: assetbasket/{basketKey}/asset/{assetKey}voidassetBasketAddAsset(Basket basket, Asset asset) Adds asset to given basket and as default - add original to derivate list (only if user has RightType.DOWNLOAD permission for it)
Removes archive file that contained previous content of basket for export from basket if exists.voidassetBasketAddAssetDerivateList(String basketKey, String assetKey, Set<String> derivateKey, boolean includeOriginal) POST: assetbasket/{basketKey}/asset/{assetKey}/assetderivate/list?derivateKey={assetDerivateKey1}& derivateKey={assetDerivateKey2}...voidassetBasketAddAssetList(String basketKey, Set<String> assetKey) POST: assetbasket/{basketKey}/asset/list?assetKey={assetKey1}&assetKey={assetKey2}...voidassetBasketAddAssets(Basket basket, List<Asset> assets) Add asset from list to given basket and as default - add original to derivate list (only if user has RightType.DOWNLOAD permission for it).
Removes archive file that contained previous content of basket for export from basket if exists.voidassetBasketAddReceiver(String basketKey, String principalKey, String localeKey) POST: assetbasket/{basketKey}/principal/{principalKey}/?localeKey={localeKey}
QueryParam: localeKey is optional, can be id, internal description or language/country iso2 code.voidassetBasketAddReceiver(Basket basket, Principal principal, String receiverEmail, Locale javaLocale) Adds new basket receiver with generated external key
by internal principal (user or user group) add new BasketReceiver if basket-principal combination not exist
or by external receiverEmail add BasketReceiver if basket-email combination not exist and send email an external user with link for basket download.assetBasketCopy(Basket sourceBasket) Copies basket: only base info (without shared dates and basket receiver) and basket assets (only the original, seeassetBasketSetDerivates(Basket, Asset, List, boolean)without saved derivates be coped).voidassetBasketDelete(String basketKey) DELETE: assetbasket/{basketKey}voidassetBasketDelete(Basket basket) Deletes Basket from database if user is owner of it.javax.ws.rs.core.ResponseassetBasketEdit(String basketKey) POST: assetbasket/{basketKey}?data=[jsonDataMap]voidassetBasketExportDCM(String basketKey, String localeKey, String profileKey) GET:assetbasket/{basketKey}/exportdcm?localeKey={localeKey}&profileKey={profileKey}
QueryParam: localeKey is optional, can be id, internal description or language/country iso2 code,
if empty the content locale from session data be used
QueryParam: profileKey is optionalvoidassetBasketExportDCM(Basket basket, Locale locale, EntityProfile profile) Starts the workflow (@see WebDCMExportActionlet) to generate excel (DCM) export for all basket assets with base data and attributes.
using the entity profile (optional, default is all type attributes be exported) and
the given locale (optional, default is content locale from session data).voidassetBasketExportFile(Basket basket, mc.core.system.asset.export.AssetExport.AssetExportType assetExportType) Starts workflow (SystemWfType.ASSETBASKET_EXPORT_WORKFLOW) that exports all selected derivates of this Basket depending on given AssetExportType.
If no AssetExportType is given by default ZIP-export is used.
Throws UserException with message keymessage.workflow.info.startedto signal start of workflow.javax.ws.rs.core.ResponseassetBasketGet(String basketKey) GET: assetbasket/{basketKey}javax.ws.rs.core.ResponseGET: assetbasket/activemc.core.system.search.SearchFilterassetBasketGetFilterForShared(boolean onlyFullControl) Returns search filter for shared asset basket.
Asset.class is the class of basket item objects,
receiver is current user or his group,
criteria for shared is true criteria for valid from : shareValidFrom <= today <= shareValidUntilassetBasketGetShareUri(BasketReceiver basketReceiver, Locale javaLocale) Create URI for external share of basket.voidassetBasketImportDCM(String basketKey, String localeKey) POST:assetbasket/{basketKey}/importdcm?localeKey={localeKey}
QueryParam: localeKey is optional, can be id, internal description or language/country iso2 code,
if empty the content locale from session data be usedvoidassetBasketImportDCM(Basket basket, Locale locale, InputStream inputStream, String filename) Start the workflow (@see WebDCMImportActionlet) to import excel (DCM) file with base data and attributes using the given locale.javax.ws.rs.core.ResponsePOST: assetbasket?data=[jsonDataMap]assetBasketInsert(List<Asset> assets) Creates new asset basket from list of assets and set it as active for user.
As default - add original to derivate list (only if user has RightType.DOWNLOAD permission for it)
The maximal count of objects in basket is AbstractBasketDO.MAX_OBJECT_COUNT, else UserExceptionjavax.ws.rs.core.ResponseassetBasketInsert(Set<String> assetKey) POST: assetbasket/asset/list?assetKey={assetKey1}&assetKey={assetKey2}...voidassetBasketRemoveAsset(String basketKey, String assetKey) DELETE: assetbasket/{basketKey}/asset/{assetKey}voidassetBasketRemoveAsset(Basket basket, Asset asset) Removes asset from given basket.voidassetBasketRemoveAssetList(String basketKey, Set<String> assetKey) DELETE: assetbasket/{basketKey}/asset/list?assetKey={assetKey1}&assetKey={assetKey2}...voidassetBasketRemoveAssets(Basket basket, List<Asset> assets) Removes list of assets from given basket.voidassetBasketRemoveReceiver(String basketKey, String principalKey) DELETE: assetbasket/{basketKey}/principal/{principalKey}voidassetBasketRemoveReceiver(Basket basket, BasketReceiver basketReceiver) Removes a receiver from an asset basket.voidassetBasketReSend(String basketKey, String principalKey, String localeKey) POST:assetbasket/{basketKey}/resend/principal/{principalKey}/?localeKey={localeKey}
QueryParam: localeKey is optional, can be id, internal description or language/country iso2 code,
if empty the UiJavaLocale be usedvoidassetBasketReSend(Basket basket, BasketReceiver basketReceiver, Locale javaLocale) Re-sends this basket to the basket receiver: send again email by external user or notification by internal user.assetBasketSave(Basket basket, DataMap dataMap) Inserts or updates given Basket by setting its fields from given dataMap.voidassetBasketSetActive(String basketKey) POST: assetbasket/{basketKey}/activevoidassetBasketSetActive(Basket basket) Sets this basket active for the session user.voidassetBasketSetDerivates(Basket basket, Asset asset, List<AssetDerivate> derivates, boolean includeOriginal) Selects which derivates for Asset should be included in the given Basket.
Asset must already been added to basket.
Overwrites any previous selection of derivates for this asset in the basket.
boolean includeOriginal for toggles inclusion of the original for Asset (only if user has RightType.DOWNLOAD permission for it)voidassetBasketToggleLock(String basketKey) POST: assetbasket/{basketKey}/togglelockvoidassetBasketToggleLock(Basket basket) Change lock flag for asset basket.
The locked basket cannot be overwritten or ZIP cannot be recreated
active basket cannot be lockedvoidassetChangeType(List<Asset> assets, AssetType targetAssetType) Start workflow to change the asset type for an list of assets to target type.voidassetChangeType(Set<String> assetKey, String assetTypeKey) POST: asset/changetype/list/{assetTypeKey}?assetKey={assetKey1}&assetKey={assetKey2}...mc.core.system.workflow.ActionParameterListassetChangeTypeSync(List<Asset> assets, AssetType targetAssetType) javax.ws.rs.core.ResponseGET:asset/collection/rootvoidassetConvert(String assetKey) POST: asset/{assetKey}/convertvoidassetConvert(String assetKey, String converterKey) POST: asset/{assetKey}/convert/{converterKey}voidassetConvert(List<Asset> assets) Starts conversion workflow for the given assets.voidassetConvert(Asset asset) Starts conversion workflow for given asset.
Throws UserException with message keymessage.workflow.info.startedto signal start of workflow.voidassetConvert(Collection collection) Starts conversion workflow for all assets in given collection.voidassetConvertList(Set<String> assetKey) POST: asset/convert/list?assetKey={assetKey1}&assetKey={assetKey2}...javax.ws.rs.core.ResponsePOST: asset/{assetKey}/copy?collectionKey={targetCollectionKey}
QueryParam: collectionKey is optional, else copy in same collectionassetCopy(List<Asset> sourceAssets, Collection parentCollection) Creates a copy of given assets to target collection.assetCopy(Asset sourceAsset, Collection parentCollection) Creates a copy of given Asset in parentCollection if given, otherwise in the primary collection of source asset.assetCopy(Asset sourceAsset, Collection parentCollection, AssetCopyFilter copyFilter) Creates a copy of given Asset in parentCollection if given, otherwise in the primary collection of source asset.javax.ws.rs.core.ResponseassetCopyList(Set<String> assetKey, String collectionKey) POST: asset/copy/list/{targetCollectionKey}?assetKey={assetKey1}&assetKey={assetKey1}...voidassetDelete(String assetKey) DELETE: asset/{assetKey}voidassetDelete(Asset asset) Checks if Asset is not used, else throws DeleteTiedElementException.
Check LifeCycleFlag:
if visible --> only recycle (set lifeSycleFlag to RECYCLED) with all versions if any (MC-4846)
else --> delete if Asset is not used, else throws DeleteTiedElementException.
if Asset has Role LEADER in the group --> recycle all variants in the group too (MC-4846)
Marks the Asset in database as deleted (set flag deleted and parent collection to null),
start asynchronously the delete asset workflow.
The corresponding file will be removed by periodically running cleanup job which checks for unreferenced files.voidassetDelete(Asset asset, boolean force) Checks if Asset is not used, else throws DeleteTiedElementException.
Check LifeCycleFlag:
if visible --> only recycle (set lifeSycleFlag to RECYCLED) with all versions if any (MC-4846)
else --> delete if Asset is not used, else throws DeleteTiedElementException.
if Asset has Role LEADER in the group --> recycle all variants in the group too (MC-4846)
Marks the Asset in database as deleted (set flag deleted and parent collection to null),
start asynchronously the delete asset workflow.
The corresponding file will be removed by periodically running cleanup job which checks for unreferenced files.voidassetDerivateDelete(String derivateKey) DELETE: assetderivate/{derivateKey}voidassetDerivateDelete(List<AssetDerivate> assetDerivates) Optimized for list: checks for each if AssetDerivate is used.voidassetDerivateDelete(AssetDerivate assetDerivate) Deletes AssetDerivate from database if not used.
The corresponding file will be removed by periodically running cleanup job which checks for unreferenced files.voidassetDerivateDeleteList(Set<String> derivateKey) DELETE: assetderivate/list?derivateKey={assetDerivateKey1}&derivateKey={assetDerivateKey2}...voidassetDerivateMaintain(String assettypeKey, Set<String> derivatetypeKey) POST: assetderivate/maintain/{assettypeKey}?derivatetypeKey={assetDerivateTypeKey1}&derivatetypeKey={ assetDerivateTypeKey2}...voidassetDerivateMaintain(AssetType assetType, List<AssetDerivateType> derivateTypes) Start conversion workflow for all assets of the asset type.
optionally specify which derivates should be generated by giving derivateTypes list.voidDELETE: assetderivatetype/{key}voidassetDerivateTypeDelete(AssetDerivateType assetDerivateType) Deletes AssetDerivateType from database if not used.javax.ws.rs.core.ResponsePOST: assetderivatetype/{key}?data=[datamap in json]javax.ws.rs.core.ResponsePOST: assetderivatetype?data=[jsonDataMap]voidassetDerivateTypeRemoveConversionCmd(String key, String commandKey) DELETE: assetderivatetype/{key}/conversioncommand/{commandkey}/removevoidassetDerivateTypeRemoveConversionCmd(AssetDerivateType assetDerivateType, ConverterCommand command) Removes ConverterCommand from list of ConverterCommands of this AssetDerivateType.voidDELETE: assetderivatetype/{key}/properties/removevoidDELETE: assetderivatetype/{key}/extractproperties/removevoidassetDerivateTypeRemoveExtractPropertiesCmd(AssetDerivateType assetDerivateType) Removes the extract properties command from this AssetDerivateType (sets it tonull) and deletes it.assetDerivateTypeSave(AssetDerivateType assetDerivateType, DataMap dataMap) Inserts or updates given AssetDerivateType by setting its fields from given dataMap.voidPOST: assetderivatetype/{key}/conversioncommand/set?data=[list of datamap in json]voidassetDerivateTypeSetConversionCmds(AssetDerivateType assetDerivateType, List<ConverterCommand> conversionCmds) Sets ConverterCommands for this AssetDerivateType.voidPOST: assetderivatetype/{key}/properties/set?data=[list of datamap in json]voidassetDerivateTypeSetConverterProperties(AssetDerivateType assetDerivateType, List<ConverterProperty> converterProperties) Sets list of ConverterProperty that are used for ConverterEngine of Converter Type.voidPOST: assetderivatetype/{key}/extractproperties?data=[datamap as json]voidassetDerivateTypeSetExtractPropertiesCmd(AssetDerivateType assetDerivateType, ConverterCommand extractPropertiesCmd) Sets ConverterCommand that is used as extract properties command for this AssetDerivateType.
A prior existing converter command is overwritten
user role: only UserBaseRole.CONFIGADMIN
javax.ws.rs.core.ResponsePOST: asset/{assetKey}?data=[json]assetGetFilename(IAsset entity) Gets filename for asset or derivate.assetGetMetadataValue(IAsset entity, IMetadataType metadataType) Gets the (locale independent) String value for given Asset or AssetDerivate and metadataType representing an attribute.mc.core.system.util.misc.StringMapassetGetMetadataValues(IAsset entity, List<IMetadataType> metadataTypes) Gets the (locale independent) String values for given Asset or AssetDerivate and List of metadataTypes representing the attributes.Gets asset store root collection.voidassetGroupAddVariant(String originalKey, String variantKey) POST: asset/{originalKey}/group/variant/{variantKey}voidassetGroupAddVariant(Asset variant, Asset leader) Adds an asset as a variant to the group for the leader asset.voidassetGroupChangeRole(String assetKey, String roleKey) POST:asset/{assetKey}/group/role/{roleKey}voidassetGroupChangeRole(Asset asset, Asset.AssetGroupRole targetRole) change the role of an asset within the asset's group to target role.delete last version of asset
the role of the deleted will be transferred to the previous VISIBLE version (if any)
WARNING:
case asset has role LEADER and has no versions - redirect to delete - remove asset with variants and its versions
case asset has role VERSION - remove this version, return null
case asset has no versions - redirect to delete - return nulljavax.ws.rs.core.ResponseassetGroupGetAssets(String groupKey, String roleKey) GET: asset/group/{groupKey}/members
QueryParam: roleKey is optional, else search only members with this role (seeAsset.AssetGroupRole)
For example: .../asset/group/143008afa9116c46/members returns all members of group with key "143008afa9116c46"
.../asset/group/143008afa9116c46/members?roleKey=VARIANT returns all members of group with key "143008afa9116c46" and role VARIANT
assetGroupGetAssets(String assetGroupId, Asset.AssetGroupRole roleToSearch) Gets list of assets in the group defined by assetGroupId with group role roleToSearch.javax.ws.rs.core.ResponseassetGroupGetLeader(String assetKey) GET: asset/{assetKey}/group/leaderassetGroupGetLeader(Asset variant) If this asset is a variant returns the leader of the variant, else returns null.javax.ws.rs.core.ResponseassetGroupGetMaster(String assetKey) GET: asset/{assetKey}/group/masterassetGroupGetMaster(Asset version) If this asset is a version returns the master (leader/original or variant) of the version, leader or variant.javax.ws.rs.core.ResponseassetGroupGetVersions(String assetKey) GET: asset/{assetKey}/group/versionsassetGroupGetVersions(Asset master) Returns list of asset with group role AssetGroupRole.VERSION for which given Asset is the master (masterId in CE).assetGroupInsertVariant(AssetInsertParameter insertParameter) Inserts given Asset as variant of Asset: add to asset group of leader asset with role variant
if leader asset is not in group, make the new group with leader as group leader and new asset with role variant
properties in AssetInsertParameter:
AssetInsertParameter.file optional for asset as placeholder AssetInsertParameter.filename name of file (not path) asset optional, may contain additional information in it's fields AssetInsertParameter.groupLeader, leader asset, mandatory assetType and collection are taken from leader asset. permission: RightType.EDITT by leader asset
permission: RightType.INSERT by target collectionassetGroupInsertVersion(AssetInsertParameter insertParameter) Inserts given Asset as variant of Asset: add to asset group of leader asset with role variant.
If leader asset is not in group, make the new group with leader as group leader and new asset with role variant.voidassetGroupRemove(String assetKey) DELETE: asset/{assetKey}/groupvoidassetGroupRemove(Asset leader) Dissolves this group by setting group id to null and remove group role by all assets in group, but not with role AssetGroupRole.VARIANT.voidassetGroupRemoveMember(String assetKey) DELETE: asset/{assetKey}/group/membervoidassetGroupRemoveMember(Asset asset) Removes asset and asset versions from asset group
permission: RightType.EDIT by asset
voidDELETE: assethotfolder/{key}voidassetHotfolderDelete(AssetHotfolder assetHotfolder) Deletes AssetHotfolder from database if not used.javax.ws.rs.core.ResponseassetHotfolderEdit(String key) POST: assethotfolder/{key}?data=[datamap in json]javax.ws.rs.core.ResponsePOST: assethotfolder?data=[jsonDataMap]assetHotfolderSave(AssetHotfolder assetHotfolder, DataMap dataMap) Inserts or updates given AssetHotfolder by setting its fields from given dataMap.javax.ws.rs.core.ResponseassetInsert(boolean extractArchive) POST: asset?data=[json]assetInsert(AssetInsertParameter assetInsertParameter) Inserts an asset according to properties in AssetInsertParameter:
AssetInsertParameter.file, macResFile, fileStream, macResfileStream: Either file and optionally, macResFile, or fileStream and optionally, macResStream must be set to designate the physical file which is to be stored in AssetStore for the new asset.
For template assets are the both parameter AssetInsertParameter.file and fileStream optional AssetInsertParameter.filename optional, name of file (not path) if empty the name of AssetInsertParameter.file be used asset optional, may contain additional information in it's fields If AssetInsertParameter.collection is given the asset is stored in this collection, otherwise in root collection of AssetStore.assetInsert(Asset asset) Inserts a new asset complex entity object without physical file.
permission: RightType.INSERT by target collection
assetInsertExternal(Asset asset, Collection collection, String externalURI, AssetType assetType, boolean overwrite) Inserts an asset from an external URI.
permission: RightType.INSERT by target collection
voidPOST: asset/{assetKey}/move/{collectionKey}voidassetMove(List<Asset> sourceAssets, Collection targetCollection) Moves a list of assets to target collection.voidassetMove(Asset sourceAsset, Collection targetCollection) Moves the asset to target collection.voidassetMoveList(Set<String> assetKey, String collectionKey) POST: asset/move/list/{targetCollectionKey}?assetKey={assetKey1}&assetKey={assetKey1}...voidassetPipelineDelete(AssetPipeline assetPipeline) Deletes AssetPipeline from database if not used.assetPipelineSave(AssetPipeline assetPipeline, DataMap dataMap) Inserts or updates given AssetPipeline by setting its fields from given dataMap.voidassetPreview(Asset asset, String format, String templateName, OutputStream os) Write preview of asset to output stream in given format using export/publish framework.voidassetPrimaryCollectionChange(Asset asset, Collection newPrimaryCollection) MC-5324 changes the primary collection of given asset.restore an asset from recycle bin.search all recycled assets for current userjavax.ws.rs.core.ResponseassetRecycleRestore(String assetKey) POST: asset/{assetKey}/restorevoidassetRecycleRestore(Asset asset) restore an asset from recycle bin.javax.ws.rs.core.ResponseassetReplaceFile(String assetKey) POST: asset/{assetKey}/replacefilevoidassetReplaceFile(Asset asset, InputStream fileStream, String filename) Inserts file into store and set new file id to asset and starts asset processing workflow (conversion or processing of AssetPipeline).Inserts (id == 0) or updates( if persistent: id > 0) given Asset by setting its fields from given dataMap.voidassetSetDerivateFile(String assetKey, String converterTypeKey) POST: asset/{assetKey}/derivatefile
QueryParam: converterTypeKey is optionalvoidassetSetDerivateFile(Asset asset, InputStream fileStream, String filename, ConverterType converterType) set additional file and creates derivates for the asset from this file and system wide converter configuration.voidassetSetMetadataValues(IAsset entity, DataMap metadata, mc.core.system.util.misc.StringMap metaCategoryMap) Sets values stored in DataMap metadata to attributes whose internalDescription is the key in the DataMap.javax.ws.rs.core.ResponseassetTypeCopy(String key) POST: assettype/{key}/copyassetTypeCopy(AssetType assetType) Creates a copy of given AssetType.voidassetTypeDelete(String key) DELETE: assettype/{key}voidassetTypeDelete(AssetType assetType) Deletes AssetType from database if not used.javax.ws.rs.core.ResponseassetTypeEdit(String key) POST: assettype/{key}?data=[datamap in json]javax.ws.rs.core.ResponsePOST: assettype?data=[jsonDataMap]voidassetTypeRemoveAttribute(String key, String attributeKey, boolean force) DELETE: assettype/{key}/attribute/{attributeKey}?force=falsevoidassetTypeRemoveAttribute(AssetType assetType, Attribute attribute, boolean force) Removes assigned Attribute from the type attributes of this AssetType.voidassetTypeRemoveAttributeType(String key, String attributeTypeKey, boolean force) DELETE: assettype/{key}/attributetype/{attributeTypeKey}?force=falsevoidassetTypeRemoveAttributeType(AssetType assetType, AttributeType attributeType, boolean force) Removes assigned AttributeType from allowed AttributeTypes of this AssetType.assetTypeSave(AssetType assetType, DataMap dataMap) Inserts or updates given AssetType by setting its fields from given dataMap.javax.ws.rs.core.ResponseconverterTypeCopy(String key) POST: convertertype/{key}/copyconverterTypeCopy(ConverterType sourceConverterType) Creates copy of this ConverterType.voidDELETE: convertertype/{key}voidconverterTypeDelete(ConverterType converterType) Deletes this ConverterType from database with check in use.javax.ws.rs.core.ResponseconverterTypeEdit(String key) POST: convertertype/{key}?data=[datamap in json]javax.ws.rs.core.ResponsePOST: convertertype?data=[jsonDataMap]voidDELETE: convertertype/{key}/properties/removevoidconverterTypeRemoveDerivateTypes(String key, Set<String> derivateTypeKey) DELETE: convertertype/{key}/remove?derivateTypeKey=abc&derivateTypeKey=cdevoidconverterTypeRemoveDerivateTypes(ConverterType converterType, List<AssetDerivateType> derivateTypes) Removes all given AssetDerivateTypes from list of derivate types assigned to this ConverterType.voidDELETE: convertertype/{key}/extractproperties/removevoidconverterTypeRemoveExtractPropertiesCmd(ConverterType converterType) Removes the extract properties command from this ConverterType (sets it tonull) and deletes it.voidconverterTypeRemovePostProcessCmd(String key, String converterCommandKey) DELETE: convertertype/{key}/postprocess/{commandkey}/removevoidconverterTypeRemovePostProcessCmd(ConverterType converterType, ConverterCommand command) Removes given ConverterCommand from list of post process commands of this ConverterType and deletes the ConverterCommand.voidconverterTypeRemovePreProcessCmd(String key, String converterCommandKey) DELETE: convertertype/{key}/preprocess/{commandkey}/removevoidconverterTypeRemovePreProcessCmd(ConverterType converterType, ConverterCommand command) Removes given ConverterCommand from list of pre process commands of this ConverterType and deletes the ConverterCommand itself.converterTypeSave(ConverterType converterType, DataMap dataMap) Inserts or updates given ConverterType by setting its fields from given dataMap.voidPOST: convertertype/{key}/properties/set?data=[list of datamaps in json]voidconverterTypeSetConverterProperties(ConverterType converterType, List<ConverterProperty> converterProperties) Sets list of ConverterProperty that are used for this ConverterEngine.
The ConverterProperty in the list belong only to this ConverterEngine and need to be deleted when removed.voidPOST: convertertype/{key}/extractproperties?data=[datamap as json]voidconverterTypeSetExtractPropertiesCmd(ConverterType converterType, ConverterCommand converterCmd) Sets ConverterCommand that is used as extract properties command for this ConverterType.
A prior existing converter command is overwrittenvoidPOST: convertertype/{key}/postprocess/set?data=[list of datamaps in json]voidconverterTypeSetPostProcessCmds(ConverterType converterType, List<ConverterCommand> postProcessCmds) Sets list of ConverterCommands that are used as post process commands for this ConverterType.
The ConverterCommands in the list belong only to this ConverterType and need to be deleted when removed.voidPOST: convertertype/{key}/preprocess/set?data=[list of datamaps in json]voidconverterTypeSetPreProcessCmds(ConverterType converterType, List<ConverterCommand> preProcessCmds) Sets list of ConverterCommands that are used as pre process commands for this ConverterType.voidfileTypeDelete(String key) DELETE: filetype/{key}voidfileTypeDelete(FileType fileType) Deletes FileType from database if not used by AssetPipeline.javax.ws.rs.core.ResponsefileTypeEdit(String key) POST: filetype/{key}?data=[datamap in json]javax.ws.rs.core.ResponsePOST: filetype?data=[jsonDataMap]fileTypeSave(FileType fileType, DataMap dataMap) Inserts or updates given FileType by setting its fields from given dataMap.Methods inherited from class mc.core.domain.base.AbstractAPI
getAll, getAll, getFromId, getFromInternalDescription, getReference, ref, ref
-
Constructor Details
-
AssetRI
public AssetRI()
-
-
Method Details
-
assetCollectionGetRoot
@GET @Path("asset/collection/root") public javax.ws.rs.core.Response assetCollectionGetRoot() throws ApplicationException, IOExceptionGET:asset/collection/rootGet root collection
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetGetRootCollection()
-
assetInsert
@POST @Path("asset") public javax.ws.rs.core.Response assetInsert(@QueryParam("extractArchive") boolean extractArchive) throws ApplicationException, IOException POST: asset?data=[json]Insert a new asset from for each file item in POST body
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetInsert(AssetInsertParameter param)
-
assetEdit
@POST @Path("asset/{assetKey}") public javax.ws.rs.core.Response assetEdit(@PathParam("assetKey") String assetKey) throws ApplicationException, IOException POST: asset/{assetKey}?data=[json]Update an asset with data in the json map. Optionally, replace file with file in request body.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetSave(Asset asset, DataMap dataMap)
-
assetDelete
@DELETE @Path("asset/{assetKey}") public void assetDelete(@PathParam("assetKey") String assetKey) throws ApplicationException DELETE: asset/{assetKey}- Parameters:
assetKey- unique key to identify asset- Throws:
ApplicationExceptionDeleteTiedElementException- if Asset is in use- See Also:
-
for usage of Asset Checks if Asset is not used, else throws DeleteTiedElementException.
Check LifeCycleFlag:
if visible --> only recycle (set lifeSycleFlag to RECYCLED) with all versions if any (MC-4846)
else --> delete if Asset is not used, else throws DeleteTiedElementException.
if Asset has Role LEADER in the group --> recycle all variants in the group too (MC-4846)
Marks the Asset in database as deleted (set flag deleted and parent collection to null),
start asynchronously the delete asset workflow.
The corresponding file will be removed by periodically running cleanup job which checks for unreferenced files.
permission by edit: RightType.DELETE by asset
-
assetRecycleRestore
@POST @Path("asset/{assetKey}/restore") public javax.ws.rs.core.Response assetRecycleRestore(@PathParam("assetKey") String assetKey) throws ApplicationException, IOException POST: asset/{assetKey}/restorerestore an asset from recycle bin
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetRecycleRestore(Asset asset)
-
assetReplaceFile
@POST @Path("asset/{assetKey}/replacefile") public javax.ws.rs.core.Response assetReplaceFile(@PathParam("assetKey") String assetKey) throws ApplicationException, IOException POST: asset/{assetKey}/replacefileReplace original file for the given asset with file in request body.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetReplaceFile(Asset asset, InputStream file, String filename)
-
assetSetDerivateFile
@POST @Path("asset/{assetKey}/derivatefile") public void assetSetDerivateFile(@PathParam("assetKey") String assetKey, @QueryParam("converterTypeKey") String converterTypeKey) throws ApplicationException, IOException POST: asset/{assetKey}/derivatefile
QueryParam: converterTypeKey is optionalSet additional derivate file for the given asset with file in request body.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetSetDerivateFile(Asset, InputStream, String, ConverterType)
-
assetCopy
@POST @Path("asset/{assetKey}/copy") public javax.ws.rs.core.Response assetCopy(@PathParam("assetKey") String assetKey, @QueryParam("collectionKey") String collectionKey) throws ApplicationException, IOException POST: asset/{assetKey}/copy?collectionKey={targetCollectionKey}
QueryParam: collectionKey is optional, else copy in same collectionCopy an asset to the given target collection.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetCopy(Asset sourceAsset, Collection parentCollection)
-
assetCopyList
@POST @Path("asset/copy/list/{collectionKey}") public javax.ws.rs.core.Response assetCopyList(@QueryParam("assetKey") Set<String> assetKey, @PathParam("collectionKey") String collectionKey) throws ApplicationException, IOException POST: asset/copy/list/{targetCollectionKey}?assetKey={assetKey1}&assetKey={assetKey1}...
QueryParam: assetKey is mandatoryCopy an asset list to the target collection.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetCopy(List sourceAssets, Collection parentCollection)
-
assetConvert
@POST @Path("asset/{assetKey}/convert") public void assetConvert(@PathParam("assetKey") String assetKey) throws ApplicationException POST: asset/{assetKey}/convertStart an asset conversion for a single asset.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetConvert(Asset asset)
-
assetConvert
@POST @Path("asset/{assetKey}/convert/{converterKey}") public void assetConvert(@PathParam("assetKey") String assetKey, @PathParam("converterKey") String converterKey) throws ApplicationException POST: asset/{assetKey}/convert/{converterKey}Start an asset conversion for a single asset. Only generates derivatives of a single converter.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetConvert(Asset asset)
-
assetConvertList
@POST @Path("asset/convert/list") public void assetConvertList(@QueryParam("assetKey") Set<String> assetKey) throws ApplicationException POST: asset/convert/list?assetKey={assetKey1}&assetKey={assetKey2}...
QueryParam: assetKey is mandatoryStart an asset conversion for a list of assets.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetConvert(List assets)
-
assetChangeType
@POST @Path("asset/changetype/list/{assetTypeKey}") public void assetChangeType(@QueryParam("assetKey") Set<String> assetKey, @PathParam("assetTypeKey") String assetTypeKey) throws ApplicationException, IOException POST: asset/changetype/list/{assetTypeKey}?assetKey={assetKey1}&assetKey={assetKey2}...
QueryParam: assetKey is mandatoryStart an asset type change for a list of assets.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetChangeType(List, AssetType)
-
assetMove
@POST @Path("asset/{assetKey}/move/{collectionKey}") public void assetMove(@PathParam("assetKey") String assetKey, @PathParam("collectionKey") String collectionKey) throws ApplicationException POST: asset/{assetKey}/move/{collectionKey}Move an asset to a target collection.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetMove(Asset sourceAsset, Collection targetCollection)
-
assetMoveList
@POST @Path("asset/move/list/{collectionKey}") public void assetMoveList(@QueryParam("assetKey") Set<String> assetKey, @PathParam("collectionKey") String collectionKey) throws ApplicationException POST: asset/move/list/{targetCollectionKey}?assetKey={assetKey1}&assetKey={assetKey1}...
QueryParam: assetKey is mandatoryMove a list of assets to a given target collection.
- Throws:
ApplicationException- See Also:
-
AssetAPI#assetMove(List assets)
-
assetBasketGet
@GET @Path("assetbasket/{basketKey}") public javax.ws.rs.core.Response assetBasketGet(@PathParam("basketKey") String basketKey) throws ApplicationException, IOException GET: assetbasket/{basketKey}Get an asset basket. returns error if basket is not an asset basket.
- Throws:
ApplicationExceptionIOException- See Also:
-
BaseRI#getFromKey(String, String)
-
assetBasketEdit
@POST @Path("assetbasket/{basketKey}") public javax.ws.rs.core.Response assetBasketEdit(@PathParam("basketKey") String basketKey) throws UserException, ApplicationException, IOException POST: assetbasket/{basketKey}?data=[jsonDataMap]Save changes to a base data of asset basket with data provided in the json data map.
-
assetBasketGetActiveForUser
@GET @Path("assetbasket/active") public javax.ws.rs.core.Response assetBasketGetActiveForUser() throws ApplicationException, IOExceptionGET: assetbasket/activeGet the active asset basket for the current user.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetBasketActiveForUser()
-
assetBasketSetActive
@POST @Path("assetbasket/{basketKey}/active") public void assetBasketSetActive(@PathParam("basketKey") String basketKey) throws ApplicationException POST: assetbasket/{basketKey}/activeSet a given asset basket to active.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetBasketSetActive(Basket basket)
-
assetBasketToggleLock
@POST @Path("assetbasket/{basketKey}/togglelock") public void assetBasketToggleLock(@PathParam("basketKey") String basketKey) throws ApplicationException POST: assetbasket/{basketKey}/togglelockLock an asset basket to prevent modification.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetBasketToggleLock(Basket basket)
-
assetBasketAddAsset
@POST @Path("assetbasket/{basketKey}/asset/{assetKey}") public void assetBasketAddAsset(@PathParam("basketKey") String basketKey, @PathParam("assetKey") String assetKey) throws ApplicationException POST: assetbasket/{basketKey}/asset/{assetKey}Add a given asset to a given basket.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetBasketAddAsset(Basket basket, Asset asset)
-
assetBasketAddAssetList
@POST @Path("assetbasket/{basketKey}/asset/list") public void assetBasketAddAssetList(@PathParam("basketKey") String basketKey, @QueryParam("assetKey") Set<String> assetKey) throws ApplicationException POST: assetbasket/{basketKey}/asset/list?assetKey={assetKey1}&assetKey={assetKey2}...
QueryParam: assetKey is mandatoryList the assets included in a given asset basket.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetBasketAddAssets(Basket basket, List assets)
-
assetBasketAddAssetDerivateList
@POST @Path("assetbasket/{basketKey}/asset/{assetKey}/assetderivate/list") public void assetBasketAddAssetDerivateList(@PathParam("basketKey") String basketKey, @PathParam("assetKey") String assetKey, @QueryParam("derivateKey") Set<String> derivateKey, @QueryParam("includeOriginal") boolean includeOriginal) throws ApplicationException POST: assetbasket/{basketKey}/asset/{assetKey}/assetderivate/list?derivateKey={assetDerivateKey1}& derivateKey={assetDerivateKey2}...
QueryParam: derivateKey is mandatory
QueryParam: includeOriginal is mandatoryModify the list of derivates for given asset included in the given asset basket.
- Throws:
ApplicationException
-
assetBasketRemoveAsset
@DELETE @Path("assetbasket/{basketKey}/asset/{assetKey}") public void assetBasketRemoveAsset(@PathParam("basketKey") String basketKey, @PathParam("assetKey") String assetKey) throws ApplicationException DELETE: assetbasket/{basketKey}/asset/{assetKey}Remove a single asset from a basket.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetBasketRemoveAsset(Basket basket, Asset asset)
-
assetBasketRemoveAssetList
@DELETE @Path("assetbasket/{basketKey}/asset/list") public void assetBasketRemoveAssetList(@PathParam("basketKey") String basketKey, @QueryParam("assetKey") Set<String> assetKey) throws ApplicationException DELETE: assetbasket/{basketKey}/asset/list?assetKey={assetKey1}&assetKey={assetKey2}...
QueryParam: assetKey is mandatoryRemove a list of assets from a given basket.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetBasketRemoveAssets(Basket basket, List asset)
-
assetBasketInsert
@POST @Path("assetbasket") public javax.ws.rs.core.Response assetBasketInsert() throws UserException, ApplicationException, IOExceptionPOST: assetbasket?data=[jsonDataMap]Insert a new empty asset basket with data provided in the json data map and set it as active.
-
assetBasketInsert
@POST @Path("assetbasket/asset/list") public javax.ws.rs.core.Response assetBasketInsert(@QueryParam("assetKey") Set<String> assetKey) throws ApplicationException, IOException POST: assetbasket/asset/list?assetKey={assetKey1}&assetKey={assetKey2}...
QueryParam: assetKey is mandatoryAdd a list of assets to a new basket.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetBasketInsert(List asset)
-
assetBasketDelete
@DELETE @Path("assetbasket/{basketKey}") public void assetBasketDelete(@PathParam("basketKey") String basketKey) throws ApplicationException DELETE: assetbasket/{basketKey}deletes Basket from database if user is owner of it. For shared basket only shared link for current user is removed.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetBasketDelete(Basket basket)
-
assetBasketAddReceiver
@POST @Path("assetbasket/{basketKey}/principal/{principalKey}") public void assetBasketAddReceiver(@PathParam("basketKey") String basketKey, @PathParam("principalKey") String principalKey, @QueryParam("localeKey") String localeKey) throws UserException, ApplicationException POST: assetbasket/{basketKey}/principal/{principalKey}/?localeKey={localeKey}
QueryParam: localeKey is optional, can be id, internal description or language/country iso2 code. if empty the UiJavaLocale be usedAdd recipient for given basket, with notification via email template in the given local. For an external recipient, the key is the email address.
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI.assetBasketAddReceiver(Basket basket, Principal principal, String receiverEmail, java.util.Locale javaLocale)
-
assetBasketRemoveReceiver
@DELETE @Path("assetbasket/{basketKey}/principal/{principalKey}") public void assetBasketRemoveReceiver(@PathParam("basketKey") String basketKey, @PathParam("principalKey") String principalKey) throws UserException, ApplicationException DELETE: assetbasket/{basketKey}/principal/{principalKey}Remove receiver defined by given principal key from given basket.
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI#assetBasketRemoveReceiver(Basket basket, Principal principal)
-
assetBasketReSend
@POST @Path("assetbasket/{basketKey}/resend/principal/{principalKey}") public void assetBasketReSend(@PathParam("basketKey") String basketKey, @PathParam("principalKey") String principalKey, @QueryParam("localeKey") String localeKey) throws ApplicationException POST:assetbasket/{basketKey}/resend/principal/{principalKey}/?localeKey={localeKey}
QueryParam: localeKey is optional, can be id, internal description or language/country iso2 code,
if empty the UiJavaLocale be usedResend basket email for given basket key to given principal using template for given locale.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetBasketReSend(Basket basket, BasketReceiver basketReceiver, java.util.Locale javaLocale)
-
assetBasketImportDCM
@POST @Path("assetbasket/{basketKey}/importdcm") public void assetBasketImportDCM(@PathParam("basketKey") String basketKey, @QueryParam("localeKey") String localeKey) throws ApplicationException, IOException POST:assetbasket/{basketKey}/importdcm?localeKey={localeKey}
QueryParam: localeKey is optional, can be id, internal description or language/country iso2 code,
if empty the content locale from session data be usedImport content from DCM Excel file for the given basket for the given locale.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetBasketImportDCM(Basket basket, Locale locale, InputStream is, String filename)
-
assetBasketExportDCM
@GET @Path("assetbasket/{basketKey}/exportdcm") public void assetBasketExportDCM(@PathParam("basketKey") String basketKey, @QueryParam("localeKey") String localeKey, @QueryParam("profileKey") String profileKey) throws ApplicationException, IOException GET:assetbasket/{basketKey}/exportdcm?localeKey={localeKey}&profileKey={profileKey}
QueryParam: localeKey is optional, can be id, internal description or language/country iso2 code,
if empty the content locale from session data be used
QueryParam: profileKey is optionalExport content into DCM Excel file for the given basket for the given local using given attribute profile.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetBasketExportDCM(Basket basket, Locale locale, EntityProfile profile)
-
assetGroupChangeRole
@POST @Path("asset/{assetKey}/group/role/{roleKey}") public void assetGroupChangeRole(@PathParam("assetKey") String assetKey, @PathParam("roleKey") String roleKey) throws ApplicationException POST:asset/{assetKey}/group/role/{roleKey}- Throws:
ApplicationException- See Also:
-
AssetAPI.assetGroupChangeRole(Asset asset, AssetGroupRole targetRole)for valid roleKeys
-
assetGroupRemove
@DELETE @Path("asset/{assetKey}/group") public void assetGroupRemove(@PathParam("assetKey") String assetKey) throws ApplicationException DELETE: asset/{assetKey}/group- Throws:
ApplicationException- See Also:
-
AssetAPI.assetGroupRemove(Asset asset)
-
assetGroupRemoveMember
@DELETE @Path("asset/{assetKey}/group/member") public void assetGroupRemoveMember(@PathParam("assetKey") String assetKey) throws ApplicationException DELETE: asset/{assetKey}/group/member- Throws:
ApplicationException- See Also:
-
AssetAPI.assetGroupRemoveMember(Asset asset)
-
assetGroupGetAssets
@GET @Path("asset/group/{groupKey}/members") public javax.ws.rs.core.Response assetGroupGetAssets(@PathParam("groupKey") String groupKey, @QueryParam("roleKey") String roleKey) throws ApplicationException, IOException GET: asset/group/{groupKey}/members
QueryParam: roleKey is optional, else search only members with this role (seeAsset.AssetGroupRole)
For example: .../asset/group/143008afa9116c46/members returns all members of group with key "143008afa9116c46"
.../asset/group/143008afa9116c46/members?roleKey=VARIANT returns all members of group with key "143008afa9116c46" and role VARIANT
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetGroupGetAssets(String assetGroupKey, AssetGroupRole roleToSearch)
-
assetGroupGetVersions
@GET @Path("asset/{assetKey}/group/versions") public javax.ws.rs.core.Response assetGroupGetVersions(@PathParam("assetKey") String assetKey) throws ApplicationException, IOException GET: asset/{assetKey}/group/versions- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetGroupGetAssets(String assetGroupId, AssetGroupRole roleToSearch)
-
assetGroupGetMaster
@GET @Path("asset/{assetKey}/group/master") public javax.ws.rs.core.Response assetGroupGetMaster(@PathParam("assetKey") String assetKey) throws ApplicationException, IOException GET: asset/{assetKey}/group/master- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetGroupGetMaster(Asset variant)
-
assetGroupGetLeader
@GET @Path("asset/{assetKey}/group/leader") public javax.ws.rs.core.Response assetGroupGetLeader(@PathParam("assetKey") String assetKey) throws ApplicationException, IOException GET: asset/{assetKey}/group/leader- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetGroupGetLeader(Asset variant)
-
assetGroupAddVariant
@POST @Path("asset/{originalKey}/group/variant/{variantKey}") public void assetGroupAddVariant(@PathParam("originalKey") String originalKey, @PathParam("variantKey") String variantKey) throws ApplicationException, IOException POST: asset/{originalKey}/group/variant/{variantKey}- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetGroupAddVariant(Asset variant, Asset original)
-
assetDerivateDelete
@DELETE @Path("assetderivate/{derivateKey}") public void assetDerivateDelete(@PathParam("derivateKey") String derivateKey) throws ApplicationException DELETE: assetderivate/{derivateKey}- Throws:
ApplicationException- See Also:
-
AssetAPI.assetDerivateDelete(AssetDerivate assetDerivate)
-
assetDerivateDeleteList
@DELETE @Path("assetderivate/list") public void assetDerivateDeleteList(@QueryParam("derivateKey") Set<String> derivateKey) throws ApplicationException DELETE: assetderivate/list?derivateKey={assetDerivateKey1}&derivateKey={assetDerivateKey2}...
QueryParam: derivateKey is mandatory- Throws:
ApplicationException- See Also:
-
AssetAPI.assetDerivateDelete(List assetDerivates)
-
assetDerivateMaintain
@POST @Path("assetderivate/maintain/{assettypeKey}") public void assetDerivateMaintain(@PathParam("assettypeKey") String assettypeKey, @QueryParam("derivatetypeKey") Set<String> derivatetypeKey) throws ApplicationException, UserException POST: assetderivate/maintain/{assettypeKey}?derivatetypeKey={assetDerivateTypeKey1}&derivatetypeKey={ assetDerivateTypeKey2}...
QueryParam: derivatetypeKey is mandatory- Throws:
ApplicationExceptionUserException- See Also:
-
AssetAPI.assetDerivateDelete(AssetDerivate assetDerivate)
-
assetTypeInsert
@POST @Path("assettype") public javax.ws.rs.core.Response assetTypeInsert() throws UserException, ApplicationException, IOExceptionPOST: assettype?data=[jsonDataMap]Insert a new asset type with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.assetTypeSave(AssetType, DataMap)
-
assetTypeEdit
@POST @Path("assettype/{key}") public javax.ws.rs.core.Response assetTypeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException POST: assettype/{key}?data=[datamap in json]Save changes to a asset type with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.assetTypeSave(AssetType, DataMap)
-
assetTypeDelete
@DELETE @Path("assettype/{key}") public void assetTypeDelete(@PathParam("key") String key) throws UserException, ApplicationException DELETE: assettype/{key}Delete a asset type if not in use.
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI.assetTypeDelete(AssetType)
-
assetTypeRemoveAttribute
@DELETE @Path("assettype/{key}/attribute/{attributeKey}") public void assetTypeRemoveAttribute(@PathParam("key") String key, @PathParam("attributeKey") String attributeKey, @QueryParam("force") @DefaultValue("false") boolean force) throws UserException, ApplicationException DELETE: assettype/{key}/attribute/{attributeKey}?force=falseRemove a type attribute from asset type. Force is required to delete even if assets of this type have assignments to this attribute
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI#ctRemoveAttribute(AssetType, Attribute, boolean)
-
assetTypeRemoveAttributeType
@DELETE @Path("assettype/{key}/attributetype/{attributeTypeKey}") public void assetTypeRemoveAttributeType(@PathParam("key") String key, @PathParam("attributeTypeKey") String attributeTypeKey, @QueryParam("force") @DefaultValue("false") boolean force) throws UserException, ApplicationException DELETE: assettype/{key}/attributetype/{attributeTypeKey}?force=falseRemove an attribute type (object attributes) from asset type. Force is required to delete even if assets of this converter type have assignments to attributes of the attribute type
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI#ctRemoveAttributeType(AssetType, AttributeType, boolean)
-
assetTypeCopy
@POST @Path("assettype/{key}copy/") public javax.ws.rs.core.Response assetTypeCopy(@PathParam("key") String key) throws ApplicationException, IOException POST: assettype/{key}/copyCreate a copy of the asset type.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.assetTypeCopy(AssetType)
-
assetDerivateTypeInsert
@POST @Path("assetderivatetype") public javax.ws.rs.core.Response assetDerivateTypeInsert() throws UserException, ApplicationException, IOExceptionPOST: assetderivatetype?data=[jsonDataMap]Insert a new asset derivate type with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.assetDerivateTypeSave(AssetDerivateType, DataMap)
-
assetDerivateTypeEdit
@POST @Path("assetderivatetype/{key}") public javax.ws.rs.core.Response assetDerivateTypeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException POST: assetderivatetype/{key}?data=[datamap in json]Save changes to a asset derivate type with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.assetDerivateTypeSave(AssetDerivateType, DataMap)
-
assetDerivateTypeDelete
@DELETE @Path("assetderivatetype/{key}") public void assetDerivateTypeDelete(@PathParam("key") String key) throws UserException, ApplicationException DELETE: assetderivatetype/{key}Delete a asset derivate type if not in use.
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI.assetDerivateTypeDelete(AssetDerivateType)
-
assetDerivateTypeSetConversionCmds
@POST @Path("assetderivatetype/{key}/conversioncommand/set") public void assetDerivateTypeSetConversionCmds(@PathParam("key") String key) throws ApplicationException POST: assetderivatetype/{key}/conversioncommand/set?data=[list of datamap in json]sets converter commands for the asset derivate type
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetDerivateTypeSetConversionCmds(AssetDerivateType, List)
-
assetDerivateTypeRemoveConversionCmd
@DELETE @Path("assetderivatetype/{key}/conversioncommand/{commandkey}/remove") public void assetDerivateTypeRemoveConversionCmd(@PathParam("key") String key, @PathParam("commandkey") String commandKey) throws ApplicationException DELETE: assetderivatetype/{key}/conversioncommand/{commandkey}/removeremoves the converter command for the asset derivate type
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetDerivateTypeRemoveConversionCmd(AssetDerivateType, ConverterCommand)
-
assetDerivateTypeSetExtractPropertiesCmd
@POST @Path("assetderivatetype/{key}/extractproperties") public void assetDerivateTypeSetExtractPropertiesCmd(@PathParam("key") String key) throws ApplicationException POST: assetderivatetype/{key}/extractproperties?data=[datamap as json]sets the extract properties command for the converter type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetDerivateTypeSetExtractPropertiesCmd(AssetDerivateType, ConverterCommand)
-
assetDerivateTypeRemoveExtractPropertiesCmd
@DELETE @Path("assetderivatetype/{key}/extractproperties/remove") public void assetDerivateTypeRemoveExtractPropertiesCmd(@PathParam("key") String key) throws ApplicationException DELETE: assetderivatetype/{key}/extractproperties/removeremove the extract properties command for the converter type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetDerivateTypeRemoveExtractPropertiesCmd(AssetDerivateType)
-
assetDerivateTypeSetConverterProperties
@DELETE @Path("assetderivatetype/{key}/properties/set") public void assetDerivateTypeSetConverterProperties(@PathParam("key") String key) throws ApplicationException POST: assetderivatetype/{key}/properties/set?data=[list of datamap in json]Remove all converter property that are used for this asset derivate type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetDerivateTypeSetConverterProperties(AssetDerivateType, List)
-
assetDerivateTypeRemoveConverterProperties
@DELETE @Path("assetderivatetype/{key}/properties/remove") public void assetDerivateTypeRemoveConverterProperties(@PathParam("key") String key) throws ApplicationException DELETE: assetderivatetype/{key}/properties/removeRemove all converter property that are used for this asset derivate type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.assetDerivateTypeSetConverterProperties(AssetDerivateType, List)
-
converterTypeInsert
@POST @Path("convertertype") public javax.ws.rs.core.Response converterTypeInsert() throws UserException, ApplicationException, IOExceptionPOST: convertertype?data=[jsonDataMap]Insert a new converter type with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.converterTypeSave(ConverterType, DataMap)
-
converterTypeEdit
@POST @Path("convertertype/{key}") public javax.ws.rs.core.Response converterTypeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException POST: convertertype/{key}?data=[datamap in json]Save changes to a converter type with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.converterTypeSave(ConverterType, DataMap)
-
converterTypeDelete
@DELETE @Path("convertertype/{key}") public void converterTypeDelete(@PathParam("key") String key) throws UserException, ApplicationException DELETE: convertertype/{key}Delete a converter type if not in use.
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI.converterTypeDelete(ConverterType)
-
converterTypeCopy
@POST @Path("convertertype/{key}copy/") public javax.ws.rs.core.Response converterTypeCopy(@PathParam("key") String key) throws ApplicationException, IOException POST: convertertype/{key}/copyCreate a copy of the converter type.
- Throws:
ApplicationExceptionIOException- See Also:
-
AssetAPI.converterTypeCopy(ConverterType)
-
converterTypeRemoveDerivateTypes
@DELETE @Path("convertertype/{key}/remove") public void converterTypeRemoveDerivateTypes(@PathParam("key") String key, @QueryParam("derivateTypeKey") Set<String> derivateTypeKey) throws ApplicationException DELETE: convertertype/{key}/remove?derivateTypeKey=abc&derivateTypeKey=cdeRemove the derivate types from the converter type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.converterTypeRemoveDerivateTypes(ConverterType, List)
-
converterTypeSetConverterProperties
@POST @Path("convertertype/{key}/properties/set") public void converterTypeSetConverterProperties(@PathParam("key") String key) throws ApplicationException POST: convertertype/{key}/properties/set?data=[list of datamaps in json]Set list of converter property that are used for this converter engine.
- Throws:
ApplicationException- See Also:
-
AssetAPI.converterTypeSetConverterProperties(ConverterType, List)
-
converterTypeRemoveConverterProperties
@DELETE @Path("convertertype/{key}/properties/remove") public void converterTypeRemoveConverterProperties(@PathParam("key") String key) throws ApplicationException DELETE: convertertype/{key}/properties/removeRemove all converter property that are used for this converter engine.
- Throws:
ApplicationException- See Also:
-
AssetAPI.converterTypeSetConverterProperties(ConverterType, List)
-
converterTypeSetPreProcessCmds
@POST @Path("convertertype/{key}/preprocess/set") public void converterTypeSetPreProcessCmds(@PathParam("key") String key) throws ApplicationException POST: convertertype/{key}/preprocess/set?data=[list of datamaps in json]sets list of converter commands that are used as pre process commands for this converter type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.converterTypeSetPreProcessCmds(ConverterType, List)
-
converterTypeSetPostProcessCmds
@POST @Path("convertertype/{key}/postprocess/set") public void converterTypeSetPostProcessCmds(@PathParam("key") String key) throws ApplicationException POST: convertertype/{key}/postprocess/set?data=[list of datamaps in json]sets list of converter commands that are used as post process commands for this converter type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.converterTypeSetPostProcessCmds(ConverterType, List)
-
converterTypeRemovePreProcessCmd
@DELETE @Path("convertertype/{key}/preprocess/{commandkey}/remove") public void converterTypeRemovePreProcessCmd(@PathParam("key") String key, @PathParam("commandkey") String converterCommandKey) throws ApplicationException DELETE: convertertype/{key}/preprocess/{commandkey}/removeremoves the preprocess command from the converter type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.converterTypeRemovePreProcessCmd(ConverterType, ConverterCommand)
-
converterTypeRemovePostProcessCmd
@DELETE @Path("convertertype/{key}/postprocess/{commandkey}/remove") public void converterTypeRemovePostProcessCmd(@PathParam("key") String key, @PathParam("commandkey") String converterCommandKey) throws ApplicationException DELETE: convertertype/{key}/postprocess/{commandkey}/removeremoves the postprocess command from the converter type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.converterTypeRemovePostProcessCmd(ConverterType, ConverterCommand)
-
converterTypeRemoveExtractPropertiesCmd
@DELETE @Path("convertertype/{key}/extractproperties/remove") public void converterTypeRemoveExtractPropertiesCmd(@PathParam("key") String key) throws ApplicationException DELETE: convertertype/{key}/extractproperties/removeremoves the extract properties command from the converter type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.converterTypeRemoveExtractPropertiesCmd(ConverterType)
-
converterTypeSetExtractPropertiesCmd
@POST @Path("convertertype/{key}/extractproperties") public void converterTypeSetExtractPropertiesCmd(@PathParam("key") String key) throws ApplicationException POST: convertertype/{key}/extractproperties?data=[datamap as json]sets the extract properties command for the converter type.
- Throws:
ApplicationException- See Also:
-
AssetAPI.converterTypeSetExtractPropertiesCmd(ConverterType, ConverterCommand)
-
fileTypeInsert
@POST @Path("filetype") public javax.ws.rs.core.Response fileTypeInsert() throws UserException, ApplicationException, IOExceptionPOST: filetype?data=[jsonDataMap]Insert a new file type with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.fileTypeSave(FileType, DataMap)
-
fileTypeEdit
@POST @Path("filetype/{key}") public javax.ws.rs.core.Response fileTypeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException POST: filetype/{key}?data=[datamap in json]Save changes to a file type with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.fileTypeSave(FileType, DataMap)
-
fileTypeDelete
@DELETE @Path("filetype/{key}") public void fileTypeDelete(@PathParam("key") String key) throws UserException, ApplicationException DELETE: filetype/{key}Delete a file type if not in use.
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI.fileTypeDelete(mc.core.model.asset.FileType)
-
assetHotfolderInsert
@POST @Path("assethotfolder") public javax.ws.rs.core.Response assetHotfolderInsert() throws UserException, ApplicationException, IOExceptionPOST: assethotfolder?data=[jsonDataMap]Insert a new asset hotfolder with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.assetHotfolderSave(AssetHotfolder, DataMap)
-
assetHotfolderEdit
@POST @Path("assethotfolder/{key}") public javax.ws.rs.core.Response assetHotfolderEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException POST: assethotfolder/{key}?data=[datamap in json]Save changes to a asset hotfolder with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.assetHotfolderSave(AssetHotfolder, DataMap)
-
assetHotfolderDelete
@DELETE @Path("assethotfolder/{key}") public void assetHotfolderDelete(@PathParam("key") String key) throws UserException, ApplicationException DELETE: assethotfolder/{key}Delete a asset hotfolder if not in use.
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI.assetHotfolderDelete(AssetHotfolder)
-
assetArchivingTaskInsert
@POST @Path("assetarchiving") public javax.ws.rs.core.Response assetArchivingTaskInsert() throws UserException, ApplicationException, IOExceptionPOST: assetarchiving?data=[jsonDataMap]Insert a new asset archiving task with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.assetArchivingTaskSave(AssetArchivingTask, DataMap)
-
assetArchivingTaskEdit
@POST @Path("assetarchiving/{key}") public javax.ws.rs.core.Response assetArchivingTaskEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException POST: assetarchiving/{key}?data=[datamap in json]Save changes to the asset archiving task with data provided in the json data map.
- Throws:
UserExceptionApplicationExceptionIOException- See Also:
-
AssetAPI.assetArchivingTaskSave(AssetArchivingTask, DataMap)
-
assetArchivingTaskDelete
@DELETE @Path("assetarchiving/{key}") public void assetArchivingTaskDelete(@PathParam("key") String key) throws UserException, ApplicationException DELETE: assetarchiving/{key}Delete the asset archiving task if not in use.
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI.assetArchivingTaskDelete(AssetArchivingTask)
-
assetArchivingTaskPerform
@POST @Path("assetarchiving/{key}/perform") public void assetArchivingTaskPerform(@PathParam("key") String key) throws UserException, ApplicationException POST: assetarchiving/{key}/performperform the asset archiving task.
- Throws:
UserExceptionApplicationException- See Also:
-
AssetAPI.assetArchivingTaskPerform(AssetArchivingTask)
-
assetInsert
Inserts a new asset complex entity object without physical file.
permission: RightType.INSERT by target collection
- Parameters:
asset- mandatory, new Asset (id = 0), may carry additional information in its entity fields
if the asset type not set: default is AssetInitialData.ASSET_TYPE_DEFAULT
if the collection not set: insert into root collection of AssetStore.- Returns:
- newly inserted asset
- Throws:
ApplicationException
-
assetInsert
public AssetInsertResult assetInsert(AssetInsertParameter assetInsertParameter) throws ApplicationException Inserts an asset according to properties in AssetInsertParameter:
- AssetInsertParameter.file, macResFile, fileStream, macResfileStream: Either file and optionally, macResFile,
or fileStream and optionally, macResStream must be set to designate the physical file which is to be stored in
AssetStore for the new asset.
For template assets are the both parameter AssetInsertParameter.file and fileStream optional - AssetInsertParameter.filename optional, name of file (not path) if empty the name of AssetInsertParameter.file be used
- asset optional, may contain additional information in it's fields
- If AssetInsertParameter.collection is given the asset is stored in this collection, otherwise in root collection of AssetStore. If there already exist Assets in the same collection with the same filename a new Asset is inserted and the new count of Assets with this name is appended to it's name in brackets.
- If AssetInsertParameter.assetType is provided the corresponding AssetType is set for Asset, otherwise the AssetType is derived from the filename's extension.
- AssetInsertParameter.overwrite if true and there already exist Assets in the same collection with the same filename this Asset is overwritten
- AssetInsertParameter.extractArchive if true and the file is an archive, it's content is extracted and return is Pair.of (null, extracted collection), otherwise the archive file is stored as one Asset and return is Pair.of (asset, asset.getCollection())
permission: RightType.INSERT by target collection
- Parameters:
assetInsertParameter- AssetInsertParameter mandatory, must either contain reference to an existing file, or an open inputStream- Returns:
- AssetInsertResult which is Pair.of (newly inserted Asset, collection of newly inserted Asset) or Pair.of (null, extracted collection) if extractArchive is true
- Throws:
ApplicationException
- AssetInsertParameter.file, macResFile, fileStream, macResfileStream: Either file and optionally, macResFile,
or fileStream and optionally, macResStream must be set to designate the physical file which is to be stored in
AssetStore for the new asset.
-
assetInsertExternal
public AssetInsertResult assetInsertExternal(Asset asset, Collection collection, String externalURI, AssetType assetType, boolean overwrite) throws ApplicationException Inserts an asset from an external URI.
permission: RightType.INSERT by target collection
- Parameters:
asset- mandatory, new Asset (id = 0), may carry additional information in its entity fieldsexternalURI- mandatory, URI of the external fileassetType- optional, default is AssetInitialData.ASSET_TYPE_DEFAULTcollection- optional, target collection in which Asset should be inserted, if not set the root collection of AssetStore be used.overwrite- if true and there already exist Assets in the same collection with the same filename this Asset is overwritten- Returns:
- Pair.of (newly inserted Asset, collection of newly inserted Asset) or Pair.of (null, extracted collection) if extractArchive is true
- Throws:
ApplicationException
-
assetSave
Inserts (id == 0) or updates( if persistent: id > 0) given Asset by setting its fields from given dataMap.
permission by insert: RightType.INSERT by target collection
permission by edit: RightType.EDIT and edit allowed STATE by asset
- Parameters:
asset- mandatorydataMap- mandatory, contains values for the Asset's fields as key-value pairs- Returns:
- inserted or updated Asset.
- Throws:
ApplicationException
-
assetGroupDeleteLatestVersion
delete last version of asset
the role of the deleted will be transferred to the previous VISIBLE version (if any)
WARNING:
case asset has role LEADER and has no versions - redirect to delete - remove asset with variants and its versions
case asset has role VERSION - remove this version, return null
case asset has no versions - redirect to delete - return null- Parameters:
asset-- Returns:
- the previous VISIBLE version or null
- Throws:
ApplicationException
-
assetDelete
Checks if Asset is not used, else throws DeleteTiedElementException.
Check LifeCycleFlag:
if visible --> only recycle (set lifeSycleFlag to RECYCLED) with all versions if any (MC-4846)
else --> delete if Asset is not used, else throws DeleteTiedElementException.
if Asset has Role LEADER in the group --> recycle all variants in the group too (MC-4846)
Marks the Asset in database as deleted (set flag deleted and parent collection to null),
start asynchronously the delete asset workflow.
The corresponding file will be removed by periodically running cleanup job which checks for unreferenced files.
permission: RightType.DELETE by asset
- Parameters:
asset- mandatory- Throws:
ApplicationExceptionDeleteTiedElementException- if Asset is in use- See Also:
-
for usage of Asset
-
assetDelete
public void assetDelete(Asset asset, boolean force) throws DeleteTiedElementException, ApplicationException Checks if Asset is not used, else throws DeleteTiedElementException.
Check LifeCycleFlag:
if visible --> only recycle (set lifeSycleFlag to RECYCLED) with all versions if any (MC-4846)
else --> delete if Asset is not used, else throws DeleteTiedElementException.
if Asset has Role LEADER in the group --> recycle all variants in the group too (MC-4846)
Marks the Asset in database as deleted (set flag deleted and parent collection to null),
start asynchronously the delete asset workflow.
The corresponding file will be removed by periodically running cleanup job which checks for unreferenced files.
permission: RightType.DELETE by asset
- Parameters:
asset- mandatory- Throws:
ApplicationExceptionDeleteTiedElementException- if Asset is in use- See Also:
-
for usage of Asset
-
assetRecycleRestore
restore an asset from recycle bin.
permission: RightType.EDIT by asset (MC-4846)
asset group role:
AssetGroupRole.LEADER or NONE restore all member of group
AssetGroupRole.VARIANT restore with version only if leader of group is visible- Parameters:
asset- mandatory- Throws:
UserException- on missing permission or wrong group roleApplicationException
-
assetRecycledGetOriginalPath
restore an asset from recycle bin.
permission: RightType.EDIT by asset (MC-4846)
asset group role:
AssetGroupRole.LEADER or NONE restore all member of group
AssetGroupRole.VARIANT restore with version only if leader of group is visible- Parameters:
asset- mandatory- Returns:
- entity data with key ED_COLLECTION_PATH if any exists or null
original path of asset from deleted collection
-
assetRecycledSearch
public mc.core.system.util.misc.Pair<List<Asset>,mc.core.system.search.SearchResult> assetRecycledSearch()search all recycled assets for current user- Returns:
- pair of first result page and SearchResult
-
assetReplaceFile
public void assetReplaceFile(Asset asset, InputStream fileStream, String filename) throws ApplicationException Inserts file into store and set new file id to asset and starts asset processing workflow (conversion or processing of AssetPipeline).
permission: RightType.EDIT and edit allowed STATE by asset
- Parameters:
asset- mandatoryfileStream- mandatory, open InputStreamfilename- mandatory, name of file (not path)- Throws:
ApplicationException
-
assetSetDerivateFile
public void assetSetDerivateFile(Asset asset, InputStream fileStream, String filename, ConverterType converterType) throws ApplicationException set additional file and creates derivates for the asset from this file and system wide converter configuration. if converterType is not given it is determined through filename extension of given filename or file type of input stream. file and given converterType are stored at asset as entityData, so any re-conversion will also create the additional derivates again.- Parameters:
asset- mandatoryfileStream- mandatory. if filename and converterType is null mimeType is determined from the input file stream by the file magic numberfilename- optional. if given and converterType is null, converterType for producing derivates is determined from filename (extension/mimeType)converterType- optional. converterType is used to create the derivates from given file stream- Throws:
ApplicationException
-
assetConvert
Starts conversion workflow for all assets in given collection.
Throws UserException with message keymessage.workflow.info.startedto signal start of workflow.
permission: RightType.EDIT and edit allowed STATE by asset
- Parameters:
collection- mandatory- Throws:
ApplicationException
-
assetConvert
Starts conversion workflow for given asset.
Throws UserException with message keymessage.workflow.info.startedto signal start of workflow.
permission: RightType.EDIT and edit allowed STATE by asset
- Parameters:
asset- mandatory- Throws:
ApplicationException
-
assetConvert
Starts conversion workflow for the given assets.
Throws UserException with message keymessage.workflow.info.startedto signal start of workflow.
permission: RightType.EDIT and edit allowed STATE by asset
- Parameters:
assets- mandatory, must contain valid objects- Throws:
ApplicationException
-
assetCopy
Creates a copy of given Asset in parentCollection if given, otherwise in the primary collection of source asset.
permission: RightType.EDIT on sourceAsset
permission: RightType.INSERT on target collection
- Parameters:
sourceAsset- mandatory. Object to be copied.parentCollection- optional. Location of copy. Whennullis given the copy will be created in the primaryCollectionof the source asset. This parameter does also affect the location of variants and versions that are created during the copy operation.- Returns:
- the copied Asset
- Throws:
ApplicationException
-
assetCopy
public Asset assetCopy(Asset sourceAsset, Collection parentCollection, AssetCopyFilter copyFilter) throws ApplicationException Creates a copy of given Asset in parentCollection if given, otherwise in the primary collection of source asset.
permission: RightType.EDIT on sourceAsset
permission: RightType.INSERT on target collection
- Parameters:
sourceAsset- mandatory. Object to be copied.parentCollection- optional. Location of copy. Whennullis given the copy will be created in the primaryCollectionof the source asset. This parameter does also affect the location of variants and versions that are created during the copy operation.copyFilter- optional, uses default copy settings if null- Returns:
- the copied Asset
- Throws:
ApplicationException
-
assetCopy
public List<Asset> assetCopy(List<Asset> sourceAssets, Collection parentCollection) throws ApplicationException Creates a copy of given assets to target collection.
permission: RightType.EDIT by asset
permission: RightType.INSERT by target collection
- Parameters:
sourceAssets- mandatory, must contain valid objectsparentCollection- mandatory- Returns:
- the list of copied assets
- Throws:
ApplicationException
-
assetMove
public void assetMove(Asset sourceAsset, Collection targetCollection) throws ApplicationException, UserException Moves the asset to target collection.
permission: RightType.EDIT and edit allowed STATE by asset
permission: RightType.INSERT by target collection
- Parameters:
sourceAsset- mandatorytargetCollection- mandatory- Throws:
ApplicationExceptionUserException
-
assetMove
public void assetMove(List<Asset> sourceAssets, Collection targetCollection) throws ApplicationException, UserException Moves a list of assets to target collection. Alters primary collections.
permission: RightType.EDIT and edit allowed STATE by asset
permission: RightType.INSERT by target collection
- Parameters:
sourceAssets- Assets to move from their primary collections. Mandatory, must contain valid objectstargetCollection- New primary collection. Mandatory- Throws:
UserException- Error message about skipped moves due to missing permissions or workflows preventing the move.ApplicationException- Failure of move that was expected to succeed.
-
assetPrimaryCollectionChange
public void assetPrimaryCollectionChange(Asset asset, Collection newPrimaryCollection) throws UserException, ApplicationException MC-5324 changes the primary collection of given asset. Checks edit right and state, sets newPrimarycollection as primary collection sets oldPrimarycollection as secondary collection- Parameters:
complexEntity- mandatorynewPrimaryCollection- mandatory- Throws:
ApplicationExceptionUserException
-
assetChangeType
public void assetChangeType(List<Asset> assets, AssetType targetAssetType) throws ApplicationException, UserException Start workflow to change the asset type for an list of assets to target type.
removes existing type attributes form asset, if not matching configuration of new asset type.
removes existing derivatives from asset, if not matching converter configuration of new asset type.
starts asset processing workflow to create derivatives for new asset type converter configuration if necessary.
permission: NOT CHECKED!
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assets- mandatory, must contain valid objectstargetAssetType- mandatory, target asset type for change- Throws:
ApplicationExceptionUserException
-
assetChangeTypeSync
public mc.core.system.workflow.ActionParameterList assetChangeTypeSync(List<Asset> assets, AssetType targetAssetType) throws ApplicationException - Throws:
UserException- if edit permissions not granted for all assets.ApplicationException- See Also:
-
assetGetRootCollection
Gets asset store root collection.- Returns:
- the root collection
- Throws:
ApplicationException
-
assetPreview
public void assetPreview(Asset asset, String format, String templateName, OutputStream os) throws ApplicationException Write preview of asset to output stream in given format using export/publish framework.- Parameters:
asset- mandatoryformat- optional, PublishFormat as String. default is PDFtemplateName- optional, only for HTML format. the name of template file in namespace folder. default is html_asset_details.vmos- mandatory, output stream for writing result- Throws:
ApplicationException
-
assetGroupChangeRole
public void assetGroupChangeRole(Asset asset, Asset.AssetGroupRole targetRole) throws ApplicationException change the role of an asset within the asset's group to target role.
permission: RightType.EDIT by asset
- Parameters:
asset- mandatorytargetRole- mandatory- Throws:
ApplicationException
-
assetGroupRemove
Dissolves this group by setting group id to null and remove group role by all assets in group, but not with role AssetGroupRole.VARIANT.
permission: RightType.EDIT by leader
- Parameters:
leader- mandatory, asset with role AssetGroupRole.LEADER- Throws:
ApplicationException
-
assetGroupGetAssets
Gets list of assets in the group defined by assetGroupId with group role roleToSearch.- Parameters:
assetGroupId- mandatoryroleToSearch- optional, if not set return all assets from this group- Returns:
- the list of assets or empty list
-
assetGroupGetVersions
Returns list of asset with group role AssetGroupRole.VERSION for which given Asset is the master (masterId in CE).- Parameters:
master- mandatory- Returns:
- List of Assets or empty list
-
assetGroupGetMaster
If this asset is a version returns the master (leader/original or variant) of the version, leader or variant.- Parameters:
version- mandatory- Returns:
nullif asset is not in group (no masterId set).
The asset itself if it has not role AssetGroupRole.VERSION in this group, otherwise a leader or variant.- Throws:
ApplicationException
-
assetGroupGetLeader
If this asset is a variant returns the leader of the variant, else returns null.- Parameters:
variant- mandatory- Returns:
- null if asset is not in group (no groupId set)
the asset itself if it has role AssetGroupRole.VARIANT in this group - Throws:
ApplicationException
-
assetGroupAddVariant
Adds an asset as a variant to the group for the leader asset.
permission: RightType.EDIT by leader
- Parameters:
variant- the variantleader- the leader- Throws:
ApplicationException- the application exception
-
assetGroupInsertVariant
public Asset assetGroupInsertVariant(AssetInsertParameter insertParameter) throws ApplicationException Inserts given Asset as variant of Asset: add to asset group of leader asset with role variant
if leader asset is not in group, make the new group with leader as group leader and new asset with role variant
properties in AssetInsertParameter:
- AssetInsertParameter.file optional for asset as placeholder
- AssetInsertParameter.filename name of file (not path)
- asset optional, may contain additional information in it's fields
- AssetInsertParameter.groupLeader, leader asset, mandatory
- assetType and collection are taken from leader asset.
permission: RightType.INSERT by target collection- Parameters:
insertParameter- AssetInsertParameter mandatory- Returns:
- new Asset variant
- Throws:
ApplicationException
-
assetGroupInsertVersion
public Asset assetGroupInsertVersion(AssetInsertParameter insertParameter) throws ApplicationException Inserts given Asset as variant of Asset: add to asset group of leader asset with role variant.
If leader asset is not in group, make the new group with leader as group leader and new asset with role variant.
makeActive is true: set master role to version and make master to version
properties in AssetInsertParameter:
- AssetInsertParameter.file optional for asset as placeholder
- AssetInsertParameter.filename name of file (not path)
- asset optional, may contain additional information in it's fields
- AssetInsertParameter.groupLeader, master asset, mandatory
- assetType and collection are taken from leader asset.
permission: RightType.INSERT by target collection- Parameters:
insertParameter- AssetInsertParameter mandatory- Returns:
- new Asset variant
- Throws:
ApplicationException
-
assetGroupRemoveMember
Removes asset and asset versions from asset group
permission: RightType.EDIT by asset
- Parameters:
asset- mandatory- Throws:
ApplicationException
-
assetDerivateDelete
public void assetDerivateDelete(AssetDerivate assetDerivate) throws DeleteTiedElementException, ApplicationException Deletes AssetDerivate from database if not used.
The corresponding file will be removed by periodically running cleanup job which checks for unreferenced files.- Parameters:
assetDerivate- mandatory- Throws:
ApplicationExceptionDeleteTiedElementException- if AssetDerivate is in use.- See Also:
-
for usage of AssetDerivate
-
assetDerivateDelete
public void assetDerivateDelete(List<AssetDerivate> assetDerivates) throws DeleteTiedElementException, ApplicationException Optimized for list: checks for each if AssetDerivate is used. If not deletes AssetDerivate from database.
The corresponding file will be removed by periodically running cleanup job which checks for unreferenced files.- Parameters:
assetDerivates- mandatory, each AssetDerivate in list must exist- Throws:
DeleteTiedElementException- if AssetDerivate is in use.ApplicationException- See Also:
-
for usage of AssetDerivate
-
assetDerivateMaintain
public void assetDerivateMaintain(AssetType assetType, List<AssetDerivateType> derivateTypes) throws ApplicationException, UserException Start conversion workflow for all assets of the asset type.
optionally specify which derivates should be generated by giving derivateTypes list. if empty, all derivates for this type are generated.- Parameters:
assetType- mandatoryderivateTypes- optional- Throws:
ApplicationExceptionUserException- as signal of workflow start
-
assetGetFilename
Gets filename for asset or derivate.- Parameters:
entity- mandatory, asset or derivate- Returns:
- stored filename for asset. generated filename for derivate
-
assetSetMetadataValues
public void assetSetMetadataValues(IAsset entity, DataMap metadata, mc.core.system.util.misc.StringMap metaCategoryMap) throws ApplicationException Sets values stored in DataMap metadata to attributes whose internalDescription is the key in the DataMap. Usually the system metadata-attributes are held in enumAssetMetadataTypefrom which the attributeType and collection can be retrieved. In that case if the attribute does not exist it is inserted in db.If given key does not correspond to an AssetMetadataType it is assumed that the Attribute is a custom Attribute. In that case the attribute is inserted only if metaCategoryMap is not null and contains an entry where key=key of attribute in metadata and value is the String representation of a
AssetInitialData.MetaCategoryenum. Existing attributes must haveDTText.SLANG_SLINEas DataType.In both cases you must take care that labels for the attribute names having as label key AssetMetadataType.name.[internalDescription of attribute] are present in the resource bundle.
- Parameters:
entity- Asset or AssetDerivate, mandatorymetadata- mandatory DataMap holding the AssetMetadataType or internalDescription of custom attribute as key, a String value as the attribute value (all metadata values are locale independent text values)metaCategoryMap- optional- Throws:
ApplicationException
-
assetGetMetadataValue
Gets the (locale independent) String value for given Asset or AssetDerivate and metadataType representing an attribute.- Parameters:
entity- mandatorymetadataType- mandatory- Returns:
- String or null if no value exists
-
assetGetMetadataValues
public mc.core.system.util.misc.StringMap assetGetMetadataValues(IAsset entity, List<IMetadataType> metadataTypes) Gets the (locale independent) String values for given Asset or AssetDerivate and List of metadataTypes representing the attributes.- Parameters:
entity- mandatorymetadataTypes- optional, if null or empty reurns empty StringMap- Returns:
- StringMap containing the AssetMetaDataType as String as key and the value as String.
-
assetTypeSave
public AssetType assetTypeSave(AssetType assetType, DataMap dataMap) throws UserException, ApplicationException Inserts or updates given AssetType by setting its fields from given dataMap.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetType- mandatorydataMap- mandatory, contains values for the AssetType's fields as key-value pairs- Returns:
- inserted or updated AssetType. If AssetType has been inserted it contains now the newly created id
- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN.
-
assetTypeCopy
Creates a copy of given AssetType.
Creates a new unique internalDescription and adds a postfix to name in each locale.
Also copies Attributes, AssetHotfolder(adds a postfix to hotfolderPath and rejectedFolderPath) and AssetPipeline Lists.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetType- mandatory- Returns:
- newly created AssetType
- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN.
-
assetTypeDelete
public void assetTypeDelete(AssetType assetType) throws DeleteTiedElementException, UserException, ApplicationException Deletes AssetType from database if not used.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetType- mandatory- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMINDeleteTiedElementException- if AssetType is in use.- See Also:
-
for usage of AssetType
-
assetTypeRemoveAttribute
public void assetTypeRemoveAttribute(AssetType assetType, Attribute attribute, boolean force) throws UserException, DeleteTiedElementException, ApplicationException Removes assigned Attribute from the type attributes of this AssetType.
user role: only UserBaseRole.CONFIGADMIN but not for publication profile types
- Parameters:
assetType- mandatoryattribute- Attribute, mandatoryforce- not yet implemented, Attribute is always removed. Should be: if false only removes this type Attribute if there are no Assets of this AssetType that have values for this Attribute, otherwise throws DeleteTiedElementException- Throws:
UserException- if user has not role config adminDeleteTiedElementException- not yet implementedApplicationException
-
assetTypeRemoveAttributeType
public void assetTypeRemoveAttributeType(AssetType assetType, AttributeType attributeType, boolean force) throws UserException, DeleteTiedElementException Removes assigned AttributeType from allowed AttributeTypes of this AssetType.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetType- mandatoryattributeType- AttributeType, mandatoryforce- not yet implemented, attributeType is always removed. Should be: if false only removes AttributeType if there are no Asset of this Asset that have Attributes of this AttributeType, otherwise throws DeleteTiedElementException- Throws:
UserException- if user has not role config adminDeleteTiedElementException
-
assetHotfolderSave
public AssetHotfolder assetHotfolderSave(AssetHotfolder assetHotfolder, DataMap dataMap) throws UserException, ApplicationException Inserts or updates given AssetHotfolder by setting its fields from given dataMap.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetHotfolder- mandatorydataMap- mandatory, contains values for the AssetHotfolder's fields as key-value pairs- Returns:
- inserted or updated AssetHotfolder.
If AssetHotfolder has been inserted it contains now the newly created id - Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN
-
assetHotfolderDelete
public void assetHotfolderDelete(AssetHotfolder assetHotfolder) throws DeleteTiedElementException, UserException, ApplicationException Deletes AssetHotfolder from database if not used.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetHotfolder- mandatory- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMINDeleteTiedElementException- if AssetHotfolder is in use.- See Also:
-
for usage of AssetHotfolder
-
assetPipelineSave
public AssetPipeline assetPipelineSave(AssetPipeline assetPipeline, DataMap dataMap) throws UserException, ApplicationException Inserts or updates given AssetPipeline by setting its fields from given dataMap.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetPipeline- mandatorydataMap- mandatory, contains values for the AssetPipeline's fields as key-value pairs- Returns:
- inserted or updated AssetPipeline.
If AssetPipeline has been inserted it contains now the newly created id - Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN
-
assetPipelineDelete
public void assetPipelineDelete(AssetPipeline assetPipeline) throws DeleteTiedElementException, UserException, ApplicationException Deletes AssetPipeline from database if not used.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetPipeline- mandatory- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMINDeleteTiedElementException- if AssetPipeline is in use.- See Also:
-
for usage of AssetPipeline
-
fileTypeSave
public FileType fileTypeSave(FileType fileType, DataMap dataMap) throws UserException, ApplicationException Inserts or updates given FileType by setting its fields from given dataMap.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
fileType- mandatorydataMap- mandatory, contains values for the FileType's fields as key-value pairs- Returns:
- inserted or updated FileType. If FileType has been inserted it contains now the newly created id
- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN
-
fileTypeDelete
public void fileTypeDelete(FileType fileType) throws DeleteTiedElementException, ApplicationException Deletes FileType from database if not used by AssetPipeline.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
fileType- mandatory- Throws:
ApplicationExceptionDeleteTiedElementException- if FileType is in use.- See Also:
-
for usage of FileType
-
assetDerivateTypeSave
public AssetDerivateType assetDerivateTypeSave(AssetDerivateType assetDerivateType, DataMap dataMap) throws UserException, ApplicationException Inserts or updates given AssetDerivateType by setting its fields from given dataMap.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetDerivateType- mandatorydataMap- mandatory, contains values for the AssetDerivateType's fields as key-value pairs- Returns:
- inserted or updated AssetDerivateType.
If AssetDerivateType has been inserted it contains now the newly created id - Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN
-
assetDerivateTypeDelete
public void assetDerivateTypeDelete(AssetDerivateType assetDerivateType) throws DeleteTiedElementException, ApplicationException, UserException Deletes AssetDerivateType from database if not used.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetDerivateType- mandatory- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMINDeleteTiedElementException- if AssetDerivateType is in use.- See Also:
-
for usage of AssetDerivateType
-
assetDerivateTypeSetConversionCmds
public void assetDerivateTypeSetConversionCmds(AssetDerivateType assetDerivateType, List<ConverterCommand> conversionCmds) throws UserException, ApplicationException Sets ConverterCommands for this AssetDerivateType.
The ConverterCommands in the list belong only to this AssetDerivateType and need to be deleted when removed.
This method assumes that the given list of ConverterCommands always contains all already set ConverterCommands plus any additional added ConverterCommands.
It can not be used to remove ConverterCommands, useassetDerivateTypeRemoveConversionCmd(AssetDerivateType, ConverterCommand)instead.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetDerivateType- mandatoryconversionCmds- mandatory, ConverterCommand from list will be inserted in database if not persistence.- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN
-
assetDerivateTypeRemoveConversionCmd
public void assetDerivateTypeRemoveConversionCmd(AssetDerivateType assetDerivateType, ConverterCommand command) throws UserException, ApplicationException Removes ConverterCommand from list of ConverterCommands of this AssetDerivateType.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetDerivateType- mandatorycommand- mandatory- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN
-
assetDerivateTypeSetExtractPropertiesCmd
public void assetDerivateTypeSetExtractPropertiesCmd(AssetDerivateType assetDerivateType, ConverterCommand extractPropertiesCmd) throws UserException, ApplicationException Sets ConverterCommand that is used as extract properties command for this AssetDerivateType.
A prior existing converter command is overwritten
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetDerivateType- mandatoryextractPropertiesCmd- ConverterCommand, mandatory, will be inserted in database if not exists- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN
-
assetDerivateTypeRemoveExtractPropertiesCmd
public void assetDerivateTypeRemoveExtractPropertiesCmd(AssetDerivateType assetDerivateType) throws UserException, ApplicationException Removes the extract properties command from this AssetDerivateType (sets it tonull) and deletes it.
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetDerivateType- mandatory- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN
-
assetDerivateTypeSetConverterProperties
public void assetDerivateTypeSetConverterProperties(AssetDerivateType assetDerivateType, List<ConverterProperty> converterProperties) throws UserException, ApplicationException Sets list of ConverterProperty that are used for ConverterEngine of Converter Type.
The ConverterProperty in the list belong only to this ConverterEngine and need to be deleted when removed.
This method assumes that the given list of ConverterProperty always contains all already set ConverterProperty, all another be deleted.
It can be used to remove ConverterProperty: the converterProperties list must be empty
user role: only UserBaseRole.CONFIGADMIN
- Parameters:
assetDerivateType- mandatoryconverterProperties- mandatory, list can be empty. The ConverterProperties will be inserted in database if not exists- Throws:
ApplicationExceptionUserException- if user has not role UserBaseRole.CONFIGADMIN
-
converterTypeSetPreProcessCmds
public void converterTypeSetPreProcessCmds(ConverterType converterType, List<ConverterCommand> preProcessCmds) throws ApplicationException Sets list of ConverterCommands that are used as pre process commands for this ConverterType.
Any prior existing list is overwritten The ConverterCommands in the list belong only to this ConverterType and need to be deleted when removed.
This method assumes that the given list of ConverterCommands always contains all already set ConverterCommands plus any additional added ConverterCommands.
It can not be used to remove ConverterCommandsconverterTypeRemovePreProcessCmd(ConverterType, ConverterCommand)instead.- Parameters:
converterType- mandatorypreProcessCmds- mandatory, list can be empty. The ConverterCommands will be inserted in databaseif not exists- Throws:
ApplicationException
-
converterTypeRemovePreProcessCmd
public void converterTypeRemovePreProcessCmd(ConverterType converterType, ConverterCommand command) throws ApplicationException Removes given ConverterCommand from list of pre process commands of this ConverterType and deletes the ConverterCommand itself.- Parameters:
converterType- mandatorycommand- ConverterCommand, mandatory- Throws:
ApplicationException
-
converterTypeRemoveExtractPropertiesCmd
public void converterTypeRemoveExtractPropertiesCmd(ConverterType converterType) throws ApplicationException Removes the extract properties command from this ConverterType (sets it tonull) and deletes it.- Parameters:
converterType- mandatory- Throws:
ApplicationException
-
converterTypeSetPostProcessCmds
public void converterTypeSetPostProcessCmds(ConverterType converterType, List<ConverterCommand> postProcessCmds) throws ApplicationException Sets list of ConverterCommands that are used as post process commands for this ConverterType.
The ConverterCommands in the list belong only to this ConverterType and need to be deleted when removed.
This method assumes that the given list of ConverterCommands always contains all already set ConverterCommands plus any additional added ConverterCommands.
It can not be used to remove ConverterCommands,converterTypeRemovePostProcessCmd(ConverterType, ConverterCommand)instead.- Parameters:
converterType- mandatorypostProcessCmds- mandatory, list can be empty. The ConverterCommands will be inserted in database if not exists- Throws:
ApplicationException
-
converterTypeRemovePostProcessCmd
public void converterTypeRemovePostProcessCmd(ConverterType converterType, ConverterCommand command) throws ApplicationException Removes given ConverterCommand from list of post process commands of this ConverterType and deletes the ConverterCommand.- Parameters:
converterType- mandatorycommand- ConverterCommand, mandatory- Throws:
ApplicationException
-
converterTypeSetExtractPropertiesCmd
public void converterTypeSetExtractPropertiesCmd(ConverterType converterType, ConverterCommand converterCmd) throws ApplicationException Sets ConverterCommand that is used as extract properties command for this ConverterType.
A prior existing converter command is overwritten- Parameters:
converterType- mandatoryconverterCmd- mandatory, ConverterCommand will be inserted in database if not exists- Throws:
ApplicationException
-
converterTypeSave
public ConverterType converterTypeSave(ConverterType converterType, DataMap dataMap) throws ApplicationException Inserts or updates given ConverterType by setting its fields from given dataMap.- Parameters:
converterType- mandatorydataMap- mandatory, contains values for the ConverterType's fields as key-value pairs- Returns:
- inserted or updated ConverterType. If ConverterType has been inserted it contains now the newly created id
- Throws:
ApplicationException
-
converterTypeDelete
Deletes this ConverterType from database with check in use.- Parameters:
converterType- mandatory- Throws:
ApplicationException
-
converterTypeCopy
public ConverterType converterTypeCopy(ConverterType sourceConverterType) throws ApplicationException Creates copy of this ConverterType.- Parameters:
sourceConverterType- mandatory- Returns:
- copy of this ConverterType
- Throws:
ApplicationException
-
converterTypeRemoveDerivateTypes
public void converterTypeRemoveDerivateTypes(ConverterType converterType, List<AssetDerivateType> derivateTypes) throws ApplicationException Removes all given AssetDerivateTypes from list of derivate types assigned to this ConverterType.- Parameters:
converterType- mandatoryderivateTypes- mandatory, but list can be empty- Throws:
ApplicationException
-
converterTypeSetConverterProperties
public void converterTypeSetConverterProperties(ConverterType converterType, List<ConverterProperty> converterProperties) throws ApplicationException Sets list of ConverterProperty that are used for this ConverterEngine.
The ConverterProperty in the list belong only to this ConverterEngine and need to be deleted when removed.
This method assumes that the given list of ConverterProperty always contains all already set ConverterProperty, all another be deleted.
It can be used to remove ConverterProperty: the converterProperties list must be empty- Parameters:
converterType- mandatoryconverterProperties- mandatory, list can be empty. The ConverterPropertiy from list will be inserted in database if not exists- Throws:
ApplicationException
-
assetBasketSave
Inserts or updates given Basket by setting its fields from given dataMap. if basket is new, sets current user as owner, sets a default name containing current date and sets this basket active.- Parameters:
basket- mandatorydataMap- mandatory, contains values for the Basket's fields as key-value pairs- Returns:
- inserted or updated Basket. If Basket has been inserted it contains now the newly created id
- Throws:
ApplicationException
-
assetBasketDelete
Deletes Basket from database if user is owner of it. By shared basket only shared link for current user be deleted.- Parameters:
basket- mandatory, must be existent- Throws:
ApplicationException
-
assetBasketCopy
Copies basket: only base info (without shared dates and basket receiver) and basket assets (only the original, seeassetBasketSetDerivates(Basket, Asset, List, boolean)without saved derivates be coped).
Sets the copied basket to active for current user.- Parameters:
sourceBasket- mandatory- Returns:
- the copy of sourceBasket
- Throws:
ApplicationException
-
assetBasketActiveForUser
- Returns:
- the active Basket for session user, if no any Baskets exists, creates one, mark it active and inserts in database.
- Throws:
ApplicationException
-
assetBasketSetActive
Sets this basket active for the session user.
Sets currently active basket, if exists, for this user to inactive.- Parameters:
basket- mandatory- Throws:
ApplicationException
-
assetBasketToggleLock
Change lock flag for asset basket.
The locked basket cannot be overwritten or ZIP cannot be recreated
active basket cannot be locked- Parameters:
basket- mandatory, not active basket- Throws:
ApplicationException
-
assetBasketAddAsset
public void assetBasketAddAsset(Basket basket, Asset asset) throws UserException, ApplicationException Adds asset to given basket and as default - add original to derivate list (only if user has RightType.DOWNLOAD permission for it)
Removes archive file that contained previous content of basket for export from basket if exists.
Starts export basket (only for shared basket) automatically
The maximal count of objects in basket is AbstractBasketDO.MAX_OBJECT_COUNT, else UserException- Parameters:
basket- mandatory, must be unlockedasset- mandatory- Throws:
ApplicationExceptionUserException- if basket is locked or
the max. count of objects in basket (see AbstractBasketDO.MAX_OBJECT_COUNT) is reached
-
assetBasketAddAssets
public void assetBasketAddAssets(Basket basket, List<Asset> assets) throws UserException, ApplicationException Add asset from list to given basket and as default - add original to derivate list (only if user has RightType.DOWNLOAD permission for it).
Removes archive file that contained previous content of basket for export from basket if exists.
Starts export basket (only for shared basket) automatically
The maximal count of objects in basket is AbstractBasketDO.MAX_OBJECT_COUNT, else UserException- Parameters:
basket- mandatory, must be unlockedassets- mandatory- Throws:
ApplicationExceptionUserException- if basket is locked or
the max. count of objects in basket (see AbstractBasketDO.MAX_OBJECT_COUNT) is reached
-
assetBasketInsert
Creates new asset basket from list of assets and set it as active for user.
As default - add original to derivate list (only if user has RightType.DOWNLOAD permission for it)
The maximal count of objects in basket is AbstractBasketDO.MAX_OBJECT_COUNT, else UserException- Parameters:
assets- mandatory- Throws:
ApplicationExceptionUserException- if basket is locked or
the max. count of objects in basket (see AbstractBasketDO.MAX_OBJECT_COUNT) is reached
-
assetBasketRemoveAsset
Removes asset from given basket.
Removes archive file that contained previous content of basket for export from basket if exists.
Starts basket (export only for shared basket) automatically.- Parameters:
basket- mandatory, must be unlockedasset- mandatory- Throws:
ApplicationException
-
assetBasketRemoveAssets
Removes list of assets from given basket.
Removes archive file that contained previous content of basket for export from basket if exists.
Starts basket (export only for shared basket) automatically.- Parameters:
basket- mandatory, must be unlockedassets- mandatory- Throws:
ApplicationException
-
assetBasketSetDerivates
public void assetBasketSetDerivates(Basket basket, Asset asset, List<AssetDerivate> derivates, boolean includeOriginal) throws ApplicationException Selects which derivates for Asset should be included in the given Basket.
Asset must already been added to basket.
Overwrites any previous selection of derivates for this asset in the basket.
boolean includeOriginal for toggles inclusion of the original for Asset (only if user has RightType.DOWNLOAD permission for it)- Parameters:
basket- mandatoryasset- mandatoryderivates- mandatoryincludeOriginal- toggles inclusion of the original for Asset (only if user has RightType.DOWNLOAD permission for it)- Throws:
ApplicationException
-
assetBasketAddReceiver
public void assetBasketAddReceiver(Basket basket, Principal principal, String receiverEmail, Locale javaLocale) throws ApplicationException Adds new basket receiver with generated external key
by internal principal (user or user group) add new BasketReceiver if basket-principal combination not exist
or by external receiverEmail add BasketReceiver if basket-email combination not exist and send email an external user with link for basket download.
EitherprincipalorreceiverEmailmust not benull, else UserException is thrown.- Parameters:
basket- mandatoryprincipal- optional, user or user groupreceiverEmail- optional, external users are represented by their email addresses. Multiple addresses can be given by separating them with space, comma or semicolon.javaLocale- optional, define the template language for mail and error page by external user if not set, the sessionData.getUiJavaLocale() be used as default.- Throws:
ApplicationException
-
assetBasketRemoveReceiver
public void assetBasketRemoveReceiver(Basket basket, BasketReceiver basketReceiver) throws ApplicationException Removes a receiver from an asset basket.- Parameters:
basket- mandatorybasketReceiver- mandatory- Throws:
ApplicationException
-
assetBasketReSend
public void assetBasketReSend(Basket basket, BasketReceiver basketReceiver, Locale javaLocale) throws ApplicationException Re-sends this basket to the basket receiver: send again email by external user or notification by internal user.- Parameters:
basket- mandatorybasketReceiver- mandatoryjavaLocale- optional, define the template language for mail and error page by external user if not set, the sessionData.getUiJavaLocale() be used as default.- Throws:
ApplicationException
-
assetBasketExportFile
public void assetBasketExportFile(Basket basket, mc.core.system.asset.export.AssetExport.AssetExportType assetExportType) throws UserException, ApplicationException Starts workflow (SystemWfType.ASSETBASKET_EXPORT_WORKFLOW) that exports all selected derivates of this Basket depending on given AssetExportType.
If no AssetExportType is given by default ZIP-export is used.
Throws UserException with message keymessage.workflow.info.startedto signal start of workflow.- Parameters:
basket- mandatoryassetExportType- optional- Throws:
UserException- if empty basket or empty derivate selection (original or derivates)ApplicationException- on any common error
-
assetBasketExportDCM
public void assetBasketExportDCM(Basket basket, Locale locale, EntityProfile profile) throws ApplicationException, UserException Starts the workflow (@see WebDCMExportActionlet) to generate excel (DCM) export for all basket assets with base data and attributes.
using the entity profile (optional, default is all type attributes be exported) and
the given locale (optional, default is content locale from session data).- Parameters:
basket- mandatory, must be attachedlocale- optional, default is content locale from session dataprofile- optional, default is all type attributes be exported- Throws:
UserException- to signal asynchronous process startApplicationException- on any common error
-
assetBasketImportDCM
public void assetBasketImportDCM(Basket basket, Locale locale, InputStream inputStream, String filename) throws ApplicationException, UserException Start the workflow (@see WebDCMImportActionlet) to import excel (DCM) file with base data and attributes using the given locale.- Parameters:
basket- mandatorylocale- optional, default is content locale from session datainputStream- mandatoryfilename- mandatory, the import file be insert to file store with it- Throws:
UserExceptionApplicationException
-
assetArchivingTaskSave
public AssetArchivingTask assetArchivingTaskSave(AssetArchivingTask assetArchivingTask, DataMap dataMap) throws ApplicationException Inserts or updates given AssetArchivingTask by setting its fields from given dataMap.- Parameters:
assetArchivingTask- mandatorydataMap- mandatory, contains values for the AssetArchivingTask's fields as key-value pairs- Returns:
- inserted or updated AssetArchivingTask. If AssetArchivingTask has been inserted it contains now the newly created id
- Throws:
ApplicationException
-
assetArchivingTaskDelete
public void assetArchivingTaskDelete(AssetArchivingTask assetArchivingTask) throws DeleteTiedElementException, ApplicationException Deletes AssetArchivingTask from database with usage check.- Parameters:
assetArchivingTask- mandatory- Throws:
ApplicationExceptionDeleteTiedElementException- if AssetArchivingTask is in use.- See Also:
-
for usage of AssetArchivingTask
-
assetArchivingTaskPerform
public void assetArchivingTaskPerform(AssetArchivingTask assetArchivingTask) throws ApplicationException, UserException Starts workflow (SystemWfType.ASSET_ARCHIVING_WORKFLOW) to archive assets.- Parameters:
assetArchivingTask- AssetArchivingTask mandatory- Throws:
ApplicationExceptionUserException- with message keymessage.workflow.info.startedto signal start of workflow.
-