public class EnvironmentProperty extends Descriptor implements InitializationParameter, ContextParameter, ApplicationParam, WebDescriptor, EnvironmentEntry, InjectionCapable
The property must of a primitive type or its boxed variant
| Modifier and Type | Field and Description |
|---|---|
protected String |
lookupName |
protected String |
mappedName |
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED| Constructor and Description |
|---|
EnvironmentProperty()
Construct an environment property if type String and empty string value and no description.
|
EnvironmentProperty(EnvironmentProperty other)
copy constructor.
|
EnvironmentProperty(String name,
String value,
String description)
Construct an environment property of given name value and description.
|
EnvironmentProperty(String name,
String value,
String description,
String type)
Construct an environment property of given name value and description and type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInjectionTarget(InjectionTarget target)
Add a new injection target for this dependency
|
boolean |
equals(Object other)
Returns true if the argument is an environment property of the same name, false else.
|
String |
getComponentEnvName()
ComponentEnvName is the name of the corresponding java:comp/env
entry for the object that is to be injected.
|
Set<InjectionTarget> |
getInjectionTargets() |
String |
getInjectResourceType()
This is the class name of the type of resource that is to be injected.
|
String |
getLookupName()
Gets the lookup value
|
String |
getMappedName() |
String |
getResolvedValue()
Returns a resolved value of this environment property
|
Object |
getResolvedValueObject()
Returns the typed value object of this environment property.
|
String |
getType()
Returns value type of this environment property as a classname.
|
String |
getValue()
Returns the String value of this environment property
|
Object |
getValueObject()
Returns the typed value object of this environment property.
|
Class |
getValueType()
Returns value type of this environment property.
|
boolean |
hasAValue() |
int |
hashCode()
The hashCode of an environment property is the same as that of the name String.
|
boolean |
hasInjectionTargetFromXml() |
boolean |
hasLookupName() |
boolean |
isConflict(EnvironmentProperty other) |
protected boolean |
isConflictResourceGroup(EnvironmentProperty other) |
boolean |
isInjectable()
True if a particular resource instance is injectable.
|
boolean |
isSetValueCalled()
Returns true if the value of the environment property has been set
|
void |
print(StringBuffer toStringBuffer)
Returns a String representation of this environment property.
|
StringBuffer |
printInjectableResourceInfo(StringBuffer toStringBuffer) |
void |
setInjectResourceType(String resourceType) |
void |
setLookupName(String lName)
Sets the lookup name
|
void |
setMappedName(String mName) |
void |
setType(String type)
Returns value type of this environment property.
|
void |
setValue(String value)
Sets the value of the environment property to the given string.
|
addDescriptorExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, getDescriptorExtension, getDescriptorExtensions, getDisplayName, getDocType, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getName, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setDisplayName, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setName, setSmallIconUri, visitaddExtraAttribute, getExtraAttribute, getExtraAttributes, removeExtraAttribute, toStringaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDescription, getLargeIconUri, getName, getSmallIconUri, setDescription, setLargeIconUri, setName, setSmallIconUrigetDescription, getName, setDescription, setNamepublic EnvironmentProperty(EnvironmentProperty other)
other - public EnvironmentProperty()
public EnvironmentProperty(String name, String value, String description)
name - value - description - public EnvironmentProperty(String name, String value, String description, String type)
name - value - description - type - public String getValue()
getValue in interface NameValuePairpublic String getResolvedValue()
public Object getResolvedValueObject()
public Object getValueObject()
public Class getValueType()
public void setType(String type)
setType in interface EnvironmentEntrytype - public String getType()
getType in interface EnvironmentEntrypublic void setMappedName(String mName)
public String getMappedName()
public void setLookupName(String lName)
lName - public String getLookupName()
public boolean hasLookupName()
public void setValue(String value)
setValue in interface NameValuePairvalue - public boolean isSetValueCalled()
public boolean hasAValue()
public boolean equals(Object other)
public int hashCode()
public void print(StringBuffer toStringBuffer)
print in class DescriptortoStringBuffer - public boolean isConflict(EnvironmentProperty other)
protected boolean isConflictResourceGroup(EnvironmentProperty other)
public void addInjectionTarget(InjectionTarget target)
InjectionCapableaddInjectionTarget in interface InjectionCapablepublic Set<InjectionTarget> getInjectionTargets()
getInjectionTargets in interface InjectionCapablepublic boolean isInjectable()
InjectionCapableisInjectable in interface InjectionCapablepublic boolean hasInjectionTargetFromXml()
public String getComponentEnvName()
InjectionCapablegetComponentEnvName in interface InjectionCapablepublic String getInjectResourceType()
InjectionCapablegetInjectResourceType in interface InjectionCapablepublic void setInjectResourceType(String resourceType)
setInjectResourceType in interface InjectionCapablepublic StringBuffer printInjectableResourceInfo(StringBuffer toStringBuffer)
Copyright © 2017. All rights reserved.