. Moved avm specific types from ContentModel (cm) into WCMModel (wcm)

. Updated appropriate AVM and client classes to use new types
. Updated application types to derive from wcm types
NOTE: You will need a new database - this is NOT backward compatible with current websites!

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4022 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-10-04 16:39:26 +00:00
parent edea95ec65
commit d03bc33acb
9 changed files with 128 additions and 122 deletions

View File

@@ -417,12 +417,12 @@
<value>alfresco/model/dictionaryModel.xml</value> <value>alfresco/model/dictionaryModel.xml</value>
<value>alfresco/model/systemModel.xml</value> <value>alfresco/model/systemModel.xml</value>
<value>alfresco/model/contentModel.xml</value> <value>alfresco/model/contentModel.xml</value>
<value>alfresco/model/wcmModel.xml</value>
<value>alfresco/model/applicationModel.xml</value> <value>alfresco/model/applicationModel.xml</value>
<value>alfresco/model/forumModel.xml</value> <value>alfresco/model/forumModel.xml</value>
<value>alfresco/model/recordsModel.xml</value> <value>alfresco/model/recordsModel.xml</value>
<value>alfresco/model/bpmModel.xml</value> <value>alfresco/model/bpmModel.xml</value>
<value>alfresco/model/workflowModel.xml</value> <value>alfresco/model/workflowModel.xml</value>
<value>alfresco/model/wcmModel.xml</value>
<!-- Implementation models --> <!-- Implementation models -->
<value>org/alfresco/repo/security/authentication/userModel.xml</value> <value>org/alfresco/repo/security/authentication/userModel.xml</value>

View File

@@ -9,6 +9,7 @@
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/> <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<import uri="http://www.alfresco.org/model/wcmmodel/1.0" prefix="wcm"/>
</imports> </imports>
<namespaces> <namespaces>
@@ -53,7 +54,7 @@
<type name="app:webfolder"> <type name="app:webfolder">
<title>AVM Website Folder</title> <title>AVM Website Folder</title>
<parent>cm:avmfolder</parent> <parent>wcm:avmfolder</parent>
<properties> <properties>
<!-- root name of the avm staging stores for this web folder --> <!-- root name of the avm staging stores for this web folder -->
<property name="app:avmstore"> <property name="app:avmstore">

View File

@@ -79,29 +79,6 @@
</properties> </properties>
</type> </type>
<!-- Consider this an abstract type for most purposes. -->
<type name="cm:avmcontent">
<title>AVM Content</title>
<parent>cm:content</parent>
</type>
<type name="cm:avmplaincontent">
<title>AVM Plain content</title>
<parent>cm:avmcontent</parent>
</type>
<type name="cm:avmlayeredcontent">
<title>AVM Layered Content</title>
<parent>cm:content</parent>
<properties>
<property name="cm:avmfileindirection">
<title>File Layer Indirection</title>
<type>d:noderef</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="cm:dictionaryModel"> <type name="cm:dictionaryModel">
<title>Dictionary Model</title> <title>Dictionary Model</title>
<parent>cm:content</parent> <parent>cm:content</parent>
@@ -161,29 +138,6 @@
<parent>cm:folder</parent> <parent>cm:folder</parent>
</type> </type>
<!-- Consider this abstract for most purposes. -->
<type name="cm:avmfolder">
<title>AVM Folder</title>
<parent>cm:folder</parent>
</type>
<type name="cm:avmplainfolder">
<title>AVM Plain Folder</title>
<parent>cm:avmfolder</parent>
</type>
<type name="cm:avmlayeredfolder">
<title>AVM Layered Folder</title>
<parent>cm:avmfolder</parent>
<properties>
<property name="cm:avmdirindirection">
<title>Directory Layer Indirection</title>
<type>d:noderef</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="cm:person"> <type name="cm:person">
<title>Person</title> <title>Person</title>
<parent>sys:base</parent> <parent>sys:base</parent>

View File

@@ -7,6 +7,7 @@
<imports> <imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports> </imports>
<namespaces> <namespaces>
@@ -14,12 +15,56 @@
</namespaces> </namespaces>
<types> <types>
<!-- Consider this an abstract type for most purposes. -->
<type name="wcm:avmcontent">
<title>AVM Content</title>
<parent>cm:content</parent>
</type>
<type name="wcm:avmplaincontent">
<title>AVM Plain content</title>
<parent>wcm:avmcontent</parent>
</type>
<type name="wcm:avmlayeredcontent">
<title>AVM Layered Content</title>
<parent>cm:content</parent>
<properties>
<property name="wcm:avmfileindirection">
<title>File Layer Indirection</title>
<type>d:noderef</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<!-- Consider this abstract for most purposes. -->
<type name="wcm:avmfolder">
<title>AVM Folder</title>
<parent>cm:folder</parent>
</type>
<type name="wcm:avmplainfolder">
<title>AVM Plain Folder</title>
<parent>wcm:avmfolder</parent>
</type>
<type name="wcm:avmlayeredfolder">
<title>AVM Layered Folder</title>
<parent>wcm:avmfolder</parent>
<properties>
<property name="wcm:avmdirindirection">
<title>Directory Layer Indirection</title>
<type>d:noderef</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
</types> </types>
<aspects> <aspects>
<!-- An XForms capture template aspect. --> <!-- An XForms capture template aspect. -->
<aspect name="wcm:template"> <aspect name="wcm:template">
<title>XForms Template</title> <title>XForms Template</title>
<properties> <properties>
@@ -48,7 +93,6 @@
</aspect> </aspect>
<!-- An XML to something else transformer. --> <!-- An XML to something else transformer. -->
<aspect name="wcm:templateoutputmethod"> <aspect name="wcm:templateoutputmethod">
<title>XML Transformer</title> <title>XML Transformer</title>
<properties> <properties>

View File

@@ -97,13 +97,6 @@ public interface ContentModel
// content type and aspect constants // content type and aspect constants
static final QName TYPE_CONTENT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "content"); static final QName TYPE_CONTENT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "content");
static final QName PROP_CONTENT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "content"); static final QName PROP_CONTENT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "content");
static final QName TYPE_AVM_CONTENT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmcontent");
static final QName TYPE_AVM_PLAIN_CONTENT =
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmplaincontent");
static final QName TYPE_AVM_LAYERED_CONTENT =
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmlayeredcontent");
static final QName PROP_AVM_FILE_INDIRECTION =
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmfileindirection");
// title aspect // title aspect
static final QName ASPECT_TITLED = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "titled"); static final QName ASPECT_TITLED = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "titled");
@@ -149,10 +142,6 @@ public interface ContentModel
static final QName TYPE_FOLDER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "folder"); static final QName TYPE_FOLDER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "folder");
/** child association type supported by {@link #TYPE_FOLDER} */ /** child association type supported by {@link #TYPE_FOLDER} */
static final QName ASSOC_CONTAINS = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "contains"); static final QName ASSOC_CONTAINS = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "contains");
static final QName TYPE_AVM_FOLDER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmfolder");
static final QName TYPE_AVM_PLAIN_FOLDER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmplainfolder");
static final QName TYPE_AVM_LAYERED_FOLDER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmlayeredfolder");
static final QName PROP_AVM_DIR_INDIRECTION = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmdirindirection");
// person // person
static final QName TYPE_PERSON = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "person"); static final QName TYPE_PERSON = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "person");

View File

@@ -3,6 +3,7 @@
*/ */
package org.alfresco.model; package org.alfresco.model;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
/** /**
@@ -11,16 +12,25 @@ import org.alfresco.service.namespace.QName;
*/ */
public interface WCMModel public interface WCMModel
{ {
public static final String WCM_MODEL_URI = "http://www.alfresco.org/model/wcmmodel/1.0"; // content
public static final String WCM_MODEL_PREFIX = "wcm"; public static final QName TYPE_AVM_CONTENT = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "avmcontent");
public static final QName TYPE_AVM_PLAIN_CONTENT = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "avmplaincontent");
public static final QName TYPE_AVM_LAYERED_CONTENT = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "avmlayeredcontent");
public static final QName PROP_AVM_FILE_INDIRECTION = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "avmfileindirection");
// folders
public static final QName TYPE_AVM_FOLDER = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "avmfolder");
public static final QName TYPE_AVM_PLAIN_FOLDER = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "avmplainfolder");
public static final QName TYPE_AVM_LAYERED_FOLDER = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "avmlayeredfolder");
public static final QName PROP_AVM_DIR_INDIRECTION = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "avmdirindirection");
// The XForms data capture template aspect. // The XForms data capture template aspect.
public static final QName ASPECT_TEMPLATE = QName.createQName(WCM_MODEL_URI, "template"); public static final QName ASPECT_TEMPLATE = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "template");
public static final QName PROP_SCHEMA_ROOT_TAG_NAME = QName.createQName(WCM_MODEL_URI, "schemaroottagname"); public static final QName PROP_SCHEMA_ROOT_TAG_NAME = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "schemaroottagname");
public static final QName ASSOC_TEMPLATE_OUTPUT_METHODS = QName.createQName(WCM_MODEL_URI, "templateoutputmethods"); public static final QName ASSOC_TEMPLATE_OUTPUT_METHODS = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "templateoutputmethods");
// An XML to something else tranformer aspect. // An XML to something else tranformer aspect.
public static final QName ASPECT_TEMPLATE_OUTPUT_METHOD = QName.createQName(WCM_MODEL_URI, "templateoutputmethod"); public static final QName ASPECT_TEMPLATE_OUTPUT_METHOD = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "templateoutputmethod");
public static final QName PROP_TEMPLATE_OUTPUT_METHOD_TYPE = QName.createQName(WCM_MODEL_URI, "templateoutputmethodtype"); public static final QName PROP_TEMPLATE_OUTPUT_METHOD_TYPE = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "templateoutputmethodtype");
public static final QName PROP_TEMPLATE_SOURCE = QName.createQName(WCM_MODEL_URI, "templatesource"); public static final QName PROP_TEMPLATE_SOURCE = QName.createQName(NamespaceService.WCM_MODEL_1_0_URI, "templatesource");
} }

View File

@@ -29,6 +29,7 @@ import java.util.Set;
import java.util.SortedMap; import java.util.SortedMap;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.model.WCMModel;
import org.alfresco.repo.domain.PropertyValue; import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.repo.node.AbstractNodeServiceImpl; import org.alfresco.repo.node.AbstractNodeServiceImpl;
import org.alfresco.service.cmr.avm.AVMException; import org.alfresco.service.cmr.avm.AVMException;
@@ -251,19 +252,19 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
// Do the creates for supported types, or error out. // Do the creates for supported types, or error out.
try try
{ {
if (nodeTypeQName.equals(ContentModel.TYPE_AVM_PLAIN_FOLDER) || if (nodeTypeQName.equals(WCMModel.TYPE_AVM_PLAIN_FOLDER) ||
nodeTypeQName.equals(ContentModel.TYPE_FOLDER)) nodeTypeQName.equals(ContentModel.TYPE_FOLDER))
{ {
fAVMService.createDirectory(avmPath, nodeName); fAVMService.createDirectory(avmPath, nodeName);
} }
else if (nodeTypeQName.equals(ContentModel.TYPE_AVM_PLAIN_CONTENT) else if (nodeTypeQName.equals(WCMModel.TYPE_AVM_PLAIN_CONTENT) ||
||nodeTypeQName.equals(ContentModel.TYPE_CONTENT)) nodeTypeQName.equals(ContentModel.TYPE_CONTENT))
{ {
fAVMService.createFile(avmPath, nodeName); fAVMService.createFile(avmPath, nodeName);
} }
else if (nodeTypeQName.equals(ContentModel.TYPE_AVM_LAYERED_CONTENT)) else if (nodeTypeQName.equals(WCMModel.TYPE_AVM_LAYERED_CONTENT))
{ {
NodeRef indirection = (NodeRef)properties.get(ContentModel.PROP_AVM_FILE_INDIRECTION); NodeRef indirection = (NodeRef)properties.get(WCMModel.PROP_AVM_FILE_INDIRECTION);
if (indirection == null) if (indirection == null)
{ {
throw new InvalidTypeException("No Indirection Property", nodeTypeQName); throw new InvalidTypeException("No Indirection Property", nodeTypeQName);
@@ -271,9 +272,9 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
Pair<Integer, String> indVersionPath = AVMNodeConverter.ToAVMVersionPath(indirection); Pair<Integer, String> indVersionPath = AVMNodeConverter.ToAVMVersionPath(indirection);
fAVMService.createLayeredFile(indVersionPath.getSecond(), avmPath, nodeName); fAVMService.createLayeredFile(indVersionPath.getSecond(), avmPath, nodeName);
} }
else if (nodeTypeQName.equals(ContentModel.TYPE_AVM_LAYERED_FOLDER)) else if (nodeTypeQName.equals(WCMModel.TYPE_AVM_LAYERED_FOLDER))
{ {
NodeRef indirection = (NodeRef)properties.get(ContentModel.PROP_AVM_DIR_INDIRECTION); NodeRef indirection = (NodeRef)properties.get(WCMModel.PROP_AVM_DIR_INDIRECTION);
if (indirection == null) if (indirection == null)
{ {
throw new InvalidTypeException("No Indirection Property.", nodeTypeQName); throw new InvalidTypeException("No Indirection Property.", nodeTypeQName);
@@ -477,19 +478,19 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
} }
if (desc.isPlainDirectory()) if (desc.isPlainDirectory())
{ {
return ContentModel.TYPE_AVM_PLAIN_FOLDER; return WCMModel.TYPE_AVM_PLAIN_FOLDER;
} }
else if (desc.isPlainFile()) else if (desc.isPlainFile())
{ {
return ContentModel.TYPE_AVM_PLAIN_CONTENT; return WCMModel.TYPE_AVM_PLAIN_CONTENT;
} }
else if (desc.isLayeredDirectory()) else if (desc.isLayeredDirectory())
{ {
return ContentModel.TYPE_AVM_LAYERED_FOLDER; return WCMModel.TYPE_AVM_LAYERED_FOLDER;
} }
else else
{ {
return ContentModel.TYPE_AVM_LAYERED_CONTENT; return WCMModel.TYPE_AVM_LAYERED_CONTENT;
} }
} }
@@ -924,12 +925,12 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
result.put(ContentModel.PROP_STORE_IDENTIFIER, nodeRef.getStoreRef().getIdentifier()); result.put(ContentModel.PROP_STORE_IDENTIFIER, nodeRef.getStoreRef().getIdentifier());
if (desc.isLayeredDirectory()) if (desc.isLayeredDirectory())
{ {
result.put(ContentModel.PROP_AVM_DIR_INDIRECTION, result.put(WCMModel.PROP_AVM_DIR_INDIRECTION,
AVMNodeConverter.ToNodeRef(-1, desc.getIndirection())); AVMNodeConverter.ToNodeRef(-1, desc.getIndirection()));
} }
if (desc.isLayeredFile()) if (desc.isLayeredFile())
{ {
result.put(ContentModel.PROP_AVM_FILE_INDIRECTION, result.put(WCMModel.PROP_AVM_FILE_INDIRECTION,
AVMNodeConverter.ToNodeRef(-1, desc.getIndirection())); AVMNodeConverter.ToNodeRef(-1, desc.getIndirection()));
} }
if (desc.isFile()) if (desc.isFile())
@@ -1052,7 +1053,7 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
{ {
return nodeRef.getStoreRef().getIdentifier(); return nodeRef.getStoreRef().getIdentifier();
} }
else if (qName.equals(ContentModel.PROP_AVM_DIR_INDIRECTION)) else if (qName.equals(WCMModel.PROP_AVM_DIR_INDIRECTION))
{ {
if (desc.isLayeredDirectory()) if (desc.isLayeredDirectory())
{ {
@@ -1060,7 +1061,7 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
} }
return null; return null;
} }
else if (qName.equals(ContentModel.PROP_AVM_FILE_INDIRECTION)) else if (qName.equals(WCMModel.PROP_AVM_FILE_INDIRECTION))
{ {
if (desc.isLayeredFile()) if (desc.isLayeredFile())
{ {
@@ -1146,8 +1147,8 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
ContentModel.PROP_NODE_DBID, ContentModel.PROP_NODE_DBID,
ContentModel.PROP_STORE_PROTOCOL, ContentModel.PROP_STORE_PROTOCOL,
ContentModel.PROP_STORE_IDENTIFIER, ContentModel.PROP_STORE_IDENTIFIER,
ContentModel.PROP_AVM_FILE_INDIRECTION, WCMModel.PROP_AVM_FILE_INDIRECTION,
ContentModel.PROP_AVM_DIR_INDIRECTION WCMModel.PROP_AVM_DIR_INDIRECTION
}; };
/** /**

View File

@@ -31,6 +31,7 @@ import java.util.Set;
import java.util.TreeMap; import java.util.TreeMap;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.model.WCMModel;
import org.alfresco.repo.action.ActionImpl; import org.alfresco.repo.action.ActionImpl;
import org.alfresco.repo.avm.actions.SimpleAVMPromoteAction; import org.alfresco.repo.avm.actions.SimpleAVMPromoteAction;
import org.alfresco.repo.avm.actions.SimpleAVMSubmitAction; import org.alfresco.repo.avm.actions.SimpleAVMSubmitAction;
@@ -3019,32 +3020,32 @@ public class AVMServiceTest extends AVMServiceTestBase
AuthenticationComponent ac = (AuthenticationComponent)fContext.getBean("authenticationComponent"); AuthenticationComponent ac = (AuthenticationComponent)fContext.getBean("authenticationComponent");
ac.authenticate("admin", "admin".toCharArray()); ac.authenticate("admin", "admin".toCharArray());
assertTrue(ffs.create(AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c/"), assertTrue(ffs.create(AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c/"),
"banana", ContentModel.TYPE_AVM_PLAIN_CONTENT) != null); "banana", WCMModel.TYPE_AVM_PLAIN_CONTENT) != null);
assertTrue(ffs.create(AVMNodeConverter.ToNodeRef(-1, "main://"), assertTrue(ffs.create(AVMNodeConverter.ToNodeRef(-1, "main://"),
"banana", ContentModel.TYPE_AVM_PLAIN_CONTENT) != null); "banana", WCMModel.TYPE_AVM_PLAIN_CONTENT) != null);
assertTrue(ffs.create(AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c"), assertTrue(ffs.create(AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c"),
"apples", ContentModel.TYPE_AVM_PLAIN_FOLDER) != null); "apples", WCMModel.TYPE_AVM_PLAIN_FOLDER) != null);
NodeService ns = (NodeService)fContext.getBean("NodeService"); NodeService ns = (NodeService)fContext.getBean("NodeService");
Map<QName, Serializable> properties = new HashMap<QName, Serializable>(); Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
properties.put(ContentModel.PROP_AVM_DIR_INDIRECTION, properties.put(WCMModel.PROP_AVM_DIR_INDIRECTION,
AVMNodeConverter.ToNodeRef(-1, "main:/a")); AVMNodeConverter.ToNodeRef(-1, "main:/a"));
assertTrue(ns.createNode(AVMNodeConverter.ToNodeRef(-1, "main:/"), assertTrue(ns.createNode(AVMNodeConverter.ToNodeRef(-1, "main:/"),
ContentModel.ASSOC_CONTAINS, ContentModel.ASSOC_CONTAINS,
QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "layer"), QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "layer"),
ContentModel.TYPE_AVM_LAYERED_FOLDER, WCMModel.TYPE_AVM_LAYERED_FOLDER,
properties) != null); properties) != null);
assertTrue(ns.getProperty(AVMNodeConverter.ToNodeRef(-1, "main:/layer"), assertTrue(ns.getProperty(AVMNodeConverter.ToNodeRef(-1, "main:/layer"),
ContentModel.PROP_AVM_DIR_INDIRECTION) != null); WCMModel.PROP_AVM_DIR_INDIRECTION) != null);
properties.clear(); properties.clear();
properties.put(ContentModel.PROP_AVM_FILE_INDIRECTION, properties.put(WCMModel.PROP_AVM_FILE_INDIRECTION,
AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c/foo")); AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c/foo"));
assertTrue(ns.createNode(AVMNodeConverter.ToNodeRef(-1, "main:/"), assertTrue(ns.createNode(AVMNodeConverter.ToNodeRef(-1, "main:/"),
ContentModel.ASSOC_CONTAINS, ContentModel.ASSOC_CONTAINS,
QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "foo"), QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "foo"),
ContentModel.TYPE_AVM_LAYERED_CONTENT, WCMModel.TYPE_AVM_LAYERED_CONTENT,
properties) != null); properties) != null);
assertTrue(ns.getProperty(AVMNodeConverter.ToNodeRef(-1, "main:/foo"), assertTrue(ns.getProperty(AVMNodeConverter.ToNodeRef(-1, "main:/foo"),
ContentModel.PROP_AVM_FILE_INDIRECTION) != null); WCMModel.PROP_AVM_FILE_INDIRECTION) != null);
fService.createSnapshot("main"); fService.createSnapshot("main");
System.out.println(recursiveList("main", -1, true)); System.out.println(recursiveList("main", -1, true));
} }

View File

@@ -92,6 +92,12 @@ public interface NamespaceService extends NamespacePrefixResolver
/** Alfresco security Prefix */ /** Alfresco security Prefix */
public static final String SECURITY_MODEL_PREFIX = "security"; public static final String SECURITY_MODEL_PREFIX = "security";
/** Alfresco WCM URI */
public static final String WCM_MODEL_1_0_URI = "http://www.alfresco.org/model/wcmmodel/1.0";
/** Alfresco WCM Prefix */
public static final String WCM_MODEL_PREFIX = "wcm";
/** /**
* Register a prefix for namespace uri. * Register a prefix for namespace uri.