org.apache.openejb.jee
Class ResourceEnvRef

java.lang.Object
  extended by org.apache.openejb.jee.ResourceEnvRef
All Implemented Interfaces:
Injectable, JndiReference, Keyable<String>

public class ResourceEnvRef
extends Object
implements JndiReference

The resource-env-refType is used to define resource-env-type elements. It contains a declaration of a Deployment Component's reference to an administered object associated with a resource in the Deployment Component's environment. It consists of an optional description, the resource environment reference name, and an optional indication of the resource environment reference type expected by the Deployment Component code.

It also includes optional elements to define injection of the named resource into fields or JavaBeans properties.

The resource environment type must be supplied unless an injection target is specified, in which case the type of the target is used. If both are specified, the type must be assignment compatible with the type of the injection target.

Example:

jms/StockQueue javax.jms.Queue


Field Summary
protected  List<Text> description
           
protected  String id
           
protected  List<InjectionTarget> injectionTarget
           
protected  String mappedName
           
protected  String resourceEnvRefName
           
protected  String resourceEnvRefType
           
 
Constructor Summary
ResourceEnvRef()
           
ResourceEnvRef(String resourceEnvRefName, String resourceEnvRefType)
           
 
Method Summary
 List<Text> getDescription()
           
 String getId()
           
 List<InjectionTarget> getInjectionTarget()
           
 String getKey()
          Gets the immutable key for this object.
 String getMappedName()
           
 String getName()
           
 String getResourceEnvRefName()
           
 String getResourceEnvRefType()
           
 String getType()
           
 void setId(String value)
           
 void setMappedName(String value)
           
 void setName(String name)
           
 void setResourceEnvRefName(String value)
           
 void setResourceEnvRefType(String value)
           
 void setType(String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

protected List<Text> description

resourceEnvRefName

protected String resourceEnvRefName

resourceEnvRefType

protected String resourceEnvRefType

mappedName

protected String mappedName

injectionTarget

protected List<InjectionTarget> injectionTarget

id

protected String id
Constructor Detail

ResourceEnvRef

public ResourceEnvRef()

ResourceEnvRef

public ResourceEnvRef(String resourceEnvRefName,
                      String resourceEnvRefType)
Method Detail

getName

public String getName()
Specified by:
getName in interface JndiReference

getKey

public String getKey()
Description copied from interface: Keyable
Gets the immutable key for this object.

Specified by:
getKey in interface Keyable<String>
Returns:
gets the immutable key for this object

getType

public String getType()
Specified by:
getType in interface JndiReference

setName

public void setName(String name)
Specified by:
setName in interface JndiReference

setType

public void setType(String type)
Specified by:
setType in interface JndiReference

getDescription

public List<Text> getDescription()

getResourceEnvRefName

public String getResourceEnvRefName()

setResourceEnvRefName

public void setResourceEnvRefName(String value)

getResourceEnvRefType

public String getResourceEnvRefType()

setResourceEnvRefType

public void setResourceEnvRefType(String value)

getMappedName

public String getMappedName()
Specified by:
getMappedName in interface JndiReference

setMappedName

public void setMappedName(String value)
Specified by:
setMappedName in interface JndiReference

getInjectionTarget

public List<InjectionTarget> getInjectionTarget()
Specified by:
getInjectionTarget in interface Injectable

getId

public String getId()

setId

public void setId(String value)


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.