public class JCRBundlePersister extends Object implements BundlePersister
| Constructor and Description |
|---|
JCRBundlePersister() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(String bundleKey)
Deletes the stored info of the specified bundle.
|
protected boolean |
delete(String bundleKey,
JCRSessionWrapper session)
Deletes the JCR node, which corresponds to the provided bundle key, if present.
|
PersistentBundle |
find(String bundleKey)
Returns the info for the persisted bundle considering the requested key.
|
protected PersistentBundle |
find(String bundleKey,
JCRSessionWrapper session)
Finds the JCR node, which corresponds to the provided key and reads the bundle information from it.
|
void |
store(PersistentBundle bundleInfo)
Persists the specified bundle resource either creating a new info in the storage or updating the existing entry with the supplied
data.
|
protected boolean |
store(PersistentBundle bundleInfo,
JCRSessionWrapper session)
Stores the bundle information in a JCR node.
|
PersistentBundle |
store(org.springframework.core.io.Resource resource)
Persists the info for the specified resources either creating a new info in the storage or updating the existing entry with the
supplied data.
|
public boolean delete(String bundleKey) throws ModuleManagementException
BundlePersisterdelete in interface BundlePersisterbundleKey - The key of the bundle to delete the info fortrue in case the info was deleted successfully; false - if no info for
the specified key was foundModuleManagementException - In case of unexpected error during the delete processprotected boolean delete(String bundleKey, JCRSessionWrapper session) throws javax.jcr.RepositoryException
bundleKey - The key of the bundle to delete the node forsession - Current JCR sessiontrue if the node was deleted; false in case the corresponding node is not present in JCRjavax.jcr.RepositoryException - In case of JCR errorspublic PersistentBundle find(String bundleKey)
BundlePersisterfind in interface BundlePersisterbundleKey - The key of the bundle to be looked upnull if the corresponding info cannot be
found for the provided keyprotected PersistentBundle find(String bundleKey, JCRSessionWrapper session) throws javax.jcr.RepositoryException
bundleKey - The key of the bundle we are looking forsession - Current JCR sessionjavax.jcr.RepositoryException - In case of JCR errorspublic void store(PersistentBundle bundleInfo) throws ModuleManagementException
BundlePersisterstore in interface BundlePersisterbundleInfo - The bundle info as a sourceModuleManagementException - In case of issues during persistence operationprotected boolean store(PersistentBundle bundleInfo, JCRSessionWrapper session) throws javax.jcr.RepositoryException, IOException
bundleInfo - The bundle information to persistsession - Current JCR sessiontrue if the node was updated/created; false in case there is no update needed (same bundle already
present)javax.jcr.RepositoryException - In case of JCR errorsIOExceptionpublic PersistentBundle store(org.springframework.core.io.Resource resource) throws ModuleManagementException
BundlePersisterstore in interface BundlePersisterresource - The bundle bundle resource as a sourceModuleManagementException - In case of issues during persistence operationCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.