|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This SharedletService provides moderation capability to the sharedlet. It manages what capabilities a local sharedlet has and allows moderator/hosts to remotely set other client's capabilities via its interfaces.
All sharedlet that decide to support moderation must do the following in its SharedletInfo implementation.
Capabilities A capability is a feature the sharedlet supports and want it to be made enablable or disablable. For example, in a whiteboard, capabilities could be "can draw circle", "can draw filled circle", "can draw text", ...
Sharedlet Roles A role is a defined set of capabilities. Whenever a sharedlet is launched, it will be set to one of its defined roles by the management system. This will in turn define the initial set of capabilities that the user has in this invocation of a sharedlet. For example, a instructor role for the whiteboard sharedlet allows the instructor to use all of the capabilities. A student role will only allow the student to place pointers on the whiteboard.
ModeratableElement A moderatable element is a set of capabilities as well. All defined moderatable elements are those that a moderator or a host can change during the class/meeting. For example, the "Draw" moderatable element is a list of all draw capabilities. If it is defined, the host/moderator will be able to remotely enable the "Draw" moderatable element (which will enable all of the capabilities defined within the element) for a particular user.
This set of elements convenience packages all possible capabilities into a set of moderation commands for the moderator/host.
Master/Slave/Moderator Modes
The CapabilitiesManager can take on three modes.
Users who get this mode can essentially demote/promote other people to be moderator, super user (master mode), or participant (slave).
Users who are in this mode can not pass on moderatorship access to another user. That is the main difference between Master/Moderator modes.
A sharedlet can find the Capabilities Manager under:
/services/CapabilitiesManager
Field Summary | |
static short |
MASTER_MODE
All methods are allowed. |
static short |
MODERATOR_MODE
The setRemoteMode() method is disallowed. |
static short |
SLAVE_MODE
All remote functionality are disallowed. |
Method Summary | |
void |
addCapabilityListener(CapabilityListener l)
Listener to monitor changes in capabilities. |
void |
disableCapability(java.lang.String sharedletMIME,
java.lang.String capability)
Used to disable capability of a local user. |
void |
disableRemoteModeratable(java.lang.String sharedletMIME,
java.lang.String modertable,
com.anabas.concepts.UserID user)
Used by sharedlet to remotely enable capabilities in a different user's capability manager. |
void |
enableCapability(java.lang.String sharedletMIME,
java.lang.String capability)
Used to enable capability of a local user. |
void |
enableRemoteModeratable(java.lang.String sharedletMIME,
java.lang.String moderatable,
com.anabas.concepts.UserID user)
Used by sharedlet to remotely enable capabilities in a different user's capability manager. |
java.util.Vector |
getApplicationRoles()
Get the list of application roles. |
java.lang.String |
getCurrentApplicationRole()
Get the current application role for this instance of the capabilities manager. |
java.util.Vector |
getModeratableElements(java.lang.String sharedletMIME)
Returns the list of moderatoratable element that this instance of the capabilitymanager has access to. |
java.lang.String |
getRemoteApplicationRole(com.anabas.concepts.UserID user)
Gets a remote application role. |
java.lang.String |
getRole(java.lang.String sharedletMIME)
Find out what role a sharedlet is currently set in. |
boolean |
isCapable(java.lang.String sharedletMIME,
java.lang.String capability)
Used by sharedlets to determine whether they have the capability to do certain actions. |
boolean |
isLocalModeratable(java.lang.String sharedletMIME,
java.lang.String moderatable)
|
boolean |
isRemoteCapable(java.lang.String sharedletMIME,
java.lang.String capability,
com.anabas.concepts.UserID user)
Query wether a capability is enabled in a remote capabilities manager for another user. |
boolean |
isRemoteModeratable(java.lang.String sharedletMIME,
java.lang.String moderatable,
com.anabas.concepts.UserID user)
Find out if another client's capability manager has a particular modertable element enabled. |
void |
removeCapabilityListener(CapabilityListener l)
Listener to monitor changes in capabilities. |
void |
setRemoteApplicationRole(com.anabas.concepts.UserID user,
java.lang.String appRole)
Set a remote application role. |
void |
setRemoteMode(short mode,
com.anabas.concepts.UserID user)
Sets a remote capability manager's mode. |
Methods inherited from interface com.anabas.sharedlet.SharedletService |
init,
resume,
shutdown,
suspend |
Field Detail |
public static final short SLAVE_MODE
public static final short MODERATOR_MODE
public static final short MASTER_MODE
Method Detail |
public void addCapabilityListener(CapabilityListener l)
l
- The listener to add.public void removeCapabilityListener(CapabilityListener l)
l
- The listener to remove.public java.lang.String getRole(java.lang.String sharedletMIME)
sharedletMIME
- The mime type of the sharedlet to get the role for.public java.util.Vector getApplicationRoles()
public java.lang.String getCurrentApplicationRole()
public void setRemoteApplicationRole(com.anabas.concepts.UserID user, java.lang.String appRole) throws PermissionDeniedException
public java.lang.String getRemoteApplicationRole(com.anabas.concepts.UserID user) throws PermissionDeniedException
public boolean isCapable(java.lang.String sharedletMIME, java.lang.String capability)
sharedletMIME
- The MIME type of the sharedlet to lookup.capability
- The name of the capability to lookup.public boolean isRemoteCapable(java.lang.String sharedletMIME, java.lang.String capability, com.anabas.concepts.UserID user) throws PermissionDeniedException
sharedletMIME
- The MIME type of the sharedlet to enable a capability for.capability
- The name of the capability to enableuser
- The user to perform the capability change on.
This object can be retrived from the SessionManager service.public boolean isLocalModeratable(java.lang.String sharedletMIME, java.lang.String moderatable)
public boolean isRemoteModeratable(java.lang.String sharedletMIME, java.lang.String moderatable, com.anabas.concepts.UserID user) throws PermissionDeniedException
sharedletMIME
- The MIME type of the sharedlet to enable a capability for.modertable
- The name of the moderatable element to query.user
- The user id of the person to perform the capability change on.
This object can be retrived from the SessionManager service.public void setRemoteMode(short mode, com.anabas.concepts.UserID user) throws PermissionDeniedException
mode
- one of MASTER_MODE, SLAVE_MODE, MODERATOR_MODERuser
- The user id of the person whose capability manager to set.
This object can be retrived from the SessionManager service.public void enableRemoteModeratable(java.lang.String sharedletMIME, java.lang.String moderatable, com.anabas.concepts.UserID user) throws PermissionDeniedException
sharedletMIME
- The MIME type of the sharedlet to enable a capability for.modertable
- The name of the moderatable element to enable.user
- The user to perform the capability change on.
This object can be retrived from the SessionManager service.public void disableRemoteModeratable(java.lang.String sharedletMIME, java.lang.String modertable, com.anabas.concepts.UserID user) throws PermissionDeniedException
sharedletMIME
- The MIME type of the sharedlet to enable a capability for.modertable
- The name of the moderatable element to disable.user
- The user to perform the capability change on.
This object can be retrived from the SessionManager service.public java.util.Vector getModeratableElements(java.lang.String sharedletMIME)
public void enableCapability(java.lang.String sharedletMIME, java.lang.String capability) throws PermissionDeniedException
sharedletMIME
- The MIME type of the sharedlet to enable a capability for.capability
- The name of the capability to enable.public void disableCapability(java.lang.String sharedletMIME, java.lang.String capability) throws PermissionDeniedException
sharedletMIME
- The MIME type of the sharedlet to disable a capability for.capability
- The name of the capability to disable.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |