Package com.day.cq.dam.api
Interface DamManager
Deprecated.
The
DamManager provides utility methods for DAM.
The DAM manager can be adapted (retrieved) via resource resolver:
...
DamManager damManager = resourceResolver.adaptTo(DamManager.class);
...
-
Method Summary
Modifier and TypeMethodDescriptioncreateAssetStructure(String binaryPath, Session session, boolean doSave) Deprecated.Useinstead.invalid reference
com.day.cq.dam.commons.util.DamUtil#createAssetForBinary(String, ResourceResolver, Boolean)createBinaryUploadLocationPath(String assetNodePath) Deprecated.UseDamUtil.assetToBinaryPath(String)instead.createMetadataPath(String binaryNodePath) Deprecated.UseDamUtil.binaryToAssetPath(String)instead.createTempFile(String prefix, String suffix) Deprecated.UseFile.createTempFile(String, String)instead.getAssetNode(String assetNodePath, Session session) Deprecated.Useinstead.invalid reference
com.day.cq.dam.commons.util.DamUtil#getAssetNodeForBinary(String, Session)Deprecated.Will be removed without replacement.voidremoveAssetNode(String assetNodePath, Session session) Deprecated.Useinstead.invalid reference
com.day.cq.dam.commons.util.DamUtil#removeAssetForBinary(String, Session)
-
Method Details
-
createTempFile
Deprecated.UseFile.createTempFile(String, String)instead.This method works almost the same way asFile.createTempFile(String, String). The only difference is that one can specify on theDamManagerthe temp dir location.- Parameters:
prefix- The prefix string to be used in generating the file's name; must be at least three characters longsuffix- The suffix string to be used in generating the file's name; may benull, in which case the suffix".tmp"will be used- Returns:
- temp file
- Throws:
IOException- Thrown upon an error occurring during file handling.
-
createMetadataPath
Deprecated.UseDamUtil.binaryToAssetPath(String)instead.Creates the asset data path resp. replaces the /var/dam prefix with the /content/dam prefix- Parameters:
binaryNodePath- the binary file path (e.g. /var/dam/test.jpeg)- Returns:
- the path under /content/dam
-
createBinaryUploadLocationPath
Deprecated.UseDamUtil.assetToBinaryPath(String)instead.Creates the binary data path resp. replaces the /content/dam prefix with the /var/dam prefix- Parameters:
assetNodePath- the asset file path (e.g. /content/dam/test.jpeg)- Returns:
- the path under /var/dam
-
getSession
Deprecated.Will be removed without replacement.Creates a new administrativeSessionon the workspace used by theDamManager.- Returns:
- The administrative JCR session.
- Throws:
RepositoryException- Thrown upon encountering an error creating the session.
-
getAssetNode
Deprecated.Useinstead.invalid reference
com.day.cq.dam.commons.util.DamUtil#getAssetNodeForBinary(String, Session)Retrieves the node given by theassetNodePathparameter ornullif it doesn't exist.- Parameters:
assetNodePath- The node to retrieve.session- The JCR session to work with.- Returns:
- The node.
-
removeAssetNode
Deprecated.Useinstead.invalid reference
com.day.cq.dam.commons.util.DamUtil#removeAssetForBinary(String, Session)Removes the node of an asset.- Parameters:
assetNodePath- The path of the asset to remove.session- The JCR session to work with.
-
createAssetStructure
Deprecated.Useinstead.invalid reference
com.day.cq.dam.commons.util.DamUtil#createAssetForBinary(String, ResourceResolver, Boolean)This method creates the complete asset structure in the asset content 'store'. (in our case /content/dam'). following structure is created: <xmp> + file.jpg (dam:Asset) + jcr:content )(dam:AssetContent) + renditions (sling:Folder) + metadata (nt:unstructured)<xmp>
The binary path points to the upload location (in our case /var/dam). the
/var/damprefix will be replaced by/content/dam- Parameters:
binaryPath- path where the binary is put for upload (/var/dam/...)session- jcr session useddoSave-truefor immediate saves- Returns:
- Returns the
Asset
-
DamUtilinstead.