org.jboss.managed.api
Interface ManagedProperty

All Superinterfaces:
Serializable
All Known Implementing Classes:
ManagedPropertyImpl, ManagementProperty.NULL_PROPERTY_FACTORY, WritethroughManagedPropertyImpl

public interface ManagedProperty
extends Serializable

ManagedProperty.

Version:
$Revision: 1.1 $
Author:
Adrian Brock, Scott.Stark@jboss.org

Method Summary
 String checkValidValue(Serializable value)
          Check whether this is a valid value
 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<org.jboss.metatype.api.values.MetaValue> getLegalValues()
          Get the legal values
 ManagedObject getManagedObject()
          Get the managed object the property is associated with.
 String getMappedName()
          Get the property's mapped name.
 Comparable<?> getMaximumValue()
          Get the miximum value
 org.jboss.metatype.api.types.MetaType getMetaType()
          Get the type
 Comparable<?> getMinimumValue()
          Get the minimum value
 String getName()
          Get the property's name
 ManagedObject getTargetManagedObject()
          Get the ManagedObject
 Object getValue()
          Get the value
 boolean hasViewUse(ViewUse use)
          See if the property has the indicated ViewUse among its
 boolean isMandatory()
          Whether the property is mandatory
 void setField(String fieldName, Serializable value)
          Set a field
 void setManagedObject(ManagedObject managedObject)
           
 void setTargetManagedObject(ManagedObject target)
           
 void setValue(Serializable value)
          Set the value
 

Method Detail

getManagedObject

ManagedObject getManagedObject()
Get the managed object the property is associated with.

Returns:
the managed object

setManagedObject

void setManagedObject(ManagedObject managedObject)

getTargetManagedObject

ManagedObject getTargetManagedObject()
Get the ManagedObject

Returns:
the ManagedObject the property references, null if there is no reference or its unresolved.
See Also:
ManagementObjectRef}

setTargetManagedObject

void setTargetManagedObject(ManagedObject target)

getFields

Fields getFields()
Get the fields

Returns:
the fields

getField

<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 value

setField

void setField(String fieldName,
              Serializable value)
Set a field

Parameters:
fieldName - the field name
value - the value

getName

String getName()
Get the property's name

Returns:
the property's name

getMappedName

String getMappedName()
Get the property's mapped name. This is an optional name that allows for an external name to be mapped to an internal one.

Returns:
the mapped name if it exists, null if there is no mapped name.

getDescription

String getDescription()
Get the description

Returns:
the description

getMetaType

org.jboss.metatype.api.types.MetaType getMetaType()
Get the type

Returns:
the type

getAnnotations

Map<String,Annotation> getAnnotations()
Get the annotations associated with the property

Returns:
the annotations associated with the property

hasViewUse

boolean hasViewUse(ViewUse use)
See if the property has the indicated ViewUse among its

Parameters:
use - - the ViewUse to check for
Returns:
true if the ViewUse exists in the property uses, false otherwise

getValue

Object getValue()
Get the value

Returns:
the value

setValue

void setValue(Serializable value)
Set the value

Parameters:
value - the value

getLegalValues

Set<org.jboss.metatype.api.values.MetaValue> getLegalValues()
Get the legal values

Returns:
the legal values

getMinimumValue

Comparable<?> getMinimumValue()
Get the minimum value

Returns:
the minimum value

getMaximumValue

Comparable<?> getMaximumValue()
Get the miximum value

Returns:
the maximum value

checkValidValue

String checkValidValue(Serializable value)
Check whether this is a valid value

Parameters:
value - the value
Returns:
null for a valid value, an error message otherwise

isMandatory

boolean isMandatory()
Whether the property is mandatory

Returns:
true when mandatory


Copyright © 2008 JBoss Inc.. All Rights Reserved.