public class DefaultServiceFactory extends ServiceFactory
Modifier and Type | Field and Description |
---|---|
protected static LicasConfig |
licasConfig
The config handler that stores the service class names.
|
defaultJars, serviceModules
Constructor and Description |
---|
DefaultServiceFactory()
Create a new instance of LiasServiceFactory.
|
DefaultServiceFactory(java.lang.String factoryKey)
Create a new instance of DefaultServiceFactory.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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 |
getDefaultServiceClassname(java.lang.String serviceType)
Get the class name for a specified service type.
|
java.util.ArrayList<ServiceModuleInfo> |
getDefaultServiceInfo()
Get a list of the default services that can be loaded.
|
java.util.ArrayList<ServiceModuleInfo> |
getDefaultServiceInfo(java.lang.String categoryType)
Get a list of the default services that can be loaded for the category type.
|
java.lang.String |
getServiceClass(java.lang.String serviceType)
Return the stored service class for the specified service type.
|
ServiceGuiDef |
getServiceGui(java.lang.String serviceType)
Return the initialised GUI interface for the specified service.
|
void |
removeServiceClass(java.lang.String serviceFunction,
org.ai_heuristic.model.FactoryInfo factoryInfo)
Remove class info for the specified service type and function.
|
addServiceModule, getBehaviourViewDescr, getBehaviourViewTypes, getDefaultQueryEngineTypes, getInstance, isGlobalService, setServiceFactory
protected static LicasConfig licasConfig
public DefaultServiceFactory()
public DefaultServiceFactory(java.lang.String factoryKey)
factoryKey
- the key to protect dynamic changes.public void addServiceClass(java.lang.String serviceFunction, org.ai_heuristic.model.FactoryInfo factoryInfo)
addServiceClass
in class ServiceFactory
serviceFunction
- the function of the service.factoryInfo
- the info object for the interface.public void removeServiceClass(java.lang.String serviceFunction, org.ai_heuristic.model.FactoryInfo factoryInfo)
removeServiceClass
in class ServiceFactory
serviceFunction
- the function of the service.factoryInfo
- the info object for the interface.public ServiceGuiDef getServiceGui(java.lang.String serviceType) throws java.lang.Exception
getServiceGui
in class ServiceFactory
serviceType
- the type of service.java.lang.Exception
- any error.public java.util.ArrayList<ServiceModuleInfo> getDefaultServiceInfo()
getDefaultServiceInfo
in class ServiceFactory
public java.util.ArrayList<ServiceModuleInfo> getDefaultServiceInfo(java.lang.String categoryType)
getDefaultServiceInfo
in class ServiceFactory
categoryType
- the type of category to retrieve default services for.
ServiceConst
.ALLCATEGORIES
means all services. If the licas config file
has overwritten an entry, then return that instead.public java.lang.String getDefaultServiceClassname(java.lang.String serviceType)
getDefaultServiceClassname
in class ServiceFactory
serviceType
- the service type.public ServiceDef createDefaultService(java.lang.String serviceUuid, java.lang.String serviceType, org.licas_xml.abs.Element adminXml, PasswordHandler passwordHandler) throws java.lang.Exception
createDefaultService
in class ServiceFactory
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 java.lang.String getServiceClass(java.lang.String serviceType) throws java.lang.Exception
getServiceClass
in class ServiceFactory
serviceType
- the type of service.java.lang.Exception
- any error.