Package org.oa4mp.server.qdl.storage
Class StoreFacade
- java.lang.Object
-
- org.oa4mp.server.qdl.storage.StoreFacade
-
- Direct Known Subclasses:
PermissionStoreFacade
public class StoreFacade extends Object
The class with the inner classes that do all the work here.Created by Jeff Gaynor
on 12/18/20 at 7:05 AM
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classStoreFacade.CountclassStoreFacade.CreateclassStoreFacade.CreateVersionCreate the archived version of an object.classStoreFacade.FromXMLclassStoreFacade.InitMethodclassStoreFacade.KeysclassStoreFacade.ReadObjectclassStoreFacade.RemoveclassStoreFacade.SaveObjectclassStoreFacade.SearchclassStoreFacade.ShutdownclassStoreFacade.StoreTypeclassStoreFacade.ToXMLclassStoreFacade.UpdateObjectclassStoreFacade.VGetVersionsclassStoreFacade.VIDMarker class used internally for a version id.classStoreFacade.VRestore
-
Field Summary
Fields Modifier and Type Field Description protected StringcheckInitMessageprotected StringCOUNT_NAMEprotected StringCREATE_NAMEprotected org.oa4mp.server.loader.oauth2.OA2SEenvironmentStringFROM_XML_NAMEprotected StringINIT_NAMEprotected StringKEYS_NAMEprotected StringREAD_NAMEprotected StringREMOVE_NAMEprotected StringSAVE_NAMEprotected StringSEARCH_NAMEstatic StringSHUTDOWNstatic StringSTORE_TYPE_ADMIN_CLIENT_STOREstatic StringSTORE_TYPE_APPROVALSstatic StringSTORE_TYPE_CLIENTstatic StringSTORE_TYPE_PERMISSION_STOREstatic StringSTORE_TYPE_TRANSACTIONstatic StringSTORE_TYPE_TX_STOREstatic StringSTORE_TYPES_STEM_NAMEprotected QDLStoreAccessorstoreAccessorStringTO_XML_NAMEprotected StringUPDATE_NAMEprotected StringVERSION_CREATE_NAMEprotected StringVERSION_GET_VERSIONS_NAMEprotected StringVERSION_RESTORE_NAME
-
Constructor Summary
Constructors Constructor Description StoreFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckInit()protected org.qdl_lang.variables.QDLStemconvertArgsToVersionIDs(org.qdl_lang.variables.values.QDLValue[] objects, String name)Convert a list of objects to version id stems.protected QDLStoreAccessorcreateAccessor(String storeType)Thanks to the vagaraies of Java non-static inner class inheritence, it is just best if this livesin the encloising class and is called.protected TransactionStemMCcreateTransactionStemMC(org.oa4mp.delegation.common.storage.TransactionStore transactionStore, org.oa4mp.delegation.server.storage.ClientStore clientStore)protected voiddoSetup(boolean verboseOn)org.apache.commons.configuration.tree.ConfigurationNodegetConfigurationNode()org.oa4mp.server.loader.oauth2.OA2SEgetEnvironment()edu.uiuc.ncsa.security.core.util.ConfigurationLoader<? extends edu.uiuc.ncsa.security.core.util.AbstractEnvironment>getLoader()edu.uiuc.ncsa.security.core.util.MyLoggingFacadegetLogger()QDLStoreAccessorgetStoreAccessor()org.qdl_lang.variables.QDLStemgetStoreTypes()protected voidinit(String configFile, String cfgName)voidsetConfigurationNode(org.apache.commons.configuration.tree.ConfigurationNode configurationNode)voidsetLogger(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)voidsetStoreAccessor(QDLStoreAccessor storeAccessor)protected edu.uiuc.ncsa.security.core.IdentifiertoIdentifier(Object obj)protected StoreFacade.VIDtoVID(Object obj)protected StoreFacade.VIDtoVID(org.qdl_lang.variables.QDLStem QDLStem)For a stem variable, checks that it is of the form
-
-
-
Field Detail
-
environment
protected transient org.oa4mp.server.loader.oauth2.OA2SE environment
-
INIT_NAME
protected String INIT_NAME
-
STORE_TYPE_CLIENT
public static final String STORE_TYPE_CLIENT
- See Also:
- Constant Field Values
-
STORE_TYPE_APPROVALS
public static final String STORE_TYPE_APPROVALS
- See Also:
- Constant Field Values
-
STORE_TYPE_TRANSACTION
public static final String STORE_TYPE_TRANSACTION
- See Also:
- Constant Field Values
-
STORE_TYPE_TX_STORE
public static final String STORE_TYPE_TX_STORE
- See Also:
- Constant Field Values
-
STORE_TYPE_PERMISSION_STORE
public static final String STORE_TYPE_PERMISSION_STORE
- See Also:
- Constant Field Values
-
STORE_TYPE_ADMIN_CLIENT_STORE
public static final String STORE_TYPE_ADMIN_CLIENT_STORE
- See Also:
- Constant Field Values
-
checkInitMessage
protected String checkInitMessage
-
TO_XML_NAME
public String TO_XML_NAME
-
FROM_XML_NAME
public String FROM_XML_NAME
-
storeAccessor
protected transient QDLStoreAccessor storeAccessor
-
CREATE_NAME
protected String CREATE_NAME
-
READ_NAME
protected String READ_NAME
-
UPDATE_NAME
protected String UPDATE_NAME
-
SAVE_NAME
protected String SAVE_NAME
-
SEARCH_NAME
protected String SEARCH_NAME
-
COUNT_NAME
protected String COUNT_NAME
-
KEYS_NAME
protected String KEYS_NAME
-
REMOVE_NAME
protected String REMOVE_NAME
-
STORE_TYPES_STEM_NAME
public static String STORE_TYPES_STEM_NAME
-
VERSION_CREATE_NAME
protected String VERSION_CREATE_NAME
-
VERSION_GET_VERSIONS_NAME
protected String VERSION_GET_VERSIONS_NAME
-
VERSION_RESTORE_NAME
protected String VERSION_RESTORE_NAME
-
SHUTDOWN
public static String SHUTDOWN
-
-
Method Detail
-
getStoreTypes
public org.qdl_lang.variables.QDLStem getStoreTypes()
-
getLogger
public edu.uiuc.ncsa.security.core.util.MyLoggingFacade getLogger()
-
setLogger
public void setLogger(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)
-
getLoader
public edu.uiuc.ncsa.security.core.util.ConfigurationLoader<? extends edu.uiuc.ncsa.security.core.util.AbstractEnvironment> getLoader()
-
getConfigurationNode
public org.apache.commons.configuration.tree.ConfigurationNode getConfigurationNode()
-
setConfigurationNode
public void setConfigurationNode(org.apache.commons.configuration.tree.ConfigurationNode configurationNode)
-
getEnvironment
public org.oa4mp.server.loader.oauth2.OA2SE getEnvironment() throws Exception- Throws:
Exception
-
checkInit
protected void checkInit()
-
createAccessor
protected QDLStoreAccessor createAccessor(String storeType) throws Exception
Thanks to the vagaraies of Java non-static inner class inheritence, it is just best if this livesin the encloising class and is called. That means it can be easily (and predictably) overridden.- Parameters:
storeType-- Returns:
- Throws:
Exception
-
createTransactionStemMC
protected TransactionStemMC createTransactionStemMC(org.oa4mp.delegation.common.storage.TransactionStore transactionStore, org.oa4mp.delegation.server.storage.ClientStore clientStore)
-
getStoreAccessor
public QDLStoreAccessor getStoreAccessor()
-
setStoreAccessor
public void setStoreAccessor(QDLStoreAccessor storeAccessor)
-
convertArgsToVersionIDs
protected org.qdl_lang.variables.QDLStem convertArgsToVersionIDs(org.qdl_lang.variables.values.QDLValue[] objects, String name)Convert a list of objects to version id stems. The name is the name of the calling function, so error can be better created.- Parameters:
objects-name-- Returns:
-
toVID
protected StoreFacade.VID toVID(org.qdl_lang.variables.QDLStem QDLStem)
For a stem variable, checks that it is of the form[id, version] (in QDL)and returns an versioned id,StoreFacade.VID.If the argument is not in the right format, a null is returned instead.
This may throw other exceptions if, e.g., the id is not a valid identifier- Parameters:
QDLStem-- Returns:
-
toVID
protected StoreFacade.VID toVID(Object obj)
-
toIdentifier
protected edu.uiuc.ncsa.security.core.Identifier toIdentifier(Object obj)
-
-