01: /* Copyright 2001 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;
07:
08: /**
09: *
10: * This interface represents the set of questions any channel or service ("Owner") must answer
11: * if it wants to delegate the responsibility of assigning and viewing permissions
12: * to the Permissions Manager channel.
13: *
14: * Owners will be registered by the IPermissible classname that represents them.
15: * These classnames will be stored in a database "UP_PERMISSIBLE"
16: *
17: * @author Alex vigdor av317@columbia.edu
18: * @version $Revision: 34818 $
19: */
20: public interface IPermissible {
21:
22: /** Return a list of tokens representing all the activities this channel controls with permissions.
23: * These tokens can be used by the channel to ascertain permissions at runtime after they have
24: * been entered with the Permissions manager
25: */
26: public String[] getActivityTokens();
27:
28: /** For a given activity token, return a human-readable string that describes the activity.
29: * Used in rendering the Permissions Manager GUI.
30: */
31: public String getActivityName(String token);
32:
33: /** Return an array of tokens representing all targets this channel controls with permissions.
34: */
35: public String[] getTargetTokens();
36:
37: /** Return the human readable name of a target
38: */
39: public String getTargetName(String token);
40:
41: /** Return the token used by this channel to represent itself as the owner of generated permissions.
42: * Can be arbitrary, but must be unique - I've been using classnames. This is also used by the channel
43: * to request a PermissionManager from the AuthorizationService at runtime.
44: */
45: public String getOwnerToken();
46:
47: /** Human-readable name of the owner - normally the Channel name.
48: */
49: public String getOwnerName();
50: }
|