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 class
TestUtils.ComputeATLifetime
class
TestUtils.ComputeGracePeriod
class
TestUtils.ComputeIDTLifetime
class
TestUtils.ComputeRTLifetime
class
TestUtils.TimeToLong
-
Field Summary
Fields Modifier and Type Field Description static String
COMPUTE_AT_LIFETIME
static String
COMPUTE_GRACE_PERIOD
static String
COMPUTE_IDT_LIFETIME
static String
COMPUTE_RT_LIFETIME
static String
TIME_TO_LONG
-
Constructor Summary
Constructors Constructor Description TestUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
.void
deserializeFromJSON(net.sf.json.JSONObject json)
protected Long
getClientCfgLifetime(org.qdl_lang.variables.QDLStem client, String handlerName)
protected List<String>
getLifetimeDoc(String name, int argCount)
net.sf.json.JSONObject
serializeToJSON()
-
-
-
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:
serializeToJSON
in interfaceorg.qdl_lang.extensions.QDLMetaModule
-
deserializeFromJSON
public void deserializeFromJSON(net.sf.json.JSONObject json)
- Specified by:
deserializeFromJSON
in 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:
-
-