mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ALF-14306 Add priorities to transformers
- Fix build failures git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@46909 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2012 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -107,6 +107,22 @@ public class DoubleMap<K1, K2, V>
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a value for the given keys without using wildcards.
|
||||
*/
|
||||
public V getNoWildcards(K1 key1, K2 key2)
|
||||
{
|
||||
V value = null;
|
||||
|
||||
Map<K2, V> map = mapMap.get(key1);
|
||||
if (map != null)
|
||||
{
|
||||
value = map.get(key2);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a value for the given keys.
|
||||
|
@@ -67,8 +67,7 @@ public class TransformerConfigLimits extends TransformerPropertyNameExtractor
|
||||
{
|
||||
options = getOrCreateTransformerOptionLimits(property.transformerName,
|
||||
property.sourceMimetype, property.targetMimetype);
|
||||
setTransformationOptionsFromProperties(options, property.transformerName, property.sourceExt, property.targetExt,
|
||||
property.value, property.suffix);
|
||||
setTransformationOptionsFromProperties(options, property.value, property.suffix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +86,7 @@ public class TransformerConfigLimits extends TransformerPropertyNameExtractor
|
||||
limits.put(transformerName, mimetypeLimits);
|
||||
}
|
||||
|
||||
TransformationOptionLimits options = mimetypeLimits.get(sourceMimetype, targetMimetype);
|
||||
TransformationOptionLimits options = mimetypeLimits.getNoWildcards(sourceMimetype, targetMimetype);
|
||||
if (options == null)
|
||||
{
|
||||
options = new TransformationOptionLimits();
|
||||
@@ -97,7 +96,7 @@ public class TransformerConfigLimits extends TransformerPropertyNameExtractor
|
||||
}
|
||||
|
||||
private void setTransformationOptionsFromProperties(TransformationOptionLimits options,
|
||||
String transformerName, String sourceExt, String targetExt, String value, String suffix)
|
||||
String value, String suffix)
|
||||
{
|
||||
long l = Long.parseLong(value);
|
||||
if (suffix == TransformerConfig.MAX_SOURCE_SIZE_K_BYTES)
|
||||
|
@@ -222,6 +222,14 @@ class TransformerSourceTargetValue
|
||||
{
|
||||
return new Triple<String, String, String>(transformerName, sourceExt, targetExt);
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return transformerName+'.'+(sourceExt.equals(ANY) && targetExt.equals(ANY)
|
||||
? ""
|
||||
: TransformerConfig.EXTENSIONS+'.'+sourceExt+'.'+targetExt+'.')+
|
||||
suffix+'='+value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
|
Reference in New Issue
Block a user