001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.pluto.util.assemble;
018:
019: import java.io.File;
020:
021: /**
022: * The Pluto Assembler configuration encapsulates the configuration
023: * used by assembler implementations.
024: */
025: public class AssemblerConfig {
026:
027: // Private Member Variables ------------------------------------------------
028:
029: /** The portlet app descriptor, which is usually WEB-INF/portlet.xml. */
030: private File portletDescriptor;
031:
032: /** The webapp descriptor to assemble, which is usually WEB-INF/web.xml. */
033: private File webappDescriptor;
034:
035: /** The assemble destination, which points to the assembled WAR file. */
036: private File destination;
037:
038: /** The class of the servlet that will handle portlet requests */
039: private String dispatchServletClass;
040:
041: /** The source archive to assemble */
042: private File source;
043:
044: /** Assembler sink buffer size. Defaults to 4096 bytes. */
045: private int assemblerSinkBuflen = 1024 * 4; // 4kb
046:
047: // Public Methods ----------------------------------------------------------
048:
049: public File getPortletDescriptor() {
050: return portletDescriptor;
051: }
052:
053: public void setPortletDescriptor(File portletDescriptor) {
054: this .portletDescriptor = portletDescriptor;
055: }
056:
057: public File getWebappDescriptor() {
058: return webappDescriptor;
059: }
060:
061: public void setWebappDescriptor(File webappDescriptor) {
062: this .webappDescriptor = webappDescriptor;
063: }
064:
065: public File getDestination() {
066: return destination;
067: }
068:
069: public void setDestination(File destination) {
070: this .destination = destination;
071: }
072:
073: public String getDispatchServletClass() {
074: return dispatchServletClass;
075: }
076:
077: public void setDispatchServletClass(String dispatchServletClass) {
078: this .dispatchServletClass = dispatchServletClass;
079: }
080:
081: /**
082: * @deprecated use <code>setSource(File)</code> instead.
083: */
084: public void setWarSource(File source) {
085: this .source = source;
086: }
087:
088: public void setSource(File source) {
089: this .source = source;
090: }
091:
092: /**
093: * @deprecated use <code>getSource()</code> instead.
094: */
095: public File getWarSource() {
096: return source;
097: }
098:
099: public File getSource() {
100: return source;
101: }
102:
103: public int getAssemblerSinkBuflen() {
104: return assemblerSinkBuflen;
105: }
106:
107: public void setAssemblerSinkBuflen(int buflen) {
108: this.assemblerSinkBuflen = buflen;
109: }
110: }
|