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_INCLUDE_EMBEDDED
           
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
           
static org.alfresco.service.cmr.repository.datatype.TypeConverter.Converter relaxedBooleanTypeConverter
           
 
Constructor Summary
TransformationOptions()
          Default construtor
TransformationOptions(java.util.Map optionsMap)
          Constructor.
TransformationOptions(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.namespace.QName sourceContentProperty, org.alfresco.service.cmr.repository.NodeRef targetNodeRef, org.alfresco.service.namespace.QName targetContentProperty)
          Constructor
 
Method Summary
 java.lang.Boolean getIncludeEmbedded()
          If the source content includes embedded resources, should the transformer attempt to transform these as well? Not many transformers do support embedded resources, so this option will only affect those that can.
 org.alfresco.service.namespace.QName getSourceContentProperty()
          Get the source content property
 org.alfresco.service.cmr.repository.NodeRef getSourceNodeRef()
          Gets the source node reference
 org.alfresco.service.namespace.QName getTargetContentProperty()
          Get the target content property
 org.alfresco.service.cmr.repository.NodeRef getTargetNodeRef()
          Get the target node reference
 void setIncludeEmbedded(java.lang.Boolean includeEmbedded)
          If the source content includes embedded resources, should the transformer attempt to transform these as well? Not many transformers do support embedded resources, so this option will only affect those that can.
 void setSourceContentProperty(org.alfresco.service.namespace.QName sourceContentProperty)
          Set the source content property
 void setSourceNodeRef(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
          Set the source node reference
 void setTargetContentProperty(org.alfresco.service.namespace.QName targetContentProperty)
          Set the target content property
 void setTargetNodeRef(org.alfresco.service.cmr.repository.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

OPT_INCLUDE_EMBEDDED

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

relaxedBooleanTypeConverter

public static org.alfresco.service.cmr.repository.datatype.TypeConverter.Converter relaxedBooleanTypeConverter
Constructor Detail

TransformationOptions

public TransformationOptions()
Default construtor


TransformationOptions

public TransformationOptions(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
                             org.alfresco.service.namespace.QName sourceContentProperty,
                             org.alfresco.service.cmr.repository.NodeRef targetNodeRef,
                             org.alfresco.service.namespace.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)
Constructor. Creates a transformation options object from a map. Provided for back ward compatibility.

Parameters:
optionsMap - options map
Method Detail

setSourceNodeRef

public void setSourceNodeRef(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
Set the source node reference

Parameters:
sourceNodeRef - the source node reference

getSourceNodeRef

public org.alfresco.service.cmr.repository.NodeRef getSourceNodeRef()
Gets the source node reference

Returns:
NodeRef the source node reference

setSourceContentProperty

public void setSourceContentProperty(org.alfresco.service.namespace.QName sourceContentProperty)
Set the source content property

Parameters:
sourceContentProperty - the source content property

getSourceContentProperty

public org.alfresco.service.namespace.QName getSourceContentProperty()
Get the source content property

Returns:
the source content property

setTargetNodeRef

public void setTargetNodeRef(org.alfresco.service.cmr.repository.NodeRef targetNodeRef)
Set the taget node reference

Parameters:
targetNodeRef - the target node reference

getTargetNodeRef

public org.alfresco.service.cmr.repository.NodeRef getTargetNodeRef()
Get the target node reference

Returns:
the target node reference

setTargetContentProperty

public void setTargetContentProperty(org.alfresco.service.namespace.QName targetContentProperty)
Set the target content property

Parameters:
targetContentProperty - the target content property

getTargetContentProperty

public org.alfresco.service.namespace.QName getTargetContentProperty()
Get the target content property

Returns:
the target property

setIncludeEmbedded

public void setIncludeEmbedded(java.lang.Boolean includeEmbedded)
If the source content includes embedded resources, should the transformer attempt to transform these as well? Not many transformers do support embedded resources, so this option will only affect those that can.

Parameters:
includeEmbedded - the include embedded flag.

getIncludeEmbedded

public java.lang.Boolean getIncludeEmbedded()
If the source content includes embedded resources, should the transformer attempt to transform these as well? Not many transformers do support embedded resources, so this option will only affect those that can.

Returns:
true, false, or null for the default for the transformer

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.