02/28/2005
 

com.epicentric.services
Class ServiceConfig

java.lang.Object
  |
  +--com.epicentric.services.ServiceConfig
All Implemented Interfaces:
Cloneable

Deprecated. in 4.0, to be removed in 8.0 or later. Replaced by the ServiceConfiguration class

public class ServiceConfig
extends Object
implements Cloneable

Configuration information to be passed to a service when it is initialized


Constructor Summary
ServiceConfig(String serviceCode, String id, Properties props)
          Deprecated. Builds a complete ServiceConfig from a property file
 
Method Summary
 Object clone()
          Deprecated. Creates a copy of this ServiceConfig
 Service createService()
          Deprecated. Creates a service from this ServiceConfig.
 String getID()
          Deprecated. Retrieves the service ID (e.g, "default").
 String getInitParameter(String name)
          Deprecated. Retrieves the value of a given initialization parameter of the service; returns null if not found.
 String getInitParameter(String name, String defaultValue)
          Deprecated. Retrieves the value of a given initialization parameter of the service; returns a default value if not found.
 Enumeration getInitParameterNames()
          Deprecated. Retrieves the names of the service's initialization parameters.
 Properties getInitParameters()
          Deprecated. Retrieves the initialization parameters.
 String getServiceCode()
          Deprecated. Retrieves the service code (e.g., "metastore").
 String getType()
          Deprecated. Retrieves the service type (the classname of the service)
 void importParameters(Properties parameters)
          Deprecated. Imports some parameters from another properties list.
 void setInitParameter(String name, String value)
          Deprecated. Sets an initialization parameter.
 void setInitParameters(String parameters)
          Deprecated. Sets initialization parameters.
 void setType(String type)
          Deprecated. Sets the service type.
 String toString()
          Deprecated. Creates a string representation of this ServiceConfig
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceConfig

public ServiceConfig(String serviceCode,
                     String id,
                     Properties props)
              throws IllegalArgumentException
Deprecated. 
Builds a complete ServiceConfig from a property file
Parameters:
serviceCode - Service's serviceCode (e.g., "metastore")
id - Service's ID (e.g., "default")
props - Properties to load from
Method Detail

getServiceCode

public String getServiceCode()
Deprecated. 
Retrieves the service code (e.g., "metastore").
Returns:
serviceCode for this ServiceConfig

getID

public String getID()
Deprecated. 
Retrieves the service ID (e.g, "default").
Returns:
ID for this ServiceConfig

getType

public String getType()
Deprecated. 
Retrieves the service type (the classname of the service)
Returns:
Classname of the service

setType

public void setType(String type)
Deprecated. 
Sets the service type.
Parameters:
type - String value for the service type

getInitParameter

public String getInitParameter(String name)
Deprecated. 
Retrieves the value of a given initialization parameter of the service; returns null if not found. Init parameters have a single string value. It is the responsibility of the service writer to interpret the string.
Parameters:
name - Initialization parameter whose value is requested
Returns:
String containing the requested parameter value, or null if the parameter does not exist

getInitParameter

public String getInitParameter(String name,
                               String defaultValue)
Deprecated. 
Retrieves the value of a given initialization parameter of the service; returns a default value if not found. Init parameters have a single string value. It is the responsibility of the service writer to interpret the string.
Parameters:
name - Initialization parameter whose value is requested
defaultValue - String to be returned if name not found
Returns:
String containing the requested parameter value, or defaultValue if the parameter does not exist

setInitParameter

public void setInitParameter(String name,
                             String value)
Deprecated. 
Sets an initialization parameter.
Parameters:
name - Initialization parameter's name
value - Value of name

getInitParameterNames

public Enumeration getInitParameterNames()
Deprecated. 
Retrieves the names of the service's initialization parameters.
Returns:
Parameter names as an enumeration of strings, or an empty enumeration if there are no initialization parameters

getInitParameters

public Properties getInitParameters()
Deprecated. 
Retrieves the initialization parameters. The returned object should be treated as read-only.
Returns:
Copy of the Properties object with the current initialization parameters

setInitParameters

public void setInitParameters(String parameters)
Deprecated. 
Sets initialization parameters. WARNING: This method is not I18N safe.
Parameters:
parameters - String containing one or more parameters.

importParameters

public void importParameters(Properties parameters)
Deprecated. 
Imports some parameters from another properties list.
Parameters:
parameters - Properties list to be imported

clone

public Object clone()
Deprecated. 
Creates a copy of this ServiceConfig
Overrides:
clone in class Object
Returns:
New ServiceConfig having the same serviceCode, ID, type, and properties as this ServiceConfig

createService

public Service createService()
                      throws IOException,
                             ClassNotFoundException
Deprecated. 
Creates a service from this ServiceConfig.
Returns:
an initialized service

toString

public String toString()
Deprecated. 
Creates a string representation of this ServiceConfig
Overrides:
toString in class Object
Returns:
serviceCode, ID, and type

02/28/2005
 

Copyright and Trademark Notices