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

ModeShape 3 JSON configuration files should support using system properties

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 3.0.0.Alpha1
    • 3.0.0.Alpha1
    • JCR
    • None

    Description

      ModeShape 3 configuration files are JSON files, and ModeShape defines a JSON Schema for them. The configuration files need to allow system properties to be specified in the same format as in 2.x (see MODE-1098), namely using "${propertyName}" within a value. Multiple properties can be named within the variable, as can a default. Here's an example of a variable with two property names and a default:

      ${propertyName1,propertyName2:defaultValue}
      

      Specifically, the grammar for variables is as follows:

      variable := '${' variableNames [ ':' defaultValue ] '}'
      variableNames := variableName [ ',' variableNames ]
      variableName := /* any characters except ',' and ':' and '}'
      defaultValue := /* any characters except '}'
      

      Unfortunately, the nature of JSON and JSON Schema make this harder than it appears. JSON allows numbers and boolean values to not be quoted, so using a property in place of such values requires using a string value, and the string value may not be compatible with the allowed JSON Schema type for that field.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: