org.eclipse.aether

## Class AbstractForwardingRepositorySystemSession

- java.lang.Object
- - org.eclipse.aether.AbstractForwardingRepositorySystemSession

- All Implemented Interfaces:
    RepositorySystemSession

      public abstract class AbstractForwardingRepositorySystemSession
      extends Object
      implements RepositorySystemSession

  A special repository system session to enable decorating or proxying another session. To do so, clients have to create a subclass and implement `getSession()`.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractForwardingRepositorySystemSession()` Creates a new forwarding session.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ArtifactDescriptorPolicy` | `getArtifactDescriptorPolicy()` Gets the policy which controls how errors related to reading artifact descriptors should be handled.
    `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.
    `ResolutionErrorPolicy` | `getResolutionErrorPolicy()` Gets the policy which controls whether resolutions errors from remote repositories should be cached.
    `protected abstract RepositorySystemSession` | `getSession()` Gets the repository system session to which this instance forwards calls.
    `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.
    `VersionFilter` | `getVersionFilter()` Gets the version filter to use for building dependency graphs.
    `WorkspaceReader` | `getWorkspaceReader()` Gets the workspace reader used during this session.
    `boolean` | `isIgnoreArtifactDescriptorRepositories()` Indicates whether repositories declared in artifact descriptors should be ignored during transitive dependency collection.
    `boolean` | `isOffline()` Indicates whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractForwardingRepositorySystemSession

          protected AbstractForwardingRepositorySystemSession()

      Creates a new forwarding session.

  - ### Method Detail

    - #### getSession

          protected abstract RepositorySystemSession getSession()

      Gets the repository system session to which this instance forwards calls. It's worth noting that this class does not save/cache the returned reference but queries this method before each forwarding. Hence, the session forwarded to may change over time or depending on the context (e.g. calling thread).
      Returns:
        The repository system session to forward calls to, never `null`.

    - #### isOffline

          public boolean isOffline()

      Description copied from interface: `RepositorySystemSession`
      Indicates whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.
      Specified by:
        `isOffline` in interface `RepositorySystemSession`
      Returns:
        `true` if the repository system is in offline mode, `false` otherwise.

    - #### isIgnoreArtifactDescriptorRepositories

          public boolean isIgnoreArtifactDescriptorRepositories()

      Description copied from interface: `RepositorySystemSession`
      Indicates whether repositories declared in artifact descriptors should be ignored during transitive dependency collection. If enabled, only the repositories originally provided with the collect request will be considered.
      Specified by:
        `isIgnoreArtifactDescriptorRepositories` in interface `RepositorySystemSession`
      Returns:
        `true` if additional repositories from artifact descriptors are ignored, `false` to merge those with the originally specified repositories.

    - #### getResolutionErrorPolicy

          public ResolutionErrorPolicy getResolutionErrorPolicy()

      Description copied from interface: `RepositorySystemSession`
      Gets the policy which controls whether resolutions errors from remote repositories should be cached.
      Specified by:
        `getResolutionErrorPolicy` in interface `RepositorySystemSession`
      Returns:
        The resolution error policy for this session or `null` if resolution errors should generally not be cached.

    - #### getArtifactDescriptorPolicy

          public ArtifactDescriptorPolicy getArtifactDescriptorPolicy()

      Description copied from interface: `RepositorySystemSession`
      Gets the policy which controls how errors related to reading artifact descriptors should be handled.
      Specified by:
        `getArtifactDescriptorPolicy` in interface `RepositorySystemSession`
      Returns:
        The descriptor error policy for this session or `null` if descriptor errors should generally not be tolerated.

    - #### getChecksumPolicy

          public String getChecksumPolicy()

      Description copied from interface: `RepositorySystemSession`
      Gets the global checksum policy. If set, the global checksum policy overrides the checksum policies of the remote repositories being used for resolution.
      Specified by:
        `getChecksumPolicy` in interface `RepositorySystemSession`
      Returns:
        The global checksum policy or `null`/empty if not set and the per-repository policies apply.
      See Also:
        `RepositoryPolicy.CHECKSUM_POLICY_FAIL`, `RepositoryPolicy.CHECKSUM_POLICY_IGNORE`, `RepositoryPolicy.CHECKSUM_POLICY_WARN`

    - #### getUpdatePolicy

          public String getUpdatePolicy()

      Description copied from interface: `RepositorySystemSession`
      Gets the global update policy. If set, the global update policy overrides the update policies of the remote repositories being used for resolution.
      Specified by:
        `getUpdatePolicy` in interface `RepositorySystemSession`
      Returns:
        The global update policy or `null`/empty if not set and the per-repository policies apply.
      See Also:
        `RepositoryPolicy.UPDATE_POLICY_ALWAYS`, `RepositoryPolicy.UPDATE_POLICY_DAILY`, `RepositoryPolicy.UPDATE_POLICY_NEVER`

    - #### getLocalRepository

          public LocalRepository getLocalRepository()

      Description copied from interface: `RepositorySystemSession`
      Gets the local repository used during this session. This is a convenience method for `LocalRepositoryManager.getRepository()`.
      Specified by:
        `getLocalRepository` in interface `RepositorySystemSession`
      Returns:
        The local repository being during this session, never `null`.

    - #### getLocalRepositoryManager

          public LocalRepositoryManager getLocalRepositoryManager()

      Description copied from interface: `RepositorySystemSession`
      Gets the local repository manager used during this session.
      Specified by:
        `getLocalRepositoryManager` in interface `RepositorySystemSession`
      Returns:
        The local repository manager used during this session, never `null`.

    - #### getWorkspaceReader

          public WorkspaceReader getWorkspaceReader()

      Description copied from interface: `RepositorySystemSession`
      Gets the workspace reader used during this session. If set, the workspace reader will usually be consulted first to resolve artifacts.
      Specified by:
        `getWorkspaceReader` in interface `RepositorySystemSession`
      Returns:
        The workspace reader for this session or `null` if none.

    - #### getRepositoryListener

          public RepositoryListener getRepositoryListener()

      Description copied from interface: `RepositorySystemSession`
      Gets the listener being notified of actions in the repository system.
      Specified by:
        `getRepositoryListener` in interface `RepositorySystemSession`
      Returns:
        The repository listener or `null` if none.

    - #### getTransferListener

          public TransferListener getTransferListener()

      Description copied from interface: `RepositorySystemSession`
      Gets the listener being notified of uploads/downloads by the repository system.
      Specified by:
        `getTransferListener` in interface `RepositorySystemSession`
      Returns:
        The transfer listener or `null` if none.

    - #### getSystemProperties

          public Map<String,String> getSystemProperties()

      Description copied from interface: `RepositorySystemSession`
      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.
      Specified by:
        `getSystemProperties` in interface `RepositorySystemSession`
      Returns:
        The (read-only) system properties, never `null`.

    - #### getUserProperties

          public Map<String,String> getUserProperties()

      Description copied from interface: `RepositorySystemSession`
      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.
      Specified by:
        `getUserProperties` in interface `RepositorySystemSession`
      Returns:
        The (read-only) user properties, never `null`.

    - #### getConfigProperties

          public Map<String,Object> getConfigProperties()

      Description copied from interface: `RepositorySystemSession`
      Gets the configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling, connector-specific behavior, etc.)
      Specified by:
        `getConfigProperties` in interface `RepositorySystemSession`
      Returns:
        The (read-only) configuration properties, never `null`.
      See Also:
        `ConfigurationProperties`

    - #### getMirrorSelector

          public MirrorSelector getMirrorSelector()

      Description copied from interface: `RepositorySystemSession`
      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.
      Specified by:
        `getMirrorSelector` in interface `RepositorySystemSession`
      Returns:
        The mirror selector to use, never `null`.

    - #### getProxySelector

          public ProxySelector getProxySelector()

      Description copied from interface: `RepositorySystemSession`
      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.
      Specified by:
        `getProxySelector` in interface `RepositorySystemSession`
      Returns:
        The proxy selector to use, never `null`.
      See Also:
        `RemoteRepository.getProxy()`

    - #### getAuthenticationSelector

          public AuthenticationSelector getAuthenticationSelector()

      Description copied from interface: `RepositorySystemSession`
      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.
      Specified by:
        `getAuthenticationSelector` in interface `RepositorySystemSession`
      Returns:
        The authentication selector to use, never `null`.
      See Also:
        `RemoteRepository.getAuthentication()`

    - #### getArtifactTypeRegistry

          public ArtifactTypeRegistry getArtifactTypeRegistry()

      Description copied from interface: `RepositorySystemSession`
      Gets the registry of artifact types recognized by this session.
      Specified by:
        `getArtifactTypeRegistry` in interface `RepositorySystemSession`
      Returns:
        The artifact type registry, never `null`.

    - #### getDependencyTraverser

          public DependencyTraverser getDependencyTraverser()

      Description copied from interface: `RepositorySystemSession`
      Gets the dependency traverser to use for building dependency graphs.
      Specified by:
        `getDependencyTraverser` in interface `RepositorySystemSession`
      Returns:
        The dependency traverser to use for building dependency graphs or `null` if dependencies are unconditionally traversed.

    - #### getDependencyManager

          public DependencyManager getDependencyManager()

      Description copied from interface: `RepositorySystemSession`
      Gets the dependency manager to use for building dependency graphs.
      Specified by:
        `getDependencyManager` in interface `RepositorySystemSession`
      Returns:
        The dependency manager to use for building dependency graphs or `null` if dependency management is not performed.

    - #### getDependencySelector

          public DependencySelector getDependencySelector()

      Description copied from interface: `RepositorySystemSession`
      Gets the dependency selector to use for building dependency graphs.
      Specified by:
        `getDependencySelector` in interface `RepositorySystemSession`
      Returns:
        The dependency selector to use for building dependency graphs or `null` if dependencies are unconditionally included.

    - #### getVersionFilter

          public VersionFilter getVersionFilter()

      Description copied from interface: `RepositorySystemSession`
      Gets the version filter to use for building dependency graphs.
      Specified by:
        `getVersionFilter` in interface `RepositorySystemSession`
      Returns:
        The version filter to use for building dependency graphs or `null` if versions aren't filtered.

    - #### getDependencyGraphTransformer

          public DependencyGraphTransformer getDependencyGraphTransformer()

      Description copied from interface: `RepositorySystemSession`
      Gets the dependency graph transformer to use for building dependency graphs.
      Specified by:
        `getDependencyGraphTransformer` in interface `RepositorySystemSession`
      Returns:
        The dependency graph transformer to use for building dependency graphs or `null` if none.

    - #### getData

          public SessionData getData()

      Description copied from interface: `RepositorySystemSession`
      Gets the custom data associated with this session.
      Specified by:
        `getData` in interface `RepositorySystemSession`
      Returns:
        The session data, never `null`.

    - #### getCache

          public RepositoryCache getCache()

      Description copied from interface: `RepositorySystemSession`
      Gets the cache the repository system may use to save data for future reuse during the session.
      Specified by:
        `getCache` in interface `RepositorySystemSession`
      Returns:
        The repository cache or `null` if none.

Copyright © 2010-2013 The Eclipse Foundation. All Rights Reserved.