Class DefaultRepositorySystemSession
- java.lang.Object
-
- org.eclipse.aether.DefaultRepositorySystemSession
-
- All Implemented Interfaces:
RepositorySystemSession
public final class DefaultRepositorySystemSession extends Object implements RepositorySystemSession
A simple repository system session.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 afterwards.
-
-
Constructor Summary
Constructors Constructor Description DefaultRepositorySystemSession()Creates an uninitialized session.DefaultRepositorySystemSession(RepositorySystemSession session)Creates a shallow copy of the specified session.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactDescriptorPolicygetArtifactDescriptorPolicy()Gets the policy which controls how errors related to reading artifact descriptors should be handled.ArtifactTypeRegistrygetArtifactTypeRegistry()Gets the registry of artifact types recognized by this session, for instance when processing artifact descriptors.AuthenticationSelectorgetAuthenticationSelector()Gets the authentication selector to use for repositories discovered in artifact descriptors.RepositoryCachegetCache()Gets the cache the repository system may use to save data for future reuse during the session.StringgetChecksumPolicy()Gets the global checksum policy.Map<String,Object>getConfigProperties()Gets the configuration properties used to tweak internal aspects of the repository system (e.g.SessionDatagetData()Gets the custom data associated with this session.DependencyGraphTransformergetDependencyGraphTransformer()Gets the dependency graph transformer to use for building dependency graphs.DependencyManagergetDependencyManager()Gets the dependency manager to use for building dependency graphs.DependencySelectorgetDependencySelector()Gets the dependency selector to use for building dependency graphs.DependencyTraversergetDependencyTraverser()Gets the dependency traverser to use for building dependency graphs.FileTransformerManagergetFileTransformerManager()Get the file transformer managerLocalRepositorygetLocalRepository()Gets the local repository used during this session.LocalRepositoryManagergetLocalRepositoryManager()Gets the local repository manager used during this session.MirrorSelectorgetMirrorSelector()Gets the mirror selector to use for repositories discovered in artifact descriptors.ProxySelectorgetProxySelector()Gets the proxy selector to use for repositories discovered in artifact descriptors.RepositoryListenergetRepositoryListener()Gets the listener being notified of actions in the repository system.ResolutionErrorPolicygetResolutionErrorPolicy()Gets the policy which controls whether resolutions errors from remote repositories should be cached.Map<String,String>getSystemProperties()Gets the system properties to use, e.g.TransferListenergetTransferListener()Gets the listener being notified of uploads/downloads by the repository system.StringgetUpdatePolicy()Gets the global update policy.Map<String,String>getUserProperties()Gets the user properties to use, e.g.VersionFiltergetVersionFilter()Gets the version filter to use for building dependency graphs.WorkspaceReadergetWorkspaceReader()Gets the workspace reader used during this session.booleanisIgnoreArtifactDescriptorRepositories()Indicates whether repositories declared in artifact descriptors should be ignored during transitive dependency collection.booleanisOffline()Indicates whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.DefaultRepositorySystemSessionsetArtifactDescriptorPolicy(ArtifactDescriptorPolicy artifactDescriptorPolicy)Sets the policy which controls how errors related to reading artifact descriptors should be handled.DefaultRepositorySystemSessionsetArtifactTypeRegistry(ArtifactTypeRegistry artifactTypeRegistry)Sets the registry of artifact types recognized by this session.DefaultRepositorySystemSessionsetAuthenticationSelector(AuthenticationSelector authenticationSelector)Sets the authentication selector to use for repositories discovered in artifact descriptors.DefaultRepositorySystemSessionsetCache(RepositoryCache cache)Sets the cache the repository system may use to save data for future reuse during the session.DefaultRepositorySystemSessionsetChecksumPolicy(String checksumPolicy)Sets the global checksum policy.DefaultRepositorySystemSessionsetConfigProperties(Map<?,?> configProperties)Sets the configuration properties used to tweak internal aspects of the repository system (e.g.DefaultRepositorySystemSessionsetConfigProperty(String key, Object value)Sets the specified configuration property.DefaultRepositorySystemSessionsetData(SessionData data)Sets the custom data associated with this session.DefaultRepositorySystemSessionsetDependencyGraphTransformer(DependencyGraphTransformer dependencyGraphTransformer)Sets the dependency graph transformer to use for building dependency graphs.DefaultRepositorySystemSessionsetDependencyManager(DependencyManager dependencyManager)Sets the dependency manager to use for building dependency graphs.DefaultRepositorySystemSessionsetDependencySelector(DependencySelector dependencySelector)Sets the dependency selector to use for building dependency graphs.DefaultRepositorySystemSessionsetDependencyTraverser(DependencyTraverser dependencyTraverser)Sets the dependency traverser to use for building dependency graphs.DefaultRepositorySystemSessionsetFileTransformerManager(FileTransformerManager fileTransformerManager)DefaultRepositorySystemSessionsetIgnoreArtifactDescriptorRepositories(boolean ignoreArtifactDescriptorRepositories)Controls whether repositories declared in artifact descriptors should be ignored during transitive dependency collection.DefaultRepositorySystemSessionsetLocalRepositoryManager(LocalRepositoryManager localRepositoryManager)Sets the local repository manager used during this session.DefaultRepositorySystemSessionsetMirrorSelector(MirrorSelector mirrorSelector)Sets the mirror selector to use for repositories discovered in artifact descriptors.DefaultRepositorySystemSessionsetOffline(boolean offline)Controls whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.DefaultRepositorySystemSessionsetProxySelector(ProxySelector proxySelector)Sets the proxy selector to use for repositories discovered in artifact descriptors.voidsetReadOnly()Marks this session as read-only such that any future attempts to call its mutators will fail with an exception.DefaultRepositorySystemSessionsetRepositoryListener(RepositoryListener repositoryListener)Sets the listener being notified of actions in the repository system.DefaultRepositorySystemSessionsetResolutionErrorPolicy(ResolutionErrorPolicy resolutionErrorPolicy)Sets the policy which controls whether resolutions errors from remote repositories should be cached.DefaultRepositorySystemSessionsetSystemProperties(Map<?,?> systemProperties)Sets the system properties to use, e.g.DefaultRepositorySystemSessionsetSystemProperty(String key, String value)Sets the specified system property.DefaultRepositorySystemSessionsetTransferListener(TransferListener transferListener)Sets the listener being notified of uploads/downloads by the repository system.DefaultRepositorySystemSessionsetUpdatePolicy(String updatePolicy)Sets the global update policy.DefaultRepositorySystemSessionsetUserProperties(Map<?,?> userProperties)Sets the user properties to use, e.g.DefaultRepositorySystemSessionsetUserProperty(String key, String value)Sets the specified user property.DefaultRepositorySystemSessionsetVersionFilter(VersionFilter versionFilter)Sets the version filter to use for building dependency graphs.DefaultRepositorySystemSessionsetWorkspaceReader(WorkspaceReader workspaceReader)Sets the workspace reader used during this session.
-
-
-
Constructor Detail
-
DefaultRepositorySystemSession
public DefaultRepositorySystemSession()
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.
-
DefaultRepositorySystemSession
public DefaultRepositorySystemSession(RepositorySystemSession session)
Creates 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 benull.
-
-
Method Detail
-
isOffline
public boolean isOffline()
Description copied from interface:RepositorySystemSessionIndicates whether the repository system operates in offline mode and avoids/refuses any access to remote repositories.- Specified by:
isOfflinein interfaceRepositorySystemSession- Returns:
trueif the repository system is in offline mode,falseotherwise.
-
setOffline
public DefaultRepositorySystemSession setOffline(boolean offline)
Controls 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.
-
isIgnoreArtifactDescriptorRepositories
public boolean isIgnoreArtifactDescriptorRepositories()
Description 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 interfaceRepositorySystemSession- Returns:
trueif additional repositories from artifact descriptors are ignored,falseto merge those with the originally specified repositories.
-
setIgnoreArtifactDescriptorRepositories
public 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.
-
getResolutionErrorPolicy
public ResolutionErrorPolicy getResolutionErrorPolicy()
Description copied from interface:RepositorySystemSessionGets the policy which controls whether resolutions errors from remote repositories should be cached.- Specified by:
getResolutionErrorPolicyin interfaceRepositorySystemSession- Returns:
- The resolution error policy for this session or
nullif resolution errors should generally not be cached.
-
setResolutionErrorPolicy
public 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 benullif resolution errors should generally not be cached.- Returns:
- This session for chaining, never
null.
-
getArtifactDescriptorPolicy
public ArtifactDescriptorPolicy getArtifactDescriptorPolicy()
Description copied from interface:RepositorySystemSessionGets the policy which controls how errors related to reading artifact descriptors should be handled.- Specified by:
getArtifactDescriptorPolicyin interfaceRepositorySystemSession- Returns:
- The descriptor error policy for this session or
nullif descriptor errors should generally not be tolerated.
-
setArtifactDescriptorPolicy
public 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 benullif descriptor errors should generally not be tolerated.- Returns:
- This session for chaining, never
null.
-
getChecksumPolicy
public String getChecksumPolicy()
Description 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 interfaceRepositorySystemSession- 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
-
setChecksumPolicy
public DefaultRepositorySystemSession setChecksumPolicy(String checksumPolicy)
Sets 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 benull/empty to apply the per-repository policies.- Returns:
- This session for chaining, never
null. - See Also:
RepositoryPolicy.CHECKSUM_POLICY_FAIL,RepositoryPolicy.CHECKSUM_POLICY_IGNORE,RepositoryPolicy.CHECKSUM_POLICY_WARN
-
getUpdatePolicy
public String getUpdatePolicy()
Description copied from interface:RepositorySystemSessionGets the global update policy. If set, the global update policy overrides the update policies of the remote repositories being used for resolution.- Specified by:
getUpdatePolicyin interfaceRepositorySystemSession- 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
-
setUpdatePolicy
public DefaultRepositorySystemSession setUpdatePolicy(String updatePolicy)
Sets the global update policy. If set, the global update policy overrides the update policies of the remote repositories being used for resolution.- Parameters:
updatePolicy- The global update policy, may benull/empty to apply the per-repository policies.- Returns:
- This session for chaining, never
null. - See Also:
RepositoryPolicy.UPDATE_POLICY_ALWAYS,RepositoryPolicy.UPDATE_POLICY_DAILY,RepositoryPolicy.UPDATE_POLICY_NEVER
-
getLocalRepository
public LocalRepository getLocalRepository()
Description copied from interface:RepositorySystemSessionGets the local repository used during this session. This is a convenience method forLocalRepositoryManager.getRepository().- Specified by:
getLocalRepositoryin interfaceRepositorySystemSession- Returns:
- The local repository being during this session, never
null.
-
getLocalRepositoryManager
public LocalRepositoryManager getLocalRepositoryManager()
Description copied from interface:RepositorySystemSessionGets the local repository manager used during this session.- Specified by:
getLocalRepositoryManagerin interfaceRepositorySystemSession- Returns:
- The local repository manager used during this session, never
null.
-
setLocalRepositoryManager
public 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 benull.- Returns:
- This session for chaining, never
null.
-
getFileTransformerManager
public FileTransformerManager getFileTransformerManager()
Description copied from interface:RepositorySystemSessionGet the file transformer manager- Specified by:
getFileTransformerManagerin interfaceRepositorySystemSession- Returns:
- the manager, never
null
-
setFileTransformerManager
public DefaultRepositorySystemSession setFileTransformerManager(FileTransformerManager fileTransformerManager)
-
getWorkspaceReader
public WorkspaceReader getWorkspaceReader()
Description 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 interfaceRepositorySystemSession- Returns:
- The workspace reader for this session or
nullif none.
-
setWorkspaceReader
public DefaultRepositorySystemSession setWorkspaceReader(WorkspaceReader workspaceReader)
Sets 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 benullif none.- Returns:
- This session for chaining, never
null.
-
getRepositoryListener
public RepositoryListener getRepositoryListener()
Description copied from interface:RepositorySystemSessionGets the listener being notified of actions in the repository system.- Specified by:
getRepositoryListenerin interfaceRepositorySystemSession- Returns:
- The repository listener or
nullif none.
-
setRepositoryListener
public DefaultRepositorySystemSession setRepositoryListener(RepositoryListener repositoryListener)
Sets the listener being notified of actions in the repository system.- Parameters:
repositoryListener- The repository listener, may benullif none.- Returns:
- This session for chaining, never
null.
-
getTransferListener
public TransferListener getTransferListener()
Description copied from interface:RepositorySystemSessionGets the listener being notified of uploads/downloads by the repository system.- Specified by:
getTransferListenerin interfaceRepositorySystemSession- Returns:
- The transfer listener or
nullif none.
-
setTransferListener
public DefaultRepositorySystemSession setTransferListener(TransferListener transferListener)
Sets the listener being notified of uploads/downloads by the repository system.- Parameters:
transferListener- The transfer listener, may benullif none.- Returns:
- This session for chaining, never
null.
-
getSystemProperties
public Map<String,String> getSystemProperties()
Description 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 interfaceRepositorySystemSession- Returns:
- The (read-only) system properties, never
null.
-
setSystemProperties
public DefaultRepositorySystemSession setSystemProperties(Map<?,?> systemProperties)
Sets 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 benullor empty if none.- Returns:
- This session for chaining, never
null.
-
setSystemProperty
public DefaultRepositorySystemSession setSystemProperty(String key, String value)
Sets the specified system property.- Parameters:
key- The property key, must not benull.value- The property value, may benullto remove/unset the property.- Returns:
- This session for chaining, never
null.
-
getUserProperties
public Map<String,String> getUserProperties()
Description 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 interfaceRepositorySystemSession- Returns:
- The (read-only) user properties, never
null.
-
setUserProperties
public DefaultRepositorySystemSession setUserProperties(Map<?,?> userProperties)
Sets 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 benullor empty if none.- Returns:
- This session for chaining, never
null.
-
setUserProperty
public DefaultRepositorySystemSession setUserProperty(String key, String value)
Sets the specified user property.- Parameters:
key- The property key, must not benull.value- The property value, may benullto remove/unset the property.- Returns:
- This session for chaining, never
null.
-
getConfigProperties
public Map<String,Object> getConfigProperties()
Description 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 interfaceRepositorySystemSession- Returns:
- The (read-only) configuration properties, never
null. - See Also:
ConfigurationProperties
-
setConfigProperties
public DefaultRepositorySystemSession setConfigProperties(Map<?,?> configProperties)
Sets 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 benullor empty if none.- Returns:
- This session for chaining, never
null.
-
setConfigProperty
public DefaultRepositorySystemSession setConfigProperty(String key, Object value)
Sets the specified configuration property.- Parameters:
key- The property key, must not benull.value- The property value, may benullto remove/unset the property.- Returns:
- This session for chaining, never
null.
-
getMirrorSelector
public MirrorSelector getMirrorSelector()
Description 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 interfaceRepositorySystemSession- Returns:
- The mirror selector to use, never
null. - See Also:
RepositorySystem.newResolutionRepositories(RepositorySystemSession, java.util.List)
-
setMirrorSelector
public DefaultRepositorySystemSession setMirrorSelector(MirrorSelector mirrorSelector)
Sets 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 benull.- Returns:
- This session for chaining, never
null.
-
getProxySelector
public ProxySelector getProxySelector()
Description 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 interfaceRepositorySystemSession- Returns:
- The proxy selector to use, never
null. - See Also:
RemoteRepository.getProxy(),RepositorySystem.newResolutionRepositories(RepositorySystemSession, java.util.List)
-
setProxySelector
public DefaultRepositorySystemSession setProxySelector(ProxySelector proxySelector)
Sets 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 benull.- Returns:
- This session for chaining, never
null. - See Also:
RemoteRepository.getProxy()
-
getAuthenticationSelector
public AuthenticationSelector getAuthenticationSelector()
Description 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 interfaceRepositorySystemSession- Returns:
- The authentication selector to use, never
null. - See Also:
RemoteRepository.getAuthentication(),RepositorySystem.newResolutionRepositories(RepositorySystemSession, java.util.List)
-
setAuthenticationSelector
public 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 benull.- Returns:
- This session for chaining, never
null. - See Also:
RemoteRepository.getAuthentication()
-
getArtifactTypeRegistry
public ArtifactTypeRegistry getArtifactTypeRegistry()
Description copied from interface:RepositorySystemSessionGets the registry of artifact types recognized by this session, for instance when processing artifact descriptors.- Specified by:
getArtifactTypeRegistryin interfaceRepositorySystemSession- Returns:
- The artifact type registry, never
null.
-
setArtifactTypeRegistry
public DefaultRepositorySystemSession setArtifactTypeRegistry(ArtifactTypeRegistry artifactTypeRegistry)
Sets the registry of artifact types recognized by this session.- Parameters:
artifactTypeRegistry- The artifact type registry, may benull.- Returns:
- This session for chaining, never
null.
-
getDependencyTraverser
public DependencyTraverser getDependencyTraverser()
Description copied from interface:RepositorySystemSessionGets the dependency traverser to use for building dependency graphs.- Specified by:
getDependencyTraverserin interfaceRepositorySystemSession- Returns:
- The dependency traverser to use for building dependency graphs or
nullif dependencies are unconditionally traversed.
-
setDependencyTraverser
public 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 benull.- Returns:
- This session for chaining, never
null.
-
getDependencyManager
public DependencyManager getDependencyManager()
Description copied from interface:RepositorySystemSessionGets the dependency manager to use for building dependency graphs.- Specified by:
getDependencyManagerin interfaceRepositorySystemSession- Returns:
- The dependency manager to use for building dependency graphs or
nullif dependency management is not performed.
-
setDependencyManager
public DefaultRepositorySystemSession setDependencyManager(DependencyManager dependencyManager)
Sets the dependency manager to use for building dependency graphs.- Parameters:
dependencyManager- The dependency manager to use for building dependency graphs, may benull.- Returns:
- This session for chaining, never
null.
-
getDependencySelector
public DependencySelector getDependencySelector()
Description copied from interface:RepositorySystemSessionGets the dependency selector to use for building dependency graphs.- Specified by:
getDependencySelectorin interfaceRepositorySystemSession- Returns:
- The dependency selector to use for building dependency graphs or
nullif dependencies are unconditionally included.
-
setDependencySelector
public DefaultRepositorySystemSession setDependencySelector(DependencySelector dependencySelector)
Sets the dependency selector to use for building dependency graphs.- Parameters:
dependencySelector- The dependency selector to use for building dependency graphs, may benull.- Returns:
- This session for chaining, never
null.
-
getVersionFilter
public VersionFilter getVersionFilter()
Description copied from interface:RepositorySystemSessionGets the version filter to use for building dependency graphs.- Specified by:
getVersionFilterin interfaceRepositorySystemSession- Returns:
- The version filter to use for building dependency graphs or
nullif versions aren't filtered.
-
setVersionFilter
public DefaultRepositorySystemSession setVersionFilter(VersionFilter versionFilter)
Sets the version filter to use for building dependency graphs.- Parameters:
versionFilter- The version filter to use for building dependency graphs, may benullto not filter versions.- Returns:
- This session for chaining, never
null.
-
getDependencyGraphTransformer
public DependencyGraphTransformer getDependencyGraphTransformer()
Description copied from interface:RepositorySystemSessionGets the dependency graph transformer to use for building dependency graphs.- Specified by:
getDependencyGraphTransformerin interfaceRepositorySystemSession- Returns:
- The dependency graph transformer to use for building dependency graphs or
nullif none.
-
setDependencyGraphTransformer
public 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 benull.- Returns:
- This session for chaining, never
null.
-
getData
public SessionData getData()
Description copied from interface:RepositorySystemSessionGets the custom data associated with this session.- Specified by:
getDatain interfaceRepositorySystemSession- Returns:
- The session data, never
null.
-
setData
public DefaultRepositorySystemSession setData(SessionData data)
Sets the custom data associated with this session.- Parameters:
data- The session data, may benull.- Returns:
- This session for chaining, never
null.
-
getCache
public RepositoryCache getCache()
Description copied from interface:RepositorySystemSessionGets the cache the repository system may use to save data for future reuse during the session.- Specified by:
getCachein interfaceRepositorySystemSession- Returns:
- The repository cache or
nullif none.
-
setCache
public DefaultRepositorySystemSession setCache(RepositoryCache cache)
Sets the cache the repository system may use to save data for future reuse during the session.- Parameters:
cache- The repository cache, may benullif none.- Returns:
- This session for chaining, never
null.
-
setReadOnly
public void setReadOnly()
Marks 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.
-
-