mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -38,6 +38,7 @@ import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* This abstract class forms a basis for all rendering engines that are built
|
||||
@@ -198,8 +199,33 @@ public abstract class BaseTemplateRenderingEngine extends AbstractRenderingEngin
|
||||
*/
|
||||
protected abstract String getTemplateType();
|
||||
|
||||
/**
|
||||
* 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 template-based rendering engines.
|
||||
final String commonPropertiesPrefix = "baseTemplateRenderingAction";
|
||||
String message = I18NUtil.getMessage(commonPropertiesPrefix + "." + paramName + "." + DISPLAY_LABEL);
|
||||
|
||||
// And if that doesn't work we delegate to the superclass.
|
||||
if (message == null)
|
||||
{
|
||||
message = super.getParamDisplayLabel(paramName);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/*
|
||||
* @seeorg.alfresco.repo.rendition.executer.AbstractRenderingEngine# getParameterDefinitions()
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.repo.rendition.executer.AbstractRenderingEngine#getParameterDefinitions()
|
||||
*/
|
||||
@Override
|
||||
protected Collection<ParameterDefinition> getParameterDefinitions()
|
||||
|
Reference in New Issue
Block a user