Class UserTypeUtil

java.lang.Object
overit.geocall.ux.util.UserTypeUtil

@Deprecated(since="12.0", forRemoval=true) public class UserTypeUtil extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
use UserTypeUtil instead
Collection of utility to retrieve and manage the user type from its StaticView.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static DBView
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a DBView of all the user types with the company.administration grant.
    static DBView
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a DBView of all the user types with the server.administration grant.
    static Long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Retrieve the default user type.
    static Long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Retrieve the default user type from the DBView passed in input.
    static StaticView
    getStatic(Object caller)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Utility to retrieve the StaticView of user types' table.
    static DBView
    Deprecated, for removal: This API element is subject to removal in a future version.
    Utility to retrieve the DBView of user types' table.
    static DBView
    getUserTypes(Object caller, boolean filterDeleted)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Utility to retrieve the DBView of user types' table.
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Utility to invalidate the user types' StaticView
    static boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return if the user type in input has the company.administration grant.
    static boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return if the user type in input has the company.administration grant.
    static boolean
    isUserTypeSuper(Long userType, PoolKit pk)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return if the user type in input has the server.administration grant.
    static boolean
    isUserTypeSuper(Long userType, DBView dbv)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return if the user type in input has the server.administration grant.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UserTypeUtil

      public UserTypeUtil()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getStatic

      public static StaticView getStatic(Object caller)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Utility to retrieve the StaticView of user types' table. This method uses the factory logic to instantiate the StaticView. The view is ordered on DAOUserTypes.ORDERING column
      Parameters:
      caller - Reference to object that calls this utility. The caller must contain a reference to the Identity
      Returns:
      The StaticView of user types' table
      See Also:
    • getUserTypes

      public static DBView getUserTypes(Object caller)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Utility to retrieve the DBView of user types' table. This method uses the factory logic to instantiate the StaticView and retrieve the DBView from that with only the visible user types.
      Parameters:
      caller - Reference to object that calls this utility. The caller must contain a reference to the Identity
      Returns:
      The DBView of the StaticView of user types' table
      See Also:
    • getUserTypes

      public static DBView getUserTypes(Object caller, boolean filterDeleted)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Utility to retrieve the DBView of user types' table. This method uses the factory logic to instantiate the StaticView and retrieve the DBView from that. The filterDeleted allow to decide to fill the DBView with all records of user types' table or fill with only the ones that are visible.
      Parameters:
      caller - Reference to object that calls this utility. The caller must contain a reference to the Identity
      filterDeleted - false to obtain all the records, true for only the ones that are visible
      Returns:
      The DBView of the StaticView of user types' table
      See Also:
    • getDefaultUserType

      public static Long getDefaultUserType(Object caller)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieve the default user type. It is the first type of the user types' table ordered by the order column. The method instances the StaticView of user types' table using the factory logic to retrieve the default user type and extracts only the visible user types.
      Parameters:
      caller - Reference to object that calls this utility. The caller must contain a reference to the Identity
      Returns:
      the id of the default user type
      See Also:
    • getDefaultUserType

      public static Long getDefaultUserType(DBView dbView)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieve the default user type from the DBView passed in input. The default user type is the first row of the DBView in input without change its order.
      Parameters:
      dbView - DBView of user types' StaticView
      Returns:
      the id of the default user type
    • invalidateUserTypes

      public static void invalidateUserTypes(Object caller)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Utility to invalidate the user types' StaticView
      Parameters:
      caller - Reference to object that calls this utility. The caller must contain a reference to the Identity
    • isUserTypeSuper

      public static boolean isUserTypeSuper(Long userType, PoolKit pk) throws DAException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return if the user type in input has the server.administration grant.
      Parameters:
      userType - id of the user type to check.
      pk - instance of the PoolKit.
      Returns:
      true if the user type has the server.administration grant, otherwise false
      Throws:
      DAException - in case of a db error.
    • isUserTypeCompanyAdmin

      public static boolean isUserTypeCompanyAdmin(Long userType, PoolKit pk) throws DAException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return if the user type in input has the company.administration grant.
      Parameters:
      userType - id of the user type to check.
      pk - instance of the PoolKit.
      Returns:
      true if the user type has the company.administration grant, otherwise false
      Throws:
      DAException - in case of a db error.
    • isUserTypeSuper

      public static boolean isUserTypeSuper(Long userType, DBView dbv) throws DAException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return if the user type in input has the server.administration grant.
      Parameters:
      userType - id of the user type to check.
      dbv - a DBView of all the user types with the server.administration grant.
      Returns:
      true if the user type has the server.administration grant, otherwise false
      Throws:
      DAException - in case of a db error.
    • isUserTypeCompanyAdmin

      public static boolean isUserTypeCompanyAdmin(Long userType, DBView dbv) throws DAException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return if the user type in input has the company.administration grant.
      Parameters:
      userType - id of the user type to check.
      dbv - a DBView of all the user types with the company.administration grant.
      Returns:
      true if the user type has the company.administration grant, otherwise false
      Throws:
      DAException - in case of a db error.
    • fetchSuperUserTypes

      public static DBView fetchSuperUserTypes(PoolKit pk) throws DAException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a DBView of all the user types with the server.administration grant.
      Parameters:
      pk - instance of the PoolKit.
      Returns:
      a DBView of all the user types with the server.administration grant.
      Throws:
      DAException - in case of a db error.
    • fetchCompanyAdminUserTypes

      public static DBView fetchCompanyAdminUserTypes(PoolKit pk) throws DAException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a DBView of all the user types with the company.administration grant.
      Parameters:
      pk - instance of the PoolKit.
      Returns:
      a DBView of all the user types with the company.administration grant.
      Throws:
      DAException - in case of a db error.