Class UserEntityPrivilegesTransform
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractTransform
-
- com.microstrategy.web.transform.AbstractLayoutTransform
-
- com.microstrategy.web.app.transforms.AbstractAppTransform
-
- com.microstrategy.web.app.transforms.AbstractPrivilegesEditorTransform
-
- com.microstrategy.web.app.transforms.UserEntityPrivilegesTransform
-
- All Implemented Interfaces:
AppTransform
,LayoutTransform
,Transform
public class UserEntityPrivilegesTransform extends AbstractPrivilegesEditorTransform implements LayoutTransform
This transform generates the dialog that allows modifying Privileges for a user or group.
It displays each project loaded in the Intelligence-Server as a column and privileges are groups in categories and displayed at the row.
The transform doesn't generate the information about whether a specific privilege is granted for a particular project, this generation is calculated in the client using javascript based on the information generated by this Transform.- Since:
- MicroStrategy Web 9.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
AbstractAppTransform.Context
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractPrivilegesEditorTransform
SERVER_LEVEL_PRIVILEGES
-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
_bean, _componentBlock, _cssPrefix, _imgBlank, _imgWait, _selfOutput, _subOutput, appliesTo, CLASS_INPUT, CLASS_MESSAGE, contextMenus, cssFile, cssPrefix, debugErrorFlags, debugFlags, dragMode, extraInput, extraUrl, FP_APPLIES_TO, FP_CONTEXT_MENUS, FP_CSS_ERROR_MESSAGE, FP_CSS_ERROR_TITLE, FP_CSS_FILE, FP_CSS_PREFIX, FP_DEBUG_ERROR_FLAGS, FP_DEBUG_FLAGS, FP_DRAG_MODE, FP_EXTRA_INPUT, FP_EXTRA_URL, FP_HEIGHT, FP_IFRAME_ENABLED, FP_IMG_WAIT, FP_INITIAL_INDENT, FP_ORIENTATION, FP_ORIENTATIONS_ALLOWED, FP_PARTIAL_IFRAME_UPDATE, FP_PROCESSING_BUTTONS_FLAGS, FP_PROCESSING_INFO_FLAGS, FP_RESIZE_LEVEL, FP_SCRIPT_CLASS, FP_TYPE, FP_USE_DHTML, FP_WIDTH, globalCssErrorMessage, globalCssErrorTitle, height, iframeEnabled, imgWait, indent, initialIndent, isDHTML, orientation, orientationsAllowed, partialIframeUpdate, PROCESSING_BUTTONS_ALL, PROCESSING_BUTTONS_CANCEL, PROCESSING_BUTTONS_HISTORY_LIST, PROCESSING_BUTTONS_REFRESH, PROCESSING_BUTTONS_VIEW_DETAILS, PROCESSING_INFO_ALL, PROCESSING_INFO_DESCRIPTION, PROCESSING_INFO_LAST_UPDATE, PROCESSING_INFO_NAME, PROCESSING_INFO_NONE, PROCESSING_INFO_STATUS, processingButtonsFlags, processingInfoFlags, RESIZE_ALL, RESIZE_HORIZONTAL, RESIZE_NONE, RESIZE_VERTICAL, resizeLevel, scriptClass, scriptEndTagEncoder, type, useDHTML, width
-
-
Constructor Summary
Constructors Constructor Description UserEntityPrivilegesTransform()
Default no-args constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
generateCategoriesRows(TableTag table)
Generate the rows that list all the categories (and their corresponding privileges).protected void
generateCategoryRows(TableTag table, WebPrivilegeCategory category, int idx)
Generate the rows that list the given category and its corresponding privileges.protected void
generateNotAppLegend(RowTag row)
generate the Legend "NA - Not applicable per project"protected void
generatePrivilegeRow(TableTag table, WebPrivilegeEntry priv)
Generate the row for the given privilege.protected void
generatePrivilegesOrigin(TableTag table)
generate the privilege origin legendsprotected void
generateProjectsRow(TableTag table)
Generate the row (both row and inner cells) that displays the list of projects.protected void
generateSecurityRolesRow(TableTag table)
Generate the row (both row and inner cells) that displays the list of security roles for each project.java.util.List
getAllCategories()
Returns aList
with all the privilege categories.java.util.Map
getAttributesPrivilegeCell(WebPrivilegeEntry priv, WebProjectInstance project)
Returns the attributes associated with the <TD&gr; tag of a given privilege for a specific project.java.util.Map
getAttributesPrivilegeRow(WebPrivilegeEntry priv)
Returns the attributes associated with the <TR&gr; tag of a given privilege.java.util.Map
getAttributesSecurityRolesRow()
Returns the attributes associated with the <TR&gr; tag of the row listing the security roles.java.lang.String
getDescription()
Returns a textual description of the transform.SimpleList
getLoadedProjects()
java.util.List
getPrivilegesForCategory(WebPrivilegeCategory cat)
Returns aList
with all the privileges for the given category.java.util.List
getSecurityRoles()
Returns aList
with all the security roles available in the current iServer.java.lang.Class
getSupportedBeanType()
Returns the supported bean type.UserEntityBean
getUserEntityBean()
Helper method that returns theUserEntityBean
currently being transformed.WebUserSecurityRoles
getUserSecurityRoles()
Returns the list of security role-porject mappings for the current user account.boolean
hasInheritedSecurityRoles(WebProjectInstance projectInstance)
Returnstrue
if for the given project any of the parent groups of the current user has a security role associated.void
renderCategoryCheckbox(MarkupOutput out, WebPrivilegeCategory cat)
Renders a single privilege category checkbox.void
renderEditPrivileges(MarkupOutput out)
Generates the privileges table, internally it calls:generateProjectsRow(com.microstrategy.web.tags.TableTag)
generateSecurityRolesRow(com.microstrategy.web.tags.TableTag)
generateCategoriesRows(com.microstrategy.web.tags.TableTag)
void
renderPrivilegeCheckbox(MarkupOutput out, WebPrivilegeEntry priv)
Renders a single privilege checkbox.void
renderPrivilegeName(MarkupOutput out, WebPrivilegeEntry priv)
Renders a single privilege name.void
renderProjectName(MarkupOutput out, WebProjectInstance project)
Rendesr the name of the given project.void
renderSecurityRolesCombo(MarkupOutput out, WebProjectInstance project)
void
renderSecurityRolesComboList(MarkupOutput out)
protected void
setBoneProperties()
Deprecated.protected void
setBoneProperties(JsonGenerator boneProps)
Sets the necessary properties to the bone assigned to this transform (based on theAbstractAppTransform.scriptClass
formal parameter)
Usually called byAbstractAppTransform.renderRegisterBone(MarkupOutput)
Can be overwritten to add or modify bone properties.void
transformForRequestSuccessful(MarkupOutput out)
Entry point.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractPrivilegesEditorTransform
generatePrivilegeTypes, getPrivilegeName, renderPrivilegeLegend, renderPrivilegeLegendCell
-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
addContactInfo, addDynamicScriptClass, addDynamicScriptFile, addFormalParameter, checkLevel, checkProcessingButtonsFlag, checkProcessingInfoFlag, checkStatus, displayError, displayError, displayError, emptyCell, excludeStaticTags, generateAnchor, generateAnchorForExport, generateHiddenInputsForEvent, generateIFrameTag, getAppContext, getArgumentName, getAttributesShellDiv, getBeanPath, getBoneId, getCancelEvent, getClientSideHelper, getContainerServices, getContext, getContextMenu, getContextMenuManager, getContextMenuManagerName, getContextMenusDefinition, getCssPrefix, getDateFormat, getDebugOut, getDescriptor, getDescriptor, getDescriptor, getDescriptor, getDisplayMode, getDisplayName, getErrorMessage, getErrorMessage, getErrorTitle, getErrorTitle, getEventManager, getFirstDayOfWeek, getFloatValue, getHelpPath, getID, getIntValue, getJSNameSpace, getLayoutContext, getLocale, getLocale, getPreferenceValue, getProjectID, getRefreshEvent, getRequestKeys, getResourcesFolder, getScriptClass, getStringValue, getStyleRequestContext, getStyleShellDiv, getTagsFactory, getTimeFormat, getUnitsLabel, getWebBeanErrorInfo, hasSubBlock, initHeightAndWidthFromPreferences, initializeCss, initializeImages, initializeTransform, initializeWebComponent, is508, isBlockMode, isContextMenusEnabled, isDhtml, isDialog, isDormant, isFeatureAvailable, isIFrameDisplayMode, isIFrameEnabled, isIFrameRequest, isJobExpired, isModal, isOpen, isPortlet, isTrue, localIsIFrameDisplayMode, newContext, newHiddenInputBuilder, newNamespaceEncoder, newURIBuilder, redirectToDisplayError, renderBean, renderBean, renderBean, renderBean, renderCancelButton, renderContextMenus, renderCssLink, renderDescriptor, renderDescriptor, renderErrorButton, renderHiddenInputFromRequest, renderImage, renderLayout, renderProcessingButton, renderProcessingButton, renderProcessingButton, renderProcessingButtonForGet, renderProcessingButtonForGet, renderProcessingButtons, renderProcessingInfo, renderProcessingInfoData, renderProcessingInfoImage, renderProcessingInfoSubtitle, renderProcessingInfoTitle, renderProcessingObjectName, renderRefreshButton, renderRegisterBone, renderSelf, renderShell, renderSubBlock, renderUserHelpAnchor, setDisplayMode, setHasSubBlock, setHeight, setIFrameDisplayMode, setIsDormant, setRenderSubBlock, setShellAttributeOnClosedComponent, setWidth, shouldDisplay, transform, transformForRequestCanceled, transformForRequestInError, transformForRequestNotInited, transformForRequestProcessing, transformForRequestWaitingForUserInput
-
Methods inherited from class com.microstrategy.web.transform.AbstractLayoutTransform
getLayoutDefinition, setLayoutDefinition, transformUsingLayout
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, canTransform, getEvents, getFormalParams, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.transform.LayoutTransform
getLayoutDefinition, setLayoutDefinition
-
Methods inherited from interface com.microstrategy.web.transform.Transform
canTransform, getFormalParams, getID, getPreview, isPreviewAvailable, isResolved, supports, supports, transform
-
-
-
-
Method Detail
-
transformForRequestSuccessful
public void transformForRequestSuccessful(MarkupOutput out)
Entry point. If a layout is associated with the transform it will delegate the output to the layout, otherwise it callsrenderEditPrivileges(com.microstrategy.web.beans.MarkupOutput)
- Specified by:
transformForRequestSuccessful
in classAbstractAppTransform
- Parameters:
out
- output by this transform- See Also:
AbstractAppTransform.checkStatus(com.microstrategy.web.beans.MarkupOutput)
-
renderEditPrivileges
public void renderEditPrivileges(MarkupOutput out)
Generates the privileges table, internally it calls:
-
generatePrivilegesOrigin
protected void generatePrivilegesOrigin(TableTag table)
Description copied from class:AbstractPrivilegesEditorTransform
generate the privilege origin legends- Overrides:
generatePrivilegesOrigin
in classAbstractPrivilegesEditorTransform
-
generateNotAppLegend
protected void generateNotAppLegend(RowTag row)
Description copied from class:AbstractPrivilegesEditorTransform
generate the Legend "NA - Not applicable per project"- Overrides:
generateNotAppLegend
in classAbstractPrivilegesEditorTransform
-
renderCategoryCheckbox
public void renderCategoryCheckbox(MarkupOutput out, WebPrivilegeCategory cat)
Renders a single privilege category checkbox.
-
renderPrivilegeName
public void renderPrivilegeName(MarkupOutput out, WebPrivilegeEntry priv)
Renders a single privilege name.
-
renderPrivilegeCheckbox
public void renderPrivilegeCheckbox(MarkupOutput out, WebPrivilegeEntry priv)
Renders a single privilege checkbox.
-
generateProjectsRow
protected void generateProjectsRow(TableTag table) throws WebObjectsException
Generate the row (both row and inner cells) that displays the list of projects.- Throws:
WebObjectsException
-
generateSecurityRolesRow
protected void generateSecurityRolesRow(TableTag table) throws WebObjectsException
Generate the row (both row and inner cells) that displays the list of security roles for each project.- Throws:
WebObjectsException
-
generateCategoriesRows
protected void generateCategoriesRows(TableTag table) throws WebObjectsException, WebBeanException
Generate the rows that list all the categories (and their corresponding privileges).- Throws:
WebObjectsException
WebBeanException
-
generateCategoryRows
protected void generateCategoryRows(TableTag table, WebPrivilegeCategory category, int idx) throws WebObjectsException
Generate the rows that list the given category and its corresponding privileges.- Throws:
WebObjectsException
-
generatePrivilegeRow
protected void generatePrivilegeRow(TableTag table, WebPrivilegeEntry priv) throws WebObjectsException
Generate the row for the given privilege.- Throws:
WebObjectsException
-
getAttributesPrivilegeRow
public java.util.Map getAttributesPrivilegeRow(WebPrivilegeEntry priv)
Returns the attributes associated with the <TR&gr; tag of a given privilege.
-
getAttributesSecurityRolesRow
public java.util.Map getAttributesSecurityRolesRow()
Returns the attributes associated with the <TR&gr; tag of the row listing the security roles.
-
getAttributesPrivilegeCell
public java.util.Map getAttributesPrivilegeCell(WebPrivilegeEntry priv, WebProjectInstance project)
Returns the attributes associated with the <TD&gr; tag of a given privilege for a specific project.
-
getAllCategories
public java.util.List getAllCategories() throws WebBeanException, WebObjectsException
Returns aList
with all the privilege categories. Each item in the list is an instance of aWebPrivilegeCategory
- Throws:
WebBeanException
WebObjectsException
-
getPrivilegesForCategory
public java.util.List getPrivilegesForCategory(WebPrivilegeCategory cat)
Returns aList
with all the privileges for the given category. Each item in the list is an instance of aWebPrivilegeEntry
-
getLoadedProjects
public SimpleList getLoadedProjects()
-
getUserEntityBean
public UserEntityBean getUserEntityBean()
Helper method that returns theUserEntityBean
currently being transformed.
-
getSecurityRoles
public java.util.List getSecurityRoles() throws WebObjectsException
Returns aList
with all the security roles available in the current iServer. Each item in the list is an instance of aWebSecurityRole
- Throws:
WebObjectsException
-
getUserSecurityRoles
public WebUserSecurityRoles getUserSecurityRoles() throws WebBeanException, WebObjectsException
Returns the list of security role-porject mappings for the current user account.- Returns:
- A
WebUserSecurityRoles
collection containing the security role-project mappings. - Throws:
WebObjectsException
- Thrown if an error occurs when retrieving data from the Intelligence Server.WebBeanException
-
renderProjectName
public void renderProjectName(MarkupOutput out, WebProjectInstance project)
Rendesr the name of the given project.
-
renderSecurityRolesComboList
public void renderSecurityRolesComboList(MarkupOutput out)
-
renderSecurityRolesCombo
public void renderSecurityRolesCombo(MarkupOutput out, WebProjectInstance project)
-
hasInheritedSecurityRoles
public boolean hasInheritedSecurityRoles(WebProjectInstance projectInstance)
Returnstrue
if for the given project any of the parent groups of the current user has a security role associated. If this is the case, the security role is inherited for this user/group and privileges can be assigned, otherwise, a security role needs to be assigned for this user/group before privileges are granted for this project.
-
setBoneProperties
protected void setBoneProperties()
Deprecated.Sets the necessary properties to the bone.
-
setBoneProperties
protected void setBoneProperties(JsonGenerator boneProps)
Description copied from class:AbstractAppTransform
Sets the necessary properties to the bone assigned to this transform (based on theAbstractAppTransform.scriptClass
formal parameter)
Usually called byAbstractAppTransform.renderRegisterBone(MarkupOutput)
Can be overwritten to add or modify bone properties.- Overrides:
setBoneProperties
in classAbstractAppTransform
- Parameters:
boneProps
- the JsonGenerator object that contains the collection of bone properties.
-
getSupportedBeanType
public java.lang.Class getSupportedBeanType()
Description copied from class:AbstractAppTransform
Returns the supported bean type. This abstract Transform supports allWebComponents
so every sub-class should override this method to return the class of theBean
the Transform is expecting, for example:public class CustomReportClass extends AbstractAppTransform { public Class getSupportedBeanType() { //This Transform is expected to work only with a ReportBean, //therefore this method needs to return this class: return ReportBean.class; } }
- Specified by:
getSupportedBeanType
in interfaceTransform
- Overrides:
getSupportedBeanType
in classAbstractAppTransform
- Returns:
UserEntityBean.class
-
getDescription
public java.lang.String getDescription()
Description copied from interface:Transform
Returns a textual description of the transform.- Specified by:
getDescription
in interfaceTransform
- Returns:
- The textual description of the transform.
-
-