01: /*
02: * Copyright 2005 Joe Walker
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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;
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: * Generate some HTML that represents an index page
28: * @param root The prefix common to all DWR URLs. Usually contextPath+servletPath
29: * @return An index page in HTML
30: * @throws SecurityException If the pages are not accessible
31: */
32: String generateIndexPage(String root) throws SecurityException;
33:
34: /**
35: * Generate some HTML that represents a test page for a given script
36: * @param root The prefix common to all DWR URLs. Usually contextPath+servletPath
37: * @param scriptName The script to generate for
38: * @return A test page in HTML
39: * @throws SecurityException If the pages are not accessible
40: */
41: String generateTestPage(String root, String scriptName)
42: throws SecurityException;
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: @Deprecated
53: String generateInterfaceUrl(String root, String scriptName);
54:
55: /**
56: * Create a url that links to the engine.js file
57: * @param root The prefix common to all DWR URLs. Usually contextPath+servletPath
58: * @return A URL that points at the central engine Javascript file
59: * @deprecated Please tell the DWR users mailing list users@dwr.dev.java.net if you use this
60: */
61: @Deprecated
62: String generateEngineUrl(String root);
63:
64: /**
65: * Create a url that links to one of the library files
66: * @param root The prefix common to all DWR URLs. Usually contextPath+servletPath
67: * @param library The name of a library as returned by {@link DebugPageGenerator#getAvailableLibraries()}
68: * @return A URL that points at the given library
69: * @deprecated Please tell the DWR users mailing list users@dwr.dev.java.net if you use this
70: */
71: @Deprecated
72: String generateLibraryUrl(String root, String library);
73:
74: /**
75: * @return A list of the available libraries.
76: * @deprecated Please tell the DWR users mailing list users@dwr.dev.java.net if you use this
77: */
78: @Deprecated
79: Collection<String> getAvailableLibraries();
80: }
|