public abstract class ServiceFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.ArrayList<java.lang.String> |
defaultJars
List of default service jar files
|
protected static java.util.ArrayList<ModuleServiceFactory> |
serviceModules
List of modules automatically loaded in during startup.
|
Constructor and Description |
---|
ServiceFactory() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addServiceClass(java.lang.String serviceFunction,
org.ai_heuristic.model.FactoryInfo factoryInfo)
Add a particular class to be loaded for the specified service type and function.
|
void |
addServiceModule(ModuleServiceFactory serviceModule)
Add a factory service module, for retrieving service info details.
|
abstract ServiceDef |
createDefaultService(java.lang.String serviceUuid,
java.lang.String serviceType,
org.licas_xml.abs.Element adminXml,
PasswordHandler passwordHandler)
Create a new default service or module.
|
java.lang.String |
getBehaviourViewDescr(java.lang.String viewType)
Get a short description of the view type.
|
java.util.ArrayList<java.lang.String> |
getBehaviourViewTypes()
Get a list of types that can represent the default query engine.
|
static java.util.ArrayList<java.lang.String> |
getDefaultQueryEngineTypes()
Get a list of types that can represent the default query engine.
|
abstract java.lang.String |
getDefaultServiceClassname(java.lang.String serviceType)
Get the class name for a specified service type.
|
abstract java.util.ArrayList<ServiceModuleInfo> |
getDefaultServiceInfo()
Get a list of the default services that can be loaded.
|
abstract java.util.ArrayList<ServiceModuleInfo> |
getDefaultServiceInfo(java.lang.String categoryType)
Get a list of the default services that can be loaded for the category type.
|
static ServiceFactory |
getInstance()
Get the created instance of the service factory.
|
abstract java.lang.String |
getServiceClass(java.lang.String serviceType)
Return the stored service class for the specified service type.
|
abstract ServiceGuiDef |
getServiceGui(java.lang.String serviceType)
Return the initialised GUI interface for the specified service.
|
boolean |
isGlobalService(java.lang.String serviceType)
Return true if the service can be added as a global server service.
|
abstract void |
removeServiceClass(java.lang.String serviceFunction,
org.ai_heuristic.model.FactoryInfo factoryInfo)
Remove a particular class for the specified service type and function.
|
static void |
setServiceFactory(ServiceFactory thisServiceFactory,
java.lang.String thisFactoryKey)
Set the instance of the service factory to be used.
|
protected static java.util.ArrayList<ModuleServiceFactory> serviceModules
ModuleServiceFactory
.protected static java.util.ArrayList<java.lang.String> defaultJars
public static ServiceFactory getInstance()
public static void setServiceFactory(ServiceFactory thisServiceFactory, java.lang.String thisFactoryKey)
thisServiceFactory
- the service factory that is retrieved for any method call.thisFactoryKey
- a key to protect dynamic changing of the factory.public boolean isGlobalService(java.lang.String serviceType)
serviceType
- the service type.public void addServiceModule(ModuleServiceFactory serviceModule)
serviceModule
- the factory service module.public abstract java.util.ArrayList<ServiceModuleInfo> getDefaultServiceInfo()
public abstract java.util.ArrayList<ServiceModuleInfo> getDefaultServiceInfo(java.lang.String categoryType)
categoryType
- the type of category to retrieve default services for.
ServiceConst
.ALLCATEGORIES
means all services.public abstract java.lang.String getDefaultServiceClassname(java.lang.String serviceType)
serviceType
- the service type.public abstract ServiceDef createDefaultService(java.lang.String serviceUuid, java.lang.String serviceType, org.licas_xml.abs.Element adminXml, PasswordHandler passwordHandler) throws java.lang.Exception
serviceUuid
- the uuid for the new default service to add.serviceType
- the type of service to create. Note that a uuid is not set.adminXml
- the admin info or description of the new service.passwordHandler
- the password handler for the service that calls this method.java.lang.Exception
- any error.public abstract void addServiceClass(java.lang.String serviceFunction, org.ai_heuristic.model.FactoryInfo factoryInfo) throws java.lang.Exception
serviceFunction
- the function of the service.factoryInfo
- the info object for the interface.java.lang.Exception
- any error.public abstract void removeServiceClass(java.lang.String serviceFunction, org.ai_heuristic.model.FactoryInfo factoryInfo) throws java.lang.Exception
serviceFunction
- the function of the service.factoryInfo
- the info object for the interface.java.lang.Exception
- any error.public abstract ServiceGuiDef getServiceGui(java.lang.String serviceType) throws java.lang.Exception
serviceType
- the type of service.java.lang.Exception
- any error.public abstract java.lang.String getServiceClass(java.lang.String serviceType) throws java.lang.Exception
serviceType
- the type of service.java.lang.Exception
- any error.public java.util.ArrayList<java.lang.String> getBehaviourViewTypes()
public java.lang.String getBehaviourViewDescr(java.lang.String viewType)
viewType
- the behaviour view type.public static java.util.ArrayList<java.lang.String> getDefaultQueryEngineTypes()