org.alfresco.repo.attributes
Class AbstractAttribute

java.lang.Object
  extended by org.alfresco.repo.attributes.AbstractAttribute
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, Attribute
Direct Known Subclasses:
AttributeImpl, AttributeValue

public abstract class AbstractAttribute
extends java.lang.Object
implements Attribute

Base class for handling basic type conversions.

Since:
V2.1.2
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.repo.attributes.Attribute
Attribute.Type
 
Constructor Summary
AbstractAttribute()
           
 
Method Summary
 void add(Attribute attr)
          ListAttributeValue-specific method.
 void add(int index, Attribute attr)
          ListAttributeValue-specific method.
 void clear()
          MapAttributeValue-specific method.
 java.util.Set entrySet()
          MapAttributeValue-specific method.
 Attribute get(int index)
          ListAttributeValue-specific method.
 Attribute get(java.lang.String key)
          MapAttributeValue-specific method.
 AttributeImpl getAttributeImpl()
           
 AttributeValue getAttributeValue()
           
 byte[] getBlobValue()
          Get a Blob value from a BlobValue
 boolean getBooleanValue()
          Get the value of a BooleanValue.
 byte getByteValue()
          Get the value of a ByteValue.
 double getDoubleValue()
          Get a double value from a DoubleValue.
 float getFloatValue()
          Get the value of a FloatValue.
 int getIntValue()
          Get the integer value of an IntValue.
 long getLongValue()
          Get the long value of a LongValue.
 java.io.Serializable getSerializableValue()
          Get a Seriailizable value from a SerializableValue
 short getShortValue()
          Get the value of a ShortValue.
 java.lang.String getStringValue()
          Get a String value from a StringValue.
 java.util.Iterator iterator()
          ListAttributeValue-specific method.
 java.util.Set keySet()
          MapAttributeValue-specific method.
 void put(java.lang.String key, Attribute value)
          MapAttributeValue-specific method.
 void remove(int index)
          ListAttributeValue-specific method.
 void remove(java.lang.String key)
          MapAttributeValue-specific method.
 void set(int index, Attribute value)
          ListAttributeValue-specific method.
 void setBlobValue(byte[] value)
          Set a Blob value.
 void setBooleanValue(boolean value)
          Set a boolean value.
 void setByteValue(byte value)
          Set a byte value.
 void setDoubleValue(double value)
          Set a double value.
 void setFloatValue(float value)
          Set a float value.
 void setIntValue(int value)
          Set an integer value.
 void setLongValue(long value)
          Set a long value.
 void setSerializableValue(java.io.Serializable value)
          Set a Serializable value.
 void setShortValue(short value)
          Set a short value.
 void setStringValue(java.lang.String value)
          Set a String value.
 int size()
          ListAttributeValue or MapAttributeValue-specific method.
 java.util.Collection values()
          MapAttributeValue-specific method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.repo.attributes.Attribute
getAcl, getRawValue, getType, setAcl
 

Constructor Detail

AbstractAttribute

public AbstractAttribute()
Method Detail

getAttributeImpl

public final AttributeImpl getAttributeImpl()
Specified by:
getAttributeImpl in interface Attribute
See Also:
Attribute.Type.getAttributeImpl(Attribute)

getAttributeValue

public final AttributeValue getAttributeValue()
Specified by:
getAttributeValue in interface Attribute
See Also:
Attribute.Type.getAttributeValue(Attribute)

add

public void add(Attribute attr)
ListAttributeValue-specific method.

Specified by:
add in interface Attribute

add

public void add(int index,
                Attribute attr)
ListAttributeValue-specific method.

Specified by:
add in interface Attribute
Parameters:
index - The offset.
attr - The attribute.

iterator

public java.util.Iterator iterator()
ListAttributeValue-specific method.

Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface Attribute

size

public int size()
ListAttributeValue or MapAttributeValue-specific method.

Specified by:
size in interface Attribute
Returns:

get

public Attribute get(int index)
ListAttributeValue-specific method.

Specified by:
get in interface Attribute
Parameters:
index - The offset.
Returns:
The Attribute or null.

remove

public void remove(int index)
ListAttributeValue-specific method.

Specified by:
remove in interface Attribute
Parameters:
index - The entry to remove.

set

public void set(int index,
                Attribute value)
ListAttributeValue-specific method.

Specified by:
set in interface Attribute
Parameters:
index - The index to set.
value - The attribute to set.

clear

public void clear()
MapAttributeValue-specific method.

Specified by:
clear in interface Attribute

entrySet

public java.util.Set entrySet()
MapAttributeValue-specific method.

Specified by:
entrySet in interface Attribute
Returns:
The entry set.

keySet

public java.util.Set keySet()
MapAttributeValue-specific method.

Specified by:
keySet in interface Attribute
Returns:
The key set.

values

public java.util.Collection values()
MapAttributeValue-specific method.

Specified by:
values in interface Attribute
Returns:
The values.

put

public void put(java.lang.String key,
                Attribute value)
MapAttributeValue-specific method.

Specified by:
put in interface Attribute
Parameters:
key - The key to the entry.
value - The Value of the entry.

remove

public void remove(java.lang.String key)
MapAttributeValue-specific method.

Specified by:
remove in interface Attribute
Parameters:
key - The key of the entry to remove.

get

public Attribute get(java.lang.String key)
MapAttributeValue-specific method.

Specified by:
get in interface Attribute
Parameters:
key - The key.
Returns:
The value.

getBlobValue

public byte[] getBlobValue()
Description copied from interface: Attribute
Get a Blob value from a BlobValue

Specified by:
getBlobValue in interface Attribute
Returns:
The value.

getBooleanValue

public boolean getBooleanValue()
Description copied from interface: Attribute
Get the value of a BooleanValue.

Specified by:
getBooleanValue in interface Attribute
Returns:
The value.

getByteValue

public byte getByteValue()
Description copied from interface: Attribute
Get the value of a ByteValue.

Specified by:
getByteValue in interface Attribute
Returns:
The value.

getShortValue

public short getShortValue()
Description copied from interface: Attribute
Get the value of a ShortValue.

Specified by:
getShortValue in interface Attribute
Returns:
The value.

getIntValue

public int getIntValue()
Description copied from interface: Attribute
Get the integer value of an IntValue.

Specified by:
getIntValue in interface Attribute
Returns:
The value.

getLongValue

public long getLongValue()
Description copied from interface: Attribute
Get the long value of a LongValue.

Specified by:
getLongValue in interface Attribute
Returns:
The value.

getDoubleValue

public double getDoubleValue()
Description copied from interface: Attribute
Get a double value from a DoubleValue.

Specified by:
getDoubleValue in interface Attribute
Returns:
The value.

getFloatValue

public float getFloatValue()
Description copied from interface: Attribute
Get the value of a FloatValue.

Specified by:
getFloatValue in interface Attribute
Returns:
The value.

getStringValue

public java.lang.String getStringValue()
Description copied from interface: Attribute
Get a String value from a StringValue.

Specified by:
getStringValue in interface Attribute
Returns:
The value.

getSerializableValue

public java.io.Serializable getSerializableValue()
Description copied from interface: Attribute
Get a Seriailizable value from a SerializableValue

Specified by:
getSerializableValue in interface Attribute
Returns:
The value.

setBlobValue

public void setBlobValue(byte[] value)
Description copied from interface: Attribute
Set a Blob value.

Specified by:
setBlobValue in interface Attribute
Parameters:
value - The value to set.

setBooleanValue

public void setBooleanValue(boolean value)
Description copied from interface: Attribute
Set a boolean value.

Specified by:
setBooleanValue in interface Attribute
Parameters:
value - The value.

setByteValue

public void setByteValue(byte value)
Description copied from interface: Attribute
Set a byte value.

Specified by:
setByteValue in interface Attribute
Parameters:
value - The value to set.

setShortValue

public void setShortValue(short value)
Description copied from interface: Attribute
Set a short value.

Specified by:
setShortValue in interface Attribute
Parameters:
value - The value to set.

setIntValue

public void setIntValue(int value)
Description copied from interface: Attribute
Set an integer value.

Specified by:
setIntValue in interface Attribute
Parameters:
value - The value to set.

setLongValue

public void setLongValue(long value)
Description copied from interface: Attribute
Set a long value.

Specified by:
setLongValue in interface Attribute
Parameters:
value - The value to set.

setDoubleValue

public void setDoubleValue(double value)
Description copied from interface: Attribute
Set a double value.

Specified by:
setDoubleValue in interface Attribute
Parameters:
value - The value to set.

setFloatValue

public void setFloatValue(float value)
Description copied from interface: Attribute
Set a float value.

Specified by:
setFloatValue in interface Attribute
Parameters:
value - The value to set.

setStringValue

public void setStringValue(java.lang.String value)
Description copied from interface: Attribute
Set a String value.

Specified by:
setStringValue in interface Attribute
Parameters:
value - The value to set.

setSerializableValue

public void setSerializableValue(java.io.Serializable value)
Description copied from interface: Attribute
Set a Serializable value.

Specified by:
setSerializableValue in interface Attribute


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.