org.codehaus.mojo.pomtools
Class PomToolsPluginContext
java.lang.Object
org.codehaus.mojo.pomtools.wrapper.modify.AbstractModifiableObject
org.codehaus.mojo.pomtools.PomToolsPluginContext
- All Implemented Interfaces:
- Modifiable
public class PomToolsPluginContext
- extends AbstractModifiableObject
- Version:
- $Id: PomToolsPluginContext.java 2166 2006-07-18 21:32:16Z carlos $
- Author:
- David Hawkins
Constructor Summary |
PomToolsPluginContext(org.apache.maven.execution.MavenSession session,
java.util.List remoteArtifactRepositories,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
PomToolsConfig config,
boolean showUnparsedVersions,
org.apache.maven.plugin.logging.Log log)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PomToolsPluginContext
public PomToolsPluginContext(org.apache.maven.execution.MavenSession session,
java.util.List remoteArtifactRepositories,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
PomToolsConfig config,
boolean showUnparsedVersions,
org.apache.maven.plugin.logging.Log log)
throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
getInstance
public static PomToolsPluginContext getInstance()
- Returns the ThreadLocal instance of PomToolsPluginContext. You must
call
setInstance(PomToolsPluginContext)
before calling this function.
- Throws:
java.lang.IllegalStateException
- if the current connection is not set
setInstance
public static void setInstance(PomToolsPluginContext ctx)
- Sets the ThreadLocal PomToolsPluginContext instance. See
#getCurrent
for more information.
hasCurrent
public static boolean hasCurrent()
getFieldConfiguration
public FieldConfiguration getFieldConfiguration(java.lang.String fieldName)
getMetadataHelper
public MetadataHelper getMetadataHelper()
getLog
public org.apache.maven.plugin.logging.Log getLog()
getProjects
public java.util.List getProjects()
getActiveProject
public ProjectWrapper getActiveProject()
setActiveProjectIndex
public void setActiveProjectIndex(int index)
isShowUnparsedVersions
public boolean isShowUnparsedVersions()
saveAllProjects
public java.util.List saveAllProjects()
throws PomToolsException,
org.apache.maven.project.ProjectBuildingException
- Saves all projects if they pass the model validation.
- Returns:
- A List of
ProjectValidationResult
- Throws:
PomToolsException
org.apache.maven.project.ProjectBuildingException
revertAllProjects
public java.util.List revertAllProjects()
throws PomToolsException
- Reverts all projects to their unmodified state.
- Returns:
- A List of
ProjectWrapper
that were reverted
- Throws:
PomToolsException
getSession
public org.apache.maven.execution.MavenSession getSession()
Copyright © 2010 The Codehaus. All Rights Reserved.