org.apache.maven.plugin.internal
Class DefaultLegacySupport

java.lang.Object
  extended by org.apache.maven.plugin.internal.DefaultLegacySupport
All Implemented Interfaces:
LegacySupport

@Component(role=LegacySupport.class)
public class DefaultLegacySupport
extends Object
implements LegacySupport

Helps to provide backward-compatibility with plugins that use legacy components. Warning: This is an internal utility component that is only public for technical reasons, it is not part of the public API. In particular, this component can be changed or deleted without prior notice.

Since:
3.0
Author:
Benjamin Bentmann

Constructor Summary
DefaultLegacySupport()
           
 
Method Summary
 org.sonatype.aether.RepositorySystemSession getRepositorySession()
          Gets the currently active repository session.
 MavenSession getSession()
          Gets the currently active session.
 void setSession(MavenSession session)
          Sets the currently active session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLegacySupport

public DefaultLegacySupport()
Method Detail

setSession

public void setSession(MavenSession session)
Description copied from interface: LegacySupport
Sets the currently active session. Some legacy components are basically stateful and their API is missing parameters that would be required to delegate to a stateless component. Saving the session (in a thread-local variable) is our best effort to record any state that is required to enable proper delegation.

Specified by:
setSession in interface LegacySupport
Parameters:
session - The currently active session, may be null.

getSession

public MavenSession getSession()
Description copied from interface: LegacySupport
Gets the currently active session.

Specified by:
getSession in interface LegacySupport
Returns:
The currently active session or null if none.

getRepositorySession

public org.sonatype.aether.RepositorySystemSession getRepositorySession()
Description copied from interface: LegacySupport
Gets the currently active repository session.

Specified by:
getRepositorySession in interface LegacySupport
Returns:
The currently active repository session or null if none.


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.