Package com.day.cq.dam.api
Interface DamManager
-
@Deprecated public interface DamManager
Deprecated.UseDamUtil
instead.TheDamManager
provides utility methods for DAM.The DAM manager can be adapted (retrieved) via resource resolver:
... DamManager damManager = resourceResolver.adaptTo(DamManager.class); ...
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Asset
createAssetStructure(java.lang.String binaryPath, Session session, boolean doSave)
Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#createAssetForBinary(String, ResourceResolver, Boolean)
instead.java.lang.String
createBinaryUploadLocationPath(java.lang.String assetNodePath)
Deprecated.UseDamUtil.assetToBinaryPath(String)
instead.java.lang.String
createMetadataPath(java.lang.String binaryNodePath)
Deprecated.UseDamUtil.binaryToAssetPath(String)
instead.java.io.File
createTempFile(java.lang.String prefix, java.lang.String suffix)
Deprecated.UseFile.createTempFile(String, String)
instead.Node
getAssetNode(java.lang.String assetNodePath, Session session)
Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#getAssetNodeForBinary(String, Session)
instead.Session
getSession()
Deprecated.Will be removed without replacement.void
removeAssetNode(java.lang.String assetNodePath, Session session)
Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#removeAssetForBinary(String, Session)
instead.
-
-
-
Method Detail
-
createTempFile
@Deprecated java.io.File createTempFile(java.lang.String prefix, java.lang.String suffix) throws java.io.IOException
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 theDamManager
the 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:
java.io.IOException
- Thrown upon an error occurring during file handling.
-
createMetadataPath
@Deprecated java.lang.String createMetadataPath(java.lang.String binaryNodePath)
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 java.lang.String createBinaryUploadLocationPath(java.lang.String assetNodePath)
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 Session getSession() throws RepositoryException
Deprecated.Will be removed without replacement.Creates a new administrativeSession
on the workspace used by theDamManager
.- Returns:
- The administrative JCR session.
- Throws:
RepositoryException
- Thrown upon encountering an error creating the session.
-
getAssetNode
@Deprecated Node getAssetNode(java.lang.String assetNodePath, Session session)
Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#getAssetNodeForBinary(String, Session)
instead.Retrieves the node given by theassetNodePath
parameter ornull
if it doesn't exist.- Parameters:
assetNodePath
- The node to retrieve.session
- The JCR session to work with.- Returns:
- The node.
-
removeAssetNode
@Deprecated void removeAssetNode(java.lang.String assetNodePath, Session session)
Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#removeAssetForBinary(String, Session)
instead.Removes the node of an asset.- Parameters:
assetNodePath
- The path of the asset to remove.session
- The JCR session to work with.
-
createAssetStructure
@Deprecated Asset createAssetStructure(java.lang.String binaryPath, Session session, boolean doSave)
Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#createAssetForBinary(String, ResourceResolver, Boolean)
instead.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/dam
prefix will be replaced by/content/dam
- Parameters:
binaryPath
- path where the binary is put for upload (/var/dam/...)session
- jcr session useddoSave
-true
for immediate saves- Returns:
- Returns the
Asset
-
-