View Javadoc
1 /* 2 * $Header: /cvsroot/ebxmlrr/ebxmlrr/src/share/com/sun/ebxml/registry/security/UnauthorizedRequestException.java,v 1.4 2003/04/11 02:37:49 farrukh_najmi Exp $ 3 * 4 * ==================================================================== 5 * 6 * This code is subject to the freebxml License, Version 1.1 7 * 8 * Copyright (c) 2003 freebxml.org. All rights reserved. 9 * 10 * ==================================================================== 11 */ 12 package com.sun.ebxml.registry.security; 13 14 /*** 15 * This Exception is thrown when a User attempt a secure operation for which they are not authorized. 16 * 17 * @author <a href="mailto:Farrukh.Najmi@Sun.COM">Farrukh S. Najmi</a> 18 */ 19 public class UnauthorizedRequestException extends com.sun.ebxml.registry.RegistryException { 20 21 private String id; 22 private String userId; 23 String action; 24 25 public UnauthorizedRequestException(String objectId, String userId) { 26 super("The user " + userId + " is not authorized to make the requests on the object " + objectId); 27 id = objectId; 28 this.userId = userId; 29 } 30 31 public UnauthorizedRequestException(String objectId, String userId, String action) { 32 super("The user " + userId + " is not authorized to perform action '" + action + "' on the object " + objectId); 33 id = objectId; 34 this.userId = userId; 35 this.action = action; 36 } 37 38 public UnauthorizedRequestException(String detail) { 39 super(detail); 40 } 41 42 /*** 43 * Get the id of the object on which the user makes unauthorized request 44 */ 45 public String getId() { 46 return id; 47 } 48 49 /*** 50 * Get the id of the user who makes the unauthorized request 51 */ 52 public String getUserId() { 53 return userId; 54 } 55 56 }

This page was automatically generated by Maven