tigase.conf

## Class ConfigItem

- java.lang.Object
- - tigase.db.comp.RepositoryItemAbstract
  - - tigase.conf.ConfigItem

- All Implemented Interfaces:
    RepositoryItem

      public class ConfigItem
      extends RepositoryItemAbstract

  Created: Dec 10, 2009 2:40:26 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ConfigItem.FLAGS` Enum description

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CLUSTER_NODE_ATTR` Field description
    `static String` | `COMPONENT_NAME_ATTR` Field description
    `static String` | `COMPONENT_NAME_LABEL` Field description
    `static String` | `FLAG_ATTR` Field description
    `static String` | `KEY_NAME_ATTR` Field description
    `static String` | `KEY_NAME_LABEL` Field description
    `static String` | `NODE_NAME_ATTR` Field description
    `static String` | `NODE_NAME_LABEL` Field description
    `static String` | `REPO_ITEM_ELEM_NAME` Field description
    `static String` | `VALUE_ATTR` Field description
    `static String` | `VALUE_LABEL` Field description
    `static String` | `VALUE_TYPE_ATTR` Field description

    - ### Fields inherited from class tigase.db.comp.RepositoryItemAbstract

      `ADMINS_ATT, ADMINS_LABEL, OWNER_ATT, OWNER_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigItem()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCommandFields(Packet packet)` Method description
    `boolean` | `equals(Object o)` Method description
    `String` | `getClusterNode()` Method description
    `String` | `getCompName()` Method description
    `String` | `getConfigKey()` Returns a configuration property key which is constructed in a following way: `nodeName + "/" + keyName`
    `Object` | `getConfigVal()` Returns a configuration property value.
    `String` | `getConfigValToString()` Method description
    `String` | `getElemName()` Method description
    `ConfigItem.FLAGS` | `getFlag()` Method description
    `String` | `getKey()` Returns ConfigItem key which is constructed in a following way: `compName + "/" + nodeName + "/" + keyName`
    `String` | `getKeyName()` Returns a property key which is constructed in a following way: `keyName`
    `String` | `getNodeName()` Method description
    `int` | `hashCode()` Method description
    `void` | `initFromCommand(Packet packet)` Method description
    `void` | `initFromElement(tigase.xml.Element elem)` Method description
    `void` | `initFromPropertyString(String propString)` Method description
    `boolean` | `isCompNodeKey(String comp, String node, String key)` Method description
    `boolean` | `isComponent(String comp)` Checks if the given component name is equal to this item compName.
    `boolean` | `isKey(String key)` Checks if the given key is equal to this item keyName.
    `boolean` | `isNode(String node)` Checks if the given node is equal to this item nodeName
    `boolean` | `isNodeKey(String node, String key)` Checks if the given node and key are equal to this item nodeName and keyName.
    `void` | `set(String compName, String nodeName, String key, Object value)` Method description
    `void` | `set(String compName_m, String nodeName_m, String key_m, String value_str_m, char val_type_m, String flag_str_m)` Method description
    `void` | `set(String clusterNode, String compName, String nodeName, String key, Object value)` Method description
    `void` | `set(String clusterNode_m, String compName_m, String nodeName_m, String key_m, Object value_m, ConfigItem.FLAGS flag_m)` Method description
    `void` | `set(String clusterNode_m, String compName_m, String nodeName_m, String key_m, String value_str_m, char val_type_m, String flag_str_m)` Method description
    `void` | `setNodeKey(String clusterNode, String compName, String nodeKey, Object value)` Method description
    `tigase.xml.Element` | `toElement()` Method description
    `String` | `toPropertyString()` Method description
    `String` | `toString()` Method description

    - ### Methods inherited from class tigase.db.comp.RepositoryItemAbstract

      `getAdmins, getOwner, isAdmin, isOwner, setAdmins, setOwner`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### CLUSTER_NODE_ATTR

          public static final String CLUSTER_NODE_ATTR

      Field description
      See Also:
        Constant Field Values

    - #### COMPONENT_NAME_ATTR

          public static final String COMPONENT_NAME_ATTR

      Field description
      See Also:
        Constant Field Values

    - #### COMPONENT_NAME_LABEL

          public static final String COMPONENT_NAME_LABEL

      Field description
      See Also:
        Constant Field Values

    - #### FLAG_ATTR

          public static final String FLAG_ATTR

      Field description
      See Also:
        Constant Field Values

    - #### KEY_NAME_ATTR

          public static final String KEY_NAME_ATTR

      Field description
      See Also:
        Constant Field Values

    - #### KEY_NAME_LABEL

          public static final String KEY_NAME_LABEL

      Field description
      See Also:
        Constant Field Values

    - #### NODE_NAME_ATTR

          public static final String NODE_NAME_ATTR

      Field description
      See Also:
        Constant Field Values

    - #### NODE_NAME_LABEL

          public static final String NODE_NAME_LABEL

      Field description
      See Also:
        Constant Field Values

    - #### REPO_ITEM_ELEM_NAME

          public static final String REPO_ITEM_ELEM_NAME

      Field description
      See Also:
        Constant Field Values

    - #### VALUE_ATTR

          public static final String VALUE_ATTR

      Field description
      See Also:
        Constant Field Values

    - #### VALUE_LABEL

          public static final String VALUE_LABEL

      Field description
      See Also:
        Constant Field Values

    - #### VALUE_TYPE_ATTR

          public static final String VALUE_TYPE_ATTR

      Field description
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ConfigItem

          public ConfigItem()

  - ### Method Detail

    - #### addCommandFields

          public void addCommandFields(Packet packet)

      Method description
      Specified by:
        `addCommandFields` in interface `RepositoryItem`
      Overrides:
        `addCommandFields` in class `RepositoryItemAbstract`
      Parameters:
        `packet` -

    - #### getClusterNode

          public String getClusterNode()

      Method description
      Returns:

    - #### getCompName

          public String getCompName()

      Method description
      Returns:

    - #### getConfigKey

          public String getConfigKey()

      Returns a configuration property key which is constructed in a following way: `nodeName + "/" + keyName`
      Returns:

    - #### getConfigVal

          public Object getConfigVal()

      Returns a configuration property value.
      Returns:

    - #### getConfigValToString

          public String getConfigValToString()

      Method description
      Returns:

    - #### getElemName

          public String getElemName()

      Method description
      Specified by:
        `getElemName` in class `RepositoryItemAbstract`
      Returns:

    - #### getFlag

          public ConfigItem.FLAGS getFlag()

      Method description
      Returns:

    - #### getKey

          public String getKey()

      Returns ConfigItem key which is constructed in a following way: `compName + "/" + nodeName + "/" + keyName`
      Returns:

    - #### getKeyName

          public String getKeyName()

      Returns a property key which is constructed in a following way: `keyName`
      Returns:

    - #### getNodeName

          public String getNodeName()

      Method description
      Returns:

    - #### initFromCommand

          public void initFromCommand(Packet packet)

      Method description
      Specified by:
        `initFromCommand` in interface `RepositoryItem`
      Overrides:
        `initFromCommand` in class `RepositoryItemAbstract`
      Parameters:
        `packet` -

    - #### initFromElement

          public void initFromElement(tigase.xml.Element elem)

      Method description
      Specified by:
        `initFromElement` in interface `RepositoryItem`
      Overrides:
        `initFromElement` in class `RepositoryItemAbstract`
      Parameters:
        `elem` -

    - #### initFromPropertyString

          public void initFromPropertyString(String propString)

      Method description
      Parameters:
        `propString` -

    - #### isCompNodeKey

          public boolean isCompNodeKey(String comp,
                              String node,
                              String key)

      Method description
      Parameters:
        `comp` -
        `node` -
        `key` -
      Returns:

    - #### equals

          public boolean equals(Object o)

      Method description
      Overrides:
        `equals` in class `Object`
      Parameters:
        `o` -
      Returns:

    - #### hashCode

          public int hashCode()

      Method description
      Overrides:
        `hashCode` in class `Object`
      Returns:

    - #### isComponent

          public boolean isComponent(String comp)

      Checks if the given component name is equal to this item compName.
      Parameters:
        `comp` -
      Returns:

    - #### isKey

          public boolean isKey(String key)

      Checks if the given key is equal to this item keyName.
      Parameters:
        `key` -
      Returns:

    - #### isNode

          public boolean isNode(String node)

      Checks if the given node is equal to this item nodeName
      Parameters:
        `node` -
      Returns:

    - #### isNodeKey

          public boolean isNodeKey(String node,
                          String key)

      Checks if the given node and key are equal to this item nodeName and keyName. This method call works the same way as following statement: `isNode(node) && isKey(key)`
      Parameters:
        `node` -
        `key` -
      Returns:

    - #### set

          public void set(String clusterNode_m,
                 String compName_m,
                 String nodeName_m,
                 String key_m,
                 String value_str_m,
                 char val_type_m,
                 String flag_str_m)

      Method description
      Parameters:
        `clusterNode_m` -
        `compName_m` -
        `nodeName_m` -
        `key_m` -
        `value_str_m` -
        `val_type_m` -
        `flag_str_m` -

    - #### set

          public void set(String clusterNode_m,
                 String compName_m,
                 String nodeName_m,
                 String key_m,
                 Object value_m,
                 ConfigItem.FLAGS flag_m)

      Method description
      Parameters:
        `clusterNode_m` -
        `compName_m` -
        `nodeName_m` -
        `key_m` -
        `value_m` -
        `flag_m` -

    - #### set

          public void set(String compName_m,
                 String nodeName_m,
                 String key_m,
                 String value_str_m,
                 char val_type_m,
                 String flag_str_m)

      Method description
      Parameters:
        `compName_m` -
        `nodeName_m` -
        `key_m` -
        `value_str_m` -
        `val_type_m` -
        `flag_str_m` -

    - #### set

          public void set(String compName,
                 String nodeName,
                 String key,
                 Object value)

      Method description
      Parameters:
        `compName` -
        `nodeName` -
        `key` -
        `value` -

    - #### set

          public void set(String clusterNode,
                 String compName,
                 String nodeName,
                 String key,
                 Object value)

      Method description
      Parameters:
        `clusterNode` -
        `compName` -
        `nodeName` -
        `key` -
        `value` -

    - #### setNodeKey

          public void setNodeKey(String clusterNode,
                        String compName,
                        String nodeKey,
                        Object value)

      Method description
      Parameters:
        `clusterNode` -
        `compName` -
        `nodeKey` -
        `value` -

    - #### toElement

          public tigase.xml.Element toElement()

      Method description
      Specified by:
        `toElement` in interface `RepositoryItem`
      Overrides:
        `toElement` in class `RepositoryItemAbstract`
      Returns:

    - #### toPropertyString

          public String toPropertyString()

      Method description
      Returns:

    - #### toString

          public String toString()

      Method description
      Overrides:
        `toString` in class `Object`
      Returns:

Copyright © 2013 Tigase. All rights reserved.