Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
  * JBoss, Home of Professional Open Source
  * Copyright 2006, JBoss Inc., and individual contributors as indicated
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
  * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
 package org.jboss.managed.api;
 
 import java.util.Map;
 import java.util.Set;
 
ManagedProperty.

Author(s):
Adrian Brock
Scott.Stark@jboss.org
Version:
$Revision: 1.1 $
 
 public interface ManagedProperty extends Serializable
 {
   
Get the managed object the property is associated with.

Returns:
the managed object
 
    void setManagedObject(ManagedObject managedObject);

   
Get the ManagedObject

Returns:
the ManagedObject the property references, null if there is no reference or its unresolved.
See also:
org.jboss.managed.api.annotation.ManagementObjectRef
 
    void setTargetManagedObject(ManagedObject target);

   
Get the fields

Returns:
the fields
 
    Fields getFields();
   
   
Get a field

Parameters:
<T> the expected type
fieldName the field name
expected the expected type
Returns:
the value
 
    <T> T getField(String fieldNameClass<T> expected);
   
   
Set a field

Parameters:
fieldName the field name
value the value
 
    void setField(String fieldNameSerializable value);
   
   
Get the property's name

Returns:
the property's name
 
    String getName();

   
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.
 
   String getMappedName();

   
Get the description

Returns:
the description
   String getDescription();

   
Get the type

Returns:
the type
   MetaType getMetaType();

   
Get the annotations associated with the property

Returns:
the annotations associated with the property
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
ManagementProperty:
annotation uses.
   boolean hasViewUse(ViewUse use);

   
Get the value

Returns:
the value
   Object getValue();

   
Set the value

Parameters:
value the value
   void setValue(Serializable value);

   
Get the legal values

Returns:
the legal values
Get the minimum value

Returns:
the minimum value
   Comparable<?> getMinimumValue();

   
Get the miximum value

Returns:
the maximum value
   Comparable<?> getMaximumValue();

   
Check whether this is a valid value

Parameters:
value the value
Returns:
null for a valid value, an error message otherwise
   String checkValidValue(Serializable value);
   
   
Whether the property is mandatory

Returns:
true when mandatory
   boolean isMandatory();
New to GrepCode? Check out our FAQ X