Package org.oa4mp.server.qdl.testUtils
Class TestUtils
- java.lang.Object
-
- org.oa4mp.server.qdl.testUtils.TestUtils
-
- All Implemented Interfaces:
Serializable,org.qdl_lang.extensions.QDLMetaModule
public class TestUtils extends Object implements org.qdl_lang.extensions.QDLMetaModule
This is mostly for testing. It allows access to utilities the server uses to verify that certain operations are done right, such as computing token lifetimes.Created by Jeff Gaynor
on 3/11/24 at 7:33 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classTestUtils.ComputeATLifetimeclassTestUtils.ComputeGracePeriodclassTestUtils.ComputeIDTLifetimeclassTestUtils.ComputeRTLifetimeclassTestUtils.TimeToLong
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPUTE_AT_LIFETIMEstatic StringCOMPUTE_GRACE_PERIODstatic StringCOMPUTE_IDT_LIFETIMEstatic StringCOMPUTE_RT_LIFETIMEstatic StringTIME_TO_LONG
-
Constructor Summary
Constructors Constructor Description TestUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longcheckArgs(org.qdl_lang.variables.values.QDLValue[] objects, String name)Checks that the first two elements are stems and if a 3 arg array, returns the last as a long or theOA2Client.USE_SERVER_DEFAULT.voiddeserializeFromJSON(net.sf.json.JSONObject json)protected LonggetClientCfgLifetime(org.qdl_lang.variables.QDLStem client, String handlerName)protected List<String>getLifetimeDoc(String name, int argCount)net.sf.json.JSONObjectserializeToJSON()
-
-
-
Field Detail
-
COMPUTE_IDT_LIFETIME
public static final String COMPUTE_IDT_LIFETIME
- See Also:
- Constant Field Values
-
COMPUTE_AT_LIFETIME
public static final String COMPUTE_AT_LIFETIME
- See Also:
- Constant Field Values
-
COMPUTE_RT_LIFETIME
public static final String COMPUTE_RT_LIFETIME
- See Also:
- Constant Field Values
-
COMPUTE_GRACE_PERIOD
public static final String COMPUTE_GRACE_PERIOD
- See Also:
- Constant Field Values
-
TIME_TO_LONG
public static final String TIME_TO_LONG
- See Also:
- Constant Field Values
-
-
Method Detail
-
serializeToJSON
public net.sf.json.JSONObject serializeToJSON()
- Specified by:
serializeToJSONin interfaceorg.qdl_lang.extensions.QDLMetaModule
-
deserializeFromJSON
public void deserializeFromJSON(net.sf.json.JSONObject json)
- Specified by:
deserializeFromJSONin interfaceorg.qdl_lang.extensions.QDLMetaModule
-
getClientCfgLifetime
protected Long getClientCfgLifetime(org.qdl_lang.variables.QDLStem client, String handlerName)
-
checkArgs
protected long checkArgs(org.qdl_lang.variables.values.QDLValue[] objects, String name)Checks that the first two elements are stems and if a 3 arg array, returns the last as a long or theOA2Client.USE_SERVER_DEFAULT.- Parameters:
objects-name-- Returns:
-
-