KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > extend > DebugPageGenerator


1 /*
2  * Copyright 2005 Joe Walker
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.directwebremoting.extend;
17
18 import java.util.Collection JavaDoc;
19
20 /**
21  * The heart of DWR is a system to generate content from some requests.
22  * This interface generates scripts and executes remote calls.
23  * @author Joe Walker [joe at getahead dot ltd dot uk]
24  */

25 public interface DebugPageGenerator
26 {
27     /**
28      * Generate some HTML that represents an index page
29      * @param root The prefix common to all DWR URLs. Usually contextPath+servletPath
30      * @return An index page in HTML
31      * @throws SecurityException If the pages are not accessible
32      */

33     String JavaDoc generateIndexPage(String JavaDoc root) throws SecurityException JavaDoc;
34
35     /**
36      * Generate some HTML that represents a test page for a given script
37      * @param root The prefix common to all DWR URLs. Usually contextPath+servletPath
38      * @param scriptName The script to generate for
39      * @return A test page in HTML
40      * @throws SecurityException If the pages are not accessible
41      */

42     String JavaDoc generateTestPage(String JavaDoc root, String JavaDoc scriptName) throws SecurityException JavaDoc;
43
44     /**
45      * For a given remoted class, generate a URL that will retrieve the
46      * Javascript interface
47      * @param root The prefix common to all DWR URLs. Usually contextPath+servletPath
48      * @param scriptName The script to generate for
49      * @return A URL that points at the given scriptName
50      * @deprecated Please tell the DWR users mailing list users@dwr.dev.java.net if you use this
51      */

52     String JavaDoc generateInterfaceUrl(String JavaDoc root, String JavaDoc scriptName);
53
54     /**
55      * Create a url that links to the engine.js file
56      * @param root The prefix common to all DWR URLs. Usually contextPath+servletPath
57      * @return A URL that points at the central engine Javascript file
58      * @deprecated Please tell the DWR users mailing list users@dwr.dev.java.net if you use this
59      */

60     String JavaDoc generateEngineUrl(String JavaDoc root);
61
62     /**
63      * Create a url that links to one of the library files
64      * @param root The prefix common to all DWR URLs. Usually contextPath+servletPath
65      * @param library The name of a library as returned by {@link DebugPageGenerator#getAvailableLibraries()}
66      * @return A URL that points at the given library
67      * @deprecated Please tell the DWR users mailing list users@dwr.dev.java.net if you use this
68      */

69     String JavaDoc generateLibraryUrl(String JavaDoc root, String JavaDoc library);
70
71     /**
72      * @return A list of the available libraries.
73      * @deprecated Please tell the DWR users mailing list users@dwr.dev.java.net if you use this
74      */

75     Collection JavaDoc getAvailableLibraries();
76 }
77
Popular Tags