. Big and juicy application/WCM model refactoring

- WARNING: this change requires a new DB as the WCM model has changed significantly, yes I have probably broken a few WCM things :)

Previously the following statements were true:
 - Most of the model constants were defined in the ContentModel class - including web-client Application specific model items
 - WCMModel class was a mix of WCM repository and WCM application model constants
 - The applicationModel.xml definition file contained both web-client Application and WCM application model definitions
 - The wcmModel.xml definition file contained both WCM repository and WCM application model definitions

The following statements are now true:
 - All web-client application specific model constants have been moved from ContentModel to a new model constants class ApplicationModel
 - A new WCM application model has been defined with the prefix "wca" and URI: http://www.alfresco.org/model/wcmappmodel/1.0
 - All WCM application specific model constants have been renamed/moved from ContentModel/WCMModel to a new model constants class WCMAppModel
 - The mix of WCM application specific model definitions in contentModel.xml and applicationModel.xml has been moved to a new definition file wcmAppModel.xml
 - A patch is not required for standard Alfresco as only WCM definitions have actually changed

. Fix to issue created during workflow id/name refactor
. Fix to allow forms in the Available Content Forms panel to have correct sandbox/username context for action dialog

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4448 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-11-27 15:03:12 +00:00
parent ef669bec2a
commit 4003f0e36f
26 changed files with 599 additions and 501 deletions

View File

@@ -21,7 +21,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.model.ApplicationModel;
import org.alfresco.repo.action.ParameterDefinitionImpl;
import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ParameterDefinition;
@@ -83,21 +83,21 @@ public class SimpleWorkflowActionExecuter extends ActionExecuterAbstractBase
// Set the property values
Map<QName, Serializable> propertyValues = new HashMap<QName, Serializable>();
propertyValues.put(ContentModel.PROP_APPROVE_STEP, approveStep);
propertyValues.put(ContentModel.PROP_APPROVE_FOLDER, approveFolder);
propertyValues.put(ApplicationModel.PROP_APPROVE_STEP, approveStep);
propertyValues.put(ApplicationModel.PROP_APPROVE_FOLDER, approveFolder);
if (approveMove != null)
{
propertyValues.put(ContentModel.PROP_APPROVE_MOVE, approveMove.booleanValue());
propertyValues.put(ApplicationModel.PROP_APPROVE_MOVE, approveMove.booleanValue());
}
propertyValues.put(ContentModel.PROP_REJECT_STEP, rejectStep);
propertyValues.put(ContentModel.PROP_REJECT_FOLDER, rejectFolder);
propertyValues.put(ApplicationModel.PROP_REJECT_STEP, rejectStep);
propertyValues.put(ApplicationModel.PROP_REJECT_FOLDER, rejectFolder);
if (rejectMove != null)
{
propertyValues.put(ContentModel.PROP_REJECT_MOVE, rejectMove.booleanValue());
propertyValues.put(ApplicationModel.PROP_REJECT_MOVE, rejectMove.booleanValue());
}
// Apply the simple workflow aspect to the node
this.nodeService.addAspect(actionedUponNodeRef, ContentModel.ASPECT_SIMPLE_WORKFLOW, propertyValues);
this.nodeService.addAspect(actionedUponNodeRef, ApplicationModel.ASPECT_SIMPLE_WORKFLOW, propertyValues);
}
}
}

View File

@@ -23,6 +23,7 @@ import java.util.Map;
import java.util.Properties;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.admin.patch.AbstractPatch;
import org.alfresco.repo.importer.ImporterBootstrap;
@@ -220,7 +221,7 @@ public class EmailTemplatesFolderPatch extends AbstractPatch
properties.put(ContentModel.PROP_NAME, emailTemplatesName);
properties.put(ContentModel.PROP_TITLE, emailTemplatesName);
properties.put(ContentModel.PROP_DESCRIPTION, emailTemplatesDescription);
properties.put(ContentModel.PROP_ICON, PROPERTY_ICON);
properties.put(ApplicationModel.PROP_ICON, PROPERTY_ICON);
// create the node
ChildAssociationRef childAssocRef = nodeService.createNode(
@@ -232,6 +233,6 @@ public class EmailTemplatesFolderPatch extends AbstractPatch
emailTemplatesFolderNodeRef = childAssocRef.getChildRef();
// add the required aspects
nodeService.addAspect(emailTemplatesFolderNodeRef, ContentModel.ASPECT_UIFACETS, null);
nodeService.addAspect(emailTemplatesFolderNodeRef, ApplicationModel.ASPECT_UIFACETS, null);
}
}

View File

@@ -3,7 +3,7 @@ package org.alfresco.repo.admin.patch.impl;
import java.io.Serializable;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.model.ContentModel;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ForumModel;
import org.alfresco.repo.admin.patch.AbstractPatch;
import org.alfresco.repo.importer.ImporterBootstrap;
@@ -71,14 +71,14 @@ public class ForumsIconsPatch extends AbstractPatch
{
if (this.nodeService.exists(node))
{
String icon = (String)this.nodeService.getProperty(node, ContentModel.PROP_ICON);
String icon = (String)this.nodeService.getProperty(node, ApplicationModel.PROP_ICON);
if (icon != null && icon.length() > 0)
{
int idx = icon.indexOf("_large");
if (idx != -1)
{
String newIcon = icon.substring(0, idx);
this.nodeService.setProperty(node, ContentModel.PROP_ICON, (Serializable)newIcon);
this.nodeService.setProperty(node, ApplicationModel.PROP_ICON, (Serializable)newIcon);
changed++;
}
}

View File

@@ -22,6 +22,7 @@ import java.util.List;
import java.util.Properties;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.admin.patch.AbstractPatch;
import org.alfresco.repo.importer.ImporterBootstrap;
@@ -206,14 +207,14 @@ public class GuestUserPatch extends AbstractPatch
properties.put(ContentModel.PROP_NAME, guestHomeName);
properties.put(ContentModel.PROP_TITLE, guestHomeName);
properties.put(ContentModel.PROP_DESCRIPTION, guestHomeDescription);
properties.put(ContentModel.PROP_ICON, "space-icon-default");
properties.put(ApplicationModel.PROP_ICON, "space-icon-default");
ChildAssociationRef childAssocRef = nodeService.createNode(companyHomeRef, ContentModel.ASSOC_CONTAINS,
QName.createQName(guestHomeChildName, namespaceService), ContentModel.TYPE_FOLDER, properties);
NodeRef nodeRef = childAssocRef.getChildRef();
// add the required aspects
nodeService.addAspect(nodeRef, ContentModel.ASPECT_UIFACETS, null);
nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, null);
setGuestHomePermissions(nodeRef);

View File

@@ -24,6 +24,7 @@ import java.util.Map;
import java.util.Properties;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.admin.patch.AbstractPatch;
import org.alfresco.repo.importer.ACPImportPackageHandler;
@@ -280,7 +281,7 @@ public class RSSTemplatesFolderPatch extends AbstractPatch
properties.put(ContentModel.PROP_NAME, folderName);
properties.put(ContentModel.PROP_TITLE, folderName);
properties.put(ContentModel.PROP_DESCRIPTION, folderDescription);
properties.put(ContentModel.PROP_ICON, PROPERTY_ICON);
properties.put(ApplicationModel.PROP_ICON, PROPERTY_ICON);
// create the node
ChildAssociationRef childAssocRef = nodeService.createNode(
@@ -292,7 +293,7 @@ public class RSSTemplatesFolderPatch extends AbstractPatch
this.rssFolderNodeRef = childAssocRef.getChildRef();
// finally add the required aspects
nodeService.addAspect(rssFolderNodeRef, ContentModel.ASPECT_UIFACETS, null);
nodeService.addAspect(rssFolderNodeRef, ApplicationModel.ASPECT_UIFACETS, null);
}
private void importContent() throws IOException

View File

@@ -23,6 +23,7 @@ import java.util.Map;
import java.util.Properties;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.admin.patch.AbstractPatch;
import org.alfresco.repo.importer.ImporterBootstrap;
@@ -234,7 +235,7 @@ public class SavedSearchFolderPatch extends AbstractPatch
properties.put(ContentModel.PROP_NAME, savedSearchesName);
properties.put(ContentModel.PROP_TITLE, savedSearchesName);
properties.put(ContentModel.PROP_DESCRIPTION, savedSearchesDescription);
properties.put(ContentModel.PROP_ICON, PROPERTY_ICON);
properties.put(ApplicationModel.PROP_ICON, PROPERTY_ICON);
// create the node
ChildAssociationRef childAssocRef = nodeService.createNode(
dictionaryNodeRef,
@@ -244,7 +245,7 @@ public class SavedSearchFolderPatch extends AbstractPatch
properties);
savedSearchesFolderNodeRef = childAssocRef.getChildRef();
// add the required aspects
nodeService.addAspect(savedSearchesFolderNodeRef, ContentModel.ASPECT_UIFACETS, null);
nodeService.addAspect(savedSearchesFolderNodeRef, ApplicationModel.ASPECT_UIFACETS, null);
// done
}

View File

@@ -24,6 +24,7 @@ import java.util.Map;
import java.util.Properties;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.admin.patch.AbstractPatch;
import org.alfresco.repo.importer.ACPImportPackageHandler;
@@ -266,7 +267,7 @@ public class ScriptsFolderPatch extends AbstractPatch
properties.put(ContentModel.PROP_NAME, folderName);
properties.put(ContentModel.PROP_TITLE, folderName);
properties.put(ContentModel.PROP_DESCRIPTION, folderDescription);
properties.put(ContentModel.PROP_ICON, PROPERTY_ICON);
properties.put(ApplicationModel.PROP_ICON, PROPERTY_ICON);
// create the node
ChildAssociationRef childAssocRef = nodeService.createNode(
@@ -278,7 +279,7 @@ public class ScriptsFolderPatch extends AbstractPatch
scriptsFolderNodeRef = childAssocRef.getChildRef();
// finally add the required aspects
nodeService.addAspect(scriptsFolderNodeRef, ContentModel.ASPECT_UIFACETS, null);
nodeService.addAspect(scriptsFolderNodeRef, ApplicationModel.ASPECT_UIFACETS, null);
}
private void importContent() throws IOException

View File

@@ -21,7 +21,7 @@ import java.util.List;
import java.util.Properties;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.model.ContentModel;
import org.alfresco.model.ApplicationModel;
import org.alfresco.repo.admin.patch.AbstractPatch;
import org.alfresco.repo.importer.ACPImportPackageHandler;
import org.alfresco.repo.importer.ImporterBootstrap;
@@ -124,10 +124,10 @@ public class UIFacetsAspectRemovalPatch extends AbstractPatch
for (NodeRef ref : nodeRefs)
{
// if the content has the uifacets aspect, then remove it and meaningless icon reference
if (nodeService.hasAspect(ref, ContentModel.ASPECT_UIFACETS))
if (nodeService.hasAspect(ref, ApplicationModel.ASPECT_UIFACETS))
{
nodeService.removeAspect(ref, ContentModel.ASPECT_UIFACETS);
nodeService.setProperty(ref, ContentModel.PROP_ICON, null);
nodeService.removeAspect(ref, ApplicationModel.ASPECT_UIFACETS);
nodeService.setProperty(ref, ApplicationModel.PROP_ICON, null);
updated++;
}
}

View File

@@ -18,7 +18,7 @@ package org.alfresco.repo.configuration;
import java.util.List;
import org.alfresco.model.ContentModel;
import org.alfresco.model.ApplicationModel;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
@@ -38,7 +38,7 @@ public class ConfigurableServiceImpl implements ConfigurableService
public boolean isConfigurable(NodeRef nodeRef)
{
return this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_CONFIGURABLE);
return this.nodeService.hasAspect(nodeRef, ApplicationModel.ASPECT_CONFIGURABLE);
}
public void makeConfigurable(NodeRef nodeRef)
@@ -46,14 +46,14 @@ public class ConfigurableServiceImpl implements ConfigurableService
if (isConfigurable(nodeRef) == false)
{
// First apply the aspect
this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_CONFIGURABLE, null);
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_CONFIGURABLE, null);
// Next create and add the configurations folder
this.nodeService.createNode(
nodeRef,
ContentModel.ASSOC_CONFIGURATIONS,
ContentModel.ASSOC_CONFIGURATIONS,
ContentModel.TYPE_CONFIGURATIONS);
ApplicationModel.ASSOC_CONFIGURATIONS,
ApplicationModel.ASSOC_CONFIGURATIONS,
ApplicationModel.TYPE_CONFIGURATIONS);
}
}
@@ -65,7 +65,7 @@ public class ConfigurableServiceImpl implements ConfigurableService
List<ChildAssociationRef> assocs = this.nodeService.getChildAssocs(
nodeRef,
RegexQNamePattern.MATCH_ALL,
ContentModel.ASSOC_CONFIGURATIONS);
ApplicationModel.ASSOC_CONFIGURATIONS);
if (assocs.size() != 0)
{
ChildAssociationRef assoc = assocs.get(0);

View File

@@ -18,6 +18,7 @@ package org.alfresco.repo.configuration;
import java.util.List;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
@@ -79,11 +80,11 @@ public class ConfigurableServiceImplTest extends BaseSpringTest
public void testMakeConfigurable()
{
this.configurableService.makeConfigurable(this.nodeRef);
assertTrue(this.nodeService.hasAspect(this.nodeRef, ContentModel.ASPECT_CONFIGURABLE));
assertTrue(this.nodeService.hasAspect(this.nodeRef, ApplicationModel.ASPECT_CONFIGURABLE));
List<ChildAssociationRef> assocs = this.nodeService.getChildAssocs(
this.nodeRef,
RegexQNamePattern.MATCH_ALL,
ContentModel.ASSOC_CONFIGURATIONS);
ApplicationModel.ASSOC_CONFIGURATIONS);
assertNotNull(assocs);
assertEquals(1, assocs.size());
}

View File

@@ -26,6 +26,7 @@ import java.util.Set;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.policy.ClassPolicyDelegate;
import org.alfresco.repo.policy.JavaBehaviour;
@@ -826,7 +827,7 @@ public class CopyServiceImpl implements CopyService
QName childType = this.nodeService.getType(childRef);
// TODO will need to remove this reference to the configurations association
if (this.dictionaryService.isSubClass(childType, ContentModel.TYPE_CONFIGURATIONS) == true ||
if (this.dictionaryService.isSubClass(childType, ApplicationModel.TYPE_CONFIGURATIONS) == true ||
copyDetails.isChildAssociationRefAlwaysTraversed(classRef, childAssoc) == true)
{
if (copiedChildren.containsKey(childRef) == false)

View File

@@ -24,6 +24,7 @@ import java.util.List;
import java.util.Map;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.model.ForumModel;
import org.alfresco.repo.policy.JavaBehaviour;
@@ -240,15 +241,15 @@ public class DiscussableAspect
ChildAssociationRef childRef = this.nodeService.createNode(destNodeRef,
ForumModel.ASSOC_DISCUSSION,
QName.createQName(ForumModel.FORUMS_MODEL_URI, "discussion"),
QName.createQName(NamespaceService.FORUMS_MODEL_1_0_URI, "discussion"),
ForumModel.TYPE_FORUM, forumProps);
destinationForum = childRef.getChildRef();
// apply the uifacets aspect
Map<QName, Serializable> uiFacetsProps = new HashMap<QName, Serializable>(5);
uiFacetsProps.put(ContentModel.PROP_ICON, "forum");
this.nodeService.addAspect(destinationForum, ContentModel.ASPECT_UIFACETS, uiFacetsProps);
uiFacetsProps.put(ApplicationModel.PROP_ICON, "forum");
this.nodeService.addAspect(destinationForum, ApplicationModel.ASPECT_UIFACETS, uiFacetsProps);
}
return destinationForum;

View File

@@ -25,6 +25,7 @@ import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.transaction.TransactionUtil;
import org.alfresco.repo.transaction.TransactionUtil.TransactionWork;
@@ -354,10 +355,10 @@ public class FileImporterImpl implements FileImporter
// apply the uifacets aspect - icon, title and description props
Map<QName, Serializable> uiFacetsProps = new HashMap<QName, Serializable>(5);
uiFacetsProps.put(ContentModel.PROP_ICON, "space-icon-default");
uiFacetsProps.put(ApplicationModel.PROP_ICON, "space-icon-default");
uiFacetsProps.put(ContentModel.PROP_TITLE, name);
uiFacetsProps.put(ContentModel.PROP_DESCRIPTION, path);
this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_UIFACETS, uiFacetsProps);
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, uiFacetsProps);
if (logger.isDebugEnabled())
logger.debug("Added uifacets aspect with properties: " + uiFacetsProps);

View File

@@ -27,6 +27,7 @@ import javax.transaction.UserTransaction;
import junit.framework.TestCase;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ActionServiceImplTest;
import org.alfresco.repo.action.ActionServiceImplTest.AsyncTest;
@@ -318,9 +319,9 @@ public class RuleServiceCoverageTest extends TestCase
assertTrue(this.nodeService.hasAspect(newNodeRef, ContentModel.ASPECT_VERSIONABLE));
Map<String, Serializable> params2 = new HashMap<String, Serializable>(2);
params2.put(AddFeaturesActionExecuter.PARAM_ASPECT_NAME, ContentModel.ASPECT_SIMPLE_WORKFLOW);
params2.put(ContentModel.PROP_APPROVE_STEP.toString(), "approveStep");
params2.put(ContentModel.PROP_APPROVE_MOVE.toString(), false);
params2.put(AddFeaturesActionExecuter.PARAM_ASPECT_NAME, ApplicationModel.ASPECT_SIMPLE_WORKFLOW);
params2.put(ApplicationModel.PROP_APPROVE_STEP.toString(), "approveStep");
params2.put(ApplicationModel.PROP_APPROVE_MOVE.toString(), false);
// Test that rule can be updated and execute correctly
//rule.removeAllActions();
@@ -335,9 +336,9 @@ public class RuleServiceCoverageTest extends TestCase
ContentModel.TYPE_CONTENT,
getContentProperties()).getChildRef();
addContentToNode(newNodeRef2);
assertTrue(this.nodeService.hasAspect(newNodeRef2, ContentModel.ASPECT_SIMPLE_WORKFLOW));
assertEquals("approveStep", this.nodeService.getProperty(newNodeRef2, ContentModel.PROP_APPROVE_STEP));
assertEquals(false, this.nodeService.getProperty(newNodeRef2, ContentModel.PROP_APPROVE_MOVE));
assertTrue(this.nodeService.hasAspect(newNodeRef2, ApplicationModel.ASPECT_SIMPLE_WORKFLOW));
assertEquals("approveStep", this.nodeService.getProperty(newNodeRef2, ApplicationModel.PROP_APPROVE_STEP));
assertEquals(false, this.nodeService.getProperty(newNodeRef2, ApplicationModel.PROP_APPROVE_MOVE));
// System.out.println(NodeStoreInspector.dumpNodeStore(this.nodeService, this.testStoreRef));
}
@@ -345,7 +346,7 @@ public class RuleServiceCoverageTest extends TestCase
public void testDisableIndividualRules()
{
Map<String, Serializable> params = new HashMap<String, Serializable>(1);
params.put("aspect-name", ContentModel.ASPECT_CONFIGURABLE);
params.put("aspect-name", ApplicationModel.ASPECT_CONFIGURABLE);
Rule rule = createRule(
RuleType.INBOUND,
@@ -364,7 +365,7 @@ public class RuleServiceCoverageTest extends TestCase
ContentModel.TYPE_CONTENT,
getContentProperties()).getChildRef();
addContentToNode(newNodeRef);
assertFalse(this.nodeService.hasAspect(newNodeRef, ContentModel.ASPECT_CONFIGURABLE));
assertFalse(this.nodeService.hasAspect(newNodeRef, ApplicationModel.ASPECT_CONFIGURABLE));
Rule rule2 = this.ruleService.getRule(rule.getNodeRef());
rule2.setRuleDisabled(false);
@@ -378,7 +379,7 @@ public class RuleServiceCoverageTest extends TestCase
ContentModel.TYPE_CONTENT,
getContentProperties()).getChildRef();
addContentToNode(newNodeRef2);
assertTrue(this.nodeService.hasAspect(newNodeRef2, ContentModel.ASPECT_CONFIGURABLE));
assertTrue(this.nodeService.hasAspect(newNodeRef2, ApplicationModel.ASPECT_CONFIGURABLE));
}
@@ -535,14 +536,14 @@ public class RuleServiceCoverageTest extends TestCase
getContentProperties()).getChildRef();
addContentToNode(newNodeRef);
assertTrue(this.nodeService.hasAspect(newNodeRef, ContentModel.ASPECT_SIMPLE_WORKFLOW));
assertEquals("approveStep", this.nodeService.getProperty(newNodeRef, ContentModel.PROP_APPROVE_STEP));
assertEquals(this.rootNodeRef, this.nodeService.getProperty(newNodeRef, ContentModel.PROP_APPROVE_FOLDER));
assertTrue(((Boolean)this.nodeService.getProperty(newNodeRef, ContentModel.PROP_APPROVE_MOVE)).booleanValue());
assertTrue(this.nodeService.hasAspect(newNodeRef, ContentModel.ASPECT_SIMPLE_WORKFLOW));
assertEquals("rejectStep", this.nodeService.getProperty(newNodeRef, ContentModel.PROP_REJECT_STEP));
assertEquals(this.rootNodeRef, this.nodeService.getProperty(newNodeRef, ContentModel.PROP_REJECT_FOLDER));
assertFalse(((Boolean)this.nodeService.getProperty(newNodeRef, ContentModel.PROP_REJECT_MOVE)).booleanValue());
assertTrue(this.nodeService.hasAspect(newNodeRef, ApplicationModel.ASPECT_SIMPLE_WORKFLOW));
assertEquals("approveStep", this.nodeService.getProperty(newNodeRef, ApplicationModel.PROP_APPROVE_STEP));
assertEquals(this.rootNodeRef, this.nodeService.getProperty(newNodeRef, ApplicationModel.PROP_APPROVE_FOLDER));
assertTrue(((Boolean)this.nodeService.getProperty(newNodeRef, ApplicationModel.PROP_APPROVE_MOVE)).booleanValue());
assertTrue(this.nodeService.hasAspect(newNodeRef, ApplicationModel.ASPECT_SIMPLE_WORKFLOW));
assertEquals("rejectStep", this.nodeService.getProperty(newNodeRef, ApplicationModel.PROP_REJECT_STEP));
assertEquals(this.rootNodeRef, this.nodeService.getProperty(newNodeRef, ApplicationModel.PROP_REJECT_FOLDER));
assertFalse(((Boolean)this.nodeService.getProperty(newNodeRef, ApplicationModel.PROP_REJECT_MOVE)).booleanValue());
// System.out.println(NodeStoreInspector.dumpNodeStore(this.nodeService, this.testStoreRef));
}

View File

@@ -23,6 +23,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
@@ -241,7 +242,7 @@ public class NodeServiceImplTest extends BaseVersionStoreTest
boolean test1 = this.lightWeightVersionStoreNodeService.hasAspect(
version.getFrozenStateNodeRef(),
ContentModel.ASPECT_UIFACETS);
ApplicationModel.ASPECT_UIFACETS);
assertFalse(test1);
boolean test2 = this.lightWeightVersionStoreNodeService.hasAspect(

View File

@@ -21,6 +21,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Set;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.transaction.TransactionUtil;
import org.alfresco.service.cmr.repository.ContentReader;
@@ -250,7 +251,7 @@ public class VersionServiceImplTest extends BaseVersionStoreTest
contentWriter.putContent(UPDATED_CONTENT_1);
// Change the aspects on the node
this.dbNodeService.addAspect(versionableNode, ContentModel.ASPECT_SIMPLE_WORKFLOW, null);
this.dbNodeService.addAspect(versionableNode, ApplicationModel.ASPECT_SIMPLE_WORKFLOW, null);
// Store the node details for later
Set<QName> origAspects2 = this.dbNodeService.getAspects(versionableNode);