Class AssetRI

java.lang.Object
mc.core.system.base.BaseBean
mc.core.domain.base.AbstractAPI
mc.core.domain.asset.AssetRI

@Path("/") @Produces("application/json") public class AssetRI extends AbstractAPI
  • Constructor Details

    • AssetRI

      public AssetRI()
  • Method Details

    • assetCollectionGetRoot

      @GET @Path("asset/collection/root") public javax.ws.rs.core.Response assetCollectionGetRoot() throws ApplicationException, IOException
      GET:asset/collection/root

      Get root collection

      Throws:
      ApplicationException
      IOException
      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:
      ApplicationException
      IOException
      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:
      ApplicationException
      IOException
      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:
      ApplicationException
      DeleteTiedElementException - 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}/restore

      restore an asset from recycle bin

      Throws:
      ApplicationException
      IOException
      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}/replacefile

      Replace original file for the given asset with file in request body.

      Throws:
      ApplicationException
      IOException
      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 optional

      Set additional derivate file for the given asset with file in request body.

      Throws:
      ApplicationException
      IOException
      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 collection

      Copy an asset to the given target collection.

      Throws:
      ApplicationException
      IOException
      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 mandatory

      Copy an asset list to the target collection.

      Throws:
      ApplicationException
      IOException
      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}/convert

      Start 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 mandatory

      Start 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 mandatory

      Start an asset type change for a list of assets.

      Throws:
      ApplicationException
      IOException
      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 mandatory

      Move 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:
      ApplicationException
      IOException
      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.

      Throws:
      UserException
      ApplicationException
      IOException
    • assetBasketGetActiveForUser

      @GET @Path("assetbasket/active") public javax.ws.rs.core.Response assetBasketGetActiveForUser() throws ApplicationException, IOException
      GET: assetbasket/active

      Get the active asset basket for the current user.

      Throws:
      ApplicationException
      IOException
      See Also:
      • AssetAPI.assetBasketActiveForUser()
    • assetBasketSetActive

      @POST @Path("assetbasket/{basketKey}/active") public void assetBasketSetActive(@PathParam("basketKey") String basketKey) throws ApplicationException
      POST: assetbasket/{basketKey}/active

      Set 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}/togglelock

      Lock 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 mandatory

      List 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 mandatory

      Modify 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 mandatory

      Remove 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, IOException
      POST: assetbasket?data=[jsonDataMap]

      Insert a new empty asset basket with data provided in the json data map and set it as active.

      Throws:
      UserException
      ApplicationException
      IOException
    • 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 mandatory

      Add a list of assets to a new basket.

      Throws:
      ApplicationException
      IOException
      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 used

      Add recipient for given basket, with notification via email template in the given local. For an external recipient, the key is the email address.

      Throws:
      UserException
      ApplicationException
      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:
      UserException
      ApplicationException
      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 used

      Resend 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 used

      Import content from DCM Excel file for the given basket for the given locale.

      Throws:
      ApplicationException
      IOException
      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 optional

      Export content into DCM Excel file for the given basket for the given local using given attribute profile.

      Throws:
      ApplicationException
      IOException
      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 (see Asset.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:
      ApplicationException
      IOException
      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:
      ApplicationException
      IOException
      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:
      ApplicationException
      IOException
      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:
      ApplicationException
      IOException
      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:
      ApplicationException
      IOException
      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:
      ApplicationException
      UserException
      See Also:
      • AssetAPI.assetDerivateDelete(AssetDerivate assetDerivate)
    • assetTypeInsert

      @POST @Path("assettype") public javax.ws.rs.core.Response assetTypeInsert() throws UserException, ApplicationException, IOException
      POST: assettype?data=[jsonDataMap]

      Insert a new asset type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      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=false

      Remove a type attribute from asset type. Force is required to delete even if assets of this type have assignments to this attribute

      Throws:
      UserException
      ApplicationException
      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=false

      Remove 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:
      UserException
      ApplicationException
      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}/copy

      Create a copy of the asset type.

      Throws:
      ApplicationException
      IOException
      See Also:
      • AssetAPI.assetTypeCopy(AssetType)
    • assetDerivateTypeInsert

      @POST @Path("assetderivatetype") public javax.ws.rs.core.Response assetDerivateTypeInsert() throws UserException, ApplicationException, IOException
      POST: assetderivatetype?data=[jsonDataMap]

      Insert a new asset derivate type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      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}/remove

      removes 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/remove

      remove 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/remove

      Remove 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, IOException
      POST: convertertype?data=[jsonDataMap]

      Insert a new converter type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      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}/copy

      Create a copy of the converter type.

      Throws:
      ApplicationException
      IOException
      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=cde

      Remove 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/remove

      Remove 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}/remove

      removes 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}/remove

      removes 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/remove

      removes 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, IOException
      POST: filetype?data=[jsonDataMap]

      Insert a new file type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      See Also:
      • AssetAPI.fileTypeDelete(mc.core.model.asset.FileType)
    • assetHotfolderInsert

      @POST @Path("assethotfolder") public javax.ws.rs.core.Response assetHotfolderInsert() throws UserException, ApplicationException, IOException
      POST: assethotfolder?data=[jsonDataMap]

      Insert a new asset hotfolder with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      See Also:
      • AssetAPI.assetHotfolderDelete(AssetHotfolder)
    • assetArchivingTaskInsert

      @POST @Path("assetarchiving") public javax.ws.rs.core.Response assetArchivingTaskInsert() throws UserException, ApplicationException, IOException
      POST: assetarchiving?data=[jsonDataMap]

      Insert a new asset archiving task with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      IOException
      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:
      UserException
      ApplicationException
      See Also:
      • AssetAPI.assetArchivingTaskDelete(AssetArchivingTask)
    • assetArchivingTaskPerform

      @POST @Path("assetarchiving/{key}/perform") public void assetArchivingTaskPerform(@PathParam("key") String key) throws UserException, ApplicationException
      POST: assetarchiving/{key}/perform

      perform the asset archiving task.

      Throws:
      UserException
      ApplicationException
      See Also:
      • AssetAPI.assetArchivingTaskPerform(AssetArchivingTask)
    • assetInsert

      public Asset assetInsert(Asset asset) throws ApplicationException
      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
    • 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 fields
      externalURI - mandatory, URI of the external file
      assetType - optional, default is AssetInitialData.ASSET_TYPE_DEFAULT
      collection - 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

      public Asset assetSave(Asset asset, DataMap dataMap) throws ApplicationException
      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 - mandatory
      dataMap - mandatory, contains values for the Asset's fields as key-value pairs
      Returns:
      inserted or updated Asset.
      Throws:
      ApplicationException
    • assetGroupDeleteLatestVersion

      public Asset assetGroupDeleteLatestVersion(Asset asset) throws ApplicationException
      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

      public void assetDelete(Asset asset) 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:
      ApplicationException
      DeleteTiedElementException - 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:
      ApplicationException
      DeleteTiedElementException - if Asset is in use
      See Also:
      • for usage of Asset
    • assetRecycleRestore

      public void assetRecycleRestore(Asset asset) throws ApplicationException, UserException
      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 role
      ApplicationException
    • assetRecycledGetOriginalPath

      public String assetRecycledGetOriginalPath(Asset asset)
      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 - mandatory
      fileStream - mandatory, open InputStream
      filename - 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 - mandatory
      fileStream - mandatory. if filename and converterType is null mimeType is determined from the input file stream by the file magic number
      filename - 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

      public void assetConvert(Collection collection) throws ApplicationException
      Starts conversion workflow for all assets in given collection.
      Throws UserException with message key message.workflow.info.started to signal start of workflow.
      permission: RightType.EDIT and edit allowed STATE by asset

      Parameters:
      collection - mandatory
      Throws:
      ApplicationException
    • assetConvert

      public void assetConvert(Asset asset) throws ApplicationException
      Starts conversion workflow for given asset.
      Throws UserException with message key message.workflow.info.started to signal start of workflow.
      permission: RightType.EDIT and edit allowed STATE by asset

      Parameters:
      asset - mandatory
      Throws:
      ApplicationException
    • assetConvert

      public void assetConvert(List<Asset> assets) throws ApplicationException
      Starts conversion workflow for the given assets.
      Throws UserException with message key message.workflow.info.started to signal start of workflow.
      permission: RightType.EDIT and edit allowed STATE by asset

      Parameters:
      assets - mandatory, must contain valid objects
      Throws:
      ApplicationException
    • assetCopy

      public Asset assetCopy(Asset sourceAsset, Collection parentCollection) 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. When null is given the copy will be created in the primary Collection of 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. When null is given the copy will be created in the primary Collection of 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 objects
      parentCollection - 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 - mandatory
      targetCollection - mandatory
      Throws:
      ApplicationException
      UserException
    • 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 objects
      targetCollection - 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 - mandatory
      newPrimaryCollection - mandatory
      Throws:
      ApplicationException
      UserException
    • 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 objects
      targetAssetType - mandatory, target asset type for change
      Throws:
      ApplicationException
      UserException
    • 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

      public Collection assetGetRootCollection() throws ApplicationException
      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 - mandatory
      format - optional, PublishFormat as String. default is PDF
      templateName - optional, only for HTML format. the name of template file in namespace folder. default is html_asset_details.vm
      os - 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 - mandatory
      targetRole - mandatory
      Throws:
      ApplicationException
    • assetGroupRemove

      public void assetGroupRemove(Asset leader) throws ApplicationException
      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

      public List<Asset> assetGroupGetAssets(String assetGroupId, Asset.AssetGroupRole roleToSearch)
      Gets list of assets in the group defined by assetGroupId with group role roleToSearch.
      Parameters:
      assetGroupId - mandatory
      roleToSearch - optional, if not set return all assets from this group
      Returns:
      the list of assets or empty list
    • assetGroupGetVersions

      public List<Asset> assetGroupGetVersions(Asset master)
      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

      public Asset assetGroupGetMaster(Asset version) throws ApplicationException
      If this asset is a version returns the master (leader/original or variant) of the version, leader or variant.
      Parameters:
      version - mandatory
      Returns:
      null if 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

      public Asset assetGroupGetLeader(Asset variant) throws ApplicationException
      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

      public void assetGroupAddVariant(Asset variant, Asset leader) throws ApplicationException
      Adds an asset as a variant to the group for the leader asset.
      permission: RightType.EDIT by leader

      Parameters:
      variant - the variant
      leader - 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.EDITT by 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.EDITT by leader asset
      permission: RightType.INSERT by target collection
      Parameters:
      insertParameter - AssetInsertParameter mandatory
      Returns:
      new Asset variant
      Throws:
      ApplicationException
    • assetGroupRemoveMember

      public void assetGroupRemoveMember(Asset asset) throws ApplicationException
      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:
      ApplicationException
      DeleteTiedElementException - 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 - mandatory
      derivateTypes - optional
      Throws:
      ApplicationException
      UserException - as signal of workflow start
    • assetGetFilename

      public String assetGetFilename(IAsset entity)
      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 enum AssetMetadataType from 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.MetaCategory enum. Existing attributes must have DTText.SLANG_SLINE as 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, mandatory
      metadata - 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

      public String assetGetMetadataValue(IAsset entity, IMetadataType metadataType)
      Gets the (locale independent) String value for given Asset or AssetDerivate and metadataType representing an attribute.
      Parameters:
      entity - mandatory
      metadataType - 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 - mandatory
      metadataTypes - 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 - mandatory
      dataMap - 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:
      ApplicationException
      UserException - if user has not role UserBaseRole.CONFIGADMIN.
    • assetTypeCopy

      public AssetType assetTypeCopy(AssetType assetType) throws UserException, ApplicationException
      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:
      ApplicationException
      UserException - 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:
      ApplicationException
      UserException - if user has not role UserBaseRole.CONFIGADMIN
      DeleteTiedElementException - 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 - mandatory
      attribute - Attribute, mandatory
      force - 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 admin
      DeleteTiedElementException - not yet implemented
      ApplicationException
    • 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 - mandatory
      attributeType - AttributeType, mandatory
      force - 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 admin
      DeleteTiedElementException
    • 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 - mandatory
      dataMap - 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:
      ApplicationException
      UserException - 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:
      ApplicationException
      UserException - if user has not role UserBaseRole.CONFIGADMIN
      DeleteTiedElementException - 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 - mandatory
      dataMap - 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:
      ApplicationException
      UserException - 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:
      ApplicationException
      UserException - if user has not role UserBaseRole.CONFIGADMIN
      DeleteTiedElementException - 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 - mandatory
      dataMap - 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:
      ApplicationException
      UserException - 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:
      ApplicationException
      DeleteTiedElementException - 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 - mandatory
      dataMap - 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:
      ApplicationException
      UserException - 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:
      ApplicationException
      UserException - if user has not role UserBaseRole.CONFIGADMIN
      DeleteTiedElementException - 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, use assetDerivateTypeRemoveConversionCmd(AssetDerivateType, ConverterCommand) instead.
      user role: only UserBaseRole.CONFIGADMIN

      Parameters:
      assetDerivateType - mandatory
      conversionCmds - mandatory, ConverterCommand from list will be inserted in database if not persistence.
      Throws:
      ApplicationException
      UserException - 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 - mandatory
      command - mandatory
      Throws:
      ApplicationException
      UserException - 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 - mandatory
      extractPropertiesCmd - ConverterCommand, mandatory, will be inserted in database if not exists
      Throws:
      ApplicationException
      UserException - 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 to null) and deletes it.
      user role: only UserBaseRole.CONFIGADMIN

      Parameters:
      assetDerivateType - mandatory
      Throws:
      ApplicationException
      UserException - 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 - mandatory
      converterProperties - mandatory, list can be empty. The ConverterProperties will be inserted in database if not exists
      Throws:
      ApplicationException
      UserException - 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 ConverterCommands converterTypeRemovePreProcessCmd(ConverterType, ConverterCommand) instead.
      Parameters:
      converterType - mandatory
      preProcessCmds - 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 - mandatory
      command - ConverterCommand, mandatory
      Throws:
      ApplicationException
    • converterTypeRemoveExtractPropertiesCmd

      public void converterTypeRemoveExtractPropertiesCmd(ConverterType converterType) throws ApplicationException
      Removes the extract properties command from this ConverterType (sets it to null) 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 - mandatory
      postProcessCmds - 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 - mandatory
      command - 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 - mandatory
      converterCmd - 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 - mandatory
      dataMap - 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

      public void converterTypeDelete(ConverterType converterType) throws ApplicationException
      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 - mandatory
      derivateTypes - 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 - mandatory
      converterProperties - mandatory, list can be empty. The ConverterPropertiy from list will be inserted in database if not exists
      Throws:
      ApplicationException
    • assetBasketSave

      public Basket assetBasketSave(Basket basket, DataMap dataMap) throws ApplicationException
      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 - mandatory
      dataMap - 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

      public void assetBasketDelete(Basket basket) throws ApplicationException
      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

      public Basket assetBasketCopy(Basket sourceBasket) throws ApplicationException
      Copies basket: only base info (without shared dates and basket receiver) and basket assets (only the original, see assetBasketSetDerivates(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

      public Basket assetBasketActiveForUser() throws ApplicationException
      Returns:
      the active Basket for session user, if no any Baskets exists, creates one, mark it active and inserts in database.
      Throws:
      ApplicationException
    • assetBasketGetFilterForShared

      public mc.core.system.search.SearchFilter assetBasketGetFilterForShared(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 <= shareValidUntil
      Returns:
      SearchFilter
    • assetBasketSetActive

      public void assetBasketSetActive(Basket basket) throws ApplicationException
      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

      public void assetBasketToggleLock(Basket basket) throws ApplicationException
      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 unlocked
      asset - mandatory
      Throws:
      ApplicationException
      UserException - 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 unlocked
      assets - mandatory
      Throws:
      ApplicationException
      UserException - if basket is locked or
      the max. count of objects in basket (see AbstractBasketDO.MAX_OBJECT_COUNT) is reached
    • assetBasketInsert

      public Basket assetBasketInsert(List<Asset> assets) throws UserException, ApplicationException
      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:
      ApplicationException
      UserException - if basket is locked or
      the max. count of objects in basket (see AbstractBasketDO.MAX_OBJECT_COUNT) is reached
    • assetBasketRemoveAsset

      public void assetBasketRemoveAsset(Basket basket, Asset asset) throws ApplicationException
      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 unlocked
      asset - mandatory
      Throws:
      ApplicationException
    • assetBasketRemoveAssets

      public void assetBasketRemoveAssets(Basket basket, List<Asset> assets) throws ApplicationException
      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 unlocked
      assets - 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 - mandatory
      asset - mandatory
      derivates - mandatory
      includeOriginal - 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.
      Either principal or receiverEmail must not be null, else UserException is thrown.
      Parameters:
      basket - mandatory
      principal - optional, user or user group
      receiverEmail - 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 - mandatory
      basketReceiver - 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 - mandatory
      basketReceiver - mandatory
      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
    • assetBasketGetShareUri

      public String assetBasketGetShareUri(BasketReceiver basketReceiver, Locale javaLocale)
      Create URI for external share of basket.
       http://{property("mc.host")}/{namespace}/selection/basket.getInternalDecription?guid={bReceiver.externalKey}&loc={iso2}
       
      Parameters:
      basketReceiver - mandatory
      javaLocale - optional
      Returns:
      External share URI.
    • 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 key message.workflow.info.started to signal start of workflow.
      Parameters:
      basket - mandatory
      assetExportType - 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 attached
      locale - optional, default is content locale from session data
      profile - optional, default is all type attributes be exported
      Throws:
      UserException - to signal asynchronous process start
      ApplicationException - 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 - mandatory
      locale - optional, default is content locale from session data
      inputStream - mandatory
      filename - mandatory, the import file be insert to file store with it
      Throws:
      UserException
      ApplicationException
    • assetArchivingTaskSave

      public AssetArchivingTask assetArchivingTaskSave(AssetArchivingTask assetArchivingTask, DataMap dataMap) throws ApplicationException
      Inserts or updates given AssetArchivingTask by setting its fields from given dataMap.
      Parameters:
      assetArchivingTask - mandatory
      dataMap - 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:
      ApplicationException
      DeleteTiedElementException - 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:
      ApplicationException
      UserException - with message key message.workflow.info.started to signal start of workflow.