Class Utilities

java.lang.Object
com.appiancorp.suiteapi.common.Utilities

public final class Utilities extends Object
  • Method Details

    • getLocalIdsAsLongs

      public static Long[] getLocalIdsAsLongs(LocalId[] lids_)
    • getSortOrder

      public static Integer getSortOrder(boolean ascending_)
    • validateURLExistance

      public static boolean validateURLExistance(String context_, String server_, String adrr_)
      Validates that a URL is reachable. Example: Utilities.validateURLExistance("suite", "localhost:8081", "main.jsp"); It will validate that the URL http://localhost:8081/suite/main.jsp is reachable.
      Parameters:
      context_ -
      server_ -
      adrr_ - The relative path
      Returns:
      True if the URL is reachable.
    • validateURLExistance

      public static boolean validateURLExistance(String context_, String server_, String adrr_, String sessionId_)
      Validates that a URL is reachable. Takes the session id. If the URL is an action you need to pass a valid session id to find if the end result is a valid resource or not. Otherwise the method will always return true since AE forwards you to the login page, thus appearing that the URL is valid.
      Parameters:
      context_ -
      server_ -
      adrr_ - The relative path
      sessionId_ - A valid session id.
      Returns:
      True if the URL is reachable.
    • isBitFlagSet

      public static boolean isBitFlagSet(int bitFlags, int bitMask)
      Tests if the bit flag is set.
      Parameters:
      bitMask - a mask of the flag to test
      Returns:
      true if the flag is set; false otherwise.
    • setBitFlag

      public static int setBitFlag(int bitFlags, boolean booleanValue, int bitMask)
      Sets the bit flag if booleanValue is true, resets the flag otherwise.
      Parameters:
      bitFlags - bit flags
      booleanValue - true to set the flag, reset otherwise.
      bitMask - a bit mask of the flag to set.
      Returns:
      updated bit flags
    • bitVectorToString

      public static String bitVectorToString(int bitVector, int[] masks, String[] maskNames)