Package com.day.cq.dam.api
Interface DamManager
-
@Deprecated public interface DamManager
Deprecated.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(String binaryPath, Session session, boolean doSave)Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#createAssetForBinary(String, ResourceResolver, Boolean)instead.StringcreateBinaryUploadLocationPath(String assetNodePath)Deprecated.UseDamUtil.assetToBinaryPath(String)instead.StringcreateMetadataPath(String binaryNodePath)Deprecated.UseDamUtil.binaryToAssetPath(String)instead.FilecreateTempFile(String prefix, String suffix)Deprecated.UseFile.createTempFile(String, String)instead.NodegetAssetNode(String assetNodePath, Session session)Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#getAssetNodeForBinary(String, Session)instead.SessiongetSession()Deprecated.Will be removed without replacement.voidremoveAssetNode(String assetNodePath, Session session)Deprecated.Usecom.day.cq.dam.commons.util.DamUtil#removeAssetForBinary(String, Session)instead.
-
-
-
Method Detail
-
createTempFile
@Deprecated File createTempFile(String prefix, String suffix) throws 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 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 String createMetadataPath(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 String createBinaryUploadLocationPath(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(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(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(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
-
-