jet.server.api.admin.security
Interface JRole

All Superinterfaces:
JPrincipal, java.security.Principal, java.io.Serializable

public interface JRole
extends JPrincipal

This interface is used to represent a role of principals for JReport server. (A principal represents an entity such as an individual user or a company). A role can have one or more parent roles, as well as sub roles. If it has some parent roles, it would inherit permissions from its parent roles. If it has some sub roles, its sub roles would inherit permissions from it. A role can be assigned to one or more groups. If it is assigned to some groups, the groups would have the permissions bound with the role. A role can also be assigned to one or more users. If it is assigned to some users, the users would have the permissions bound with the role.

See Also:
JGroup, JUser

Field Summary
 
Fields inherited from interface jet.server.api.admin.security.JPrincipal
SEPARATOR
 
Method Summary
 java.lang.String[] getGroupNames()
          Gets all the names of the groups of a role.
 java.lang.String[] getParentRoleNames()
          Gets all the names of parent roles of a role.
 java.lang.String[] getSubRoleNames()
          Gets all the names of sub roles of a role.
 java.lang.String[] getUserNames()
          Gets all the names of the users of a role.
 boolean isBuiltin()
          Checks whether the role was created by system or not.
 
Methods inherited from interface jet.server.api.admin.security.JPrincipal
getDescription, getDisplayName, getOrganization, getType
 
Methods inherited from interface java.security.Principal
equals, getName, hashCode, toString
 

Method Detail

isBuiltin

boolean isBuiltin()
Checks whether the role was created by system or not.

Returns:
If this role is created by system return true, otherwise return false.

getParentRoleNames

java.lang.String[] getParentRoleNames()
Gets all the names of parent roles of a role. The names are put into a Array of String.

Returns:
A Array of String, if the role has no parent role, the size of the Array is 0.

getSubRoleNames

java.lang.String[] getSubRoleNames()
Gets all the names of sub roles of a role. The names are put into a Array of String.

Returns:
A Array of String, if the role has no sub role, the size of the Array is 0.

getGroupNames

java.lang.String[] getGroupNames()
Gets all the names of the groups of a role. The names are put into a Array of String.

Returns:
A Array of String, if the role has no group, the size of the Array is 0.

getUserNames

java.lang.String[] getUserNames()
Gets all the names of the users of a role. The names are put into a Array of String.

Returns:
A Array of String, if the role has no user, the size of the Array is 0.