public class ConfigItem extends RepositoryItemAbstract
Modifier and Type | Class and Description |
---|---|
static class |
ConfigItem.FLAGS
Enum description
|
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
|
ADMINS_ATT, ADMINS_LABEL, OWNER_ATT, OWNER_LABEL
Constructor and Description |
---|
ConfigItem() |
Modifier and Type | Method and Description |
---|---|
void |
addCommandFields(Packet packet)
The method is used for handling ad-hoc commands.
|
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() |
String |
getKey()
Returns a unique key for the item in the repository.
|
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)
The method used for handling ad-hoc commands.
|
void |
initFromElement(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
|
Element |
toElement()
Method description
|
String |
toPropertyString()
Method description
|
String |
toString()
Method description
|
public static final String CLUSTER_NODE_ATTR
public static final String COMPONENT_NAME_ATTR
public static final String COMPONENT_NAME_LABEL
public static final String FLAG_ATTR
public static final String KEY_NAME_ATTR
public static final String KEY_NAME_LABEL
public static final String NODE_NAME_ATTR
public static final String NODE_NAME_LABEL
public static final String REPO_ITEM_ELEM_NAME
public static final String VALUE_ATTR
public static final String VALUE_LABEL
public static final String VALUE_TYPE_ATTR
public void addCommandFields(Packet packet)
RepositoryItem
addCommandFields
in interface RepositoryItem
addCommandFields
in class RepositoryItemAbstract
packet
- with empty ad-hoc command to fill with fieldspublic String getClusterNode()
public String getCompName()
public String getConfigKey()
nodeName + "/" + keyName
public Object getConfigVal()
public String getConfigValToString()
public String getElemName()
RepositoryItemAbstract
getElemName
in class RepositoryItemAbstract
public ConfigItem.FLAGS getFlag()
public String getKey()
compName + "/" + nodeName + "/" + keyName
public String getKeyName()
keyName
public String getNodeName()
public void initFromCommand(Packet packet)
RepositoryItem
initFromCommand
in interface RepositoryItem
initFromCommand
in class RepositoryItemAbstract
packet
- with ad-hoc command filled by the user.public void initFromElement(Element elem)
initFromElement
in interface RepositoryItem
initFromElement
in class RepositoryItemAbstract
elem
- public void initFromPropertyString(String propString)
propString
- public boolean isCompNodeKey(String comp, String node, String key)
comp
- node
- key
- public boolean equals(Object o)
public boolean isComponent(String comp)
comp
- public boolean isKey(String key)
key
- public boolean isNode(String node)
node
- public boolean isNodeKey(String node, String key)
isNode(node) && isKey(key)
node
- key
- 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)
clusterNode_m
- compName_m
- nodeName_m
- key_m
- value_str_m
- val_type_m
- flag_str_m
- public void set(String clusterNode_m, String compName_m, String nodeName_m, String key_m, Object value_m, ConfigItem.FLAGS flag_m)
clusterNode_m
- compName_m
- nodeName_m
- key_m
- value_m
- flag_m
- public void set(String compName_m, String nodeName_m, String key_m, String value_str_m, char val_type_m, String flag_str_m)
compName_m
- nodeName_m
- key_m
- value_str_m
- val_type_m
- flag_str_m
- public void set(String compName, String nodeName, String key, Object value)
compName
- nodeName
- key
- value
- public void set(String clusterNode, String compName, String nodeName, String key, Object value)
clusterNode
- compName
- nodeName
- key
- value
- public void setNodeKey(String clusterNode, String compName, String nodeKey, Object value)
clusterNode
- compName
- nodeKey
- value
- public Element toElement()
toElement
in interface RepositoryItem
toElement
in class RepositoryItemAbstract
public String toPropertyString()
Copyright © 2018 "Tigase, Inc.". All rights reserved.