public class WebDAO
extends java.lang.Object
Constructor and Description |
---|
WebDAO() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getLatestVersionNumberFromRemoteRepo(java.net.URL remoteVersionXMLFileLocation)
Fetches the latest maven deployed version from a maven built repository.
|
static java.net.URL |
getUrlOfZippedVersion(java.net.URL repoURL,
java.lang.String suffix,
boolean returnAlternateArchives)
Gets the first zip file from an url, in case of a maven repo deploy this
should be the only zip in the folder.
|
static boolean |
newVersionReleased(MavenJarFile jarFile,
java.net.URL jarRepository)
Returns true if a new version is available.
|
public static java.lang.String getLatestVersionNumberFromRemoteRepo(java.net.URL remoteVersionXMLFileLocation) throws javax.xml.stream.XMLStreamException, java.io.IOException
remoteVersionXMLFileLocation
- javax.xml.stream.XMLStreamException
java.io.IOException
public static java.net.URL getUrlOfZippedVersion(java.net.URL repoURL, java.lang.String suffix, boolean returnAlternateArchives) throws java.net.MalformedURLException, java.io.IOException
repoURL
- the URL to get the zip fromsuffix
- what file extension should be looked forreturnAlternateArchives
- if the requested file extension isn't
found, return the first .zip/tar.gz foundjava.net.MalformedURLException
- if the url of the zip could not be foundjava.io.IOException
- if the stream to the webpage could not be readpublic static boolean newVersionReleased(MavenJarFile jarFile, java.net.URL jarRepository) throws java.io.IOException, javax.xml.stream.XMLStreamException
jarFile
- the maven jar filejarRepository
- the repositoryjava.io.IOException
javax.xml.stream.XMLStreamException
Copyright © 2013. All Rights Reserved.