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 changeFieldat an existingDataObject.addDataObjectField: AddFieldat an existingDataObject.changeDataObjectField: ChangeField(properties, type, params).removeDataObjectField: RemoveFieldfromDataObject.
Index
addOrChangeDataObjectIndex: Add or changeIndexat an existingDataObject.addDataObjectIndex: AddIndexat an existingDataObject.changeDataObjectIndex: ChangeIndexat an existingDataObject.removeDataObjectIndex: RemoveIndexfromDataObject.
DataSource
addOrChangeDataObjectDataSource: Add or changeData Sourceat an existingDataObject.addDataObjectDataSource: AddData Sourceat an existingDataObject.changeDataObjectDataSource: ChangeData Sourceat an existingDataObject.removeDataObjectDataSourceRemoveData SourcefromDataObject.
DocumentType
addOrChangeDocumentType: Add or changeDocumentTypegeneral information, such as, display name, order, sequence strategy, sharing, properties, etc.addDocumentType: AddDocumentType, also possible to definedata,expression,validation,notification,sharing,cloneable field,relationship,subdocumentandindex.changeDocumentType: ChangeDocumentTypegeneral information, such as, display name, order, sequence strategy, sharing, properties, etc.removeDocumentType: RemoveDocumentType.
Data
addOrChangeDocumentTypeData: Add or ChangeDocumentTypeDataat an existingDocumentType.addDocumentTypeData: AddDocumentTypeDataat an existingDocumentType.changeDocumentTypeData: ChangeDocumentTypeDataat an existingDocumentType.removeDocumentTypeData: RemoveDocumentTypeDatafromDocumentType.
Expression
addOrChangeDocumentTypeExpression: Add or changeExpressionat an existingDocumentTypeorDocumentTypeData.addDocumentTypeExpression: AddExpressionat an existingDocumentTypeorDocumentTypeData.changeDocumentTypeExpression: ChangeExpression.removeDocumentTypeExpression: RemoveExpressionfromDocumentTypeorDocumentTypeData.
Validation
addOrChangeDocumentTypeValidation: Add or changeValidationat an existingDocumentTypeorDocumentTypeData.addDocumentTypeValidation: AddValidationat an existingDocumentTypeorDocumentTypeData.changeDocumentTypeValidation: ChangeValidationat an existingDocumentTypeorDocumentTypeData.removeDocumentTypeValidation: RemoveValidationfromDocumentTypeorDocumentTypeData.
Notification
addOrChangeDocumentTypeNotification: AddNotificationat an existingDocumentType.AppBuilder compatibilityaddDocumentTypeNotification: AddNotificationat an existingDocumentType.removeDocumentTypeNotification: RemoveNotificationfromDocumentType.
Sharing
addOrChangeDocumentTypeSharing: AddSharingat an existingDocumentType.AppBuilder compatibilityaddDocumentTypeSharing: AddSharingat an existingDocumentType.removeDocumentTypeSharing: RemoveSharingfromDocumentType.
Cloneable Field
addOrChangeDocumentTypeCloneableField: AddCloneable Fieldat an existingDocumentType.AppBuilder compatibilityaddDocumentTypeCloneableField: AddCloneable Fieldat an existingDocumentType.removeDocumentTypeCloneableField: RemoveCloneable FieldfromDocumentType.
Relationship
addOrChangeDocumentTypeRelationship: Add or changeRelationshipat an existingDocumentType.addDocumentTypeRelationship: AddRelationshipat an existingDocumentType.changeDocumentTypeRelationship: ChangeRelationship.removeDocumentTypeRelationship: RemoveRelationshipfromDocumentType.
SubDocumentType
addOrChangeDocumentTypeSubDocumentType: AddSubDocumentat an existingDocumentType.AppBuilder compatibilityaddDocumentTypeSubDocumentType: AddSubDocumentat an existingDocumentType.removeDocumentTypeSubDocumentType: RemoveSubDocumentfromDocumentType.
SubDocumentType Expression
addOrChangeSubDocumentTypeExpression: Add or changeExpressionat an existingSubDocument.addSubDocumentTypeExpression: AddExpressionat an existingSubDocument.changeSubDocumentTypeExpression: ChangeExpression.removeSubDocumentTypeExpression: RemoveExpressionfromSubDocument.
Index
addOrChangeDocumentTypeIndex: Add or changeIndexat an existingDocumentType.addDocumentTypeIndex: AddIndexat an existingDocumentType.changeDocumentTypeIndex: ChangeIndex.removeDocumentTypeIndex: RemoveIndexfromDocumentType.
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: ChangeHumanBeingDataSourcepermissions.removeHumanBeingDataSource: RemoveHumanBeingDataSource.
Macro
addOrChangeMacro: AddMacro.AppBuilder compatibilityaddMacro: AddMacro.removeMacro: RemoveMacro.
Group
addOrChangeGroup: Add or changeGroup.addGroup: AddGroup.changeGroup: ChangeGroup.removeGroup: RemoveGroup.addOrChangeGroupElement: Addelementto an existingGroup.AppBuilder compatibilityaddGroupElement: Addelementto an existingGroup.removeGroupElement: Removeelementfrom an existingGroup.
TemplateMail
addOrChangeTemplateMail: Add or changeTemplateMail.addTemplateMail: AddTemplateMail.changeTemplateMail: ChangeTemplateMail.removeTemplateMail: RemoveTemplateMail.addOrChangeTemplateMailParameter: Add or changeparameterat an existingTemplateMail.addTemplateMailParameter: Addparameterto an existingTemplateMail.changeTemplateMailParameter: Changeparameterfrom an existingTemplateMail.removeTemplateMailParameter: Removeparameterfrom an existingTemplateMail.addOrChangeTemplateMailLocale: Add or changelocaleat an existingTemplateMail.addTemplateMailLocale: Addlocaleto an existingTemplateMail.changeTemplateMailLocale: Changelocalefrom an existingTemplateMail.removeTemplateMailLocale: Removelocalefrom 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 contractfile based onnameandtype. Besides the operation, you must also remove your file from the project structure.
AppBuilder compatibility: Operations marked as
AppBuilder compatibilityhas no effect forchange, onlyaddthe 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
.extin 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
changelogfile, our example showsDataObjectandDocumentTypeoperations together. - You can make many operations at the same
changeset, but break in multipleschangesetsis more readable and easy to maintain. - Don't forget to read about changelog master file. More information here.
AddOrChangeoperations are nothing more than a switch, if the target object exists the call will be redirect tochangeif not, toadd.
XSD Download
How to manually configure xsd location at IntelliJ IDEA for IntelliSense here.