Morning merge.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@2937 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-05-22 17:20:58 +00:00
parent df28c98983
commit 11037b2451
2 changed files with 17 additions and 5 deletions

View File

@@ -101,6 +101,7 @@ public class ScriptActionExecutor extends ActionExecuterAbstractBase
personRef, personRef,
getCompanyHome(), getCompanyHome(),
homeSpaceRef, homeSpaceRef,
scriptRef,
actionedUponNodeRef, actionedUponNodeRef,
spaceRef); spaceRef);

View File

@@ -238,15 +238,18 @@ public class RhinoScriptService implements ScriptService
* @param person The current user Person Node * @param person The current user Person Node
* @param companyHome The CompanyHome ref * @param companyHome The CompanyHome ref
* @param userHome The User home space ref * @param userHome The User home space ref
* @param script Optional ref to the script itself
* @param document Optional ref to a document Node * @param document Optional ref to a document Node
* @param space Optional ref to a space Node * @param space Optional ref to a space Node
* *
* @return A Map of global scope scriptable Node objects * @return A Map of global scope scriptable Node objects
*/ */
public static Map<String, Object> buildDefaultModel(ServiceRegistry services, public static Map<String, Object> buildDefaultModel(
NodeRef person, NodeRef companyHome, NodeRef userHome, NodeRef document, NodeRef space) ServiceRegistry services,
NodeRef person, NodeRef companyHome, NodeRef userHome,
NodeRef script, NodeRef document, NodeRef space)
{ {
return buildDefaultModel(services, person, companyHome, userHome, document, space, null); return buildDefaultModel(services, person, companyHome, userHome, script, document, space, null);
} }
/** /**
@@ -255,6 +258,7 @@ public class RhinoScriptService implements ScriptService
* 'companyhome' - the Company Home node<br> * 'companyhome' - the Company Home node<br>
* 'userhome' - the current user home space node<br> * 'userhome' - the current user home space node<br>
* 'person' - the node representing the current user Person<br> * 'person' - the node representing the current user Person<br>
* 'script' - the node representing the script itself (may not be available)<br>
* 'document' - document context node (may not be available)<br> * 'document' - document context node (may not be available)<br>
* 'space' - space context node (may not be available) * 'space' - space context node (may not be available)
* *
@@ -262,14 +266,17 @@ public class RhinoScriptService implements ScriptService
* @param person The current user Person Node * @param person The current user Person Node
* @param companyHome The CompanyHome ref * @param companyHome The CompanyHome ref
* @param userHome The User home space ref * @param userHome The User home space ref
* @param script Optional ref to the script itself
* @param document Optional ref to a document Node * @param document Optional ref to a document Node
* @param space Optional ref to a space Node * @param space Optional ref to a space Node
* @param resolver Image resolver to resolve icon images etc. * @param resolver Image resolver to resolve icon images etc.
* *
* @return A Map of global scope scriptable Node objects * @return A Map of global scope scriptable Node objects
*/ */
public static Map<String, Object> buildDefaultModel(ServiceRegistry services, public static Map<String, Object> buildDefaultModel(
NodeRef person, NodeRef companyHome, NodeRef userHome, NodeRef document, NodeRef space, ServiceRegistry services,
NodeRef person, NodeRef companyHome, NodeRef userHome,
NodeRef script, NodeRef document, NodeRef space,
TemplateImageResolver resolver) TemplateImageResolver resolver)
{ {
Map<String, Object> model = new HashMap<String, Object>(); Map<String, Object> model = new HashMap<String, Object>();
@@ -278,6 +285,10 @@ public class RhinoScriptService implements ScriptService
model.put("companyhome", new Node(companyHome, services, resolver)); model.put("companyhome", new Node(companyHome, services, resolver));
model.put("userhome", new Node(userHome, services, resolver)); model.put("userhome", new Node(userHome, services, resolver));
model.put("person", new Node(person, services, resolver)); model.put("person", new Node(person, services, resolver));
if (script != null)
{
model.put("script", new Node(script, services, resolver));
}
if (document != null) if (document != null)
{ {
model.put("document", new Node(document, services, resolver)); model.put("document", new Node(document, services, resolver));