The purpose of the app.ducx customization language is to define, customize and tailor your software component to project- or solution-specific requirements.
A customization block consists of import declarations, customization points and customizations. The customization keyword denotes a customization model block. It must be followed by the reference of your software component and curly braces.
Syntax |
customization softwarecomponent |
Customization points are defined within a customization model block. To declare a customization point, use the optional keyword customizationpoint, followed by the reference of the customization point and by parentheses holding the list of parameters. The declaration is finished with a semicolon.
Example |
customizationpoint GetObjHint ( customizationpoint GetAllowedAttrDef ( customizationpoint GetAllowedExpression ( customizationpoint GetTransferedAttribute( |
Parameters denoted with the keyword key are used in customizations to define key values used to specify the customization entries. If a key parameter can be left empty, it has to be marked as optional (optional key).
All input parameters are available in expression blocks (local scope) of customizations.
Output parameters (out, retval) normally are calculated by an expression. Using the keyword direct for output parameters gives the possibility to return the value directly without evaluating an expression.
It is also possible to specify a parameter by using a property definition.
By default, the action FSCCONFIG@1.1001:GetMergedPropertyValueEx is used for resolving the customization point, resulting in a single line result.
If there are only direct parameters, the resolving action is FSCCONFIG@1.1001:GetMergedPropertyEx, resulting in a sorted list of configuration lines. To return only one line, specify the action to be used.
It is possible to define a customization point without key parameters. This results in a single line customization point for the specified output parameter.
With help of Domain Types (COOSYSTEM@1.1:DomainType) it is possible to define configurations and ACLs abstractly for domain types instead of concrete domains. This can be achieved by using the keyword instance followed by the object class DomainType and the name of the instance reference.
Syntax |
objmodel APPDUCXSAMPLE@200.200 ... |
All configurations that are defined in the domain type instance can be used for customization points in foreign software components.
To reuse a defined configuration in your own software component, the configuration object instance has to be created manually. The reference of the configuration object instance has to comply with the following rule: reference of the domain type followed by the software component of the configuration followed by “Config” (e.g. DomainTypeAppducxSampleFSCCONFIGConfig).
Example |
objmodel APPDUCXSAMPLE@200.200 instance AdministrationConfiguration DomainTypeAppducxSampleFSCCONFIGConfig {} instance DomainType DomainTypeAppducxSample { |
If a customization point needs additionally an implementation of a specified action with a specified method implementation for the object class defined in a customize statement, this can be defined in the customization point to reduce the effort in the customizing statements.
Example |
objmodel APPDUCXSAMPLE@200.200 extend instance NameBuild { |
If this customization point is used for an object class in a customizing statement, the mapping is now created implicitly.
For each customization point several customizations may exist, distinguished by the key parameters. Optional keys may be set to null, if the customization should apply to any value in the optional key. The customization provides the concrete implementation of a customization point.
By default, customizations are implicitly stored in the default configurations of the software components the corresponding customization point belongs to. If you create your own customization points a configuration with reference DefaultConfig is implicitly generated for your software component.
If an installation consists of several tenants you might want to have an own configuration for each tenant. This can be achieved by defining a software solution (or software edition) for each tenant and using the target keyword followed by the reference of the domain type.
A domain type can be customized if:
In all other cases an error will be thrown.
Example |
// Define the customization for the own software solution // Define the customization for the software edition Folio |
Some customization points support an additional configuration context. This context is calculated dynamically by calling the action FSCTEAMROOM@1.1001:GetCPContext(ClientConfigurationObject cfg, retval ComponentObject context) on the room of the object the customization point is called for. To get a specific context for a room the action GetCPContext can be implemented as seen in the sample below.
Currently to following customization points can be used for context-specific configuration:
Example |
// Define the customization for the software edition Folio target DomainTypeFolio.[Art,Business] { // Implement the GetCPContext action for your AppRoom class to be able to provide // Sample customization |
Contexts can be listed in the target definition.
It is only allowed to configure the contexts, when one of the following conditions hold true:
Customizations can be used in expression blocks.
Example |
// The result is assigned to @tmp // build is declared as retval, thus the result can be assigned directly // The result is a list of matching customizations assigned to @result |
Note:
This concise example subsumes the concepts described in the above chapters. The goal is to customize the hint that is displayed when moving the mouse over a content object.
Example |
app.ducx Customization Language GetObjHint customize GetObjHint<ContentObject> { app.ducx Use Case Language // Override COOATTREDIT@1.1:GetObjectHint GetHTMLLine(AttributeDefinition attrdef, any value, retval string line) { |
Several customization points are defined by the base product itself. The predefined customization points are described in the reference documentation:
https://help.developer.fabasoft.com/index.php?topic=doc/Reference-Documentation/cps-overview.htm