Interface WebUserEntity

  • All Superinterfaces:
    EnumWebPersistableState, KeyedObject, Persistable, WebDisplayUnit, WebFeatures, WebObjectInfo, WebPromptSite
    All Known Subinterfaces:
    WebUser, WebUserGroup

    public interface WebUserEntity
    extends WebObjectInfo, Persistable
    The WebUserEntity interface represents a user or group object. This interface is derived from WebObjectInfo, because users are first class objects in metadata. The user object exposes additional properties in addition to the WebObjectInfo interface's properties which can be used to modify the properties of the user. These properties can be changed by making the changes on this interface, then calling WebObjectSource.save on the WebUserEntity object to save it to metadata.

    In order to create a new user or group, the getNewObject method on the WebObjectSource interface should be called. This will create a new WebUser object if the correct object type is passed to that method. For that method, the subtype must be passed to the getNewObject method to specify whether a user or group is being created. Once the new object is created, the properties of the object should be set. The minimal attributes that must be sent before saving the object are the login name and full name attributes - if these are not set, then the save will not succeed. In addition, any other properties can be set at that time. Once the WebUserEntity object's properties are set up, the WebObjectSource.save method can be called, which will save the user or group in the appropriate folder, with an appropriate name. The save method with only the object as a parameter should be called - if the other overloaded methods are called, the correct folder must be specified manually.

    Since:
    MicroStrategy Web 7.5.2
    • Method Detail

      • getFullName

        java.lang.String getFullName()
        Returns the full name of the user or group.
        Returns:
        The full name of the user or group.
      • setFullName

        void setFullName​(java.lang.String fullName)
        Sets the full name of the user or group.
        Parameters:
        fullName - The new full name to use for the user or group.
      • isGroup

        boolean isGroup()
        Returns whether this WebUserEntity refers to a group. Note that this can also be checked by looking at the subtype of the object. If this is true, then the WebUserEntity object can be cast into a WebUserGroup object, otherwise, it can be cast into a WebUser object.
        Returns:
        True if the account refers to a group, false otherwise.
      • getParents

        WebUserList getParents()
        Returns an editable list of WebUserEntity objects which are considered to be parents of this user/group.
        Returns:
        A WebUserList containing the parents of this user/group.
      • getAncestorGroups

        WebUserGroup[] getAncestorGroups()
                                  throws WebObjectsException
        Returns all parents, grandparents of this user/group.
        Returns:
        An array of WebUserGroup, which contains all parents/grandparents of this user/group.
        Throws:
        WebObjectsException - Thrown if an error occurs when retrieving data from the Intelligence Server.
        Since:
        MicroStrategy Web 9.0.0
      • getLocalPrivileges

        WebEditablePrivileges getLocalPrivileges()
        This method returns a read/write collection of privileges which are set directly on the user/group.
        Returns:
        A WebEditablePrivileges collection, representing a read/write list of privilege values.
      • getAllPrivileges

        WebPrivileges getAllPrivileges()
                                throws WebObjectsException
        Returns the full list of privileges for the user entity within all projects. This list will include inherited privileges, and each privilege can be examined to determine its source.
        Returns:
        A read-only WebPrivileges object, containing the full list of privileges for the user.
        Throws:
        WebObjectsException - Thrown if an error occurs when retrieving data from the Intelligence Server.
      • getAccessibleProjects

        WebProject[] getAccessibleProjects()
                                    throws WebObjectsException
        Returns an array of accessible projects for the current user entity. A project is accessible if the user has any roles, inherited or directly assigned, associated with the project.
        Returns:
        An array of WebProject, which are accessible for current user.
        Throws:
        WebObjectsException - Thrown if an error occurs when retrieving data from the Intelligence Server.
      • getLDAPLoginInfo

        WebLDAPLoginInfo getLDAPLoginInfo()
        Returns an interface which can be used to read and write LDAP-related information about the user entity.
        Returns:
        A WebLDAPLoginInfo object which can be used to read and write LDAP-related information about the user entity.
      • hasInheritedSecurityRoles

        boolean hasInheritedSecurityRoles​(WebProject project)
                                   throws WebObjectsException
        Returns true if for the given project any of the parent groups of the current user has a security role associated.
        Parameters:
        project - WebProject object representing the project for which the security role should be checked
        Returns:
        boolean stating whether the user inherits security roles
        Throws:
        WebObjectsException
        Since:
        MicroStrategy Web 9.0.1
      • getAnalysisQuota

        java.lang.String getAnalysisQuota​(WebProject project)
                                   throws WebObjectsException
        Get quota value for current user and specified project, return null indicate no analysis quota has been set
        Parameters:
        project - WebProject object used as the key to get the analysis quota
        Returns:
        Throws:
        WebObjectsException
      • setAnalysisQuota

        void setAnalysisQuota​(int aq,
                              WebProject project)
                       throws WebObjectsException
        Set quota value for current user and specified project, it will create new analysis quota link item if current user, project has no quota be set.
        Parameters:
        project - WebProject object used as the key to set the analysis quota
        Throws:
        WebObjectsException
      • getSourceType

        java.util.List<EnumUserGroupSourceType> getSourceType()
        Return value determines, whether the relationship with user group with user is manually assign i.e created in MicroStrategy or imported from 3rd party repository such as from SAML or both.