org.outerj.daisy.books.publisher.impl
Class BookPublisherImpl
java.lang.Object
org.outerj.daisy.books.publisher.impl.BookPublisherImpl
- All Implemented Interfaces:
- BookPublisher
public class BookPublisherImpl
- extends java.lang.Object
- implements BookPublisher
|
Method Summary |
void |
contextualize(Context context)
|
void |
dispose()
|
void |
enableLogging(Logger logger)
|
PublicationTypeInfo[] |
getAvailablePublicationTypes(java.lang.String daisyContextPath)
|
java.util.Map |
getDefaultProperties(java.lang.String publicationTypeName,
java.lang.String daisyContextPath)
|
PublishTaskInfo[] |
getTaskOverview(java.util.Locale locale)
|
java.lang.String[] |
getTaskState(java.lang.String taskId)
|
java.lang.String[] |
publishBook(org.outerj.daisy.repository.Repository repository,
org.outerj.daisy.repository.VariantKey bookDefinition,
long dataBranchId,
long dataLanguageId,
java.lang.String dataVersion,
java.util.Locale locale,
java.lang.String bookInstanceName,
java.lang.String bookInstanceLabel,
java.lang.String daisyCocoonPath,
java.lang.String daisyContextPath,
PublicationSpec[] specs,
BookAcl acl)
|
void |
service(ServiceManager serviceManager)
|
protected void |
taskEnded(java.lang.String taskId)
Called by a BackgroundTaskExecutor to notify the task has ended. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BookPublisherImpl
public BookPublisherImpl()
enableLogging
public void enableLogging(Logger logger)
service
public void service(ServiceManager serviceManager)
throws ServiceException
- Throws:
ServiceException
contextualize
public void contextualize(Context context)
throws ContextException
- Throws:
ContextException
dispose
public void dispose()
publishBook
public java.lang.String[] publishBook(org.outerj.daisy.repository.Repository repository,
org.outerj.daisy.repository.VariantKey bookDefinition,
long dataBranchId,
long dataLanguageId,
java.lang.String dataVersion,
java.util.Locale locale,
java.lang.String bookInstanceName,
java.lang.String bookInstanceLabel,
java.lang.String daisyCocoonPath,
java.lang.String daisyContextPath,
PublicationSpec[] specs,
BookAcl acl)
throws java.lang.Exception
- Specified by:
publishBook in interface BookPublisher
- Returns:
- an array containing two elements: the task ID and the (normalized) book instance name
- Throws:
java.lang.Exception
getTaskState
public java.lang.String[] getTaskState(java.lang.String taskId)
- Specified by:
getTaskState in interface BookPublisher
- Returns:
- null if the task with the given ID does not exist (or is finished, which is the same)
getTaskOverview
public PublishTaskInfo[] getTaskOverview(java.util.Locale locale)
- Specified by:
getTaskOverview in interface BookPublisher
- Returns:
- a list of all running book publish tasks, of all users.
taskEnded
protected void taskEnded(java.lang.String taskId)
- Called by a BackgroundTaskExecutor to notify the task has ended.
getAvailablePublicationTypes
public PublicationTypeInfo[] getAvailablePublicationTypes(java.lang.String daisyContextPath)
throws java.lang.Exception
- Specified by:
getAvailablePublicationTypes in interface BookPublisher
- Throws:
java.lang.Exception
getDefaultProperties
public java.util.Map getDefaultProperties(java.lang.String publicationTypeName,
java.lang.String daisyContextPath)
throws java.lang.Exception
- Specified by:
getDefaultProperties in interface BookPublisher
- Throws:
java.lang.Exception
Copyright © -2006 . All Rights Reserved.