UserLock API
Public Member Functions | List of all members
ProtectedAccountTemporary Class Reference

Temporary protected account allowing to define temporary rules for an account from a start date to an end date. More...

Inheritance diagram for ProtectedAccountTemporary:
ProtectedAccount ProtectedAccountBase

Public Member Functions

 ProtectedAccountTemporary ()
 Default constructor. More...
 
 ProtectedAccountTemporary (String accountName, UserLockServer userLockServer)
 Constructor from account name and a UserLock server instance. More...
 
 ProtectedAccountTemporary (UserLockServer userLockServer, String line)
 Constructor from a UserLock server instance and a ";" separated string with main restrictions of the protected account: "account name;...". More...
 
 ProtectedAccountTemporary (String accountName, UserLockServer userLockServer, AccountPropertyList propertyList)
 Constructor from the account name, a UserLock server instance and a bitmask of property group to get from the UserLock server instance. More...
 
int InitFromTemporaryName (string s)
 Initialize the current instance from the temporary name. More...
 

Static Public Member Functions

Static methods.
static DateTime ConvertFromStringToDateTime (string s)
 Convert a date in local time from the "YYYYMMDDHHmmSS" format to a DateTime object. More...
 
static string ComputeTemporaryName (string accountName, DateTime startDate, DateTime endDate)
 [Static] Compute the temporary name from the account name, start and end dates. More...
 

Properties

Overriden properties.
override bool IsTemporary [get]
 True if this is a temporary protected user. False otherwise. More...
 
override string Identifier [get]
 Get the identifier of the protected account. More...
 

Temporary specific.

String TemporaryName [get]
 Temporary name of the temporary protected account. More...
 
DateTime StartDate [get]
 Start date of the temporary protected account. More...
 
DateTime EndDate [get]
 End date of the temporary protected account. More...
 

Additional Inherited Members

 Enumeration of state for settings that can be disabled, enabled or not configured. See DisplayWelcomeMessageNew and AllowClosePreviousNew properties. More...
 Enumeration of actions that can be done when allowed logon hours have expired for a user. See the property ExpirationActionNew. More...
 Enumeration of all groups of properties in the ProtectedAccount class allowing to get or set only selected properties. See the methods GetInfo and SetInfo of the class ProtectedAccount or the method GetProtectedAccount of the class UserLockServer. More...
 Enumeration of all complex effective restrictions (cannot be stored in ProtectedAccount fields because they need additional data). Specific to effective restrictions of an user account (not compatible with protected accounts). More...

Detailed Description

Temporary protected account allowing to define temporary rules for an account from a start date to an end date.

Constructor & Destructor Documentation

Default constructor.

ProtectedAccountTemporary ( String  accountName,
UserLockServer  userLockServer 
)

Constructor from account name and a UserLock server instance.

Parameters
accountNameThe account name.
userLockServerThe UserLock server instance.
ProtectedAccountTemporary ( UserLockServer  userLockServer,
String  line 
)

Constructor from a UserLock server instance and a ";" separated string with main restrictions of the protected account: "account name;...".

Parameters
userLockServerThe UserLock server instance.
lineA ";" separated string with main restrictions of the protected account: "account name;...".
ProtectedAccountTemporary ( String  accountName,
UserLockServer  userLockServer,
AccountPropertyList  propertyList 
)

Constructor from the account name, a UserLock server instance and a bitmask of property group to get from the UserLock server instance.

Parameters
accountNameThe account name.
userLockServerThe UserLock server instance.
propertyListBitmask of property group to get from the UserLock server instance.

Member Function Documentation

int InitFromTemporaryName ( string  s)

Initialize the current instance from the temporary name.

Parameters
s
Returns

OUT: The error code.

Parameters
sIN : The temporary name.
static DateTime ConvertFromStringToDateTime ( string  s)
static

Convert a date in local time from the "YYYYMMDDHHmmSS" format to a DateTime object.

Parameters
s
Returns

OUT: Date in local time.

Parameters
sIN : Date in local time in "YYYYMMDDHHmmSS" format.
static string ComputeTemporaryName ( string  accountName,
DateTime  startDate,
DateTime  endDate 
)
static

[Static] Compute the temporary name from the account name, start and end dates.

Parameters
accountNameThe account name.
startDateThe start date.
endDateThe end date.
Returns
The temporary name.

Property Documentation

override bool IsTemporary
get

True if this is a temporary protected user. False otherwise.

override string Identifier
get

Get the identifier of the protected account.

String TemporaryName
get

Temporary name of the temporary protected account.

DateTime StartDate
get

Start date of the temporary protected account.

DateTime EndDate
get

End date of the temporary protected account.