Class


Resolver – Abstract

Purpose: Returns a Java class object specified by a static selection.

images/download/attachments/128387144/image2023-1-12_10-16-55-version-1-modificationdate-1676010867130-api-v2.png

IMPORTANT◄ All resolvers for Static values ignore the input value. Within a resolver chain (see Verketteter Wertauflöser) this prevents the processing of all preceding resolvers (if any).

The Class resolver returns a Java class object determined by a static selection.

It appears by default as a suggestion for value configurations from which a Class value is expected.

Since the string image of the 'Class' (Class) is the fully-qualified class name, the Class resolver can also be used for assignments and comparisons with fields that expect the class name as a string. However, it is not explicitly suggested in such contexts.

Configuration

The only parameter for the resolver is a Combobox element that allows a static single selection for a class.

Its search function looks for matches between the input text and the following components of the label for classes in the dropdown:

  • Localization for the class name (resource $name in the class bundle),
    e.g. 'Type of packaging'

  • fully-qualified class name of the class (=Bundle name in Localization),
    e.g. de.lobster.scm.base.bto.TypeOfPackaging

IMPORTANT◄ As the screenshot on the right shows, the localization does not have to be unique. Therefore, the internal class name (in brackets) should be carefully observed when selecting.

images/download/attachments/128387144/image2023-1-12_10-22-44-version-1-modificationdate-1676010867127-api-v2.png

NOTE◄ Unlike other resolvers (e.g. Input object (type safe) and Create instance), direct input of a class name is not possible in the Class resolver.

Example

An association criteria (see Association criteria) shall be fulfilled if the input value is any 'entity' that has at least one 'Linked entity attribute' of any type (see Linked entity type) that connects to a business object of the 'Order' (see Orders) type.

Configuration:

Within an AND Junction, a Check type first checks whether the input value belongs to the parent class 'Entity'.

Only if this is the case does the linked Entity property rule, in conjunction with the negated Is empty compare type, examine whether the entity in the input value has a linked entity attribute that refers to a specific 'Order':

  • The All attributes of one type resolver returns a list of all typed attributes of the type 'Linked entity attribute', if such attributes exist at all.

  • The concatenated Rule list resolver returns the first linked entity attribute that satisfies the following conditions in an AND conjunction, or 'No value' ($null) if no corresponding attribute exists:

    • The first Entity property rule checks whether the 'linked entity ID' (linkedEntityId) contains a value (>0).

    • The second Entity property rule checks whether the linkedEntityType field of the attribute refers to the class 'Order' (Order). Since a class is defined as a value for the value of this field, the selection of the Equals compare type in the Entity property rule during configuration immediately causes the Class resolver to appear as a suggestion for the compare value on the right. The class 'Order' must then only be selected via a dropdown menu.

images/download/attachments/128387144/image2023-1-12_10-24-49-version-1-modificationdate-1676010867107-api-v2.png