Interface ConfigurationItemIF
- All Superinterfaces:
Comparable<ConfigurationItemIF>,Serializable
ConfigurationItems represent the content of a configuration. The
configuration is organized as a tree of ConfigurationItems. For that, every
ConfigurationItem can have a parent and children elements. It can also have
parameters and options.
- Version:
- 10.1.1
- Author:
- Fabian Knoll fabian.knoll@koelsch-altmann.de
-
Method Summary
Modifier and TypeMethodDescriptionaddNewChild(String iName, ConfigurationTag iType, ConfigurationItemIF after, ConfigurationItemIF before, boolean bCheckOnly) Add a new child with a name and type.addParameter(String iName, String iValue, boolean bCheckOnly) Add a new parameter with name.copy(ConfigurationItemIF newParent, boolean bCheckOnly) Copy this configuration item including all transitively owned children, options and parameters.expand()Expand this configuration item and its complete content so that all references are instantiated.getBySymbolicName(String value) Get the configuration items which have the given symbolic name.Get the configuration items which have the given tag proposal.Get the list of children of this item.Get all transitive children.Get the name of the class.Get the name comment of a configuration item.getConfigurationItems(ConfigurationTag searchTag, ConfigurationItemSearchMode mode) Get the type.Get the parameter value of a certain parameter.Get a displayable name of the configuration item.org.jdom2.ElementgetElement(boolean iCustomer) Get XML element containing the item, its parameters and options and its children.getIcon()Get the icon of the configuration item.getId()Get the ID of this item.getName()Get the name attribute of a configuration item.Get the first child with the given type.Get all owned children with the given type.getOwnedParameter(String name) Get the owned parameter with the given name.Get all owned parameters.getOwnedParameters(String name) Get the owned parameter with the given name.Get all transitive parameters of this item.Get all transitive parameters of this item with given name.Get the parent of this item.getPath()Get the qualified path of a configuration item.Get the qualified ID of this item.getValue()Get value of configuration item.booleanHas this item any children?booleanIs the item defined by customer?booleanIs the item enabled for transformation?booleanisRoot()Is the item a root?booleanisValid()Is the item valid?voidremoveParameter(ParameterIF iParameter, boolean bCheckOnly) Remove existing parameter.voidsetChildren(ConfigurationItems iList, boolean bCheckOnly) Set the list of children.voidsetClassName(String iClassName, boolean bCheckOnly) Set the name of the class.voidsetComment(String iComment, boolean bCheckOnly) set the comment attribute of a configuration item.voidsetConfigurationTag(ConfigurationTag iType, boolean bCheckOnly) Set the type.voidsetCustomer(boolean iCustomer, boolean bCheckOnly, boolean bForce) The item is defined by customer or not.voidsetEnabled(boolean iEnabled, boolean bCheckOnly) Enable or disable the item.voidSet the id of a configuration item.voidvoidsetParent(ConfigurationItemIF iParent, boolean bCheckOnly) Set the parent of this item.voidsetValid(boolean iValid, boolean bCheckOnly) Set the item valid or invalid.voidSet the value of the configuration item.voidvalidate()Validate item and check for validity of itself and its parameters.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getName
Get the name attribute of a configuration item.- Returns:
- The Name of the ConfigurationItem
- Throws:
M2MExceptionRemoteException
-
getPath
Get the qualified path of a configuration item.- Returns:
- The qualified path of the ConfigurationItem
- Throws:
M2MExceptionRemoteException
-
getDisplayName
Get a displayable name of the configuration item.- Returns:
- display name
- Throws:
M2MExceptionRemoteExceptionRemoteException
-
setName
- Parameters:
iName- name of the itembCheckOnly- only check if possible- Throws:
RemoteExceptionM2MException
-
getConfigurationTag
ConfigurationTag getConfigurationTag()Get the type.- Returns:
- The Name of the type of the ConfigurationItem. It is the name of the XML tag.
-
setConfigurationTag
Set the type.- Parameters:
iType- type of the configuration itembCheckOnly-- Throws:
RemoteException
-
getIcon
Get the icon of the configuration item. Normally the icon is defined by the type of the item.- Returns:
- name of icon
- Throws:
M2MExceptionRemoteException
-
getId
String getId()Get the ID of this item.- Returns:
- The ID of the ConfigurationItem
-
getQualifiedId
Get the qualified ID of this item.- Returns:
- The qualified ID is separated by dots and contains the IDs of all parents.
- Throws:
AbortExceptionRemoteException
-
getClassName
Get the name of the class.- Returns:
- The name of the class of the ConfigurationItem.
- Throws:
M2MExceptionRemoteException
-
setClassName
Set the name of the class.- Parameters:
iClassName- Name of the classbCheckOnly-- Throws:
RemoteExceptionM2MException
-
isRoot
boolean isRoot()Is the item a root?- Returns:
- True if this ConfigurationItem is the top-level item of the configuration tree.
-
getParent
ConfigurationItemIF getParent()Get the parent of this item.- Returns:
- The parent of this ConfigurationItem.
-
setParent
void setParent(ConfigurationItemIF iParent, boolean bCheckOnly) throws RemoteException, M2MException Set the parent of this item.- Parameters:
iParent- new parentbCheckOnly-- Throws:
RemoteExceptionM2MException
-
hasChildren
boolean hasChildren()Has this item any children?- Returns:
- True, if this ConfigurationItem has child elements.
-
isEnabled
Is the item enabled for transformation?- Returns:
- true, if the item is enabled.
- Throws:
M2MExceptionRemoteException
-
setEnabled
Enable or disable the item.- Parameters:
iEnabled- true to enabled the itembCheckOnly- true means do not modify the model- Throws:
RemoteExceptionM2MException
-
isCustomer
Is the item defined by customer?- Returns:
- true, if the item is enabled.
- Throws:
M2MExceptionRemoteException
-
setCustomer
void setCustomer(boolean iCustomer, boolean bCheckOnly, boolean bForce) throws RemoteException, M2MException The item is defined by customer or not.- Parameters:
iCustomer- true to define the item by customerbCheckOnly- true means do not modify the modelbForce- force means set in any case- Throws:
RemoteExceptionM2MException
-
setId
Set the id of a configuration item.- Parameters:
iId- id to setbCheckOnly- true means do not modify the model- Throws:
RemoteExceptionAbortExceptionM2MException
-
isValid
Is the item valid?- Returns:
- true, if the item is valid.
- Throws:
M2MExceptionRemoteException
-
validate
Validate item and check for validity of itself and its parameters.- Throws:
M2MExceptionRemoteException
-
setValid
Set the item valid or invalid.- Parameters:
iValid- true for validbCheckOnly- true means do not modify the model- Throws:
M2MExceptionRemoteException
-
getChildren
Get the list of children of this item.- Returns:
- A list of direct owned children of these ConfigurationItem
- Throws:
M2MExceptionRemoteException
-
getOwnedChildren
Get all owned children with the given type.- Parameters:
tag- filter the children for the specified type- Returns:
- a list of direct owned children with given type
-
getOwnedChild
Get the first child with the given type.- Parameters:
tag- the specified type- Returns:
- the first child
-
setChildren
Set the list of children. This method maybe used to remove children or to sort them.- Parameters:
iList- The list of all children.bCheckOnly-- Throws:
RemoteExceptionM2MException
-
addNewChild
ConfigurationItemIF addNewChild(String iName, ConfigurationTag iType, ConfigurationItemIF after, ConfigurationItemIF before, boolean bCheckOnly) throws RemoteException, AbortException, M2MException Add a new child with a name and type. Append to list of children.- Parameters:
iName- Name of the new childiType- Type of the new child (XML tag name)after- item to insert after (maybe null, then it is appended at the end)before- item to insert before (maybe null, then it is added according to parameter "after")bCheckOnly- only check if this is possible- Returns:
- the new child
- Throws:
RemoteExceptionAbortExceptionM2MException
-
getChildrenTransitive
ConfigurationItems getChildrenTransitive()Get all transitive children.- Returns:
- a list of children with given type
-
getOwnedParameters
Get all owned parameters.- Returns:
- A list of Parameter types, which are owned by this ConfigurationItem
- Throws:
M2MExceptionRemoteException
-
getOwnedParameter
Get the owned parameter with the given name.- Parameters:
name-- Returns:
- if found, parameter with given name, else null
- Throws:
M2MExceptionRemoteException
-
getOwnedParameters
Get the owned parameter with the given name.- Parameters:
name-- Returns:
- if found, parameter with given name, else null
- Throws:
M2MExceptionRemoteException
-
getParametersTransitive
Get all transitive parameters of this item.- Returns:
- A list of Parameter, which are directly owned and of all children transitively.
- Throws:
M2MExceptionRemoteException
-
getParametersTransitive
Get all transitive parameters of this item with given name.- Returns:
- A list of Parameter, which are directly owned and of all children transitively.
- Throws:
M2MExceptionRemoteException
-
getDefOwnedParameterValue
Get the parameter value of a certain parameter.- Parameters:
t- Parameter template- Returns:
- if found, the string value of a parameter with given name. If not found, return default value.
- Throws:
M2MExceptionRemoteException
-
addParameter
ConfigurationItemIF addParameter(String iName, String iValue, boolean bCheckOnly) throws RemoteException, M2MException Add a new parameter with name.- Parameters:
iName- Name of parameteriValue- Value of parameterbCheckOnly- only check if possible- Returns:
- newly created parameter
- Throws:
RemoteExceptionM2MException
-
removeParameter
Remove existing parameter.- Parameters:
iParameter- parameter to be removedbCheckOnly-- Throws:
RemoteException
-
copy
ConfigurationItemIF copy(ConfigurationItemIF newParent, boolean bCheckOnly) throws RemoteException, AbortException, M2MException Copy this configuration item including all transitively owned children, options and parameters.- Parameters:
newParent- new parent of copy; maybe null: in this case the parent stays the samebCheckOnly-- Returns:
- Copy of this item
- Throws:
RemoteExceptionAbortExceptionM2MException
-
getDefOwnedParameterValueBoolean
- Throws:
RemoteExceptionM2MException
-
getElement
Get XML element containing the item, its parameters and options and its children.- Parameters:
iCustomer- export it for customer- Returns:
- XML element
- Throws:
M2MExceptionRemoteException
-
getComment
Get the name comment of a configuration item.- Returns:
- The comment of the ConfigurationItem
- Throws:
RemoteExceptionM2MException
-
setComment
set the comment attribute of a configuration item.- Parameters:
iComment- The comment of the ConfigurationItembCheckOnly-- Throws:
RemoteExceptionM2MException
-
getConfigurationItems
ConfigurationItems getConfigurationItems(ConfigurationTag searchTag, ConfigurationItemSearchMode mode) throws RemoteException, M2MException - Throws:
RemoteExceptionM2MException
-
setValue
Set the value of the configuration item.- Parameters:
iValue- value of the itembCheckOnly- only check if possible- Throws:
RemoteExceptionM2MException
-
getValue
Get value of configuration item.- Returns:
- value of the item
- Throws:
M2MExceptionRemoteException
-
expand
Expand this configuration item and its complete content so that all references are instantiated.- Returns:
- if this is a reference return a copy of the referenced item, else return this item
- Throws:
RemoteExceptionM2MException
-
getBySymbolicName
Get the configuration items which have the given symbolic name.- Parameters:
value- Symbolic name- Returns:
- configuration item
- Throws:
RemoteExceptionM2MException
-
getByTag
Get the configuration items which have the given tag proposal.- Parameters:
value- Tag proposal- Returns:
- configuration item
- Throws:
RemoteExceptionM2MException
-