public class DefaultRepositorySystemSession extends Object implements RepositorySystemSession
| Constructor and Description |
|---|
DefaultRepositorySystemSession()
Creates an uninitialized session.
|
DefaultRepositorySystemSession(RepositorySystemSession session)
Creates a shallow copy of the specified session.
|
| 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.
|
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.
|
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.
|
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.
|
DefaultRepositorySystemSession |
setArtifactTypeRegistry(ArtifactTypeRegistry artifactTypeRegistry)
Sets the registry of artifact types recognized by this session.
|
DefaultRepositorySystemSession |
setAuthenticationSelector(AuthenticationSelector authenticationSelector)
Sets the authentication selector to use for repositories discovered in artifact descriptors.
|
DefaultRepositorySystemSession |
setCache(RepositoryCache cache)
Sets the cache the repository system may use to save data for future reuse during the session.
|
DefaultRepositorySystemSession |
setChecksumPolicy(String checksumPolicy)
Sets the global checksum policy.
|
DefaultRepositorySystemSession |
setConfigProperties(Map<String,Object> configProperties)
Sets the configuration properties used to tweak internal aspects of the repository system (e.g.
|
DefaultRepositorySystemSession |
setConfigProperty(String key,
Object value)
Sets the specified configuration property.
|
DefaultRepositorySystemSession |
setConfigProps(Map<?,?> configProperties)
Sets the configuration properties used to tweak internal aspects of the repository system (e.g.
|
DefaultRepositorySystemSession |
setData(SessionData data)
Sets the custom data associated with this session.
|
DefaultRepositorySystemSession |
setDependencyGraphTransformer(DependencyGraphTransformer dependencyGraphTransformer)
Sets the dependency graph transformer to use for building dependency graphs.
|
DefaultRepositorySystemSession |
setDependencyManager(DependencyManager dependencyManager)
Sets the dependency manager to use for building dependency graphs.
|
DefaultRepositorySystemSession |
setDependencySelector(DependencySelector dependencySelector)
Sets the dependency selector to use for building dependency graphs.
|
DefaultRepositorySystemSession |
setDependencyTraverser(DependencyTraverser dependencyTraverser)
Sets the dependency traverser to use for building dependency graphs.
|
DefaultRepositorySystemSession |
setIgnoreInvalidArtifactDescriptor(boolean ignoreInvalidArtifactDescriptor)
Controls whether invalid artifact descriptors are silently ignored.
|
DefaultRepositorySystemSession |
setIgnoreMissingArtifactDescriptor(boolean ignoreMissingArtifactDescriptor)
Controls whether missing artifact descriptors are silently ignored.
|
DefaultRepositorySystemSession |
setLocalRepositoryManager(LocalRepositoryManager localRepositoryManager)
Sets the local repository manager used during this session.
|
DefaultRepositorySystemSession |
setMirrorSelector(MirrorSelector mirrorSelector)
Sets the mirror selector to use for repositories discovered in artifact descriptors.
|
DefaultRepositorySystemSession |
setNotFoundCachingEnabled(boolean notFoundCachingEnabled)
Controls whether missing artifacts/metadata from resolution attempts should be cached in the local repository.
|
DefaultRepositorySystemSession |
setOffline(boolean offline)
Controls whether the repository system operates in offline mode and avoids/refuses any access to remote
repositories.
|
DefaultRepositorySystemSession |
setProxySelector(ProxySelector proxySelector)
Sets the proxy selector to use for repositories discovered in artifact descriptors.
|
DefaultRepositorySystemSession |
setRepositoryListener(RepositoryListener repositoryListener)
Sets the listener being notified of actions in the repository system.
|
DefaultRepositorySystemSession |
setSystemProperties(Map<String,String> systemProperties)
Sets the system properties to use, e.g.
|
DefaultRepositorySystemSession |
setSystemProperty(String key,
String value)
Sets the specified system property.
|
DefaultRepositorySystemSession |
setSystemProps(Hashtable<?,?> systemProperties)
Sets the system properties to use, e.g.
|
DefaultRepositorySystemSession |
setTransferErrorCachingEnabled(boolean transferErrorCachingEnabled)
Controls whether transfer errors (e.g.
|
DefaultRepositorySystemSession |
setTransferListener(TransferListener transferListener)
Sets the listener being notified of uploads/downloads by the repository system.
|
DefaultRepositorySystemSession |
setUpdatePolicy(String updatePolicy)
Sets the global update policy.
|
DefaultRepositorySystemSession |
setUserProperties(Map<String,String> userProperties)
Sets the user properties to use, e.g.
|
DefaultRepositorySystemSession |
setUserProperty(String key,
String value)
Sets the specified user property.
|
DefaultRepositorySystemSession |
setUserProps(Map<?,?> userProperties)
Sets the user properties to use, e.g.
|
DefaultRepositorySystemSession |
setWorkspaceReader(WorkspaceReader workspaceReader)
Sets the workspace reader used during this session.
|
public DefaultRepositorySystemSession()
public DefaultRepositorySystemSession(RepositorySystemSession session)
session - The session to copy, must not be null.public boolean isOffline()
RepositorySystemSessionisOffline in interface RepositorySystemSessiontrue if the repository system is in offline mode, false otherwise.public DefaultRepositorySystemSession setOffline(boolean offline)
offline - true if the repository system is in offline mode, false otherwise.null.public boolean isTransferErrorCachingEnabled()
RepositorySystemSessionisTransferErrorCachingEnabled in interface RepositorySystemSessiontrue if transfer errors are cached, false to always reattempt downloading.public DefaultRepositorySystemSession setTransferErrorCachingEnabled(boolean transferErrorCachingEnabled)
transferErrorCachingEnabled - true to cache transfer errors, false to always reattempt
downloading.null.public boolean isNotFoundCachingEnabled()
RepositorySystemSessionisNotFoundCachingEnabled in interface RepositorySystemSessiontrue if missing resources are cached, false to always reattempt downloading.public DefaultRepositorySystemSession setNotFoundCachingEnabled(boolean notFoundCachingEnabled)
notFoundCachingEnabled - true if to cache missing resources, false to always reattempt
downloading.null.public boolean isIgnoreMissingArtifactDescriptor()
RepositorySystemSessionisIgnoreMissingArtifactDescriptor in interface RepositorySystemSessiontrue if missing artifact descriptors are ignored, false to fail the operation with an
exception.public DefaultRepositorySystemSession setIgnoreMissingArtifactDescriptor(boolean ignoreMissingArtifactDescriptor)
ignoreMissingArtifactDescriptor - true if to ignore missing artifact descriptors, false to
fail the operation with an exception.null.public boolean isIgnoreInvalidArtifactDescriptor()
RepositorySystemSessionisIgnoreInvalidArtifactDescriptor in interface RepositorySystemSessiontrue if invalid artifact descriptors are ignored, false to fail the operation with an
exception.public DefaultRepositorySystemSession setIgnoreInvalidArtifactDescriptor(boolean ignoreInvalidArtifactDescriptor)
ignoreInvalidArtifactDescriptor - true if to ignore invalid artifact descriptors, false to
fail the operation with an exception.null.public String getChecksumPolicy()
RepositorySystemSessiongetChecksumPolicy in interface RepositorySystemSessionnull/empty if not set and the per-repository policies apply.RepositoryPolicy.CHECKSUM_POLICY_FAIL,
RepositoryPolicy.CHECKSUM_POLICY_IGNORE,
RepositoryPolicy.CHECKSUM_POLICY_WARNpublic DefaultRepositorySystemSession setChecksumPolicy(String checksumPolicy)
checksumPolicy - The global checksum policy, may be null/empty to apply the per-repository policies.null.RepositoryPolicy.CHECKSUM_POLICY_FAIL,
RepositoryPolicy.CHECKSUM_POLICY_IGNORE,
RepositoryPolicy.CHECKSUM_POLICY_WARNpublic String getUpdatePolicy()
RepositorySystemSessiongetUpdatePolicy in interface RepositorySystemSessionnull/empty if not set and the per-repository policies apply.RepositoryPolicy.UPDATE_POLICY_ALWAYS,
RepositoryPolicy.UPDATE_POLICY_DAILY,
RepositoryPolicy.UPDATE_POLICY_NEVERpublic DefaultRepositorySystemSession setUpdatePolicy(String updatePolicy)
updatePolicy - The global update policy, may be null/empty to apply the per-repository policies.null.RepositoryPolicy.UPDATE_POLICY_ALWAYS,
RepositoryPolicy.UPDATE_POLICY_DAILY,
RepositoryPolicy.UPDATE_POLICY_NEVERpublic LocalRepository getLocalRepository()
RepositorySystemSessionLocalRepositoryManager.getRepository().getLocalRepository in interface RepositorySystemSessionnull.public LocalRepositoryManager getLocalRepositoryManager()
RepositorySystemSessiongetLocalRepositoryManager in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setLocalRepositoryManager(LocalRepositoryManager localRepositoryManager)
localRepositoryManager - The local repository manager used during this session, may be null.null.public WorkspaceReader getWorkspaceReader()
RepositorySystemSessiongetWorkspaceReader in interface RepositorySystemSessionnull if none.public DefaultRepositorySystemSession setWorkspaceReader(WorkspaceReader workspaceReader)
workspaceReader - The workspace reader for this session, may be null if none.null.public RepositoryListener getRepositoryListener()
RepositorySystemSessiongetRepositoryListener in interface RepositorySystemSessionnull if none.public DefaultRepositorySystemSession setRepositoryListener(RepositoryListener repositoryListener)
repositoryListener - The repository listener, may be null if none.null.public TransferListener getTransferListener()
RepositorySystemSessiongetTransferListener in interface RepositorySystemSessionnull if none.public DefaultRepositorySystemSession setTransferListener(TransferListener transferListener)
transferListener - The transfer listener, may be null if none.null.public Map<String,String> getSystemProperties()
RepositorySystemSessionSystem.getProperties() and environment variables.getSystemProperties in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setSystemProperties(Map<String,String> systemProperties)
System.getProperties() and environment variables.systemProperties - The system properties, may be null or empty if none.null.public DefaultRepositorySystemSession setSystemProps(Hashtable<?,?> systemProperties)
System.getProperties() and environment variables.systemProperties - The system properties, may be null or empty if none.null.public DefaultRepositorySystemSession setSystemProperty(String key, String value)
key - The property key, must not be null.value - The property value, may be null to remove/unset the property.null.public Map<String,String> getUserProperties()
RepositorySystemSessiongetUserProperties in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setUserProperties(Map<String,String> userProperties)
userProperties - The user properties, may be null or empty if none.null.public DefaultRepositorySystemSession setUserProps(Map<?,?> userProperties)
userProperties - The user properties, may be null or empty if none.null.public DefaultRepositorySystemSession setUserProperty(String key, String value)
key - The property key, must not be null.value - The property value, may be null to remove/unset the property.null.public Map<String,Object> getConfigProperties()
RepositorySystemSessiongetConfigProperties in interface RepositorySystemSessionnull.ConfigurationPropertiespublic DefaultRepositorySystemSession setConfigProperties(Map<String,Object> configProperties)
configProperties - The configuration properties, may be null or empty if none.null.public DefaultRepositorySystemSession setConfigProps(Map<?,?> configProperties)
configProperties - The configuration properties, may be null or empty if none.null.public DefaultRepositorySystemSession setConfigProperty(String key, Object value)
key - The property key, must not be null.value - The property value, may be null to remove/unset the property.null.public MirrorSelector getMirrorSelector()
RepositorySystemSessiongetMirrorSelector in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setMirrorSelector(MirrorSelector mirrorSelector)
mirrorSelector - The mirror selector to use, may be null.null.public ProxySelector getProxySelector()
RepositorySystemSessiongetProxySelector in interface RepositorySystemSessionnull.RemoteRepository.getProxy()public DefaultRepositorySystemSession setProxySelector(ProxySelector proxySelector)
proxySelector - The proxy selector to use, may be null.null.RemoteRepository.getProxy()public AuthenticationSelector getAuthenticationSelector()
RepositorySystemSessiongetAuthenticationSelector in interface RepositorySystemSessionnull.RemoteRepository.getAuthentication()public DefaultRepositorySystemSession setAuthenticationSelector(AuthenticationSelector authenticationSelector)
authenticationSelector - The authentication selector to use, may be null.null.RemoteRepository.getAuthentication()public ArtifactTypeRegistry getArtifactTypeRegistry()
RepositorySystemSessiongetArtifactTypeRegistry in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setArtifactTypeRegistry(ArtifactTypeRegistry artifactTypeRegistry)
artifactTypeRegistry - The artifact type registry, may be null.null.public DependencyTraverser getDependencyTraverser()
RepositorySystemSessiongetDependencyTraverser in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setDependencyTraverser(DependencyTraverser dependencyTraverser)
dependencyTraverser - The dependency traverser to use for building dependency graphs, may be null.null.public DependencyManager getDependencyManager()
RepositorySystemSessiongetDependencyManager in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setDependencyManager(DependencyManager dependencyManager)
dependencyManager - The dependency manager to use for building dependency graphs, may be null.null.public DependencySelector getDependencySelector()
RepositorySystemSessiongetDependencySelector in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setDependencySelector(DependencySelector dependencySelector)
dependencySelector - The dependency selector to use for building dependency graphs, may be null.null.public DependencyGraphTransformer getDependencyGraphTransformer()
RepositorySystemSessiongetDependencyGraphTransformer in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setDependencyGraphTransformer(DependencyGraphTransformer dependencyGraphTransformer)
dependencyGraphTransformer - The dependency graph transformer to use for building dependency graphs, may be
null.null.public SessionData getData()
RepositorySystemSessiongetData in interface RepositorySystemSessionnull.public DefaultRepositorySystemSession setData(SessionData data)
data - The session data, may be null.null.public RepositoryCache getCache()
RepositorySystemSessiongetCache in interface RepositorySystemSessionnull if none.public DefaultRepositorySystemSession setCache(RepositoryCache cache)
cache - The repository cache, may be null if none.null.Copyright © 2010-2014 Sonatype, Inc.. All Rights Reserved.