Class ClaimsSourceGetter

  • All Implemented Interfaces:
    CSConstants, edu.uiuc.ncsa.qdl.extensions.QDLFunction, Serializable

    public class ClaimsSourceGetter
    extends Object
    implements edu.uiuc.ncsa.qdl.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
    • Constructor Detail

      • ClaimsSourceGetter

        public ClaimsSourceGetter()
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface edu.uiuc.ncsa.qdl.extensions.QDLFunction
      • getArgCount

        public int[] getArgCount()
        Specified by:
        getArgCount in interface edu.uiuc.ncsa.qdl.extensions.QDLFunction
      • getConfigToCS

        protected ConfigtoCS getConfigToCS()
      • evaluate

        public Object evaluate​(Object[] objects,
                               edu.uiuc.ncsa.qdl.state.State state)
        Specified by:
        evaluate in interface edu.uiuc.ncsa.qdl.extensions.QDLFunction
      • doCode

        protected edu.uiuc.ncsa.qdl.variables.QDLStem doCode​(edu.uiuc.ncsa.qdl.variables.QDLStem arg,
                                                             String username,
                                                             edu.uiuc.ncsa.qdl.variables.QDLStem headers,
                                                             edu.uiuc.ncsa.qdl.state.State state)
      • doNCSA

        protected edu.uiuc.ncsa.qdl.variables.QDLStem doNCSA​(edu.uiuc.ncsa.qdl.variables.QDLStem arg,
                                                             String username,
                                                             edu.uiuc.ncsa.qdl.state.State state)
      • doHeaders

        public edu.uiuc.ncsa.qdl.variables.QDLStem doHeaders​(edu.uiuc.ncsa.qdl.variables.QDLStem arg,
                                                             String username,
                                                             edu.uiuc.ncsa.qdl.variables.QDLStem headers,
                                                             edu.uiuc.ncsa.qdl.state.State state)
      • claimsToStem

        protected edu.uiuc.ncsa.qdl.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 edu.uiuc.ncsa.qdl.variables.QDLStem doFS​(edu.uiuc.ncsa.qdl.variables.QDLStem arg,
                                                           String username,
                                                           edu.uiuc.ncsa.qdl.state.State state)
        Note that this needs to send a transaction to the FSClaimSource, so it creates one and sets the user name. Practically then the CSConstants.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)
      • getDocumentation

        public List<String> getDocumentation​(int argCount)
        Specified by:
        getDocumentation in interface edu.uiuc.ncsa.qdl.extensions.QDLFunction