001: /**********************************************************************************
002: * $URL:https://source.sakaiproject.org/svn/osp/trunk/common/api/src/java/org/theospi/portfolio/security/AuthorizationFailedException.java $
003: * $Id:AuthorizationFailedException.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.theospi.portfolio.security;
021:
022: import org.sakaiproject.metaobj.shared.model.Agent;
023: import org.sakaiproject.metaobj.shared.model.Id;
024: import org.theospi.portfolio.shared.model.OspException;
025:
026: /**
027: * Created by IntelliJ IDEA.
028: * User: John Ellis
029: * Date: May 22, 2004
030: * Time: 9:27:13 AM
031: * To change this template use File | Settings | File Templates.
032: */
033: public class AuthorizationFailedException extends OspException {
034:
035: private Agent agent = null;
036: private String function = null;
037: private Id qualifier = null;
038:
039: /**
040: *
041: */
042: public AuthorizationFailedException(String function, Id qualifier) {
043: super ("Authorizing (" + function + ", " + qualifier.toString()
044: + ")");
045: this .function = function;
046: this .qualifier = qualifier;
047: }
048:
049: /**
050: *
051: */
052: public AuthorizationFailedException(Agent agent, String function,
053: Id qualifier) {
054: super ("Authorizing (" + agent.toString() + ", " + function
055: + ", " + qualifier.toString() + ")");
056: this .agent = agent;
057: this .function = function;
058: this .qualifier = qualifier;
059: }
060:
061: /**
062: *
063: */
064: public AuthorizationFailedException() {
065: super ();
066: }
067:
068: /**
069: * @param cause
070: */
071: public AuthorizationFailedException(Throwable cause) {
072: super (cause);
073: }
074:
075: /**
076: * @param message
077: */
078: public AuthorizationFailedException(String message) {
079: super (message);
080: }
081:
082: /**
083: * @param message
084: * @param cause
085: */
086: public AuthorizationFailedException(String message, Throwable cause) {
087: super (message, cause);
088: }
089:
090: public Agent getAgent() {
091: return agent;
092: }
093:
094: public String getFunction() {
095: return function;
096: }
097:
098: public Id getQualifier() {
099: return qualifier;
100: }
101: }
|