public class ManagedPropertyImpl extends Object implements ManagedProperty
| Constructor and Description |
|---|
ManagedPropertyImpl(Fields fields)
Create a new ManagedProperty that is not associated to
a ManagedObject.
|
ManagedPropertyImpl(ManagedObject managedObject,
Fields fields)
Create a new ManagedProperty.
|
ManagedPropertyImpl(String name)
Create a new ManagedProperty that is not associated to
a ManagedObject.
|
| Modifier and Type | Method and Description |
|---|---|
String |
checkValidValue(MetaValue value)
Check whether this is a valid value
|
ManagedProperty |
copy()
Create a copy of the managed property.
|
boolean |
equals(Object obj) |
ActivationPolicy |
getActivationPolicy()
Get the activation policy for property value updates.
|
Collection<String> |
getAdminViewUses()
Return the admin view names associated with the property
|
Map<String,Annotation> |
getAnnotations()
Get the annotations associated with the property
|
MetaValue |
getDefaultValue()
Get the property default value if one exists.
|
String |
getDescription()
Get the description
|
<T> T |
getField(String fieldName,
Class<T> expected)
Get a field
|
Fields |
getFields()
Get the fields
|
Set<MetaValue> |
getLegalValues()
Get the legal values
|
ManagedObject |
getManagedObject()
Get the managed object the property is associated with.
|
String |
getMappedName()
Get the property's mapped name.
|
Comparable<MetaValue> |
getMaximumValue()
Get the maximum value
|
MetaType |
getMetaType()
Get the type
|
Comparable<MetaValue> |
getMinimumValue()
Get the minimum value
|
String |
getName()
Get the property's name
|
ManagedObject |
getTargetManagedObject()
Get the target ManagedObject.
|
<T> T |
getTransientAttachment(Class<T> expectedType)
Get an attachment from the parameter,
uses the expected type as both the name
and to cast the resulting object.
|
Object |
getTransientAttachment(String name)
Get a transient attachment from the parameter.
|
MetaValue |
getValue()
Get the value
|
ViewUse[] |
getViewUse() |
boolean |
hasAnnotation(String key)
Does the property have the annotation referenced by key.
|
int |
hashCode() |
boolean |
hasViewUse(ViewUse use)
See if the property has the indicated ViewUse among its
|
boolean |
isMandatory()
Whether the property is mandatory
|
boolean |
isModified()
Whether the property has been edited/modified.
|
boolean |
isReadOnly()
Whether the property is read only
|
boolean |
isRemoved()
Whether the property has been marked as removed from its ManagedObject.
|
void |
setActivationPolicy(ActivationPolicy policy) |
void |
setAdminViewUses(Collection<String> viewUses) |
void |
setAnnotations(Map<String,Annotation> annotations) |
void |
setDescription(String description)
Set the description
|
void |
setField(String fieldName,
Serializable value)
Set a field
|
void |
setLegalValues(Set<MetaValue> values)
Set the legal values
|
void |
setManagedObject(ManagedObject managedObject)
Set managed object
|
void |
setMandatory(boolean flag)
Set whether the field is mandatory
|
void |
setMaximumValue(Comparable<MetaValue> value)
Set the maximum value
|
void |
setMetaType(MetaType type)
Set the meta type
|
void |
setMinimumValue(Comparable<MetaValue> value)
Set the minimum value
|
void |
setModified(boolean flag)
Set the modified state of the property value.
|
void |
setReadOnly(boolean flag) |
void |
setRemoved(boolean flag)
Set whether the property is removed
|
void |
setTargetManagedObject(ManagedObject target)
Set the target ManagedObject.
|
void |
setTransientAttachment(String name,
Object attachment)
Set an transient attachment against the parameter.
|
void |
setValue(MetaValue value)
Set the value
|
void |
setViewUse(ViewUse[] use) |
String |
toString() |
public ManagedPropertyImpl(String name)
name - the managed property nameIllegalArgumentException - for null fields or
missing Fields.NAMEpublic ManagedPropertyImpl(Fields fields)
fields - the fieldsIllegalArgumentException - for null fields or
missing Fields.NAMEpublic ManagedPropertyImpl(ManagedObject managedObject, Fields fields)
managedObject - the managed object, may be nullfields - the fieldsIllegalArgumentException - for null fields or
missing Fields.NAMEpublic ManagedObject getManagedObject()
ManagedPropertygetManagedObject in interface ManagedPropertypublic void setManagedObject(ManagedObject managedObject)
setManagedObject in interface ManagedPropertymanagedObject - the managed objectpublic ManagedObject getTargetManagedObject()
ManagedPropertygetTargetManagedObject in interface ManagedPropertyManagementObjectRef}public void setTargetManagedObject(ManagedObject target)
ManagedPropertysetTargetManagedObject in interface ManagedPropertytarget - the target ManagedObjectpublic Fields getFields()
ManagedPropertygetFields in interface ManagedPropertypublic <T> T getField(String fieldName, Class<T> expected)
ManagedPropertygetField in interface ManagedPropertyT - the expected typefieldName - the field nameexpected - the expected typepublic void setField(String fieldName, Serializable value)
ManagedPropertysetField in interface ManagedPropertyfieldName - the field namevalue - the valuepublic String getName()
ManagedPropertygetName in interface ManagedPropertypublic String getMappedName()
ManagedPropertygetMappedName in interface ManagedPropertypublic String getDescription()
ManagedPropertygetDescription in interface ManagedPropertypublic void setDescription(String description)
description - the descriptionpublic Map<String,Annotation> getAnnotations()
getAnnotations in interface ManagedPropertypublic void setAnnotations(Map<String,Annotation> annotations)
public boolean hasAnnotation(String key)
ManagedPropertyhasAnnotation in interface ManagedPropertykey - the key into ManagedProperty.getAnnotations()public boolean hasViewUse(ViewUse use)
hasViewUse in interface ManagedPropertyuse - - the ViewUse to check forpublic MetaType getMetaType()
ManagedPropertygetMetaType in interface ManagedPropertypublic void setMetaType(MetaType type)
type - the meta typepublic MetaValue getValue()
ManagedPropertygetValue in interface ManagedPropertypublic void setValue(MetaValue value)
ManagedPropertysetValue in interface ManagedPropertyvalue - the valuepublic ViewUse[] getViewUse()
public void setViewUse(ViewUse[] use)
public Collection<String> getAdminViewUses()
ManagedPropertygetAdminViewUses in interface ManagedPropertypublic void setAdminViewUses(Collection<String> viewUses)
public ActivationPolicy getActivationPolicy()
ManagedPropertygetActivationPolicy in interface ManagedPropertypublic void setActivationPolicy(ActivationPolicy policy)
public Set<MetaValue> getLegalValues()
ManagedPropertygetLegalValues in interface ManagedPropertypublic void setLegalValues(Set<MetaValue> values)
values - the valuespublic MetaValue getDefaultValue()
ManagedPropertygetDefaultValue in interface ManagedPropertypublic Comparable<MetaValue> getMinimumValue()
ManagedPropertygetMinimumValue in interface ManagedPropertypublic void setMinimumValue(Comparable<MetaValue> value)
value - the valuepublic Comparable<MetaValue> getMaximumValue()
ManagedPropertygetMaximumValue in interface ManagedPropertypublic void setMaximumValue(Comparable<MetaValue> value)
value - the valuepublic String checkValidValue(MetaValue value)
ManagedPropertycheckValidValue in interface ManagedPropertyvalue - the valuepublic boolean isMandatory()
ManagedPropertyisMandatory in interface ManagedPropertypublic boolean isReadOnly()
ManagedPropertyisReadOnly in interface ManagedPropertypublic void setReadOnly(boolean flag)
public boolean isModified()
ManagedPropertyisModified in interface ManagedPropertypublic void setModified(boolean flag)
ManagedPropertysetModified in interface ManagedPropertyflag - - whether the property has been modifiedpublic void setMandatory(boolean flag)
flag - true for mandatorypublic boolean isRemoved()
ManagedPropertyisRemoved in interface ManagedPropertypublic void setRemoved(boolean flag)
setRemoved in interface ManagedPropertyflag - true for removedpublic <T> T getTransientAttachment(Class<T> expectedType)
TransientAttachmentsgetTransientAttachment in interface TransientAttachmentsT - the expected typeexpectedType - the expected typepublic Object getTransientAttachment(String name)
TransientAttachmentsgetTransientAttachment in interface TransientAttachmentsname - the nameTransientAttachments.setTransientAttachment(String, Object)public void setTransientAttachment(String name, Object attachment)
TransientAttachmentssetTransientAttachment in interface TransientAttachmentsname - the nameattachment - the attachment, pass null to remove an attachmentpublic ManagedProperty copy()
ManagedPropertycopy in interface ManagedPropertyCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.