org.jwarp.service.param
Class Property

java.lang.Object
  |
  +--org.jwarp.service.param.Property
All Implemented Interfaces:
IProperty
Direct Known Subclasses:
Parameter

public class Property
extends java.lang.Object
implements IProperty

Title: JWeb Developer Header Description: Draft Copyright: Copyright (c) 2001 Company: ORCA Systems GmbH

Version:
1.0
Author:
Anatole Tresch

Field Summary
protected  java.lang.String name
           
 java.lang.Object value
           
 
Constructor Summary
Property()
           
Property(java.lang.String name)
           
 
Method Summary
 boolean getAsBoolean(boolean defaultValue)
          Retrieve the boolean value of the specified parameter.
 double getAsDouble(double defaultValue)
          Retrieve the float value of the specified parameter.
 float getAsFloat(float defaultValue)
          Retrieve the float value of the specified parameter.
 int getAsInteger(int defaultValue)
          Retrieve the int value of the specified parameter.
 long getAsLong(long defaultValue)
          Retrieve the long value of the specified parameter.
 java.lang.String getAsString(java.lang.String defaultValue)
          Retrieve the string value of the specified parameter.
 java.lang.String getName()
           
 java.lang.Object getValue()
          Retrieve the value of the specified parameter.
 java.lang.Object getValue(java.lang.Object defaultValue)
          Retrieve the String value of the specified parameter.
 void setName(java.lang.String name)
           
 void setValue(java.lang.Object object)
          Set a new value.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

value

public java.lang.Object value
Constructor Detail

Property

public Property()

Property

public Property(java.lang.String name)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface IProperty

setName

public void setName(java.lang.String name)

setValue

public void setValue(java.lang.Object object)
              throws ParameterException
Set a new value.
Specified by:
setValue in interface IProperty
Parameters:
The - new value
Throws:
ParameterException - Raise if the validation of the new value failes or the parameter is only a IN-parameter (read-only).

getValue

public java.lang.Object getValue(java.lang.Object defaultValue)
Retrieve the String value of the specified parameter.

If the specified parameter cannot be found, defaultValue is returned.

Specified by:
getValue in interface IProperty

getValue

public java.lang.Object getValue()
Description copied from interface: IProperty
Retrieve the value of the specified parameter.
Specified by:
getValue in interface IProperty

getAsInteger

public int getAsInteger(int defaultValue)
Retrieve the int value of the specified parameter.

If the specified parameter cannot be found, defaultValue is returned.

Specified by:
getAsInteger in interface IProperty

getAsLong

public long getAsLong(long defaultValue)
Retrieve the long value of the specified parameter.

If the specified parameter cannot be found, defaultValue is returned.

Specified by:
getAsLong in interface IProperty

getAsString

public java.lang.String getAsString(java.lang.String defaultValue)
Retrieve the string value of the specified parameter.

If the specified parameter cannot be found, defaultValue is returned.

Specified by:
getAsString in interface IProperty

getAsFloat

public float getAsFloat(float defaultValue)
Retrieve the float value of the specified parameter.

If the specified parameter cannot be found, defaultValue is returned.

Specified by:
getAsFloat in interface IProperty

getAsDouble

public double getAsDouble(double defaultValue)
Retrieve the float value of the specified parameter.

If the specified parameter cannot be found, defaultValue is returned.

Specified by:
getAsDouble in interface IProperty

getAsBoolean

public boolean getAsBoolean(boolean defaultValue)
Retrieve the boolean value of the specified parameter.

If the specified parameter cannot be found, defaultValue is returned.

Specified by:
getAsBoolean in interface IProperty

©   O R C A   S y s t e m s