New API for templates.

Provides access to AVM stores and nodes within those stores. The majority of the standard template Node API is available (such as properties, children, content, icons etc.) and some additional AVM specific methods. 

Root level helper object 'avm' provides lookup for AVM store object and AVM nodes objects by path in the OO style expected by template writers. Once retrieved, the store object provides store meta-data and access to the root Template AVM node for the store (or lookup of individual nodes by path) which exposes the standard template Node API.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5460 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-04-04 16:26:16 +00:00
parent 8760a86ff5
commit 98f2e85cc0
10 changed files with 924 additions and 178 deletions

View File

@@ -46,9 +46,9 @@ public final class AVM extends BaseScopableScriptImplementation
*/
public void setServiceRegistry(ServiceRegistry serviceRegistry)
{
this.services = serviceRegistry;
this.services = serviceRegistry;
}
/**
* Return an AVM Node representing the public store root folder.
*
@@ -61,16 +61,16 @@ public final class AVM extends BaseScopableScriptImplementation
AVMNode rootNode = null;
if (store != null && store.length() != 0)
{
String rootPath = store + ':' + getWebappsFolderPath();
AVMNodeDescriptor nodeDesc = this.services.getAVMService().lookup(-1, rootPath);
if (nodeDesc != null)
{
rootNode = new AVMNode(AVMNodeConverter.ToNodeRef(-1, rootPath), this.services, getScope());
}
String rootPath = store + ':' + getWebappsFolderPath();
AVMNodeDescriptor nodeDesc = this.services.getAVMService().lookup(-1, rootPath);
if (nodeDesc != null)
{
rootNode = new AVMNode(AVMNodeConverter.ToNodeRef(-1, rootPath), this.services, getScope());
}
}
return rootNode;
}
/**
* Return an AVM Node for the fully qualified path.
*
@@ -91,13 +91,13 @@ public final class AVM extends BaseScopableScriptImplementation
}
return node;
}
public static String getWebappsFolderPath()
{
return '/' + JNDIConstants.DIR_DEFAULT_WWW + '/' +
JNDIConstants.DIR_DEFAULT_APPBASE;
return '/' + JNDIConstants.DIR_DEFAULT_WWW +
'/' + JNDIConstants.DIR_DEFAULT_APPBASE;
}
public static String jsGet_webappsFolderPath()
{
return getWebappsFolderPath();