org.codehaus.mojo.license.model
Class LicenseRepository

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

public class LicenseRepository
extends Object
implements Iterable<License>

Since:
1.0
Author:
tchemit

Field Summary
protected  URL baseURL
          the base url of the licenses repository
protected  boolean init
          flag to known if repository was init (pass to true when invoking the method load()).
static Pattern LICENSE_DESCRIPTION_PATTERN
           
protected  List<License> licenses
          licenses of this repository
static String REPOSITORY_DEFINITION_FILE
           
 
Constructor Summary
LicenseRepository()
           
 
Method Summary
protected  boolean checkExists(URL url)
           
protected  void checkInit(String operation)
           
protected  void checkNotInit(String operation)
           
 URL getBaseURL()
           
 License getLicense(String licenseName)
           
 String[] getLicenseNames()
           
 License[] getLicenses()
           
 Iterator<License> iterator()
           
 void load()
           
 void setBaseURL(URL baseURL)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPOSITORY_DEFINITION_FILE

public static final String REPOSITORY_DEFINITION_FILE
See Also:
Constant Field Values

LICENSE_DESCRIPTION_PATTERN

public static final Pattern LICENSE_DESCRIPTION_PATTERN

baseURL

protected URL baseURL
the base url of the licenses repository


licenses

protected List<License> licenses
licenses of this repository


init

protected boolean init
flag to known if repository was init (pass to true when invoking the method load()).

Constructor Detail

LicenseRepository

public LicenseRepository()
Method Detail

getBaseURL

public URL getBaseURL()

setBaseURL

public void setBaseURL(URL baseURL)

load

public void load()
          throws IOException
Throws:
IOException

getLicenseNames

public String[] getLicenseNames()

getLicenses

public License[] getLicenses()

getLicense

public License getLicense(String licenseName)

iterator

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

checkExists

protected boolean checkExists(URL url)
                       throws IOException
Throws:
IOException

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.