Domain model

Components and entities

Overview

Component descriptors diagram

Reference

DefaultDescriptor

DefaultDescriptor

This is a utility class from which most named descriptors inherit for factorization purpose. It provides translatable name and description.

DefaultDescriptor properties
Property Description

description

String

Sets the description of this descriptor. Most of the descriptor descriptions are used in conjunction with the Jspresso i18n layer so that the description property set here is actually an i18n key used for translation. Description is mainly used for UI (in toolTips for instance) but may also be used for project technical documentation, contextual help, and so on.

i18nNameKey

String

Sets the I18N key used for translation if it differs from the name itself.

name

String

Sets the name of this descriptor. Most of the descriptor names are used in conjunction with the Jspresso i18n layer so that the name property set here is actually an i18n key used for translation. The descriptor name property semantic may vary depending on the actual descriptor type. For instance, a property descriptor name is the name of the property and a component descriptor name is the fully qualified name of the underlying class.


DefaultIconDescriptor

This is a utility class from which most displayable descriptors inherit for factorization purpose. It provides an icon image URL.

DefaultIconDescriptor properties
Property Description

icon

Icon

Sets the icon.

iconImageURL

String

Sets the icon image URL of this descriptor. Supported URL protocols include :

  • all JVM supported protocols
  • the jar:/ pseudo URL protocol
  • the classpath:/ pseudo URL protocol

iconPreferredHeight

int

Sets the icon preferred height.

iconPreferredWidth

int

Sets the icon preferred width.


AbstractComponentDescriptor

AbstractComponentDescriptor

This is the abstract base descriptor for all component-like part of the domain model. All the properties included in this base descriptor can of course be used in concrete sub-types.

These sub-types include :

  • BasicEntityDescriptor for defining a persistent entity
  • BasicInterfaceDescriptor for defining a common interface that will be implemented by other entities, components or even sub-interfaces.
  • BasicComponentDescriptor for defining reusable structures that can be inline in an entity. It also allows to describe an arbitrary POJO and make use of it in Jspresso UIs.

AbstractComponentDescriptor properties
Property Description

ancestorDescriptors

List​<​IComponent​Descriptor​>​

Registers this descriptor with a collection of ancestors. It directly translates the components inheritance hierarchy since the component property descriptors are the union of the declared property descriptors of the component and of its ancestors one. A component may have multiple ancestors which means that complex multiple-inheritance hierarchy can be mapped.

autoCompleteProperty

String

Allows to customize the property used to autocomplete reference fields on this component.

Whenever this property is null, the following rule apply to determine the lovProperty :

  1. the toString property if not a computed one
  2. the first string property from the rendered property
  3. the first rendered property if no string property is found among them
Note that this property is not inherited by children descriptors, i.e. even if an ancestor defines an explicit lovProperty, its children ignore this setting.

autoQueryEnabled

Boolean

Whenever this component type is presented as a filter, this property gives the capability to enable / disable auto-search when typing the filter fields.

componentTranslationsDescriptorTemplate

Basic​Collection​Property​Descriptor​<​IComponent​>​

Sets component translations descriptor template.

grantedRoles

Collection​<​String​>​

Assigns the roles that are authorized to manipulate components backed by this descriptor. It supports "!" prefix to negate the role(s). This will directly influence the UI behaviour and even composition. Setting the collection of granted roles to null (default value) disables role based authorization on this component level. Note that this authorization enforcement does not prevent programmatic access that is of the developer responsibility.

lifecycleInterceptorBeanNames

List​<​String​>​

Registers a list of lifecycle interceptor instances that will be triggered on the different phases of the component lifecycle, i.e. :

  • when the component is instantiated in memory
  • when the component is created in the data store
  • when the component is updated in the data store
  • when the component is loaded from the data store
  • when the component is deleted from the data store
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 interceptors instances. This property is equivalent to setting lifecycleInterceptorClassNames except that it allows to register interceptor instances that are configured externally in the Spring context. lifecycle interceptor instances must implement the ILifecycleInterceptor<E> interface where <E> is a type assignable from the component type.

lifecycleInterceptorClassNames

List​<​String​>​

Much the same as lifecycleInterceptorBeanNames except that instead of providing a list of Spring bean names, you provide a list of fully qualified class names. These classes must :

  • provide a default constructor
  • implement the IPropertyProcessor<E, F> interface.
When needed, Jspresso will create the property processor instances.

orderingProperties

Map​<​String​,ESort​>​

Ordering properties are used to sort un-indexed collections of instances of components backed by this descriptor. This sort order can be overridden on the finer collection property level to change the way a specific collection is sorted. This property consist of a Map whose entries are composed with :

  • the property name as key
  • the sort order for this property as value. This is either a value of the ESort enum (ASCENDING or DESCENDING) or its equivalent string representation.
Ordering properties are considered following their order in the map iterator. A null value (default) will not give any indication for the collection sort order.

pageSize

Integer

Whenever a collection of this component type is presented in a pageable UI, this property gives the size (number of component instances) of one page. This size can usually be refined at a lower level (e.g. at reference property descriptor for "lists of values"). A null value (default) disables paging for this component.

permId

String

A component permanent id is forced to be its fully-qualified class name. Trying to set it to another value will raise an exception.

{@inheritDoc}

propertyDescriptors

Collection​<​IProperty​Descriptor​>​

This property allows to describe the properties of the components backed by this descriptor. Like in classic OO programming, the actual set of properties available to a component is the union of its properties and of its ancestors' ones. Jspresso also allows you to refine a property descriptor in a child component descriptor exactly as you would do it in a subclass. In that case, the attributes of the property defined in the child descriptor prevails over the definition of its ancestors. Naturally, properties are keyed by their names.

queryableProperties

List​<​String​>​

This property allows to define which of the component properties are to be used in the filter UIs that are based on this component family (a QBE screen for instance). Since this is a List queryable properties are rendered in the same order.

Whenever this this property is null (default value), Jspresso chooses the default set of queryable properties based on their type. For instance, collection properties and binary properties are not used but string, numeric, reference, ... properties are. A computed property cannot be used since it has no data store existence and thus cannot be queried upon.

Note that this property is not inherited by children descriptors, i.e. even if an ancestor defines an explicit set of queryable properties, its children ignore this setting.

renderedProperties

List​<​String​>​

This property allows to define which of the component properties are to be rendered by default when displaying a UI based 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 List queryable properties are rendered in the same order.

Whenever this property is null (default value) Jspresso determines the default set of properties to render based on their types, e.g. ignores collection properties.

Note that this property is not inherited by children descriptors, i.e. even if an ancestor defines an explicit set of rendered properties, its children ignore this setting.

serviceDelegateBeanNames

Map​<​String​,String​>​

Registers the collection of service delegate instances attached to this component. These delegate instances will automatically be triggered whenever a method of the service interface it implements get executed. For instance :

  • the component interface is MyBeanClass. It implements the service interface MyService.
  • the service interface MyService contains method int foo(String).
  • the service delegate class, e.g. MyServiceImpl must implement the method int foo(MyBeanClass,String). Note that the parameter list is augmented with the owing component type as 1st parameter. This allows to have stateless implementation for delegates, thus sharing instances of delegates among instances of components.
  • when foo(String) is executed on an instance of MyBeanClass, the framework will trigger the delegate implementation, passing the instance of the component itself as parameter.
This property must be set with a map keyed by service interfaces and valued by Spring bean names (i.e. Spring ids). Each bean name corresponds to an instance of service delegate. When needed, Jspresso will query the Spring application context to retrieve the delegate instances. This property is equivalent to setting serviceDelegateClassNames except that it allows to register delegate instances that are configured externally in the Spring context. lifecycle interceptor instances must implement the IComponentService marker interface.

serviceDelegateClassNames

Map​<​String​,String​>​

Much the same as serviceDelegateBeanNames except that instead of providing a map valued with Spring bean names, you provide a map valued with fully qualified class names. These class must :

  • provide a default constructor
  • implement the IComponentService marker interface.
When needed, Jspresso will create service delegate instances.

sqlName

String

Instructs Jspresso to use this name when translating this component type name to the data store namespace. This includes , but is not limited to, database table names.

Default value is null so that Jspresso uses its default naming policy.

toHtmlProperty

String

Allows to customize the HTML representation of a component instance. The property name assigned will be used when displaying the component instance as HTML. It may be a computed property that composes several other properties in a human friendly format.

Whenever this property is null, the toStringProperty is used. Note that this property is not inherited by children descriptors, i.e. even if an ancestor defines an explicit toHtmlProperty property, its children ignore this setting.

toStringProperty

String

Allows to customize the string representation of a component instance. The property name assigned will be used when displaying the component instance as a string. It may be a computed property that composes several other properties in a human friendly format.

Whenever this property is null, the following rule apply to determine the toString property :

  1. the first string property from the rendered property
  2. the first rendered property if no string property is found among them
Note that this property is not inherited by children descriptors, i.e. even if an ancestor defines an explicit toString property, its children ignore this setting.

unclonedProperties

Collection​<​String​>​

Configures the properties that must not be cloned when this component is duplicated. For instance, tracing information like a created timestamp should not be cloned; a SSN neither. For a given component, the uncloned properties are the ones it defines augmented by the ones its ancestors define. There is no mean to make a component property cloneable if one of the ancestor declares it un-cloneable.

writabilityGates

Collection​<​IGate​>​

Assigns a collection of gates to determine component writability. A component will be considered writable if and only if all gates are open. This mechanism 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 component instance created and backed by this descriptor. So basically, each component 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, component descriptors are not assigned any gates collection, i.e. there is no writability restriction. Note that gates do not enforce programmatic writability of a component; only UI is impacted.


BasicComponentDescriptor

This type of descriptor is used to describe :

  • structures that are to be reused but don't have enough focus for being considered as entities. For instance MoneyAmount component could be composed of a decimal and a reference to a Money entity. This structure could then be reused in other elements of the domain like an Invoice or an Article. Jspresso terminology for these type of structures is "Inline Component".
  • arbitrary models, that even come from outside of Jspresso (an external library for instance). Describing an arbitrary component allows for seamless usage in the Jspresso view binding architecture. Note that in that case, all behavioural properties like lifecycle interceptors or service delegates are ignored since none of the model behaviour is handled by Jspresso.
Both types of components described above must conform to the Java Beans standard so that its property changes can be followed by the classic add/removePropertyChangeListener methods since Jspresso binding architecture leverages this behaviour. Jspresso managed components implement it automatically but the developer must ensure it for other types of components.

BasicComponentDescriptor properties
Property Description

ancestorDescriptors

List​<​IComponent​Descriptor​>​

{@inheritDoc}


BasicEntityDescriptor

This descriptor key to the description of the application model. It is used to describe a model entity. A Jspresso managed entity has a synthetic identifier (id) and is versioned (version) to cope with concurrent access conflicts through optimistic locking. It conforms to the Java Beans standard so that its property changes can be followed by the classic add/removePropertyChangeListener methods; Jspresso binding architecture leverages this behaviour.

BasicEntityDescriptor properties
Property Description

ancestorDescriptors

List​<​IComponent​Descriptor​>​

{@inheritDoc}

purelyAbstract

boolean

This property is used to indicate that the entity type described is to be considered abstract. Jspresso will prevent any instantiation through its generic actions or internal mechanisms. Trying to do so will result in a low level exception and reveals a coding (assembling) error.

However, an abstract entity will have a concrete representation in the data store that depends on the inheritance mapping strategy used. As of now, Jspresso uses the join-subclass inheritance mapping strategy when generating the Hibernate mapping so an abstract entity will end up as a table in the data store.

An abstract entity descriptor differs from an interface descriptor mainly because of its concrete representation in the data store as formerly described.

rootEntityDescriptor

IComponent​Descriptor​<​IEntity​>​

Configures the root entity descriptor to use globally for the application. Jspresso will ensure that all entity descriptors have this root descriptor as ancestor.


BasicInterfaceDescriptor

This descriptor is a mean of factorizing state/behaviour among components, entities or even sub-interfaces. This is a much less coupling mechanism than actual entity inheritance and can be used across entities that don't belong the the same inheritance hierarchy, or even across types (entities, components, interfaces).

Please note that interface descriptor is not a way for domain elements to implement arbitrary interfaces coming from external libraries unless they only contain property accessors. The latter can be achieved using service delegates and the serviceDelegates[Bean|Class]Names property.

BasicInterfaceDescriptor properties
Property Description
This class does not have any specific property.

Properties

Overview

Relationship property descriptors
diagram

Scalar property descriptors
diagram

Reference

BasicPropertyDescriptor

BasicPropertyDescriptor

This is the abstract base class for all property descriptors. It mainly serves for 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".

BasicPropertyDescriptor properties
Property Description

alternativeSortProperty

String

Allows to configure an alternative property used to sort this one.

cacheable

boolean

Configures the fact that this property can be cached. This is only used for computed properties. Note that the cached value will be reset whenever a firePropertyChange regarding this property is detected to be fired.

Default value is false in order to prevent un-desired side-effects if computed property change notification is not correctly wired.

computed

boolean

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 explicitly set them computed=true. However, there is sometimes a need to declare a property at some level (e.g. in an interface descriptor) and let lower level implementation decide how to handle this common property concretely (either computing it or handling it as a real persistent property). In that case, you can declare this property computed=true in the super type and refine the actual implementation (computed or not) in the sub-types.

Default value is false.

delegateClassName

String

Instructs the framework that this property is computed by a delegate attached to the owning component. The delegateClassName property must be set with the fully qualified class name of the delegate instance to use.

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 IComponentExtension<T> interface (where <T> is assignable from the owning component class) and provide a public constructor taking exactly 1 parameter : the component instance. Jspresso provides an adapter class to inherit from : AbstractComponentExtension<T>. This helper class provides the methods to access the enclosing component from the delegate implementation as well as the Spring context it comes from, when needed.

A delegate-computed property is most of the time read-only but it can be made writable by setting the property descriptor delegateWritable=true. In that case the delegate class must also provide a setter for the computed property.

delegateWritable

boolean

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 delegateWritable=true, the delegate class must also provide a setter for the computed property.

Default value is false.

filterComparable

Boolean

Sets filter comparable.

filterOnly

boolean

Configures whether this property is only used in filters, i.e. it is not persistent and only serves for storing criteria data that can be further leveraged by criteria refiners. Using filterOnly properties relieves the developer from having to declare fake computed properties. see {@link this request for enhancement}

grantedRoles

Collection​<​String​>​

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 null (default value) disables role based authorization on this property level. Note that this authorization enforcement does not prevent programmatic access that is of the developer responsibility.

integrityProcessorBeanNames

List​<​String​>​

Registers a list of property processor instances that will be triggered on the different phases of the property modification, i.e. :

  • before the property is modified, usually for controlling the incoming value
  • while (actually just before the actual assignment) the property is modified, allowing to intercept and change the incoming value
  • after the property is modified, allowing to trigger some post-modification behaviour (e.g. tracing, domain integrity management, ...)
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 integrityProcessorClassNames except that it allows to register processor instances that are configured externally in the Spring context.

Property processor instances must implement the IPropertyProcessor<E, F> interface where <E, F> represent respectively the type of the owning component and the type of the property. Since there are 3 methods to implement in the interface (1 for each of the phase described above), Jspresso provides an adapter class with empty implementations to override : EmptyPropertyProcessor<E, F>.

Whenever the underlying property is a collection property, the interface to implement is ICollectionPropertyProcessor<E, F> (or extend EmptyCollectionPropertyProcessor<E, F>) with 4 new phases introduced :

  • before an element is added to the collection property
  • after an element is added to the collection property
  • before an element is removed from the collection property
  • after an element is removed from the collection property

integrityProcessorClassNames

List​<​String​>​

Much the same as integrityProcessorBeanNames except that instead of providing a list of Spring bean names, you provide a list of fully qualified class names. These classes must :

  • provide a default constructor
  • implement the ILifecycleInterceptor<E> interface.
When needed, Jspresso will create lifecycle interceptor instances.

mandatory

boolean

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

String

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

String

A property permanent id is forced to be its name. Trying to set it to another value will raise an exception.

{@inheritDoc}

preferredWidth

Integer

This property allows for setting an indication of width for representing this property in a view.

Default value is null, so that the view factory will make its decision based on the type and/or other characteristics of the property (e.g. max length).

readOnly

boolean

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 text fields into labels if it knows the underlying property is read-only.

sortable

boolean

Enforces a property sortability. This is only enforced at the UI level, i.e. the property can still be used for sorting programmatically.

sqlName

String

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 null so that Jspresso uses its default naming policy.

unicityScope

String

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 data store spanning the properties composing the unicity scope.

Note that, for performance reasons, unicity scopes are only enforced by the persistence layer.

versionControl

boolean

This property allows to fine tune whether 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 true so that any change in the described property increases the owning component version.

writabilityGates

Collection​<​IGate​>​

Assigns a collection of gates to determine property writability. A property will be considered writable if and only if all gates are open. This mechanism 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 programmatic writability of a property; only UI is impacted.


BasicRelationshipEndPropertyDescriptor

BasicRelationshipEndPropertyDescriptor

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.

BasicRelationshipEndPropertyDescriptor properties
Property Description

batchSize

Integer

This property allows to finely tune batching strategy of the ORM on this relationship end. Whenever possible, the ORM will use a IN clause in order to fetch multiple instances relationships at once. The batch size determines the size of th IN clause.

composition

boolean

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 explicitly set by the developer, Jspresso uses sensible defaults :

  • collection properties are compositions unless they are bidirectional "N to N"
  • reference properties are not composition

This property is strictly behavioural and does not impact the domain state itself.

fetchType

EFetch​Type

This property allows to finely tune fetching strategy of the ORM on this relationship end. This is either a value of the EFetchType enum or its equivalent string representation :

  • SELECT for default 2nd select strategy (lazy)
  • SUBSELECT for default 2nd select strategy (lazy) using an IN clause
  • JOIN for a join select strategy (not lazy)

Default value is EFetchType.SELECT, i.e. 2nd select strategy.

fkName

String

Gives the developer the opportunity to customize the generated foreign key (if any) name.

name

String

Assign reverse temp relation end if set.

{@inheritDoc}

reverseRelationEnd

IRelationship​End​Property​Descriptor

Allows to make a relationship bi-directional. By default, when a relationship end is defined, it is only navigable from the owning component to the described end (default value is null). Assigning a reverse relationship ends instructs the framework that the relationship is bi-directional. This implies several complementary features :

  • When one of the relationship ends is updated, the other side is automatically maintained by Jspresso, i.e. you never have to worry about reverse state. For instance, considering a Invoice - InvoiceLine bi-directional relationship, InvoiceLine.setInvoice(Invoice) and Invoice.addToInvoiceLines(InvoiceLine) are strictly equivalent.
  • You can qualify a "N-N" relationship (thus creating an association table in the data store behind the scene) by assigning 2 collection property descriptors as reverse relation ends of each other.
  • You can qualify a "1-1" relationship (thus enforcing some unicity constraint in the data store behind the scene) by assigning 2 reference property descriptors as reverse relation ends of each other.
Setting the reverse relation end operation is commutative so that it automatically assigns bot ends as reverse, i.e. you only have to set the property on one side of the relationship.


BasicCollectionPropertyDescriptor

This descriptor is used to describe collection properties that are used either as "1-N" or "N-N" "N" relationship end.

BasicCollectionPropertyDescriptor properties
Property Description

manyToMany

boolean

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 manyToMany=true automatically. But when the relationship is not bi-directional, Jspresso has no mean to determine if the collection property is "1-N" or "N-N". Setting this property allows to inform Jspresso about it.

Default value is false.

orderingProperties

Map​<​String​,?​>​

Ordering properties are used to sort this collection property if and only if it is un-indexed (not a List). The sort order set on the collection property can refine the default one that might have been set on the referenced collection level. This property consist of a Map whose entries are composed with :

  • the property name as key
  • the sort order for this property as value. This is either a value of the ESort enum (ASCENDING or DESCENDING) or its equivalent string representation.
Ordering properties are considered following their order in the map iterator. A null value (default) will not give any indication for the collection property sort order and thus, will delegate to higher specification levels (i.e. the referenced collection sort order).

referencedDescriptor

ICollection​Descriptor​<​E​>​

Qualifies the type of collection this property refers to. 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 data store
  • collections with List semantic: allows for duplicates and preserves the order of the elements in the data store through an implicit index column


BasicReferencePropertyDescriptor

Default implementation of a reference descriptor.

BasicReferencePropertyDescriptor properties
Property Description

initializationMapping

Map​<​String​,Object​>​

This property allows to pre-initialize UI filters that are based on this reference property. This includes :

  • explicit filters that are displayed for "list of values"
  • implicit filters that are use behind the scene for UI auto-completion

The initialization mapping property is a Map keyed by referenced type property names (the properties to be initialized).

Values in this map can be either :

  • a constant value. In that case, the filter property is initialize with this constant value.
  • a owning component property name. In that case, the filter property is initialize with the value of the owning component property.

oneToOne

boolean

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 oneToOne=true automatically. But when the relationship is not bi-directional, Jspresso has no mean to determine if the reference property is "N-1" or "1-1". Setting this property allows to inform Jspresso about it.

Default value is false.

pageSize

Integer

This property allows for defining the page size of "lists of values" that are built by the UI for this reference property. Whenever the pageSize property is set to null on the reference property level, Jspresso falls back to the element type default page size or turns off paging if the former is also not set.

queryableProperties

List​<​String​>​

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 List queryable properties are rendered in the same order.

Whenever this this property is null (default value), Jspresso chooses the default set of queryable properties based on the referenced component descriptor.

referencedDescriptor

IComponent​Descriptor​<​?​>​

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

List​<​String​>​

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 List queryable properties are rendered in the same order.

Whenever this property is null (default value) Jspresso determines the default set of properties to render based on the referenced component descriptor.


EnumQueryStructureDescriptor

A query structure used to implement enumeration disjunctions in filters.

EnumQueryStructureDescriptor properties
Property Description
This class does not have any specific property.

BasicCollectionDescriptor

BasicCollectionDescriptor

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 data store
  • collections with List semantic: allows for duplicates and preserves the order of the elements in the data store through an implicit index column

BasicCollectionDescriptor properties
Property Description

collectionInterface

Class​<​?​>​

Allows to choose between the supported collection semantics. The incoming class property value must be one of :

  • java.util.Set
  • java.util.List
Any other value is not supported and make the descriptor fall back to its default. A null value (default) is equivalent to setting java.util.Set. Alternatively, you can use descriptor sub-types, i.e. BasicSetDescriptor and BasicListDescriptor that make this property usage useless since they enforce their collection interface.

elementDescriptor

IComponent​Descriptor​<​?​>​

Describes the elements contained in this collection. It can be any of entity, interface or component descriptor.

nullElementAllowed

boolean

Configures the collection to accept null element values or not. If the collection does not allows for null values, it forbids to have holes in lists, i.e. all elements have consecutive indices.

orderingProperties

Map​<​String​,?​>​

Ordering properties are used to sort this collection if and only if it is un-indexed (not a List). The sort order set on the collection can refine the default one that might have been set on the element type level. This property consist of a Map whose entries are composed with :

  • the property name as key
  • the sort order for this property as value. This is either a value of the ESort enum (ASCENDING or DESCENDING) or its equivalent string representation.
Ordering properties are considered following their order in the map iterator. A null value (default) will not give any indication for the collection sort order and thus, will delegate to higher specification levels (e.g. the element type sort order).


BasicListDescriptor

This descriptor is equivalent to a BasicCollectionDescriptor with its collectionInterface property set to java.util.List. Using this descriptor prevents messing up with technical implementation details.

BasicListDescriptor properties
Property Description
This class does not have any specific property.

BasicSetDescriptor

This descriptor is equivalent to a BasicCollectionDescriptor with its collectionInterface property set to java.util.Set. Using this descriptor prevents messing up with technical implementation details.

BasicSetDescriptor properties
Property Description
This class does not have any specific property.

BasicScalarPropertyDescriptor

BasicScalarPropertyDescriptor

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.

BasicScalarPropertyDescriptor properties
Property Description

defaultValue

Object

Sets the property default value. When a component owning this property is instantiated, its properties are initialized using their default values. By default, a property default value is null.

This incoming value can be either the actual property default value (as an Object) or its string representation whose parsing will be delegated to the property descriptor.


AbstractEnumerationPropertyDescriptor

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.

AbstractEnumerationPropertyDescriptor properties
Property Description

enumerationName

String

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

Integer

Sets the maxLength.

queryMultiselect

boolean

This property allows to control if the enumeration property view should be transformed into a multi-selectable property view in order to allow for value disjunctions in filters. Default value is false.


BasicEnumerationPropertyDescriptor

Describes an enumerated property containing arbitrary values.

BasicEnumerationPropertyDescriptor properties
Property Description

values

List​<​String​>​

Defines the list of values this enumeration contains.

Enumeration values are translated in the UI using the following scheme : [enumerationName]_[value].

valuesAndIconImageUrls

Map​<​String​,String​>​

Defines the list of values as well as an icon image URL per value this enumeration contains. The incoming Map is keyed by the actual enumeration values and valued by the icon image URLs.

Enumeration values are translated in the UI using the following scheme : [enumerationName]_[value].


TypeEnumerationPropertyDescriptor

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.

TypeEnumerationPropertyDescriptor properties
Property Description

componentDescriptors

List​<​IComponent​Descriptor​>​

Registers the list of component descriptors to build the enumeration values/icons from their names and icons.


RangeEnumerationPropertyDescriptor

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.

RangeEnumerationPropertyDescriptor properties
Property Description

maxValue

Integer

The enumeration maximum bound. Default value is 10.

minValue

Integer

The enumeration minimum bound. Default value is 0.

rangeStep

Integer

The step to use for constructing the enumeration values, starting from minValue up to maxValue. Default value is 1.


TimeZoneEnumerationPropertyDescriptor

This is a special enumeration descriptor that holds all available timezones.

TimeZoneEnumerationPropertyDescriptor properties
Property Description
This class does not have any specific property.

BasicBinaryPropertyDescriptor

Describes a property used to store a binary value in the form of a byte array.

BasicBinaryPropertyDescriptor properties
Property Description

contentType

String

Configures the default content type to use when downloading the property content as a file.

fileFilter

Map​<​String​,List​>​

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 :

  • setting the property binary value from a file loaded from the file system
  • saving the property binary value to a file on the file system
Jspresso provides built-in actions that do the above and configure their UI automatically based on the fileFilter property.

The incoming Map must be structured like following :

  • keys are translation keys that will be translated by Jspresso i18n layer and presented to the user as the group name of the associated extensions, e.g. "JPEG images"
  • values are the extension list associated to a certain group name, e.g. a list containing [".jpeg",".jpg"]

fileName

String

Configures the default file name to use when downloading the property content as a file.

maxLength

Integer

Sets the max size (in bytes) of the property value.


BasicImageBinaryPropertyDescriptor

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.

BasicImageBinaryPropertyDescriptor properties
Property Description

formatName

String

Sets format name. When set to something not null (e.g. PNG, JPG, ...), the image is transformed to the specified format before being stored.

keepRatio

boolean

Sets keep ratio.

scaledHeight

Integer

Sets scaled height. This property, when set to a positive integer will force the image height to be resized to the target value. If only one of the 2 scaled dimensions is set, then the image is scaled by preserving its aspect ratio.

scaledWidth

Integer

Sets scaled width. This property, when set to a positive integer will force the image width to be resized to the target value. If only one of the 2 scaled dimensions is set, then the image is scaled by preserving its aspect ratio.


BasicJavaSerializablePropertyDescriptor

Describes a property used to store any java Serializable object. The property value is serialized/de-serialized to/from the data store. The operation is completely transparent to the developer, i.e. the developer never plays with the serialized form.

BasicJavaSerializablePropertyDescriptor properties
Property Description

modelTypeClassName

String

Configures the actual property type through its fully qualified name.


BasicBooleanPropertyDescriptor

Describes a boolean property.

BasicBooleanPropertyDescriptor properties
Property Description
This class does not have any specific property.

BasicColorPropertyDescriptor

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.

BasicColorPropertyDescriptor properties
Property Description
This class does not have any specific property.

BasicNumberPropertyDescriptor

This is the abstract base descriptor of all numeric based properties.

BasicNumberPropertyDescriptor properties
Property Description

formatPattern

String

Sets format pattern. Allows to override the default one.

maxValue

Big​Decimal

Configures the upper bound of the allowed values. Default value is null, meaning unbound.

minValue

Big​Decimal

Configures the lower bound of the allowed values. Default value is null, meaning unbound.

thousandsGroupingUsed

boolean

Sets thousands grouping used.


BasicDecimalPropertyDescriptor

Describes a decimal property. Property value is either stored as a Double or as a BigDecimal depending on the usingBigDecimal property.

BasicDecimalPropertyDescriptor properties
Property Description

maxFractionDigit

Integer

Configures the precision of the decimal property. Default value is 2.

usingBigDecimal

boolean

Configures the property to be managed using java.math.BigDecimal. Default value is false which means java.lang.Double will be used.


BasicPercentPropertyDescriptor

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.

BasicPercentPropertyDescriptor properties
Property Description
This class does not have any specific property.

BasicIntegerPropertyDescriptor

Describes an integer property. The property is either represented as an Integer or a Long depending on the usingLong property.

BasicIntegerPropertyDescriptor properties
Property Description

usingLong

boolean

Configures the property to be managed using java.lang.Long. Default value is false which means java.lang.Integer will be used.


BasicStringPropertyDescriptor

Describes a string based property.

BasicStringPropertyDescriptor properties
Property Description

maxLength

Integer

Configures the maximum string length this property allows. Default value is null which means unlimited.

regexpPattern

String

Configures the regular expression pattern this string property allows. Default is null which means constraint free.

regexpPatternSample

String

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.

translatable

boolean

Configures the string property to be translatable. Jspresso will then implement a translation store for the property so that it can be displayed in the connected user language. This is particularly useful for non-european character sets like chinese, indian, and so on. In that case, only the "raw" untranslated property value is stored in the object itself. the various translations are stored in an extra store. translated properties support searching, ordering, ... exactly like non-translatable properties.

truncate

Boolean

Configures whether the underlying string property should be truncated automatically if too long. Default value is false.

upperCase

boolean

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.


BasicImageUrlPropertyDescriptor

Describes an image URL property. This type of descriptor instructs Jspresso to use an image component to interact with this type of property.

BasicImageUrlPropertyDescriptor properties
Property Description

keepRatio

boolean

Sets keep ratio.

scaledHeight

Integer

Sets scaled height. This property, when set to a positive integer will force the image height to be resized to the target value. If only one of the 2 scaled dimensions is set, then the image is scaled by preserving its aspect ratio.

scaledWidth

Integer

Sets scaled width. This property, when set to a positive integer will force the image width to be resized to the target value. If only one of the 2 scaled dimensions is set, then the image is scaled by preserving its aspect ratio.


BasicPasswordPropertyDescriptor

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.

BasicPasswordPropertyDescriptor properties
Property Description
This class does not have any specific property.

BasicTextPropertyDescriptor

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.

BasicTextPropertyDescriptor properties
Property Description

contentType

String

Configures the default content type to use when downloading the property content as a file.

fileFilter

Map​<​String​,List​>​

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 :

  • setting the property value from a text file loaded from the file system
  • saving the property text value to a file on the file system
Jspresso provides built-in actions that do the above and configure their UI automatically based on the fileFilter property.

The incoming Map must be structured like following :

  • keys are translation keys that will be translated by Jspresso i18n layer and presented to the user as the group name of the associated extensions, e.g. "HTML files"
  • values are the extension list associated to a certain group name, e.g. a list containing [".html",".htm"]

fileName

String

Configures the default file name to use when downloading the property content as a file.

queryMultiline

boolean

This property allows to control if the text property view should be transformed into a multi-line text view in order to allow for multi-line text in filters. Default value is false.


BasicHtmlPropertyDescriptor

Describes a property as handing HTML content. This instructs Jspresso to display the property value as HTML instead of raw text content.

BasicHtmlPropertyDescriptor properties
Property Description
This class does not have any specific property.

BasicSourceCodePropertyDescriptor

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 un-formatted raw content. The language used to format the property text content may be defined explicitly using the language property.

BasicSourceCodePropertyDescriptor properties
Property Description

language

String

Explicitly 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.


BasicTimeAwarePropertyDescriptor

Abstract superclass for time-aware property descriptors.

BasicTimeAwarePropertyDescriptor properties
Property Description

millisecondsAware

boolean

Should this time information include milliseconds.

secondsAware

boolean

Should this time information include seconds.


BasicDatePropertyDescriptor

Describes a date based property. Whether the date property should include time information or not, can be configured using the type property.

BasicDatePropertyDescriptor properties
Property Description

formatPattern

String

Sets format pattern. Allows to override the default one.

timeZoneAware

boolean

Sets whether this date property should have its string representation vary depending on the client timezone.

Default value is false, meaning that the date is considered as a string. It is in fact expressed in the server timezone.

type

EDate​Type

Sets whether this property should contain time information or not. The incoming value must be part of the EDateType enum, i.e. :

  • DATE if the property should only contain the date information
  • DATE_TIME if the property should contain both date and time information
Default value is EDateType.DATE.


BasicDurationPropertyDescriptor

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.

BasicDurationPropertyDescriptor properties
Property Description

maxMillis

Long

Configures the maximum duration value this property accepts in milliseconds. Default value is null, meaning unbound.


BasicTimePropertyDescriptor

Describes a property used to hold time only values. These properties use a Date to store their value but only the time part of the value is relevant.

BasicTimePropertyDescriptor properties
Property Description

formatPattern

String

Sets format pattern. Allows to override the default one.


results matching ""

    No results matching ""