org.sonatype.aether
Interface RepositorySystemSession

All Known Implementing Classes:
DefaultRepositorySystemSession, FilterRepositorySystemSession, TestRepositorySystemSession

public interface RepositorySystemSession

Defines settings and components that control the repository system.

Author:
Benjamin Bentmann

Method Summary
 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()
          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.
 

Method Detail

isOffline

boolean isOffline()
Indicates whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.

Returns:
true if the repository system is in offline mode, false otherwise.

isTransferErrorCachingEnabled

boolean isTransferErrorCachingEnabled()
Indicates whether transfer errors (e.g. unreachable host, bad authentication) from resolution attempts should be cached in the local repository. If caching is enabled, resolution will not be reattempted until the update policy for the affected resource has expired.

Returns:
true if transfer errors are cached, false to always reattempt downloading.

isNotFoundCachingEnabled

boolean isNotFoundCachingEnabled()
Indicates whether missing artifacts/metadata from resolution attempts should be cached in the local repository. If caching is enabled, resolution will not be reattempted until the update policy for the affected resource has expired.

Returns:
true if missing resources are cached, false to always reattempt downloading.

isIgnoreMissingArtifactDescriptor

boolean isIgnoreMissingArtifactDescriptor()
Indicates whether missing artifact descriptors are silently ignored. If enabled and no artifact descriptor is available, an empty stub descriptor is used instead.

Returns:
true if missing artifact descriptors are ignored, false to fail the operation with an exception.

isIgnoreInvalidArtifactDescriptor

boolean isIgnoreInvalidArtifactDescriptor()
Indicates whether invalid artifact descriptors are silently ignored. If enabled and an artifact descriptor is invalid, an empty stub descriptor is used instead.

Returns:
true if invalid artifact descriptors are ignored, false to fail the operation with an exception.

getChecksumPolicy

String getChecksumPolicy()
Gets the global checksum policy. If set, the global checksum policy overrides the checksum policies of the remote repositories being used for resolution.

Returns:
The global checksum policy or null/empty if not set and the per-repository policies apply.
See Also:
RepositoryPolicy

getUpdatePolicy

String getUpdatePolicy()
Gets the global update policy. If set, the global update policy overrides the update policies of the remote repositories being used for resolution.

Returns:
The global update policy or null/empty if not set and the per-repository policies apply.
See Also:
RepositoryPolicy

getLocalRepository

LocalRepository getLocalRepository()
Gets the local repository used during this session. This is a convenience method for LocalRepositoryManager.getRepository().

Returns:
The local repository being during this session, never null.

getLocalRepositoryManager

LocalRepositoryManager getLocalRepositoryManager()
Gets the local repository manager used during this session.

Returns:
The local repository manager used during this session, never null.

getWorkspaceReader

WorkspaceReader getWorkspaceReader()
Gets the workspace reader used during this session. If set, the workspace reader will usually be consulted first to resolve artifacts.

Returns:
The workspace reader for this session or null if none.

getRepositoryListener

RepositoryListener getRepositoryListener()
Gets the listener being notified of actions in the repository system.

Returns:
The repository listener or null if none.

getTransferListener

TransferListener getTransferListener()
Gets the listener being notified of uploads/downloads by the repository system.

Returns:
The transfer listener or null if none.

getSystemProperties

Map<String,String> getSystemProperties()
Gets the system properties to use, e.g. for processing of artifact descriptors. System properties are usually collected from the runtime environment like System.getProperties() and environment variables.

Returns:
The (read-only) system properties, never null.

getUserProperties

Map<String,String> getUserProperties()
Gets the user properties to use, e.g. for processing of artifact descriptors. User properties are similar to system properties but are set on the discretion of the user and hence are considered of higher priority than system properties.

Returns:
The (read-only) user properties, never null.

getConfigProperties

Map<String,Object> getConfigProperties()
The configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling, connector-specific behavior, etc.)

Returns:
The (read-only) configuration properties, never null.
See Also:
ConfigurationProperties

getMirrorSelector

MirrorSelector getMirrorSelector()
Gets the mirror selector to use for repositories discovered in artifact descriptors. Note that this selector is not used for remote repositories which are passed as request parameters to the repository system, those repositories are supposed to denote the effective repositories.

Returns:
The mirror selector to use, never null.

getProxySelector

ProxySelector getProxySelector()
Gets the proxy selector to use for repositories discovered in artifact descriptors. Note that this selector is not used for remote repositories which are passed as request parameters to the repository system, those repositories are supposed to have their proxy (if any) already set.

Returns:
The proxy selector to use, never null.
See Also:
RemoteRepository.getProxy()

getAuthenticationSelector

AuthenticationSelector getAuthenticationSelector()
Gets the authentication selector to use for repositories discovered in artifact descriptors. Note that this selector is not used for remote repositories which are passed as request parameters to the repository system, those repositories are supposed to have their authentication (if any) already set.

Returns:
The authentication selector to use, never null.
See Also:
RemoteRepository.getAuthentication()

getArtifactTypeRegistry

ArtifactTypeRegistry getArtifactTypeRegistry()
Gets the registry of artifact types recognized by this session.

Returns:
The artifact type registry, never null.

getDependencyTraverser

DependencyTraverser getDependencyTraverser()
Gets the dependency traverser to use for building dependency graphs.

Returns:
The dependency traverser to use for building dependency graphs, never null.

getDependencyManager

DependencyManager getDependencyManager()
Gets the dependency manager to use for building dependency graphs.

Returns:
The dependency manager to use for building dependency graphs, never null.

getDependencySelector

DependencySelector getDependencySelector()
Gets the dependency selector to use for building dependency graphs.

Returns:
The dependency selector to use for building dependency graphs, never null.

getDependencyGraphTransformer

DependencyGraphTransformer getDependencyGraphTransformer()
Gets the dependency graph transformer to use for building dependency graphs.

Returns:
The dependency graph transformer to use for building dependency graphs, never null.

getData

SessionData getData()
Gets the custom data associated with this session.

Returns:
The session data, never null.

getCache

RepositoryCache getCache()
Gets the cache the repository system may use to save data for future reuse during the session.

Returns:
The repository cache or null if none.


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.