com.bea.ales.management.common
Interface AttributeElement


public interface AttributeElement
extends ConstAttributeElement, java.lang.Cloneable

AttributeElement represents an attribute name value pair. It stands for identity attribute, resource attribute, role attribute or dynamic attribute. This interface provides the "setter" methods, and inherits the "getter" methods from the ConstAttributeElement interface. To create an instance of an AttributeElement use the AttributeElementFactory

See Also:
AttributeElementFactory, ConstAttributeElement

Method Summary
 void setList(boolean isList)
          Set the list parameter of the attribute explicitily
 void setName(java.lang.String name)
          Set the attribute name.
 void setType(java.lang.String type)
          Set the attribute type.
 void setValue(java.lang.Object value)
          Set the attribute value.
 
Methods inherited from interface com.bea.ales.management.common.ConstAttributeElement
clone, getASIType, getName, getValue, getValueAs, isList
 

Method Detail

setName

public void setName(java.lang.String name)
             throws BadParameterException
Set the attribute name.

Throws:
BadParameterException - if parameter is not correct.

setValue

public void setValue(java.lang.Object value)
              throws BadParameterException,
                     InvalidTypeException,
                     TypeConversionException
Set the attribute value. Multi-valued attributes can be represented using either arrays of Java objects, or using a java.util.Collection. All elements in a multi-value attribute must be of the same Java type. Collections and arrays will automatically be converted into ALES lists. The following Java to ALES type mappings are used: java.lang.String=ALES string, java.lang.Integer=ALES integer, java.lang.Boolean=ALES boolean, java.util.Date=ALES date, java.net.InetAddress=ALES ip, com.wles.util.Time=ALES time, com.wles.util.CustomEnumerationValue=ALES enum. Any other Java type will be converted to an ALES string, using the Object's toString() method.

Parameters:
value - value of the attribute. The Java type of the value, or of the element of value for multi-value attribute will be used to determine the proper ALES type.
Throws:
InvalidTypeException - if the type of value is invalid.
TypeConversionException - if fails to perform the conversion.
BadParameterException - if parameter is not correct.

setList

public void setList(boolean isList)
Set the list parameter of the attribute explicitily

Parameters:
isList - true if the value is a list, false if it is not

setType

public void setType(java.lang.String type)
             throws InvalidTypeException,
                    TypeConversionException,
                    BadParameterException
Set the attribute type.

Parameters:
type - the string representation of the attribute type to set
Throws:
InvalidTypeException - if the type of value is invalid.
TypeConversionException - if fails to perform the conversion.
BadParameterException - if parameter is not correct.


Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.