com.bea.alsb.resources.custom
Interface ResourceInstanceData


public interface ResourceInstanceData

Designed for provider to handle provider specific configuration data of the resource in corresponding to implementation to the ResourceUIBinding object.


Method Summary
 ResourceInstanceData clone()
          Called to create a copy of this object.
 Collection<NonQualifiedEnvValue> getEnvValues()
          Resource providers return any environment dependent values via this call.
 Set<Ref> getExternalReferences()
          Returns a set of Ref object representing the external references found in the given data.
 Object getKeyValue(String keyName)
          Computes the value of the key whose name is given using the data.
 byte[] serialize()
          Serialize this object to a byte array.
 ResourceInstanceData setEnvValues(Collection<NonQualifiedEnvValue> envValues)
          Sets the given collection of environment values in the data.
 ResourceInstanceData setExternalReferences(Map<Ref,Ref> mapping)
          Updates references in the data according to the given map and returns the result.
 void validate(Diagnostics diags)
          Validates the data and throws exception on validation error
 

Method Detail

getKeyValue

Object getKeyValue(String keyName)
Computes the value of the key whose name is given using the data. Implementations should implements this method if there are any keys. The result should either be null or a value whose class is the class type of a simple type, namely, String, Integer, Long, Double, Float, Boolean, Short, Character, or Byte

Parameters:
keyName - name of the key.
Returns:
value for the named key

getExternalReferences

Set<Ref> getExternalReferences()
Returns a set of Ref object representing the external references found in the given data. This method must be implemented so that any external references are returned.

Returns:
a set of Ref object representing the external references found in the given data

getEnvValues

Collection<NonQualifiedEnvValue> getEnvValues()
Resource providers return any environment dependent values via this call. Environment dependent values are those that may need to be changed when moving configuration from one domain to another.

Returns:
a collection of environment values, or null if there are none

setEnvValues

ResourceInstanceData setEnvValues(Collection<NonQualifiedEnvValue> envValues)
Sets the given collection of environment values in the data. The collection of envValues may be only a subset of all existing environment specific values in the data. The implementations can update the data in-place and return it, rather than returning a copy of the data.

Parameters:
envValues - collection of environment values to set
Returns:
a copy of the data

validate

void validate(Diagnostics diags)
Validates the data and throws exception on validation error

Parameters:
diags - the Diagnostics object to carry the validation errors

setExternalReferences

ResourceInstanceData setExternalReferences(Map<Ref,Ref> mapping)
                                           throws Exception
Updates references in the data according to the given map and returns the result. The implementations of this method can either work on the copy of the data that is passed in as the argument and return it as the result, or create a fresh copy of the input and return it.

Parameters:
mapping - mapping from old references to the new ones
Returns:
the changed data
Throws:
Exception - on error

clone

ResourceInstanceData clone()
Called to create a copy of this object.

Returns:
ResourceInstanceData an object representing a copy of this object.

serialize

byte[] serialize()
Serialize this object to a byte array.

Returns:
a byte array