Package org.apache.felix.obrplugin
Class RemoteFileManager
java.lang.Object
org.apache.felix.obrplugin.RemoteFileManager
this class is used to manage all connections by wagon.
- Author:
- Felix Project Team
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteFileManager(org.apache.maven.artifact.manager.WagonManager wm, org.apache.maven.settings.Settings settings, org.apache.maven.plugin.logging.Log log) initialize main information. -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect the current object to repository given in constructor.voiddisconnect the current object.get a file from the current repository connected.static org.apache.maven.wagon.proxy.ProxyInfogetProxyInfo(org.apache.maven.settings.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.voidvoidput a file on the current repository connected.toString()voidunlockFile(String fileName)
-
Constructor Details
-
RemoteFileManager
public RemoteFileManager(org.apache.maven.artifact.manager.WagonManager wm, org.apache.maven.settings.Settings settings, org.apache.maven.plugin.logging.Log log) initialize main information.- Parameters:
wm- WagonManager provides by mavensettings- settings of the current project provides by mavenlog- logger
-
-
Method Details
-
disconnect
public void disconnect()disconnect the current object. -
connect
connect the current object to repository given in constructor.- Parameters:
id- repository idurl- repository url- Throws:
org.apache.maven.plugin.MojoExecutionException
-
get
get a file from the current repository connected.- Parameters:
url- url to the targeted filesuffix- suggested file suffix- Returns:
- get a file descriptor on the required resource
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
put
put a file on the current repository connected.- Parameters:
file- file to uploadurl- url to copy file- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getProxyInfo
public static org.apache.maven.wagon.proxy.ProxyInfo getProxyInfo(org.apache.maven.settings.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
-
lockFile
public void lockFile(String fileName, boolean ignoreLock) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
unlockFile
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isLockedFile
this method indicates if the targeted file is locked or not.- Parameters:
fileName- name targeted- Returns:
- true if the required file is locked, else false
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
toString
-