org.codehaus.mojo.license
Class AbstractLicenseNameMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.license.AbstractLicenseMojo
          extended by org.codehaus.mojo.license.AbstractLicenseNameMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
UpdateFileHeaderMojo, UpdateProjectLicenseMojo

public abstract class AbstractLicenseNameMojo
extends AbstractLicenseMojo

Abstract mojo which using a licenseName and owns a licenseStore.

Since:
1.0
Author:
tchemit

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractLicenseNameMojo()
           
 
Method Summary
protected  boolean checkSkip()
          Checks if the mojo execution should be skipped.
 License getLicense()
           
 License getLicense(String licenseName, boolean checkIfExists)
           
 String getLicenseName()
           
 String getLicenseResolver()
           
 LicenseStore getLicenseStore()
           
protected  void init()
          Method to initialize the mojo before doing any concrete actions.
 boolean isKeepBackup()
           
abstract  boolean isSkip()
          When is sets to true, will skip execution.
 void setKeepBackup(boolean keepBackup)
           
 void setLicenseName(String licenseName)
           
 void setLicenseResolver(String licenseResolver)
           
 void setLicenseStore(LicenseStore licenseStore)
           
abstract  void setSkip(boolean skip)
          Changes internal state skip to execute (or not) goal.
 
Methods inherited from class org.codehaus.mojo.license.AbstractLicenseMojo
acceptPackaging, addResourceDir, afterExecute, checkEncoding, checkPackaging, doAction, execute, getBuildTimestamp, getEncoding, getProject, getSession, hasClassPath, isVerbose, rejectPackaging, setEncoding, setProject, setSession, setVerbose
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLicenseNameMojo

public AbstractLicenseNameMojo()
Method Detail

isSkip

public abstract boolean isSkip()
When is sets to true, will skip execution.

This will take effects in method checkSkip(). So the method AbstractLicenseMojo.doAction() will never be invoked.

Returns:
true if goal will not be executed

setSkip

public abstract void setSkip(boolean skip)
Changes internal state skip to execute (or not) goal.

Parameters:
skip - new state value

checkSkip

protected boolean checkSkip()
Description copied from class: AbstractLicenseMojo
Checks if the mojo execution should be skipped.

Overrides:
checkSkip in class AbstractLicenseMojo
Returns:
false if the mojo should not be executed.

init

protected void init()
             throws Exception
Description copied from class: AbstractLicenseMojo
Method to initialize the mojo before doing any concrete actions.

Note: The method is invoked before the AbstractLicenseMojo.doAction() method.

Specified by:
init in class AbstractLicenseMojo
Throws:
Exception - if any

getLicense

public License getLicense(String licenseName,
                          boolean checkIfExists)
                   throws IllegalArgumentException,
                          IllegalStateException
Throws:
IllegalArgumentException
IllegalStateException

isKeepBackup

public boolean isKeepBackup()

getLicenseName

public String getLicenseName()

getLicenseResolver

public String getLicenseResolver()

getLicenseStore

public LicenseStore getLicenseStore()

getLicense

public License getLicense()

setKeepBackup

public void setKeepBackup(boolean keepBackup)

setLicenseResolver

public void setLicenseResolver(String licenseResolver)

setLicenseName

public void setLicenseName(String licenseName)

setLicenseStore

public void setLicenseStore(LicenseStore licenseStore)


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