org.xwiki.properties.internal
Class DefaultPropertyDescriptor

java.lang.Object
  extended by org.xwiki.properties.internal.DefaultPropertyDescriptor
All Implemented Interfaces:
PropertyDescriptor

public class DefaultPropertyDescriptor
extends Object
implements PropertyDescriptor

Default implementation for PropertyDescriptor.

Since:
2.0M2
Version:
$Id$

Constructor Summary
DefaultPropertyDescriptor()
           
 
Method Summary
 Object getDefaultValue()
          
 String getDescription()
          
 Field getFied()
          
 String getId()
          
 String getName()
          
 Class<?> getPropertyClass()
          Deprecated. 
 Type getPropertyType()
          
 Method getReadMethod()
          
 Method getWriteMethod()
          
 boolean isMandatory()
          
 void setDefaultValue(Object defaultValue)
           
 void setDescription(String description)
           
 void setField(Field field)
           
 void setId(String id)
           
 void setMandatory(boolean mandatory)
           
 void setName(String name)
           
 void setPropertyType(Type propertyType)
           
 void setReadMethod(Method readMethod)
           
 void setWriteMethod(Method writeMethod)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPropertyDescriptor

public DefaultPropertyDescriptor()
Method Detail

getId

public String getId()

Specified by:
getId in interface PropertyDescriptor
Returns:
the identifier of the property.
See Also:
PropertyDescriptor.getId()

setId

public void setId(String id)
Parameters:
id - the identifier of the property.
Since:
2.1M1
See Also:
getId()

getName

public String getName()

Specified by:
getName in interface PropertyDescriptor
Returns:
the display name of the property.
See Also:
PropertyDescriptor.getName()

setName

public void setName(String name)
Parameters:
name - the display name of the property.
Since:
2.1M1
See Also:
getName()

getDescription

public String getDescription()

Specified by:
getDescription in interface PropertyDescriptor
Returns:
the description of the property.
See Also:
PropertyDescriptor.getDescription()

setDescription

public void setDescription(String description)
Parameters:
description - the description of the property.
See Also:
getDescription()

getPropertyClass

@Deprecated
public Class<?> getPropertyClass()
Deprecated. 

Specified by:
getPropertyClass in interface PropertyDescriptor
Returns:
the type of the property.
See Also:
PropertyDescriptor.getPropertyClass()

getPropertyType

public Type getPropertyType()

Specified by:
getPropertyType in interface PropertyDescriptor
Returns:
the type of the property.
See Also:
PropertyDescriptor.getPropertyType()

setPropertyType

public void setPropertyType(Type propertyType)
Parameters:
propertyType - the class of the property.
See Also:
getPropertyClass()

getDefaultValue

public Object getDefaultValue()

Specified by:
getDefaultValue in interface PropertyDescriptor
Returns:
the default value of the property.
See Also:
PropertyDescriptor.getDefaultValue()

setDefaultValue

public void setDefaultValue(Object defaultValue)
Parameters:
defaultValue - the default value of the property.
See Also:
getDefaultValue()

isMandatory

public boolean isMandatory()

Specified by:
isMandatory in interface PropertyDescriptor
Returns:
indicate if the property is mandatory.
See Also:
PropertyDescriptor.isMandatory()

setMandatory

public void setMandatory(boolean mandatory)
Parameters:
mandatory - indicate if the property is mandatory.
See Also:
isMandatory()

setField

public void setField(Field field)
Parameters:
field - the Field.
See Also:
PropertyDescriptor.getFied().

getFied

public Field getFied()

Specified by:
getFied in interface PropertyDescriptor
Returns:
the field. If null if generally mean that the property is based on getter/setter.
See Also:
PropertyDescriptor.getFied()

setReadMethod

public void setReadMethod(Method readMethod)
Parameters:
readMethod - the read Method.
See Also:
PropertyDescriptor.getReadMethod().

getReadMethod

public Method getReadMethod()

Specified by:
getReadMethod in interface PropertyDescriptor
Returns:
the read method. If null it generally mean that the property is a public field.
See Also:
PropertyDescriptor.getReadMethod()

setWriteMethod

public void setWriteMethod(Method writeMethod)
Parameters:
writeMethod - the write Method.
See Also:
PropertyDescriptor.getWriteMethod().

getWriteMethod

public Method getWriteMethod()

Specified by:
getWriteMethod in interface PropertyDescriptor
Returns:
the write method. If null it generally mean that the property is a public field.
See Also:
PropertyDescriptor.getWriteMethod()


Copyright © 2004-2011 XWiki. All Rights Reserved.