public class ManagedParameterImpl extends Object implements ManagedParameter
| Constructor and Description |
|---|
ManagedParameterImpl(Fields fields)
Create a new ManagedProperty that is not associated to
a ManagedObject.
|
ManagedParameterImpl(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
|
boolean |
equals(Object obj) |
Map<String,Annotation> |
getAnnotations()
Get the annotations associated with the property
|
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
|
Comparable<?> |
getMaximumValue()
Get the miximum value
|
MetaType |
getMetaType()
Get the type
|
Comparable<?> |
getMinimumValue()
Get the minimum value
|
String |
getName()
Get the property's name
|
<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
|
int |
hashCode() |
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 |
setMaximumValue(Comparable<?> value)
Set the maximum value
|
void |
setMetaType(MetaType type)
Set the meta type
|
void |
setMinimumValue(Comparable<?> value)
Set the minimum value
|
void |
setTransientAttachment(String name,
Object attachment)
Set an transient attachment against the parameter.
|
void |
setValue(MetaValue value)
Set the value
|
String |
toString() |
public ManagedParameterImpl(String name)
name - the managed property nameIllegalArgumentException - for null fields or
missing Fields.NAMEpublic ManagedParameterImpl(Fields fields)
fields - the fieldsIllegalArgumentException - for null fields or
missing Fields.NAMEpublic Fields getFields()
ManagedParametergetFields in interface ManagedParameterpublic <T> T getField(String fieldName, Class<T> expected)
ManagedParametergetField in interface ManagedParameterT - the expected typefieldName - the field nameexpected - the expected typepublic void setField(String fieldName, Serializable value)
ManagedParametersetField in interface ManagedParameterfieldName - the field namevalue - the valuepublic String getName()
ManagedParametergetName in interface ManagedParameterpublic String getDescription()
ManagedParametergetDescription in interface ManagedParameterpublic void setDescription(String description)
description - the descriptionpublic Map<String,Annotation> getAnnotations()
public void setAnnotations(Map<String,Annotation> annotations)
public MetaType getMetaType()
ManagedParametergetMetaType in interface ManagedParameterpublic void setMetaType(MetaType type)
type - the meta typepublic MetaValue getValue()
ManagedParametergetValue in interface ManagedParameterpublic void setValue(MetaValue value)
ManagedParametersetValue in interface ManagedParametervalue - the valuepublic Set<MetaValue> getLegalValues()
ManagedParametergetLegalValues in interface ManagedParameterpublic void setLegalValues(Set<MetaValue> values)
values - the valuespublic Comparable<?> getMinimumValue()
ManagedParametergetMinimumValue in interface ManagedParameterpublic void setMinimumValue(Comparable<?> value)
value - the valuepublic Comparable<?> getMaximumValue()
ManagedParametergetMaximumValue in interface ManagedParameterpublic void setMaximumValue(Comparable<?> value)
value - the valuepublic String checkValidValue(MetaValue value)
ManagedParametercheckValidValue in interface ManagedParametervalue - the valuepublic <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 attachmentCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.