org.alfresco.service.cmr.repository
Class TransformationOptions

java.lang.Object
  extended by org.alfresco.service.cmr.repository.TransformationOptions
Direct Known Subclasses:
ImageTransformationOptions, RuntimeExecutableContentTransformerOptions, SWFTransformationOptions

public class TransformationOptions
extends java.lang.Object

Class containing values of options that are passed to content transformers. These options are used to determine the applicability of a content transformer and also during the transformation process to provide context or parameter values.

This base class provides some common, optional contextual information about the source and target nodes and properties used by the transformation.

Since:
3.0.0

Field Summary
static java.lang.String OPT_SOURCE_CONTENT_PROPERTY
           
static java.lang.String OPT_SOURCE_NODEREF
          Option map names to preserve backward compatibility
static java.lang.String OPT_TARGET_CONTENT_PROPERTY
           
static java.lang.String OPT_TARGET_NODEREF
           
 
Constructor Summary
TransformationOptions()
          Default construtor
TransformationOptions(java.util.Map optionsMap)
          Constrcutor.
TransformationOptions(NodeRef sourceNodeRef, QName sourceContentProperty, NodeRef targetNodeRef, QName targetContentProperty)
          Constructor
 
Method Summary
 QName getSourceContentProperty()
          Get the source content property
 NodeRef getSourceNodeRef()
          Gets the source node reference
 QName getTargetContentProperty()
          Get the target content property
 NodeRef getTargetNodeRef()
          Get the target node reference
 void setSourceContentProperty(QName sourceContentProperty)
          Set the source content property
 void setSourceNodeRef(NodeRef sourceNodeRef)
          Set the source node reference
 void setTargetContentProperty(QName targetContentProperty)
          Set the target content property
 void setTargetNodeRef(NodeRef targetNodeRef)
          Set the taget node reference
 java.util.Map toMap()
          Convert the transformation options into a map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPT_SOURCE_NODEREF

public static final java.lang.String OPT_SOURCE_NODEREF
Option map names to preserve backward compatibility

See Also:
Constant Field Values

OPT_SOURCE_CONTENT_PROPERTY

public static final java.lang.String OPT_SOURCE_CONTENT_PROPERTY
See Also:
Constant Field Values

OPT_TARGET_NODEREF

public static final java.lang.String OPT_TARGET_NODEREF
See Also:
Constant Field Values

OPT_TARGET_CONTENT_PROPERTY

public static final java.lang.String OPT_TARGET_CONTENT_PROPERTY
See Also:
Constant Field Values
Constructor Detail

TransformationOptions

public TransformationOptions()
Default construtor


TransformationOptions

public TransformationOptions(NodeRef sourceNodeRef,
                             QName sourceContentProperty,
                             NodeRef targetNodeRef,
                             QName targetContentProperty)
Constructor

Parameters:
sourceNodeRef - the source node reference
sourceContentProperty - the source content property
targetNodeRef - the target node reference
targetContentProperty - the target content property

TransformationOptions

public TransformationOptions(java.util.Map optionsMap)
Constrcutor. Creates a transformation options object from a map. Provided for back ward compatibility.

Parameters:
optionsMap - options map
Method Detail

setSourceNodeRef

public void setSourceNodeRef(NodeRef sourceNodeRef)
Set the source node reference

Parameters:
sourceNodeRef - the source node reference

getSourceNodeRef

public NodeRef getSourceNodeRef()
Gets the source node reference

Returns:
NodeRef the source node reference

setSourceContentProperty

public void setSourceContentProperty(QName sourceContentProperty)
Set the source content property

Parameters:
sourceContentProperty - the source content property

getSourceContentProperty

public QName getSourceContentProperty()
Get the source content property

Returns:
the source content property

setTargetNodeRef

public void setTargetNodeRef(NodeRef targetNodeRef)
Set the taget node reference

Parameters:
targetNodeRef - the target node reference

getTargetNodeRef

public NodeRef getTargetNodeRef()
Get the target node reference

Returns:
the target node reference

setTargetContentProperty

public void setTargetContentProperty(QName targetContentProperty)
Set the target content property

Parameters:
targetContentProperty - the target content property

getTargetContentProperty

public QName getTargetContentProperty()
Get the target content property

Returns:
the target property

toMap

public java.util.Map toMap()
Convert the transformation options into a map.

Basic options (optional) are:

Override this method to append option values to the map. Derived classes should call the base class before appending further values and returning the result.



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.