com.openexchange.messaging
Interface MessagingPermission

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
DefaultMessagingPermission

public interface MessagingPermission
extends java.lang.Cloneable

MessagingPermission - Represents a messaging permission.

Since:
Open-Xchange v6.16
Author:
Thorben Betten

Field Summary
static int CREATE_OBJECTS_IN_FOLDER
          The permission constant granting folder visibility and allowing to create objects in folder.
static int CREATE_SUB_FOLDERS
          The permission constant granting folder visibility, allowing to create objects in folder, and allowing to create subfolders below folder.
static int DELETE_ALL_OBJECTS
          The permission constant allowing to remove all objects.
static int DELETE_OWN_OBJECTS
          The permission constant allowing to remove own objects.
static int MAX_PERMISSION
          The constant for maximum permission.
static int NO_PERMISSIONS
          The constant for no permission at all.
static int READ_ALL_OBJECTS
          The permission constant granting visibility for all objects.
static int READ_FOLDER
          The permission constant granting folder visibility.
static int READ_OWN_OBJECTS
          The permission constant granting visibility for own objects.
static int WRITE_ALL_OBJECTS
          The permission constant allowing to edit all objects.
static int WRITE_OWN_OBJECTS
          The permission constant allowing to edit own objects.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 int getDeletePermission()
          Gets the delete permission.
 int getEntity()
          Gets this folder permission's entity identifier.
 int getFolderPermission()
          Gets the folder permission.
 int getReadPermission()
          Gets the read permission.
 int getSystem()
          Gets this folder permission's system bit mask.
 int getWritePermission()
          Gets the write permission.
 boolean isAdmin()
          Checks if this folder permission denotes its entity as a folder administrator.
 boolean isGroup()
          Checks if this folder permission's entity is a group.
 void setAdmin(boolean admin)
          Sets if this folder permission denotes its entity as a folder administrator.
 void setAllPermissions(int folderPermission, int readPermission, int writePermission, int deletePermission)
          Convenience method to set all permissions at once.
 void setDeletePermission(int permission)
          Sets the delete permission.
 void setEntity(int entity)
          Sets this folder permission's entity identifier.
 void setFolderPermission(int permission)
          Sets the folder permission.
 void setGroup(boolean group)
          Sets if this folder permission's entity is a group.
 void setMaxPermissions()
          Convenience method which passes MAX_PERMISSION to all permissions and sets folder administrator flag to true.
 void setNoPermissions()
          Convenience method which passes NO_PERMISSIONS to all permissions and sets folder administrator flag to false.
 void setReadPermission(int permission)
          Sets the read permission.
 void setSystem(int system)
          Sets this folder permission's system bit mask.
 void setWritePermission(int permission)
          Sets the write permission.
 

Field Detail

NO_PERMISSIONS

static final int NO_PERMISSIONS
The constant for no permission at all.

See Also:
Constant Field Values

MAX_PERMISSION

static final int MAX_PERMISSION
The constant for maximum permission.

See Also:
Constant Field Values

READ_FOLDER

static final int READ_FOLDER
The permission constant granting folder visibility.

See Also:
Constant Field Values

CREATE_OBJECTS_IN_FOLDER

static final int CREATE_OBJECTS_IN_FOLDER
The permission constant granting folder visibility and allowing to create objects in folder.

See Also:
Constant Field Values

CREATE_SUB_FOLDERS

static final int CREATE_SUB_FOLDERS
The permission constant granting folder visibility, allowing to create objects in folder, and allowing to create subfolders below folder.

See Also:
Constant Field Values

READ_OWN_OBJECTS

static final int READ_OWN_OBJECTS
The permission constant granting visibility for own objects.

See Also:
Constant Field Values

READ_ALL_OBJECTS

static final int READ_ALL_OBJECTS
The permission constant granting visibility for all objects.

See Also:
Constant Field Values

WRITE_OWN_OBJECTS

static final int WRITE_OWN_OBJECTS
The permission constant allowing to edit own objects.

See Also:
Constant Field Values

WRITE_ALL_OBJECTS

static final int WRITE_ALL_OBJECTS
The permission constant allowing to edit all objects.

See Also:
Constant Field Values

DELETE_OWN_OBJECTS

static final int DELETE_OWN_OBJECTS
The permission constant allowing to remove own objects.

See Also:
Constant Field Values

DELETE_ALL_OBJECTS

static final int DELETE_ALL_OBJECTS
The permission constant allowing to remove all objects.

See Also:
Constant Field Values
Method Detail

clone

java.lang.Object clone()
Creates and returns a copy of this object.

Returns:
A clone of this instance.

equals

boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object

getSystem

int getSystem()
Gets this folder permission's system bit mask.

Returns:
This folder permission's system bit mask

setSystem

void setSystem(int system)
Sets this folder permission's system bit mask.

Parameters:
system - This folder permission's system bit mask

isGroup

boolean isGroup()
Checks if this folder permission's entity is a group.

Returns:
true if this folder permission's entity is a group; otherwise false

setGroup

void setGroup(boolean group)
Sets if this folder permission's entity is a group.

Parameters:
group - true if this folder permission's entity is a group; otherwise false

getEntity

int getEntity()
Gets this folder permission's entity identifier.

Returns:
This folder permission's entity identifier

setEntity

void setEntity(int entity)
Sets this folder permission's entity identifier.

Parameters:
entity - The entity identifier

isAdmin

boolean isAdmin()
Checks if this folder permission denotes its entity as a folder administrator.

Returns:
true if this folder permission's entity is a folder administrator; otherwise false

setAdmin

void setAdmin(boolean admin)
Sets if this folder permission denotes its entity as a folder administrator.

Parameters:
admin - true if this folder permission's entity is a folder administrator; otherwise false

getFolderPermission

int getFolderPermission()
Gets the folder permission.

Returned value is one of:

Returns:
The folder permission

setFolderPermission

void setFolderPermission(int permission)
Sets the folder permission.

Passed value is one of:

Parameters:
permission - The folder permission

getReadPermission

int getReadPermission()
Gets the read permission.

Returned value is one of:

Returns:
The read permission

setReadPermission

void setReadPermission(int permission)
Sets the read permission.

Passed value is one of:

Parameters:
permission - The read permission

getWritePermission

int getWritePermission()
Gets the write permission.

Returned value is one of:

Returns:
The write permission

setWritePermission

void setWritePermission(int permission)
Sets the write permission.

Passed value is one of:

Parameters:
permission - The write permission

getDeletePermission

int getDeletePermission()
Gets the delete permission.

Returned value is one of:

Returns:
The delete permission

setDeletePermission

void setDeletePermission(int permission)
Sets the delete permission.

Passed value is one of:

Parameters:
permission - The delete permission

setAllPermissions

void setAllPermissions(int folderPermission,
                       int readPermission,
                       int writePermission,
                       int deletePermission)
Convenience method to set all permissions at once.

Parameters:
folderPermission - The folder permission
readPermission - The read permission
writePermission - The write permission
deletePermission - The delete permission
See Also:
setFolderPermission(int), setReadPermission(int), setWritePermission(int), setDeletePermission(int)

setMaxPermissions

void setMaxPermissions()
Convenience method which passes MAX_PERMISSION to all permissions and sets folder administrator flag to true.


setNoPermissions

void setNoPermissions()
Convenience method which passes NO_PERMISSIONS to all permissions and sets folder administrator flag to false.