Package com.logicaldoc.core.metadata
Class ExtensibleObject
- java.lang.Object
-
- com.logicaldoc.core.PersistentObject
-
- com.logicaldoc.core.metadata.ExtensibleObject
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractDocument
,AttributeSet
,Folder
,Generic
,Template
public abstract class ExtensibleObject extends PersistentObject
An extensible object is able to store an undeterminate number of attributes. Each attribute has a name and a string value.- Since:
- 4.0
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.logicaldoc.core.PersistentObject
DELETED_CODE_DEFAULT, DELETED_CODE_STRONG
-
-
Constructor Summary
Constructors Constructor Description ExtensibleObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attribute
getAttribute(String name)
Attribute
getAttributeAtPosition(int position)
List<String>
getAttributeNames()
List<String>
getAttributeNames(long setId)
Map<String,Attribute>
getAttributes()
Object
getValue(String name)
List<Attribute>
getValueAttributes(String name)
List<Object>
getValues(String name)
void
removeAttribute(String name)
void
setAttribute(String name, Attribute attribute)
Puts a new attribute, if the attribute already exists his position and label are left untouchedvoid
setAttributes(Map<String,Attribute> attributes)
Attribute
setValue(String name, Object value)
List<Attribute>
setValues(String name, Object[] values)
List<Attribute>
setValues(String name, List<Object> values)
-
Methods inherited from class com.logicaldoc.core.PersistentObject
equals, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, hashCode, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString
-
-
-
-
Method Detail
-
removeAttribute
public void removeAttribute(String name)
-
getAttributeAtPosition
public Attribute getAttributeAtPosition(int position)
-
setAttribute
public void setAttribute(String name, Attribute attribute)
Puts a new attribute, if the attribute already exists his position and label are left untouched- Parameters:
name
- name of the attributeattribute
- the attribute instance
-
-