public class CmsChacc extends CmsDialog
The following files use this class:
限定符和类型 | 字段和说明 |
---|---|
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 java.lang.String |
DIALOG_ADDACE
Request parameter value for the action: add an access control entry.
|
static java.lang.String |
DIALOG_DELETE
Request parameter value for the action: delete the permissions.
|
static java.lang.String |
DIALOG_INTERNALUSE
Request parameter value for the action: set the internal use flag.
|
static java.lang.String |
DIALOG_TYPE
The dialog type.
|
static java.lang.String |
PARAM_INHERIT
Request parameter name for the inherit permissions parameter.
|
static java.lang.String |
PARAM_INTERNAL
Request parameter name for the internal use only flag.
|
static java.lang.String |
PARAM_NAME
Request parameter name for the name parameter.
|
static java.lang.String |
PARAM_OVERWRITEINHERITED
Request parameter name for the overwrite inherited permissions parameter.
|
static java.lang.String |
PARAM_RESPONSIBLE
Request parameter name for the responsible parameter.
|
static java.lang.String |
PARAM_TYPE
Request parameter name for the type parameter.
|
static java.lang.String |
PARAM_VIEW
Request parameter name for the view parameter.
|
static java.lang.String |
PERMISSION_ALLOW
Constant for the request parameters suffix: allow.
|
static java.lang.String |
PERMISSION_DENY
Constant for the request parameters suffix: deny.
|
ACTION_CANCEL, ACTION_CLOSEPOPUP, ACTION_CLOSEPOPUP_SAVE, ACTION_CONFIRMED, ACTION_CONTINUE, ACTION_DEFAULT, ACTION_LOCKS_CONFIRMED, ACTION_OK, ACTION_REPORT_BEGIN, ACTION_REPORT_END, ACTION_REPORT_UPDATE, ACTION_SET, ACTION_WAIT, ATTRIBUTE_THROWABLE, BUTTON_ADVANCED, BUTTON_BACK, BUTTON_CANCEL, BUTTON_CLOSE, BUTTON_CONTINUE, BUTTON_DETAILS, BUTTON_DISCARD, BUTTON_EDIT, BUTTON_OK, BUTTON_OK_NO_SUBMIT, BUTTON_SET, DIALOG_BACK, DIALOG_CANCEL, DIALOG_CONFIRMED, DIALOG_CONTINUE, DIALOG_INITIAL, DIALOG_LOCKS_CONFIRMED, DIALOG_OK, DIALOG_SET, DIALOG_WAIT, PARAM_ACTION, PARAM_CLOSELINK, PARAM_DIALOGTYPE, PARAM_ERRORSTACK, PARAM_FILE, PARAM_FRAMENAME, PARAM_ISPOPUP, PARAM_LOCK, PARAM_MESSAGE, PARAM_ORIGINALPARAMS, PARAM_PREACTIONDONE, PARAM_REDIRECT, PARAM_RESOURCE, PARAM_TARGET, PARAM_THREAD, PARAM_THREAD_HASNEXT, PARAM_TITLE, REPORT_BEGIN, REPORT_END, REPORT_UPDATE
PARAM_ADMIN_PROJECT, PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW
DEBUG, DEFAULT_LANGUAGE, DEFAULT_LOCALE, DIALOG_PATH_COMMON, FILE_DIALOG_CLOSE, FILE_DIALOG_SCREEN_CONFIRM, FILE_DIALOG_SCREEN_ERROR, FILE_DIALOG_SCREEN_ERRORPAGE, FILE_DIALOG_SCREEN_WAIT, FILE_EXPLORER_FILELIST, FILE_REPORT_OUTPUT, HTML_END, HTML_START, PARAM_WP_EXPLORER_RESOURCE, PARAM_WP_PROJECT, PARAM_WP_SITE, PATH_DIALOGS, PATH_WORKPLACE, REQUEST_ATTRIBUTE_MULTIPART, REQUEST_ATTRIBUTE_RELOADTREE, RES_PATH_FILETYPES, RFS_PATH_RESOURCES, SESSION_WORKPLACE_CLASS, VFS_DIR_DEFAULTBODIES, VFS_DIR_TEMPLATES, VFS_PATH_COMMONS, VFS_PATH_EDITORS, VFS_PATH_GALLERIES, VFS_PATH_LOCALES, VFS_PATH_MODULES, VFS_PATH_RESOURCES, VFS_PATH_SYSTEM, VFS_PATH_VIEWS, VFS_PATH_WORKPLACE, VIEW_DIRECT_EDIT, VIEW_WORKPLACE
构造器和说明 |
---|
CmsChacc(CmsJspActionElement jsp)
Public constructor.
|
CmsChacc(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
actionAddAce()
Adds a new access control entry to the resource.
|
boolean |
actionInternalUse(javax.servlet.http.HttpServletRequest request)
Modifies the Internal Use flag of a resource.
|
boolean |
actionModifyAce(javax.servlet.http.HttpServletRequest request)
Modifies a present access control entry for a resource.
|
boolean |
actionRemoveAce()
Removes a present access control entry from the resource.
|
java.lang.String |
buildCurrentPermissions()
Builds a String with HTML code to display the users access rights for the current resource.
|
java.lang.String |
buildErrorMessages()
Returns the error messages if something went wrong.
|
java.lang.String |
buildResponsibleList(boolean show)
Builds a String with HTML code to display the responsibles of a resource.
|
java.lang.String |
buildRightsList()
Builds a String with HTML code to display the inherited and own access control entries of a resource.
|
static java.lang.String |
buildSummaryDetailsButtons(CmsDialog wp)
Builds a detail view selector.
|
protected boolean |
checkNewEntry(java.lang.String name,
int arrayPosition)
Validates the user input when creating a new access control entry.
|
protected java.lang.String |
getConnectedResource(CmsAccessControlEntry entry,
java.util.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 java.lang.String |
getEntryType(int flags,
boolean all)
Determines the type of the current access control entry.
|
protected int |
getEntryTypeInt(int flags)
Determines the int type of the current access control entry.
|
java.util.List |
getErrorMessages()
Returns a list with all error messages which occurred when trying to add a new access control entry.
|
java.lang.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.
|
java.lang.String |
getParamName()
Returns the value of the name parameter,
or null if this parameter was not provided.
|
java.lang.String |
getParamType()
Returns the value of the type parameter,
or null if this parameter was not provided.
|
java.lang.String |
getParamUuid() |
boolean |
getShowInheritedPermissions()
Returns if the inherited permissions information should be displayed.
|
protected java.lang.String[] |
getTypes(boolean all)
Returns a String array with the possible entry types.
|
protected int[] |
getTypesInt()
Returns an int array with possible entry types.
|
protected java.lang.String[] |
getTypesLocalized()
Returns a String array with the possible localized entry types.
|
java.lang.String |
htmlStart()
Builds the start html of the page, including setting of DOCTYPE and
inserting a header with the content-type.
|
void |
init()
Initializes some member variables to display the form with the right options for the current user.
|
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
javax.servlet.http.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 |
isOverWritingInherited(int flags)
Check if the current permissions are overwriting the inherited ones.
|
protected boolean |
isResponsible(int flags)
Check if the user is a responsible for the resource.
|
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(java.lang.String value)
Sets the value of the name parameter.
|
void |
setParamType(java.lang.String value)
Sets the value of the type parameter.
|
void |
setParamUuid(java.lang.String uuid) |
protected void |
setShowInheritedPermissions(boolean showInheritedPermissions)
Sets if the inherited permissions information should be displayed.
|
actionCloseDialog, appendDelimiter, buildAjaxResultContainer, buildAjaxWaitMessage, buildLockAdditionalOptions, buildLockConfirmationMessageJS, buildLockDialog, buildLockDialog, buildLockHeaderBox, checkResourcePermissions, checkResourcePermissions, computeCurrentFolder, dialog, dialogBlock, dialogBlockEnd, dialogBlockStart, dialogButtonRow, dialogButtonRowEnd, dialogButtonRowStart, dialogButtons, dialogButtonsClose, dialogButtonsClose, dialogButtonsCloseDetails, dialogButtonsHtml, dialogButtonsOk, dialogButtonsOk, dialogButtonsOkCancel, dialogButtonsOkCancel, dialogButtonsOkCancelAdvanced, dialogButtonsSetOkCancel, dialogContent, dialogContentEnd, dialogContentStart, dialogEnd, dialogHead, dialogHorizontalSpacer, dialogLockButtons, dialogRow, dialogRowEnd, dialogRowStart, dialogScriptSubmit, dialogSeparator, dialogSpacer, dialogStart, dialogStart, dialogSubheadline, dialogToggleStart, dialogWhiteBox, dialogWhiteBoxEnd, dialogWhiteBoxStart, getAction, getAdministrationBackLink, getCancelAction, getDialogRealUri, getDialogUri, getOnlineHelpUriCustom, getParamAction, getParamCloseLink, getParamDialogtype, getParamFramename, getParamIsPopup, getParamMessage, getParamOriginalParams, getParamPreActionDone, getParamRedirect, getParamResource, getParamTitle, getState, hasCorrectLockstate, hasSiblings, htmlStart, htmlStart, htmlStartStyle, includeErrorpage, initCmsDialog, isPopup, isPreEditor, pageHtml, pageHtml, setAction, setOnlineHelpUriCustom, setParamAction, setParamCloseLink, setParamDialogtype, setParamFramename, setParamIsPopup, setParamMessage, setParamOriginalParams, setParamPreActionDone, setParamRedirect, setParamResource, setParamTitle
computeUpLevelLink, dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamForce, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamForce, setParamPath, setParamRoot, setParamStyle, useNewStyle
addMessages, addMessages, allParamsAsHidden, allParamsAsRequest, allParamValues, bodyEnd, bodyStart, bodyStart, buildSelect, buildSelect, button, button, buttonBar, buttonBar, buttonBarHorizontalLine, buttonBarLabel, buttonBarLabel, buttonBarLine, buttonBarLineSpacer, buttonBarSeparator, buttonBarSpacer, buttonBarStartTab, checkLock, checkLock, checkRole, decodeParamValue, fillParamValues, fillParamValues, getBroadcastMessageString, getCms, getEncoding, getExplorerFileListFullUri, getFrameSource, getJsp, getLocale, getMacroResolver, getMessages, getMultiPartFileItems, getParameterMap, getResourceUri, getResourceUri, getSession, getSettings, getSkinUri, getStartSiteRoot, getStyleUri, getStyleUri, getStyleUri, getTemporaryFileName, htmlEnd, initMessages, initSettings, initTimeWarp, initUserSettings, initWorkplaceMembers, initWorkplaceSettings, isForwarded, isHelpEnabled, isSubElement, isTemporaryFile, key, key, keyDefault, nullToEmpty, paramsAsHidden, paramsAsHidden, paramsAsParameterMap, paramsAsRequest, paramValues, resolveMacros, sendCmsRedirect, sendForward, setForwarded, shortKey, substituteSiteTitle, switchToCurrentProject, switchToTempProject
public static final int ACTION_ADDACE
public static final int ACTION_DELETE
public static final int ACTION_INTERNALUSE
public static final java.lang.String DIALOG_ADDACE
public static final java.lang.String DIALOG_DELETE
public static final java.lang.String DIALOG_INTERNALUSE
public static final java.lang.String DIALOG_TYPE
public static final java.lang.String PARAM_INHERIT
public static final java.lang.String PARAM_INTERNAL
public static final java.lang.String PARAM_NAME
public static final java.lang.String PARAM_OVERWRITEINHERITED
public static final java.lang.String PARAM_RESPONSIBLE
public static final java.lang.String PARAM_TYPE
public static final java.lang.String PARAM_VIEW
public static final java.lang.String PERMISSION_ALLOW
public static final java.lang.String PERMISSION_DENY
public CmsChacc(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsChacc(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
context
- the JSP page contextreq
- the JSP requestres
- the JSP responsepublic static java.lang.String buildSummaryDetailsButtons(CmsDialog wp)
wp
- the dialog objectpublic boolean actionAddAce()
public boolean actionInternalUse(javax.servlet.http.HttpServletRequest request)
request
- the Http servlet requestpublic boolean actionModifyAce(javax.servlet.http.HttpServletRequest request)
request
- the Http servlet requestpublic boolean actionRemoveAce()
public java.lang.String buildCurrentPermissions()
public java.lang.String buildErrorMessages()
public java.lang.String buildResponsibleList(boolean show)
show
- true the responsible list is openpublic java.lang.String buildRightsList()
public CmsPermissionSet getCurPermissions()
public java.util.List getErrorMessages()
public java.lang.String getErrorMessagesString()
public java.lang.String getParamName()
The name parameter stores the name of the group or user.
public java.lang.String getParamType()
The type parameter stores the type of an ace (group or user).
public java.lang.String getParamUuid()
public boolean getShowInheritedPermissions()
public java.lang.String htmlStart()
CmsDialog
htmlStart
在类中 CmsDialog
CmsDialog.htmlStart()
public void init()
This method must be called after initWorkplaceRequestValues().
public void setParamName(java.lang.String value)
value
- the value to setpublic void setParamType(java.lang.String value)
value
- the value to setpublic void setParamUuid(java.lang.String uuid)
protected boolean checkNewEntry(java.lang.String name, int arrayPosition)
name
- the name of the new user/grouparrayPosition
- the position in the types arrayprotected java.lang.String getConnectedResource(CmsAccessControlEntry entry, java.util.Map parents)
entry
- the current access control entryparents
- the parent resources to determine the connected resourceprotected boolean getEditable()
protected java.lang.String getEntryType(int flags, boolean all)
flags
- the value of the current flagsall
- to include all types, or just user and groupsprotected int getEntryTypeInt(int flags)
flags
- the value of the current flagsprotected boolean getInheritOption()
protected java.lang.String[] getTypes(boolean all)
all
- to include all types, or just user, groups and rolesprotected int[] getTypesInt()
protected java.lang.String[] getTypesLocalized()
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
CmsWorkplace
initWorkplaceRequestValues
在类中 CmsDialog
settings
- 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 checkprotected boolean isDenied(CmsPermissionSet p, int value)
p
- the current CmsPermissionSetvalue
- the int value of the permission to checkprotected boolean isOverWritingInherited(int flags)
flags
- value of all flags of the current entryprotected boolean isResponsible(int flags)
flags
- value of all flags of the current entryprotected 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