Interface ConfigurationInterface
- All Superinterfaces:
Remote,Serializable
- All Known Implementing Classes:
ConfigurationModel
This interface specifies the access mechanism to the model transformation
configuration model. The server and the client have their own configuration
models. They are not synchronized but at start of program.
- Author:
- Fabian Knoll fabian.knoll@koelsch-altmann.de
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddItem(ConfigurationItemIF iItem) Add the configuration item to the model.voidaddOrRemoveCustomer(boolean bCustomerMode) Remove or add the customer items depending on the value of the customer mode parameter.createConfigurationItem(ConfigurationItemIF iParent, org.jdom2.Element xmlElement, boolean bCustomer, boolean bCheckOnly) Create a configuration item from an XML element in this model.org.jdom2.DocumentGet content of configuration as a document.getInsert(ConfigurationItemIF inserted, boolean bCreate, boolean bCheckOnly) Get insert for an inserted item.Get the configuration item defined with the given id.Get the configuration items using the given id.getModification(ConfigurationItemIF original, boolean bCreate, boolean bCheckOnly) Get modified item of an original item.getRoot(ConfigurationTag tag) Get the root of the configuration.booleanHas model transformation configuration content changed since last save or load?voidinitialize(org.jdom2.Document configuration, org.jdom2.Document workflow, org.jdom2.Document templates, org.jdom2.Document customer, boolean bExpand) Initialize the model configuration based on given documents.voidremoveItem(ConfigurationItemIF iItem) Remove the configuration item from the model.voidThe content of the model has changed.
-
Method Details
-
getRoot
Get the root of the configuration.- Parameters:
tag- tag may either be model transformation or customer or workflow or templates.- Returns:
- The root ConfigurationItem of a tree of ConfigurationItems.
- Throws:
M2MExceptionRemoteException
-
initialize
void initialize(org.jdom2.Document configuration, org.jdom2.Document workflow, org.jdom2.Document templates, org.jdom2.Document customer, boolean bExpand) throws M2MException, RemoteException Initialize the model configuration based on given documents.- Parameters:
configuration- document containing the model transformation configurationworkflow- document containing the workflow configurationtemplates- document containing the templatescustomer- document containing the customer modifications and insertsbExpand- expand the model so that all references are instantiated- Throws:
M2MExceptionRemoteException
-
getDocument
Get content of configuration as a document. Important side effect: The configuration model is marked as unchanged because it is assumed that the reading into a document is used to save the model.- Parameters:
tag- tag of root specifies the configuration which is exported ModelTransformation exports model transformation configuration Customer exports customer modifications Workflow exports workflow configuration Templates exports templates- Returns:
- XML document containing the content of the model transformation configuration
- Throws:
M2MExceptionRemoteException
-
hasChanged
Has model transformation configuration content changed since last save or load?- Parameters:
tag- tag of root specifies the configuration which is exported ModelTransformation exports model transformation configuration Customer exports customer modifications Workflow exports workflow configuration Templates exports templates- Returns:
- true, if the content of the model has changed.
- Throws:
M2MExceptionRemoteException
-
setContentChanged
The content of the model has changed.- Parameters:
tag- tag of root specifies the configuration which is exported ModelTransformation exports model transformation configuration Customer exports customer modifications Workflow exports workflow configuration- Throws:
RemoteException
-
createConfigurationItem
ConfigurationItemIF createConfigurationItem(ConfigurationItemIF iParent, org.jdom2.Element xmlElement, boolean bCustomer, boolean bCheckOnly) throws RemoteException, AbortException, M2MException Create a configuration item from an XML element in this model. And put it beneath the parent.- Parameters:
iParent- parent of new item,maybe null for a rootxmlElement- XML element describing a configuration itembCustomer- import it from customerbCheckOnly- only check it and do not add to model- Returns:
- configuration item
- Throws:
RemoteExceptionAbortExceptionM2MException
-
getItem
Get the configuration item defined with the given id.- Parameters:
id- qualified id or string containing a qualified id in double quotes- Returns:
- null if no item has this id
-
getItems
Get the configuration items using the given id. Use means it is within the value of a parameter.- Parameters:
id- qualified id- Returns:
- null if no item uses this id, else the parameter using it directly or within a string and double quotes
- Throws:
M2MExceptionRemoteException
-
addItem
Add the configuration item to the model.- Parameters:
iItem- configuration item to add- Throws:
RemoteExceptionAbortExceptionM2MException
-
removeItem
Remove the configuration item from the model.- Parameters:
iItem- configuration item to remove- Throws:
RemoteExceptionM2MException
-
getModification
ConfigurationItemIF getModification(ConfigurationItemIF original, boolean bCreate, boolean bCheckOnly) throws RemoteException, M2MException Get modified item of an original item. Only available if running in customer mode.- Parameters:
original- original configuration itembCreate- true to create a new modification if there is not yet a modification defined. This only works in customer mode.bCheckOnly- Only check if this is possible- Returns:
- null, if there is no modification or no customer mode
- Throws:
RemoteExceptionM2MException
-
getInsert
ConfigurationItemIF getInsert(ConfigurationItemIF inserted, boolean bCreate, boolean bCheckOnly) throws RemoteException, M2MException Get insert for an inserted item.- Parameters:
inserted- inserted itembCreate- true to create a new insertbCheckOnly- Only check if this is possible- Returns:
- insertion which defines the insertion of the inserted item
- Throws:
RemoteExceptionM2MException
-
addOrRemoveCustomer
Remove or add the customer items depending on the value of the customer mode parameter.- Parameters:
bCustomerMode- true means add false means remove- Throws:
RemoteExceptionM2MException
-