public abstract class ModuleServiceFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,org.ai_heuristic.model.FactoryInfo> |
serviceGuis
List of GUI interfaces that are available for any of the services.
|
protected java.util.HashMap<java.lang.String,ServiceModuleInfo> |
services
List of services that this module provides.
|
Constructor and Description |
---|
ModuleServiceFactory()
Create a new instance of ModuleServiceFactory.
|
Modifier and Type | Method and Description |
---|---|
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.
|
abstract java.lang.String |
getDefaultServiceClassname(java.lang.String serviceType)
Get the class name for a specified service type.
|
abstract void |
getDefaultServiceInfo(java.lang.String categoryType,
java.util.ArrayList<ServiceModuleInfo> defaultServices,
LicasConfig licasConfig)
Get a list of the default services that can be loaded for the category type.
|
abstract java.lang.String |
getServiceClass(java.lang.String serviceType)
Return the stored service class for the specified service type.
|
java.util.HashMap<java.lang.String,org.ai_heuristic.model.FactoryInfo> |
getServiceGui()
Return the full list of initialised GUI interface for the specified service.
|
abstract ServiceGuiDef |
getServiceGui(java.lang.String serviceType)
Return the initialised GUI interface for the specified service.
|
protected abstract void |
setGuiInfo()
Set or create a list of the service GUI classes that operate as the service.
|
protected abstract void |
setServiceInfo()
Set or create a list of the default services that can be loaded from this module.
|
protected java.util.HashMap<java.lang.String,ServiceModuleInfo> services
ServiceModuleInfo
info.protected java.util.HashMap<java.lang.String,org.ai_heuristic.model.FactoryInfo> serviceGuis
FactoryInfo
info.public ModuleServiceFactory()
protected abstract void setServiceInfo()
protected abstract void setGuiInfo()
public abstract void getDefaultServiceInfo(java.lang.String categoryType, java.util.ArrayList<ServiceModuleInfo> defaultServices, LicasConfig licasConfig)
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.defaultServices
- list of currently loaded service info.licasConfig
- the factory config to add the service information to.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 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.HashMap<java.lang.String,org.ai_heuristic.model.FactoryInfo> getServiceGui()