Class ClaimsSourceGetter
- java.lang.Object
-
- org.oa4mp.server.loader.qdl.claims.ClaimsSourceGetter
-
- All Implemented Interfaces:
Serializable
,CSConstants
,org.qdl_lang.extensions.QDLFunction
public class ClaimsSourceGetter extends Object implements org.qdl_lang.extensions.QDLFunction, CSConstants
QDLFunction to convert claims to a stem. For use in the OA4MP QDL module.Created by Jeff Gaynor
on 2/10/20 at 10:18 AM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
GET_CLAIMS_NAME
-
Fields inherited from interface org.oa4mp.server.loader.qdl.claims.CSConstants
CS_CODE_JAVA_CLASS, CS_DEFAULT_CLAIM_NAME_KEY, CS_DEFAULT_FAIL_ON_ERROR, CS_DEFAULT_ID, CS_DEFAULT_ID_VALUE, CS_DEFAULT_IS_ENABLED, CS_DEFAULT_NAME, CS_DEFAULT_NOTIFY_ON_FAIL, CS_DEFAULT_TYPE, CS_FILE_CLAIM_KEY, CS_FILE_FILE_PATH, CS_FILE_STEM_CLAIMS, CS_HEADERS_PREFIX, CS_HEADERS_REGEX, CS_LDAP_ADDITIONAL_FILTER, CS_LDAP_AUTHZ_TYPE, CS_LDAP_CONTEXT_NAME, CS_LDAP_GROUP_NAMES, CS_LDAP_LISTS, CS_LDAP_MAX_RETRY_SLEEP, CS_LDAP_PASSWORD, CS_LDAP_PORT, CS_LDAP_RENAME, CS_LDAP_RETRY_COUNT, CS_LDAP_SEARCH_ATTRIBUTES, CS_LDAP_SEARCH_BASE, CS_LDAP_SEARCH_FILTER_ATTRIBUTE, CS_LDAP_SEARCH_NAME, CS_LDAP_SEARCH_SCOPE, CS_LDAP_SECURITY_PRINCIPAL, CS_LDAP_SERVER_ADDRESS, CS_TYPE_ALL_HEADERS, CS_TYPE_BASIC, CS_TYPE_CODE, CS_TYPE_FILE, CS_TYPE_FILTER_HEADERS, CS_TYPE_LDAP, CS_TYPE_NCSA, CS_USE_DEFAULT_KEY
-
-
Constructor Summary
Constructors Constructor Description ClaimsSourceGetter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.qdl_lang.variables.QDLStem
claimsToStem(net.sf.json.JSONObject claims)
It is a bit hard to convert from stems to claims, so this does it.protected org.qdl_lang.variables.QDLStem
doCode(org.qdl_lang.variables.QDLStem arg, String username, org.qdl_lang.variables.QDLStem headers, org.qdl_lang.state.State state)
protected org.qdl_lang.variables.QDLStem
doFS(org.qdl_lang.variables.QDLStem arg, String username, org.qdl_lang.state.State state)
Note that this needs to send a transaction to theFSClaimSource
, so it creates one and sets the user name.org.qdl_lang.variables.QDLStem
doHeaders(org.qdl_lang.variables.QDLStem arg, String username, org.qdl_lang.variables.QDLStem headers, org.qdl_lang.state.State state)
protected org.qdl_lang.variables.QDLStem
doNCSA(org.qdl_lang.variables.QDLStem arg, String username, org.qdl_lang.state.State state)
org.qdl_lang.variables.values.QDLValue
evaluate(org.qdl_lang.variables.values.QDLValue[] objects, org.qdl_lang.state.State state)
int[]
getArgCount()
protected ConfigtoCS
getConfigToCS()
List<String>
getDocumentation(int argCount)
String
getName()
static void
main(String[] args)
protected static void
testFS()
protected static void
testLDAP()
protected static void
testLDAP2()
protected static void
testNCSA()
-
-
-
Field Detail
-
GET_CLAIMS_NAME
public static final String GET_CLAIMS_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.qdl_lang.extensions.QDLFunction
-
getArgCount
public int[] getArgCount()
- Specified by:
getArgCount
in interfaceorg.qdl_lang.extensions.QDLFunction
-
getConfigToCS
protected ConfigtoCS getConfigToCS()
-
evaluate
public org.qdl_lang.variables.values.QDLValue evaluate(org.qdl_lang.variables.values.QDLValue[] objects, org.qdl_lang.state.State state)
- Specified by:
evaluate
in interfaceorg.qdl_lang.extensions.QDLFunction
-
doCode
protected org.qdl_lang.variables.QDLStem doCode(org.qdl_lang.variables.QDLStem arg, String username, org.qdl_lang.variables.QDLStem headers, org.qdl_lang.state.State state)
-
doNCSA
protected org.qdl_lang.variables.QDLStem doNCSA(org.qdl_lang.variables.QDLStem arg, String username, org.qdl_lang.state.State state)
-
doHeaders
public org.qdl_lang.variables.QDLStem doHeaders(org.qdl_lang.variables.QDLStem arg, String username, org.qdl_lang.variables.QDLStem headers, org.qdl_lang.state.State state)
-
claimsToStem
protected org.qdl_lang.variables.QDLStem claimsToStem(net.sf.json.JSONObject claims)
It is a bit hard to convert from stems to claims, so this does it.- Parameters:
claims
-- Returns:
-
doFS
protected org.qdl_lang.variables.QDLStem doFS(org.qdl_lang.variables.QDLStem arg, String username, org.qdl_lang.state.State state)
Note that this needs to send a transaction to theFSClaimSource
, so it creates one and sets the user name. Practically then theCSConstants.CS_FILE_CLAIM_KEY
then is ignored, since the function accepts the username directly.- Parameters:
arg
-username
-state
-- Returns:
-
testFS
protected static void testFS()
-
testLDAP2
protected static void testLDAP2()
-
testNCSA
protected static void testNCSA()
-
testLDAP
protected static void testLDAP()
-
main
public static void main(String[] args)
-
-