From dfd6c10aafe493d5d908a40fec179f8ed22b194d Mon Sep 17 00:00:00 2001 From: Ariel Backenroth Date: Sun, 31 Dec 2006 08:45:42 +0000 Subject: [PATCH] - moving generic xml parsing utilities out of FormsService and into their own class - refactoring to generate and regenerate methods to make it easier to use project level overridden properties, and to at some point (soon) make it possible to make error handling for rendering engines more robust - added a web project object to encapsulate web project properties and provide a central location for getting forms and rendering engines with web project level overridden properties - made select default workflow screen match wireframes - using the same workflowdefault type in the wcm model for web projects and forms. - using outputpathpattern aspect consistently - using commons.io to parse paths - using form name rather than noderef as parameter for selected form from content forms dashlet - fixed bug where rendition properties noderef wasn't being properly associated with renditions causing problems with regenerate - using multivalued properties to track renditions - remove weird registerRendition/registerFormInstanceData calls. no longer necessary since generateRendition and regenerate are done within forminstancedata and rendition - adding default workflow parameters as property of Form - adding a unique name property to rendering engine templates to allow for looking one up by name git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4702 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/model/wcmAppModel.xml | 616 +++++++++--------- .../java/org/alfresco/model/WCMAppModel.java | 16 +- 2 files changed, 323 insertions(+), 309 deletions(-) diff --git a/config/alfresco/model/wcmAppModel.xml b/config/alfresco/model/wcmAppModel.xml index bc62ac90b5..39ba9fadde 100644 --- a/config/alfresco/model/wcmAppModel.xml +++ b/config/alfresco/model/wcmAppModel.xml @@ -1,312 +1,324 @@ - Alfresco WCM Application Model - Alfresco - 2006-11-27 - 1.0 + Alfresco WCM Application Model + Alfresco + 2006-11-27 + 1.0 - - - - - - - - - - - - - - - - AVM Website Folder - wcm:avmfolder - - - - AVM Store Root - d:text - - - Default Webapp - d:text - - - - - - false - false - - - wca:webuser - false - true - - - - - false - false - - - wca:webform - false - true - - - - - false - false - - - wca:webworkflowdefaults - false - true - - - - - - - Website User Information - sys:base - - - d:text - true - - - d:text - true - - - - - - Website Web Form - sys:base - - - d:text - true - - - - - - false - false - - - wca:webformtemplate - false - true - - - - - false - false - - - wca:workflowdefaults - false - false - - - - - cm:titled - wca:filenamepattern - - - - - Website Web Form Template - sys:base - - - d:noderef - true - - - - wca:filenamepattern - - - - - Workflow Defaults - sys:base - - - d:text - true - - - d:content - false - - - - - - - Web Workflow Defaults - wca:workflowdefaults - - wca:filenamepattern - - - - - Properties for renditions - sys:base - - - Type - d:text - true - - - Mimetype for generated assets - d:text - true - - - + + + + + + + + + + + + + + + + AVM Website Folder + wcm:avmfolder + + + + AVM Store Root + d:text + + + Default Webapp + d:text + + + + + + false + false + + + wca:webuser + false + true + + + + + false + false + + + wca:webform + false + true + + + + + false + false + + + wca:webworkflowdefaults + false + true + + + + + + + Website User Information + sys:base + + + d:text + true + + + d:text + true + + + + + + Website Web Form + sys:base + + + d:text + true + + + + + + false + false + + + wca:webformtemplate + false + true + + + + + false + false + + + wca:workflowdefaults + false + false + + + + + cm:titled + wca:outputpathpattern + + + + + Website Web Form Template + sys:base + + + d:text + true + + + d:noderef + true + + + + wca:outputpathpattern + + + + + Workflow Defaults + sys:base + + + d:text + true + + + d:content + false + + + + + + + Web Workflow Defaults + wca:workflowdefaults + + wca:filenamepattern + + + + + Properties for renditions + sys:base + + + Mimetype for generated assets + d:text + true + + + + wca:outputpathpattern + + - + - + - - Webapp - - - - Filename Pattern - - - d:text - - - - - - - XForms Form - - - Schema Root Element Name - d:text - true - - - Schema - d:noderef - true - - - Output path pattern for form instance data - d:text - true - - - Default Workflow ID - d:text - false - - - - - Form Data Renderers - - wca:capture - false - false - - - wca:renderingenginetemplate - wca:presentation - false - true - - - - - - - - A Rendering Engine - - - Type - d:text - true - - - Form Source - d:noderef - true - - - - - Rendition Properties - - wca:capture - false - false - - - wca:renditionproperties - false - true - - - - + + Webapp + + + + Filename Pattern + + + d:text + + + - - XML file generated by a form - - - Form that generated this asset - d:noderef - true - - - Form that generated this asset - d:text - true - - - + + Output Path Pattern + + + d:text + + + + + + + XForms Form + + + Schema Root Element Name + d:text + true + + + Schema + d:noderef + true + + + + + Form Data Renderers + + wca:capture + false + false + + + wca:renderingenginetemplate + wca:presentation + false + true + + + + + false + false + + + wca:workflowdefaults + false + false + + + + + + + + A Rendering Engine + + + Type + d:text + true + + + Form Source + d:noderef + true + + + + + Rendition Properties + + wca:capture + false + false + + + wca:renditionproperties + false + true + + + + - - Output file generated by a rendering engine template - - - Form data renderer that generated this asset - d:noderef - true - - - Rendition properties used for this rendition - d:noderef - true - - - Primary XML Asset used to generate this asset - d:text - true - - - - + + XML file generated by a form + + + Form that generated this asset + d:text + true + + + Renditions of this form instance data + d:text + true + + + + + + Output file generated by a rendering engine template + + + Form data renderer that generated this asset + d:noderef + true + + + Rendition properties used for this rendition + d:noderef + true + + + Primary XML Asset used to generate this asset + d:text + true + + + + diff --git a/source/java/org/alfresco/model/WCMAppModel.java b/source/java/org/alfresco/model/WCMAppModel.java index a9fcf271df..58f8ad9533 100644 --- a/source/java/org/alfresco/model/WCMAppModel.java +++ b/source/java/org/alfresco/model/WCMAppModel.java @@ -45,12 +45,12 @@ public interface WCMAppModel // AVM web form template static final QName TYPE_WEBFORMTEMPLATE = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "webformtemplate"); - static final QName PROP_ENGINE = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "engine"); + static final QName PROP_BASE_RENDERING_ENGINE_TEMPLATE_NAME = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "baserenderingenginetemplatename"); // AVM workflow defaults - static final QName TYPE_WORKFLOWDEFAULTS = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "workflowdefaults"); + static final QName TYPE_WORKFLOW_DEFAULTS = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "workflowdefaults"); static final QName PROP_WORKFLOW_NAME = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "workflowname"); - static final QName PROP_WORKFLOWDEFAULTS = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "defaults"); + static final QName PROP_WORKFLOW_DEFAULT_PROPERTIES = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "workflowdefaultproperties"); // AVM web workflow defaults static final QName TYPE_WEBWORKFLOWDEFAULTS = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "webworkflowdefaults"); @@ -61,14 +61,17 @@ public interface WCMAppModel // AVM filename pattern aspect static final QName ASPECT_FILENAMEPATTERN = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "filenamepattern"); static final QName PROP_FILENAMEPATTERN = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "filenamepattern"); + + // AVM output path pattern aspect + static final QName ASPECT_OUTPUT_PATH_PATTERN = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "outputpathpattern"); + static final QName PROP_OUTPUT_PATH_PATTERN = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "outputpathpattern"); // The XForms data capture form aspect. static final QName ASPECT_FORM = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "form"); static final QName PROP_XML_SCHEMA = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "schema"); static final QName PROP_XML_SCHEMA_ROOT_ELEMENT_NAME = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "xmlschemarootelementname"); - static final QName PROP_OUTPUT_PATH_PATTERN_FORM_INSTANCE_DATA = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "outputpathpatternforminstancedata"); - static final QName PROP_DEFAULT_WORKFLOW_NAME = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "defaultworkflowname"); static final QName ASSOC_RENDERING_ENGINE_TEMPLATES = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "renderingenginetemplates"); + static final QName ASSOC_FORM_WORKFLOW_DEFAULTS = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "formworkflowdefaults"); // An XML to something else tranformer aspect. static final QName ASPECT_RENDERING_ENGINE_TEMPLATE = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "renderingenginetemplate"); @@ -77,8 +80,8 @@ public interface WCMAppModel static final QName ASSOC_RENDITION_PROPERTIES = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "renditionproperties"); static final QName ASPECT_FORM_INSTANCE_DATA = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "forminstancedata"); - static final QName PROP_PARENT_FORM = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "parentform"); static final QName PROP_PARENT_FORM_NAME = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "parentformname"); + static final QName PROP_RENDITIONS = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "renditions"); static final QName ASPECT_RENDITION = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "rendition"); static final QName PROP_PARENT_RENDERING_ENGINE_TEMPLATE = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "parentrenderingenginetemplate"); @@ -86,6 +89,5 @@ public interface WCMAppModel static final QName PROP_PRIMARY_FORM_INSTANCE_DATA = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "primaryforminstancedata"); static final QName TYPE_RENDITION_PROPERTIES = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "renditionproperties"); - static final QName PROP_OUTPUT_PATH_PATTERN_RENDITION = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "outputpathpatternrendition"); static final QName PROP_MIMETYPE_FOR_RENDITION = QName.createQName(NamespaceService.WCMAPP_MODEL_1_0_URI, "mimetypeforrendition"); }