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.response.event;
031:
032: import org.blojsom.blog.Blog;
033: import org.blojsom.blog.Entry;
034: import org.blojsom.event.Event;
035:
036: import javax.servlet.http.HttpServletRequest;
037: import javax.servlet.http.HttpServletResponse;
038: import java.util.Date;
039: import java.util.Map;
040:
041: /**
042: * Response submission event
043: *
044: * @author David Czarnecki
045: * @since blojsom 3.0
046: * @version $Id: ResponseSubmissionEvent.java,v 1.3 2007/01/17 02:35:13 czarneckid Exp $
047: */
048: public class ResponseSubmissionEvent extends Event {
049:
050: protected HttpServletRequest _httpServletRequest;
051: protected HttpServletResponse _httpServletResponse;
052: protected String _submitter;
053: protected String _submitterItem1;
054: protected String _submitterItem2;
055: protected String _content;
056: protected Map _metaData;
057: protected Blog _blog;
058: protected Entry _entry;
059:
060: /**
061: * Create a new instance of the response submission event
062: *
063: * @param source Source of event
064: * @param timestamp Time of event
065: * @param blog {@link Blog}
066: * @param httpServletRequest {@link HttpServletRequest}
067: * @param httpServletResponse {@link HttpServletResponse}
068: * @param submitter Submitter
069: * @param submitterItem1 Submitter data item 1
070: * @param submitterItem2 Submitter data item 2
071: * @param content Content to be evaluated
072: * @param entry {@link Entry}
073: * @param metaData Meta-data
074: */
075: public ResponseSubmissionEvent(Object source, Date timestamp,
076: Blog blog, HttpServletRequest httpServletRequest,
077: HttpServletResponse httpServletResponse, String submitter,
078: String submitterItem1, String submitterItem2,
079: String content, Entry entry, Map metaData) {
080: super (source, timestamp);
081:
082: _blog = blog;
083: _httpServletRequest = httpServletRequest;
084: _httpServletResponse = httpServletResponse;
085: _submitter = submitter;
086: _submitterItem1 = submitterItem1;
087: _submitterItem2 = submitterItem2;
088: _content = content;
089: _entry = entry;
090: _metaData = metaData;
091: }
092:
093: /**
094: * Retrieve the submitter
095: *
096: * @return Submitter
097: */
098: public String getSubmitter() {
099: return _submitter;
100: }
101:
102: /**
103: * Retrieve the submitter item #1
104: *
105: * @return Submitter item #1
106: */
107: public String getSubmitterItem1() {
108: return _submitterItem1;
109: }
110:
111: /**
112: * Retrieve the submitter item #2
113: *
114: * @return Submitter item #2
115: */
116: public String getSubmitterItem2() {
117: return _submitterItem2;
118: }
119:
120: /**
121: * Retrieve the submission content
122: *
123: * @return Submission content
124: */
125: public String getContent() {
126: return _content;
127: }
128:
129: /**
130: * Retrieve the meta-data associated with the submission
131: *
132: * @return Meta-data associated with the submission
133: */
134: public Map getMetaData() {
135: return _metaData;
136: }
137:
138: /**
139: * Set the meta-data associated with the submission
140: *
141: * @param metaData Meta-data for the submission
142: */
143: public void setMetaData(Map metaData) {
144: _metaData = metaData;
145: }
146:
147: /**
148: * Retrieve the {@link Blog}
149: *
150: * @return {@link Blog}
151: */
152: public Blog getBlog() {
153: return _blog;
154: }
155:
156: /**
157: * Retrieve the {@link HttpServletRequest}
158: *
159: * @return {@link HttpServletRequest}
160: */
161: public HttpServletRequest getHttpServletRequest() {
162: return _httpServletRequest;
163: }
164:
165: /**
166: * Retrieve the {@link HttpServletResponse}
167: *
168: * @return {@link HttpServletResponse}
169: */
170: public HttpServletResponse getHttpServletResponse() {
171: return _httpServletResponse;
172: }
173:
174: /**
175: * Retrieve the {@link Entry}
176: *
177: * @return {@link Entry}
178: */
179: public Entry getEntry() {
180: return _entry;
181: }
182:
183: /**
184: * Set the submitter content
185: *
186: * @param submitter Submitter
187: */
188: public void setSubmitter(String submitter) {
189: _submitter = submitter;
190: }
191:
192: /**
193: * Set the submitter item #1
194: *
195: * @param submitterItem1 Submitter item #1
196: */
197: public void setSubmitterItem1(String submitterItem1) {
198: _submitterItem1 = submitterItem1;
199: }
200:
201: /**
202: * Set the submitter item #2
203: *
204: * @param submitterItem2 Submitter item #2
205: */
206: public void setSubmitterItem2(String submitterItem2) {
207: _submitterItem2 = submitterItem2;
208: }
209:
210: /**
211: * Set the content
212: *
213: * @param content Content
214: */
215: public void setContent(String content) {
216: _content = content;
217: }
218: }
|