Class DefaultRepositorySystemSession
- All Implemented Interfaces:
- RepositorySystemSession
RepositorySystemSession.SessionBuilder.withRepositorySystemSession(RepositorySystemSession)
 instead.
 Important: while the default constructor on this class is deprecated only, it is left only to guarantee backward compatibility with legacy code, but the default constructor should not be used anymore. Using that constructor will lead to resource leaks.
 Note: This class is not thread-safe. It is assumed that the mutators get only called during an
 initialization phase and that the session itself is not changed once initialized and being used by the repository
 system. It is recommended to call setReadOnly() once the session has been fully initialized to prevent
 accidental manipulation of it afterward.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.eclipse.aether.RepositorySystemSessionRepositorySystemSession.CloseableSession, RepositorySystemSession.SessionBuilder
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated.This way of creating session should be avoided, is in place just to offer backward binary compatibility with Resolver 1.x using code, but offers reduced functionality.DefaultRepositorySystemSession(Function<Runnable, Boolean> onSessionEndedRegistrar) Creates an uninitialized session.Creates a shallow copy of the specified session.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaddOnSessionEndedHandler(Runnable handler) Registers onSessionEnded handler, if able to.Gets the policy which controls how errors related to reading artifact descriptors should be handled.Gets the registry of artifact types recognized by this session, for instance when processing artifact descriptors.Gets the global artifact update policy.Gets the authentication selector to use for repositories discovered in artifact descriptors.getCache()Gets the cache the repository system may use to save data for future reuse during the session.Gets the global checksum policy.Gets the configuration properties used to tweak internal aspects of the repository system (e.g.getData()Gets the custom data associated with this session.Gets the dependency graph transformer to use for building dependency graphs.Gets the dependency manager to use for building dependency graphs.Gets the dependency selector to use for building dependency graphs.Gets the dependency traverser to use for building dependency graphs.Gets the local repository used during this session.Gets the local repository manager used during this session.Gets the global metadata update policy.Gets the mirror selector to use for repositories discovered in artifact descriptors.Gets the proxy selector to use for repositories discovered in artifact descriptors.Gets the listener being notified of actions in the repository system.Gets the policy which controls whether resolutions errors from remote repositories should be cached.Returns the scope manager to be used in this session, may benullif not set.Returns the system dependency scope.Gets the system properties to use, e.g.Gets the listener being notified of uploads/downloads by the repository system.Gets the global update policy, ornullif not set.Gets the user properties to use, e.g.Gets the version filter to use for building dependency graphs.Gets the workspace reader used during this session.booleanIndicates whether repositories declared in artifact descriptors should be ignored during transitive dependency collection.booleanIndicates whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.setArtifactDescriptorPolicy(ArtifactDescriptorPolicy artifactDescriptorPolicy) Sets the policy which controls how errors related to reading artifact descriptors should be handled.setArtifactTypeRegistry(ArtifactTypeRegistry artifactTypeRegistry) Sets the registry of artifact types recognized by this session.setArtifactUpdatePolicy(String artifactUpdatePolicy) Sets the global artifact update policy.setAuthenticationSelector(AuthenticationSelector authenticationSelector) Sets the authentication selector to use for repositories discovered in artifact descriptors.setCache(RepositoryCache cache) Sets the cache the repository system may use to save data for future reuse during the session.setChecksumPolicy(String checksumPolicy) Sets the global checksum policy.setConfigProperties(Map<?, ?> configProperties) Sets the configuration properties used to tweak internal aspects of the repository system (e.g.setConfigProperty(String key, Object value) Sets the specified configuration property.setData(SessionData data) Sets the custom data associated with this session.setDependencyGraphTransformer(DependencyGraphTransformer dependencyGraphTransformer) Sets the dependency graph transformer to use for building dependency graphs.setDependencyManager(DependencyManager dependencyManager) Sets the dependency manager to use for building dependency graphs.setDependencySelector(DependencySelector dependencySelector) Sets the dependency selector to use for building dependency graphs.setDependencyTraverser(DependencyTraverser dependencyTraverser) Sets the dependency traverser to use for building dependency graphs.setIgnoreArtifactDescriptorRepositories(boolean ignoreArtifactDescriptorRepositories) Controls whether repositories declared in artifact descriptors should be ignored during transitive dependency collection.setLocalRepositoryManager(LocalRepositoryManager localRepositoryManager) Sets the local repository manager used during this session.setMetadataUpdatePolicy(String metadataUpdatePolicy) Sets the global metadata update policy.setMirrorSelector(MirrorSelector mirrorSelector) Sets the mirror selector to use for repositories discovered in artifact descriptors.setOffline(boolean offline) Controls whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.setProxySelector(ProxySelector proxySelector) Sets the proxy selector to use for repositories discovered in artifact descriptors.voidMarks this session as read-only such that any future attempts to call its mutators will fail with an exception.setRepositoryListener(RepositoryListener repositoryListener) Sets the listener being notified of actions in the repository system.setResolutionErrorPolicy(ResolutionErrorPolicy resolutionErrorPolicy) Sets the policy which controls whether resolutions errors from remote repositories should be cached.setScopeManager(ScopeManager scopeManager) Sets the scope manager, may benull.setSystemProperties(Map<?, ?> systemProperties) Sets the system properties to use, e.g.setSystemProperty(String key, String value) Sets the specified system property.setTransferListener(TransferListener transferListener) Sets the listener being notified of uploads/downloads by the repository system.setUpdatePolicy(String updatePolicy) Sets the global update policy.setUserProperties(Map<?, ?> userProperties) Sets the user properties to use, e.g.setUserProperty(String key, String value) Sets the specified user property.setVersionFilter(VersionFilter versionFilter) Sets the version filter to use for building dependency graphs.setWorkspaceReader(WorkspaceReader workspaceReader) Sets the workspace reader used during this session.
- 
Constructor Details- 
DefaultRepositorySystemSessionDeprecated.This way of creating session should be avoided, is in place just to offer backward binary compatibility with Resolver 1.x using code, but offers reduced functionality. UseRepositorySystem.createSessionBuilder()instead.Creates an uninitialized session. Note: The new session is not ready to use, as a bare minimum,setLocalRepositoryManager(LocalRepositoryManager)needs to be called but usually other settings also need to be customized to achieve meaningful behavior.
- 
DefaultRepositorySystemSessionCreates an uninitialized session. Note: The new session is not ready to use, as a bare minimum,setLocalRepositoryManager(LocalRepositoryManager)needs to be called but usually other settings also need to be customized to achieve meaningful behavior.Note: preferred way to create sessions is RepositorySystem.createSessionBuilder(), as then client code does not have to fiddle with session close callbacks. This constructor is meant more for testing purposes.- Since:
- 2.0.0
 
- 
DefaultRepositorySystemSessionCreates a shallow copy of the specified session. Actually, the copy is not completely shallow, all maps holding system/user/config properties are copied as well. In other words, invoking any mutator on the new session itself has no effect on the original session. Other mutable objects like the session data and cache (if any) are not copied and will be shared with the original session unless reconfigured.- Parameters:
- session- The session to copy, must not be- null.
 
 
- 
- 
Method Details- 
isOfflineDescription copied from interface:RepositorySystemSessionIndicates whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.- Specified by:
- isOfflinein interface- RepositorySystemSession
- Returns:
- trueif the repository system is in offline mode,- falseotherwise.
 
- 
setOfflineControls whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.- Parameters:
- offline-- trueif the repository system is in offline mode,- falseotherwise.
- Returns:
- This session for chaining, never null.
 
- 
isIgnoreArtifactDescriptorRepositoriesDescription copied from interface:RepositorySystemSessionIndicates 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:
- isIgnoreArtifactDescriptorRepositoriesin interface- RepositorySystemSession
- Returns:
- trueif additional repositories from artifact descriptors are ignored,- falseto merge those with the originally specified repositories.
 
- 
setIgnoreArtifactDescriptorRepositoriespublic DefaultRepositorySystemSession setIgnoreArtifactDescriptorRepositories(boolean ignoreArtifactDescriptorRepositories) Controls 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.- Parameters:
- ignoreArtifactDescriptorRepositories-- trueto ignore additional repositories from artifact descriptors,- falseto merge those with the originally specified repositories.
- Returns:
- This session for chaining, never null.
 
- 
getResolutionErrorPolicyDescription copied from interface:RepositorySystemSessionGets the policy which controls whether resolutions errors from remote repositories should be cached.- Specified by:
- getResolutionErrorPolicyin interface- RepositorySystemSession
- Returns:
- The resolution error policy for this session or nullif resolution errors should generally not be cached.
 
- 
setResolutionErrorPolicypublic DefaultRepositorySystemSession setResolutionErrorPolicy(ResolutionErrorPolicy resolutionErrorPolicy) Sets the policy which controls whether resolutions errors from remote repositories should be cached.- Parameters:
- resolutionErrorPolicy- The resolution error policy for this session, may be- nullif resolution errors should generally not be cached.
- Returns:
- This session for chaining, never null.
 
- 
getArtifactDescriptorPolicyDescription copied from interface:RepositorySystemSessionGets the policy which controls how errors related to reading artifact descriptors should be handled.- Specified by:
- getArtifactDescriptorPolicyin interface- RepositorySystemSession
- Returns:
- The descriptor error policy for this session or nullif descriptor errors should generally not be tolerated.
 
- 
setArtifactDescriptorPolicypublic DefaultRepositorySystemSession setArtifactDescriptorPolicy(ArtifactDescriptorPolicy artifactDescriptorPolicy) Sets the policy which controls how errors related to reading artifact descriptors should be handled.- Parameters:
- artifactDescriptorPolicy- The descriptor error policy for this session, may be- nullif descriptor errors should generally not be tolerated.
- Returns:
- This session for chaining, never null.
 
- 
getChecksumPolicyDescription copied from interface:RepositorySystemSessionGets the global checksum policy. If set, the global checksum policy overrides the checksum policies of the remote repositories being used for resolution.- Specified by:
- getChecksumPolicyin interface- RepositorySystemSession
- Returns:
- The global checksum policy or null/empty if not set and the per-repository policies apply.
- See Also:
 
- 
setChecksumPolicySets the global checksum policy. If set, the global checksum policy overrides the checksum policies of the remote repositories being used for resolution.- Parameters:
- checksumPolicy- The global checksum policy, may be- null/empty to apply the per-repository policies.
- Returns:
- This session for chaining, never null.
- See Also:
 
- 
getUpdatePolicyDescription copied from interface:RepositorySystemSessionGets the global update policy, ornullif not set.This method is meant for code that does not want to distinguish between artifact and metadata policies. Note: applications should either use get/set updatePolicy (this method and setUpdatePolicy(String)) or also distinguish between artifact and metadata update policies (and use other methods), but should not mix the two!- Specified by:
- getUpdatePolicyin interface- RepositorySystemSession
- See Also:
 
- 
setUpdatePolicySets the global update policy. If set, the global update policy overrides the update policies of the remote repositories being used for resolution.This method is meant for code that does not want to distinguish between artifact and metadata policies. Note: applications should either use get/set updatePolicy (this method and RepositorySystemSession.getUpdatePolicy()) or also distinguish between artifact and metadata update policies (and use other methods), but should not mix the two!- Parameters:
- updatePolicy- The global update policy, may be- null/empty to apply the per-repository policies.
- Returns:
- This session for chaining, never null.
- See Also:
 
- 
getArtifactUpdatePolicyDescription copied from interface:RepositorySystemSessionGets the global artifact update policy. If set, the global update policy overrides the update policies of the remote repositories being used for resolution.- Specified by:
- getArtifactUpdatePolicyin interface- RepositorySystemSession
- Returns:
- The global update policy or null/empty if not set and the per-repository policies apply.
- See Also:
 
- 
setArtifactUpdatePolicySets the global artifact update policy. If set, the global update policy overrides the artifact update policies of the remote repositories being used for resolution.- Parameters:
- artifactUpdatePolicy- The global update policy, may be- null/empty to apply the per-repository policies.
- Returns:
- This session for chaining, never null.
- Since:
- 2.0.0
- See Also:
 
- 
getMetadataUpdatePolicyDescription copied from interface:RepositorySystemSessionGets the global metadata update policy. If set, the global update policy overrides the update policies of the remote repositories being used for resolution.- Specified by:
- getMetadataUpdatePolicyin interface- RepositorySystemSession
- Returns:
- The global update policy or null/empty if not set and the per-repository policies apply.
- See Also:
 
- 
setMetadataUpdatePolicySets the global metadata update policy. If set, the global update policy overrides the metadata update policies of the remote repositories being used for resolution.- Parameters:
- metadataUpdatePolicy- The global update policy, may be- null/empty to apply the per-repository policies.
- Returns:
- This session for chaining, never null.
- Since:
- 2.0.0
- See Also:
 
- 
getLocalRepositoryDescription copied from interface:RepositorySystemSessionGets the local repository used during this session. This is a convenience method forLocalRepositoryManager.getRepository().- Specified by:
- getLocalRepositoryin interface- RepositorySystemSession
- Returns:
- The local repository being during this session, never null.
 
- 
getLocalRepositoryManagerDescription copied from interface:RepositorySystemSessionGets the local repository manager used during this session.- Specified by:
- getLocalRepositoryManagerin interface- RepositorySystemSession
- Returns:
- The local repository manager used during this session, never null.
 
- 
setLocalRepositoryManagerpublic DefaultRepositorySystemSession setLocalRepositoryManager(LocalRepositoryManager localRepositoryManager) Sets the local repository manager used during this session. Note: Eventually, a valid session must have a local repository manager set.- Parameters:
- localRepositoryManager- The local repository manager used during this session, may be- null.
- Returns:
- This session for chaining, never null.
 
- 
getWorkspaceReaderDescription copied from interface:RepositorySystemSessionGets the workspace reader used during this session. If set, the workspace reader will usually be consulted first to resolve artifacts.- Specified by:
- getWorkspaceReaderin interface- RepositorySystemSession
- Returns:
- The workspace reader for this session or nullif none.
 
- 
setWorkspaceReaderSets the workspace reader used during this session. If set, the workspace reader will usually be consulted first to resolve artifacts.- Parameters:
- workspaceReader- The workspace reader for this session, may be- nullif none.
- Returns:
- This session for chaining, never null.
 
- 
getRepositoryListenerDescription copied from interface:RepositorySystemSessionGets the listener being notified of actions in the repository system.- Specified by:
- getRepositoryListenerin interface- RepositorySystemSession
- Returns:
- The repository listener or nullif none.
 
- 
setRepositoryListenerSets the listener being notified of actions in the repository system.- Parameters:
- repositoryListener- The repository listener, may be- nullif none.
- Returns:
- This session for chaining, never null.
 
- 
getTransferListenerDescription copied from interface:RepositorySystemSessionGets the listener being notified of uploads/downloads by the repository system.- Specified by:
- getTransferListenerin interface- RepositorySystemSession
- Returns:
- The transfer listener or nullif none.
 
- 
setTransferListenerSets the listener being notified of uploads/downloads by the repository system.- Parameters:
- transferListener- The transfer listener, may be- nullif none.
- Returns:
- This session for chaining, never null.
 
- 
getSystemPropertiesDescription copied from interface:RepositorySystemSessionGets the system properties to use, e.g. for processing of artifact descriptors. System properties are usually collected from the runtime environment likeSystem.getProperties()and environment variables.- Specified by:
- getSystemPropertiesin interface- RepositorySystemSession
- Returns:
- The (read-only) system properties, never null.
 
- 
setSystemPropertiesSets the system properties to use, e.g. for processing of artifact descriptors. System properties are usually collected from the runtime environment likeSystem.getProperties()and environment variables.Note: System properties are of type Map<String, String>and any key-value pair in the input map that doesn't match this type will be silently ignored.- Parameters:
- systemProperties- The system properties, may be- nullor empty if none.
- Returns:
- This session for chaining, never null.
 
- 
setSystemPropertySets the specified system property.- Parameters:
- key- The property key, must not be- null.
- value- The property value, may be- nullto remove/unset the property.
- Returns:
- This session for chaining, never null.
 
- 
getUserPropertiesDescription copied from interface:RepositorySystemSessionGets 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:
- getUserPropertiesin interface- RepositorySystemSession
- Returns:
- The (read-only) user properties, never null.
 
- 
setUserPropertiesSets 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 in case of conflicts.Note: User properties are of type Map<String, String>and any key-value pair in the input map that doesn't match this type will be silently ignored.- Parameters:
- userProperties- The user properties, may be- nullor empty if none.
- Returns:
- This session for chaining, never null.
 
- 
setUserPropertySets the specified user property.- Parameters:
- key- The property key, must not be- null.
- value- The property value, may be- nullto remove/unset the property.
- Returns:
- This session for chaining, never null.
 
- 
getConfigPropertiesDescription copied from interface:RepositorySystemSessionGets the configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling, connector-specific behavior, etc.)- Specified by:
- getConfigPropertiesin interface- RepositorySystemSession
- Returns:
- The (read-only) configuration properties, never null.
- See Also:
 
- 
setConfigPropertiesSets the configuration properties used to tweak internal aspects of the repository system (e.g. thread pooling, connector-specific behavior, etc.).Note: Configuration properties are of type Map<String, Object>and any key-value pair in the input map that doesn't match this type will be silently ignored.- Parameters:
- configProperties- The configuration properties, may be- nullor empty if none.
- Returns:
- This session for chaining, never null.
 
- 
setConfigPropertySets the specified configuration property.- Parameters:
- key- The property key, must not be- null.
- value- The property value, may be- nullto remove/unset the property.
- Returns:
- This session for chaining, never null.
 
- 
getMirrorSelectorDescription copied from interface:RepositorySystemSessionGets 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:
- getMirrorSelectorin interface- RepositorySystemSession
- Returns:
- The mirror selector to use, never null.
- See Also:
 
- 
setMirrorSelectorSets 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.- Parameters:
- mirrorSelector- The mirror selector to use, may be- null.
- Returns:
- This session for chaining, never null.
 
- 
getProxySelectorDescription copied from interface:RepositorySystemSessionGets 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:
- getProxySelectorin interface- RepositorySystemSession
- Returns:
- The proxy selector to use, never null.
- See Also:
 
- 
setProxySelectorSets 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.- Parameters:
- proxySelector- The proxy selector to use, may be- null.
- Returns:
- This session for chaining, never null.
- See Also:
 
- 
getAuthenticationSelectorDescription copied from interface:RepositorySystemSessionGets 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:
- getAuthenticationSelectorin interface- RepositorySystemSession
- Returns:
- The authentication selector to use, never null.
- See Also:
 
- 
setAuthenticationSelectorpublic DefaultRepositorySystemSession setAuthenticationSelector(AuthenticationSelector authenticationSelector) Sets 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.- Parameters:
- authenticationSelector- The authentication selector to use, may be- null.
- Returns:
- This session for chaining, never null.
- See Also:
 
- 
getArtifactTypeRegistryDescription copied from interface:RepositorySystemSessionGets the registry of artifact types recognized by this session, for instance when processing artifact descriptors.- Specified by:
- getArtifactTypeRegistryin interface- RepositorySystemSession
- Returns:
- The artifact type registry, never null.
 
- 
setArtifactTypeRegistrypublic DefaultRepositorySystemSession setArtifactTypeRegistry(ArtifactTypeRegistry artifactTypeRegistry) Sets the registry of artifact types recognized by this session.- Parameters:
- artifactTypeRegistry- The artifact type registry, may be- null.
- Returns:
- This session for chaining, never null.
 
- 
getDependencyTraverserDescription copied from interface:RepositorySystemSessionGets the dependency traverser to use for building dependency graphs.- Specified by:
- getDependencyTraverserin interface- RepositorySystemSession
- Returns:
- The dependency traverser to use for building dependency graphs or nullif dependencies are unconditionally traversed.
 
- 
setDependencyTraverserpublic DefaultRepositorySystemSession setDependencyTraverser(DependencyTraverser dependencyTraverser) Sets the dependency traverser to use for building dependency graphs.- Parameters:
- dependencyTraverser- The dependency traverser to use for building dependency graphs, may be- null.
- Returns:
- This session for chaining, never null.
 
- 
getDependencyManagerDescription copied from interface:RepositorySystemSessionGets the dependency manager to use for building dependency graphs.- Specified by:
- getDependencyManagerin interface- RepositorySystemSession
- Returns:
- The dependency manager to use for building dependency graphs or nullif dependency management is not performed.
 
- 
setDependencyManagerSets the dependency manager to use for building dependency graphs.- Parameters:
- dependencyManager- The dependency manager to use for building dependency graphs, may be- null.
- Returns:
- This session for chaining, never null.
 
- 
getDependencySelectorDescription copied from interface:RepositorySystemSessionGets the dependency selector to use for building dependency graphs.- Specified by:
- getDependencySelectorin interface- RepositorySystemSession
- Returns:
- The dependency selector to use for building dependency graphs or nullif dependencies are unconditionally included.
 
- 
setDependencySelectorSets the dependency selector to use for building dependency graphs.- Parameters:
- dependencySelector- The dependency selector to use for building dependency graphs, may be- null.
- Returns:
- This session for chaining, never null.
 
- 
getVersionFilterDescription copied from interface:RepositorySystemSessionGets the version filter to use for building dependency graphs.- Specified by:
- getVersionFilterin interface- RepositorySystemSession
- Returns:
- The version filter to use for building dependency graphs or nullif versions aren't filtered.
 
- 
setVersionFilterSets the version filter to use for building dependency graphs.- Parameters:
- versionFilter- The version filter to use for building dependency graphs, may be- nullto not filter versions.
- Returns:
- This session for chaining, never null.
 
- 
getDependencyGraphTransformerDescription copied from interface:RepositorySystemSessionGets the dependency graph transformer to use for building dependency graphs.- Specified by:
- getDependencyGraphTransformerin interface- RepositorySystemSession
- Returns:
- The dependency graph transformer to use for building dependency graphs or nullif none.
 
- 
setDependencyGraphTransformerpublic DefaultRepositorySystemSession setDependencyGraphTransformer(DependencyGraphTransformer dependencyGraphTransformer) Sets the dependency graph transformer to use for building dependency graphs.- Parameters:
- dependencyGraphTransformer- The dependency graph transformer to use for building dependency graphs, may be- null.
- Returns:
- This session for chaining, never null.
 
- 
getDataDescription copied from interface:RepositorySystemSessionGets the custom data associated with this session.- Specified by:
- getDatain interface- RepositorySystemSession
- Returns:
- The session data, never null.
 
- 
setDataSets the custom data associated with this session.- Parameters:
- data- The session data, may be- null.
- Returns:
- This session for chaining, never null.
 
- 
getCacheDescription copied from interface:RepositorySystemSessionGets the cache the repository system may use to save data for future reuse during the session.- Specified by:
- getCachein interface- RepositorySystemSession
- Returns:
- The repository cache or nullif none.
 
- 
setCacheSets the cache the repository system may use to save data for future reuse during the session.- Parameters:
- cache- The repository cache, may be- nullif none.
- Returns:
- This session for chaining, never null.
 
- 
getScopeManagerDescription copied from interface:RepositorySystemSessionReturns the scope manager to be used in this session, may benullif not set.- Specified by:
- getScopeManagerin interface- RepositorySystemSession
- Returns:
- The scope manager or nullif not set.
 
- 
setScopeManagerSets the scope manager, may benull.- Parameters:
- scopeManager- The scope manager, may be- null.
- Returns:
- The session for chaining, never null.
- Since:
- 2.0.0
 
- 
getSystemDependencyScopeDescription copied from interface:RepositorySystemSessionReturns the system dependency scope.Shorthand method for ScopeManager.getSystemDependencyScope().If ScopeManageris set,RepositorySystemSession.getScopeManager()returns non-null value, the result ofScopeManager.getSystemDependencyScope()is returned (that may benull). If noScopeManagerif set, thenSystemDependencyScope.LEGACYinstance is returned, as lack of scope manager means that resolver operates in "legacy" mode (Maven3 compatible mode).- Specified by:
- getSystemDependencyScopein interface- RepositorySystemSession
- Returns:
- The system dependency scope or nullif no such scope.
 
- 
addOnSessionEndedHandlerRegisters onSessionEnded handler, if able to.- Specified by:
- addOnSessionEndedHandlerin interface- RepositorySystemSession
- Parameters:
- handler- The handler to register
- Returns:
- Return trueif registration was possible, otherwisefalse.
 
- 
setReadOnlyMarks this session as read-only such that any future attempts to call its mutators will fail with an exception. Marking an already read-only session as read-only has no effect. The session's data and cache remain writable though.
 
-