KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > outerj > daisy > books > publisher > impl > publicationprocess > PublicationContext


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.impl.publicationprocess;
17
18 import org.outerj.daisy.books.publisher.impl.bookmodel.Book;
19 import org.outerj.daisy.books.publisher.impl.util.PublicationLog;
20 import org.outerj.daisy.books.store.BookInstance;
21 import org.outerj.daisy.repository.Repository;
22 import org.apache.avalon.framework.service.ServiceManager;
23 import org.apache.avalon.framework.context.Context;
24 import org.apache.cocoon.i18n.Bundle;
25
26 import java.util.Locale JavaDoc;
27 import java.util.Map JavaDoc;
28
29 public class PublicationContext {
30     private final Book book;
31     private final BookInstance bookInstance;
32     private final String JavaDoc publicationTypeName;
33     private final String JavaDoc publicationOutputName;
34     private final Repository repository;
35     private final ServiceManager serviceManager;
36     private final Context avalonContext;
37     private final String JavaDoc daisyContextPath;
38     private final String JavaDoc daisyCocoonPath;
39     private final Locale JavaDoc locale;
40     private final Map JavaDoc properties;
41     private final Map JavaDoc bookMetadata;
42     private final Bundle bundle;
43     private final PublicationLog publicationLog;
44
45     public PublicationContext(Book book, BookInstance bookInstance, String JavaDoc publicationTypeName,
46                               String JavaDoc publicationOutputName, Repository repository, ServiceManager serviceManager,
47                               Context avalonContext, String JavaDoc daisyCocoonPath, String JavaDoc daisyContextPath,
48                               Locale JavaDoc locale, Map JavaDoc properties, Map JavaDoc bookMetadata, Bundle bundle,
49                               PublicationLog publicationLog) {
50         this.book = book;
51         this.bookInstance = bookInstance;
52         this.publicationTypeName = publicationTypeName;
53         this.publicationOutputName = publicationOutputName;
54         this.repository = repository;
55         this.serviceManager = serviceManager;
56         this.avalonContext = avalonContext;
57         this.daisyCocoonPath = daisyCocoonPath;
58         this.daisyContextPath = daisyContextPath;
59         this.locale = locale;
60         this.properties = properties;
61         this.bookMetadata = bookMetadata;
62         this.bundle = bundle;
63         this.publicationLog = publicationLog;
64     }
65
66     public Book getBook() {
67         return book;
68     }
69
70     public BookInstance getBookInstance() {
71         return bookInstance;
72     }
73
74     public String JavaDoc getPublicationTypeName() {
75         return publicationTypeName;
76     }
77
78     public String JavaDoc getPublicationOutputName() {
79         return publicationOutputName;
80     }
81
82     public Repository getRepository() {
83         return repository;
84     }
85
86     public ServiceManager getServiceManager() {
87         return serviceManager;
88     }
89
90     public org.apache.avalon.framework.context.Context getAvalonContext() {
91         return avalonContext;
92     }
93
94     public String JavaDoc getDaisyContextPath() {
95         return daisyContextPath;
96     }
97
98     public String JavaDoc getDaisyCocoonPath() {
99         return daisyCocoonPath;
100     }
101
102     public Map JavaDoc getProperties() {
103         return properties;
104     }
105
106     public Locale JavaDoc getLocale() {
107         return locale;
108     }
109
110     public Bundle getI18nBundle() {
111         return bundle;
112     }
113
114     public PublicationLog getPublicationLog() {
115         return publicationLog;
116     }
117
118     public Map JavaDoc getBookMetadata() {
119         return bookMetadata;
120     }
121 }
122
Popular Tags