Top Description Fields Constructors Methods
waffle.windows.auth.impl

public Class WindowsAccountImpl

extends Object
implements IWindowsAccount
Class Inheritance
All Implemented Interfaces
waffle.windows.auth.IWindowsAccount
Imports
com.sun.jna.platform.win32.Advapi32Util, .Advapi32Util.Account, .Secur32.EXTENDED_NAME_FORMAT, .Secur32Util, waffle.windows.auth.IWindowsAccount

Windows Account.
Author
dblock[at]dblock[dot]org

Field Summary

Modifier and TypeField and Description
private final Advapi32Util.Account
account

The account.

Constructor Summary

AccessConstructor and Description
public
WindowsAccountImpl(final Advapi32Util.Account
Account.
newAccount
)

Windows Account.

public
WindowsAccountImpl(final String
Fully qualified username.
userName
)

Windows Account.

public
WindowsAccountImpl(final String
Username, without a domain or machine.
accountName
,
final String
Machine name.
systemName
)

Windows Account.

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

String.
getCurrentUsername
()

Get the SAM-compatible username of the currently logged-on user.

public String

Returns:

String.
getDomain
()

Implements waffle.windows.auth.IWindowsAccount.getDomain.

Account domain.
public String
getFqn()

Implements waffle.windows.auth.IWindowsAccount.getFqn.

Fully qualified username.
public String

Returns:

String.
getName
()

Implements waffle.windows.auth.IWindowsAccount.getName.

Account name.
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accountback to summary
private final Advapi32Util.Account account

The account.

Constructor Detail

WindowsAccountImplback to summary
public WindowsAccountImpl(final Advapi32Util.Account newAccount)

Windows Account.

Parameters
newAccount:Advapi32Util.Account

Account.

WindowsAccountImplback to summary
public WindowsAccountImpl(final String userName)

Windows Account.

Parameters
userName:String

Fully qualified username.

WindowsAccountImplback to summary
public WindowsAccountImpl(final String accountName, final String systemName)

Windows Account.

Parameters
accountName:String

Username, without a domain or machine.

systemName:String

Machine name.

Method Detail

getCurrentUsernameback to summary
public static String getCurrentUsername()

Get the SAM-compatible username of the currently logged-on user.

Returns:String

String.

getDomainback to summary
public String getDomain()

Implements waffle.windows.auth.IWindowsAccount.getDomain.

Account domain.

Returns:String

String.

Annotations
@Override
getFqnback to summary
public String getFqn()

Implements waffle.windows.auth.IWindowsAccount.getFqn.

Doc from waffle.windows.auth.IWindowsAccount.getFqn.

Fully qualified username.

Returns:String

String.

Annotations
@Override
getNameback to summary
public String getName()

Implements waffle.windows.auth.IWindowsAccount.getName.

Account name.

Returns:String

String.

Annotations
@Override
getSidStringback to summary
public String getSidString()

Implements waffle.windows.auth.IWindowsAccount.getSidString.

Doc from waffle.windows.auth.IWindowsAccount.getSidString.

Security identifier.

Returns:String

String in the S- format.

Annotations
@Override