public class DefaultFieldsImpl extends Object implements Fields
ACTIVATION_POLICY, ADMIN_VIEWS, ANNOTATIONS, ATTACHMENT, DEFAULT_VALUE, DESCRIPTION, LEGAL_VALUES, MANDATORY, MAPPED_NAME, MAXIMUM_VALUE, META_TYPE, MINIMUM_VALUE, MODIFIED, NAME, PROPERTY_INFO, READ_ONLY, REMOVED, VALUE, VIEW_USE
Constructor and Description |
---|
DefaultFieldsImpl()
Create a new DefaultFieldsImpl.
|
DefaultFieldsImpl(String name)
Create a new DefaultFieldsImpl.
|
Modifier and Type | Method and Description |
---|---|
Fields |
copy()
Create a copy of the fields.
|
String |
getDescription()
Get the description
|
Object |
getField(String name)
Get a field
|
<T> T |
getField(String fieldName,
Class<T> expected)
Get a field
|
Set<MetaValue> |
getLegalValues()
Get the legal values
|
Comparable<?> |
getMaximumValue()
Get the maximum value
|
MetaType |
getMetaType()
Get the meta type
|
Comparable<?> |
getMinimumValue()
Get the minimum value
|
String |
getName()
Get the property name
|
MetaValue |
getValue()
Get the value
|
ViewUse[] |
getViewUse()
Get the view use
|
boolean |
isMandatory()
Get whether the property is mandatory
|
void |
setDescription(String description)
Set the description
|
void |
setField(String name,
Object value)
Set a field
|
void |
setLegalValues(Set<MetaValue> values)
Set the legal values
|
void |
setMandatory(boolean flag)
Set the mandatory value
|
void |
setMaximumValue(Comparable<?> value)
Get the maximum value
|
void |
setMetaType(MetaType type)
Set the meta type
|
void |
setMinimumValue(Comparable<?> value)
Set the minimum value
|
void |
setName(String name)
Set the property name
|
void |
setValue(MetaValue value)
Set the value
|
void |
setViewUse(ViewUse[] use)
Set the view use
|
String |
toString()
Display key fields like name, metaType and value
|
public DefaultFieldsImpl()
public DefaultFieldsImpl(String name)
name
- the property namepublic String getName()
public void setName(String name)
name
- the namepublic String getDescription()
public void setDescription(String description)
description
- the descriptionpublic MetaType getMetaType()
public void setMetaType(MetaType type)
type
- the meta typepublic MetaValue getValue()
public void setValue(MetaValue value)
value
- the valuepublic ViewUse[] getViewUse()
public void setViewUse(ViewUse[] use)
use
- - the view usepublic void setLegalValues(Set<MetaValue> values)
values
- the valuespublic Comparable<?> getMinimumValue()
public void setMinimumValue(Comparable<?> value)
value
- the valuepublic Comparable<?> getMaximumValue()
public void setMaximumValue(Comparable<?> value)
value
- the valuepublic boolean isMandatory()
public void setMandatory(boolean flag)
flag
- true when mandatorypublic <T> T getField(String fieldName, Class<T> expected)
T
- the expected typefieldName
- the field nameexpected
- the expected typeCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.