public class JcrRepositorySession extends RepositorySession implements AutoCloseable
Constructor and Description |
---|
JcrRepositorySession(JcrMetadataRepository metadataRepository,
MetadataResolver resolver) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the session.
|
JcrMetadataRepository |
getJcrRepository() |
javax.jcr.Session |
getJcrSession() |
protected boolean |
isDirty() |
void |
refresh() |
void |
refreshAndDiscard() |
void |
revert() |
void |
save() |
closeQuietly, getRepository, getResolver, markDirty
public JcrRepositorySession(JcrMetadataRepository metadataRepository, MetadataResolver resolver) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public javax.jcr.Session getJcrSession()
public JcrMetadataRepository getJcrRepository()
public void close()
RepositorySession
try { ... } finally { ... }
approach - if this is a problem, ensure you revert changes when an
exception occurs.
can throw RuntimeExceptionclose
in interface AutoCloseable
close
in class RepositorySession
protected boolean isDirty()
isDirty
in class RepositorySession
public void save() throws MetadataSessionException
save
in class RepositorySession
MetadataSessionException
public void revert() throws MetadataSessionException
revert
in class RepositorySession
MetadataSessionException
public void refresh() throws MetadataSessionException
refresh
in class RepositorySession
MetadataSessionException
public void refreshAndDiscard() throws MetadataSessionException
refreshAndDiscard
in class RepositorySession
MetadataSessionException
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.