001: /* Copyright 2001 The JA-SIG Collaborative. All rights reserved.
002: * See license distributed with this file and
003: * available online at http://www.uportal.org/license.html
004: */
005:
006: package org.jasig.portal;
007:
008: /**
009: * This exception would inform uPortal that a particular
010: * resource required to complete channel operation is
011: * missing.
012: * @author Peter Kharchenko
013: * @version $Revision: 35418 $ $Date: 2005-03-07 13:09:07 -0700 (Mon, 07 Mar 2005) $
014: */
015: public class ResourceMissingException extends PortalException {
016:
017: /**
018: * URI of the missing resource
019: */
020: private String resourceURI = null;
021:
022: /**
023: * Description of the missing resource.
024: */
025: private String description = null;
026:
027: /**
028: * Instantiate a ResourceMissingException providing the URI of the missing resource,
029: * a description of the missing resource, and a message.
030: * @param resourceURI URI of the missing resource
031: * @param resourceDescription description of the missing resource
032: * @param msg message about the error condition
033: */
034: public ResourceMissingException(String resourceURI,
035: String resourceDescription, String msg) {
036: super (msg);
037: this .resourceURI = resourceURI;
038: this .description = resourceDescription;
039: }
040:
041: /**
042: * Instantiate a ResourceMissingException providing the URI of the missing resource,
043: * a description of the missing resource, and a cause.
044: * @param resourceURI URI of the missing resource
045: * @param resourceDescription description of the missing resource
046: * @param cause the cause of the error condition
047: */
048: public ResourceMissingException(String resourceURI,
049: String resourceDescription, Throwable cause) {
050: super (cause);
051: this .resourceURI = resourceURI;
052: this .description = resourceDescription;
053: }
054:
055: /**
056: * Instantiate a ResourceMissingException providing a URI of the missing resource,
057: * a description of the missing resource, a message, and indicating whether
058: * channel refresh and channel reinstantiation are appropriate responses to the
059: * error condition.
060: * @param resourceURI URI of the missing resource
061: * @param resourceDescription description of the missing resource
062: * @param msg message about the error condition
063: * @param refresh true if refreshing is an appropriate response
064: * @param reinstantiate true if reinstantiation is an appropriate response
065: */
066: public ResourceMissingException(String resourceURI,
067: String resourceDescription, String msg, boolean refresh,
068: boolean reinstantiate) {
069: super (msg, refresh, reinstantiate);
070: this .resourceURI = resourceURI;
071: this .description = resourceDescription;
072: }
073:
074: /**
075: * Instantiate a bare MissingResourceException.
076: * @deprecated use a more informative constructor
077: */
078: public ResourceMissingException() {
079: super ();
080: }
081:
082: /**
083: * Instantiate a ResourceMissingException providing the URI of the missing
084: * resource, a description of the missing resource, a message, and an
085: * underlying cause.
086: * @param resourceUri URI of the missing resource
087: * @param description description of the missing resource
088: * @param message message about the error condition
089: * @param cause underlying cause of this problem
090: */
091: public ResourceMissingException(String resourceUri,
092: String description, String message, Throwable cause) {
093: super (message, cause);
094: this .resourceURI = resourceUri;
095: this .description = description;
096: }
097:
098: /**
099: * Get the URI of the missing resource.
100: * @return the URI of the missing resource, or null if not specified.
101: */
102: public String getResourceURI() {
103: return this .resourceURI;
104: }
105:
106: /**
107: * Get a description of the missing resource.
108: * @return a description of the missing resource, or null if not specified
109: */
110: public String getResourceDescription() {
111: return this.description;
112: }
113:
114: }
|