|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.common.UpdateUtils
public class UpdateUtils
UpdateUtils provides updateFileFromUrl(String, String)
to GET a file from remote URL and store it to a file.
This utility will provide locks and synchronization to prevent two threads or jvms from overwriting the destination
file at the same time, and will use last modification time from the source URL to skip URL acquisition based on file
modification time.
Nested Class Summary | |
---|---|
static class |
UpdateUtils.UpdateException
An exception caused by the UpdateUtils methods. |
Constructor Summary | |
---|---|
UpdateUtils()
|
Method Summary | |
---|---|
static void |
update(FileUpdater updater,
java.io.File destFile)
Update a destination file with an updater implementation, while maintaining appropriate locks around the action and file |
static void |
updateFileFromFile(java.io.File sourceFile,
java.lang.String destinationFilePath)
Get the source URL and store it to a destination file path |
static void |
updateFileFromInputStream(java.io.InputStream input,
java.lang.String destinationFilePath)
Get the source URL and store it to a destination file path |
static void |
updateFileFromUrl(java.lang.String sourceUrl,
java.lang.String destinationFilePath)
Get the source URL and store it to a destination file path |
static void |
updateFileFromUrl(java.lang.String sourceUrl,
java.lang.String destinationFilePath,
java.lang.String username,
java.lang.String password)
Get the source URL and store it to a destination file path |
static void |
updateFileFromUrl(java.lang.String sourceUrl,
java.lang.String destinationFilePath,
java.lang.String username,
java.lang.String password,
URLFileUpdaterFactory factory)
Get the source URL and store it to a destination file path |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UpdateUtils()
Method Detail |
---|
public static void updateFileFromUrl(java.lang.String sourceUrl, java.lang.String destinationFilePath) throws UpdateUtils.UpdateException
sourceUrl
- destinationFilePath
-
UpdateUtils.UpdateException
public static void updateFileFromFile(java.io.File sourceFile, java.lang.String destinationFilePath) throws UpdateUtils.UpdateException
sourceUrl
- destinationFilePath
-
UpdateUtils.UpdateException
public static void updateFileFromInputStream(java.io.InputStream input, java.lang.String destinationFilePath) throws UpdateUtils.UpdateException
sourceUrl
- destinationFilePath
-
UpdateUtils.UpdateException
public static void updateFileFromUrl(java.lang.String sourceUrl, java.lang.String destinationFilePath, java.lang.String username, java.lang.String password) throws UpdateUtils.UpdateException
sourceUrl
- destinationFilePath
- username
- password
-
UpdateUtils.UpdateException
public static void updateFileFromUrl(java.lang.String sourceUrl, java.lang.String destinationFilePath, java.lang.String username, java.lang.String password, URLFileUpdaterFactory factory) throws UpdateUtils.UpdateException
sourceUrl
- destinationFilePath
- username
- password
-
UpdateUtils.UpdateException
public static void update(FileUpdater updater, java.io.File destFile) throws UpdateUtils.UpdateException
UpdateUtils.UpdateException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |