public class TestRepositorySystemSession extends Object implements RepositorySystemSession
Constructor and Description |
---|
TestRepositorySystemSession() |
Modifier and Type | Method and Description |
---|---|
ArtifactTypeRegistry |
getArtifactTypeRegistry()
Gets the registry of artifact types recognized by this session.
|
AuthenticationSelector |
getAuthenticationSelector()
Gets the authentication selector to use for repositories discovered in artifact descriptors.
|
RepositoryCache |
getCache()
Gets the cache the repository system may use to save data for future reuse during the session.
|
String |
getChecksumPolicy()
Gets the global checksum policy.
|
Map<String,Object> |
getConfigProperties()
Gets the configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling,
connector-specific behavior, etc.)
|
SessionData |
getData()
Gets the custom data associated with this session.
|
DependencyGraphTransformer |
getDependencyGraphTransformer()
Gets the dependency graph transformer to use for building dependency graphs.
|
DependencyManager |
getDependencyManager()
Gets the dependency manager to use for building dependency graphs.
|
DependencySelector |
getDependencySelector()
Gets the dependency selector to use for building dependency graphs.
|
DependencyTraverser |
getDependencyTraverser()
Gets the dependency traverser to use for building dependency graphs.
|
LocalRepository |
getLocalRepository()
Gets the local repository used during this session.
|
LocalRepositoryManager |
getLocalRepositoryManager()
Gets the local repository manager used during this session.
|
MirrorSelector |
getMirrorSelector()
Gets the mirror selector to use for repositories discovered in artifact descriptors.
|
ProxySelector |
getProxySelector()
Gets the proxy selector to use for repositories discovered in artifact descriptors.
|
RepositoryListener |
getRepositoryListener()
Gets the listener being notified of actions in the repository system.
|
Map<String,String> |
getSystemProperties()
Gets the system properties to use, e.g. for processing of artifact descriptors.
|
TransferListener |
getTransferListener()
Gets the listener being notified of uploads/downloads by the repository system.
|
String |
getUpdatePolicy()
Gets the global update policy.
|
Map<String,String> |
getUserProperties()
Gets the user properties to use, e.g. for processing of artifact descriptors.
|
WorkspaceReader |
getWorkspaceReader()
Gets the workspace reader used during this session.
|
boolean |
isIgnoreInvalidArtifactDescriptor()
Indicates whether invalid artifact descriptors are silently ignored.
|
boolean |
isIgnoreMissingArtifactDescriptor()
Indicates whether missing artifact descriptors are silently ignored.
|
boolean |
isNotFoundCachingEnabled()
Indicates whether missing artifacts/metadata from resolution attempts should be cached in the local repository.
|
boolean |
isOffline()
Indicates whether the repository system operates in offline mode and avoids/refuses any access to remote
repositories.
|
boolean |
isTransferErrorCachingEnabled()
Indicates whether transfer errors (e.g. unreachable host, bad authentication) from resolution attempts should be
cached in the local repository.
|
void |
setChecksumPolicy(String checksumPolicy) |
void |
setConfigProperties(Map<String,Object> configProperties) |
void |
setDependencyManager(DependencyManager manager) |
void |
setLocalRepositoryManager(LocalRepositoryManager localRepositoryManager) |
void |
setMirrorSelector(MirrorSelector mirrorSelector) |
void |
setNotFoundCachingEnabled(boolean b) |
void |
setOffline(boolean offline) |
void |
setProxySelector(ProxySelector proxySelector) |
void |
setRepositoryListener(RepositoryListener repositoryListener) |
void |
setTransferErrorCachingEnabled(boolean b) |
void |
setTransferListener(TransferListener listener) |
void |
setUpdatePolicy(String updatePolicy) |
public TestRepositorySystemSession() throws IOException
IOException
public TransferListener getTransferListener()
RepositorySystemSession
getTransferListener
in interface RepositorySystemSession
null
if none.public Map<String,Object> getConfigProperties()
RepositorySystemSession
getConfigProperties
in interface RepositorySystemSession
null
.ConfigurationProperties
public boolean isOffline()
RepositorySystemSession
isOffline
in interface RepositorySystemSession
true
if the repository system is in offline mode, false
otherwise.public boolean isTransferErrorCachingEnabled()
RepositorySystemSession
isTransferErrorCachingEnabled
in interface RepositorySystemSession
true
if transfer errors are cached, false
to always reattempt downloading.public boolean isNotFoundCachingEnabled()
RepositorySystemSession
isNotFoundCachingEnabled
in interface RepositorySystemSession
true
if missing resources are cached, false
to always reattempt downloading.public boolean isIgnoreMissingArtifactDescriptor()
RepositorySystemSession
isIgnoreMissingArtifactDescriptor
in interface RepositorySystemSession
true
if missing artifact descriptors are ignored, false
to fail the operation with an
exception.public boolean isIgnoreInvalidArtifactDescriptor()
RepositorySystemSession
isIgnoreInvalidArtifactDescriptor
in interface RepositorySystemSession
true
if invalid artifact descriptors are ignored, false
to fail the operation with an
exception.public String getChecksumPolicy()
RepositorySystemSession
getChecksumPolicy
in interface RepositorySystemSession
null
/empty if not set and the per-repository policies apply.RepositoryPolicy.CHECKSUM_POLICY_FAIL
,
RepositoryPolicy.CHECKSUM_POLICY_IGNORE
,
RepositoryPolicy.CHECKSUM_POLICY_WARN
public void setChecksumPolicy(String checksumPolicy)
public String getUpdatePolicy()
RepositorySystemSession
getUpdatePolicy
in interface RepositorySystemSession
null
/empty if not set and the per-repository policies apply.RepositoryPolicy.UPDATE_POLICY_ALWAYS
,
RepositoryPolicy.UPDATE_POLICY_DAILY
,
RepositoryPolicy.UPDATE_POLICY_NEVER
public void setUpdatePolicy(String updatePolicy)
public LocalRepository getLocalRepository()
RepositorySystemSession
LocalRepositoryManager.getRepository()
.getLocalRepository
in interface RepositorySystemSession
null
.public LocalRepositoryManager getLocalRepositoryManager()
RepositorySystemSession
getLocalRepositoryManager
in interface RepositorySystemSession
null
.public WorkspaceReader getWorkspaceReader()
RepositorySystemSession
getWorkspaceReader
in interface RepositorySystemSession
null
if none.public RepositoryListener getRepositoryListener()
RepositorySystemSession
getRepositoryListener
in interface RepositorySystemSession
null
if none.public Map<String,String> getSystemProperties()
RepositorySystemSession
System.getProperties()
and environment variables.getSystemProperties
in interface RepositorySystemSession
null
.public Map<String,String> getUserProperties()
RepositorySystemSession
getUserProperties
in interface RepositorySystemSession
null
.public MirrorSelector getMirrorSelector()
RepositorySystemSession
getMirrorSelector
in interface RepositorySystemSession
null
.public void setMirrorSelector(MirrorSelector mirrorSelector)
public ProxySelector getProxySelector()
RepositorySystemSession
getProxySelector
in interface RepositorySystemSession
null
.RemoteRepository.getProxy()
public void setProxySelector(ProxySelector proxySelector)
public AuthenticationSelector getAuthenticationSelector()
RepositorySystemSession
getAuthenticationSelector
in interface RepositorySystemSession
null
.RemoteRepository.getAuthentication()
public ArtifactTypeRegistry getArtifactTypeRegistry()
RepositorySystemSession
getArtifactTypeRegistry
in interface RepositorySystemSession
null
.public DependencyTraverser getDependencyTraverser()
RepositorySystemSession
getDependencyTraverser
in interface RepositorySystemSession
null
.public DependencyManager getDependencyManager()
RepositorySystemSession
getDependencyManager
in interface RepositorySystemSession
null
.public DependencySelector getDependencySelector()
RepositorySystemSession
getDependencySelector
in interface RepositorySystemSession
null
.public DependencyGraphTransformer getDependencyGraphTransformer()
RepositorySystemSession
getDependencyGraphTransformer
in interface RepositorySystemSession
null
.public SessionData getData()
RepositorySystemSession
getData
in interface RepositorySystemSession
null
.public RepositoryCache getCache()
RepositorySystemSession
getCache
in interface RepositorySystemSession
null
if none.public void setRepositoryListener(RepositoryListener repositoryListener)
public void setTransferListener(TransferListener listener)
public void setTransferErrorCachingEnabled(boolean b)
b
- public void setNotFoundCachingEnabled(boolean b)
b
- public void setLocalRepositoryManager(LocalRepositoryManager localRepositoryManager)
public void setDependencyManager(DependencyManager manager)
manager
- public void setOffline(boolean offline)
Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.