[jboss-jira] [JBoss JIRA] Resolved: (JBAS-6234) ManagedProperty contains certain metadata that is not contained in MetaType

Scott M Stark (JIRA) jira-events at lists.jboss.org
Tue Nov 25 11:05:46 EST 2008


     [ https://jira.jboss.org/jira/browse/JBAS-6234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott M Stark resolved JBAS-6234.
---------------------------------

    Fix Version/s: JBossAS-5.0.0.GA
       Resolution: Done


Exposing all of this information on the type is overkill and not likely to be useful as the type itself does not have meaningful constraints. The temperature at which water is liquid is constrained, temperature itself not so much.

If one wants a constrainable composite value on a property, its expected that the value will be a GenericValue that is a ManagedObject.

The constraints signatures have been updated to:

   /**
    * Get the minimum value
    * 
    * @return the minimum value, a MetaValue implementing Comparable
    */
   Comparable<? extends MetaValue> getMinimumValue();

   /**
    * Get the maximum value
    * 
    * @return the maximum value, a MetaValue implementing Comparable
    */
   Comparable<? extends MetaValue> getMaximumValue();
   /**
    * Check whether this is a valid value
    * 
    * @param value the value
    * @return null for a valid value, an error message otherwise
    */
   String checkValidValue(MetaValue value);


> ManagedProperty contains certain metadata that is not contained in MetaType
> ---------------------------------------------------------------------------
>
>                 Key: JBAS-6234
>                 URL: https://jira.jboss.org/jira/browse/JBAS-6234
>             Project: JBoss Application Server
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>          Components: ProfileService
>            Reporter: Ian Springer
>            Assignee: Scott M Stark
>            Priority: Critical
>             Fix For: JBossAS-5.0.0.GA
>
>
> The following metadata-related methods are present in the ManagedProperty, but not in MetaType:
> getLegalValues()
> getMinimumValue()
> getMaximumValue()
> checkValidValue(Serializable value)
> isMandatory()
> This means that the associated metadata is available for top-level ManagedProperty's, but not for nested MetaValues within a ManagedProperty.
> For example, if I have a ManagedProperty "foo" whose value is a CompositeValue which contains a set of MetaValues, it is not possible for the developer to define legal values, min/max values, or mandatory for the MetaValues that are items within that CompositeValue.
> This may just be an acceptable limitation of the API, but I'm setting this to critical since it's API-related, so Scott can evaluate.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list