01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: ElementToService.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.engine;
09:
10: /**
11: * Contains the information required to service an element request.
12: *
13: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
14: * @version $Revision: 3634 $
15: * @since 1.6
16: */
17: public class ElementToService {
18: private ElementInfo mElementInfo;
19: private String mPathInfo;
20:
21: /**
22: * Creates a new <code>ElementToService</code> instance.
23: *
24: * @param elementInfo the <code>ElementInfo</code> of the element that needs
25: * to be serviced
26: * @param pathInfo the pathinfo string that needs to be used while servicing
27: * the element
28: * @since 1.6
29: */
30: public ElementToService(ElementInfo elementInfo, String pathInfo) {
31: if (null == elementInfo)
32: throw new IllegalArgumentException(
33: "elementInfo can't be null");
34:
35: if (null == pathInfo) {
36: pathInfo = "";
37: }
38:
39: mElementInfo = elementInfo;
40: mPathInfo = pathInfo;
41: }
42:
43: /**
44: * Retrieves the <code>ElementInfo</code> to service an element request.
45: *
46: * @return the element's <code>ElementInfo</code>, which can never be <code>null</code>
47: * @since 1.6
48: */
49: public ElementInfo getElementInfo() {
50: return mElementInfo;
51: }
52:
53: /**
54: * Retrieves the pathinfo that will be used while servicing the element.
55: *
56: * @return the pathinfo, which can never be <code>null</code>
57: * @since 1.6
58: */
59: public String getPathInfo() {
60: return mPathInfo;
61: }
62: }
|