org.obe.spi.service
Interface CalendarFactory

All Superinterfaces:
WorkflowService

public interface CalendarFactory
extends WorkflowService

Standard interface for a calendar factory. The calendar factory is used to retrieve named business calendars, which are used to perform temporal computations.

Author:
Adrian Price

Field Summary
static java.lang.String SERVICE_NAME
           
 
Method Summary
 void createCalendar(CalendarMetaData calendar)
          Registers a calendar.
 void deleteCalendar(java.lang.String id)
          Unregisters a calendar.
 BusinessCalendar findCalendar(java.lang.String id)
          Finds a calendar.
 CalendarMetaData[] findCalendarMetaData()
          Finds meta-data for all calendars.
 CalendarMetaData findCalendarMetaData(java.lang.String id)
          Finds meta-data for a calendar.
 CalendarMetaData findCalendarType(java.lang.String className, java.lang.String locale)
          Returns information about the specified calendar type.
 CalendarMetaData[] findCalendarTypes(java.lang.String locale)
          Finds all calendar types known to the repository.
 void updateCalendar(CalendarMetaData calendar)
          Updates a calendar.
 
Methods inherited from interface org.obe.spi.WorkflowService
exit, getServiceManager, getServiceName, init
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Method Detail

createCalendar

public void createCalendar(CalendarMetaData calendar)
                    throws RepositoryException
Registers a calendar.

Parameters:
calendar - The calendar definition.
Throws:
ObjectAlreadyExistsException - if the calendar ID is already registered.
RepositoryException - if the calendar could not be registered some other reason.

deleteCalendar

public void deleteCalendar(java.lang.String id)
                    throws RepositoryException
Unregisters a calendar.

Parameters:
id - The calendar ID.
Throws:
ObjectNotFoundException - if the calendar ID is not registered.
RepositoryException - if the calendar could not be unregistered for some other reason.

updateCalendar

public void updateCalendar(CalendarMetaData calendar)
                    throws RepositoryException
Updates a calendar.

Parameters:
calendar - The calendar definition.
Throws:
ObjectNotFoundException - if the calendar ID is not registered.
RepositoryException - if the calendar could not be updated for some other reason.

findCalendarTypes

public CalendarMetaData[] findCalendarTypes(java.lang.String locale)
                                     throws RepositoryException
Finds all calendar types known to the repository. This method is intended to support design-time clients and management applications.

Parameters:
locale - The locale in which the results should be formatted.
Returns:
All calendar types.
Throws:
RepositoryException - if an error occurred.

findCalendarType

public CalendarMetaData findCalendarType(java.lang.String className,
                                         java.lang.String locale)
                                  throws RepositoryException
Returns information about the specified calendar type. This method is intended to support design-time clients and management applications.

Parameters:
className - The calendar type (i.e., the fully qualified name of the implementation class).
locale - The locale in which the results should be formatted.
Returns:
Information about the specified calendar type.
Throws:
ObjectNotFoundException - if the calendar type is unknown.
RepositoryException - if some other error occurred.

findCalendarMetaData

public CalendarMetaData[] findCalendarMetaData()
                                        throws RepositoryException
Finds meta-data for all calendars. This method is intended to support design-time clients and management applications.

Returns:
The list of all calendars.
Throws:
RepositoryException - if an error occurred.

findCalendarMetaData

public CalendarMetaData findCalendarMetaData(java.lang.String id)
                                      throws RepositoryException
Finds meta-data for a calendar. This method is intended to support design-time clients and management applications.

Parameters:
id - The calendar ID.
Returns:
Meta-data about the requested calendar.
Throws:
ObjectNotFoundException - if the calendar ID is not registered.
RepositoryException - if some other error occurred.

findCalendar

public BusinessCalendar findCalendar(java.lang.String id)
                              throws RepositoryException
Finds a calendar. This method is called by the engine at run-time when it needs to perform a temporal computation using the specified calendar.

Parameters:
id - The calendar ID.
Returns:
The requested calendar.
Throws:
ObjectNotFoundException - if the tool ID is not registered.
RepositoryException - if some other error occurred.


SourceForge.net Logo OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.