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:
AbstractAttributeSet,AbstractDocument,Folder,Generic
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 AttributegetAttribute(String name)AttributegetAttributeAtPosition(int position)List<String>getAttributeNames()List<String>getAttributeNames(long setId)Map<String,Attribute>getAttributes()TemplategetTemplate()LonggetTemplateId()StringgetTemplateName()ObjectgetValue(String name)List<Attribute>getValueAttributes(String name)List<Object>getValues(String name)voidremoveAttribute(String name)voidsetAttribute(String name, Attribute attribute)Puts a new attribute, if the attribute already exists his position and label are left untouchedvoidsetAttributes(Map<String,Attribute> attributes)voidsetTemplate(Template template)voidsetTemplateId(Long templateId)voidsetTemplateName(String templateName)AttributesetValue(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
-
getTemplateId
public Long getTemplateId()
-
setTemplateId
public void setTemplateId(Long templateId)
-
getTemplateName
public String getTemplateName()
-
setTemplateName
public void setTemplateName(String templateName)
-
getTemplate
public Template getTemplate()
-
setTemplate
public void setTemplate(Template template)
-
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
-
-