public class RepositorySession extends Object implements AutoCloseable
MetadataRepository - the metadata content repository for read/write access, in its current state (no
 remote resources will be retrieved in the processMetadataResolver - access to resolve metadata content, accommodating metadata not yet stored or up to
 date in the content repository (i.e. virtualised repositories, remote proxied content, or metadata in a different
 model format in the repository storage)RepositoryStorage - access to the physical storage of a
 repository and the source artifacts and project models| Constructor and Description | 
|---|
| RepositorySession(MetadataRepository metadataRepository,
                 MetadataResolver resolver) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Close the session. | 
| void | closeQuietly()ignore RuntimeException when closing repository | 
| MetadataRepository | getRepository() | 
| MetadataResolver | getResolver() | 
| protected boolean | isDirty() | 
| void | markDirty() | 
| void | refresh() | 
| void | refreshAndDiscard() | 
| void | revert() | 
| void | save() | 
public RepositorySession(MetadataRepository metadataRepository, MetadataResolver resolver)
public MetadataRepository getRepository()
public MetadataResolver getResolver()
protected boolean isDirty()
public void save() throws MetadataSessionException
MetadataSessionExceptionpublic void revert() throws MetadataSessionException
MetadataSessionExceptionpublic void close()
try { ... } finally { ... } approach - if this is a problem, ensure you revert changes when an
 exception occurs.
 can throw RuntimeExceptionclose in interface AutoCloseablepublic void closeQuietly()
public void markDirty()
public void refresh() throws MetadataSessionException
MetadataSessionExceptionpublic void refreshAndDiscard() throws MetadataSessionException
MetadataSessionExceptionCopyright © 2006–2019 The Apache Software Foundation. All rights reserved.