KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > outerj > daisy > books > publisher > BookPublisher


1 /*
2  * Copyright 2004 Outerthought bvba and Schaubroeck nv
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.outerj.daisy.books.publisher;
17
18 import org.outerj.daisy.repository.Repository;
19 import org.outerj.daisy.repository.VariantKey;
20 import org.outerj.daisy.books.store.BookAcl;
21
22 import java.util.Locale JavaDoc;
23 import java.util.Map JavaDoc;
24
25 public interface BookPublisher {
26     public static final String JavaDoc ROLE = BookPublisher.class.getName();
27
28     /**
29      * @return an array containing two elements: the task ID and the (normalized) book instance name
30      */

31     String JavaDoc[] publishBook(Repository repository, VariantKey bookDefinition, long dataBranchId, long dataLanguageId,
32                      String JavaDoc dataVersion, Locale JavaDoc locale, String JavaDoc bookInstanceName, String JavaDoc bookInstanceLabel,
33                      String JavaDoc daisyCocoonPath, String JavaDoc daisyContextPath, PublicationSpec[] specs, BookAcl acl) throws Exception JavaDoc;
34
35     PublicationTypeInfo[] getAvailablePublicationTypes(String JavaDoc daisyContextPath) throws Exception JavaDoc;
36
37     Map JavaDoc getDefaultProperties(String JavaDoc publicationTypeName, String JavaDoc daisyContextPath) throws Exception JavaDoc;
38
39     /**
40      * @return null if the task with the given ID does not exist (or is finished, which is the same)
41      */

42     String JavaDoc[] getTaskState(String JavaDoc taskId);
43
44     /**
45      * @return a list of all running book publish tasks, of all users.
46      */

47     PublishTaskInfo[] getTaskOverview(Locale JavaDoc locale);
48 }
49
Popular Tags