org.nuiton.license.plugin.repository
Class LicenseRepository
java.lang.Object
org.nuiton.license.plugin.repository.LicenseRepository
public class LicenseRepository
- extends Object
- Since:
- 1.0.3
- Author:
- chemit
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REPOSITORY_DEFINITION_FILE
public static final String REPOSITORY_DEFINITION_FILE
- See Also:
- Constant Field Values
baseURL
protected URL baseURL
- the base url of the licenses repository
next
protected LicenseRepository next
- next repository (can be
null).
definitions
protected List<LicenseDefinition> definitions
cache
protected final Map<LicenseDefinition,License> cache
init
protected boolean init
- flag to known if repository was init (pass to
true
when invoking the method load()).
LicenseRepository
public LicenseRepository()
getBaseURL
public URL getBaseURL()
setBaseURL
public void setBaseURL(URL baseURL)
appendRepository
public LicenseRepository appendRepository(LicenseRepository next)
reload
public void reload()
throws IOException
- Throws:
IOException
load
public void load()
throws IOException
- Throws:
IOException
getAllDefinitions
public List<LicenseDefinition> getAllDefinitions()
getDefinitions
public List<LicenseDefinition> getDefinitions()
getDefinition
public LicenseDefinition getDefinition(String licenseName)
getLicense
public License getLicense(String licenseName)
throws IOException
- Throws:
IOException
getUrl
public static URL getUrl(URL baseUrl,
String suffix)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getLastRepository
protected LicenseRepository getLastRepository()
getAllRepositories
protected LicenseRepository[] getAllRepositories()
checkExists
protected boolean checkExists(URL url)
throws IOException
- Throws:
IOException
checkNotInit
protected void checkNotInit()
throws IllegalStateException
- Throws:
IllegalStateException
checkInit
protected void checkInit()
throws IllegalStateException
- Throws:
IllegalStateException
Copyright © 2008-2010 CodeLutin. All Rights Reserved.