Examples
Usage of "model", "modelChildren" and "propertyValue"
The parameter-types "model", "modelChildren" and "propertyValue" can be combined to get the following:
<parameters>
<model name="entity">
<displayName>Entity</displayName>
<type>entity</type>
</model>
<modelChildren name="path">
<model>${entity}</model>
<container>true</container>
</modelChildren>
<propertyValue name="values">
<model>${entity}</model>
<path>${path}</path>
</propertyValue>
</parameters>
Blueprints provided by the xRM
"Create ObserveActions"
<?xml version="1.0" encoding="UTF-8" ?>
<blueprint name="Create ObserveActions">
<type>entityActionField</type>
<parameters>
</parameters>
<data>
<document name="context"><![CDATA[
<entity VERSION="1.3.17">
<entityFields>
<entityActionGroup>
<name>observeActionGroup</name>
<children>
<entityActionField>
<name>observe</name>
<title>Observe</title>
<onActionProcess>
import("Observation_lib");
Observation.insertAction();
</onActionProcess>
<isObjectAction v="true" />
<iconId>VAADIN:EYE</iconId>
<stateProcess>
import("system.result");
import("Observation_lib");
import("system.neon");
if (!Observation.countObservations())
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
else
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
</stateProcess>
<titleProcess>
import("system.result");
import("Observation_lib");
import("system.vars");
result.string(
Observation.observeActionTitle(vars.get("$sys.selection"))
);
</titleProcess>
</entityActionField>
<entityActionField>
<name>cancelObservation</name>
<onActionProcess>
import("Observation_lib");
Observation.cancelAction();
</onActionProcess>
<iconId>VAADIN:EYE_SLASH</iconId>
<stateProcess>
import("system.result");
import("Observation_lib");
import("system.neon");
if (Observation.countObservations())
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
else
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
</stateProcess>
<titleProcess>
import("system.result");
import("system.vars");
import("Observation_lib");
result.string(
Observation.cancelActionTitle(vars.get("$sys.selection"))
);
</titleProcess>
</entityActionField>
</children>
</entityActionGroup>
</entityFields>
</entity>
]]></document>
</data>
</blueprint>
Blueprints provided by the ADITO Designer
New Syntax since 2021.0.0
"Create empty ChangeLog"
<?xml version="1.0" encoding="UTF-8" ?>
<blueprint name="Create empty ChangeLog">
<type>liquibase</type>
<parameters>
<systemprop name="author">
<displayName>Author</displayName>
<name>user.name</name>
<mandatory>false</mandatory>
</systemprop>
</parameters>
<data>
<documentData>
<contentType>XML</contentType>
<document><![CDATA[
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="${author}" id="${gen.uuid}">
</changeSet>
</databaseChangeLog>
]]></document>
</documentData>
</data>
</blueprint>
"Create Changelog with new DB-Table"
The following example is the "Create Changelog with new DB-Table" that is provided by the ADITO Designer.
<?xml version="1.0" encoding="UTF-8" ?>
<blueprint name="Create ChangeLog with new DB-Table">
<type>liquibase</type>
<parameters>
<systemprop name="author">
<displayName>Author</displayName>
<name>user.name</name>
<mandatory>false</mandatory>
</systemprop>
<string name="tableName">
<displayName>Table-Name</displayName>
<mandatory>true</mandatory>
</string>
<string name="primaryKey">
<displayName>Primary Key Column</displayName>
<mandatory>false</mandatory>
</string>
<selection name="defaultColumns">
<displayName>Columns</displayName>
<elements>USER_NEW|USER_EDIT|DATE_NEW|DATE_EDIT</elements>
</selection>
</parameters>
<data>
<documentData>
<contentType>XML</contentType>
<document><![CDATA[
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="${author}" id="${gen.uuid}">
<createTable tableName="${tableName}">
<column if="${primaryKey}" name="${primaryKey}" type="CHAR(36)">
<constraints primaryKey="true" primaryKeyName="PK_${tableName}_${primaryKey}"/>
</column>
<column if="${defaultColumns.USER_NEW}" name="USER_NEW" type="NVARCHAR(50)"/>
<column if="${defaultColumns.USER_EDIT}" name="USER_EDIT" type="NVARCHAR(50)"/>
<column if="${defaultColumns.DATE_NEW}" name="DATE_NEW" type="DATETIME"/>
<column if="${defaultColumns.DATE_EDIT}" name="DATE_EDIT" type="DATETIME"/>
</createTable>
</changeSet>
</databaseChangeLog>
]]></document>
</documentData>
</data>
</blueprint>
Old Syntax
These Blueprints still work, but it is not recommended using this syntax.
"Generate Record Container from Database"
<?xml version="1.0" encoding="UTF-8" ?>
<blueprint name="Generate Record Container from Database">
<type>dbRecordContainer</type>
<parameters>
<string name="modelname">
<displayName>Name</displayName>
<mandatory>true</mandatory>
<value>db</value>
</string>
<dbalias name="alias">
<displayName>Alias</displayName>
<mandatory>true</mandatory>
</dbalias>
<dbtable name="tables">
<displayName>Tables</displayName>
<alias>${alias}</alias>
<multiple>true</multiple>
<mandatory>true</mandatory>
</dbtable>
<dbcolumn name="columns">
<displayName>Columns</displayName>
<alias>${alias}</alias>
<table>${tables}</table>
<mandatory>true</mandatory>
</dbcolumn>
<dbmeta name="dbmeta">
<alias>${alias}</alias>
<tables>${tables}</tables>
</dbmeta>
<unique name="fieldnames">
<elements>${columns}</elements>
</unique>
<map name="contenttypes">
<elements>DATE=DATE|TIMESTAMP=DATE|INTEGER=NUMBER|DECIMAL=NUMBER|FLOAT=NUMBER</elements>
</map>
</parameters>
<data>
<document name="context"><![CDATA[
<entity VERSION="1.3.14">
<recordContainer>${modelname}</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
<entityField forEach="${fieldnames}">
<name>${forEach.current}</name>
<mandatory if="${dbmeta.${columns.${forEach.index}}.nullable}" v="true"/>
<contentType if="${contenttypes.${dbmeta.${columns.${forEach.index}}.type}}">${contenttypes.${dbmeta.${columns.${forEach.index}}.type}}</contentType>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>${modelname}</name>
<alias>${alias}</alias>
<linkInformation>
<linkInformation forEach="${tables}">
<name>${gen.uuid}</name>
<tableName>${forEach.current}</tableName>
<primaryKey>${dbmeta.${forEach.current}.primaryKey}</primaryKey>
<isUIDTable if="${forEach.index}==0" v="true" />
<isUIDTable if="${forEach.index}!=0" v="false" />
<readonly if="${forEach.index}==0" v="false" />
<readonly if="${forEach.index}!=0" v="true" />
</linkInformation>
</linkInformation>
<recordFieldMappings>
<dbRecordFieldMapping forEach="${fieldnames}">
<name>${forEach.current}.value</name>
<recordfield>${columns.${forEach.index}}</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
</entity>
]]></document>
</data>
</blueprint>
"Create Default Fields"
<?xml version="1.0" encoding="UTF-8" ?>
<blueprint name="Create Default Fields">
<type>entityField</type>
<parameters>
<selection name="fieldNames">
<displayName>Default Fields</displayName>
<elements>DATE_NEW|DATE_EDIT|USER_NEW|USER_EDIT</elements>
<mandatory>true</mandatory>
</selection>
</parameters>
<data>
<document name="context"><![CDATA[
<entity VERSION="1.3.14">
<entityFields>
<entityField forEach="${fieldNames}">
<name>${forEach.current}</name>
</entityField>
</entityFields>
</entity>
]]></document>
</data>
</blueprint>
"Generate Entity from Database"
<?xml version="1.0" encoding="UTF-8" ?>
<blueprint name="Generate Entity from Database">
<type>entity</type>
<parameters>
<dbalias name="alias">
<displayName>Alias</displayName>
<mandatory>true</mandatory>
</dbalias>
<dbtable name="tables">
<displayName>Tables</displayName>
<alias>${alias}</alias>
<multiple>true</multiple>
<mandatory>true</mandatory>
</dbtable>
<dbcolumn name="columns">
<displayName>Columns</displayName>
<alias>${alias}</alias>
<table>${tables}</table>
<mandatory>true</mandatory>
</dbcolumn>
<dbmeta name="dbmeta">
<alias>${alias}</alias>
<tables>${tables}</tables>
</dbmeta>
<unique name="fieldnames">
<elements>${columns}</elements>
</unique>
<map name="contenttypes">
<elements>DATE=DATE|TIMESTAMP=DATE|INTEGER=NUMBER|DECIMAL=NUMBER|FLOAT=NUMBER</elements>
</map>
</parameters>
<data>
<document name="context"><![CDATA[
<entity VERSION="1.3.14">
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
<entityField forEach="${fieldnames}">
<name>${forEach.current}</name>
<mandatory if="${dbmeta.${columns.${forEach.index}}.nullable}" v="true"/>
<contentType if="${contenttypes.${dbmeta.${columns.${forEach.index}}.type}}">${contenttypes.${dbmeta.${columns.${forEach.index}}.type}}</contentType>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<alias>${alias}</alias>
<linkInformation>
<linkInformation forEach="${tables}">
<name>${gen.uuid}</name>
<tableName>${forEach.current}</tableName>
<primaryKey>${dbmeta.${forEach.current}.primaryKey}</primaryKey>
<isUIDTable if="${forEach.index}==0" v="true" />
<isUIDTable if="${forEach.index}!=0" v="false" />
<readonly if="${forEach.index}==0" v="false" />
<readonly if="${forEach.index}!=0" v="true" />
</linkInformation>
</linkInformation>
<recordFieldMappings>
<dbRecordFieldMapping forEach="${fieldnames}">
<name>${forEach.current}.value</name>
<recordfield>${columns.${forEach.index}}</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
</entity>
]]></document>
</data>
</blueprint>
"Create Context with Default Views"
<?xml version="1.0" encoding="UTF-8" ?>
<blueprint name="Create Context with Default Views">
<type>neonContext</type>
<parameters>
<model name="entity">
<displayName>Entity</displayName>
<type>entity</type>
</model>
<selection name="viewNames">
<displayName>Views</displayName>
<elements>Main_view|Filter_view|Edit_view|Preview_view|PreviewMultiple_view|Lookup_view</elements>
</selection>
</parameters>
<data>
<document name="context"><![CDATA[
<neonContext VERSION="1.1.1">
<entity if="${entity}">${entity}</entity>
<mainView if="${viewNames.Main_view}">${name}Main_view</mainView>
<filterView if="${viewNames.Filter_view}">${name}Filter_view</filterView>
<editView if="${viewNames.Edit_view}">${name}Edit_view</editView>
<previewView if="${viewNames.Preview_view}">${name}Preview_view</previewView>
<previewMultipleView if="${viewNames.PreviewMultiple_view}">${name}PreviewMultiple_view</previewMultipleView>
<lookupView if="${viewNames.Lookup_view}">${name}Lookup_view</lookupView>
<references>
<neonViewReference forEach="${viewNames}">
<name>${gen.uuid}</name>
<view>${name}${forEach.current}</view>
</neonViewReference>
</references>
</neonContext>
]]></document>
<document name="neonView"><![CDATA[
<neonView VERSION="1.1.6" forEach="${viewNames}">
<name>${name}${forEach.current}</name>
<layout if="${forEach.current}==Main_view">
<masterSlaveLayout>
<name>layout</name>
</masterSlaveLayout>
</layout>
<layout if="${forEach.current}==Filter_view">
<groupLayout>
<name>layout</name>
</groupLayout>
</layout>
<layout if="${forEach.current}==Edit_view">
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<layout if="${forEach.current}==Preview_view">
<headerFooterLayout>
<name>layout</name>
</headerFooterLayout>
</layout>
<layout if="${forEach.current}==PreviewMultiple_view">
<headerFooterLayout>
<name>layout</name>
</headerFooterLayout>
</layout>
<layout if="${forEach.current}==Lookup_view">
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<filterable v="true" if="${forEach.current}==Filter_view"></filterable>
</neonView>
]]></document>
</data>
</blueprint>
"Create Context with Default Views and Entity"
<?xml version="1.0" encoding="UTF-8" ?>
<blueprint name="Create Context with Default Views and Entity">
<type>neonContext</type>
<parameters>
<string name="entity">
<displayName>Entity</displayName>
<mandatory>true</mandatory>
</string>
<selection name="viewNames">
<displayName>Views</displayName>
<elements>Main_view|Filter_view|Edit_view|PreviewMultiple_view|Preview_view|Lookup_view</elements>
</selection>
</parameters>
<data>
<document name="context"><![CDATA[
<neonContext VERSION="1.1.1">
<entity>${entity}</entity>
<mainView if="${viewNames.Main_view}">${name}Main_view</mainView>
<filterView if="${viewNames.Filter_view}">${name}Filter_view</filterView>
<editView if="${viewNames.Edit_view}">${name}Edit_view</editView>
<previewView if="${viewNames.Preview_view}">${name}Preview_view</previewView>
<previewMultipleView if="${viewNames.PreviewMultiple_view}">${name}PreviewMultiple_view</previewMultipleView>
<lookupView if="${viewNames.Lookup_view}">${name}Lookup_view</lookupView>
<references>
<neonViewReference forEach="${viewNames}">
<name>${gen.uuid}</name>
<view>${name}${forEach.current}</view>
</neonViewReference>
</references>
</neonContext>
]]></document>
<document name="entity"><![CDATA[
<entity VERSION="1.3.14">
<name>${entity}</name>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
</entityFields>
</entity>
]]></document>
<document name="neonView"><![CDATA[
<neonView VERSION="1.1.6" forEach="${viewNames}">
<name>${name}${forEach.current}</name>
<layout if="${forEach.current}==Main_view">
<masterSlaveLayout>
<name>layout</name>
</masterSlaveLayout>
</layout>
<layout if="${forEach.current}==Filter_view">
<groupLayout>
<name>layout</name>
</groupLayout>
</layout>
<layout if="${forEach.current}==Edit_view">
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<layout if="${forEach.current}==Preview_view">
<headerFooterLayout>
<name>layout</name>
</headerFooterLayout>
</layout>
<layout if="${forEach.current}==PreviewMultiple_view">
<headerFooterLayout>
<name>layout</name>
</headerFooterLayout>
</layout>
<layout if="${forEach.current}==Lookup_view">
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<filterable v="true" if="${forEach.current}==Filter_view"></filterable>
</neonView>
]]></document>
</data>
</blueprint>