Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.repo.content.transform
Interface TransformerConfig

@org.alfresco.api.AlfrescoPublicApi
public interface TransformerConfig
Provides access to transformer configuration and current performance data.
Author:
Alan Davis

Field Summary
ALL_SUFFIXES
          All suffixes to property names used to transformer configuration
AMP
          The suffix to property names to indicate which Alfresco AMPs the transformer is available with.
ANY
          Wild card mimetype and mimetype extension.
AVAILABLE
          The suffix to property names to indicate that a transformer is available.
BLACKLIST
          The suffix to property names for the blacklist.
CONTENT
          Prefix before the transformer name of all property names that contain transformer information
DEBUG_ENTRIES
          The number of debug lines to keep.
DEFAULT_TRANSFORMER
          The 'transformer name' for system wide defaults for all transformers
EDITION
          The suffix to property names to indicate which Alfresco version the transformer is available with.
ENTRIES
ERROR_TIME
          The suffix to property names for the error time.
EXTENSIONS
          The separator between the transformer name and two mimetype extensions in a property name.
FAILOVER
          The suffix to property names for creating dynamic failover transformers
INITIAL_COUNT
          The suffix to property names for the the average count.
INITIAL_TIME
          The suffix to property names for the the average time.
String[][]
LIMIT_PAIR_SUFFIXES
          Suffix pairs (max and limit values) to property names used to define transformation limits
LIMIT_SUFFIXES
          Suffixes to property names used to define transformation limits
LOG_ENTRIES
          The number of log lines to keep.
MAX_PAGES
MAX_SOURCE_SIZE_K_BYTES
          Suffixes for limits.
MIMETYPES
          The separator between the transformer name and wildcarded mimetypes rather than extensions in a property name.
NO_SUFFIXES
          No suffixes to property names used to define transformer settings.
PAGE_LIMIT
char
PIPE
          Separator between transformers and mimetype extensions in a dynamic compound property value.
PIPELINE
          The suffix to property names for creating dynamic complex transformers
PREFIX
          The combined content and transformer name prefix of for all property names that contain transformer information
PRIORITY
          The suffix to property names for the priority.
int
PRIORITY_DEFAULT
          By default transformers have a priority of 100.
int
PRIORITY_EXPLICIT
          To support the historical concept of EXPLICIT transformers, all such transformers are given a PRIORITY_EXPLICIT (50).
READ_LIMIT_K_BYTES
READ_LIMIT_TIME_MS
SEPARATORS
          Both extension and minetype separators.
SUMMARY_TRANSFORMER_NAME
          Name given to the 'SUMMARY' dummy (does not exist) transformer that gathers data from all root level transformations
SUPPORTED
          The suffix to property names for supported and unsupported combinations.
THRESHOLD_COUNT
          The suffix to property names for the threshold count.
TIMEOUT_MS
TRANSFORMER
          Prefix for all transformer names
USE
          An optional separator appended after the normal suffix and following value that identifies the 'use' or 'application' of the property.
Method Summary
getBlacklist(ContentTransformer transformer, String sourceMimetype, String targetMimetype)
          Returns a list of blacklisted NodeRefs of the specified transformer for the the combination of source and target mimetype.
getLimits(ContentTransformer transformer, String sourceMimetype, String targetMimetype, String use)
          Returns the limits defined for the combination of transformer, sourceMimetype and targetMimetype.
int
getPriority(ContentTransformer contentTransformerHelper, String sourceMimetype, String targetMimetype)
          Returns the priority of the specified transformer for the the combination of source and target mimetype.
getProperties(boolean changesOnly)
          Returns a sorted set of all transformer properties, their values and includes comments about the properties.
getProperty(String name)
          Returns a transformer property value.
getStatistics(ContentTransformer transformer, String sourceMimetype, String targetMimetype, boolean createNew)
          Returns and creates if needed the TransformerStatistics object for the combination of transformer, sourceMimetype and targetMimetype.
int
getThresholdCount(ContentTransformer contentTransformerHelper, String sourceMimetype, String targetMimetype)
          Returns the threshold of the transformer.
boolean
isSupportedTransformation(ContentTransformer transformer, String sourceMimetype, String targetMimetype, TransformationOptions options)
          Returns true if the supplied mimetype transformation pair is allowed by the list of supported and unsupported transformations.
int
removeProperties(String propertyNames)
          Removes transformer properties.
int
setProperties(String propertyNamesAndValues)
          Sets a transformer property values.
Field Detail
ALL_SUFFIXES
public static final Collection<String> ALL_SUFFIXES
All suffixes to property names used to transformer configuration

AMP
public static final String AMP
The suffix to property names to indicate which Alfresco AMPs the transformer is available with. The value should be the AMP's ID. If not specified it is not restricted.
See Also:
EDITION, Constant Field Values

ANY
public static final String ANY
Wild card mimetype and mimetype extension.
See Also:
Constant Field Values

AVAILABLE
public static final String AVAILABLE
The suffix to property names to indicate that a transformer is available. If not specified, defaults to true, indicating it may be selected rather only being available as a component of another transformer.
See Also:
Constant Field Values

BLACKLIST
public static final String BLACKLIST
The suffix to property names for the blacklist.
See Also:
Constant Field Values

CONTENT
public static final String CONTENT
Prefix before the transformer name of all property names that contain transformer information
See Also:
Constant Field Values

DEBUG_ENTRIES
public static final String DEBUG_ENTRIES
The number of debug lines to keep. Turned off if <= 0.
See Also:
Constant Field Values

DEFAULT_TRANSFORMER
public static final String DEFAULT_TRANSFORMER
The 'transformer name' for system wide defaults for all transformers
See Also:
Constant Field Values

EDITION
public static final String EDITION
The suffix to property names to indicate which Alfresco version the transformer is available with. If not specified it is not restricted. So if set to "Enterprise" it is not available to Community.
See Also:
AMP, Constant Field Values

ENTRIES
public static final String ENTRIES
See Also:
Constant Field Values

ERROR_TIME
public static final String ERROR_TIME
The suffix to property names for the error time.
See Also:
Constant Field Values

EXTENSIONS
public static final String EXTENSIONS
The separator between the transformer name and two mimetype extensions in a property name.
See Also:
Constant Field Values

FAILOVER
public static final String FAILOVER
The suffix to property names for creating dynamic failover transformers
See Also:
Constant Field Values

INITIAL_COUNT
public static final String INITIAL_COUNT
The suffix to property names for the the average count. Only used in the initial setup of TransformerData. This is a historical property used by the 'Transformation Server' to set an effective priority.
See Also:
Constant Field Values

INITIAL_TIME
public static final String INITIAL_TIME
The suffix to property names for the the average time. Only used in the initial setup of TransformerData. This is a historical property used by the 'Transformation Server' to set an effective priority.
See Also:
Constant Field Values

LIMIT_PAIR_SUFFIXES
public static final String[][] LIMIT_PAIR_SUFFIXES
Suffix pairs (max and limit values) to property names used to define transformation limits

LIMIT_SUFFIXES
public static final Collection<String> LIMIT_SUFFIXES
Suffixes to property names used to define transformation limits

LOG_ENTRIES
public static final String LOG_ENTRIES
The number of log lines to keep. Turned off if <= 0.
See Also:
Constant Field Values

MAX_PAGES
public static final String MAX_PAGES
See Also:
Constant Field Values

MAX_SOURCE_SIZE_K_BYTES
public static final String MAX_SOURCE_SIZE_K_BYTES
Suffixes for limits.
See Also:
Constant Field Values

MIMETYPES
public static final String MIMETYPES
The separator between the transformer name and wildcarded mimetypes rather than extensions in a property name. Effectively equivalent to multiple properties using the EXTENSIONS.
See Also:
Constant Field Values

NO_SUFFIXES
public static final Collection<String> NO_SUFFIXES
No suffixes to property names used to define transformer settings.

PAGE_LIMIT
public static final String PAGE_LIMIT
See Also:
Constant Field Values

PIPE
public static final char PIPE
Separator between transformers and mimetype extensions in a dynamic compound property value.
See Also:
Constant Field Values

PIPELINE
public static final String PIPELINE
The suffix to property names for creating dynamic complex transformers
See Also:
Constant Field Values

PREFIX
public static final String PREFIX
The combined content and transformer name prefix of for all property names that contain transformer information
See Also:
Constant Field Values

PRIORITY
public static final String PRIORITY
The suffix to property names for the priority.
See Also:
Constant Field Values

PRIORITY_DEFAULT
public static final int PRIORITY_DEFAULT
By default transformers have a priority of 100.
See Also:
Constant Field Values

PRIORITY_EXPLICIT
public static final int PRIORITY_EXPLICIT
To support the historical concept of EXPLICIT transformers, all such transformers are given a PRIORITY_EXPLICIT (50). By default transformers have a default of 10. A value of 5 allows better transformers to be added later.
See Also:
Constant Field Values

READ_LIMIT_K_BYTES
public static final String READ_LIMIT_K_BYTES
See Also:
Constant Field Values

READ_LIMIT_TIME_MS
public static final String READ_LIMIT_TIME_MS
See Also:
Constant Field Values

SEPARATORS
public static final String[] SEPARATORS
Both extension and minetype separators.

SUMMARY_TRANSFORMER_NAME
public static final String SUMMARY_TRANSFORMER_NAME
Name given to the 'SUMMARY' dummy (does not exist) transformer that gathers data from all root level transformations
See Also:
Constant Field Values

SUPPORTED
public static final String SUPPORTED
The suffix to property names for supported and unsupported combinations.
See Also:
Constant Field Values

THRESHOLD_COUNT
public static final String THRESHOLD_COUNT
The suffix to property names for the threshold count.
See Also:
Constant Field Values

TIMEOUT_MS
public static final String TIMEOUT_MS
See Also:
Constant Field Values

TRANSFORMER
public static final String TRANSFORMER
Prefix for all transformer names
See Also:
Constant Field Values

USE
public static final String USE
An optional separator appended after the normal suffix and following value that identifies the 'use' or 'application' of the property. Example uses include 'index' 'doclib' and 'preview'. The corresponding configuration value is only used in the context of the specified usage.
See Also:
Constant Field Values
Method Detail
getProperty
String getProperty(String name)
Returns a transformer property value.
Parameters:
name - of the property.
Returns:
a transformer property or null if not set.

getProperties
String getProperties(boolean changesOnly)
Returns a sorted set of all transformer properties, their values and includes comments about the properties.
Parameters:
changesOnly - only custom values will be included.
Returns:
a multi-line String which is never {code null}.

removeProperties
int removeProperties(String propertyNames)
Removes transformer properties.
Parameters:
propertyNames - new line separated names. Any values will be ignored.
Returns:
the number of properties removed.
Throws:
IllegalArgumentException - if the properties were not set or the list contains errors.

setProperties
int setProperties(String propertyNamesAndValues)
Sets a transformer property values. These will be stored in the database but on an MBean reset is cleared.
Parameters:
propertyNamesAndValues - new line separated name and values
Returns:
the number of properties set.
Throws:
IllegalArgumentException - the list contains errors.

getStatistics
TransformerStatistics getStatistics(ContentTransformer transformer,
                                    String sourceMimetype,
                                    String targetMimetype,
                                    boolean createNew)
Returns and creates if needed the TransformerStatistics object for the combination of transformer, sourceMimetype and targetMimetype. When transformer is null this is the system wide summary object for a combination of sourceMimetype and targetMimetype. When both sourceMimetype and targetMimetype are null this is the transformer's summary object. When all three parameters are null this is the system wide summary for all transformers.
Parameters:
transformer - the transformer for which data is being recorded.
sourceMimetype - the source mimetype.
targetMimetype - the source mimetype.
createNew - indicates if a new object should be created if it does not exist.
Returns:
the requested TransformerStatistics.

getLimits
TransformationOptionLimits getLimits(ContentTransformer transformer,
                                     String sourceMimetype,
                                     String targetMimetype,
                                     String use)
Returns the limits defined for the combination of transformer, sourceMimetype and targetMimetype. When the transformer is null, this is a default value. When both sourceMimetype and targetMimetype are null this is a default for the specified transformer.
Parameters:
use - to which the limits will be put. For example "index", "webpreview", "doclib", "syncRule", "aysncRule". null is the default.
Returns:
the combined (takes into account defaults from higher levels) limits for the combination.

isSupportedTransformation
boolean isSupportedTransformation(ContentTransformer transformer,
                                  String sourceMimetype,
                                  String targetMimetype,
                                  TransformationOptions options)
Returns true if the supplied mimetype transformation pair is allowed by the list of supported and unsupported transformations.
Parameters:
options - not currently used

getPriority
int getPriority(ContentTransformer contentTransformerHelper,
                String sourceMimetype,
                String targetMimetype)
Returns the priority of the specified transformer for the the combination of source and target mimetype.
Returns:
the priority. To support the historical concept of EXPLICIT transformers, all such transformers are given a PRIORITY_EXPLICIT (50). By default transformers have a default of 100.

getBlacklist
List<NodeRefgetBlacklist(ContentTransformer transformer,
                           String sourceMimetype,
                           String targetMimetype)
Returns a list of blacklisted NodeRefs of the specified transformer for the the combination of source and target mimetype.
Returns:
the blacklist or null is none.

getThresholdCount
int getThresholdCount(ContentTransformer contentTransformerHelper,
                      String sourceMimetype,
                      String targetMimetype)
Returns the threshold of the transformer. It is only after this number of transformation attempts that the average time is used.
Returns:
the threshold.

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.