A
- the type of attribute heldpublic abstract class BaseCustomizableData<A extends Attribute> extends BaseChangeableOpenmrsData implements Customizable<A>
BaseOpenmrsData
for classes that support customization via user-defined attributes.creator
Constructor and Description |
---|
BaseCustomizableData() |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(A attribute)
Adds an attribute.
|
Collection<A> |
getActiveAttributes() |
List<A> |
getActiveAttributes(CustomValueDescriptor ofType) |
Set<A> |
getAttributes() |
void |
setAttribute(A attribute)
Convenience method that voids all existing attributes of the given type, and sets this new one.
|
void |
setAttributes(Set<A> attributes) |
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
equals, getUuid, hashCode, setUuid, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getUuid, setId, setUuid
public Set<A> getAttributes()
getAttributes
in interface Customizable<A extends Attribute>
Customizable.getAttributes()
public void setAttributes(Set<A> attributes)
attributes
- the attributes to setpublic Collection<A> getActiveAttributes()
getActiveAttributes
in interface Customizable<A extends Attribute>
Customizable.getActiveAttributes()
public List<A> getActiveAttributes(CustomValueDescriptor ofType)
getActiveAttributes
in interface Customizable<A extends Attribute>
Customizable.getActiveAttributes(org.openmrs.customdatatype.CustomValueDescriptor)
public void addAttribute(A attribute)
Customizable
addAttribute
in interface Customizable<A extends Attribute>
Customizable.addAttribute(Attribute)
public void setAttribute(A attribute)
attribute
- Copyright © 2024 OpenMRS Inc.. All rights reserved.