This is the abstract base class for all property descriptors. It mainly serves afor factorizing all commons properties for property descriptors.
A property descriptor is used for describing a component/entity/interface property (Java Beans semantic).
You will never use BasicPropertyDescriptor as such but rather
use its concrete descendants.
Please note that BasicPropertyDescriptor enforces its name to
start with a lower case letter, following the JavaBean convention. So even if
you name it "MyProperty", it will actually end up to
"myProperty".
Table II.7. BasicPropertyDescriptor properties
| Property | Description |
|---|---|
computed
| Forces a property to be considered as a computed property by the framework. A computed property will be completely ignored by the persistence layer and its management is left to the developer.
Properties declared with a delegate computing class are considered computed
by default so there is no need to explicitely set them
Default value is |
delegateClassName
| Instructs the framework that this property is computed by a delegate
attached to the owning component. The Delegate instances are stateful. This allows for some caching of computing intensive properties. There is exactly one delegate of a certain class per owning component instance. Delegate instances are lazily created when needed, i.e. whe the computed property is accessed either programmatically or by the binding layer.
The delegate class must implement the
A delegate-computed property is most of the time read-only but it can be
made writable by setting the property descriptor
|
delegateWritable
| Instructs the framework that a delegate-computed property is writable. Most
of the time, a computed property is read-only. Whenever a computed property
is made writable through the use of
Defult value is |
grantedRoles
| Assigns the roles that are authorized to manipulate the property backed by
this descriptor. It supports "!" prefix to negate the
role(s). This will directly influence the UI behaviour and even composition
(e.g. show/hide columns or fields). Setting the collection of granted roles
to |
integrityProcessorBeanNames
| Registers a list of property processor instances that will be triggered on the different phases of the property modification, i.e. :
This property must be set with Spring bean names (i.e. Spring ids). When
needed, Jspresso will query the Spring application context to retrieve the
processor instances. This property is equivalent to setting
Property processor instances must implement the
Whenever the underlying property is a collection property, the interface to
implement is
|
integrityProcessorClassNames
| Much the same as
When needed, Jspresso will create lifecycle interceptor instances. |
mandatory
| Declare a property as mandatory. This will enforce mandatory checks when the owning component is persisted as well as when the property is updated individually. Moreover, this information allows the views bound to the property to be configured accordingly, e.g. display the property with a slightly modified label indicating it is mandatory. This constraint is also enforced programmatically. Default value is false. |
name
| Enforces its name to start with a lower case letter, following the JavaBean convention. So even if you name it "MyProperty", it will actually end up to "myProperty". {@inheritDoc} |
permId
| A property permanent id is forced to be its name. Trying to set it to another value will raise an exception. {@inheritDoc} |
preferredWidth
| This property allows for setting an indication of width for representing this property in a view.
Default value is |
readOnly
| Enforces a property to be read-only. This is only enforced at the UI level, i.e. the property can still be updated programmatically. The UI may take decisions like changing textfields into labels if it knows the underlying property is read-only. |
sortable
| Enforces a property sortability. This is only enforced at the UI level, i.e. the property can still be used for sorting programmatically. |
sqlName
| Instructs Jspresso to use this name when translating this property name to the data store namespace. This includes , but is not limited to, database column names.
Default value is |
unicityScope
| Makes this property part of a unicity scope. All tuples of properties belonging to the same unicity scope are enforced to be unique in the component type scope. This concretely translates to unique constraints in the datastore spanning the properties composing the unicity scope. Note that, for performance reasons, unicity scopes are only enforced by the persistence layer. |
versionControl
| This property allows to fine tune wether this component property participates in optimistic versioning. It mainly allows to declare some properties that should be ignored regarding optimistic versioning thus lowering the risk of version conflicts between concurrent users. Of course, this feature has to be used with care since it may generate phantom updates to the data store.
Default value is |
writabilityGates
| Assigns a collection of gates to determine property writability. A property will be considered writable if and only if all gates are open. This mecanism is mainly used for dynamic UI authorization based on model state, e.g. a validated invoice should not be editable anymore. Descriptor assigned gates will be cloned for each property instance created and backed by this descriptor. So basically, each property instance will have its own, unshared collection of writability gates. Jspresso provides a useful set of gate types, like the binary property gate that open/close based on the value of a boolean property of owning component. By default, property descriptors are not assigned any gates collection, i.e. there is no writability restriction. Note that gates do not enforce programatic writability of a property; only UI is impacted. |
This is the abstract base descriptor for all relationship properties. relationship properties include :
reference properties, i.e. "N to 1" or "1 to 1" properties
collection properties, i.e. "1 to N" or "N to N" properties
Other type of properties are named scalar properties.
Table II.8. BasicRelationshipEndPropertyDescriptor properties
| Property | Description |
|---|---|
composition
| Instructs the framework that this property has to be treated as a composition, in the UML terminology. This implies that reachable entities that are referenced by this property follow the owning entity lifecycle. For instance, when the owning entity is deleted, the referenced entities in composition properties are also deleted. Whenever this property is not explicitely set by the developer, Jspresso uses sensible defaults :
This property is strictly behavioural and does not impact the domain state itself. |
fkName
| Gives the developer the oportunity to customize the geneated foreign key (if any) name. |
name
| Assign reverse temp relation end if set. {@inheritDoc} |
reverseRelationEnd | Allows to make a relationship bi-directional. By default, when a
relationdhip end is defined, it is only navigable from the owning component
to the described end (default value is
Setting the reverse relation end operation is commmutative so that it automatically assigns bot ends as reverse, i.e. you only have to set the property on one side of the relationship. |
This descriptor is used to describe collection properties that are used either as "1-N" or "N-N" "N" relationship end.
Table II.9. BasicCollectionPropertyDescriptor properties
| Property | Description |
|---|---|
manyToMany
| Forces the collection property to be considered as a many to many
("N-N") end. When a relationship is bi-directional, setting both
ends as being collection properties turns
Default value is |
orderingProperties
| Ordering properties are used to sort this collection property if and only
if it is un-indexed (not a
Ordering properties are considered following their order in the map
iterator. A |
referencedDescriptor
| Qualifies the type of collection this property refers to. As of now, Jspresso supports :
|
Full name : org.jspresso.framework.model.descriptor.basic.BasicReferencePropertyDescriptor
Super-type : BasicRelationshipEndPropertyDescriptor
Sub-types :
Default implementation of a reference descriptor.
Table II.10. BasicReferencePropertyDescriptor properties
| Property | Description |
|---|---|
fetchType | This property allows to finely tune fetching strategy of the ORM on this
relationship end. This is either a value of the
Default value is |
initializationMapping
| This property allows to pre-initialize UI filters that are based on this reference property. This includes :
The initialization mapping property is a Values in this map can be either :
|
oneToOne
| Forces the reference property to be considered as a one to one
("1-1") end. When a relationship is bi-directional, setting both
ends as being reference properties turns
Default value is |
pageSize
| This property allows for defining the page size of "lists of
values" that are built by the UI for this reference property. Whenever
the |
queryableProperties
| This property allows to define which of the component properties are to be
used in the list of value filter that are based on this component family.
Since this is a
Whenever this this property is |
referencedDescriptor
| Qualifies the type of element this property refers to. It may point to any type of component descriptor, i.e. entity, interface or component descriptor. |
renderedProperties
| This property allows to define which of the component properties are to be
rendered by default when displaying a list of value on this component
family. For instance, a table will render 1 column per rendered property of
the component. Any type of property can be used except collection
properties. Since this is a
Whenever this property is |
Full name : org.jspresso.framework.model.descriptor.basic.BasicCollectionDescriptor
Super-type : DefaultDescriptor
Sub-types : BasicListDescriptor, BasicSetDescriptor
This descriptor is used to describe a collection of components (entities, interfaces or components). This descriptor is mainly used to qualify the collection referenced by a collection property descriptor. As of now, Jspresso supports :
collections with Set semantic: do not allow for duplicates
and do not preserve the order of the elements in the datastore
collections with List semantic: allows for duplicates and
preserves the order of the elements in the datastore through an implicit
index column
Table II.11. BasicCollectionDescriptor properties
| Property | Description |
|---|---|
collectionInterface
| Allows to choose between the supported collection semantics. The incoming class property value must be one of :
Any other value is not supported and make the descriptor fall back to its
default. A |
elementDescriptor
| Describes the elements contained in this collection. It can be any of entity, interface or component descriptor. |
orderingProperties
| Ordering properties are used to sort this collection if and only if it is
un-indexed (not a
Ordering properties are considered following their order in the map
iterator. A |
Full name : org.jspresso.framework.model.descriptor.basic.BasicListDescriptor
Super-type : BasicCollectionDescriptor
This descriptor is equivalent to a BasicCollectionDescriptor
with its collectionInterface property set to
java.util.List. Using this descriptor prevents mesing up with
technical implementation details.
Table II.12. BasicListDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Full name : org.jspresso.framework.model.descriptor.basic.BasicSetDescriptor
Super-type : BasicCollectionDescriptor
This descriptor is equivalent to a BasicCollectionDescriptor
with its collectionInterface property set to
java.util.Set. Using this descriptor prevents mesing up with
technical implementation details.
Table II.13. BasicSetDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Full name : org.jspresso.framework.model.descriptor.basic.BasicScalarPropertyDescriptor
Super-type : BasicPropertyDescriptor
Sub-types : AbstractEnumerationPropertyDescriptor, BasicBinaryPropertyDescriptor, BasicBooleanPropertyDescriptor, BasicColorPropertyDescriptor, BasicDatePropertyDescriptor, BasicDurationPropertyDescriptor, BasicNumberPropertyDescriptor, BasicStringPropertyDescriptor, BasicTimePropertyDescriptor
This is the root abstract descriptor for all property descriptors that are not relationship end properties. This includes, for instance, strings, numbers, dates, binary content, and so on.
Table II.14. BasicScalarPropertyDescriptor properties
| Property | Description |
|---|---|
defaultValue
| Sets the property default value. When a component owning this property is
instanciated, its properties are initialized using their default values. By
default, a property default value is
This incoming value can be either the actual property default value (as an
|
Abstract base descriptor for properties whose values are enumerated strings. An example of such a property is gender whose value can be M (for "Male") or F (for "Female"). Actual property values can be codes that are translated for inclusion in the UI. Such properties are usually rendered as combo-boxes.
Table II.15. AbstractEnumerationPropertyDescriptor properties
| Property | Description |
|---|---|
enumerationName
| This property allows to customize the i18n keys used to translate the enumeration values, thus keeping the actual values shorter. For instance consider the gender enumeration, composed of the M (for "Male") and F (for "Female") values. Setting an enumeration name to "GENDER" will instruct Jspresso to look for translations named "GENDER_M" and "GENDER_F". This would allow for using M and F in other enumeration domains with different semantics and translations. |
maxLength
| Sets the maxLength. |
Describes an enumerated property containing arbitrary values.
Table II.16. BasicEnumerationPropertyDescriptor properties
| Property | Description |
|---|---|
values
| Defines the list of values this enumeration contains. Enumeration values are translated in the UI using the following scheme : [enumerationName]_[value]. |
valuesAndIconImageUrls
| Defines the list of values as well as an icon image URL per value this
enumeration contains. The incoming Enumeration values are translated in the UI using the following scheme : [enumerationName]_[value]. |
This is a special enumeration descriptor that allows to build the enumeration out of a list of component descriptors. Enumeration values and icons are the names and icons of the registered component descriptors. For instance, this can be useful in the UI if you want to visually indicate the actual type of a element contained in a polymorphic collection.
Table II.17. TypeEnumerationPropertyDescriptor properties
| Property | Description |
|---|---|
componentDescriptors
| Registers the list of component descriptors to build the enumeration values/icons from their names and icons. |
This is a special enumeration descriptor that allows to build the enumeration values out of a list of integer values. Obviously, no icon is provided for a given value.
Table II.18. RangeEnumerationPropertyDescriptor properties
| Property | Description |
|---|---|
maxValue
| The enumeration maximum bound. Default value is 10. |
minValue
| The enumeration minimum bound. Default value is 0. |
rangeStep
| The step to use for constructing the enumeration values, starting from
|
Describes a property used to store a binary value in the form of a byte array.
Table II.19. BasicBinaryPropertyDescriptor properties
| Property | Description |
|---|---|
contentType
| Configures the default content type to use when downloading the property content as a file. |
fileFilter
| This property allows to configure the file filter that has to be displayed whenever a file system operation is initiated from the UI to operate on this property. This includes :
Jspresso provides built-in actions that do the above and configure their UI
automatically based on the
The incoming
|
fileName
| Configures the default file name to use when downloading the property content as a file. |
maxLength
| Sets the max size (in bytes) of the property value. |
Describes a property used to store an image binary value. This type of descriptor instructs Jspresso to use an image component to interact with this type of property.
Table II.20. BasicImageBinaryPropertyDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Describes a property used to store any java Serializable object.
The property value is serialized/de-serialized to/from the datastore. The
operation is completely transparent to the developer, i.e. the developer
never plays with the serialized form.
Table II.21. BasicJavaSerializablePropertyDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Describes a boolean property.
Table II.22. BasicBooleanPropertyDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Describes a property used for storing a color. Color values are stored in the
property as their string hexadecimal representation (0xargb encoded).
Jspresso cleanly handles color properties in views for both visually
displaying and editing them without any extra effort. Moreover the
ColorHelper helper class eases colors manipulation and helps
converting to/from their hexadecimal representation.
Table II.23. BasicColorPropertyDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Describes a date based property. Wether the date property should include time information or not, can be configured using the type property.
Table II.24. BasicDatePropertyDescriptor properties
| Property | Description |
|---|---|
secondsAware
| Should this time information include seconds. |
timeZoneAware
| Sets wether this date property should have its string representation vary depending on the client timezone.
Default value is |
type | Sets wether this property should contain time information or not. The
incoming value must be part of the
Default value is |
Describes a property used to store a duration value. Duration is stored in the form of a number of milliseconds. duration properties are cleanly handled by Jspresso UI layer for both displaying / editing duration properties in a convenient human format.
Table II.25. BasicDurationPropertyDescriptor properties
| Property | Description |
|---|---|
maxMillis
| Configures the maximum duration value this property accepts in
milliseconds. Default value is |
This is the abstract base descriptor of all numeric based properties.
Table II.26. BasicNumberPropertyDescriptor properties
| Property | Description |
|---|---|
maxValue
| Configures the upper bound of the allowed values. Default value is
|
minValue
| Configures the lower bound of the allowed values. Default value is
|
Full name : org.jspresso.framework.model.descriptor.basic.BasicDecimalPropertyDescriptor
Super-type : BasicNumberPropertyDescriptor
Sub-types : BasicPercentPropertyDescriptor
Describes a decimal property. Property value is either stored as a
Double or as a BigDecimal depending on the
usingBigDecimal property.
Table II.27. BasicDecimalPropertyDescriptor properties
| Property | Description |
|---|---|
maxFractionDigit
| Configures the precision of the decimal property. Default value is
|
usingBigDecimal
| Configures the property to be managed using
|
This is a specialization of decimal descriptor to handle percentage values. The impact of using this descriptor is only on the UI level that will be configured accordingly, i.e. displaying/editing properties as percentage instead of their raw decimal values.
Table II.28. BasicPercentPropertyDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Describes an integer property. The property is either represented as an
Integer or a Long depending on the
usingLong property.
Table II.29. BasicIntegerPropertyDescriptor properties
| Property | Description |
|---|---|
usingLong
| Configures the property to be managed using |
Describes a string based property.
Table II.30. BasicStringPropertyDescriptor properties
| Property | Description |
|---|---|
maxLength
| Configures the maximum string length this property allows. Default value is
|
regexpPattern
| Configures the regular expression pattern this string property allows.
Default is |
regexpPatternSample
| Allows for providing a conforming sample for the regular expression pattern. This human-readable example is used when the end-user has to be notified that the incoming property value does not match the pattern constraint. |
upperCase
| This is a shortcut to implement the common use-case of handling upper-case only properties. all incoming values will be transformed to uppercase as if a property processor was registered to perform the transformation. |
Describes an image URL property. This type of descriptor instructs Jspresso to use an image component to interact with this type of property.
Table II.31. BasicImageUrlPropertyDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Describes a property used for password values. For obvious security reasons, this type of properties will hardly be part of a persistent entity. However it is useful for defining transient view models, e.g. for implementing a change password action. Jspresso will automatically adapt view fields accordingly, using password fields, to interact with password properties.
Table II.32. BasicPasswordPropertyDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Describes a multi-line text property. This type of descriptor instructs Jspresso to use a multi-line text component to interact with this type of property.
Table II.33. BasicTextPropertyDescriptor properties
| Property | Description |
|---|---|
contentType
| Configures the default content type to use when downloading the property content as a file. |
fileFilter
| This property allows to configure the file filter that has to be displayed whenever a file system operation is initiated from the UI to operate on this property. This includes :
Jspresso provides built-in actions that do the above and configure their UI
automatically based on the
The incoming
|
fileName
| Configures the default file name to use when downloading the property content as a file. |
Describes a property as handing HTML content. This instructs Jspresso to display the property value as HTML instead of raw text content.
Table II.34. BasicHtmlPropertyDescriptor properties
| Property | Description |
|---|---|
| This class does not have any specific property. | |
Describes a property as handing sourcecode content. This instructs Jspresso
to display the property value as sourcecode, using syntax coloring for
instance, instead of displaying unformatted raw content. The language used to
format the property text content may be defined explicitely using the
language property.
Table II.35. BasicSourceCodePropertyDescriptor properties
| Property | Description |
|---|---|
language
| Explicitely sets the language this sourcecode property should contain. This is only a hint fo Jspresso to configure the UI components accordingly to interact with this property. |