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: 85266 $
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.jboss.managed.api.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 Summary
DefaultFieldsImpl()
          Create a new DefaultFieldsImpl.
DefaultFieldsImpl(String name)
          Create a new DefaultFieldsImpl.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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 MetaValue getValue()
Get the value

Returns:
the value

setValue

public void setValue(MetaValue value)
Set the value

Parameters:
value - the value

getViewUse

public ViewUse[] getViewUse()
Get the view use

Returns:
the view use field

setViewUse

public void setViewUse(ViewUse[] use)
Set the view use

Parameters:
use - - the view use

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 Object 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,
                     Object 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

copy

public Fields copy()
Description copied from interface: Fields
Create a copy of the fields.

Specified by:
copy in interface Fields
Returns:
a copy of the fields.

toString

public String toString()
Display key fields like name, metaType and value

Overrides:
toString in class Object


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.