org.apache.felix.obrplugin

Class RemoteFileManager

public class RemoteFileManager extends Object

this class is used to manage all connections by wagon.

Author: Felix Project Team

Constructor Summary
RemoteFileManager(WagonManager wm, Settings settings, Log log)
initialize main information.
Method Summary
voidconnect(String id, String url)
connect the current object to repository given in constructor.
voiddisconnect()
disconnect the current object.
Fileget(String url, String suffix)
get a file from the current repository connected.
static ProxyInfogetProxyInfo(Settings settings)
Convenience method to map a Proxy object from the user system settings to a ProxyInfo object.
booleanisLockedFile(String fileName)
this method indicates if the targeted file is locked or not.
voidlockFile(String fileName, boolean ignoreLock)
voidput(File file, String url)
put a file on the current repository connected.
StringtoString()
voidunlockFile(String fileName)

Constructor Detail

RemoteFileManager

public RemoteFileManager(WagonManager wm, Settings settings, Log log)
initialize main information.

Parameters: wm WagonManager provides by maven settings settings of the current project provides by maven log logger

Method Detail

connect

public void connect(String id, String url)
connect the current object to repository given in constructor.

Parameters: id repository id url repository url

Throws: MojoExecutionException

disconnect

public void disconnect()
disconnect the current object.

get

public File get(String url, String suffix)
get a file from the current repository connected.

Parameters: url url to the targeted file suffix suggested file suffix

Returns: get a file descriptor on the required resource

Throws: MojoExecutionException

getProxyInfo

public static ProxyInfo getProxyInfo(Settings settings)
Convenience method to map a Proxy object from the user system settings to a ProxyInfo object.

Parameters: settings project settings given by maven

Returns: a proxyInfo object instancied or null if no active proxy is define in the settings.xml

isLockedFile

public boolean isLockedFile(String fileName)
this method indicates if the targeted file is locked or not.

Parameters: remote connection manager fileName name targeted

Returns: true if the required file is locked, else false

Throws: MojoExecutionException

lockFile

public void lockFile(String fileName, boolean ignoreLock)

put

public void put(File file, String url)
put a file on the current repository connected.

Parameters: file file to upload url url to copy file

Throws: MojoExecutionException

toString

public String toString()

unlockFile

public void unlockFile(String fileName)
Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.