KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > joseki > server > Request


1 /*
2  * (c) Copyright 2003, 2004 Hewlett-Packard Development Company, LP
3  * [See end of file]
4  */

5
6 package org.joseki.server;
7
8
9 import java.util.* ;
10
11 /** Abstaction of an operation request on a model.
12  * The work is done by a processor that accepts the request.
13  * @author Andy Seaborne
14  * @version $Id: Request.java,v 1.6 2004/04/30 14:13:13 andy_seaborne Exp $
15  */

16 public interface Request
17 {
18     public String JavaDoc getName() ;
19     public ModelSource getModelSource() ;
20     public Processor getProcessor() ;
21     public void setProcessor(Processor proc) ;
22     
23     /** Get the URI for the source for the operation - the request URI local to the webapp
24      *
25      * @return String
26      */

27     public String JavaDoc getModelURI() ;
28     
29     /** The URL used in the request
30      *
31      * @return String The URL used in the request
32      */

33     public String JavaDoc getRequestURL() ;
34     public Dispatcher getDispatcher() ;
35
36     // The named parameters to the operation
37
// Map is String => String
38
public Map getParams() ;
39     public String JavaDoc getParam(String JavaDoc param) ;
40     
41     public boolean takesArg() ;
42     public void addArg(Object JavaDoc m) ;
43     public boolean containsParam(String JavaDoc name) ;
44     public void setParam(String JavaDoc name, String JavaDoc value) ;
45     
46     // Data args : Jena models. Usually at most one.
47
public List getDataArgs() ;
48 }
49
50
51 /*
52  * (c) Copyright 2003, 2004 Hewlett-Packard Development Company, LP
53  * All rights reserved.
54  *
55  * Redistribution and use in source and binary forms, with or without
56  * modification, are permitted provided that the following conditions
57  * are met:
58  * 1. Redistributions of source code must retain the above copyright
59  * notice, this list of conditions and the following disclaimer.
60  * 2. Redistributions in binary form must reproduce the above copyright
61  * notice, this list of conditions and the following disclaimer in the
62  * documentation and/or other materials provided with the distribution.
63  * 3. The name of the author may not be used to endorse or promote products
64  * derived from this software without specific prior written permission.
65  *
66  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
67  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
68  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
69  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
70  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
71  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
72  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
73  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
74  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
75  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
76  */

77  
78
Popular Tags