001    //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/ogcwebservices/wass/wss/operation/WSSGetCapabilities.java $
002    /*----------------    FILE HEADER  ------------------------------------------
003    
004     This file is part of deegree.
005     Copyright (C) 2001-2006 by:
006     EXSE, Department of Geography, University of Bonn
007     http://www.giub.uni-bonn.de/exse/
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     Aennchenstraße 19
030     53177 Bonn
031     Germany
032     E-Mail: poth@lat-lon.de
033    
034     Jens Fitzke
035     lat/lon GmbH
036     Aennchenstraße 19
037     53177 Bonn
038     Germany
039     E-Mail: jens.fitzke@uni-bonn.de
040    
041     ---------------------------------------------------------------------------*/
042    
043    package org.deegree.ogcwebservices.wass.wss.operation;
044    
045    import java.util.Map;
046    
047    import org.deegree.framework.log.ILogger;
048    import org.deegree.framework.log.LoggerFactory;
049    import org.deegree.framework.xml.XMLParsingException;
050    import org.deegree.ogcwebservices.OGCWebServiceException;
051    import org.deegree.ogcwebservices.OGCWebServiceRequest;
052    import org.deegree.ogcwebservices.getcapabilities.GetCapabilities;
053    import org.w3c.dom.Element;
054    
055    /**
056     * The WSS specific GetCapabilities request parameters are stored in this "bean".
057     * 
058     * @author <a href="mailto:bezema@lat-lon.de">Rutger Bezema</a>
059     * @author last edited by: $Author: bezema $
060     * 
061     * @version 2.0, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
062     * 
063     * @since 2.0
064     */
065    
066    public class WSSGetCapabilities extends GetCapabilities {
067    
068        /**
069         * 
070         */
071        private static final long serialVersionUID = 8041982281107855304L;
072    
073        /**
074         * The logger enhances the quality and simplicity of Debugging within the deegree2 framework
075         */
076        private static final ILogger LOG = LoggerFactory.getLogger( WSSGetCapabilities.class );
077    
078        private static final String SERVICE = "WSS";
079    
080        /**
081         * @param id
082         *            the request id
083         * @param version
084         * @param updateSequence
085         * @param acceptVersions
086         * @param sections
087         * @param acceptFormats
088         * @param vendoreSpec
089         */
090        public WSSGetCapabilities( String id, String version, String updateSequence,
091                                     String[] acceptVersions, String[] sections, String[] acceptFormats,
092                                     Map<String,String> vendoreSpec) {
093            super( id, version, updateSequence, acceptVersions, sections, acceptFormats, vendoreSpec );
094        }
095    
096        /**
097         * @param id
098         *            the request id
099         * @param keyValues
100         */
101        public WSSGetCapabilities( String id, Map<String, String> keyValues ) {
102            super( id, getParam( "VERSION", keyValues, null ), null, null, null, null, keyValues );
103        }
104    
105        /*
106         * (non-Javadoc)
107         * 
108         * @see org.deegree.ogcwebservices.OGCWebServiceRequest#getServiceName()
109         */
110        public String getServiceName() {
111            return SERVICE;
112        }
113    
114        /**
115         * @param id
116         * @param documentElement
117         * @return a new instance of this class
118         * @throws OGCWebServiceException
119         */
120        public static OGCWebServiceRequest create( String id, Element documentElement )
121                                throws OGCWebServiceException {
122            try {
123                return new WSSGetCapabilitiesDocument().parseCapabilities( id, documentElement );
124            } catch ( XMLParsingException e ) {
125                LOG.logError( e.getMessage(), e );
126                throw new OGCWebServiceException( e.getMessage() );
127            }
128        }
129    
130        /**
131         * @param id
132         * @param kvp
133         * @return a new instance of this class
134         */
135        public static OGCWebServiceRequest create( String id, Map<String, String> kvp ) {
136            return new WSSGetCapabilities( id, kvp );
137        }
138    
139    }
140    
141    /***************************************************************************************************
142     * Changes to this class. What the people have been up to: $Log$
143     * Changes to this class. What the people have been up to: Revision 1.8  2006/10/27 13:26:33  poth
144     * Changes to this class. What the people have been up to: support for vendorspecific parameters added
145     * Changes to this class. What the people have been up to:
146     * Changes to this class. What the people have been up to: Revision 1.7  2006/08/24 06:42:16  poth
147     * Changes to this class. What the people have been up to: File header corrected
148     * Changes to this class. What the people have been up to:
149     * Changes to this class. What the people have been up to: Revision 1.6  2006/06/23 10:23:50  schmitz
150     * Changes to this class. What the people have been up to: Completed the WAS, GetSession and CloseSession work.
151     * Changes to this class. What the people have been up to:
152     * Changes to this class. What the people have been up to: Revision 1.5  2006/06/20 15:31:04  bezema
153     * Changes to this class. What the people have been up to: It looks like the completion of wss. was needs further checking in a tomcat environment. The Strings must still be externalized. Logging is done, so is the formatting.
154     * Changes to this class. What the people have been up to:
155     * Revision 1.4 2006/06/19 15:34:04 bezema changed wass to handle things the right way
156     * 
157     * Revision 1.3 2006/06/12 13:32:29 bezema kvp is implemented
158     * 
159     * Revision 1.2 2006/05/30 10:12:02 bezema Putting the cvs asci option to -kkv which will update the
160     * $revision$ $author$ and $date$ variables in a cvs commit
161     * 
162     * Revision 1.1 2006/05/29 12:00:58 bezema Refactored the security and authentication webservices
163     * into one package WASS (Web Authentication -and- Security Services), also created a common package
164     * and a saml package which could be updated to work in the future.
165     * 
166     * Revision 1.2 2006/05/23 15:22:02 bezema Added configuration files to the wss and wss is able to
167     * parse a DoService Request in xml
168     * 
169     * Revision 1.1 2006/05/22 15:48:16 bezema Starting the parsing of the xml request in wss
170     * 
171     * 
172     **************************************************************************************************/