mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RenditionService JS API.
Support for creating a RenditionDefinition from within JavaScript Support for executing such an ad hoc rendition definition. ScriptRendtionService now accepts long-form or short-form QNames where applicable. Replaced "rendering actions" with "rendition definitions" in some javadoc and some private or local variable names. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19269 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -118,9 +118,9 @@ public class RenditionDefinitionPersisterImpl implements RenditionDefinitionPers
|
||||
}
|
||||
|
||||
|
||||
public RenditionDefinition loadRenditionDefinition(QName renderingActionName)
|
||||
public RenditionDefinition loadRenditionDefinition(QName renditionDefinitionName)
|
||||
{
|
||||
NodeRef actionNode = findActionNode(renderingActionName);
|
||||
NodeRef actionNode = findActionNode(renditionDefinitionName);
|
||||
if (actionNode != null)
|
||||
{
|
||||
Action action = runtimeActionService.createAction(actionNode);
|
||||
@@ -149,13 +149,13 @@ public class RenditionDefinitionPersisterImpl implements RenditionDefinitionPers
|
||||
runtimeActionService.saveActionImpl(actionNodeRef, renderingAction);
|
||||
}
|
||||
|
||||
private NodeRef findActionNode(QName renderingActionName)
|
||||
private NodeRef findActionNode(QName renditionDefinitionName)
|
||||
{
|
||||
checkRenderingActionRootNodeExists();
|
||||
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(//
|
||||
RENDERING_ACTION_ROOT_NODE_REF,//
|
||||
ContentModel.ASSOC_CONTAINS,//
|
||||
renderingActionName);
|
||||
renditionDefinitionName);
|
||||
if (childAssocs.isEmpty())
|
||||
{
|
||||
return null;
|
||||
@@ -163,9 +163,9 @@ public class RenditionDefinitionPersisterImpl implements RenditionDefinitionPers
|
||||
else
|
||||
{
|
||||
if (childAssocs.size() > 1)
|
||||
{//
|
||||
throw new RenditionServiceException("Multiple rendering actions with the name: " + renderingActionName
|
||||
+ " exist!");
|
||||
{
|
||||
throw new RenditionServiceException("Multiple rendition definitions with the name: "
|
||||
+ renditionDefinitionName + " exist!");
|
||||
}
|
||||
return childAssocs.get(0).getChildRef();
|
||||
}
|
||||
|
Reference in New Issue
Block a user