Interface ConfigurationInterface

All Superinterfaces:
Remote, Serializable
All Known Implementing Classes:
ConfigurationModel

public interface ConfigurationInterface extends Serializable, Remote
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 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:
      M2MException
      RemoteException
    • 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 configuration
      workflow - document containing the workflow configuration
      templates - document containing the templates
      customer - document containing the customer modifications and inserts
      bExpand - expand the model so that all references are instantiated
      Throws:
      M2MException
      RemoteException
    • getDocument

      org.jdom2.Document getDocument(ConfigurationTag tag) throws M2MException, RemoteException
      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:
      M2MException
      RemoteException
    • hasChanged

      boolean hasChanged(ConfigurationTag tag) throws M2MException, RemoteException
      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:
      M2MException
      RemoteException
    • setContentChanged

      void setContentChanged(ConfigurationTag tag) throws RemoteException
      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 root
      xmlElement - XML element describing a configuration item
      bCustomer - import it from customer
      bCheckOnly - only check it and do not add to model
      Returns:
      configuration item
      Throws:
      RemoteException
      AbortException
      M2MException
    • 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:
      M2MException
      RemoteException
    • addItem

      Add the configuration item to the model.
      Parameters:
      iItem - configuration item to add
      Throws:
      RemoteException
      AbortException
      M2MException
    • removeItem

      void removeItem(ConfigurationItemIF iItem) throws RemoteException, M2MException
      Remove the configuration item from the model.
      Parameters:
      iItem - configuration item to remove
      Throws:
      RemoteException
      M2MException
    • 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 item
      bCreate - 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:
      RemoteException
      M2MException
    • getInsert

      ConfigurationItemIF getInsert(ConfigurationItemIF inserted, boolean bCreate, boolean bCheckOnly) throws RemoteException, M2MException
      Get insert for an inserted item.
      Parameters:
      inserted - inserted item
      bCreate - true to create a new insert
      bCheckOnly - Only check if this is possible
      Returns:
      insertion which defines the insertion of the inserted item
      Throws:
      RemoteException
      M2MException
    • addOrRemoveCustomer

      void addOrRemoveCustomer(boolean bCustomerMode) throws RemoteException, M2MException
      Remove or add the customer items depending on the value of the customer mode parameter.
      Parameters:
      bCustomerMode - true means add false means remove
      Throws:
      RemoteException
      M2MException