Merged V1.4 to HEAD

svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3987 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4133 .
   Removed LicenseComponent reference from projects\repository\source\java\org\alfresco\repo\descriptor\DescriptorServiceImpl.java


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4135 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-10-17 22:42:59 +00:00
parent 4f1682e8d0
commit be167f60cf
106 changed files with 5379 additions and 2646 deletions

View File

@@ -220,25 +220,24 @@ public class RhinoScriptService implements ScriptService
// add useful util objects
model.put("actions", new Actions(services));
model.put("logger", new ScriptLogger());
model.put("utils", new ScriptUtils());
// insert supplied object model into root of the default scope
for (String key : model.keySet())
{
for (String key : model.keySet())
// set the root scope on appropriate objects
// this is used to allow native JS object creation etc.
Object obj = model.get(key);
if (obj instanceof Scopeable)
{
// set the root scope on appropriate objects
// this is used to allow native JS object creation etc.
Object obj = model.get(key);
if (obj instanceof Scopeable)
{
((Scopeable)obj).setScope(scope);
}
// convert/wrap each object to JavaScript compatible
Object jsObject = Context.javaToJS(obj, scope);
// insert into the root scope ready for access by the script
ScriptableObject.putProperty(scope, key, jsObject);
((Scopeable)obj).setScope(scope);
}
// convert/wrap each object to JavaScript compatible
Object jsObject = Context.javaToJS(obj, scope);
// insert into the root scope ready for access by the script
ScriptableObject.putProperty(scope, key, jsObject);
}
// execute the script
@@ -343,6 +342,10 @@ public class RhinoScriptService implements ScriptService
model.put("search", new Search(services, companyHome.getStoreRef(), resolver));
model.put("session", new Session(services, resolver));
model.put("classification", new Classification(services, companyHome.getStoreRef(), resolver));
return model;
}
}