|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ElementIF
The ElementIF interface is used by many classes within the package. It defines core functionality and supports storing both Properties and Attributes, each of these can be be used for application specific purposes
Method Summary | |
---|---|
void |
addAttribute(AttributeIF attr)
Add an Attribute, copying an existing Attribute. |
void |
addAttribute(java.lang.String name)
Add an Attribute, name only, with no value. |
void |
addAttribute(java.lang.String name,
boolean value)
Add an Attribute with the give name and boolean value. |
void |
addAttribute(java.lang.String name,
java.lang.Boolean value)
|
void |
addAttribute(java.lang.String name,
java.lang.Boolean[] value)
|
void |
addAttribute(java.lang.String name,
int value)
Add an Attribute with the give name and integer value. |
void |
addAttribute(java.lang.String name,
java.lang.Integer value)
|
void |
addAttribute(java.lang.String name,
java.lang.Integer[] value)
|
void |
addAttribute(java.lang.String name,
long value)
|
void |
addAttribute(java.lang.String name,
java.lang.Long value)
|
void |
addAttribute(java.lang.String name,
java.lang.Long[] value)
|
void |
addAttribute(java.lang.String name,
java.lang.Object value)
Add an Attribute with the give name and Object value. |
void |
addAttribute(java.lang.String name,
java.lang.String value)
Add an Attribute with the give name and a single String value. |
void |
addAttribute(java.lang.String name,
java.lang.String[] values)
Add an Attribute with the give name and multiple String values. |
void |
addAttributes(java.util.List<java.lang.String> names)
Add multiple Attributes, with no value, one for each String. |
ElementIF |
copy()
Returns a copy of the Element. |
AttributeIF |
getAttribute(java.lang.String name)
Get the named Attribute. |
java.lang.String[] |
getAttributeNames()
Gets all the Attribute names. |
java.util.Map<java.lang.String,AttributeIF> |
getAttributes()
Get all of the Attributes as a Properties object. |
int |
getAttributesSize()
Get the number of Attributes. |
java.lang.String |
getDescription()
Get the Description a generic value that can be defined by the application. |
java.lang.String |
getKey()
Gets the name of the attribute which is defined as the unique primary key. |
java.util.Properties |
getProperties()
Get all of the Properties. |
int |
getPropertiesSize()
Get the number Property key/value pairs. |
java.lang.String |
getProperty(java.lang.String key)
Get a property value. |
State |
getState()
Get the state. |
java.lang.String |
getStateAsString()
Get the String representation for the current state. |
java.lang.String |
getStatus()
Get the status a general purpose piece of information that can store arbitrary information, typically used to store application status information. |
java.lang.Object |
getUniqueId()
Get the Unique ID, a generic identifier. |
DataType |
getUniqueIdType()
|
boolean |
isError()
Flag to determine if there was an Error. |
void |
removeAttribute(java.lang.String name)
Remove the named Attribute. |
void |
removeProperty(java.lang.String name)
Remove the named Property |
void |
setAttributes(java.util.Map<java.lang.String,AttributeIF> map)
Set / Replace all Attributes with the new Collection. |
void |
setDescription(java.lang.String str)
Set the Description, a generic value that can be defined. |
void |
setError(boolean error)
Flag to set if there is an Error. |
void |
setKey(java.lang.String key)
Sets the name of the attribute which is defined as the unique primary key. |
void |
setProperties(java.util.Properties props)
Set/Replace the properties with the new Properties. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Set a property using the key and value. |
void |
setState(State state)
Set the state, see State for valid states. |
void |
setStatus(java.lang.String str)
Set the status a general purpose piece of information that can be used to store arbitrary information, typically used to store application level status information. |
void |
setUniqueId(ElementIF value)
|
void |
setUniqueId(java.lang.Integer value)
|
void |
setUniqueId(java.lang.Long value)
|
void |
setUniqueId(java.lang.String value)
Set the Unique ID a generic identifier, this should be a unique value. |
Method Detail |
---|
void addAttribute(AttributeIF attr)
attr
- an existing AttributeIFvoid addAttribute(java.lang.String name)
name
- of the Attributevoid addAttribute(java.lang.String name, boolean value)
name
- of the Attributevalue
- TRUE/FALSEvoid addAttribute(java.lang.String name, java.lang.Boolean value)
void addAttribute(java.lang.String name, java.lang.Boolean[] value)
void addAttribute(java.lang.String name, int value)
name
- of the Attributevalue
- integervoid addAttribute(java.lang.String name, java.lang.Integer value)
void addAttribute(java.lang.String name, java.lang.Integer[] value)
void addAttribute(java.lang.String name, long value)
void addAttribute(java.lang.String name, java.lang.Long value)
void addAttribute(java.lang.String name, java.lang.Long[] value)
void addAttribute(java.lang.String name, java.lang.Object value)
name
- of the Attributevalue
- Objectvoid addAttribute(java.lang.String name, java.lang.String value)
name
- of the Attributevalue
- of the Attributevoid addAttribute(java.lang.String name, java.lang.String[] values)
name
- of the Attributevalues
- String[] with multiple valuesvoid addAttributes(java.util.List<java.lang.String> names)
names
- List of Attributes to addElementIF copy()
AttributeIF getAttribute(java.lang.String name)
name
- the Attributes name
java.lang.String[] getAttributeNames()
java.util.Map<java.lang.String,AttributeIF> getAttributes()
int getAttributesSize()
java.lang.String getDescription()
java.lang.String getKey()
java.util.Properties getProperties()
int getPropertiesSize()
java.lang.String getProperty(java.lang.String key)
key
- for the property
State getState()
java.lang.String getStateAsString()
java.lang.String getStatus()
java.lang.Object getUniqueId()
DataType getUniqueIdType()
boolean isError()
void removeAttribute(java.lang.String name)
name
- the Attributes namevoid removeProperty(java.lang.String name)
name
- of the propertyvoid setAttributes(java.util.Map<java.lang.String,AttributeIF> map)
map
- Collection of new AttributeIF itemsvoid setDescription(java.lang.String str)
str
- the description for the Elementvoid setError(boolean error)
error
- set the error flagvoid setKey(java.lang.String key)
key
- the name of the attribute which defines the primary keyvoid setProperties(java.util.Properties props)
props
- new properties objectvoid setProperty(java.lang.String key, java.lang.String value)
key
- for the propertyvalue
- for the propertyvoid setState(State state)
state
- the Statevoid setStatus(java.lang.String str)
str
- the Elements statusvoid setUniqueId(ElementIF value)
void setUniqueId(java.lang.Integer value)
value
- void setUniqueId(java.lang.Long value)
value
- void setUniqueId(java.lang.String value)
value
- the Elements unique id
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |