Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1034

WebDAV service should support customizing the node types that are treated as files

    XMLWordPrintable

Details

    Description

      The ModeShape WebDAV service currently looks at each node and, if that node is of type 'nt:file' (meaning the node's primary type or any mixin type is or directly or indirectly extends 'nt:file'), will present it to the WebDAV client as a file resource; all other nodes are presented as folders/directories. Our WebDAV service can be configured to also look for other node types that should be treated as files, but the service still expects to find the content of the file and the other file metadata using the standard structure of the 'nt:file' (e.g., a child node named 'jcr:content' with a property of 'jcr:data'). Thus, if the node types do not fit these patterns, the WebDAV service will not successfully present these nodes as file resources.

      This feature request encompasses the changes necessary to support other node types that do not fit these patterns. The 'drools:assetNodeType' is a very good example, because it extends 'nt:hierarchyNode' (the abstract super type for 'nt:file' and 'nt:folder'), but it does not utilize the 'jcr:content' child node pattern and it stores the rule definition file content in two properties in the 'drools' namespace. Here is the CND definition for it:

      <drools = 'http://www.jboss.org/drools-repository/1.0'>
      <nt='http://www.jcp.org/jcr/nt/1.0'>
      <mix='http://www.jcp.org/jcr/mix/1.0'>

      [drools:assetNodeType] > 'drools:versionableNodeType'

      • drools:content (string)
      • drools:binaryContent (binary)
      • drools:attachmentFileName (string)
      • drools:archive (boolean) = 'false' mandatory autocreated
      • * (undefined)
      • drools:dateEffective (date)
      • drools:dateExpired (date)
      • drools:packageName (string) mandatory
      • drools:categoryReference (reference) multiple copy < 'drools:categoryNodeType'

      [drools:versionableNodeType] > 'nt:hierarchyNode','mix:versionable'

      • drools:title (string) mandatory
      • drools:lastModified (date) mandatory
      • drools:lastContributor (string) = ''
      • drools:creator (string)
      • drools:type (string)
      • drools:source (string)
      • drools:subject (string)
      • drools:relation (string)
      • drools:rights (string)
      • drools:coverage (string)
      • drools:publisher (string)
      • drools:description (string) mandatory
      • drools:format (string) mandatory
      • drools:versionNumber (long)
      • drools:createdDate (date)
      • drools:checkinComment (string)
      • drools:stateReference (reference) copy < 'drools:stateNodeType'

      To present nodes such as these as file resources, the WebDAV service needs the ability to specify for each of these node types which property contains the file's content, which contain the date, etc. Ideally, these specifications would be entirely declarative (in the web.xml or similar configuration files) and not require custom code.

      Attachments

        Issue Links

          Activity

            People

              bcarothers_jira Brian Carothers (Inactive)
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: