. 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 8cc57fe41e
commit 6027f1c17d
44 changed files with 323 additions and 222 deletions

View File

@@ -11,6 +11,7 @@ import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.transaction.UserTransaction;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.workflow.WorkflowModel;
import org.alfresco.service.cmr.dictionary.TypeDefinition;
@@ -539,7 +540,7 @@ public class ManageTaskDialog extends BaseDialogBean
// look for content nodes or links to content
// NOTE: folders within workflow packages are ignored for now
if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT) ||
ContentModel.TYPE_FILELINK.equals(type))
ApplicationModel.TYPE_FILELINK.equals(type))
{
// if the node is not in the removed list then add create the
// client side representation and add to the list

View File

@@ -14,6 +14,7 @@ import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
import javax.transaction.UserTransaction;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.workflow.WorkflowModel;
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
@@ -95,7 +96,7 @@ public class StartWorkflowWizard extends BaseWizardBean
QName type = this.nodeService.getType(itemToWorkflow);
if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT) ||
this.dictionaryService.isSubClass(type, ContentModel.TYPE_FILELINK))
this.dictionaryService.isSubClass(type, ApplicationModel.TYPE_FILELINK))
{
this.packageItemsToAdd.add(itemToWorkflow.toString());
}

View File

@@ -23,6 +23,7 @@ import java.util.List;
import java.util.Map;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.CopyService;
@@ -60,7 +61,7 @@ public class WorkflowUtil
{
Node docNode = new Node(ref);
if (docNode.hasAspect(ContentModel.ASPECT_SIMPLE_WORKFLOW) == false)
if (docNode.hasAspect(ApplicationModel.ASPECT_SIMPLE_WORKFLOW) == false)
{
throw new AlfrescoRuntimeException("Cannot approve a node that is not part of a workflow.");
}
@@ -68,11 +69,11 @@ public class WorkflowUtil
// get the simple workflow aspect properties
Map<String, Object> props = docNode.getProperties();
Boolean approveMove = (Boolean)props.get(ContentModel.PROP_APPROVE_MOVE.toString());
NodeRef approveFolder = (NodeRef)props.get(ContentModel.PROP_APPROVE_FOLDER.toString());
Boolean approveMove = (Boolean)props.get(ApplicationModel.PROP_APPROVE_MOVE.toString());
NodeRef approveFolder = (NodeRef)props.get(ApplicationModel.PROP_APPROVE_FOLDER.toString());
// first we need to take off the simpleworkflow aspect
nodeService.removeAspect(ref, ContentModel.ASPECT_SIMPLE_WORKFLOW);
nodeService.removeAspect(ref, ApplicationModel.ASPECT_SIMPLE_WORKFLOW);
if (approveMove.booleanValue())
{
@@ -116,7 +117,7 @@ public class WorkflowUtil
{
Node docNode = new Node(ref);
if (docNode.hasAspect(ContentModel.ASPECT_SIMPLE_WORKFLOW) == false)
if (docNode.hasAspect(ApplicationModel.ASPECT_SIMPLE_WORKFLOW) == false)
{
throw new AlfrescoRuntimeException("Cannot reject a node that is not part of a workflow.");
}
@@ -124,9 +125,9 @@ public class WorkflowUtil
// get the simple workflow aspect properties
Map<String, Object> props = docNode.getProperties();
String rejectStep = (String)props.get(ContentModel.PROP_REJECT_STEP.toString());
Boolean rejectMove = (Boolean)props.get(ContentModel.PROP_REJECT_MOVE.toString());
NodeRef rejectFolder = (NodeRef)props.get(ContentModel.PROP_REJECT_FOLDER.toString());
String rejectStep = (String)props.get(ApplicationModel.PROP_REJECT_STEP.toString());
Boolean rejectMove = (Boolean)props.get(ApplicationModel.PROP_REJECT_MOVE.toString());
NodeRef rejectFolder = (NodeRef)props.get(ApplicationModel.PROP_REJECT_FOLDER.toString());
if (rejectStep == null && rejectMove == null && rejectFolder == null)
{
@@ -134,7 +135,7 @@ public class WorkflowUtil
}
// first we need to take off the simpleworkflow aspect
nodeService.removeAspect(ref, ContentModel.ASPECT_SIMPLE_WORKFLOW);
nodeService.removeAspect(ref, ApplicationModel.ASPECT_SIMPLE_WORKFLOW);
if (rejectMove != null && rejectMove.booleanValue())
{