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 class
StoreFacade.Count
class
StoreFacade.Create
class
StoreFacade.CreateVersion
Create the archived version of an object.class
StoreFacade.FromXML
class
StoreFacade.InitMethod
class
StoreFacade.Keys
class
StoreFacade.ReadObject
class
StoreFacade.Remove
class
StoreFacade.SaveObject
class
StoreFacade.Search
class
StoreFacade.Shutdown
class
StoreFacade.StoreType
class
StoreFacade.ToXML
class
StoreFacade.UpdateObject
class
StoreFacade.VGetVersions
class
StoreFacade.VID
Marker class used internally for a version id.class
StoreFacade.VRestore
-
Field Summary
Fields Modifier and Type Field Description protected String
checkInitMessage
protected String
COUNT_NAME
protected String
CREATE_NAME
protected OA2SE
environment
String
FROM_XML_NAME
protected String
INIT_NAME
protected String
KEYS_NAME
protected String
READ_NAME
protected String
REMOVE_NAME
protected String
SAVE_NAME
protected String
SEARCH_NAME
static String
SHUTDOWN
static String
STORE_TYPE_ADMIN_CLIENT_STORE
static String
STORE_TYPE_APPROVALS
static String
STORE_TYPE_CLIENT
static String
STORE_TYPE_PERMISSION_STORE
static String
STORE_TYPE_TRANSACTION
static String
STORE_TYPE_TX_STORE
static String
STORE_TYPES_STEM_NAME
protected QDLStoreAccessor
storeAccessor
String
TO_XML_NAME
protected String
UPDATE_NAME
protected String
VERSION_CREATE_NAME
protected String
VERSION_GET_VERSIONS_NAME
protected String
VERSION_RESTORE_NAME
-
Constructor Summary
Constructors Constructor Description StoreFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkInit()
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.protected QDLStoreAccessor
createAccessor(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 TransactionStemMC
createTransactionStemMC(TransactionStore transactionStore, ClientStore clientStore)
protected void
doSetup(boolean verboseOn)
org.apache.commons.configuration.tree.ConfigurationNode
getConfigurationNode()
OA2SE
getEnvironment()
edu.uiuc.ncsa.security.core.util.ConfigurationLoader<? extends edu.uiuc.ncsa.security.core.util.AbstractEnvironment>
getLoader()
edu.uiuc.ncsa.security.core.util.MyLoggingFacade
getLogger()
QDLStoreAccessor
getStoreAccessor()
org.qdl_lang.variables.QDLStem
getStoreTypes()
protected void
init(String configFile, String cfgName)
void
setConfigurationNode(org.apache.commons.configuration.tree.ConfigurationNode configurationNode)
void
setLogger(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)
void
setStoreAccessor(QDLStoreAccessor storeAccessor)
protected edu.uiuc.ncsa.security.core.Identifier
toIdentifier(Object obj)
protected StoreFacade.VID
toVID(Object obj)
protected StoreFacade.VID
toVID(org.qdl_lang.variables.QDLStem QDLStem)
For a stem variable, checks that it is of the form
-
-
-
Field Detail
-
environment
protected transient 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)
-
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(TransactionStore transactionStore, 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)
-
-