SAIL-352 Added i18n keys and values for the Rendition Service's rendering engines (actions) and their parameters.

This included some overrides of getParamDisplayLabel() in the RenditionService classes to support i18n key-value pairs which are common across many rendering engines.

These actions and their parameters have been hidden by Erik in the default Alfresco config. The changes contained in this check-in mean that 3rd parties could show these actions and parameters and see useful labels.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20009 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2010-04-27 12:41:03 +00:00
parent d6f6508bd9
commit 7aba799ed8
5 changed files with 96 additions and 5 deletions

View File

@@ -50,6 +50,7 @@ import org.alfresco.service.namespace.QName;
import org.alfresco.util.GUID;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.surf.util.I18NUtil;
import com.sun.star.lang.NullPointerException;
@@ -378,6 +379,30 @@ public abstract class AbstractRenderingEngine extends ActionExecuterAbstractBase
paramList.addAll(getParameterDefinitions());
}
/**
* This method gets the parameter definition display label from the properties file.
* It looks first for a property whose key has a fixed rendition service-specific
* prefix and if that gets null, it then delegates to the standard bean name-based
* approach.
*
* @param paramName the name of the parameter
* @return the display label of the parameter
*/
@Override
protected String getParamDisplayLabel(String paramName)
{
// First we try to get the message using a common prefix for all rendering engines.
final String commonPropertiesPrefix = "baseRenderingAction";
String message = I18NUtil.getMessage(commonPropertiesPrefix + "." + paramName + "." + DISPLAY_LABEL);
// And if that doesn't work we delegate to the standard bean name-based approach.
if (message == null)
{
message = super.getParamDisplayLabel(paramName);
}
return message;
}
/**
* Supplies the list of parameters required by this rendering engine.
*