Scheduled Actions

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2673 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2006-04-20 13:57:06 +00:00
parent b2998a79fd
commit 05525aff09
19 changed files with 2769 additions and 1 deletions

View File

@@ -91,6 +91,8 @@ public final class TemplateNode implements Serializable
private Long size = null;
private TemplateImageResolver imageResolver = null;
private TemplateNode parent = null;
private ChildAssociationRef primaryParentAssoc;
/**
@@ -491,6 +493,19 @@ public final class TemplateNode implements Serializable
return parent;
}
/**
*
* @return the primary parent association so we can get at the association QName and the association type QName.
*/
public ChildAssociationRef getPrimaryParentAssoc()
{
if (primaryParentAssoc == null)
{
primaryParentAssoc = this.services.getNodeService().getPrimaryParent(nodeRef);
}
return primaryParentAssoc;
}
/**
* @return the content String for this node from the default content property
* (@see ContentModel.PROP_CONTENT)

View File

@@ -35,4 +35,13 @@ public interface TemplateProcessor
* @param out Writer object to send output too
*/
public void process(String template, Object model, Writer out);
/**
* Process a string template against the supplied data model and write to the out.
*
* @param template Template string
* @param model Object model to process template against
* @param out Writer object to send output too
*/
public void processString(String template, Object model, Writer out);
}

View File

@@ -55,6 +55,34 @@ public interface TemplateService
public void processTemplate(String engine, String template, Object model, Writer out)
throws TemplateException;
/**
* Process a given template, provided as a string, against the supplied data model and return the result as a String
*
* @param engine Name of the template engine to use
* @param template Template string
* @param model Object model to process template against
*
* @return output of the template process as a String
*
* @throws TemplateException
*/
public String processTemplateString(String engine, String template, Object model)
throws TemplateException;
/**
* Process a given template, provided as a string, against the supplied data model and report the
* result back in the provided writer.
*
* @param engine Name of the template engine to use
* @param template Template string
* @param model Object model to process template against
* @param out Writer object to send output too
*
* @throws TemplateException
*/
public void processTemplateString(String engine, String template, Object model, Writer out)
throws TemplateException;
/**
* Return a TemplateProcessor instance for the specified engine name.
* Note that the processor instance is NOT thread safe!