org.alfresco.repo.attributes
Interface Attribute

All Superinterfaces:
java.lang.Iterable, java.io.Serializable
All Known Subinterfaces:
BooleanAttribute, ByteAttribute, DoubleAttribute, FloatAttribute, IntAttribute, ListAttribute, LongAttribute, MapAttribute, SerializableAttribute, ShortAttribute, StringAttribute
All Known Implementing Classes:
AbstractAttribute, AttributeImpl, AttributeValue, BooleanAttributeImpl, BooleanAttributeValue, ByteAttributeImpl, ByteAttributeValue, DoubleAttributeImpl, DoubleAttributeValue, FloatAttributeImpl, FloatAttributeValue, IntAttributeImpl, IntAttributeValue, ListAttributeImpl, ListAttributeValue, LongAttributeImpl, LongAttributeValue, MapAttributeImpl, MapAttributeValue, SerializableAttributeImpl, SerializableAttributeValue, ShortAttributeImpl, ShortAttributeValue, StringAttributeImpl, StringAttributeValue

public interface Attribute
extends java.io.Serializable, java.lang.Iterable

Interface for polymorphic attributes.


Nested Class Summary
static class Attribute.Type
           
 
Method Summary
 void add(Attribute attr)
          Add an attribute to a list attribute.
 void add(int index, Attribute attr)
          Add an attribute to a list attribute at a given position.
 void clear()
          Clear a map.
 java.util.Set entrySet()
          Get the entry set for a map.
 Attribute get(int index)
          Get an Attribute from a List.
 Attribute get(java.lang.String key)
          Get the Value for a key in a map.
 DbAccessControlList getAcl()
          Get the (possibly null ACL) on this Attribute.
 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 getRawValue()
          Method to return the underlying raw data for possible conversion to the descired type.
 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.
 Attribute.Type getType()
           
 java.util.Iterator iterator()
          Get an iterator over a list's entries.
 java.util.Set keySet()
          Get the key set for a map.
 void put(java.lang.String key, Attribute value)
          Add an entry to a map.
 void remove(int index)
          Remove an entry from a list.
 void remove(java.lang.String key)
          Remove an entry by key from a map.
 void set(int index, Attribute value)
          Set an attribute in a list.
 void setAcl(DbAccessControlList acl)
          Set the ACL on this Attribute.
 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()
          Get the size of a List of a Map.
 java.util.Collection values()
          Get the collection of values of a map.
 

Method Detail

setAcl

void setAcl(DbAccessControlList acl)
Set the ACL on this Attribute.

Parameters:
acl - The ACL.

getAcl

DbAccessControlList getAcl()
Get the (possibly null ACL) on this Attribute.

Returns:
The ACL or null.

getType

Attribute.Type getType()
Returns:
the enumerated type

getRawValue

java.io.Serializable getRawValue()
Method to return the underlying raw data for possible conversion to the descired type.

Returns:
Returns a raw data value

getAttributeValue

AttributeValue getAttributeValue()
See Also:
Attribute.Type.getAttributeValue(Attribute)

getAttributeImpl

AttributeImpl getAttributeImpl()
See Also:
Attribute.Type.getAttributeImpl(Attribute)

setBooleanValue

void setBooleanValue(boolean value)
Set a boolean value.

Parameters:
value - The value.

getBooleanValue

boolean getBooleanValue()
Get the value of a BooleanValue.

Returns:
The value.

setByteValue

void setByteValue(byte value)
Set a byte value.

Parameters:
value - The value to set.

getByteValue

byte getByteValue()
Get the value of a ByteValue.

Returns:
The value.

setShortValue

void setShortValue(short value)
Set a short value.

Parameters:
value - The value to set.

getShortValue

short getShortValue()
Get the value of a ShortValue.

Returns:
The value.

setIntValue

void setIntValue(int value)
Set an integer value.

Parameters:
value - The value to set.

getIntValue

int getIntValue()
Get the integer value of an IntValue.

Returns:
The value.

setLongValue

void setLongValue(long value)
Set a long value.

Parameters:
value - The value to set.

getLongValue

long getLongValue()
Get the long value of a LongValue.

Returns:
The value.

setFloatValue

void setFloatValue(float value)
Set a float value.

Parameters:
value - The value to set.

getFloatValue

float getFloatValue()
Get the value of a FloatValue.

Returns:
The value.

setDoubleValue

void setDoubleValue(double value)
Set a double value.

Parameters:
value - The value to set.

getDoubleValue

double getDoubleValue()
Get a double value from a DoubleValue.

Returns:
The value.

setStringValue

void setStringValue(java.lang.String value)
Set a String value.

Parameters:
value - The value to set.

getStringValue

java.lang.String getStringValue()
Get a String value from a StringValue.

Returns:
The value.

setBlobValue

void setBlobValue(byte[] value)
Set a Blob value.

Parameters:
value - The value to set.

getBlobValue

byte[] getBlobValue()
Get a Blob value from a BlobValue

Returns:
The value.

setSerializableValue

void setSerializableValue(java.io.Serializable value)
Set a Serializable value.

Parameters:
value -

getSerializableValue

java.io.Serializable getSerializableValue()
Get a Seriailizable value from a SerializableValue

Returns:
The value.

clear

void clear()
Clear a map.


put

void put(java.lang.String key,
         Attribute value)
Add an entry to a map.

Parameters:
key - The key to the entry.
value - The Value of the entry.

get

Attribute get(java.lang.String key)
Get the Value for a key in a map.

Parameters:
key - The key.
Returns:
The value.

remove

void remove(java.lang.String key)
Remove an entry by key from a map.

Parameters:
key - The key of the entry to remove.

entrySet

java.util.Set entrySet()
Get the entry set for a map.

Returns:
The entry set.

keySet

java.util.Set keySet()
Get the key set for a map.

Returns:
The key set.

values

java.util.Collection values()
Get the collection of values of a map.

Returns:
The values.

add

void add(Attribute attr)
Add an attribute to a list attribute.

Parameters:
attr -

add

void add(int index,
         Attribute attr)
Add an attribute to a list attribute at a given position.

Parameters:
index - The offset.
attr - The attribute.

size

int size()
Get the size of a List of a Map.

Returns:

iterator

java.util.Iterator iterator()
Get an iterator over a list's entries.

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

get

Attribute get(int index)
Get an Attribute from a List.

Parameters:
index - The offset.
Returns:
The Attribute or null.

remove

void remove(int index)
Remove an entry from a list.

Parameters:
index - The entry to remove.

set

void set(int index,
         Attribute value)
Set an attribute in a list.

Parameters:
index - The index to set.
value - The attribute to set.


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