001    //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/security/owsproxy/Request.java $
002    /*----------------------------------------------------------------------------
003     This file is part of deegree, http://deegree.org/
004     Copyright (C) 2001-2009 by:
005       Department of Geography, University of Bonn
006     and
007       lat/lon GmbH
008    
009     This library is free software; you can redistribute it and/or modify it under
010     the terms of the GNU Lesser General Public License as published by the Free
011     Software Foundation; either version 2.1 of the License, or (at your option)
012     any later version.
013     This library is distributed in the hope that it will be useful, but WITHOUT
014     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
015     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
016     details.
017     You should have received a copy of the GNU Lesser General Public License
018     along with this library; if not, write to the Free Software Foundation, Inc.,
019     59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020    
021     Contact information:
022    
023     lat/lon GmbH
024     Aennchenstr. 19, 53177 Bonn
025     Germany
026     http://lat-lon.de/
027    
028     Department of Geography, University of Bonn
029     Prof. Dr. Klaus Greve
030     Postfach 1147, 53001 Bonn
031     Germany
032     http://www.geographie.uni-bonn.de/deegree/
033    
034     e-mail: info@deegree.org
035    ----------------------------------------------------------------------------*/
036    package org.deegree.security.owsproxy;
037    
038    /**
039     *
040     * @author <a href="mailto:poth@lat-lon.de">Andreas Poth </a>
041     * @author last edited by: $Author: mschneider $
042     *
043     * @version $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
044     */
045    public class Request {
046    
047        private Condition preConditions;
048    
049        private Condition postConditions;
050    
051        private String service;
052    
053        private String name;
054    
055        private boolean any;
056    
057        /**
058         * @param service
059         * @param name
060         */
061        public Request( String service, String name ) {
062            this.service = service;
063            this.name = name;
064        }
065    
066        /**
067         * @param service
068         * @param name
069         * @param all
070         */
071        public Request( String service, String name, boolean all ) {
072            this.service = service;
073            this.name = name;
074            this.any = all;
075        }
076    
077        /**
078         * @param service
079         * @param name
080         * @param preConditions
081         * @param postConditions
082         */
083        public Request( String service, String name, Condition preConditions, Condition postConditions ) {
084            super();
085            this.preConditions = preConditions;
086            this.postConditions = postConditions;
087            this.service = service;
088            this.name = name;
089        }
090    
091        /**
092         * returns the name of the service a <tt>Request</tt> is assigned to
093         *
094         * @return the name of the service a <tt>Request</tt> is assigned to
095         */
096        public String getService() {
097            return service;
098        }
099    
100        /**
101         * returns the name request
102         *
103         * @return the name request
104         */
105        public String getName() {
106            return name;
107        }
108    
109        /**
110         * returns the pre-condition assigned to a request. This method may returns <tt>null</tt>
111         * which means no pre conditions are defined and all http-requests validated against the
112         * conditions of this request will fail.
113         *
114         * @return the pre-condition assigned to a request. This method may returns <tt>null</tt>
115         *         which means no pre conditions are defined and all http-requests validated against the
116         *         conditions of this request will fail.
117         */
118        public Condition getPreConditions() {
119            return preConditions;
120        }
121    
122        /**
123         * sets the pre-condition of a <tt>Request</tt>
124         *
125         * @see #getPreConditions()
126         * @param condition
127         */
128        public void setPreConditions( Condition condition ) {
129            this.preConditions = condition;
130        }
131    
132        /**
133         * returns the post-condition assigned to a request. This method may returns <tt>null</tt>
134         * which means no post-conditions are defined and all responses to http-requests validated
135         * against the conditions of this request will fail.
136         *
137         * @return the post-condition assigned to a request. This method may returns <tt>null</tt>
138         *         which means no post-conditions are defined and all responses to http-requests
139         *         validated against the conditions of this request will fail.
140         */
141        public Condition getPostConditions() {
142            return postConditions;
143        }
144    
145        /**
146         * sets the post-condition of a <tt>Request</tt>
147         *
148         * @see #getPostConditions()
149         * @param condition
150         */
151        public void setPostConditions( Condition condition ) {
152            this.postConditions = condition;
153        }
154    
155        /**
156         * @return Returns the all.
157         */
158        public boolean isAny() {
159            return any;
160        }
161    
162        /**
163         * @param any
164         */
165        public void setAny( boolean any ) {
166            this.any = any;
167        }
168    
169    }