org.nuiton.license.plugin.repository
Class LicenseRepository
java.lang.Object
org.nuiton.license.plugin.repository.LicenseRepository
public class LicenseRepository
- extends java.lang.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 java.lang.String REPOSITORY_DEFINITION_FILE
- See Also:
- Constant Field Values
baseURL
protected java.net.URL baseURL
- the base url of the licenses repository
next
protected LicenseRepository next
- next repository (can be
null).
definitions
protected java.util.List<LicenseDefinition> definitions
cache
protected final java.util.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 java.net.URL getBaseURL()
setBaseURL
public void setBaseURL(java.net.URL baseURL)
appendRepository
public LicenseRepository appendRepository(LicenseRepository next)
reload
public void reload()
throws java.io.IOException
- Throws:
java.io.IOException
load
public void load()
throws java.io.IOException
- Throws:
java.io.IOException
getAllDefinitions
public java.util.List<LicenseDefinition> getAllDefinitions()
getDefinitions
public java.util.List<LicenseDefinition> getDefinitions()
getDefinition
public LicenseDefinition getDefinition(java.lang.String licenseName)
getLicense
public License getLicense(java.lang.String licenseName)
throws java.io.IOException
- Throws:
java.io.IOException
getUrl
public static java.net.URL getUrl(java.net.URL baseUrl,
java.lang.String suffix)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getLastRepository
protected LicenseRepository getLastRepository()
getAllRepositories
protected LicenseRepository[] getAllRepositories()
checkExists
protected boolean checkExists(java.net.URL url)
throws java.io.IOException
- Throws:
java.io.IOException
checkNotInit
protected void checkNotInit()
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
checkInit
protected void checkInit()
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
Copyright © 2008-2009 CodeLutin. All Rights Reserved.