org.codehaus.mojo.license.model
Class LicenseStore

java.lang.Object
  extended by org.codehaus.mojo.license.model.LicenseStore
All Implemented Interfaces:
Iterable<LicenseRepository>

public class LicenseStore
extends Object
implements Iterable<LicenseRepository>

The LicenseStore offers License coming from different LicenseRepository.

Since:
1.0
Author:
tchemit

Field Summary
protected  boolean init
          flag to know if store was init
static String JAR_LICENSE_REPOSITORY
          class-path directory where is the licenses repository
protected  List<LicenseRepository> repositories
          list of available license repositories
 
Constructor Summary
LicenseStore()
           
 
Method Summary
 void addJarRepository()
           
protected  void addRepository(LicenseRepository repository)
           
 void addRepository(String extraResolver)
           
 void addRepository(URL baseURL)
           
protected  void checkInit(String operation)
           
protected  void checkNotInit(String operation)
           
static LicenseStore createLicenseStore(org.apache.maven.plugin.logging.Log log, String... extraResolver)
           
 License getLicense(String licenseName)
           
 String[] getLicenseNames()
           
 License[] getLicenses()
           
 List<LicenseRepository> getRepositories()
           
 void init()
           
 Iterator<LicenseRepository> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAR_LICENSE_REPOSITORY

public static final String JAR_LICENSE_REPOSITORY
class-path directory where is the licenses repository

See Also:
Constant Field Values

repositories

protected List<LicenseRepository> repositories
list of available license repositories


init

protected boolean init
flag to know if store was init

Constructor Detail

LicenseStore

public LicenseStore()
Method Detail

createLicenseStore

public static LicenseStore createLicenseStore(org.apache.maven.plugin.logging.Log log,
                                              String... extraResolver)
                                       throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

init

public void init()
          throws IOException
Throws:
IOException

getRepositories

public List<LicenseRepository> getRepositories()

getLicenseNames

public String[] getLicenseNames()

getLicenses

public License[] getLicenses()

getLicense

public License getLicense(String licenseName)

addRepository

public void addRepository(String extraResolver)
                   throws IOException
Throws:
IOException

addRepository

public void addRepository(URL baseURL)
                   throws IOException
Throws:
IOException

addJarRepository

public void addJarRepository()
                      throws IOException
Throws:
IOException

iterator

public Iterator<LicenseRepository> iterator()
Specified by:
iterator in interface Iterable<LicenseRepository>

addRepository

protected void addRepository(LicenseRepository repository)

checkInit

protected void checkInit(String operation)
                  throws IllegalStateException
Throws:
IllegalStateException

checkNotInit

protected void checkNotInit(String operation)
                     throws IllegalStateException
Throws:
IllegalStateException


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