|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.openptk.api.Attribute
public class Attribute
The Attribute is used to store a related name / value and meta-data. An Attribute can be one of the following DataType enumerations, if not specified the default is STRING:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.openptk.api.AttributeIF |
|---|
AttributeIF.Access |
| Constructor Summary | |
|---|---|
Attribute(AttributeIF attribute)
Creates a new Attribute from an existing Attribute. |
|
Attribute(java.lang.String name)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
boolean value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
java.lang.Boolean value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
boolean[] value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
java.lang.Boolean[] value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
int value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
int[] value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
java.lang.Integer value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
java.lang.Integer[] value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
java.lang.Long value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
java.lang.Long[] value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
java.lang.Object value)
Creates a new Attribute using the provided name and value. |
|
Attribute(java.lang.String name,
java.lang.Object[] value)
Creates a new Attribute using the provided name and value. |
|
Attribute(java.lang.String name,
java.lang.String value)
Creates a new Attribute using the provided name. |
|
Attribute(java.lang.String name,
java.lang.String[] value)
Creates a new Attribute using the provided name. |
|
| Method Summary | |
|---|---|
boolean |
allowMultivalue()
Return TRUE if the Attribute allows multivalues. |
AttributeIF |
copy()
Returns a "deep" copy of the Attribute. |
AttributeIF.Access |
getAccess()
Get the Attributes Access level. |
java.lang.String |
getAccessAsString()
Get the String representation of the Attributes Access level. |
java.lang.String |
getName()
Get the Attributes name. |
java.util.Properties |
getProperties()
Returns the Properties for the Attribute. |
int |
getPropertiesSize()
Returns the quantity of Properties. |
java.lang.String |
getProperty(java.lang.String key)
Get the Property value from the Attribute. |
State |
getState()
Get the Attributes State. |
DataType |
getType()
Get the Attributes type. |
java.lang.String |
getTypeAsString()
Get the Attributes type, as a String. |
java.lang.Object |
getValue()
Get the Attributes value. |
java.lang.String |
getValueAsString()
Get the attributes value as a String, regardless of it's internal type. |
boolean |
isEncrypted()
Returns TRUE if the value is encrypted. |
boolean |
isMultivalued()
Return TRUE if the actual value is contains muliple values. |
boolean |
isReadOnly()
Get the Attributes read only flag. |
boolean |
isRequired()
Get the Attributes required flag. |
boolean |
isVirtual()
Get the Attributes virtual flag. |
void |
setAccess(AttributeIF.Access access)
Set the Attributes Access level. |
void |
setAccess(java.lang.String access)
Set the Attribute Access level. |
void |
setAllowMultivalue(boolean value)
Set the flag to define if the Attribute allows multivalues. |
void |
setEncrypted(boolean bEncrypted)
Set the flag to define if the Attribute value is encrypted. |
protected void |
setMultiValued(java.lang.Boolean bool)
Set the flag for a value, is it multivalued. |
void |
setProperties(java.util.Properties props)
Sets / Replaces the Attributes Properties. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Add the key / value as a Property to the Attribute. |
void |
setReadOnly(boolean value)
Set the Attributes read only flag. |
void |
setRequired(boolean bool)
Set the Attributes required flag. |
void |
setState(State state)
Set the Attributes State. |
void |
setType(DataType type)
Set the Attributes type (enum). |
void |
setValue(boolean value)
Set the Attributes value to a single Boolean. |
void |
setValue(java.lang.Boolean value)
Set the Attributes value to a single Boolean. |
void |
setValue(boolean[] value)
Set the Attributes value to a Boolean array. |
void |
setValue(java.lang.Boolean[] value)
Set the Attributes value to a Boolean array. |
void |
setValue(int value)
Set the Attributes value to a single Integer. |
void |
setValue(int[] value)
Set the Attributes value to a Integer array. |
void |
setValue(java.lang.Integer value)
Set the Attributes value to a single Integer. |
void |
setValue(java.lang.Integer[] value)
Set the Attributes value to a Integer array. |
void |
setValue(java.lang.Long value)
Set the Attributes value to a single Long. |
void |
setValue(java.lang.Long[] value)
Set the Attributes value to a Long array. |
void |
setValue(java.lang.Object value)
Set the Attributes value to the single Object. |
void |
setValue(java.lang.Object[] value)
Set the Attributes value to the Object array. |
void |
setValue(java.lang.String value)
Set the Attributes value to a single String. |
void |
setValue(java.lang.String[] value)
Set the Attributes value to a String array. |
void |
setVirtual(boolean bool)
Set the Attributes virtual flag. |
java.lang.String |
toString()
Get a String that represents the Attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Attribute(AttributeIF attribute)
attribute - an existing Attributepublic Attribute(java.lang.String name)
name - the Attributes name
public Attribute(java.lang.String name,
boolean value)
name - the Attributes namevalue - the Attributes value [ true | false ]
public Attribute(java.lang.String name,
java.lang.Boolean value)
name - the Attributes namevalue - the Attributes value, Integer [ true | false ]
public Attribute(java.lang.String name,
boolean[] value)
name - the Attributes namevalue - the Attributes value, Boolean[]
public Attribute(java.lang.String name,
java.lang.Boolean[] value)
name - the Attributes namevalue - the Attributes value, Boolean[]
public Attribute(java.lang.String name,
int value)
name - the Attributes namevalue - the Attributes value, Integer
public Attribute(java.lang.String name,
int[] value)
name - the Attributes namevalue - the Attributes value, Integer[]
public Attribute(java.lang.String name,
java.lang.Integer value)
name - the Attributes namevalue - the Attributes value, Integer
public Attribute(java.lang.String name,
java.lang.Integer[] value)
name - the Attributes namevalue - the Attributes value, Integer[]
public Attribute(java.lang.String name,
java.lang.Long value)
name - the Attributes namevalue - the Attributes value, Long
public Attribute(java.lang.String name,
java.lang.Long[] value)
name - the Attributes namevalue - the Attributes value, Long[]
public Attribute(java.lang.String name,
java.lang.Object value)
name - the Attributes namevalue - the Attributes value, Java Object
public Attribute(java.lang.String name,
java.lang.Object[] value)
name - the Attributes namevalue - the Attributes value, Java Object[]
public Attribute(java.lang.String name,
java.lang.String value)
name - the Attributes namevalue - the Attributes value, String
public Attribute(java.lang.String name,
java.lang.String[] value)
name - the Attributes namevalue - the Attributes value, String[]| Method Detail |
|---|
public final boolean allowMultivalue()
allowMultivalue in interface AttributeIFpublic AttributeIF copy()
copy in interface AttributeIFpublic final AttributeIF.Access getAccess()
getAccess in interface AttributeIFpublic final java.lang.String getAccessAsString()
getAccessAsString in interface AttributeIFpublic final java.lang.String getName()
getName in interface AttributeIFpublic final java.util.Properties getProperties()
getProperties in interface AttributeIFpublic final int getPropertiesSize()
getPropertiesSize in interface AttributeIFpublic final java.lang.String getProperty(java.lang.String key)
getProperty in interface AttributeIFkey - the name of the Property
public final State getState()
getState in interface AttributeIFpublic final DataType getType()
getType in interface AttributeIFpublic final java.lang.String getTypeAsString()
getTypeAsString in interface AttributeIFpublic final java.lang.Object getValue()
getValue in interface AttributeIFpublic final java.lang.String getValueAsString()
getValueAsString in interface AttributeIFpublic final boolean isEncrypted()
isEncrypted in interface AttributeIFpublic final boolean isMultivalued()
isMultivalued in interface AttributeIFpublic final boolean isReadOnly()
isReadOnly in interface AttributeIFpublic final boolean isRequired()
isRequired in interface AttributeIFpublic final boolean isVirtual()
isVirtual in interface AttributeIFpublic final void setAccess(AttributeIF.Access access)
setAccess in interface AttributeIFaccess - Access levelpublic final void setAccess(java.lang.String access)
setAccess in interface AttributeIFaccess - String representation of the levelpublic final void setAllowMultivalue(boolean value)
setAllowMultivalue in interface AttributeIFvalue - public final void setEncrypted(boolean bEncrypted)
setEncrypted in interface AttributeIFbEncrypted - protected void setMultiValued(java.lang.Boolean bool)
bool - boolean is it multivalued.public final void setProperties(java.util.Properties props)
setProperties in interface AttributeIFprops - a Properties object
public final void setProperty(java.lang.String key,
java.lang.String value)
setProperty in interface AttributeIFkey - the name of the Propertyvalue - the value of the Propertypublic final void setReadOnly(boolean value)
setReadOnly in interface AttributeIFvalue - flag to define if the Attribute is read onlypublic final void setRequired(boolean bool)
setRequired in interface AttributeIFbool - flag to define if the Attribute is requiredpublic final void setState(State state)
setState in interface AttributeIFstate - Statepublic final void setType(DataType type)
setType in interface AttributeIFtype - DataTypepublic final void setValue(boolean value)
setValue in interface AttributeIFvalue - booleanpublic final void setValue(java.lang.Boolean value)
setValue in interface AttributeIFvalue - Booleanpublic final void setValue(boolean[] value)
setValue in interface AttributeIFvalue - boolean[]public final void setValue(java.lang.Boolean[] value)
setValue in interface AttributeIFvalue - Boolean[]public final void setValue(int value)
setValue in interface AttributeIFvalue - intpublic final void setValue(int[] value)
setValue in interface AttributeIFvalue - int[]public final void setValue(java.lang.Integer value)
setValue in interface AttributeIFvalue - Integerpublic final void setValue(java.lang.Integer[] value)
setValue in interface AttributeIFvalue - Integer[]public final void setValue(java.lang.Long value)
value - Longpublic final void setValue(java.lang.Long[] value)
value - Long[]public final void setValue(java.lang.Object value)
setValue in interface AttributeIFvalue - Objectpublic final void setValue(java.lang.Object[] value)
setValue in interface AttributeIFvalue - Object[]public final void setValue(java.lang.String value)
setValue in interface AttributeIFvalue - Stringpublic final void setValue(java.lang.String[] value)
setValue in interface AttributeIFvalue - String[]public final void setVirtual(boolean bool)
setVirtual in interface AttributeIFbool - flag to define if the Attribute is virtualpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||