***  This class is subject to change   ***

com.sas.portal.portlet.configuration
Interface Attribute

All Superinterfaces:

public interface Attribute
extends java.io.Serializable

Attributes map name/value pairs into metadata records. Currently, only OMR TypedProperty's are supported. Like Configuration, an Attribute cannot be directly instantiated. Clients should call Configuration.setAttribute(). Attribute provides a number of convenience methods to translate the metadata representation of the Attribute value.

Since:
1/15/2003
See Also:
Configuration

Method Summary
 String getName()
          Get the name of the attribute
 String getValue()
          Get the value of the attribute
 boolean getValueAsBoolean()
          Get the value of the attribute, as a boolean.
 boolean getValueAsBoolean(boolean defaultValue)
          Get the value of the attribute, as a boolean.
 double getValueAsDouble()
          Get the value of the attribute, as a double.
 double getValueAsDouble(double defaultValue)
          Get the value of the attribute, as a double.
 float getValueAsFloat()
          Get the value of the attribute, as a float.
 float getValueAsFloat(float defaultValue)
          Get the value of the attribute, as a float.
 int getValueAsInt()
          Get the value of the attribute, as an int.
 int getValueAsInt(int defaultValue)
          Get the value of the attribute, as an int.
 long getValueAsLong()
          Get the value of the attribute, as a long.
 long getValueAsLong(long defaultValue)
          Get the value of the attribute, as a long.
 void setValue(String value)
          Set the value of the attribute
 

Method Detail

getName

public String getName()
Get the name of the attribute
Returns:
String the name of the attribute

setValue

public void setValue(String value)
Set the value of the attribute
Parameters:
value - the value of the attribute

getValue

public String getValue()
Get the value of the attribute
Returns:
String the value of the attribute

getValueAsInt

public int getValueAsInt(int defaultValue)
Get the value of the attribute, as an int. If the value is either not set (null) or cannot be parsed into an int, then the provided default value is used and returned instead.
Parameters:
defaultValue - the value to return if the provided value is not set (null) or cannot be represented as an int
Returns:
the value as an int, or the default value

getValueAsInt

public int getValueAsInt()
Get the value of the attribute, as an int. If the value is either not set (null) or cannot be parsed into an int, then -1 is used and returned instead.
Returns:
the value as an int, or the -1

getValueAsLong

public long getValueAsLong(long defaultValue)
Get the value of the attribute, as a long. If the value is either not set (null) or cannot be parsed into a long, then the provided default value is used and returned instead.
Parameters:
defaultValue - the value to return if the provided value is not set (null) or cannot be represented as a long
Returns:
the value as a long, or the default value

getValueAsLong

public long getValueAsLong()
Get the value of the attribute, as a long. If the value is either not set (null) or cannot be parsed into a long, then -1 is used and returned instead.
Returns:
the value as a long, or the -1

getValueAsDouble

public double getValueAsDouble(double defaultValue)
Get the value of the attribute, as a double. If the value is either not set (null) or cannot be parsed into a double, then the provided default value is used and returned instead.
Parameters:
defaultValue - the value to return if the provided value is not set (null) or cannot be represented as a double
Returns:
the value as a double, or the default value

getValueAsDouble

public double getValueAsDouble()
Get the value of the attribute, as a double. If the value is either not set (null) or cannot be parsed into a double, then -1 is used and returned instead.
Returns:
the value as a double, or the -1

getValueAsFloat

public float getValueAsFloat(float defaultValue)
Get the value of the attribute, as a float. If the value is either not set (null) or cannot be parsed into a float, then the provided default value is used and returned instead.
Parameters:
defaultValue - the value to return if the provided value is not set (null) or cannot be represented as a float
Returns:
the value as a float, or the default value

getValueAsFloat

public float getValueAsFloat()
Get the value of the attribute, as a float. If the value is either not set (null) or cannot be parsed into a float, then -1 is used and returned instead.
Returns:
the value as a float, or the -1

getValueAsBoolean

public boolean getValueAsBoolean(boolean defaultValue)
Get the value of the attribute, as a boolean. If the value is either not set (null) or cannot be parsed into a boolean, then the provided default value is used and returned instead.
Parameters:
defaultValue - the value to return if the provided value is not set (null) or cannot be represented as a boolean
Returns:
the value as a boolean, or the default value

getValueAsBoolean

public boolean getValueAsBoolean()
Get the value of the attribute, as a boolean. If the value is either not set (null) or cannot be parsed into a boolean, then -1 is used and returned instead.
Returns:
the value as a boolean, or the -1

***  This class is subject to change   ***




Copyright © 2005 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:05:13