001    //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/ogcwebservices/wass/wss/operation/DoServiceAnonymousHandler.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 org.deegree.framework.log.ILogger;
046    import org.deegree.framework.log.LoggerFactory;
047    import org.deegree.ogcwebservices.wass.common.AuthenticationData;
048    import org.deegree.ogcwebservices.wass.exceptions.DoServiceException;
049    
050    /**
051     * Enables the possibily for a client to make an anonymous DoService Request to the wss.
052     * 
053     * @author <a href="mailto:bezema@lat-lon.de">Rutger Bezema</a>
054     * 
055     * @author last edited by: $Author: bezema $
056     * 
057     * @version 2.0, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
058     * 
059     * @since 2.0
060     */
061    
062    public class DoServiceAnonymousHandler extends DoServiceHandler {
063    
064        /**
065         * The logger enhances the quality and simplicity of Debugging within the deegree2 framework
066         */
067        private static final ILogger LOG = LoggerFactory.getLogger( DoServiceAnonymousHandler.class );
068    
069        /*
070         * (non-Javadoc)
071         * 
072         * @see org.deegree.ogcwebservices.wass.wss.operation.DoServiceHandler#handleRequest(org.deegree.ogcwebservices.wass.wss.operation.DoService)
073         */
074        @Override
075        public void handleRequest( DoService request )
076                                throws DoServiceException {
077            LOG.entering();
078            AuthenticationData authData = request.getAuthenticationData();
079            if ( authData.usesAnonymousAuthentication() ) {
080                /*
081                 * This was intentended to be a - mandatory email kind of thing.
082                 */
083    //            if ( !( "" ).equals( authData.getCredentials().trim() ) ) {
084    //                LOG.logError( "#handleRequest no anonymous name presented" );
085    //                throw new DoServiceException( "WSS: the given sessionid is unknown or expired.\n" );
086    //            }
087                setRequestAllowed( true );
088            }
089            LOG.exiting();
090        }
091    
092    }
093    
094    /***************************************************************************************************
095     * Changes to this class. What the people have been up to: $Log$
096     * Changes to this class. What the people have been up to: Revision 1.8  2006/08/24 06:42:16  poth
097     * Changes to this class. What the people have been up to: File header corrected
098     * Changes to this class. What the people have been up to:
099     * Changes to this class. What the people have been up to: Revision 1.7  2006/06/26 07:28:03  bezema
100     * Changes to this class. What the people have been up to: just a comment
101     * Changes to this class. What the people have been up to:
102     * Changes to this class. What the people have been up to: Revision 1.6  2006/06/26 07:24:01  bezema
103     * Changes to this class. What the people have been up to: Deleted some comments and a small change to the messages.properties
104     * Changes to this class. What the people have been up to:
105     * Changes to this class. What the people have been up to: Revision 1.5  2006/06/23 13:53:48  schmitz
106     * Changes to this class. What the people have been up to: Externalized all Strings, fixed up some exceptions and messages, reviewed/fixed some code.
107     * Changes to this class. What the people have been up to:
108     * Changes to this class. What the people have been up to: Revision 1.4  2006/06/20 15:31:04  bezema
109     * 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.
110     * Changes to this class. What the people have been up to:
111     * Changes to this class. What the people have been up to: Revision 1.3 2006/06/12 12:16:24 bezema
112     * Changes to this class. What the people have been up to: Little rearanging of the GetSession
113     * classes, DoService should be ready updating some errors Changes to this class. What the people
114     * have been up to: Changes to this class. What the people have been up to: Revision 1.2 2006/06/06
115     * 15:28:05 bezema Changes to this class. What the people have been up to: Added a "null" prefix
116     * check in xmltools so that it, added a characterset to the deegreeparams and the WSS::DoService
117     * class is almost done Changes to this class. What the people have been up to: Changes to this
118     * class. What the people have been up to: Revision 1.1 2006/05/30 12:46:33 bezema Changes to this
119     * class. What the people have been up to: DoService is now handled Changes to this class. What the
120     * people have been up to:
121     **************************************************************************************************/