Author: areshetnyak
Date: 2010-08-10 12:04:43 -0400 (Tue, 10 Aug 2010)
New Revision: 2906
Added:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-publication-config.xml
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/publication-plugins-nodetypes-config.xml
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/wcm-nodetypes.xml
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/DocumentViewImporter.java
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/importing/TestImport.java
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config.xml
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-impl.xml
Log:
EXOJCR-865 : Problem with restore node (node type is exo:webContent) after import version
history was fixed.
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/DocumentViewImporter.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/DocumentViewImporter.java 2010-08-10
09:19:54 UTC (rev 2905)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/DocumentViewImporter.java 2010-08-10
16:04:43 UTC (rev 2906)
@@ -248,7 +248,7 @@
}
else if (nodeData.isMixReferenceable() &&
propName.equals(Constants.JCR_UUID))
{
- newProperty = endUuid(nodeData, propName);
+ newProperty = endUuid(nodeData, propName,
propertiesMap.get(Constants.JCR_UUID));
}
else
{
@@ -479,19 +479,24 @@
return newProperty;
}
- private PropertyData endUuid(ImportNodeData nodeData, InternalQName key) throws
ValueFormatException,
+ private PropertyData endUuid(ImportNodeData nodeData, InternalQName key, String
properyValueUUID) throws ValueFormatException,
UnsupportedRepositoryOperationException, RepositoryException,
IllegalStateException
{
PropertyData newProperty;
- Value value = valueFactory.createValue(nodeData.getIdentifier(),
PropertyType.STRING);
- if (log.isDebugEnabled())
+
+ if (nodeData.getQPath().isDescendantOf(Constants.JCR_VERSION_STORAGE_PATH))
{
- log.debug("Property STRING: " + key + "=" +
value.getString());
+ newProperty =
+ TransientPropertyData.createPropertyData(getParent(), Constants.JCR_UUID,
PropertyType.STRING, false,
+ new TransientValueData(properyValueUUID));
}
-
- newProperty =
- TransientPropertyData.createPropertyData(getParent(), Constants.JCR_UUID,
PropertyType.STRING, false,
- new TransientValueData(nodeData.getIdentifier()));
+ else
+ {
+ newProperty =
+ TransientPropertyData.createPropertyData(getParent(),
Constants.JCR_UUID, PropertyType.STRING, false,
+ new TransientValueData(nodeData.getIdentifier()));
+ }
+
return newProperty;
}
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java 2010-08-10
09:19:54 UTC (rev 2905)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java 2010-08-10
16:04:43 UTC (rev 2906)
@@ -470,7 +470,15 @@
propertyData =
new ImportPropertyData(QPath.makeChildPath(currentNodeInfo.getQPath(),
propertyInfo.getName()), propertyInfo
.getIndentifer(), 0, propertyInfo.getType(), currentNodeInfo.getIdentifier(),
false);
- propertyData.setValue(new TransientValueData(currentNodeInfo.getIdentifier()));
+
+ if (currentNodeInfo.getQPath().isDescendantOf(Constants.JCR_VERSION_STORAGE_PATH))
+ {
+ propertyData.setValue(new
TransientValueData(propertyInfo.getValues().get(0).toString()));
+ }
+ else
+ {
+ propertyData.setValue(new TransientValueData(currentNodeInfo.getIdentifier()));
+ }
tree.push(currentNodeInfo);
return propertyData;
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/importing/TestImport.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/importing/TestImport.java 2010-08-10
09:19:54 UTC (rev 2905)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/importing/TestImport.java 2010-08-10
16:04:43 UTC (rev 2906)
@@ -1168,4 +1168,638 @@
fileImport.checkout();
root.save();
}
+
+ public void testEXOJCR865_Doc_exo_webContent_1() throws Exception
+ {
+ // node content
+ Node testRoot = root.addNode("testRoot");
+ root.save();
+
+ Node web = testRoot.addNode("web", "exo:webContent");
+
+ web.addMixin("exo:datetime");
+ web.addMixin("exo:owneable");
+ web.addMixin("exo:modify");
+ web.addMixin("mix:votable");
+ web.addMixin("mix:commentable");
+ web.addMixin("publication:stateAndVersionBasedPublication");
+ web.addMixin("mix:versionable");
+
+ web.setProperty("exo:dateCreated", Calendar.getInstance());
+ web.setProperty("exo:dateModified", Calendar.getInstance());
+ web.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ web.setProperty("exo:lastModifier", "root");
+ web.setProperty("exo:summary", "text summary");
+ web.setProperty("exo:title", "web title");
+ web.setProperty("exo:voteTotal", "1");
+ web.setProperty("exo:voteTotalOfLang", "1");
+ web.setProperty("exo:votingRate", "1");
+ web.setProperty("publication:currentState", "draft");
+ web.setProperty("publication:history", new String[]
{"13","12", "14"});
+ web.setProperty("publication:lifecycleName", "lf_name");
+ web.setProperty("publication:revisionData", new String[]
{"r_data_1", "r_data_2"});
+
+ Node defHtml = web.addNode("default.html", "nt:file");
+ defHtml.addMixin("exo:datetime");
+ defHtml.addMixin("exo:owneable");
+ defHtml.addMixin("exo:modify");
+ defHtml.addMixin("exo:htmlFile");
+
+ defHtml.setProperty("exo:dateCreated", Calendar.getInstance());
+ defHtml.setProperty("exo:dateModified", Calendar.getInstance());
+ defHtml.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ defHtml.setProperty("exo:lastModifier", "root");
+
+ Node contentDefHtml = defHtml.addNode("jcr:content",
"nt:resource");
+ contentDefHtml.addMixin("exo:datetime");
+ contentDefHtml.addMixin("exo:owneable");
+ contentDefHtml.addMixin("dc:elementSet");
+
+ contentDefHtml.setProperty("exo:dateCreated", Calendar.getInstance());
+ contentDefHtml.setProperty("exo:dateModified", Calendar.getInstance());
+ contentDefHtml.setProperty("jcr:data", "def_html_data");
+ contentDefHtml.setProperty("jcr:encoding", "UTF-8");
+ contentDefHtml.setProperty("jcr:lastModified", Calendar.getInstance());
+ contentDefHtml.setProperty("jcr:mimeType", "text/html");
+
+ Node css = web.addNode("css", "exo:cssFolder");
+ css.addMixin("exo:datetime");
+ css.addMixin("exo:owneable");
+ css.addMixin("exo:modify");
+
+ css.setProperty("exo:dateCreated", Calendar.getInstance());
+ css.setProperty("exo:dateModified", Calendar.getInstance());
+ css.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ css.setProperty("exo:lastModifier", "root");
+
+ Node defCss = css.addNode("default.css", "nt:file");
+
+ defCss.addMixin("exo:datetime");
+ defCss.addMixin("exo:owneable");
+ defCss.addMixin("exo:modify");
+
+ defCss.setProperty("exo:dateCreated", Calendar.getInstance());
+ defCss.setProperty("exo:dateModified", Calendar.getInstance());
+ defCss.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ defCss.setProperty("exo:lastModifier", "root");
+
+ Node contentDefCss = defCss.addNode("jcr:content",
"nt:resource");
+ contentDefCss.addMixin("exo:datetime");
+ contentDefCss.addMixin("exo:owneable");
+ contentDefCss.addMixin("dc:elementSet");
+
+ contentDefCss.setProperty("exo:dateCreated", Calendar.getInstance());
+ contentDefCss.setProperty("exo:dateModified", Calendar.getInstance());
+ contentDefCss.setProperty("jcr:data", "def_css_data");
+ contentDefCss.setProperty("jcr:encoding", "UTF-8");
+ contentDefCss.setProperty("jcr:lastModified", Calendar.getInstance());
+ contentDefCss.setProperty("jcr:mimeType", "text/css");
+
+ Node medias = web.addNode("medias", "exo:multimediaFolder");
+ medias.addMixin("exo:datetime");
+ medias.addMixin("exo:owneable");
+ medias.addMixin("exo:modify");
+
+ medias.setProperty("exo:dateCreated", Calendar.getInstance());
+ medias.setProperty("exo:dateModified", Calendar.getInstance());
+ medias.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ medias.setProperty("exo:lastModifier", "root");
+
+ Node videos = medias.addNode("videos", "nt:folder");
+ videos.addMixin("exo:datetime");
+ videos.addMixin("exo:owneable");
+ videos.addMixin("exo:modify");
+
+ videos.setProperty("exo:dateCreated", Calendar.getInstance());
+ videos.setProperty("exo:dateModified", Calendar.getInstance());
+ videos.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ videos.setProperty("exo:lastModifier", "root");
+
+ Node images = medias.addNode("images", "nt:folder");
+ images.addMixin("exo:datetime");
+ images.addMixin("exo:owneable");
+ images.addMixin("exo:modify");
+
+ images.setProperty("exo:dateCreated", Calendar.getInstance());
+ images.setProperty("exo:dateModified", Calendar.getInstance());
+ images.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ images.setProperty("exo:lastModifier", "root");
+
+ Node illustration= images.addNode("illustration", "nt:file");
+ illustration.addMixin("exo:datetime");
+ illustration.addMixin("exo:owneable");
+ illustration.addMixin("exo:modify");
+ illustration.addMixin("mix:referenceable");
+
+ illustration.setProperty("exo:dateCreated", Calendar.getInstance());
+ illustration.setProperty("exo:dateModified", Calendar.getInstance());
+ illustration.setProperty("exo:lastModifiedDate",
Calendar.getInstance());
+ illustration.setProperty("exo:lastModifier", "root");
+
+ Node contentIllustration = illustration.addNode("jcr:content",
"nt:resource");
+ contentIllustration.addMixin("exo:datetime");
+ contentIllustration.addMixin("exo:owneable");
+ contentIllustration.addMixin("dc:elementSet");
+
+ contentIllustration.setProperty("exo:dateCreated",
Calendar.getInstance());
+ contentIllustration.setProperty("exo:dateModified",
Calendar.getInstance());
+ contentIllustration.setProperty("jcr:data",
"illustration_data");
+ contentIllustration.setProperty("jcr:encoding", "UTF-8");
+ contentIllustration.setProperty("jcr:lastModified",
Calendar.getInstance());
+ contentIllustration.setProperty("jcr:mimeType", "text/jpeg");
+
+ Node documents = web.addNode("documents", "nt:unstructured");
+ documents.addMixin("exo:datetime");
+ documents.addMixin("exo:owneable");
+ documents.addMixin("exo:modify");
+ documents.addMixin("exo:documentFolder");
+
+ documents.setProperty("exo:dateCreated", Calendar.getInstance());
+ documents.setProperty("exo:dateModified", Calendar.getInstance());
+ documents.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ documents.setProperty("exo:lastModifier", "root");
+
+ Node js = web.addNode("js", "exo:jsFolder");
+ js.addMixin("exo:datetime");
+ js.addMixin("exo:owneable");
+ js.addMixin("exo:modify");
+
+ js.setProperty("exo:dateCreated", Calendar.getInstance());
+ js.setProperty("exo:dateModified", Calendar.getInstance());
+ js.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ js.setProperty("exo:lastModifier", "root");
+
+ Node defJs = js.addNode("default.js", "nt:file");
+ defJs.addMixin("exo:datetime");
+ defJs.addMixin("exo:owneable");
+ defJs.addMixin("exo:modify");
+
+ defJs.setProperty("exo:dateCreated", Calendar.getInstance());
+ defJs.setProperty("exo:dateModified", Calendar.getInstance());
+ defJs.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ defJs.setProperty("exo:lastModifier", "root");
+
+ Node contentDefJs = defJs.addNode("jcr:content",
"nt:resource");
+ contentDefJs.addMixin("exo:datetime");
+ contentDefJs.addMixin("exo:owneable");
+ contentDefJs.addMixin("dc:elementSet");
+
+ contentDefJs.setProperty("exo:dateCreated", Calendar.getInstance());
+ contentDefJs.setProperty("exo:dateModified", Calendar.getInstance());
+ contentDefJs.setProperty("jcr:data", "def_js_data");
+ contentDefJs.setProperty("jcr:encoding", "UTF-8");
+ contentDefJs.setProperty("jcr:lastModified", Calendar.getInstance());
+ contentDefJs.setProperty("jcr:mimeType", "text/js");
+
+ root.save();
+
+ web.checkin();
+ web.checkout();
+ root.save();
+
+ web.checkin();
+ web.checkout();
+ root.save();
+
+ VersionableNodeInfo nodeInfo = new
VersionableNodeInfo(testRoot.getNode("web"));
+
+ // node content
+ byte[] versionableNode = serialize(web, false, true);
+ // version history
+ byte[] versionHistory = serialize(web.getVersionHistory(), false, true);
+ System.out.println(new String(versionHistory));
+
+
+ // restore node content
+ Node restoreRoot = testRoot.addNode("restRootWeb");
+ testRoot.save();
+
+ deserialize(restoreRoot, XmlSaveType.SESSION, true,
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING,
+ new ByteArrayInputStream(versionableNode));
+ root.save();
+
+ assertTrue(restoreRoot.hasNode("web"));
+
+ Node fileImport = restoreRoot.getNode("web");
+ assertTrue(fileImport.isNodeType("mix:versionable"));
+
+ VersionHistoryImporter versionHistoryImporter =
+ new VersionHistoryImporter((NodeImpl)fileImport, new
ByteArrayInputStream(versionHistory), nodeInfo
+ .getBaseVersion(), nodeInfo.getPredecessorsHistory(),
nodeInfo.getVersionHistory());
+ versionHistoryImporter.doImport();
+ root.save();
+
+
+ Property property = fileImport.getProperty("jcr:predecessors");
+ assertNotNull(property);
+ assertNotNull(property.getDefinition());
+
+ fileImport.restore("1", true);
+ root.save();
+
+ property = fileImport.getProperty("jcr:predecessors");
+ assertNotNull(property);
+ assertNotNull(property.getDefinition());
+
+ fileImport.checkin();
+ fileImport.checkout();
+ root.save();
+ }
+
+ public void testEXOJCR865_Sys_exo_webContent_1() throws Exception
+ {
+ // node content
+ Node testRoot = root.addNode("testRoot");
+ root.save();
+
+ Node web = testRoot.addNode("web", "exo:webContent");
+
+ web.addMixin("exo:datetime");
+ web.addMixin("exo:owneable");
+ web.addMixin("exo:modify");
+ web.addMixin("mix:votable");
+ web.addMixin("mix:commentable");
+ web.addMixin("publication:stateAndVersionBasedPublication");
+ web.addMixin("mix:versionable");
+
+ web.setProperty("exo:dateCreated", Calendar.getInstance());
+ web.setProperty("exo:dateModified", Calendar.getInstance());
+ web.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ web.setProperty("exo:lastModifier", "root");
+ web.setProperty("exo:summary", "text summary");
+ web.setProperty("exo:title", "web title");
+ web.setProperty("exo:voteTotal", "1");
+ web.setProperty("exo:voteTotalOfLang", "1");
+ web.setProperty("exo:votingRate", "1");
+ web.setProperty("publication:currentState", "draft");
+ web.setProperty("publication:history", new String[]
{"13","12", "14"});
+ web.setProperty("publication:lifecycleName", "lf_name");
+ web.setProperty("publication:revisionData", new String[]
{"r_data_1", "r_data_2"});
+
+ Node defHtml = web.addNode("default.html", "nt:file");
+ defHtml.addMixin("exo:datetime");
+ defHtml.addMixin("exo:owneable");
+ defHtml.addMixin("exo:modify");
+ defHtml.addMixin("exo:htmlFile");
+
+ defHtml.setProperty("exo:dateCreated", Calendar.getInstance());
+ defHtml.setProperty("exo:dateModified", Calendar.getInstance());
+ defHtml.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ defHtml.setProperty("exo:lastModifier", "root");
+
+ Node contentDefHtml = defHtml.addNode("jcr:content",
"nt:resource");
+ contentDefHtml.addMixin("exo:datetime");
+ contentDefHtml.addMixin("exo:owneable");
+ contentDefHtml.addMixin("dc:elementSet");
+
+ contentDefHtml.setProperty("exo:dateCreated", Calendar.getInstance());
+ contentDefHtml.setProperty("exo:dateModified", Calendar.getInstance());
+ contentDefHtml.setProperty("jcr:data", "def_html_data");
+ contentDefHtml.setProperty("jcr:encoding", "UTF-8");
+ contentDefHtml.setProperty("jcr:lastModified", Calendar.getInstance());
+ contentDefHtml.setProperty("jcr:mimeType", "text/html");
+
+ Node css = web.addNode("css", "exo:cssFolder");
+ css.addMixin("exo:datetime");
+ css.addMixin("exo:owneable");
+ css.addMixin("exo:modify");
+
+ css.setProperty("exo:dateCreated", Calendar.getInstance());
+ css.setProperty("exo:dateModified", Calendar.getInstance());
+ css.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ css.setProperty("exo:lastModifier", "root");
+
+ Node defCss = css.addNode("default.css", "nt:file");
+
+ defCss.addMixin("exo:datetime");
+ defCss.addMixin("exo:owneable");
+ defCss.addMixin("exo:modify");
+
+ defCss.setProperty("exo:dateCreated", Calendar.getInstance());
+ defCss.setProperty("exo:dateModified", Calendar.getInstance());
+ defCss.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ defCss.setProperty("exo:lastModifier", "root");
+
+ Node contentDefCss = defCss.addNode("jcr:content",
"nt:resource");
+ contentDefCss.addMixin("exo:datetime");
+ contentDefCss.addMixin("exo:owneable");
+ contentDefCss.addMixin("dc:elementSet");
+
+ contentDefCss.setProperty("exo:dateCreated", Calendar.getInstance());
+ contentDefCss.setProperty("exo:dateModified", Calendar.getInstance());
+ contentDefCss.setProperty("jcr:data", "def_css_data");
+ contentDefCss.setProperty("jcr:encoding", "UTF-8");
+ contentDefCss.setProperty("jcr:lastModified", Calendar.getInstance());
+ contentDefCss.setProperty("jcr:mimeType", "text/css");
+
+ Node medias = web.addNode("medias", "exo:multimediaFolder");
+ medias.addMixin("exo:datetime");
+ medias.addMixin("exo:owneable");
+ medias.addMixin("exo:modify");
+
+ medias.setProperty("exo:dateCreated", Calendar.getInstance());
+ medias.setProperty("exo:dateModified", Calendar.getInstance());
+ medias.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ medias.setProperty("exo:lastModifier", "root");
+
+ Node videos = medias.addNode("videos", "nt:folder");
+ videos.addMixin("exo:datetime");
+ videos.addMixin("exo:owneable");
+ videos.addMixin("exo:modify");
+
+ videos.setProperty("exo:dateCreated", Calendar.getInstance());
+ videos.setProperty("exo:dateModified", Calendar.getInstance());
+ videos.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ videos.setProperty("exo:lastModifier", "root");
+
+ Node images = medias.addNode("images", "nt:folder");
+ images.addMixin("exo:datetime");
+ images.addMixin("exo:owneable");
+ images.addMixin("exo:modify");
+
+ images.setProperty("exo:dateCreated", Calendar.getInstance());
+ images.setProperty("exo:dateModified", Calendar.getInstance());
+ images.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ images.setProperty("exo:lastModifier", "root");
+
+ Node illustration= images.addNode("illustration", "nt:file");
+ illustration.addMixin("exo:datetime");
+ illustration.addMixin("exo:owneable");
+ illustration.addMixin("exo:modify");
+ illustration.addMixin("mix:referenceable");
+
+ illustration.setProperty("exo:dateCreated", Calendar.getInstance());
+ illustration.setProperty("exo:dateModified", Calendar.getInstance());
+ illustration.setProperty("exo:lastModifiedDate",
Calendar.getInstance());
+ illustration.setProperty("exo:lastModifier", "root");
+
+ Node contentIllustration = illustration.addNode("jcr:content",
"nt:resource");
+ contentIllustration.addMixin("exo:datetime");
+ contentIllustration.addMixin("exo:owneable");
+ contentIllustration.addMixin("dc:elementSet");
+
+ contentIllustration.setProperty("exo:dateCreated",
Calendar.getInstance());
+ contentIllustration.setProperty("exo:dateModified",
Calendar.getInstance());
+ contentIllustration.setProperty("jcr:data",
"illustration_data");
+ contentIllustration.setProperty("jcr:encoding", "UTF-8");
+ contentIllustration.setProperty("jcr:lastModified",
Calendar.getInstance());
+ contentIllustration.setProperty("jcr:mimeType", "text/jpeg");
+
+ Node documents = web.addNode("documents", "nt:unstructured");
+ documents.addMixin("exo:datetime");
+ documents.addMixin("exo:owneable");
+ documents.addMixin("exo:modify");
+ documents.addMixin("exo:documentFolder");
+
+ documents.setProperty("exo:dateCreated", Calendar.getInstance());
+ documents.setProperty("exo:dateModified", Calendar.getInstance());
+ documents.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ documents.setProperty("exo:lastModifier", "root");
+
+ Node js = web.addNode("js", "exo:jsFolder");
+ js.addMixin("exo:datetime");
+ js.addMixin("exo:owneable");
+ js.addMixin("exo:modify");
+
+ js.setProperty("exo:dateCreated", Calendar.getInstance());
+ js.setProperty("exo:dateModified", Calendar.getInstance());
+ js.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ js.setProperty("exo:lastModifier", "root");
+
+ Node defJs = js.addNode("default.js", "nt:file");
+ defJs.addMixin("exo:datetime");
+ defJs.addMixin("exo:owneable");
+ defJs.addMixin("exo:modify");
+
+ defJs.setProperty("exo:dateCreated", Calendar.getInstance());
+ defJs.setProperty("exo:dateModified", Calendar.getInstance());
+ defJs.setProperty("exo:lastModifiedDate", Calendar.getInstance());
+ defJs.setProperty("exo:lastModifier", "root");
+
+ Node contentDefJs = defJs.addNode("jcr:content",
"nt:resource");
+ contentDefJs.addMixin("exo:datetime");
+ contentDefJs.addMixin("exo:owneable");
+ contentDefJs.addMixin("dc:elementSet");
+
+ contentDefJs.setProperty("exo:dateCreated", Calendar.getInstance());
+ contentDefJs.setProperty("exo:dateModified", Calendar.getInstance());
+ contentDefJs.setProperty("jcr:data", "def_js_data");
+ contentDefJs.setProperty("jcr:encoding", "UTF-8");
+ contentDefJs.setProperty("jcr:lastModified", Calendar.getInstance());
+ contentDefJs.setProperty("jcr:mimeType", "text/js");
+
+ root.save();
+
+ web.checkin();
+ web.checkout();
+ root.save();
+
+ web.checkin();
+ web.checkout();
+ root.save();
+
+ VersionableNodeInfo nodeInfo = new
VersionableNodeInfo(testRoot.getNode("web"));
+
+ // node content
+ byte[] versionableNode = serialize(web, true, true);
+ // version history
+ byte[] versionHistory = serialize(web.getVersionHistory(), true, true);
+ System.out.println(new String(versionHistory));
+
+
+ // restore node content
+ Node restoreRoot = testRoot.addNode("restRootWeb");
+ testRoot.save();
+
+ deserialize(restoreRoot, XmlSaveType.SESSION, true,
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING,
+ new ByteArrayInputStream(versionableNode));
+ root.save();
+
+ assertTrue(restoreRoot.hasNode("web"));
+
+ Node fileImport = restoreRoot.getNode("web");
+ assertTrue(fileImport.isNodeType("mix:versionable"));
+
+ VersionHistoryImporter versionHistoryImporter =
+ new VersionHistoryImporter((NodeImpl)fileImport, new
ByteArrayInputStream(versionHistory), nodeInfo
+ .getBaseVersion(), nodeInfo.getPredecessorsHistory(),
nodeInfo.getVersionHistory());
+ versionHistoryImporter.doImport();
+ root.save();
+
+
+ Property property = fileImport.getProperty("jcr:predecessors");
+ assertNotNull(property);
+ assertNotNull(property.getDefinition());
+
+ fileImport.restore("1", true);
+ root.save();
+
+ property = fileImport.getProperty("jcr:predecessors");
+ assertNotNull(property);
+ assertNotNull(property.getDefinition());
+
+ fileImport.checkin();
+ fileImport.checkout();
+ root.save();
+ }
+
+ public void testEXOJCR865_Doc_exo_webContent_2() throws Exception
+ {
+ // node content
+ Node testRoot = root.addNode("testRoot");
+ root.save();
+
+ Node web = testRoot.addNode("web", "exo:webContent");
+
+ web.addMixin("mix:versionable");
+
+ web.setProperty("exo:summary", "text summary");
+ web.setProperty("exo:title", "web title");
+
+ Node defHtml = web.addNode("default.html", "nt:file");
+ defHtml.addMixin("mix:referenceable");
+
+ Node contentDefHtml = defHtml.addNode("jcr:content",
"nt:resource");
+
+ contentDefHtml.setProperty("jcr:data", "def_html_data");
+ contentDefHtml.setProperty("jcr:encoding", "UTF-8");
+ contentDefHtml.setProperty("jcr:lastModified", Calendar.getInstance());
+ contentDefHtml.setProperty("jcr:mimeType", "text/html");
+ root.save();
+
+ web.checkin();
+ web.checkout();
+ root.save();
+
+ web.checkin();
+ web.checkout();
+ root.save();
+
+ web.restore("1", true);
+ root.save();
+
+ VersionableNodeInfo nodeInfo = new
VersionableNodeInfo(testRoot.getNode("web"));
+
+ // node content
+ byte[] versionableNode = serialize(web, false, true);
+ // version history
+ byte[] versionHistory = serialize(web.getVersionHistory(), false, true);
+ System.out.println(new String(versionHistory));
+
+
+ // restore node content
+ Node restoreRoot = testRoot.addNode("restRootWeb");
+ testRoot.save();
+
+ deserialize(restoreRoot, XmlSaveType.SESSION, true,
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING,
+ new ByteArrayInputStream(versionableNode));
+ root.save();
+
+ assertTrue(restoreRoot.hasNode("web"));
+
+ Node fileImport = restoreRoot.getNode("web");
+ Node dHtml = fileImport.getNode("default.html");
fileImport.getNode("default.html").getProperty("jcr:uuid").getString();
+ assertTrue(fileImport.isNodeType("mix:versionable"));
+
+ VersionHistoryImporter versionHistoryImporter =
+ new VersionHistoryImporter((NodeImpl)fileImport, new
ByteArrayInputStream(versionHistory), nodeInfo
+ .getBaseVersion(), nodeInfo.getPredecessorsHistory(),
nodeInfo.getVersionHistory());
+ versionHistoryImporter.doImport();
+ root.save();
+
+ Property property = fileImport.getProperty("jcr:predecessors");
+ assertNotNull(property);
+ assertNotNull(property.getDefinition());
+
+ fileImport.restore("1", true);
+ root.save();
+
+ property = fileImport.getProperty("jcr:predecessors");
+ assertNotNull(property);
+ assertNotNull(property.getDefinition());
+
+ fileImport.checkin();
+ fileImport.checkout();
+ root.save();
+ }
+
+ public void testEXOJCR865_Sys_exo_webContent_2() throws Exception
+ {
+ // node content
+ Node testRoot = root.addNode("testRoot");
+ root.save();
+
+ Node web = testRoot.addNode("web", "exo:webContent");
+
+ web.addMixin("mix:versionable");
+
+ web.setProperty("exo:summary", "text summary");
+ web.setProperty("exo:title", "web title");
+
+ Node defHtml = web.addNode("default.html", "nt:file");
+ defHtml.addMixin("mix:referenceable");
+
+ Node contentDefHtml = defHtml.addNode("jcr:content",
"nt:resource");
+
+ contentDefHtml.setProperty("jcr:data", "def_html_data");
+ contentDefHtml.setProperty("jcr:encoding", "UTF-8");
+ contentDefHtml.setProperty("jcr:lastModified", Calendar.getInstance());
+ contentDefHtml.setProperty("jcr:mimeType", "text/html");
+ root.save();
+
+ web.checkin();
+ web.checkout();
+ root.save();
+
+ web.checkin();
+ web.checkout();
+ root.save();
+
+ web.restore("1", true);
+ root.save();
+
+ VersionableNodeInfo nodeInfo = new
VersionableNodeInfo(testRoot.getNode("web"));
+
+ // node content
+ byte[] versionableNode = serialize(web, true, true);
+ // version history
+ byte[] versionHistory = serialize(web.getVersionHistory(), true, true);
+ System.out.println(new String(versionHistory));
+
+ // restore node content
+ Node restoreRoot = testRoot.addNode("restRootWeb");
+ testRoot.save();
+
+ deserialize(restoreRoot, XmlSaveType.SESSION, true,
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING,
+ new ByteArrayInputStream(versionableNode));
+ root.save();
+
+ assertTrue(restoreRoot.hasNode("web"));
+
+ Node fileImport = restoreRoot.getNode("web");
+ Node dHtml = fileImport.getNode("default.html");
fileImport.getNode("default.html").getProperty("jcr:uuid").getString();
+ assertTrue(fileImport.isNodeType("mix:versionable"));
+
+ VersionHistoryImporter versionHistoryImporter =
+ new VersionHistoryImporter((NodeImpl)fileImport, new
ByteArrayInputStream(versionHistory), nodeInfo
+ .getBaseVersion(), nodeInfo.getPredecessorsHistory(),
nodeInfo.getVersionHistory());
+ versionHistoryImporter.doImport();
+ root.save();
+
+
+ Property property = fileImport.getProperty("jcr:predecessors");
+ assertNotNull(property);
+ assertNotNull(property.getDefinition());
+
+ fileImport.restore("1", true);
+ root.save();
+
+ property = fileImport.getProperty("jcr:predecessors");
+ assertNotNull(property);
+ assertNotNull(property.getDefinition());
+
+ fileImport.checkin();
+ fileImport.checkout();
+ root.save();
+ }
}
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2010-08-10
09:19:54 UTC (rev 2905)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2010-08-10
16:04:43 UTC (rev 2906)
@@ -118,6 +118,7 @@
<property name="rma"
value="http://www.rma.com/jcr/"/>
<property name="metadata"
value="http://www.exoplatform.com/jcr/metadata/1.1/"/>
<property name="dc"
value="http://purl.org/dc/elements/1.1/"/>
+ <property name="publication"
value="http://www.exoplatform.com/jcr/publication/1.1/"/>
</properties-param>
</init-params>
</component-plugin>
@@ -134,6 +135,9 @@
<value>jar:/conf/test/nodetypes-usecase.xml</value>
<value>jar:/conf/test/nodetypes-config.xml</value>
<value>jar:/conf/test/nodetypes-config-extended.xml</value>
+ <value>jar:/conf/test/wcm-nodetypes.xml</value>
+ <value>jar:/conf/test/nodetypes-publication-config.xml</value>
+
<value>jar:/conf/test/publication-plugins-nodetypes-config.xml</value>
</values-param>
<values-param>
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config.xml
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config.xml 2010-08-10
09:19:54 UTC (rev 2905)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-config.xml 2010-08-10
16:04:43 UTC (rev 2906)
@@ -32,6 +32,15 @@
</propertyDefinition>
</propertyDefinitions>
</nodeType>
+
+ <nodeType name="exo:presentationable" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:presentationType"
requiredType="String" autoCreated="true" mandatory="false"
+ onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
<nodeType name="exo:action" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
<supertypes>
@@ -153,4 +162,17 @@
</propertyDefinition>
</propertyDefinitions>
</nodeType>
+
+ <nodeType name="exo:modify" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:lastModifiedDate"
requiredType="Date" autoCreated="true" mandatory="false"
+ onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ <propertyDefinition name="exo:lastModifier"
requiredType="String" autoCreated="true" mandatory="false"
+ onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
</nodeTypes>
\ No newline at end of file
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-impl.xml
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-impl.xml 2010-08-10
09:19:54 UTC (rev 2905)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-impl.xml 2010-08-10
16:04:43 UTC (rev 2906)
@@ -258,7 +258,7 @@
</childNodeDefinitions>
</nodeType>
- <!-- nodeType name="exo:metadata" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <nodeType name="exo:metadata" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
<propertyDefinition name="exo:internalUse"
requiredType="Boolean" autoCreated="true" mandatory="false"
onParentVersion="COPY"
protected="false" multiple="false">
@@ -336,6 +336,6 @@
<valueConstraints />
</propertyDefinition>
</propertyDefinitions>
- </nodeType -->
+ </nodeType>
</nodeTypes>
Added:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-publication-config.xml
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-publication-config.xml
(rev 0)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/nodetypes-publication-config.xml 2010-08-10
16:04:43 UTC (rev 2906)
@@ -0,0 +1,38 @@
+<nodeTypes
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
+
xmlns:jcr="http://www.jcp.org/jcr/1.0">
+
+ <nodeType name="publication:publication" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="publication:lifecycleName"
requiredType="String" autoCreated="false" mandatory="true"
+ onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ <propertyDefinition name="publication:currentState"
requiredType="String" autoCreated="false" mandatory="true"
+ onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ <propertyDefinition name="publication:history"
requiredType="String" autoCreated="false" mandatory="true"
+ onParentVersion="COPY" protected="false"
multiple="true">
+ <valueConstraints/>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="publication:webpagesPublication" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>publication:publication</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="publication:navigationNodeURIs"
requiredType="String" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="publication:webPageIDs"
requiredType="String" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="publication:applicationIDs"
requiredType="String" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+</nodeTypes>
\ No newline at end of file
Added:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/publication-plugins-nodetypes-config.xml
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/publication-plugins-nodetypes-config.xml
(rev 0)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/publication-plugins-nodetypes-config.xml 2010-08-10
16:04:43 UTC (rev 2906)
@@ -0,0 +1,43 @@
+<nodeTypes
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
+
xmlns:jcr="http://www.jcp.org/jcr/1.0">
+
+ <nodeType name="publication:staticAndDirectPublication"
isMixin="true" hasOrderableChildNodes="false"
primaryItemName="">
+ <supertypes>
+ <supertype>publication:publication</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="publication:visibility"
requiredType="String" autoCreated="false" mandatory="true"
+ onParentVersion="IGNORE" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ <propertyDefinition name="publication:versionsPublicationStates"
requiredType="String" autoCreated="false" mandatory="true"
+ onParentVersion="IGNORE" protected="false"
multiple="true">
+ <valueConstraints/>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="publication:simplePublication" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>publication:webpagesPublication</supertype>
+ </supertypes>
+ </nodeType>
+
+ <nodeType name="publication:stateAndVersionBasedPublication"
isMixin="true" hasOrderableChildNodes="false"
primaryItemName="">
+ <supertypes>
+ <supertype>publication:publication</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="publication:revisionData"
requiredType="String" autoCreated="false" mandatory="false"
onParentVersion="IGNORE" protected="false"
multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="publication:liveRevision"
requiredType="Reference" autoCreated="false"
mandatory="false" onParentVersion="IGNORE" protected="false"
multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="publication:liveDate"
requiredType="Date" autoCreated="false" mandatory="false"
onParentVersion="IGNORE" protected="false"
multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+</nodeTypes>
\ No newline at end of file
Added:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/wcm-nodetypes.xml
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/wcm-nodetypes.xml
(rev 0)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/wcm-nodetypes.xml 2010-08-10
16:04:43 UTC (rev 2906)
@@ -0,0 +1,256 @@
+<nodeTypes
+
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+
xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
+
xmlns:jcr="http://www.jcp.org/jcr/1.0"
+
xmlns:exo="http://www.exoplatform.com/jcr/exo/1.0">
+
+ <!-- Duplicating this definition in case the ECM node type definitions
+ have not been processed by the Repository Service yet. -->
+ <!-- DO NOT REMOVE THIS DEFINITION -->
+ <nodeType name="exo:presentationable" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:presentationType"
requiredType="String" autoCreated="true" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+ <!-- DO NOT REMOVE THIS DEFINITION -->
+
+ <nodeType name="exo:portalFolder" isMixin="false"
hasOrderableChildNodes="true" primaryItemName="">
+ <supertypes>
+ <supertype>nt:unstructured</supertype>
+ </supertypes>
+ </nodeType>
+
+ <nodeType name="exo:webFolder" isMixin="false"
hasOrderableChildNodes="true" primaryItemName="">
+ <supertypes>
+ <supertype>nt:unstructured</supertype>
+ </supertypes>
+ </nodeType>
+
+ <nodeType name="exo:themeFolder" isMixin="false"
hasOrderableChildNodes="true" primaryItemName="">
+ <supertypes>
+ <supertype>nt:unstructured</supertype>
+ </supertypes>
+ </nodeType>
+
+ <nodeType name="exo:linkFolder" isMixin="false"
hasOrderableChildNodes="true" primaryItemName="">
+ <supertypes>
+ <supertype>nt:unstructured</supertype>
+ </supertypes>
+ </nodeType>
+
+ <nodeType name="exo:multimediaFolder" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>nt:unstructured</supertype>
+ </supertypes>
+ <childNodeDefinitions>
+ <childNodeDefinition name="images"
defaultPrimaryType="nt:folder" autoCreated="false"
mandatory="false" onParentVersion="VERSION"
protected="false" sameNameSiblings="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:base</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ <childNodeDefinition name="videos"
defaultPrimaryType="nt:folder" autoCreated="false"
mandatory="false" onParentVersion="VERSION"
protected="false" sameNameSiblings="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:base</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ <childNodeDefinition name="audio"
defaultPrimaryType="nt:folder" autoCreated="false"
mandatory="false" onParentVersion="VERSION"
protected="false" sameNameSiblings="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:base</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ </childNodeDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:jsFolder" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>nt:folder</supertype>
+ </supertypes>
+ </nodeType>
+
+ <nodeType name="exo:cssFolder" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>nt:folder</supertype>
+ </supertypes>
+ <childNodeDefinitions>
+ <childNodeDefinition name="*" defaultPrimaryType="nt:folder"
autoCreated="false" mandatory="false"
onParentVersion="VERSION" protected="false"
sameNameSiblings="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:base</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ <childNodeDefinition name="css"
defaultPrimaryType="exo:cssFolder" autoCreated="false"
mandatory="false" onParentVersion="VERSION"
protected="false" sameNameSiblings="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:base</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ </childNodeDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:webContent" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>mix:referenceable</supertype>
+ <supertype>nt:unstructured</supertype>
+ <supertype>nt:hierarchyNode</supertype>
+ <supertype>exo:rss-enable</supertype>
+ </supertypes>
+ <childNodeDefinitions>
+ <childNodeDefinition name="js"
defaultPrimaryType="exo:jsFolder" autoCreated="false"
mandatory="false" onParentVersion="VERSION"
protected="false" sameNameSiblings="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:base</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ <childNodeDefinition name="css"
defaultPrimaryType="exo:cssFolder" autoCreated="false"
mandatory="false" onParentVersion="VERSION"
protected="false" sameNameSiblings="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:base</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ <childNodeDefinition name="medias"
defaultPrimaryType="exo:multimediaFolder" autoCreated="false"
mandatory="false" onParentVersion="VERSION"
protected="false" sameNameSiblings="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>nt:base</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDefinition>
+ </childNodeDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:htmlFile" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>exo:presentationable</supertype>
+ <supertype>mix:referenceable</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="exo:htmlTOC" requiredType="String"
autoCreated="true" mandatory="false" onParentVersion="COPY"
protected="false" multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:jsFile" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>exo:presentationable</supertype>
+ <supertype>mix:referenceable</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="exo:active" requiredType="Boolean"
autoCreated="true" mandatory="true" onParentVersion="COPY"
protected="false" multiple="false">
+ <valueConstraints />
+ <defaultValues>
+ <defaultValue>true</defaultValue>
+ </defaultValues>
+ </propertyDefinition>
+ <propertyDefinition name="exo:priority" requiredType="Long"
autoCreated="true" mandatory="true" onParentVersion="COPY"
protected="false" multiple="false">
+ <valueConstraints />
+ <defaultValues>
+ <defaultValue>0</defaultValue>
+ </defaultValues>
+ </propertyDefinition>
+ <propertyDefinition name="exo:sharedJS"
requiredType="Boolean" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:cssFile" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>exo:presentationable</supertype>
+ <supertype>mix:referenceable</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="exo:active" requiredType="Boolean"
autoCreated="true" mandatory="true" onParentVersion="COPY"
protected="false" multiple="false">
+ <valueConstraints />
+ <defaultValues>
+ <defaultValue>true</defaultValue>
+ </defaultValues>
+ </propertyDefinition>
+ <propertyDefinition name="exo:priority" requiredType="Long"
autoCreated="true" mandatory="true" onParentVersion="COPY"
protected="false" multiple="false">
+ <valueConstraints />
+ <defaultValues>
+ <defaultValue>0</defaultValue>
+ </defaultValues>
+ </propertyDefinition>
+ <propertyDefinition name="exo:sharedCSS"
requiredType="Boolean" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:multimediaFile" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>exo:presentationable</supertype>
+ </supertypes>
+ </nodeType>
+
+ <nodeType name="exo:linkable" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:links" requiredType="String"
autoCreated="true" mandatory="false" onParentVersion="COPY"
protected="false" multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:link" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>mix:referenceable</supertype>
+ <supertype>nt:unstructured</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="exo:linkURL" requiredType="String"
autoCreated="false" mandatory="true" onParentVersion="COPY"
protected="false" multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:linkDescription"
requiredType="String" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:linkActive"
requiredType="Boolean" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:webLinks" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:externalSiteLinks"
requiredType="Reference" autoCreated="false"
mandatory="false" onParentVersion="COPY" protected="false"
multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:portalPageLinks"
requiredType="Reference" autoCreated="false"
mandatory="false" onParentVersion="COPY" protected="false"
multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:insideDocumentLinks"
requiredType="Reference" autoCreated="false"
mandatory="false" onParentVersion="COPY" protected="false"
multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ <propertyDefinition name="exo:multimediaLinks"
requiredType="Reference" autoCreated="false"
mandatory="false" onParentVersion="COPY" protected="false"
multiple="true">
+ <valueConstraints />
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:multiPageContent" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>exo:presentationable</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="exo:presentationType"
requiredType="String" autoCreated="true" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints />
+ <defaultValues>
+ <defaultValue>exo:multiPageContent</defaultValue>
+ </defaultValues>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="exo:sortable" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="exo:title" requiredType="String"
autoCreated="true" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ <propertyDefinition name="exo:titlePublished"
requiredType="String" autoCreated="true" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ <propertyDefinition name="exo:name" requiredType="String"
autoCreated="true" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ <propertyDefinition name="publication:liveDate"
requiredType="Date" autoCreated="true" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+</nodeTypes>
Property changes on:
jcr/branches/1.12.x/exo.jcr.component.core/src/test/resources/conf/test/wcm-nodetypes.xml
___________________________________________________________________
Name: svn:eol-style
+ native