本文整理汇总了Java中org.apache.commons.vfs2.UserAuthenticationData.getData方法的典型用法代码示例。如果您正苦于以下问题:Java UserAuthenticationData.getData方法的具体用法?Java UserAuthenticationData.getData怎么用?Java UserAuthenticationData.getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.vfs2.UserAuthenticationData
的用法示例。
在下文中一共展示了UserAuthenticationData.getData方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getData
import org.apache.commons.vfs2.UserAuthenticationData; //导入方法依赖的package包/类
/**
* gets data of given type from the UserAuthenticationData or null if there is no data or data
* of this type available.
* @param data The UserAuthenticationData.
* @param type The type of the element to retrieve.
* @param overriddenValue The default value.
* @return The data of the given type as a character array or null if the data is not available.
*/
public static char[] getData(UserAuthenticationData data, UserAuthenticationData.Type type,
char[] overriddenValue)
{
if (overriddenValue != null)
{
return overriddenValue;
}
if (data == null)
{
return null;
}
return data.getData(type);
}
示例2: userSelectedHook
import org.apache.commons.vfs2.UserAuthenticationData; //导入方法依赖的package包/类
@Override
protected void userSelectedHook(UserAuthenticationData userAuthenticationData) {
char[] domain = new char[0];
if (userAuthenticationData != null) {
domain = userAuthenticationData.getData(UserAuthenticationData.DOMAIN);
}
fieldTf.setText(new String(domain));
}
示例3: userSelectedHook
import org.apache.commons.vfs2.UserAuthenticationData; //导入方法依赖的package包/类
@Override
protected void userSelectedHook(UserAuthenticationData userAuthenticationData) {
if (userAuthenticationData != null) {
char[] sshKeyPath = userAuthenticationData.getData(UserAuthenticationDataWrapper.SSH_KEY);
String path = "";
if (sshKeyPath != null && sshKeyPath.length > 0) {
path = new String(sshKeyPath);
}
sshKeyFileField.setText(path);
}
}
示例4: userSelected
import org.apache.commons.vfs2.UserAuthenticationData; //导入方法依赖的package包/类
private void userSelected(String user) {
UserAuthenticationData userAuthenticationData = getAuthStore().getUserAuthenticationData(new UserAuthenticationInfo(getVfsUriParser().getProtocol().getName(), getVfsUriParser().getHostname(), user));
char[] passChars = new char[0];
if (userAuthenticationData != null && userAuthenticationData.getData(UserAuthenticationData.PASSWORD) != null) {
passChars = userAuthenticationData.getData(UserAuthenticationData.PASSWORD);
}
passTx.setText(new String(passChars));
userSelectedHook(userAuthenticationData);
}