org.apache.ivy.plugins.repository.ssh

Class SshRepository

public class SshRepository extends AbstractSshBasedRepository

Ivy Repository based on SSH
Method Summary
voidget(String source, File destination)
StringgetCreateDirCommand()
StringgetExistCommand()
StringgetListCommand()
protected StringgetRepositoryScheme()
return ssh as scheme use the Resolver type name here?
ResourcegetResource(String source)
create a new resource with lazy initializing
Listlist(String parent)
InputStreamopenStream(SshResource resource)
Not really streaming...need to implement a proper streaming approach?
voidput(File source, String destination, boolean overwrite)
SshResourceresolveResource(String source)
Fetch the needed file information for a given file (size, last modification time) and report it back in a SshResource
voidsetCreateDirCommand(String createDirCommand)
voidsetExistCommand(String existCommand)
voidsetFileSeparator(char fileSeparator)
The file separator is the separator to use on the target system On a unix system it is '/', but I don't know, how this is solved on different ssh implementations.
voidsetListCommand(String cmd)
sets the list command to use for a directory listing listing must be only the filename and each filename on a separate line
voidsetPublishPermissions(String permissions)
A four digit string (e.g., 0644, see "man chmod", "man open") specifying the permissions of the published files.

Method Detail

get

public void get(String source, File destination)

getCreateDirCommand

public String getCreateDirCommand()

Returns: the createDirCommand

getExistCommand

public String getExistCommand()

Returns: the existCommand

getListCommand

public String getListCommand()

Returns: the list command to use

getRepositoryScheme

protected String getRepositoryScheme()
return ssh as scheme use the Resolver type name here? would be nice if it would be static, so we could use SshResolver.getTypeName()

getResource

public Resource getResource(String source)
create a new resource with lazy initializing

list

public List list(String parent)

openStream

public InputStream openStream(SshResource resource)
Not really streaming...need to implement a proper streaming approach?

Parameters: resource to stream

Returns: InputStream of the resource data

put

public void put(File source, String destination, boolean overwrite)

resolveResource

public SshResource resolveResource(String source)
Fetch the needed file information for a given file (size, last modification time) and report it back in a SshResource

Parameters: source ssh uri for the file to get info for

Returns: SshResource filled with the needed informations

See Also: Repository

setCreateDirCommand

public void setCreateDirCommand(String createDirCommand)

Parameters: createDirCommand the createDirCommand to set

setExistCommand

public void setExistCommand(String existCommand)

Parameters: existCommand the existCommand to set

setFileSeparator

public void setFileSeparator(char fileSeparator)
The file separator is the separator to use on the target system On a unix system it is '/', but I don't know, how this is solved on different ssh implementations. Using the default might be fine

Parameters: fileSeparator The fileSeparator to use. default '/'

setListCommand

public void setListCommand(String cmd)
sets the list command to use for a directory listing listing must be only the filename and each filename on a separate line

Parameters: cmd to use. default is "ls -1"

setPublishPermissions

public void setPublishPermissions(String permissions)
A four digit string (e.g., 0644, see "man chmod", "man open") specifying the permissions of the published files.