001: /**
002: * Copyright (c) 2003-2007, David A. Czarnecki
003: * All rights reserved.
004: *
005: * Redistribution and use in source and binary forms, with or without
006: * modification, are permitted provided that the following conditions are met:
007: *
008: * Redistributions of source code must retain the above copyright notice, this list of conditions and the
009: * following disclaimer.
010: * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
011: * following disclaimer in the documentation and/or other materials provided with the distribution.
012: * Neither the name of "David A. Czarnecki" and "blojsom" nor the names of its contributors may be used to
013: * endorse or promote products derived from this software without specific prior written permission.
014: * Products derived from this software may not be called "blojsom", nor may "blojsom" appear in their name,
015: * without prior written permission of David A. Czarnecki.
016: *
017: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
018: * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
019: * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
020: * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
021: * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
022: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
023: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
024: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
025: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
026: * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
027: * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
028: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
029: * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
030: */package org.blojsom.plugin.admin.event;
031:
032: import org.blojsom.blog.Blog;
033: import org.blojsom.event.Event;
034:
035: import javax.servlet.http.HttpServletRequest;
036: import javax.servlet.http.HttpServletResponse;
037: import java.util.Date;
038: import java.util.Map;
039:
040: /**
041: * ProcessRequestEvent
042: *
043: * @author David Czarnecki
044: * @version $Id: ProcessRequestEvent.java,v 1.2 2007/01/17 02:35:08 czarneckid Exp $
045: * @since blojsom 3.0
046: */
047: public class ProcessRequestEvent extends Event {
048:
049: protected HttpServletRequest _httpServletRequest;
050: protected HttpServletResponse _httpServletResponse;
051: protected Map _context;
052: protected Blog _blog;
053:
054: /**
055: * Create a new instance of the process event request
056: *
057: * @param source Event source
058: * @param timestamp Timestamp of event
059: * @param blog {@link Blog} information
060: * @param httpServletRequest Servlet request
061: * @param httpServletResponse Servlet response
062: * @param context Context
063: */
064: public ProcessRequestEvent(Object source, Date timestamp,
065: Blog blog, HttpServletRequest httpServletRequest,
066: HttpServletResponse httpServletResponse, Map context) {
067: super (source, timestamp);
068:
069: _blog = blog;
070: _httpServletRequest = httpServletRequest;
071: _httpServletResponse = httpServletResponse;
072: _context = context;
073: }
074:
075: /**
076: * Retrieve the servlet request
077: *
078: * @return {@link HttpServletRequest}
079: */
080: public HttpServletRequest getHttpServletRequest() {
081: return _httpServletRequest;
082: }
083:
084: /**
085: * Retrieve the servlet response
086: *
087: * @return {@link HttpServletResponse}
088: */
089: public HttpServletResponse getHttpServletResponse() {
090: return _httpServletResponse;
091: }
092:
093: /**
094: * Retrieve the plugin execution context
095: *
096: * @return Context map
097: */
098: public Map getContext() {
099: return _context;
100: }
101:
102: /**
103: * Retrieve the {@link Blog} associated with the event
104: *
105: * @return {@link Blog}
106: */
107: public Blog getBlog() {
108: return _blog;
109: }
110: }
|