com.anabas.sharedlet
Class SharedletRCUtil
java.lang.Object
|
+--com.anabas.sharedlet.SharedletRCUtil
- public class SharedletRCUtil
- extends java.lang.Object
A convenience class for Sharedlet developers that implements functionality
necessary for SharedletRoleInfo, ModeratableElementInfo,
and Capability Infos. SharedletInfo can extends this class and setup the roles,
capabilities & moderatable elements without having to implement the internal
tables need to store it..
Should eventually be replaced by the XML version.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SharedletRCUtil
public SharedletRCUtil()
setModeratable
protected void setModeratable(java.lang.String moderatable,
java.lang.String capabilities)
- Add a moderatable element. For example:
setModeratable("Draw","dtext,dcircle");
- Parameters:
moderatable
- A moderatable element namecapabilities
- A comma separated list of capabilitity names that
define this moderatable element.
setRole
protected void setRole(java.lang.String role,
java.lang.String capabilities,
java.lang.String views)
- Add a role definition. For example:
setRole("Host","cap1,cap2,cap3","view1,view2")
- Parameters:
role
- The role namecapabilities
- A comma separated list of capabilitiesviews
- A comma separated view ID list. Same as that returned by
SharedletViewInfo.getID().
setCapabilities
protected void setCapabilities(java.lang.String capabilities)
- Set all of the possible capabilities that this sharedlet has.
For example:
"cap1,cap2,cap3"
- Parameters:
A
- comma separate list of unique capability names.
getModeratableInfos
public java.util.Vector getModeratableInfos()
- Returns:
- A enumerated list of ModeratableElementInfos
getModeratableInfo
public ModeratableElementInfo getModeratableInfo(java.lang.String name)
- Parameters:
The
- name of the moderatable info element to retrieve.- Returns:
- The moderatable element info corresponding to a moderatable name.
null if there is no match.
getRoles
public java.util.Vector getRoles()
- Returns:
- A enumerated list of role names
getRoleInfos
public java.util.Vector getRoleInfos()
- Returns:
- A list of SharedletRoleInfos of all the roles it manages.
getRoleViews
public java.util.Vector getRoleViews(java.lang.String role)
- Returns:
- A list of view ID's that this a particular role is allowed to see.
getCapabilities
public java.util.Vector getCapabilities()
- Returns:
- A list of unique capabilities that this sharedlet has.