use of com.mucommander.commons.file.FileURL in project mucommander by mucommander.
the class SMBPanel method getServerURL.
// //////////////////////////////
// ServerPanel implementation //
// //////////////////////////////
@Override
public FileURL getServerURL() throws MalformedURLException {
updateValues();
FileURL url = FileURL.getFileURL(FileProtocols.SMB + "://" + lastServer + (lastShare.startsWith("/") ? "" : "/") + lastShare);
// Insert the domain (if any) before the username, separated by a semicolon
String userInfo = lastUsername;
if (!lastDomain.equals(""))
userInfo = lastDomain + ";" + userInfo;
url.setCredentials(new Credentials(userInfo, lastPassword));
return url;
}
use of com.mucommander.commons.file.FileURL in project mucommander by mucommander.
the class NFSPanel method getServerURL.
// //////////////////////////////
// ServerPanel implementation //
// //////////////////////////////
@Override
public FileURL getServerURL() throws MalformedURLException {
updateValues();
FileURL url = FileURL.getFileURL(FileProtocols.NFS + "://" + lastServer + (lastShare.startsWith("/") ? "" : "/") + lastShare);
// Set port
url.setPort(lastPort);
// Set NFS version
url.setProperty(NFSFile.NFS_VERSION_PROPERTY_NAME, lastNfsVersion);
// Set NFS protocol
url.setProperty(NFSFile.NFS_PROTOCOL_PROPERTY_NAME, lastNfsProtocol);
return url;
}
use of com.mucommander.commons.file.FileURL in project mucommander by mucommander.
the class RegistryPanel method getServerURL.
@Override
public FileURL getServerURL() throws MalformedURLException {
FileURL url = FileURL.getFileURL(String.format("%s://%s/%s", typeComboBox.getSelectedItem(), serverField.getText(), imageField.getText()));
url.setCredentials(new Credentials(usernameField.getText(), new String(passwordField.getPassword())));
return url;
}
use of com.mucommander.commons.file.FileURL in project mucommander by mucommander.
the class OvirtPanel method getServerURL.
@Override
public FileURL getServerURL() throws MalformedURLException {
FileURL url = FileURL.getFileURL(String.format("ovirt://%s:%s/", serverField.getText(), lastPort = (int) portSpinner.getValue()));
url.setCredentials(new Credentials(usernameField.getText(), new String(passwordField.getPassword())));
url.setProperty("proxy", Boolean.toString(useProxy));
return url;
}
use of com.mucommander.commons.file.FileURL in project mucommander by mucommander.
the class HDFSPanel method getServerURL.
// //////////////////////////////
// ServerPanel implementation //
// //////////////////////////////
@Override
public FileURL getServerURL() throws MalformedURLException {
updateValues();
if (!lastInitialDir.startsWith("/"))
lastInitialDir = "/" + lastInitialDir;
FileURL url = FileURL.getFileURL(FileProtocols.HDFS + "://" + lastServer + lastInitialDir);
// Set user and group
url.setCredentials(new Credentials(lastUsername, ""));
// url.setProperty(HDFSFile.GROUP_PROPERTY_NAME, lastGroup);
// Set port
url.setPort(lastPort);
return url;
}
Aggregations