|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.managed.plugins.ManagedPropertyImpl
public class ManagedPropertyImpl
ManagedProperty.
Constructor Summary | |
---|---|
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. |
Method Summary | ||
---|---|---|
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 |
|
|
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 ManagedObject |
|
|
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)
|
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ManagedPropertyImpl(String name)
name
- the managed property name
IllegalArgumentException
- for null fields or
missing Fields.NAMEpublic ManagedPropertyImpl(Fields fields)
fields
- the fields
IllegalArgumentException
- for null fields or
missing Fields.NAMEpublic ManagedPropertyImpl(ManagedObject managedObject, Fields fields)
managedObject
- the managed object, may be nullfields
- the fields
IllegalArgumentException
- for null fields or
missing Fields.NAMEMethod Detail |
---|
public ManagedObject getManagedObject()
ManagedProperty
getManagedObject
in interface ManagedProperty
public void setManagedObject(ManagedObject managedObject)
setManagedObject
in interface ManagedProperty
managedObject
- the managed objectpublic ManagedObject getTargetManagedObject()
ManagedProperty
getTargetManagedObject
in interface ManagedProperty
ManagementObjectRef}
public void setTargetManagedObject(ManagedObject target)
setTargetManagedObject
in interface ManagedProperty
public Fields getFields()
ManagedProperty
getFields
in interface ManagedProperty
public <T> T getField(String fieldName, Class<T> expected)
ManagedProperty
getField
in interface ManagedProperty
T
- the expected typefieldName
- the field nameexpected
- the expected type
public void setField(String fieldName, Serializable value)
ManagedProperty
setField
in interface ManagedProperty
fieldName
- the field namevalue
- the valuepublic String getName()
ManagedProperty
getName
in interface ManagedProperty
public String getMappedName()
ManagedProperty
getMappedName
in interface ManagedProperty
public String getDescription()
ManagedProperty
getDescription
in interface ManagedProperty
public void setDescription(String description)
description
- the descriptionpublic Map<String,Annotation> getAnnotations()
getAnnotations
in interface ManagedProperty
public void setAnnotations(Map<String,Annotation> annotations)
public boolean hasAnnotation(String key)
ManagedProperty
hasAnnotation
in interface ManagedProperty
key
- the key into ManagedProperty.getAnnotations()
public boolean hasViewUse(ViewUse use)
hasViewUse
in interface ManagedProperty
use
- - the ViewUse to check for
public MetaType getMetaType()
ManagedProperty
getMetaType
in interface ManagedProperty
public void setMetaType(MetaType type)
type
- the meta typepublic MetaValue getValue()
ManagedProperty
getValue
in interface ManagedProperty
public void setValue(MetaValue value)
ManagedProperty
setValue
in interface ManagedProperty
value
- the valuepublic ViewUse[] getViewUse()
public void setViewUse(ViewUse[] use)
public Collection<String> getAdminViewUses()
ManagedProperty
getAdminViewUses
in interface ManagedProperty
public void setAdminViewUses(Collection<String> viewUses)
public ActivationPolicy getActivationPolicy()
ManagedProperty
getActivationPolicy
in interface ManagedProperty
public void setActivationPolicy(ActivationPolicy policy)
public Set<MetaValue> getLegalValues()
ManagedProperty
getLegalValues
in interface ManagedProperty
public void setLegalValues(Set<MetaValue> values)
values
- the valuespublic MetaValue getDefaultValue()
ManagedProperty
getDefaultValue
in interface ManagedProperty
public Comparable<MetaValue> getMinimumValue()
ManagedProperty
getMinimumValue
in interface ManagedProperty
public void setMinimumValue(Comparable<MetaValue> value)
value
- the valuepublic Comparable<MetaValue> getMaximumValue()
ManagedProperty
getMaximumValue
in interface ManagedProperty
public void setMaximumValue(Comparable<MetaValue> value)
value
- the valuepublic String checkValidValue(MetaValue value)
ManagedProperty
checkValidValue
in interface ManagedProperty
value
- the value
public boolean isMandatory()
ManagedProperty
isMandatory
in interface ManagedProperty
public boolean isReadOnly()
ManagedProperty
isReadOnly
in interface ManagedProperty
public void setReadOnly(boolean flag)
public boolean isModified()
ManagedProperty
isModified
in interface ManagedProperty
public void setModified(boolean flag)
ManagedProperty
setModified
in interface ManagedProperty
flag
- - whether the property has been modifiedpublic void setMandatory(boolean flag)
flag
- true for mandatorypublic boolean isRemoved()
ManagedProperty
isRemoved
in interface ManagedProperty
public void setRemoved(boolean flag)
setRemoved
in interface ManagedProperty
flag
- true for removedpublic <T> T getTransientAttachment(Class<T> expectedType)
TransientAttachments
getTransientAttachment
in interface TransientAttachments
T
- the expected typeexpectedType
- the expected type
public Object getTransientAttachment(String name)
TransientAttachments
getTransientAttachment
in interface TransientAttachments
name
- the name
TransientAttachments.setTransientAttachment(String, Object)
public void setTransientAttachment(String name, Object attachment)
TransientAttachments
setTransientAttachment
in interface TransientAttachments
name
- the nameattachment
- the attachment, pass null to remove an attachmentpublic String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public ManagedProperty copy()
ManagedProperty
copy
in interface ManagedProperty
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |