public class

UserEntityPrivilegesTransform

extends AbstractPrivilegesEditorTransform
implements LayoutTransform
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

Class Overview

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.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractAppTransform
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractPrivilegesEditorTransform
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Public Constructors
UserEntityPrivilegesTransform()
Default no-args constructor.
Public Methods
List getAllCategories()
Returns a List with all the privilege categories.
Map getAttributesPrivilegeCell(WebPrivilegeEntry priv, WebProjectInstance project)
Returns the attributes associated with the <TD&gr; tag of a given privilege for a specific project.
Map getAttributesPrivilegeRow(WebPrivilegeEntry priv)
Returns the attributes associated with the <TR&gr; tag of a given privilege.
Map getAttributesSecurityRolesRow()
Returns the attributes associated with the <TR&gr; tag of the row listing the security roles.
String getDescription()
Returns a textual description of the transform.
SimpleList getLoadedProjects()
List getPrivilegesForCategory(WebPrivilegeCategory cat)
Returns a List with all the privileges for the given category.
List getSecurityRoles()
Returns a List with all the security roles available in the current iServer.
Class getSupportedBeanType()
Returns the supported bean type.
UserEntityBean getUserEntityBean()
Helper method that returns the UserEntityBean currently being transformed.
WebUserSecurityRoles getUserSecurityRoles()
Returns the list of security role-porject mappings for the current user account.
boolean hasInheritedSecurityRoles(WebProjectInstance projectInstance)
Returns true 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 renderCategoryName(MarkupOutput out, WebPrivilegeCategory cat)
Renders the name of the given category.
void renderEditPrivileges(MarkupOutput out)
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)
void transformForRequestSuccessful(MarkupOutput out)
Entry point.
Protected Methods
void generateCategoriesRows(TableTag table)
Generate the rows that list all the categories (and their corresponding privileges).
void generateCategoryRows(TableTag table, WebPrivilegeCategory category)
Generate the rows that list the given category and its corresponding privileges.
void generateNotAppLegend(RowTag row)
generate the Legend "NA - Not applicable per project"
void generatePrivilegeRow(TableTag table, WebPrivilegeEntry priv)
Generate the row for the given privilege.
void generatePrivilegesOrigin(TableTag table)
generate the privilege origin legends
void generateProjectsRow(TableTag table)
Generate the row (both row and inner cells) that displays the list of projects.
void generateSecurityRolesRow(TableTag table)
Generate the row (both row and inner cells) that displays the list of security roles for each project.
void setBoneProperties(JsonGenerator boneProps)
Sets the necessary properties to the bone assigned to this transform (based on the scriptClass formal parameter)
Usually called by renderRegisterBone(MarkupOutput)
Can be overwritten to add or modify bone properties.
void setBoneProperties()
This method is deprecated. use setBoneProperties(JsonGenerator)
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.AbstractPrivilegesEditorTransform
From class com.microstrategy.web.app.transforms.AbstractAppTransform
From class com.microstrategy.web.transform.AbstractLayoutTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.app.transforms.AppTransform
From interface com.microstrategy.web.transform.LayoutTransform
From interface com.microstrategy.web.transform.Transform

Public Constructors

public UserEntityPrivilegesTransform ()

Default no-args constructor.

Public Methods

public List getAllCategories ()

Returns a List with all the privilege categories. Each item in the list is an instance of a WebPrivilegeCategory

public Map getAttributesPrivilegeCell (WebPrivilegeEntry priv, WebProjectInstance project)

Returns the attributes associated with the <TD&gr; tag of a given privilege for a specific project.

public Map getAttributesPrivilegeRow (WebPrivilegeEntry priv)

Returns the attributes associated with the <TR&gr; tag of a given privilege.

public Map getAttributesSecurityRolesRow ()

Returns the attributes associated with the <TR&gr; tag of the row listing the security roles.

public String getDescription ()

Returns a textual description of the transform.

Returns
  • The textual description of the transform.

public SimpleList getLoadedProjects ()

public List getPrivilegesForCategory (WebPrivilegeCategory cat)

Returns a List with all the privileges for the given category. Each item in the list is an instance of a WebPrivilegeEntry

public List getSecurityRoles ()

Returns a List with all the security roles available in the current iServer. Each item in the list is an instance of a WebSecurityRole

public Class getSupportedBeanType ()

Returns the supported bean type. This abstract Transform supports all WebComponents so every sub-class should override this method to return the class of the Bean 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;
    }

 }
 

Returns
  • UserEntityBean.class

public UserEntityBean getUserEntityBean ()

Helper method that returns the UserEntityBean currently being transformed.

public WebUserSecurityRoles getUserSecurityRoles ()

Returns the list of security role-porject mappings for the current user account.

Returns
Throws
WebObjectsException Thrown if an error occurs when retrieving data from the Intelligence Server.
WebBeanException

public boolean hasInheritedSecurityRoles (WebProjectInstance projectInstance)

Returns true 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.

public void renderCategoryCheckbox (MarkupOutput out, WebPrivilegeCategory cat)

Renders a single privilege category checkbox.

public void renderCategoryName (MarkupOutput out, WebPrivilegeCategory cat)

Renders the name of the given category.

public void renderEditPrivileges (MarkupOutput out)

public void renderPrivilegeCheckbox (MarkupOutput out, WebPrivilegeEntry priv)

Renders a single privilege checkbox.

public void renderPrivilegeName (MarkupOutput out, WebPrivilegeEntry priv)

Renders a single privilege name.

public void renderProjectName (MarkupOutput out, WebProjectInstance project)

Rendesr the name of the given project.

public void renderSecurityRolesCombo (MarkupOutput out, WebProjectInstance project)

public void renderSecurityRolesComboList (MarkupOutput out)

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 calls renderEditPrivileges(MarkupOutput)

Parameters
out output by this transform

Protected Methods

protected void generateCategoriesRows (TableTag table)

Generate the rows that list all the categories (and their corresponding privileges).

protected void generateCategoryRows (TableTag table, WebPrivilegeCategory category)

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 legends

protected 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.

protected void setBoneProperties (JsonGenerator boneProps)

Sets the necessary properties to the bone assigned to this transform (based on the scriptClass formal parameter)
Usually called by renderRegisterBone(MarkupOutput)
Can be overwritten to add or modify bone properties.

Parameters
boneProps the JsonGenerator object that contains the collection of bone properties.

protected void setBoneProperties ()

This method is deprecated.
use setBoneProperties(JsonGenerator)

Sets the necessary properties to the bone.