org.jboss.managed.plugins
Class DefaultFieldsImpl

java.lang.Object
  extended by org.jboss.managed.plugins.DefaultFieldsImpl
All Implemented Interfaces:
Serializable, Fields

public class DefaultFieldsImpl
extends Object
implements Fields

A default implementation of the Fields interface.

Version:
$Revision:$
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.jboss.managed.api.Fields
ANNOTATIONS, ATTACHMENT, DESCRIPTION, LEGAL_VALUES, MANDATORY, MAPPED_NAME, MAXIMUM_VALUE, META_TYPE, MINIMUM_VALUE, NAME, PROPERTY_INFO, VALUE
 
Constructor Summary
DefaultFieldsImpl()
          Create a new DefaultFieldsImpl.
DefaultFieldsImpl(String name)
          Create a new DefaultFieldsImpl.
 
Method Summary
 String getDescription()
          Get the description
 Serializable 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
 Object getValue()
          Get the value
 boolean isMandatory()
          Get whether the property is mandatory
 void setDescription(String description)
          Set the description
 void setField(String name, Serializable 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(Serializable value)
          Set the value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFieldsImpl

public DefaultFieldsImpl()
Create a new DefaultFieldsImpl.


DefaultFieldsImpl

public DefaultFieldsImpl(String name)
Create a new DefaultFieldsImpl.

Parameters:
name - the property name
Method Detail

getName

public String getName()
Get the property name

Returns:
the name

setName

public void setName(String name)
Set the property name

Parameters:
name - the name

getDescription

public String getDescription()
Get the description

Returns:
the description

setDescription

public void setDescription(String description)
Set the description

Parameters:
description - the description

getMetaType

public MetaType getMetaType()
Get the meta type

Returns:
the meta type

setMetaType

public void setMetaType(MetaType type)
Set the meta type

Parameters:
type - the meta type

getValue

public Object getValue()
Get the value

Returns:
the value

setValue

public void setValue(Serializable value)
Set the value

Parameters:
value - the value

getLegalValues

public Set<MetaValue> getLegalValues()
Get the legal values

Returns:
the values

setLegalValues

public void setLegalValues(Set<MetaValue> values)
Set the legal values

Parameters:
values - the values

getMinimumValue

public Comparable<?> getMinimumValue()
Get the minimum value

Returns:
the minimum value

setMinimumValue

public void setMinimumValue(Comparable<?> value)
Set the minimum value

Parameters:
value - the value

getMaximumValue

public Comparable<?> getMaximumValue()
Get the maximum value

Returns:
the value

setMaximumValue

public void setMaximumValue(Comparable<?> value)
Get the maximum value

Parameters:
value - the value

isMandatory

public boolean isMandatory()
Get whether the property is mandatory

Returns:
true when mandaotry

setMandatory

public void setMandatory(boolean flag)
Set the mandatory value

Parameters:
flag - true when mandatory

getField

public Serializable getField(String name)
Get a field

Specified by:
getField in interface Fields
Parameters:
name - the field name
Returns:
the field value

setField

public void setField(String name,
                     Serializable value)
Set a field

Specified by:
setField in interface Fields
Parameters:
name - the field name
value - the value

getField

public <T> T getField(String fieldName,
                      Class<T> expected)
Get a field

Type Parameters:
T - the expected type
Parameters:
fieldName - the field name
expected - the expected type
Returns:
the field value


Copyright © 2008 JBoss Inc.. All Rights Reserved.