Class Resource
- java.lang.Object
-
- org.codehaus.cargo.container.configuration.entry.Resource
-
public class Resource extends Object
Represents a resource, such as a datasource.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClassName()
String
getId()
The String used to identify this resource in configuration files.String
getName()
String
getParameter(String name)
Get a stored parameter.Set<String>
getParameterNames()
Map<String,String>
getParameters()
Get parameters.String
getType()
void
setClassName(String className)
void
setId(String id)
void
setParameter(String name, String value)
Set a resource parameter.void
setParameters(Map<String,String> parameters)
Set parameters.
-
-
-
Method Detail
-
getName
public String getName()
- Returns:
- The resource name
-
getType
public String getType()
- Returns:
- The resource Type
-
setParameter
public void setParameter(String name, String value)
Set a resource parameter. I.e. this relates in tomcat to <ResourceParams...> <parameter> <name>key</name> <value>value</name> </parameter> ... </ResourceParams>- Parameters:
name
- Name of the value to set.value
- Value to set.
-
getParameter
public String getParameter(String name)
Get a stored parameter. Returns null if no parameter stored by this name.- Parameters:
name
- Name of parameter.- Returns:
- Value of parameter.
-
setParameters
public void setParameters(Map<String,String> parameters)
Set parameters.- Parameters:
parameters
- The parameters to set.
-
getParameters
public Map<String,String> getParameters()
Get parameters.- Returns:
- parameters The parameters for this resource.
-
setClassName
public void setClassName(String className)
- Parameters:
className
- the className to set
-
getClassName
public String getClassName()
- Returns:
- the className
-
setId
public void setId(String id)
- Parameters:
id
- id used in configuration files.
-
getId
public String getId()
The String used to identify this resource in configuration files.- Returns:
- the resource id
-
-