Structure Changelog
We strongly advise you to download and configure changelog schemas at your IntelliJ IDEA, this will be necessary to obtain IntelliSense when editing. More information here.
The platform provides a schema definition based on changelog/changeset to manipulate DataObject
, DocumentType
and others structures (see bellow).
Supported Operations
DataObject
addOrChangeDataObject
: Add or changeDataObject
.addDataObject
: AddDataObject
.changeDataObject
: ChangeDataObject
.removeDataObject
: RemoveDataObject
.
Field
addOrChangeDataObjectField
: Add or changeField
at an existingDataObject
.addDataObjectField
: AddField
at an existingDataObject
.changeDataObjectField
: ChangeField
(properties, type, params).removeDataObjectField
: RemoveField
fromDataObject
.
Index
addOrChangeDataObjectIndex
: Add or changeIndex
at an existingDataObject
.addDataObjectIndex
: AddIndex
at an existingDataObject
.changeDataObjectIndex
: ChangeIndex
at an existingDataObject
.removeDataObjectIndex
: RemoveIndex
fromDataObject
.
DataSource
addOrChangeDataObjectDataSource
: Add or changeData Source
at an existingDataObject
.addDataObjectDataSource
: AddData Source
at an existingDataObject
.changeDataObjectDataSource
: ChangeData Source
at an existingDataObject
.removeDataObjectDataSource
RemoveData Source
fromDataObject
.
DocumentType
addOrChangeDocumentType
: Add or changeDocumentType
general information, such as, display name, order, sequence strategy, sharing, properties, etc.addDocumentType
: AddDocumentType
, also possible to definedata
,expression
,validation
,notification
,sharing
,cloneable field
,relationship
,subdocument
andindex
.changeDocumentType
: ChangeDocumentType
general information, such as, display name, order, sequence strategy, sharing, properties, etc.removeDocumentType
: RemoveDocumentType
.
Data
addOrChangeDocumentTypeData
: Add or ChangeDocumentTypeData
at an existingDocumentType
.addDocumentTypeData
: AddDocumentTypeData
at an existingDocumentType
.changeDocumentTypeData
: ChangeDocumentTypeData
at an existingDocumentType
.removeDocumentTypeData
: RemoveDocumentTypeData
fromDocumentType
.
Expression
addOrChangeDocumentTypeExpression
: Add or changeExpression
at an existingDocumentType
orDocumentTypeData
.addDocumentTypeExpression
: AddExpression
at an existingDocumentType
orDocumentTypeData
.changeDocumentTypeExpression
: ChangeExpression
.removeDocumentTypeExpression
: RemoveExpression
fromDocumentType
orDocumentTypeData
.
Validation
addOrChangeDocumentTypeValidation
: Add or changeValidation
at an existingDocumentType
orDocumentTypeData
.addDocumentTypeValidation
: AddValidation
at an existingDocumentType
orDocumentTypeData
.changeDocumentTypeValidation
: ChangeValidation
at an existingDocumentType
orDocumentTypeData
.removeDocumentTypeValidation
: RemoveValidation
fromDocumentType
orDocumentTypeData
.
Notification
addOrChangeDocumentTypeNotification
: AddNotification
at an existingDocumentType
.AppBuilder compatibility
addDocumentTypeNotification
: AddNotification
at an existingDocumentType
.removeDocumentTypeNotification
: RemoveNotification
fromDocumentType
.
Sharing
addOrChangeDocumentTypeSharing
: AddSharing
at an existingDocumentType
.AppBuilder compatibility
addDocumentTypeSharing
: AddSharing
at an existingDocumentType
.removeDocumentTypeSharing
: RemoveSharing
fromDocumentType
.
Cloneable Field
addOrChangeDocumentTypeCloneableField
: AddCloneable Field
at an existingDocumentType
.AppBuilder compatibility
addDocumentTypeCloneableField
: AddCloneable Field
at an existingDocumentType
.removeDocumentTypeCloneableField
: RemoveCloneable Field
fromDocumentType
.
Relationship
addOrChangeDocumentTypeRelationship
: Add or changeRelationship
at an existingDocumentType
.addDocumentTypeRelationship
: AddRelationship
at an existingDocumentType
.changeDocumentTypeRelationship
: ChangeRelationship
.removeDocumentTypeRelationship
: RemoveRelationship
fromDocumentType
.
SubDocumentType
addOrChangeDocumentTypeSubDocumentType
: AddSubDocument
at an existingDocumentType
.AppBuilder compatibility
addDocumentTypeSubDocumentType
: AddSubDocument
at an existingDocumentType
.removeDocumentTypeSubDocumentType
: RemoveSubDocument
fromDocumentType
.
SubDocumentType Expression
addOrChangeSubDocumentTypeExpression
: Add or changeExpression
at an existingSubDocument
.addSubDocumentTypeExpression
: AddExpression
at an existingSubDocument
.changeSubDocumentTypeExpression
: ChangeExpression
.removeSubDocumentTypeExpression
: RemoveExpression
fromSubDocument
.
Index
addOrChangeDocumentTypeIndex
: Add or changeIndex
at an existingDocumentType
.addDocumentTypeIndex
: AddIndex
at an existingDocumentType
.changeDocumentTypeIndex
: ChangeIndex
.removeDocumentTypeIndex
: RemoveIndex
fromDocumentType
.
FilterConfiguration
addOrChangeFilterConfiguration
: Add Or changeDocument Type Filter Configuration
.addFilterConfiguration
: AddDocument Type Filter Configuration
.changeFilterConfiguration
: ChangeDocument Type Filter Configuration
.removeFilterConfiguration
: RemoveDocument Type Filter Configuration
.addOrChangeFilterConfigurationField
: Add Or ChangeField in Filter Configuration
.addFilterConfigurationField
: AddField in Filter Configuration
.removeFilterConfigurationField
: RemoveField
.
HumanBeingDataSource
addOrChangeHumanBeingDataSource
: Add or changeHumanBeingDataSource
.addHumanBeingDataSource
: AddHumanBeingDataSource
.changeHumanBeingDataSource
: ChangeHumanBeingDataSource
permissions.removeHumanBeingDataSource
: RemoveHumanBeingDataSource
.
Macro
addOrChangeMacro
: AddMacro
.AppBuilder compatibility
addMacro
: AddMacro
.removeMacro
: RemoveMacro
.
Group
addOrChangeGroup
: Add or changeGroup
.addGroup
: AddGroup
.changeGroup
: ChangeGroup
.removeGroup
: RemoveGroup
.addOrChangeGroupElement
: Addelement
to an existingGroup
.AppBuilder compatibility
addGroupElement
: Addelement
to an existingGroup
.removeGroupElement
: Removeelement
from an existingGroup
.
TemplateMail
addOrChangeTemplateMail
: Add or changeTemplateMail
.addTemplateMail
: AddTemplateMail
.changeTemplateMail
: ChangeTemplateMail
.removeTemplateMail
: RemoveTemplateMail
.addOrChangeTemplateMailParameter
: Add or changeparameter
at an existingTemplateMail
.addTemplateMailParameter
: Addparameter
to an existingTemplateMail
.changeTemplateMailParameter
: Changeparameter
from an existingTemplateMail
.removeTemplateMailParameter
: Removeparameter
from an existingTemplateMail
.addOrChangeTemplateMailLocale
: Add or changelocale
at an existingTemplateMail
.addTemplateMailLocale
: Addlocale
to an existingTemplateMail
.changeTemplateMailLocale
: Changelocale
from an existingTemplateMail
.removeTemplateMailLocale
: Removelocale
from an existingTemplateMail
.
Dynamic Filter
addOrChangeDynamicFilter
: Add or changeDynamic Filter
.addDynamicFilter
: AddDynamic Filter
.changeDynamicFilter
: ChangeDynamic Filter
.removeDynamicFilter
: RemoveDynamic Filter
.
Data Contract (Wsdl or Wadl) files
removeDataContract
: RemoveData contract
file based onname
andtype
. Besides the operation, you must also remove your file from the project structure.
AppBuilder compatibility: Operations marked as
AppBuilder compatibility
has no effect forchange
, onlyadd
the target object if not exists.
Changelog File
Main structure
As demonstrated below, the root
element of a changelog file is changelog
, it supports n changesets
.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<changeLog xmlns="http://meceap.me.com.br/schema/changeLog-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://meceap.me.com.br/schema/changeLog-mapping http://docs.miisy.me/xsd/changelog-mapping.xsd">
<changeSet author="author 01" description="changeset description 01" id="01-01-0001" runAlways="false" runOnChange="false" failOnError="true">
</changeSet>
<changeSet author="author 02" description="changeset description 02" id="01-01-0002" runAlways="false" runOnChange="false" failOnError="true">
</changeSet>
<changeSet author="author n" description="changeset description n..." id="n-n-n..." runAlways="false" runOnChange="false" failOnError="true">
</changeSet>
</changeLog>
Must be stored at src\main\mapping\changelog
and must have the .changelog.xml
extension. Example: \customroot\core\src\main\mapping\changelog\v1.changelog.xml
.
Use
.ext
in the filename when working with application extensions. Example:v1.ext.changelog.xml
.
ChangeSet element
ChangeSet
is the root
element for all supported operations, it's possible to define 0..n of each operation.
Example of use:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<changeLog xmlns="http://meceap.me.com.br/schema/changeLog-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://meceap.me.com.br/schema/changeLog-mapping http://docs.miisy.me/xsd/changelog-mapping.xsd">
<changeSet author="author" description="Add DataObject" id="01-01-0001" runAlways="false" runOnChange="false" failOnError="true">
<addDataObject auditable="true" baseName="doNotUse" description="For testing purposes only" exportable="true"
name="doNotUse" pluralBaseName="doNotUse">
<field description="code" displayName="code" type="java.lang.String" name="code" order="10">
<param name="length" value="50"/>
<param name="minLength" value="0"/>
<param name="required" value="true"/>
<param name="auditable" value="true"/>
<param name="email" value="false"/>
<param name="useTextArea" value="false"/>
<param name="ignore" value="false"/>
<param name="updatable" value="true"/>
<param name="meTextEditor" value="false"/>
<param name="markDownEditor" value="false"/>
<param name="sortable" value="false"/>
</field>
<field description="description" displayName="description" type="java.lang.String" name="description" order="20">
<param name="length" value="50"/>
<param name="minLength" value="0"/>
<param name="required" value="false"/>
<param name="auditable" value="true"/>
<param name="email" value="false"/>
<param name="useTextArea" value="false"/>
<param name="ignore" value="false"/>
<param name="updatable" value="true"/>
<param name="meTextEditor" value="false"/>
<param name="markDownEditor" value="false"/>
<param name="sortable" value="false"/>
</field>
<index name="pk" unique="true">
<field fullName="code" name="code"/>
</index>
</addDataObject>
</changeSet>
<changeSet author="author" description="Add new index" id="01-01-0002" runAlways="false" runOnChange="false" failOnError="true">
<addDataObjectIndex dataObjectBaseName="doNotUse" name="idx_description" unique="false">
<field fullName="description" name="description"/>
</addDataObjectIndex>
</changeSet>
<changeSet author="author" description="Add new field" id="01-01-0003" runAlways="false" runOnChange="false" failOnError="true">
<addDataObjectField dataObjectBaseName="doNotUse" description="otherField" displayName="otherfield" type="java.lang.String" name="otherfield" order="30">
<param name="length" value="50"/>
<param name="minLength" value="0"/>
<param name="required" value="false"/>
<param name="auditable" value="true"/>
<param name="email" value="false"/>
<param name="useTextArea" value="false"/>
<param name="ignore" value="false"/>
<param name="updatable" value="true"/>
<param name="meTextEditor" value="false"/>
<param name="markDownEditor" value="false"/>
<param name="sortable" value="false"/>
</addDataObjectField>
</changeSet>
<changeSet author="author" description="Add new DataSource" id="01-01-0004" runAlways="false" runOnChange="false" failOnError="true">
<addDataObjectDataSource dataObjectBaseName="doNotUse" description="data source test" name="dstest"/>
</changeSet>
<changeSet author="author" description="add document" id="01-01-0005" runAlways="false" runOnChange="false"
failOnError="true">
<addDocumentType description="DocTestDoNotUse" displayName="DocTestDoNotUse" name="DocTestDoNotUse"
pluralName="DocTestDoNotUse" order="99" sequenceStrategy="">
<defaultSharing>
<shared-users>
<email>user@me.com.br</email>
<permission name="R"/>
<permission name="S"/>
<permission name="W"/>
<permission name="X"/>
</shared-users>
</defaultSharing>
<properties>
<item key="SEARCH_BOX_DISABLED" value="false"/>
<item key="LIST_DOCUMENT_ENABLE" value="true"/>
<item key="NOTIFY_USERS_ON_CHANGE" value="false"/>
</properties>
<sharing>
<shared-users>
<email>admin@misy.com</email>
<permission name="R"/>
<permission name="S"/>
<permission name="W"/>
<permission name="X"/>
<permission name="C"/>
</shared-users>
</sharing>
<cloneableFields>
<field documentData="coffeeDataDoc" field="amountSubTotal"/>
</cloneableFields>
<documentData dataObjectBaseName="coffeereq" multiplicity="ONE" name="coffeeDataDoc"/>
<documentData dataObjectBaseName="coffeeitem" multiplicity="MANY" name="coffeeMixtureDoc">
<expression field="amountCalc" order="1">${amount} + 5</expression>
<subDocData dataObjectBaseName="comment" multiplicity="MANY" name="mixtureCommentDoc"/>
</documentData>
<documentValidation validationClass="meceap.coffeeDispenser.validator.CoffeeAmountValidation"
validationType="DOCUMENT"/>
<documentValidation documentData="coffeeDataDoc" field="requester"
validationClass="meceap.coffeeDispenser.validator.RequiredFieldValidation"
validationType="FIELD"/>
<expression field="coffeeDataDoc.amountTotal" order="1">sum(${coffeeMixtureDocList.amountCalc})</expression>
<expression field="coffeeDataDoc.amountSubTotal" order="2">${_subDocument.CoffeeItem.totalItem} + 2
</expression>
<index name="MyIndex" unique="false">
<field fullName="coffeeDataDoc.requester" name="coffeeDataDoc"/>
<field fullName="coffeeMixtureDocList.name" name="coffeeMixtureDoc"/>
</index>
<notificationFields>
<field documentData="coffeeDataDoc" field="ownerRef"/>
</notificationFields>
<relationship documentTypeRelated="DocTestDoNotUse">
<relationType className="br.com.me.ceap.service.relationship.impl.Related"/>
<relationType className="br.com.me.ceap.service.relationship.impl.Child"/>
<relationType className="br.com.me.ceap.service.relationship.impl.Parent"/>
</relationship>
<relationship documentTypeRelated="CoffeeRequest">
<relationType className="br.com.me.ceap.service.relationship.impl.Parent"/>
<relationType className="br.com.me.ceap.service.relationship.impl.Related"/>
<relationType className="br.com.me.ceap.service.relationship.impl.Child"/>
</relationship>
<sharingFields>
<field documentData="coffeeDataDoc" field="user"/>
</sharingFields>
<subDocumentType name="CoffeeAnnotation"/>
<subDocumentType name="CoffeeItem">
<expression name="totalItem" order="1">sum(${header.amount})</expression>
<expression name="coffeeInfo" order="2">sum(${header.amount})</expression>
</subDocumentType>
</addDocumentType>
</changeSet>
<changeSet author="author" description="change document" id="01-01-0006" runAlways="false" runOnChange="false"
failOnError="true">
<changeDocumentType description="DocTestDoNotUse Changed" displayName="DocTestDoNotUse Changed"
name="DocTestDoNotUse"
order="98"
pluralName="DocTestDoNotUse">
<properties>
<item key="NOTIFY_USERS_ON_CHANGE" value="true"/>
</properties>
</changeDocumentType>
</changeSet>
<changeSet author="author" description="add document type data" id="01-01-0007"
runAlways="false"
runOnChange="false"
failOnError="true">
<addDocumentTypeData documentType="DocTestDoNotUse" dataObjectBaseName="coffeeitem" multiplicity="MANY"
name="newdtd">
</addDocumentTypeData>
</changeSet>
<changeSet author="author" description="add document type data expression" id="01-01-0008"
runAlways="false"
runOnChange="false"
failOnError="true">
<addDocumentTypeExpression field="total" order="100" documentType="DocTestDoNotUse" documentData="newdtd">
${coffeeMixtureList.amountCalc}
</addDocumentTypeExpression>
</changeSet>
<changeSet author="author" description="add document type data validation" id="01-01-0009"
runAlways="false"
runOnChange="false"
failOnError="true">
<addDocumentTypeValidation documentType="DocTestDoNotUse" documentData="newdtd" field="name"
validationClass="meceap.coffeeDispenser.validator.RequiredFieldValidation"
validationType="FIELD"/>
</changeSet>
<changeSet author="author" description="add document type index" id="01-01-0010"
runAlways="false"
runOnChange="false"
failOnError="true">
<addDocumentTypeIndex documentType="DocTestDoNotUse" name="newIndex" unique="false">
<field fullName="coffeeDataDoc.requester" name="coffeeDataDoc"/>
<field fullName="coffeeMixtureDocList.name" name="coffeeMixtureDoc"/>
</addDocumentTypeIndex>
</changeSet>
<changeSet author="author" description="add document type relationship" id="01-01-0011"
runAlways="false"
runOnChange="false"
failOnError="true">
<addDocumentTypeRelationship documentType="DocTestDoNotUse" documentTypeRelated="CoffeeRequestAttachment">
<relationType className="br.com.me.ceap.service.relationship.impl.Related"/>
<relationType className="br.com.me.ceap.service.relationship.impl.Parent"/>
</addDocumentTypeRelationship>
</changeSet>
</changeLog>
Tips
- Note you can mix operations of different types at the same
changelog
file, our example showsDataObject
andDocumentType
operations together. - You can make many operations at the same
changeset
, but break in multipleschangesets
is more readable and easy to maintain. - Don't forget to read about changelog master file. More information here.
AddOrChange
operations are nothing more than a switch, if the target object exists the call will be redirect tochange
if not, toadd
.
XSD Download
How to manually configure xsd
location at IntelliJ IDEA for IntelliSense here.