Package org.nuiton.topia.framework
Interface TopiaService
public interface TopiaService
Used to implement a service for Topia. You have to provide a static property
called SERVICE_NAME that identify the service :
- public static final String SERVICE_NAME = "monservice";
getServiceName() method.- Version:
- $Id$
- Author:
- poussin <poussin@codelutin.com>
-
Method Summary
Modifier and Type Method Description java.lang.Class<?>[]getPersistenceClasses()Retrieve entities of this service needed for persistence.java.lang.StringgetServiceName()Return the name of the service, this name need to match with configuration file, for example for index service, we need to have : "topia.service.index" and this method will returned "index".booleanpostInit(TopiaContextImplementor context)Initiliaze the service after create thecontext.booleanpreInit(TopiaContextImplementor context)Initiliaze the service before create thecontext.
-
Method Details
-
getServiceName
java.lang.String getServiceName()Return the name of the service, this name need to match with configuration file, for example for index service, we need to have : "topia.service.index" and this method will returned "index".- Returns:
- the service name
-
getPersistenceClasses
java.lang.Class<?>[] getPersistenceClasses()Retrieve entities of this service needed for persistence.- Returns:
- List of entities full qualified name separated by a comma
-
preInit
Initiliaze the service before create thecontext.- Parameters:
context- TopiaContextImplementor- Returns:
- true if service need to be activated or not
-
postInit
Initiliaze the service after create thecontext.- Parameters:
context- TopiaContextImplementor- Returns:
- true if service need to be activated or not
-