. Merge horrors fixed

. Code compile issue fixed

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4669 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-12-20 10:03:44 +00:00
parent e6f28374a5
commit ec80a72900
11 changed files with 1932 additions and 1926 deletions

View File

@@ -77,7 +77,7 @@ public abstract class BasePathResultsMap extends BaseTemplateMap
if (nodes.size() != 0)
{
result = new ArrayList<TemplateNode>(1);
result.add(new TemplateNode(nodes.get(0), this.services));
result.add(new TemplateNode(nodes.get(0), this.services, this.parent.getImageResolver()));
}
}
// or all the results
@@ -86,7 +86,7 @@ public abstract class BasePathResultsMap extends BaseTemplateMap
result = new ArrayList<TemplateNode>(nodes.size());
for (NodeRef ref : nodes)
{
result.add(new TemplateNode(ref, this.services));
result.add(new TemplateNode(ref, this.services, this.parent.getImageResolver()));
}
}
}

View File

@@ -75,7 +75,7 @@ public abstract class BaseSearchResultsMap extends BaseTemplateMap
NodeRef nodeRef = row.getNodeRef();
if (!nodeRefs.contains(nodeRef))
{
nodes.add(new TemplateNode(nodeRef, services));
nodes.add(new TemplateNode(nodeRef, services, this.parent.getImageResolver()));
nodeRefs.add(nodeRef);
}
}

View File

@@ -102,7 +102,7 @@ public final class Classification
ArrayList<CategoryTemplateNode> categoryNodes = new ArrayList<CategoryTemplateNode>(cars.size());
for (ChildAssociationRef car : cars)
{
categoryNodes.add(new CategoryTemplateNode(car.getChildRef(), this.services));
categoryNodes.add(new CategoryTemplateNode(car.getChildRef(), this.services, this.imageResolver));
}
return categoryNodes;
}

View File

@@ -309,18 +309,18 @@ public class FreeMarkerProcessor implements TemplateProcessor
Map<String, Object> model = new HashMap<String, Object>(16, 1.0f);
// supply the Company Home space as "companyhome"
model.put("companyhome", new TemplateNode(companyHome, services));
model.put("companyhome", new TemplateNode(companyHome, services, imageResolver));
// supply the users Home Space as "userhome"
model.put("userhome", new TemplateNode(userHome, services));
model.put("userhome", new TemplateNode(userHome, services, imageResolver));
// supply the current user Node as "person"
model.put("person", new TemplateNode(person, services));
model.put("person", new TemplateNode(person, services, imageResolver));
// add the template itself as "template" if it comes from content on a node
if (template != null)
{
model.put("template", new TemplateNode(template, services));
model.put("template", new TemplateNode(template, services, imageResolver));
}
// current date/time is useful to have and isn't supplied by FreeMarker by default

View File

@@ -116,7 +116,7 @@ public class TemplateServiceImplTest extends TestCase
// create test model
Map model = new HashMap(7, 1.0f);
model.put("root", new TemplateNode(root, serviceRegistry));
model.put("root", new TemplateNode(root, serviceRegistry, null));
// execute on test template
String output = templateService.processTemplate("freemarker", TEMPLATE_1, model);