public abstract class JavaEEResourceBase extends Object implements JavaEEResource, Serializable
CONNECTOR_RESOURCE, CUSTOM_RESOURCE, EXTERNAL_JNDI_RESOURCE, JDBC_CONNECTION_POOL, JDBC_DRIVER, JDBC_RESOURCE, JDBC_XA_RESOURCE, JMS_CNX_FACTORY, JMS_DESTINATION, MAIL_RESOURCE, PMF_RESOURCE, RESOURCE_ADAPTER
Constructor and Description |
---|
JavaEEResourceBase(ResourceInfo resourceInfo) |
Modifier and Type | Method and Description |
---|---|
void |
addProperty(ResourceProperty property)
Add a property.
|
protected abstract JavaEEResource |
doClone(ResourceInfo resourceInfo)
Creates a JavaEEResource from a specified
ResourceInfo |
String |
getDescription()
Gets description of the resource
|
Set |
getProperties()
Set containing elements of type ResourceProperty.
|
ResourceProperty |
getProperty(String propertyName)
Get a property with the given name.
|
protected String |
getPropsString()
Gets a the of properties as a JSON array
i.e.
|
ResourceInfo |
getResourceInfo()
Resource Info.
|
abstract int |
getType()
Resource type.
|
boolean |
isEnabled()
Checks whether the resource is enabled.
|
JavaEEResource |
makeClone(ResourceInfo resourceInfo)
Create a new resource with the given name
that has the same attribute and property
settings as the invoked object.
|
boolean |
removeProperty(ResourceProperty property)
Remove a property.
|
void |
setDescription(String value)
Sets description of the resource
|
void |
setEnabled(boolean value)
Sets whether the resource is enabled.
|
public JavaEEResourceBase(ResourceInfo resourceInfo)
public ResourceInfo getResourceInfo()
JavaEEResource
getResourceInfo
in interface JavaEEResource
public void setEnabled(boolean value)
JavaEEResource
A resource can exist but be disabled, in which case references if an application is deployed that references it
will deploy without errors, but when it is looked up a NamingException
will be thrown
setEnabled
in interface JavaEEResource
public boolean isEnabled()
JavaEEResource
A resource can exist but be disabled, in which case references if an application is deployed that references it
will deploy without errors, but when it is looked up a NamingException
will be thrown
isEnabled
in interface JavaEEResource
public void setDescription(String value)
JavaEEResource
setDescription
in interface JavaEEResource
public String getDescription()
JavaEEResource
getDescription
in interface JavaEEResource
public abstract int getType()
JavaEEResource
getType
in interface JavaEEResource
public Set getProperties()
JavaEEResource
getProperties
in interface JavaEEResource
public void addProperty(ResourceProperty property)
JavaEEResource
addProperty
in interface JavaEEResource
public boolean removeProperty(ResourceProperty property)
JavaEEResource
removeProperty
in interface JavaEEResource
public ResourceProperty getProperty(String propertyName)
JavaEEResource
getProperty
in interface JavaEEResource
public JavaEEResource makeClone(ResourceInfo resourceInfo)
JavaEEResource
makeClone
in interface JavaEEResource
protected String getPropsString()
If there are no properties an empty string is returned.
protected abstract JavaEEResource doClone(ResourceInfo resourceInfo)
ResourceInfo
resourceInfo
- Copyright © 2019. All rights reserved.