|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.maven.wagon.AbstractWagon
public abstract class AbstractWagon
An abstract implementation of the Wagon interface. This implementation manages listener and other common behaviors.
Field Summary |
---|
Fields inherited from interface org.apache.maven.wagon.Wagon |
---|
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE |
Constructor Summary | |
---|---|
protected |
AbstractWagon(boolean supportsDirectoryCopy)
|
Method Summary | |
---|---|
void |
addSessionListener(org.apache.maven.wagon.events.SessionListener listener)
|
void |
addTransferListener(org.apache.maven.wagon.events.TransferListener listener)
|
void |
connect(org.apache.maven.wagon.repository.Repository source)
|
void |
connect(org.apache.maven.wagon.repository.Repository source,
org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo)
|
void |
connect(org.apache.maven.wagon.repository.Repository source,
org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo,
org.apache.maven.wagon.proxy.ProxyInfo proxyInfo)
|
void |
connect(org.apache.maven.wagon.repository.Repository source,
org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo,
org.apache.maven.wagon.proxy.ProxyInfoProvider proxyInfoProvider)
|
void |
connect(org.apache.maven.wagon.repository.Repository source,
org.apache.maven.wagon.proxy.ProxyInfo proxyInfo)
|
void |
connect(org.apache.maven.wagon.repository.Repository source,
org.apache.maven.wagon.proxy.ProxyInfoProvider proxyInfoProvider)
|
protected abstract void |
connectToRepository(org.apache.maven.wagon.repository.Repository source,
org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo,
org.apache.maven.wagon.proxy.ProxyInfo proxyInfo)
Subclass must implement with specific connection behavior |
void |
disconnect()
|
protected abstract void |
disconnectFromRepository()
Subclasses must implement with specific disconnection behavior |
protected void |
doConnect(org.apache.maven.wagon.repository.Repository source,
org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo,
org.apache.maven.wagon.proxy.ProxyInfo proxyInfo)
|
protected abstract boolean |
doesRemoteResourceExist(String resourceName)
Subclass must implement with specific detection behavior |
protected String |
encodeUTF8(String s)
|
void |
get(String resourceName,
File destination)
|
List<String> |
getFileList(String destinationDirectory)
|
boolean |
getIfNewer(String resourceName,
File destination,
long timestamp)
|
protected PutFileContext |
getPutFileContext(File source,
String destination)
|
protected List<PutFileContext> |
getPutFileContexts(File sourceDirectory,
String destinationDirectory)
|
org.apache.maven.wagon.repository.Repository |
getRepository()
|
protected abstract void |
getResource(String resourceName,
File destination,
org.kuali.maven.wagon.TransferProgress progress)
Subclass must implement with specific get behavior |
protected org.kuali.maven.wagon.SessionListenerSupport |
getSessionListeners()
|
int |
getTimeout()
|
protected org.kuali.maven.wagon.TransferListenerSupport |
getTransferListeners()
|
protected void |
handleException(Exception e,
PutFileContext context)
|
boolean |
hasSessionListener(org.apache.maven.wagon.events.SessionListener listener)
|
boolean |
hasTransferListener(org.apache.maven.wagon.events.TransferListener listener)
|
boolean |
isInteractive()
|
protected abstract boolean |
isRemoteResourceNewer(String resourceName,
long timestamp)
Subclass must implement with newer detection behavior |
protected abstract List<String> |
listDirectory(String directory)
Subclass must implement with specific directory listing behavior |
void |
openConnection()
|
void |
put(File source,
String destination)
|
protected abstract void |
putResource(File source,
String destination,
org.kuali.maven.wagon.TransferProgress progress)
Subclasses must implement with specific put behavior |
void |
removeSessionListener(org.apache.maven.wagon.events.SessionListener listener)
|
void |
removeTransferListener(org.apache.maven.wagon.events.TransferListener listener)
|
boolean |
resourceExists(String resourceName)
|
void |
setInteractive(boolean interactive)
|
void |
setTimeout(int timeoutValue)
|
boolean |
supportsDirectoryCopy()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.maven.wagon.Wagon |
---|
getReadTimeout, putDirectory, setReadTimeout |
Constructor Detail |
---|
protected AbstractWagon(boolean supportsDirectoryCopy)
Method Detail |
---|
public final void addSessionListener(org.apache.maven.wagon.events.SessionListener listener)
addSessionListener
in interface org.apache.maven.wagon.Wagon
protected final org.kuali.maven.wagon.SessionListenerSupport getSessionListeners()
public final boolean hasSessionListener(org.apache.maven.wagon.events.SessionListener listener)
hasSessionListener
in interface org.apache.maven.wagon.Wagon
public final void removeSessionListener(org.apache.maven.wagon.events.SessionListener listener)
removeSessionListener
in interface org.apache.maven.wagon.Wagon
public final void addTransferListener(org.apache.maven.wagon.events.TransferListener listener)
addTransferListener
in interface org.apache.maven.wagon.Wagon
protected final org.kuali.maven.wagon.TransferListenerSupport getTransferListeners()
public final boolean hasTransferListener(org.apache.maven.wagon.events.TransferListener listener)
hasTransferListener
in interface org.apache.maven.wagon.Wagon
public final void removeTransferListener(org.apache.maven.wagon.events.TransferListener listener)
removeTransferListener
in interface org.apache.maven.wagon.Wagon
public final org.apache.maven.wagon.repository.Repository getRepository()
getRepository
in interface org.apache.maven.wagon.Wagon
public final boolean isInteractive()
isInteractive
in interface org.apache.maven.wagon.Wagon
public final void setInteractive(boolean interactive)
setInteractive
in interface org.apache.maven.wagon.Wagon
public final void connect(org.apache.maven.wagon.repository.Repository source) throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
connect
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
public final void connect(org.apache.maven.wagon.repository.Repository source, org.apache.maven.wagon.proxy.ProxyInfo proxyInfo) throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
connect
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
public final void connect(org.apache.maven.wagon.repository.Repository source, org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo) throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
connect
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
protected void doConnect(org.apache.maven.wagon.repository.Repository source, org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo, org.apache.maven.wagon.proxy.ProxyInfo proxyInfo) throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
public final void connect(org.apache.maven.wagon.repository.Repository source, org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo, org.apache.maven.wagon.proxy.ProxyInfo proxyInfo) throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
connect
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
public final void disconnect() throws org.apache.maven.wagon.ConnectionException
disconnect
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.ConnectionException
public final void get(String resourceName, File destination) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.ResourceDoesNotExistException, org.apache.maven.wagon.authorization.AuthorizationException
get
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.ResourceDoesNotExistException
org.apache.maven.wagon.authorization.AuthorizationException
public final List<String> getFileList(String destinationDirectory) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.ResourceDoesNotExistException, org.apache.maven.wagon.authorization.AuthorizationException
getFileList
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.ResourceDoesNotExistException
org.apache.maven.wagon.authorization.AuthorizationException
public final boolean getIfNewer(String resourceName, File destination, long timestamp) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.ResourceDoesNotExistException, org.apache.maven.wagon.authorization.AuthorizationException
getIfNewer
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.ResourceDoesNotExistException
org.apache.maven.wagon.authorization.AuthorizationException
public final void openConnection() throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
openConnection
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
protected PutFileContext getPutFileContext(File source, String destination)
public final void put(File source, String destination) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.ResourceDoesNotExistException, org.apache.maven.wagon.authorization.AuthorizationException
put
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.ResourceDoesNotExistException
org.apache.maven.wagon.authorization.AuthorizationException
protected void handleException(Exception e, PutFileContext context) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.ResourceDoesNotExistException, org.apache.maven.wagon.authorization.AuthorizationException
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.ResourceDoesNotExistException
org.apache.maven.wagon.authorization.AuthorizationException
protected List<PutFileContext> getPutFileContexts(File sourceDirectory, String destinationDirectory)
protected String encodeUTF8(String s)
public final boolean resourceExists(String resourceName) throws org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.authorization.AuthorizationException
resourceExists
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.authorization.AuthorizationException
public final boolean supportsDirectoryCopy()
supportsDirectoryCopy
in interface org.apache.maven.wagon.Wagon
protected abstract void connectToRepository(org.apache.maven.wagon.repository.Repository source, org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo, org.apache.maven.wagon.proxy.ProxyInfo proxyInfo) throws Exception
source
- The repository connection informationauthenticationInfo
- Authentication information, if anyproxyInfo
- Proxy information, if any
Exception
- Implementations can throw any exception and it will be handled by the base classprotected abstract boolean doesRemoteResourceExist(String resourceName) throws Exception
resourceName
- The remote resource to detect
Exception
- Implementations can throw any exception and it will be handled by the base classprotected abstract void disconnectFromRepository() throws Exception
Exception
- Implementations can throw any exception and it will be handled by the base classprotected abstract void getResource(String resourceName, File destination, org.kuali.maven.wagon.TransferProgress progress) throws Exception
resourceName
- The name of the remote resource to readdestination
- The local file to write toprogress
- A progress notifier for the upload. It must be used or hashes will not be calculated correctly
Exception
- Implementations can throw any exception and it will be handled by the base classprotected abstract boolean isRemoteResourceNewer(String resourceName, long timestamp) throws Exception
resourceName
- The name of the resource being comparedtimestamp
- The timestamp to compare against
Exception
- Implementations can throw any exception and it will be handled by the base classprotected abstract List<String> listDirectory(String directory) throws Exception
directory
- The directory to list files in
Exception
- Implementations can throw any exception and it will be handled by the base classprotected abstract void putResource(File source, String destination, org.kuali.maven.wagon.TransferProgress progress) throws Exception
source
- The local source file to read fromdestination
- The name of the remote resource to write toprogress
- A progress notifier for the upload. It must be used or hashes will not be calculated correctly
Exception
- Implementations can throw any exception and it will be handled by the base classpublic void connect(org.apache.maven.wagon.repository.Repository source, org.apache.maven.wagon.authentication.AuthenticationInfo authenticationInfo, org.apache.maven.wagon.proxy.ProxyInfoProvider proxyInfoProvider) throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
connect
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
public void connect(org.apache.maven.wagon.repository.Repository source, org.apache.maven.wagon.proxy.ProxyInfoProvider proxyInfoProvider) throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
connect
in interface org.apache.maven.wagon.Wagon
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
public int getTimeout()
getTimeout
in interface org.apache.maven.wagon.Wagon
public void setTimeout(int timeoutValue)
setTimeout
in interface org.apache.maven.wagon.Wagon
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |