KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > outerj > daisy > publisher > serverimpl > requestmodel > PublisherContext


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.publisher.serverimpl.requestmodel;
17
18 import org.outerj.daisy.repository.*;
19 import org.outerj.daisy.publisher.serverimpl.PublisherImpl;
20 import org.outerj.daisy.publisher.serverimpl.docpreparation.PreparedDocuments;
21 import org.outerj.daisy.publisher.serverimpl.docpreparation.ContentProcessor;
22 import org.apache.avalon.framework.logger.Logger;
23
24 import java.util.Locale JavaDoc;
25 import java.text.DateFormat JavaDoc;
26
27 public interface PublisherContext {
28     public static long NO_VERSION = -1000;
29
30     Locale JavaDoc getLocale();
31
32     long getDocumentId();
33
34     long getBranchId();
35
36     long getLanguageId();
37
38     /**
39      * If a live version was requested but the document doesn't have a live version,
40      * this method returns {@link NO_VERSION}. Otherwise, the actual version number
41      * is returned.
42      */

43     long getVersionId() throws RepositoryException;
44
45     VariantKey getVariantKey();
46
47     Document getDocument() throws RepositoryException;
48
49     /**
50      * Returns true if the getDocument and getVersion methods can safely be called.
51      * (though getVersion might return null)
52      */

53     boolean hasDocument();
54
55     /**
56      * If a live version was requested but the document doesn't have a live version,
57      * this method returns null.
58      */

59     Version getVersion() throws RepositoryException;
60
61     DateFormat JavaDoc getTimestampFormat();
62
63     Repository getRepository();
64
65     Logger getLogger();
66
67     PublisherImpl getPublisher();
68
69     /**
70      * Returns null if not available.
71      */

72     PreparedDocuments getPreparedDocuments();
73
74     /**
75      * Returns null if not available.
76      */

77     ContentProcessor getContentProcessor();
78
79     boolean searchRecursivePrepDocs(long documentId, long branchId, long languageId, String JavaDoc pubReqSetName);
80
81     PublisherVersionMode getVersionMode();
82 }
83
Popular Tags