[jbosstools-issues] [JBoss JIRA] (JBIDE-11574) The ModeShape Tools JCR CND Editor Should Have A Property Definition Value Constraint Editor

Dan Florian (JIRA) jira-events at lists.jboss.org
Wed Apr 18 14:27:18 EDT 2012


Dan Florian created JBIDE-11574:
-----------------------------------

             Summary: The ModeShape Tools JCR CND Editor Should Have A Property Definition Value Constraint Editor
                 Key: JBIDE-11574
                 URL: https://issues.jboss.org/browse/JBIDE-11574
             Project: Tools (JBoss Tools)
          Issue Type: Feature Request
          Components: modeshape
    Affects Versions: 3.3.0.Beta3
            Reporter: Dan Florian
            Assignee: Dan Florian
             Fix For: 3.4.x


Currently the CND Editor allows any string as a value constraint. However, value constraints have a certain syntax based on the property type. Making it easier for a user to enter/edit value constraints would be a very nice thing to have. Therefore, when adding or editing value constraints the CND editor should display the appropriate controls to facilitate entering a value constraint for the selected property type.

Below are the general rules for each property type. See JCR specification for additional rules and guidelines.

Value Constraint Rules/Syntax:

Strings, URI - must be a regular expression pattern in accordance to the java.util.regex.Pattern syntax.
Name, Reference, Weak Reference - must be a JCR Name (Qualified Name)
Boolean - only allow one constraint of either "true" or "false" (though most do not support constraints on boolean)
Path - must be an absolute or relative path that optionally has a last segment of "*"
Numerics, Date, Binary - must use the JCR range syntax of '[min,max]', '(min,max)', '(min,max]', or '[min,max)'. The "min" or the "max" may be empty indicating there is no restriction in that direction.

A single constraint with a single value can be used to indicate the the property value is a constant. Or multiple constraints each with a single value indicates the property value must be one of those enumerated values.

CndValidator should be changed to validate the value constraints based on the type of the property and the value constraint syntax/rules. If value constraints exist for a property, then the CndValidator should also make sure default values meet at least one of those value constraints.

For Date properties, maybe the value constraint editor could enforce the ISO 8601:2000 format of sYYYY-MM-DDThh:mm:sssTZD.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list