Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-13982

Support Variants (draft, unpublished, published) on Document Types

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      The requirements and the solution direction are explained in Document Type Hardening Design Document

       

      To be able to support variants on document types, the following cnd changes are needed:

      [hipposysedit:documenttype] > hippo:document orderable
      + hipposysedit:nodetype (hipposysedit:nodetype) mandatory
      + hipposysedit:prototype (nt:base)
       
      [hipposysedit:templatehandle] > nt:base
      + * (hipposysedit:documenttype) = hipposysedit:documenttype multiple version
      
      [hipposysedit:namespace]
      ..
      + * (hipposysedit:templatehandle) = hipposysedit:templatehandle
      

       

      When a document type is created witjh the new configuration, the new document type will have the following jcr structure. 

      /doctypewithvariants:
        jcr:primaryType: hipposysedit:templatehandle
        /doctypewithvariants[1]:
          jcr:primaryType: hipposysedit:documenttype
          jcr:mixinTypes: ['editor:editable', 'hippostd:publishable', 'mix:referenceable']
          hippostd:state: published
          /hipposysedit:nodetype:
            jcr:primaryType: hipposysedit:nodetype
            hipposysedit:supertype: ['hippo:document', 'hippostd:relaxed', 'hippotranslation:translated']
            /active:
              jcr:primaryType: hipposysedit:field
              hipposysedit:type: Boolean
          /hipposysedit:prototype:
            jcr:primaryType: brxsaas:doctypewithvariants
            jcr:mixinTypes: ['hippostd:relaxed', 'hippotranslation:translated']
            brxsaas:active: false
          /editor:templates:
            jcr:primaryType: editor:templateset
            /_default_:
              jcr:primaryType: frontend:plugincluster
              /root:
                jcr:primaryType: frontend:plugin
                item: ${cluster.id}.field
                plugin.class: org.hippoecm.frontend.service.render.ListViewPlugin
              /active:
                jcr:primaryType: frontend:plugin
                caption: Boolean
                field: active
                hint: ''
                plugin.class: org.hippoecm.frontend.editor.plugins.field.PropertyFieldPlugin
                wicket.id: ${cluster.id}.field
                /cluster.options:
                  jcr:primaryType: frontend:pluginconfig
        /doctypewithvariants[2]:
          jcr:primaryType: hipposysedit:documenttype
          jcr:mixinTypes: ['editor:editable', 'hippostd:publishable', 'mix:referenceable',
          hippostd:state: unpublished
          /hipposysedit:nodetype:
          …
          …
      

       

      The hipposysedit:templatehandle node type is similar with the hippo:handle node type. The hippo:handle is used many places in the codebase including in the definitions of document workflows and while checking the node is a document or not. Because of that, it seems reasonable to create a new node type, hipposysedit:templatehandle, for document types to make the code less complex.

       

      Below the hippo:namespaces node type, there are two possible node types: hipposysedit:templatehandle and hipposysedit:templatetype.  The hipposysedit:templatehandle defines document types and the hipposysedit:templatetype defines other repository node types including primitive types and other compound fields.

       

      Existing document types defined in editable namespaces should be converted to the new document type structure. In the first phase, document type editor will support both new document types with variants and the existing document types. But when the (project) branch support is integrated to the document type editor, supporting the old structure will be meaningless.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cgul Cuneyt Gul
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: