Class PCAccessHelper

java.lang.Object
com.webmethods.caf.portalclient.access.PCAccessHelper

public class PCAccessHelper extends Object
Simplifies getting some basic access information
  • Field Details

  • Constructor Details

    • PCAccessHelper

      public PCAccessHelper()
  • Method Details

    • getAccess

      public static int getAccess(URI itemID, URI userID) throws Exception
      Determines what the access rights a user has on a resource
      Parameters:
      itemID - the MWS thing ID of the resource to get access rights for
      userID - the URI of the principal to retrieve rights for
      Returns:
      the bit-field of rights explictly granted to the specified principal. See PCAccessHelper for bit-field constants.
      Throws:
      Exception
    • hasAccess

      public static boolean hasAccess(URI itemID, URI userID, int accessRights) throws Exception
      Determines whether the user has the specified rights on a resource
      Parameters:
      itemID - the MWS thing ID of the resource to check access rights for
      userID - the URI of the principal to check access rights for
      accessRights - the bit-field of rights to check against. See PCAccessHelper for bit-field constants.
      Returns:
      true if the user has access, false otherwise
      Throws:
      Exception