Package edu.uiuc.ncsa.oa2.qdl.storage
Class StoreFacade
- java.lang.Object
-
- org.oa4mp.server.qdl.storage.StoreFacade
-
- All Implemented Interfaces:
edu.uiuc.ncsa.qdl.extensions.QDLModuleMetaClass
,Serializable
- Direct Known Subclasses:
PermissionStoreFacade
public class StoreFacade extends Object implements edu.uiuc.ncsa.qdl.extensions.QDLModuleMetaClass
The class with the inner classes that do all the work here.Created by Jeff Gaynor
on 12/18/20 at 7:05 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
StoreFacade.Create
class
StoreFacade.Diff
Not currently used because it is unclear what the contract should actually be.class
StoreFacade.FacadeHelp
class
StoreFacade.FromXML
class
StoreFacade.InitMethod
class
StoreFacade.Keys
class
StoreFacade.ReadObject
class
StoreFacade.Remove
class
StoreFacade.SaveObject
class
StoreFacade.Search
class
StoreFacade.Size
class
StoreFacade.StoreTypes
class
StoreFacade.ToXML
class
StoreFacade.UpdateObject
class
StoreFacade.VCreate
Create the archived version of an object.class
StoreFacade.VGet
class
StoreFacade.VGetVersions
class
StoreFacade.VID
class
StoreFacade.VRemove
class
StoreFacade.VRestore
-
Field Summary
Fields Modifier and Type Field Description protected String
checkInitMessage
protected String
CREATE_NAME
protected String
DIFFERENCE_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
protected String
SIZE_NAME
String
STORE_HELP_NAME
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
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_NAME
protected String
VERSION_GET_VERSIONS_NAME
protected String
VERSION_REMOVE_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 edu.uiuc.ncsa.qdl.variables.QDLStem
convertArgsToVersionIDs(Object[] objects, String name)
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()
List<String>
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(edu.uiuc.ncsa.qdl.variables.QDLStem QDLStem)
For a stem variable, checks that it is of the formprotected StoreFacade.VID
toVID(Object obj)
-
-
-
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
-
SIZE_NAME
protected String SIZE_NAME
-
KEYS_NAME
protected String KEYS_NAME
-
REMOVE_NAME
protected String REMOVE_NAME
-
STORE_TYPES_STEM_NAME
public String STORE_TYPES_STEM_NAME
-
STORE_HELP_NAME
public String STORE_HELP_NAME
-
VERSION_CREATE_NAME
protected String VERSION_CREATE_NAME
-
VERSION_GET_NAME
protected String VERSION_GET_NAME
-
VERSION_REMOVE_NAME
protected String VERSION_REMOVE_NAME
-
VERSION_GET_VERSIONS_NAME
protected String VERSION_GET_VERSIONS_NAME
-
VERSION_RESTORE_NAME
protected String VERSION_RESTORE_NAME
-
DIFFERENCE_NAME
protected String DIFFERENCE_NAME
-
-
Method Detail
-
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 edu.uiuc.ncsa.qdl.variables.QDLStem convertArgsToVersionIDs(Object[] objects, String name)
-
toVID
protected StoreFacade.VID toVID(edu.uiuc.ncsa.qdl.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)
-
-