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";

    The value of this attribute need to be returned when using getServiceName() method.

    Version:
    $Id: TopiaService.java 1935 2010-05-07 15:19:41Z fdesbois $
    Author:
    poussin

    Method Summary
     Class<?>[] getPersistenceClasses()
              Retrieve entities of this service needed for persistence.
     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 Detail

    getServiceName

    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

    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


    Copyright © 2004-2010 CodeLutin. All Rights Reserved.