01: /* Copyright 2001, 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.channels.error;
07:
08: import org.jasig.portal.IPermissible;
09:
10: /**
11: * Conveys the single permission available from CError that if granted allows
12: * users to see the stack trace button. This allows PermissionsManager to show
13: * the permission available from CError and grant it to other users or groups.
14: *
15: * @author Mark Boyd, mboyd@sungardsct.com
16: * @since uPortal 2.6.
17: */
18: public class SupportedPermissions implements IPermissible {
19:
20: static final String OWNER = "UP_ERROR_CHAN";
21: static final String VIEW_ACTIVITY = "VIEW";
22: static final String DETAILS_TARGET = "DETAILS";
23:
24: /* (non-Javadoc)
25: * @see org.jasig.portal.IPermissible#getActivityTokens()
26: */
27: public String[] getActivityTokens() {
28: return new String[] { VIEW_ACTIVITY };
29: }
30:
31: /* (non-Javadoc)
32: * @see org.jasig.portal.IPermissible#getActivityName(java.lang.String)
33: */
34: public String getActivityName(String token) {
35: return "View";
36: }
37:
38: /* (non-Javadoc)
39: * @see org.jasig.portal.IPermissible#getTargetTokens()
40: */
41: public String[] getTargetTokens() {
42: return new String[] { DETAILS_TARGET };
43: }
44:
45: /* (non-Javadoc)
46: * @see org.jasig.portal.IPermissible#getTargetName(java.lang.String)
47: */
48: public String getTargetName(String token) {
49: return "Details";
50: }
51:
52: /* (non-Javadoc)
53: * @see org.jasig.portal.IPermissible#getOwnerToken()
54: */
55: public String getOwnerToken() {
56: return OWNER;
57: }
58:
59: /* (non-Javadoc)
60: * @see org.jasig.portal.IPermissible#getOwnerName()
61: */
62: public String getOwnerName() {
63: return "CError Channel";
64: }
65: }
|