Package org.qdl_lang.state
Interface LibLoader
- 
 public interface LibLoaderClass that is used to inject libraries into the state info() stem. This allows users (in the workspace) to issueinfo().'lib'and get a listing of custom classes. This will also use the jload mechanism of the workspace on them, so users can very conveniently either list your extensions or load them.The contract is simple. Create an instance of this, put a reference to it in the modules section of the configuration. A compelete basic (from OA4MP)public class OA2LibLoader implements LibLoader { protected String libKey = "oa2"; // Calls the addEntries method from the current state. This just adds the QDLStem // of library entries, whose key is libKey. public void add(State state) { QDLStem lib = new QDLStem(); lib.put("description", "OA4MP tools for ACLs, JWTs, claims as well as token handlers"); state.addLibEntries(libKey, createEntries()); } // Creates the individual entries. protected QDLStem createEntries(){ QDLStem lib = new QDLStem(); lib.put("description", "OA4MP tools for ACLs, JWTs, claims as well as token handlers"); QDLStem subLib = new QDLStem(); subLib.put("claims", ClaimsLoader.class.getCanonicalName()); subLib.put("jwt", JWTLoader.class.getCanonicalName()); subLib.put("acl", ACLoader.class.getCanonicalName()); lib.put("util", subLib); return lib; } }The net effect is here, issuing info().'lib' in the OA4MP workspace yieldsinfo().lib { oa2: { description:OA4MP tools for ACLs, JWTs, claims as well as token handlers, util: { jwt:edu.uiuc.ncsa.myproxy.oa4mp.qdl.util.JWTLoader, claims:edu.uiuc.ncsa.myproxy.oa4mp.qdl.claims.ClaimsLoader, acl:edu.uiuc.ncsa.myproxy.oa4mp.qdl.acl.ACLoader },//.. moreCreated by Jeff Gaynor 
 on 4/4/23 at 7:46 AM
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(State state)Typically this just callsState.addLibEntries(String, QDLStem)orState.addLibEntry(String, String, String).
 
- 
- 
- 
Method Detail- 
addvoid add(State state) Typically this just callsState.addLibEntries(String, QDLStem)orState.addLibEntry(String, String, String). The entries are loader, (so extensions ofQDLLoadernot modules!) Typically there is an entry called description that tells what the library is/does.- Parameters:
- state-
 
 
- 
 
-