com.xenonsoft.bridgetown.soa.config
Class ServiceConfig

java.lang.Object
  extended bycom.xenonsoft.bridgetown.soa.config.ServiceConfig
All Implemented Interfaces:
java.io.Serializable

public class ServiceConfig
extends java.lang.Object
implements java.io.Serializable

This is an object that stores a service configuration after parsing the bridgetown XML configuration file.

The default is that services are singletons

The default is a service are not lazy loaded.

The default is a service bean are not proxies.

See interesting article A Brief Introduction to IoC

Version:
$Id: ServiceConfig.java,v 1.6 2005/02/23 01:31:12 peter_pilgrim Exp $
Author:
Peter Pilgrim, July 2004
See Also:
Serialized Form

Constructor Summary
ServiceConfig()
          Default constructor
 
Method Summary
 void addInterfaceClass(java.lang.String interfaceName)
          Appends a class name to the list of interface classes
 void addMethod(MethodConfig method)
          Adds a new method configuration to this service
 void addProperty(PropertyConfig property)
          Adds a new property configuration to this service
 MethodConfig getConstructor()
          Gets the constructor
 java.lang.String getDescription()
          Gets the description
 MethodConfig getDestroyMethod()
          Gets the destroyMethod
 java.lang.String getId()
          Gets the identifier
 java.lang.String getImpl()
          Gets the implementation class
 java.util.List getInterfaceClassList()
          Gets the list of interface classes
 java.lang.String[] getInterfaceClassListAsArray()
          Convenience method to retrieve a primitive array of interface class names.
 java.util.Map getMethods()
          Gets the methods
 java.util.List getMethodsList()
          A convenience method that retrieves a shallow copy of the method config collection as a list collection
 ServicesConfig getParentServicesConfig()
          Gets the parentServicesConfig
 java.util.Map getProperties()
          Gets the properties
 java.util.List getPropertiesList()
          A convenience method that retrieves a shallow copy of the properties config collection as a list collection
 boolean isCreated()
          Gets the created
 boolean isLazyLoad()
          Gets the lazyLoad property
 boolean isSingleton()
          Gets the singleton flag, if true, then the framework context should maintain this service as a singleton.
 boolean isVisited()
          Gets the visited
 void setConstructor(MethodConfig constructor)
          Sets the constructor
 void setCreated(boolean created)
          Sets the created
 void setDescription(java.lang.String description)
          Sets the description
 void setDestroyMethod(MethodConfig destroyMethod)
          Sets the destroyMethod
 void setId(java.lang.String id)
          Sets the identifier
 void setImpl(java.lang.String impl)
          Sets the implementation class
 void setInterfaceClass(java.lang.String interfaceName)
          Creates a fresh interface list collection with the supplied interface class as the single element.
 void setInterfaceClassList(java.util.List interfaceClass)
          Sets the list of interface classes
 void setLazyLoadText(java.lang.String lazyLoadText)
          Sets the lazyLoad property as a text string
 void setMethods(java.util.Map methods)
          Sets the methods
 void setParentServicesConfig(ServicesConfig parentServicesConfig)
          Sets the parentServicesConfig
 void setProperties(java.util.Map properties)
          Sets the properties
 void setSingleton(boolean singleton)
          Sets the singleton property
 void setSingletonText(java.lang.String singletonText)
          Sets the singleton property from a text string
 void setType(java.lang.String type)
          An alias for the implementation class
 void setVisited(boolean visited)
          Sets the visited
 java.lang.String toString()
          Dump debuggable string for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceConfig

public ServiceConfig()
Default constructor

Method Detail

getId

public java.lang.String getId()
Gets the identifier

Returns:
Returns the id.

setId

public void setId(java.lang.String id)
Sets the identifier

Parameters:
id - The id to set.

getImpl

public java.lang.String getImpl()
Gets the implementation class

Returns:
Returns the impl.

getDescription

public java.lang.String getDescription()
Gets the description

Returns:
Returns the description.

setDescription

public void setDescription(java.lang.String description)
Sets the description

Parameters:
description - the new value for description

setImpl

public void setImpl(java.lang.String impl)
Sets the implementation class

Parameters:
impl - The impl to set.

setType

public void setType(java.lang.String type)
An alias for the implementation class


getInterfaceClassList

public java.util.List getInterfaceClassList()
Gets the list of interface classes

Returns:
Returns the interfaceClass list collection.

setInterfaceClassList

public void setInterfaceClassList(java.util.List interfaceClass)
Sets the list of interface classes

Parameters:
interfaceClass - The interfaceClass list collection to set.

addInterfaceClass

public void addInterfaceClass(java.lang.String interfaceName)
Appends a class name to the list of interface classes


setInterfaceClass

public void setInterfaceClass(java.lang.String interfaceName)
Creates a fresh interface list collection with the supplied interface class as the single element. This method is analogous to addInterfaceClass()

Parameters:
interfaceName - The interface class name to append.
See Also:
addInterfaceClass(String)

getInterfaceClassListAsArray

public java.lang.String[] getInterfaceClassListAsArray()
Convenience method to retrieve a primitive array of interface class names.

Returns:
interface class names as a primitive array. If there are no interface classes register this method returns null

isSingleton

public boolean isSingleton()
Gets the singleton flag, if true, then the framework context should maintain this service as a singleton. In other words only one should be in existance per context.

Returns:
Returns the singleton

setSingleton

public void setSingleton(boolean singleton)
Sets the singleton property

Parameters:
singleton - The new value for singleton .

setSingletonText

public void setSingletonText(java.lang.String singletonText)
Sets the singleton property from a text string

Parameters:
singletonText - The new value for singleton as a Text

isLazyLoad

public boolean isLazyLoad()
Gets the lazyLoad property

Returns:
Returns the lazyLoad.

setLazyLoadText

public void setLazyLoadText(java.lang.String lazyLoadText)
Sets the lazyLoad property as a text string


getProperties

public java.util.Map getProperties()
Gets the properties

Returns:
Returns the properties.

setProperties

public void setProperties(java.util.Map properties)
Sets the properties

Parameters:
properties - The properties to set.

getPropertiesList

public java.util.List getPropertiesList()
A convenience method that retrieves a shallow copy of the properties config collection as a list collection

Returns:
Returns the properties as a list collection

getMethods

public java.util.Map getMethods()
Gets the methods

Returns:
Returns the methods.

setMethods

public void setMethods(java.util.Map methods)
Sets the methods

Parameters:
methods - the new value for methods

getMethodsList

public java.util.List getMethodsList()
A convenience method that retrieves a shallow copy of the method config collection as a list collection

Returns:
Returns the methods as a list collection

addProperty

public void addProperty(PropertyConfig property)
Adds a new property configuration to this service


addMethod

public void addMethod(MethodConfig method)
Adds a new method configuration to this service


getParentServicesConfig

public ServicesConfig getParentServicesConfig()
Gets the parentServicesConfig

Returns:
Returns the parentServicesConfig.

setParentServicesConfig

public void setParentServicesConfig(ServicesConfig parentServicesConfig)
Sets the parentServicesConfig

Parameters:
parentServicesConfig - The parentServicesConfig to set.

getConstructor

public MethodConfig getConstructor()
Gets the constructor

Returns:
Returns the constructor.

setConstructor

public void setConstructor(MethodConfig constructor)
Sets the constructor

Parameters:
constructor - the new value for constructor

getDestroyMethod

public MethodConfig getDestroyMethod()
Gets the destroyMethod

Returns:
Returns the destroyMethod.

setDestroyMethod

public void setDestroyMethod(MethodConfig destroyMethod)
Sets the destroyMethod

Parameters:
destroyMethod - the new value for destroyMethod

isCreated

public boolean isCreated()
Gets the created

Returns:
Returns the created.

setCreated

public void setCreated(boolean created)
Sets the created

Parameters:
created - The created to set.

isVisited

public boolean isVisited()
Gets the visited

Returns:
Returns the visited.

setVisited

public void setVisited(boolean visited)
Sets the visited

Parameters:
visited - The visited to set.

toString

public java.lang.String toString()
Dump debuggable string for this object. Implements / overrides toString

Returns:
String
See Also:
Object.toString()


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.