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";
The value of this attribute need to be returned when using 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.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".
    boolean postInit​(TopiaContextImplementor context)
    Initiliaze the service after create the context.
    boolean preInit​(TopiaContextImplementor context)
    Initiliaze the service before create the context.
  • 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

      boolean preInit​(TopiaContextImplementor context)
      Initiliaze the service before create the context.
      Parameters:
      context - TopiaContextImplementor
      Returns:
      true if service need to be activated or not
    • postInit

      boolean postInit​(TopiaContextImplementor context)
      Initiliaze the service after create the context.
      Parameters:
      context - TopiaContextImplementor
      Returns:
      true if service need to be activated or not