Class AmetysPersistenceManager
- java.lang.Object
-
- org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
-
- org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager
-
- org.ametys.plugins.repository.provider.AmetysPersistenceManager
-
- All Implemented Interfaces:
CacheAccessListener
,CachingPersistenceManager
,ConsistencyChecker
,IterablePersistenceManager
,PersistenceManager
,DatabaseAware
public class AmetysPersistenceManager extends BundleDbPersistenceManager
Ametys implementation of Jackrabbit'sPersistenceManager
. This implementation is only a wrapper to an actualBundleDbPersistenceManager
, depending on the config parameter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager
BundleDbPersistenceManager.CloseableBLOBStore, BundleDbPersistenceManager.DbBlobStore, BundleDbPersistenceManager.FSBlobStore
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIG_PM_DATASOURCE
Config parameter's name referencing the datasource to use.static String
CONFIG_USE_DEFAULT
Config parameter's name to use default Jackrabbit behaviour.-
Fields inherited from class org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager
binding, blobStore, blockOnConnectionLoss, bundleDeleteSQL, bundleInsertSQL, bundleSelectAllBundlesFromSQL, bundleSelectAllBundlesSQL, bundleSelectAllIdsFromSQL, bundleSelectAllIdsSQL, bundleSelectSQL, bundleUpdateSQL, conHelper, consistencyCheck, consistencyFix, databaseType, dataSourceName, driver, errorHandling, externalBLOBs, INITIAL_BUFFER_SIZE, initialized, nodeReferenceDeleteSQL, nodeReferenceInsertSQL, nodeReferenceSelectSQL, nodeReferenceUpdateSQL, password, schemaObjectPrefix, SM_BINARY_KEYS, SM_LONGLONG_KEYS, url, user
-
Fields inherited from class org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
context, NODEFILENAME, NODEREFSFILENAME, RES_NAME_INDEX, RES_NS_INDEX
-
Fields inherited from interface org.apache.jackrabbit.core.cache.CacheAccessListener
ACCESS_INTERVAL
-
-
Constructor Summary
Constructors Constructor Description AmetysPersistenceManager()
Constructor.
-
Method Summary
-
Methods inherited from class org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager
buildSQLStatements, createBlobStore, createCheckSchemaOperation, createConnectionHelper, createDBBlobStore, createDbNameIndex, createLocalFSBlobStore, createParams, destroyBundle, getBlobStore, getBlockOnConnectionLoss, getConsistencyCheck, getConsistencyFix, getDatabaseType, getDataSourceName, getDriver, getErrorHandling, getKey, getMinBlobSize, getNameIndex, getPassword, getSchema, getSchemaObjectPrefix, getStorageModel, getUrl, getUser, isExternalBLOBs, isSchemaCheckEnabled, loadBundle, setDatabaseType, setDataSourceName, setSchema, setSchemaCheckEnabled, store, storeBundle, toString, useDbBlobStore, useLocalFsBlobStore
-
Methods inherited from class org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
buildBlobFilePath, buildNodeFilePath, buildNodeFolderPath, buildNodeReferencesFilePath, buildPropFilePath, cacheAccessed, check, disposeCache, evictBundle, getBundleCacheSize, getNsIndex, onExternalUpdate
-
-
-
-
Field Detail
-
CONFIG_USE_DEFAULT
public static final String CONFIG_USE_DEFAULT
Config parameter's name to use default Jackrabbit behaviour.- See Also:
- Constant Field Values
-
CONFIG_PM_DATASOURCE
public static final String CONFIG_PM_DATASOURCE
Config parameter's name referencing the datasource to use.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AmetysPersistenceManager
public AmetysPersistenceManager()
Constructor.
-
-
Method Detail
-
setWorkspace
public void setWorkspace(String workspace)
Indicates the current JCR workspace.- Parameters:
workspace
- the JCR workspace.
-
setUrl
public void setUrl(String newUrl)
- Overrides:
setUrl
in classBundleDbPersistenceManager
-
setUser
public void setUser(String unused)
- Overrides:
setUser
in classBundleDbPersistenceManager
-
setPassword
public void setPassword(String unused)
- Overrides:
setPassword
in classBundleDbPersistenceManager
-
setDriver
public void setDriver(String unused)
- Overrides:
setDriver
in classBundleDbPersistenceManager
-
init
public void init(PMContext ctx) throws Exception
- Specified by:
init
in interfacePersistenceManager
- Overrides:
init
in classBundleDbPersistenceManager
- Throws:
Exception
-
close
public void close() throws Exception
- Specified by:
close
in interfacePersistenceManager
- Overrides:
close
in classBundleDbPersistenceManager
- Throws:
Exception
-
createNew
public NodeState createNew(NodeId id)
- Specified by:
createNew
in interfacePersistenceManager
- Overrides:
createNew
in classAbstractBundlePersistenceManager
-
createNew
public PropertyState createNew(PropertyId id)
- Specified by:
createNew
in interfacePersistenceManager
- Overrides:
createNew
in classAbstractBundlePersistenceManager
-
load
public NodeState load(NodeId id) throws NoSuchItemStateException, ItemStateException
- Specified by:
load
in interfacePersistenceManager
- Overrides:
load
in classAbstractBundlePersistenceManager
- Throws:
NoSuchItemStateException
ItemStateException
-
load
public PropertyState load(PropertyId id) throws NoSuchItemStateException, ItemStateException
- Specified by:
load
in interfacePersistenceManager
- Overrides:
load
in classAbstractBundlePersistenceManager
- Throws:
NoSuchItemStateException
ItemStateException
-
loadReferencesTo
public NodeReferences loadReferencesTo(NodeId id) throws NoSuchItemStateException, ItemStateException
- Specified by:
loadReferencesTo
in interfacePersistenceManager
- Overrides:
loadReferencesTo
in classBundleDbPersistenceManager
- Throws:
NoSuchItemStateException
ItemStateException
-
exists
public boolean exists(NodeId id) throws ItemStateException
- Specified by:
exists
in interfacePersistenceManager
- Overrides:
exists
in classAbstractBundlePersistenceManager
- Throws:
ItemStateException
-
exists
public boolean exists(PropertyId id) throws ItemStateException
- Specified by:
exists
in interfacePersistenceManager
- Overrides:
exists
in classAbstractBundlePersistenceManager
- Throws:
ItemStateException
-
existsReferencesTo
public boolean existsReferencesTo(NodeId targetId) throws ItemStateException
- Specified by:
existsReferencesTo
in interfacePersistenceManager
- Overrides:
existsReferencesTo
in classBundleDbPersistenceManager
- Throws:
ItemStateException
-
store
public void store(ChangeLog changeLog) throws ItemStateException
- Specified by:
store
in interfacePersistenceManager
- Overrides:
store
in classBundleDbPersistenceManager
- Throws:
ItemStateException
-
checkConsistency
public void checkConsistency(String[] uuids, boolean recursive, boolean fix)
- Specified by:
checkConsistency
in interfacePersistenceManager
- Overrides:
checkConsistency
in classAbstractBundlePersistenceManager
-
getAllNodeIds
public List<NodeId> getAllNodeIds(NodeId bigger, int maxCount) throws ItemStateException, RepositoryException
- Specified by:
getAllNodeIds
in interfaceIterablePersistenceManager
- Overrides:
getAllNodeIds
in classBundleDbPersistenceManager
- Throws:
ItemStateException
RepositoryException
-
destroy
public void destroy(NodeReferences refs) throws ItemStateException
- Overrides:
destroy
in classBundleDbPersistenceManager
- Throws:
ItemStateException
-
getAllNodeInfos
public Map<NodeId,NodeInfo> getAllNodeInfos(NodeId bigger, int maxCount) throws ItemStateException
- Specified by:
getAllNodeInfos
in interfaceIterablePersistenceManager
- Overrides:
getAllNodeInfos
in classBundleDbPersistenceManager
- Throws:
ItemStateException
-
setBlockOnConnectionLoss
public void setBlockOnConnectionLoss(String block)
- Overrides:
setBlockOnConnectionLoss
in classBundleDbPersistenceManager
-
setBundleCacheSize
public void setBundleCacheSize(String bundleCacheSize)
- Overrides:
setBundleCacheSize
in classAbstractBundlePersistenceManager
-
setConnectionFactory
public void setConnectionFactory(ConnectionFactory connectionFactory)
- Specified by:
setConnectionFactory
in interfaceDatabaseAware
- Overrides:
setConnectionFactory
in classBundleDbPersistenceManager
-
setConsistencyCheck
public void setConsistencyCheck(String check)
- Overrides:
setConsistencyCheck
in classBundleDbPersistenceManager
-
setConsistencyFix
public void setConsistencyFix(String fix)
- Overrides:
setConsistencyFix
in classBundleDbPersistenceManager
-
setErrorHandling
public void setErrorHandling(String errHandling)
- Overrides:
setErrorHandling
in classBundleDbPersistenceManager
-
setEventChannel
public void setEventChannel(UpdateEventChannel eventChannel)
- Specified by:
setEventChannel
in interfaceConsistencyChecker
- Overrides:
setEventChannel
in classAbstractBundlePersistenceManager
-
setExternalBLOBs
public void setExternalBLOBs(boolean externalBlobs)
- Overrides:
setExternalBLOBs
in classBundleDbPersistenceManager
-
setMinBlobSize
public void setMinBlobSize(String minBlobSize)
- Overrides:
setMinBlobSize
in classBundleDbPersistenceManager
-
setSchemaObjectPrefix
public void setSchemaObjectPrefix(String schemaPrefix)
- Overrides:
setSchemaObjectPrefix
in classBundleDbPersistenceManager
-
-