Package com.appiancorp.suiteapi.common
Class Utilities
java.lang.Object
com.appiancorp.suiteapi.common.Utilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
bitVectorToString
(int bitVector, int[] masks, String[] maskNames) static Long[]
getLocalIdsAsLongs
(LocalId[] lids_) static Integer
getSortOrder
(boolean ascending_) static boolean
isBitFlagSet
(int bitFlags, int bitMask) Tests if the bit flag is set.static int
setBitFlag
(int bitFlags, boolean booleanValue, int bitMask) Sets the bit flag ifbooleanValue
istrue
, resets the flag otherwise.static boolean
validateURLExistance
(String context_, String server_, String adrr_) Validates that a URL is reachable.static boolean
validateURLExistance
(String context_, String server_, String adrr_, String sessionId_) Validates that a URL is reachable.
-
Method Details
-
getLocalIdsAsLongs
-
getSortOrder
-
validateURLExistance
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 pathsessionId_
- 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 ifbooleanValue
istrue
, resets the flag otherwise.- Parameters:
bitFlags
- bit flagsbooleanValue
- true to set the flag, reset otherwise.bitMask
- a bit mask of the flag to set.- Returns:
- updated bit flags
-
bitVectorToString
-