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()
ManagedParameter
getFields
in interface ManagedParameter
public <T> T getField(String fieldName, Class<T> expected)
ManagedParameter
getField
in interface ManagedParameter
T
- the expected typefieldName
- the field nameexpected
- the expected typepublic void setField(String fieldName, Serializable value)
ManagedParameter
setField
in interface ManagedParameter
fieldName
- the field namevalue
- the valuepublic String getName()
ManagedParameter
getName
in interface ManagedParameter
public String getDescription()
ManagedParameter
getDescription
in interface ManagedParameter
public void setDescription(String description)
description
- the descriptionpublic Map<String,Annotation> getAnnotations()
public void setAnnotations(Map<String,Annotation> annotations)
public MetaType getMetaType()
ManagedParameter
getMetaType
in interface ManagedParameter
public void setMetaType(MetaType type)
type
- the meta typepublic MetaValue getValue()
ManagedParameter
getValue
in interface ManagedParameter
public void setValue(MetaValue value)
ManagedParameter
setValue
in interface ManagedParameter
value
- the valuepublic Set<MetaValue> getLegalValues()
ManagedParameter
getLegalValues
in interface ManagedParameter
public void setLegalValues(Set<MetaValue> values)
values
- the valuespublic Comparable<?> getMinimumValue()
ManagedParameter
getMinimumValue
in interface ManagedParameter
public void setMinimumValue(Comparable<?> value)
value
- the valuepublic Comparable<?> getMaximumValue()
ManagedParameter
getMaximumValue
in interface ManagedParameter
public void setMaximumValue(Comparable<?> value)
value
- the valuepublic String checkValidValue(MetaValue value)
ManagedParameter
checkValidValue
in interface ManagedParameter
value
- the valuepublic <T> T getTransientAttachment(Class<T> expectedType)
TransientAttachments
getTransientAttachment
in interface TransientAttachments
T
- the expected typeexpectedType
- the expected typepublic Object getTransientAttachment(String name)
TransientAttachments
getTransientAttachment
in interface TransientAttachments
name
- the nameTransientAttachments.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 attachmentCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.