001: /*
002: * Copyright 2004 Outerthought bvba and Schaubroeck nv
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.outerj.daisy.books.publisher.impl.publicationprocess;
017:
018: import org.outerj.daisy.books.publisher.impl.bookmodel.Book;
019: import org.outerj.daisy.books.publisher.impl.util.PublicationLog;
020: import org.outerj.daisy.books.store.BookInstance;
021: import org.outerj.daisy.repository.Repository;
022: import org.apache.avalon.framework.service.ServiceManager;
023: import org.apache.avalon.framework.context.Context;
024: import org.apache.cocoon.i18n.Bundle;
025:
026: import java.util.Locale;
027: import java.util.Map;
028:
029: public class PublicationContext {
030: private final Book book;
031: private final BookInstance bookInstance;
032: private final String publicationTypeName;
033: private final String publicationOutputName;
034: private final Repository repository;
035: private final ServiceManager serviceManager;
036: private final Context avalonContext;
037: private final String daisyCocoonPath;
038: private final Locale locale;
039: private final Map<String, String> properties;
040: private final Map<String, String> bookMetadata;
041: private final Bundle bundle;
042: private final PublicationLog publicationLog;
043:
044: public PublicationContext(Book book, BookInstance bookInstance,
045: String publicationTypeName, String publicationOutputName,
046: Repository repository, ServiceManager serviceManager,
047: Context avalonContext, String daisyCocoonPath,
048: Locale locale, Map<String, String> properties,
049: Map<String, String> bookMetadata, Bundle bundle,
050: PublicationLog publicationLog) {
051: this .book = book;
052: this .bookInstance = bookInstance;
053: this .publicationTypeName = publicationTypeName;
054: this .publicationOutputName = publicationOutputName;
055: this .repository = repository;
056: this .serviceManager = serviceManager;
057: this .avalonContext = avalonContext;
058: this .daisyCocoonPath = daisyCocoonPath;
059: this .locale = locale;
060: this .properties = properties;
061: this .bookMetadata = bookMetadata;
062: this .bundle = bundle;
063: this .publicationLog = publicationLog;
064: }
065:
066: public Book getBook() {
067: return book;
068: }
069:
070: public BookInstance getBookInstance() {
071: return bookInstance;
072: }
073:
074: public String getPublicationTypeName() {
075: return publicationTypeName;
076: }
077:
078: public String getPublicationOutputName() {
079: return publicationOutputName;
080: }
081:
082: public Repository getRepository() {
083: return repository;
084: }
085:
086: public ServiceManager getServiceManager() {
087: return serviceManager;
088: }
089:
090: public org.apache.avalon.framework.context.Context getAvalonContext() {
091: return avalonContext;
092: }
093:
094: public String getDaisyCocoonPath() {
095: return daisyCocoonPath;
096: }
097:
098: public Map<String, String> getProperties() {
099: return properties;
100: }
101:
102: public Locale getLocale() {
103: return locale;
104: }
105:
106: public Bundle getI18nBundle() {
107: return bundle;
108: }
109:
110: public PublicationLog getPublicationLog() {
111: return publicationLog;
112: }
113:
114: public Map<String, String> getBookMetadata() {
115: return bookMetadata;
116: }
117: }
|