|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knuth.chkupdate.Provider
org.knuth.chkupdate.provider.SourceForgeProvider
public class SourceForgeProvider
A Provider which checks for a new version on SourceForge.
This Provider is marked "deprecated" because the SourceForge-API used to retrieve informations is "unmaintained". However, this Provider should work probably.
Field Summary | |
---|---|
private java.lang.String |
BASE_URL
Deprecated. The Base of the Request-URL |
private java.lang.String |
DATE_PATTERN
Deprecated. Pattern used to parse the returned Date |
private java.lang.String |
GET_PROJECT_ID
Deprecated. URL-Part to request the Project-ID |
private java.lang.String |
GET_RELEASES
Deprecated. URL-Part to request the Release-list |
private int |
project_id
Deprecated. The Projects ID on SourceForge |
private java.lang.String |
project_name
Deprecated. The Projects name on SourceForge |
Constructor Summary | |
---|---|
SourceForgeProvider(int project_id)
Deprecated. Creates a new Provider for SourceForge |
|
SourceForgeProvider(java.lang.String project_name)
Deprecated. Creates a new Provider for SourceForge This constructor first querys the SourceForge-API to get the projects ID. |
Method Summary | |
---|---|
private java.net.URL |
createFileReleaseUrl()
Deprecated. Creates the request-URL to get the Projects latest file-releases. |
private java.net.URL |
createGetIdUrl()
Deprecated. Creates the request-URL to get the Projects ID. |
UpdateResult |
doCheck()
Deprecated. Performs the Update-Check. |
java.lang.String |
getName()
Deprecated. Returns the Name of the Service used by this Provider |
private int |
getProjectID(java.lang.String project_name)
Deprecated. Querys the SourceForge API to get the Projects ID from it's name. |
private java.util.Date |
latestFileRelease()
Deprecated. Querys the SourceForge API to get the Date of the latest added file. |
private int |
parseProjectID(java.lang.String json)
Deprecated. Parses the APIs JSON-Response to get the Projects ID (called by getProjectID(String) ). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String BASE_URL
private final java.lang.String GET_PROJECT_ID
private final java.lang.String GET_RELEASES
private final java.lang.String DATE_PATTERN
private java.lang.String project_name
private int project_id
Constructor Detail |
---|
public SourceForgeProvider(java.lang.String project_name)
project_name
- The name of the Project on
SourceForge.public SourceForgeProvider(int project_id)
project_id
- The Projects ID on SourceForge.Method Detail |
---|
public UpdateResult doCheck() throws UpdateRequestException, UpdateResponseException
Provider
doCheck
in class Provider
UpdateRequestException
- Thrown when
there was a problem requesting informations
from the Provider.
UpdateResponseException
- Thrown when
there was a problem parsing the response
from the Provider.private java.util.Date latestFileRelease() throws UpdateRequestException, UpdateResponseException
UpdateRequestException
- Thrown when the
SourceForge-API could not be reached.
UpdateResponseException
- Thrown when the
APIs response could not be parsed.private int getProjectID(java.lang.String project_name) throws UpdateRequestException
project_name
- The projects name on
SourceForge.
UpdateRequestException
- Thrown when the
SourceForge-API could not be reached.private int parseProjectID(java.lang.String json) throws UpdateRequestException
getProjectID(String)
).
json
- The JSON-String.
UpdateRequestException
- Thrown when
SourceForge API could not be reached.getProjectID(String)
private java.net.URL createFileReleaseUrl() throws java.net.MalformedURLException
java.net.MalformedURLException
- Thrown when the
URL could not be created.private java.net.URL createGetIdUrl() throws java.net.MalformedURLException
java.net.MalformedURLException
- Thrown when the
URL could not be created.public java.lang.String getName()
Provider
getName
in class Provider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |