Package com.day.cq.dam.api
Interface DamManager
-
@Deprecated public interface DamManagerDeprecated.UseDamUtilinstead.TheDamManagerprovides 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 AssetcreateAssetStructure(java.lang.String binaryPath, Session session, boolean doSave)Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#createAssetForBinary(String, ResourceResolver, Boolean)instead.java.lang.StringcreateBinaryUploadLocationPath(java.lang.String assetNodePath)Deprecated.UseDamUtil.assetToBinaryPath(String)instead.java.lang.StringcreateMetadataPath(java.lang.String binaryNodePath)Deprecated.UseDamUtil.binaryToAssetPath(String)instead.java.io.FilecreateTempFile(java.lang.String prefix, java.lang.String suffix)Deprecated.UseFile.createTempFile(String, String)instead.NodegetAssetNode(java.lang.String assetNodePath, Session session)Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#getAssetNodeForBinary(String, Session)instead.SessiongetSession()Deprecated.Will be removed without replacement.voidremoveAssetNode(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.IOExceptionDeprecated.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:
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 administrativeSessionon 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 theassetNodePathparameter ornullif 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/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
-
-