01: /*
02: * Copyright 2004 Outerthought bvba and Schaubroeck nv
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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;
23: import java.util.Map;
24:
25: public interface BookPublisher {
26: public static final String 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[] publishBook(Repository repository,
32: VariantKey bookDefinition, long dataBranchId,
33: long dataLanguageId, String dataVersion, Locale locale,
34: String bookInstanceName, String bookInstanceLabel,
35: String daisyCocoonPath, String daisyContextPath,
36: PublicationSpec[] specs, BookAcl acl) throws Exception;
37:
38: PublicationTypeInfo[] getAvailablePublicationTypes()
39: throws Exception;
40:
41: Map<String, String> getDefaultProperties(String publicationTypeName)
42: throws Exception;
43:
44: /**
45: * @return null if the task with the given ID does not exist (or is finished, which is the same)
46: */
47: String[] getTaskState(String taskId);
48:
49: /**
50: * @return a list of all running book publish tasks, of all users.
51: */
52: PublishTaskInfo[] getTaskOverview(Locale locale);
53: }
|