|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.workplace.CmsWorkplace
org.opencms.workplace.tools.CmsToolDialog
org.opencms.workplace.CmsDialog
org.opencms.workplace.commons.CmsChacc
public class CmsChacc
Provides methods for building the permission settings dialog.
The following files use this class:
| Field Summary | |
|---|---|
static int |
ACTION_ADDACE
Value for the action: add an access control entry. |
static int |
ACTION_DELETE
Value for the action: delete the permissions. |
static int |
ACTION_INTERNALUSE
Value for the action: set the internal use flag. |
static String |
DIALOG_ADDACE
Request parameter value for the action: add an access control entry. |
static String |
DIALOG_DELETE
Request parameter value for the action: delete the permissions. |
static String |
DIALOG_INTERNALUSE
Request parameter value for the action: set the internal use flag. |
static String |
DIALOG_TYPE
The dialog type. |
static String |
PARAM_INHERIT
Request parameter name for the inherit permissions parameter. |
static String |
PARAM_INTERNAL
Request parameter name for the internal use only flag. |
static String |
PARAM_OVERWRITEINHERITED
Request parameter name for the overwrite inherited permissions parameter. |
static String |
PARAM_VIEW
Request parameter name for the view parameter. |
static String |
PERMISSION_ALLOW
Constant for the request parameters suffix: allow. |
static String |
PERMISSION_DENY
Constant for the request parameters suffix: deny. |
| Fields inherited from class org.opencms.workplace.tools.CmsToolDialog |
|---|
PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW |
| Constructor Summary | |
|---|---|
CmsChacc(CmsJspActionElement jsp)
Public constructor. |
|
CmsChacc(PageContext context,
HttpServletRequest req,
HttpServletResponse res)
Public constructor with JSP variables. |
|
| Method Summary | |
|---|---|
boolean |
actionAddAce()
Adds a new access control entry to the resource. |
boolean |
actionInternalUse(HttpServletRequest request)
Modifies the Internal Use flag of a resource. |
boolean |
actionModifyAce(HttpServletRequest request)
Modifies a present access control entry for a resource. |
boolean |
actionRemoveAce()
Removes a present access control entry from the resource. |
String |
buildCurrentPermissions()
Builds a String with HTML code to display the users access rights for the current resource. |
String |
buildErrorMessages()
Returns the error messages if something went wrong. |
String |
buildRightsList()
Builds a String with HTML code to display the inherited and own access control entries of a resource. |
protected boolean |
checkNewEntry(String name,
int arrayPosition)
Check method to validate the user input when creating a new access control entry. |
protected String |
getConnectedResource(CmsAccessControlEntry entry,
Map parents)
Returns the resource on which the specified access control entry was set. |
CmsPermissionSet |
getCurPermissions()
Returns the current users permission set on the resource. |
protected boolean |
getEditable()
Returns the current editable flag for the user to change ACEs. |
protected String |
getEntryType(int flags)
Determines the type of the current access control entry. |
protected int |
getEntryTypeInt(int flags)
Determines the int type of the current access control entry. |
ArrayList |
getErrorMessages()
Returns a list with all error messages which occured when trying to add a new access control entry. |
String |
getErrorMessagesString()
Returns a String with all error messages occuring when trying to add a new access control entry. |
protected boolean |
getInheritOption()
Returns if the access control entry can be inherited to subfolders and can overwrite inherited permissions. |
String |
getParamName()
Returns the value of the name parameter, or null if this parameter was not provided. |
String |
getParamType()
Returns the value of the type parameter, or null if this parameter was not provided. |
protected boolean |
getShowInheritedPermissions()
Returns if the inherited permissions information should be displayed. |
protected String[] |
getTypes()
Returns a String array with the possible entry types. |
protected int[] |
getTypesInt()
Returns an int array with possible entry types. |
protected String[] |
getTypesLocalized()
Returns a String array with the possible localized entry types. |
void |
init()
Initializes some member variables to display the form with the right options for the current user. |
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
HttpServletRequest request)
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly. |
protected boolean |
isAllowed(CmsPermissionSet p,
int value)
Checks if a certain permission of a permission set is allowed. |
protected boolean |
isDenied(CmsPermissionSet p,
int value)
Checks if a certain permission of a permission set is denied. |
protected boolean |
isInheriting(int flags)
Check if the current permissions are inherited to subresources. |
protected boolean |
isOverWritingInherited(int flags)
Check if the current permissions are overwriting the inherited ones. |
protected void |
setCurPermissions(CmsPermissionSet value)
Sets the current users permissions on the resource. |
protected void |
setEditable(boolean value)
Sets the editable flag for the forms. |
protected void |
setInheritOption(boolean value)
Sets if the access control entry can be inherited to subfolders and can overwrite inherited permissions. |
void |
setParamName(String value)
Sets the value of the name parameter. |
void |
setParamType(String value)
Sets the value of the type parameter. |
protected void |
setShowInheritedPermissions(boolean showInheritedPermissions)
Sets if the inherited permissions information should be displayed. |
| Methods inherited from class org.opencms.workplace.tools.CmsToolDialog |
|---|
dialogTitle, getAdminTool, getCurrentToolPath, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamPath, setParamRoot, setParamStyle, useNewStyle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ACTION_ADDACE
public static final int ACTION_DELETE
public static final int ACTION_INTERNALUSE
public static final String DIALOG_ADDACE
public static final String DIALOG_DELETE
public static final String DIALOG_INTERNALUSE
public static final String DIALOG_TYPE
public static final String PARAM_INHERIT
public static final String PARAM_INTERNAL
public static final String PARAM_OVERWRITEINHERITED
public static final String PARAM_VIEW
public static final String PERMISSION_ALLOW
public static final String PERMISSION_DENY
| Constructor Detail |
|---|
public CmsChacc(CmsJspActionElement jsp)
jsp - an initialized JSP action element
public CmsChacc(PageContext context,
HttpServletRequest req,
HttpServletResponse res)
context - the JSP page contextreq - the JSP requestres - the JSP response| Method Detail |
|---|
public boolean actionAddAce()
public boolean actionInternalUse(HttpServletRequest request)
request - the Http servlet request
public boolean actionModifyAce(HttpServletRequest request)
request - the Http servlet request
public boolean actionRemoveAce()
public String buildCurrentPermissions()
public String buildErrorMessages()
public String buildRightsList()
public CmsPermissionSet getCurPermissions()
public ArrayList getErrorMessages()
public String getErrorMessagesString()
public String getParamName()
The name parameter stores the name of the group or user.
public String getParamType()
The type parameter stores the type of an ace (group or user).
public void init()
This method must be called after initWorkplaceRequestValues().
public void setParamName(String value)
value - the value to setpublic void setParamType(String value)
value - the value to set
protected boolean checkNewEntry(String name,
int arrayPosition)
name - the name of the new user/grouparrayPosition - the position in the types array
protected String getConnectedResource(CmsAccessControlEntry entry,
Map parents)
entry - the current access control entryparents - the parent resources to determine the connected resource
protected boolean getEditable()
protected String getEntryType(int flags)
flags - the value of the current flags
protected int getEntryTypeInt(int flags)
flags - the value of the current flags
protected boolean getInheritOption()
protected boolean getShowInheritedPermissions()
protected String[] getTypes()
protected int[] getTypesInt()
protected String[] getTypesLocalized()
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings,
HttpServletRequest request)
CmsWorkplace
initWorkplaceRequestValues in class CmsDialogsettings - the workplace settingsrequest - the current requestCmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
protected boolean isAllowed(CmsPermissionSet p,
int value)
p - the current CmsPermissionSetvalue - the int value of the permission to check
protected boolean isDenied(CmsPermissionSet p,
int value)
p - the current CmsPermissionSetvalue - the int value of the permission to check
protected boolean isInheriting(int flags)
flags - value of all flags of the current entry
protected boolean isOverWritingInherited(int flags)
flags - value of all flags of the current entry
protected void setCurPermissions(CmsPermissionSet value)
value - the CmsPermissionSetprotected void setEditable(boolean value)
value - true if user can edit the permissions, otherwise falseprotected void setInheritOption(boolean value)
This is set in the init() method.
value - set to true for folders, otherwise falseprotected void setShowInheritedPermissions(boolean showInheritedPermissions)
showInheritedPermissions - true if the inherited permissions information should be displayed, otherwise false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||