| java.lang.Object com.Yasna.forum.ForumPermissions
ForumPermissions | public class ForumPermissions implements Cacheable(Code) | | Defines a set of permissions for objects in the forum system that
users can be granted. Forum permissions are used by the protection
proxy objects defined for each major component of the system.
|
Field Summary | |
final public static int | CREATE_MESSAGE Permission to create a new message. | final public static int | CREATE_THREAD Permission to create a new thread. | final public static int | FORUM_ADMIN Permission to administer a particular forum. | final public static int | GROUP_ADMIN Permission to administer a particular group. | final public static int | MODERATOR Permission to take on a moderator role. | final public static int | READ Permission to read object. | final public static int | SYSTEM_ADMIN Permission to administer the entire sytem. | final public static int | USER_ADMIN Permission to administer a particular user. |
Constructor Summary | |
public | ForumPermissions(boolean READ, boolean SYSTEM_ADMIN, boolean FORUM_ADMIN, boolean USER_ADMIN, boolean GROUP_ADMIN, boolean MODERATOR, boolean CREATE_THREAD, boolean CREATE_MESSAGE) Create a new permissions object with the specified permissions. | public | ForumPermissions(ForumPermissions perm1, ForumPermissions perm2) Creates a new ForumPermission object by combining two permissions
objects. | public | ForumPermissions(boolean[] permissions) |
CREATE_MESSAGE | final public static int CREATE_MESSAGE(Code) | | Permission to create a new message.
|
CREATE_THREAD | final public static int CREATE_THREAD(Code) | | Permission to create a new thread.
|
FORUM_ADMIN | final public static int FORUM_ADMIN(Code) | | Permission to administer a particular forum.
|
GROUP_ADMIN | final public static int GROUP_ADMIN(Code) | | Permission to administer a particular group.
|
MODERATOR | final public static int MODERATOR(Code) | | Permission to take on a moderator role.
|
READ | final public static int READ(Code) | | Permission to read object.
|
SYSTEM_ADMIN | final public static int SYSTEM_ADMIN(Code) | | Permission to administer the entire sytem.
|
USER_ADMIN | final public static int USER_ADMIN(Code) | | Permission to administer a particular user.
|
ForumPermissions | public ForumPermissions(boolean READ, boolean SYSTEM_ADMIN, boolean FORUM_ADMIN, boolean USER_ADMIN, boolean GROUP_ADMIN, boolean MODERATOR, boolean CREATE_THREAD, boolean CREATE_MESSAGE)(Code) | | Create a new permissions object with the specified permissions.
|
ForumPermissions | public ForumPermissions(ForumPermissions perm1, ForumPermissions perm2)(Code) | | Creates a new ForumPermission object by combining two permissions
objects. The higher permission of each permission type will be used.
|
ForumPermissions | public ForumPermissions(boolean[] permissions)(Code) | | |
get | public boolean get(int type)(Code) | | Returns true if the permission of a particular type is allowed.
|
getSize | public int getSize()(Code) | | |
isSystemOrForumAdmin | public boolean isSystemOrForumAdmin()(Code) | | Returns true if the permissions include system or forum admin
permissions.
|
readOnly | public static ForumPermissions readOnly()(Code) | | Factory method to create an object with read-only permissions.
|
|
|