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