com.day.cq.dam.commons.process
Class AbstractAssetProcess

java.lang.Object
  extended by com.day.cq.dam.commons.process.AbstractAssetProcess
All Implemented Interfaces:
JavaProcess, JavaProcessExt
Direct Known Subclasses:
AbstractAssetProcess

Deprecated. use AbstractAssetWorkflowProcess instead.

public abstract class AbstractAssetProcess
extends Object
implements JavaProcessExt

The AbstractAssetProcess class ...


Field Summary
protected static String APPLICATION_OCTET_STREAM_MIMETYPE
          Deprecated.  
protected  MimeTypeService mimeTypeService
          Deprecated.  
static String TYPE_JCR_PATH
          Deprecated.  
 
Constructor Summary
AbstractAssetProcess()
          Deprecated.  
 
Method Summary
 void execute(WorkItem workItem, WorkflowSession workflowSession)
          Deprecated. Executes a new Java process with the given WorkItem and WorkflowSession.
protected  Asset getAssetFromPayload(WorkItem item, Session session)
          Deprecated. Retrieves the Asset from the payload of the given workflow item.
protected  AssetHandler getAssetHandler(String mimeType)
          Deprecated.  
protected  AssetManager getAssetManager(Session session)
          Deprecated.  
protected  String getMimetype(Node file)
          Deprecated.  
protected  Node getNodeFromPayload(WorkItem item, Session session)
          Deprecated. Retrieve the Node contained in a WorkItem's payload, as indicated by the payload JCR path string.
protected  ResourceResolver getResourceResolver(Session session)
          Deprecated.  
protected  List<String> getValuesFromArgs(String key, String[] arguments)
          Deprecated. This method allows you to get by passing a argument key the matching values.
protected  boolean isNotReadyForProcessing(Node asset)
          Deprecated. This method is a temporary solution to workaround the mac webdav behaviour which breaks the post processing stuff
protected  String recheck(String mimeType, Node file)
          Deprecated. It might happen that the webdav servlet does not detect the mimetype properly.
protected  String safeGetPath(Node node)
          Deprecated. Return the path of an asset node or the literal (unknown) if getting the path fails.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.day.cq.workflow.exec.JavaProcessExt
execute
 

Field Detail

TYPE_JCR_PATH

public static final String TYPE_JCR_PATH
Deprecated. 
See Also:
Constant Field Values

APPLICATION_OCTET_STREAM_MIMETYPE

protected static final String APPLICATION_OCTET_STREAM_MIMETYPE
Deprecated. 
See Also:
Constant Field Values

mimeTypeService

@Reference(policy=STATIC)
protected MimeTypeService mimeTypeService
Deprecated. 
Constructor Detail

AbstractAssetProcess

public AbstractAssetProcess()
Deprecated. 
Method Detail

getAssetFromPayload

protected Asset getAssetFromPayload(WorkItem item,
                                    Session session)
Deprecated. 
Retrieves the Asset from the payload of the given workflow item. If the payload type of the workfow is JCR_PATH, the payload value is treated as the path of the asset and subsequently the asset resolved and returned. If the asset is not found, null is returned.

Parameters:
item - The WorkItem to retrieve the asset from.
session - The session to access the repository with.
Returns:
The resolved payload asset or null if not found.

getNodeFromPayload

protected Node getNodeFromPayload(WorkItem item,
                                  Session session)
Deprecated. 
Retrieve the Node contained in a WorkItem's payload, as indicated by the payload JCR path string. If the node cannot be found, null is returned.

Parameters:
item - The workflow item from which to get the payload.
session - The JCR Session to access the repository with.
Returns:
The node given by the workflow payload, or null if not found.

getMimetype

protected String getMimetype(Node file)
Deprecated. 

isNotReadyForProcessing

protected boolean isNotReadyForProcessing(Node asset)
                                   throws RepositoryException
Deprecated. 
This method is a temporary solution to workaround the mac webdav behaviour which breaks the post processing stuff

Parameters:
asset - The Node to check.
Returns:
true if the particular node is ready to be processed.
Throws:
RepositoryException - If an error occurred accessing the repository.

getValuesFromArgs

protected List<String> getValuesFromArgs(String key,
                                         String[] arguments)
Deprecated. 
This method allows you to get by passing a argument key the matching values. E.g.:
args[0] = dimension:200:200 args[1] = dimension: 150:150 args[2] = name:cq5dam.web
by calling dimension the values form arg 1 and 2 are returned

Parameters:
key - argument key
arguments - arguments
Returns:
list of values

recheck

protected String recheck(String mimeType,
                         Node file)
                  throws RepositoryException
Deprecated. 
It might happen that the webdav servlet does not detect the mimetype properly. So rechecking a lowwercased file name makes sense.

Parameters:
mimeType -
file -
Returns:
Throws:
RepositoryException

safeGetPath

protected String safeGetPath(Node node)
Deprecated. 
Return the path of an asset node or the literal (unknown) if getting the path fails.

Parameters:
node - node
Returns:
path or null

getResourceResolver

protected ResourceResolver getResourceResolver(Session session)
Deprecated. 

getAssetManager

protected AssetManager getAssetManager(Session session)
Deprecated. 

getAssetHandler

protected AssetHandler getAssetHandler(String mimeType)
Deprecated. 

execute

public void execute(WorkItem workItem,
                    WorkflowSession workflowSession)
             throws Exception
Deprecated. 
Description copied from interface: JavaProcess
Executes a new Java process with the given WorkItem and WorkflowSession.

Specified by:
execute in interface JavaProcess
Parameters:
workItem - The WorkItem that defines the newly started JavaProcess.
workflowSession - The WorkflowSession that is used for starting the JavaProcess.
Throws:
Exception - Thrown in case something goes wrong during execution.


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.