ALF-11747: Exposing package as TemplateNode in freemarker on top of existing NodeRef

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@47309 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Frederik Heremans
2013-02-28 14:09:01 +00:00
parent 949a02af2e
commit 107b59b42a

View File

@@ -238,6 +238,22 @@ public class Workflow extends BaseTemplateProcessorExtension
return (NodeRef)this.task.properties.get(WorkflowModel.ASSOC_PACKAGE);
}
/**
* @return The workflow package ref as a TemplateNode
*/
public TemplateNode getPackageTemplateNode()
{
NodeRef nodeRef = this.getPackage();
if (nodeRef != null)
{
return new TemplateNode(nodeRef, this.services, this.resolver);
}
else
{
return null;
}
}
/**
* @return the resources from the package attached to this workflow task
*/