KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > test > server > appserver > war > War


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.test.server.appserver.war;
5
6 import java.io.File JavaDoc;
7 import java.io.IOException JavaDoc;
8 import java.util.Map JavaDoc;
9
10 /**
11  * Implementers are able to able to generate and write a WAR (Web Application Resource) to the filesystem.
12  */

13 public interface War {
14
15   // returns URL pattern for this servlet (not a full URL)
16
String JavaDoc addServlet(Class JavaDoc ServletClass);
17
18   // adds listener spec to web.xml in this war file
19
void addListener(Class JavaDoc listenerClass);
20   
21   // adds Servlet filter to web.xml in this war file
22
void addFilter(Class JavaDoc filterClass, String JavaDoc pattern, Map JavaDoc initParams);
23   
24   void addClass(Class JavaDoc clazz);
25  
26   // jar file or classes directory (at com.* level)
27
void addLibrary(File JavaDoc lib);
28
29   void addContainerSpecificXml(String JavaDoc fileName, byte[] containerXml);
30
31   // returns file name
32
String JavaDoc writeWarFileToDirectory(File JavaDoc directory) throws IOException JavaDoc;
33
34 }
35
Popular Tags