AttrClass
- the type of attribute heldpublic abstract class BaseCustomizableData<A extends Attribute> extends BaseOpenmrsData 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.
|
java.util.Collection<A> |
getActiveAttributes() |
java.util.List<A> |
getActiveAttributes(CustomValueDescriptor ofType) |
java.util.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(java.util.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 java.util.Set<A> getAttributes()
getAttributes
in interface Customizable<A extends Attribute>
Customizable.getAttributes()
public void setAttributes(java.util.Set<A> attributes)
attributes
- the attributes to setpublic java.util.Collection<A> getActiveAttributes()
getActiveAttributes
in interface Customizable<A extends Attribute>
Customizable.getActiveAttributes()
public java.util.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>
org.openmrs.customdatatype.Customizable#addAttribute(org.openmrs.customdatatype.SingleCustomValue)
public void setAttribute(A attribute)
attribute
- Copyright © 2018 OpenMRS Inc.. All Rights Reserved.