|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsc.utils.directory.AD
public class AD
Utility class to manage specific entries for a Microsoft ActiveDirectory
| Constructor Summary | |
|---|---|
AD()
|
|
| Method Summary | |
|---|---|
static long |
getAccountExpires(String expireDate)
Returns the accountexpires time in Microsoft format |
static long |
getAccountExpires(String expireDate,
String format)
Return the accountexpires time in Microsoft format |
static int |
getNumberOfWeeksSinceLastLogon(String lastLogonTimestamp)
Return the number of weeks since the last logon |
static String |
getUnicodePwd(String password)
Encode a password so that it can be updated in Active Directory in the field unicodePwd. |
static boolean |
userAccountControlCheck(int value,
String constToCheck)
Check if a bit is set in UserAccountControl |
static int |
userAccountControlSet(int origValue,
String[] constToApply)
Set or unset some bits to a UserAccountControl attribute of an AD |
static int |
userAccountControlToggle(int value,
String constToApply)
Toggle a bit in UserAccountControl |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Integer UAC_SCRIPT
public static final Integer UAC_ACCOUNTDISABLE
public static final Integer UAC_HOMEDIR_REQUIRED
public static final Integer UAC_LOCKOUT
public static final Integer UAC_PASSWD_NOTREQD
public static final Integer UAC_PASSWD_CANT_CHANGE
public static final Integer UAC_ENCRYPTED_TEXT_PWD_ALLOWED
public static final Integer UAC_TEMP_DUPLICATE_ACCOUNT
public static final Integer UAC_NORMAL_ACCOUNT
public static final Integer UAC_INTERDOMAIN_TRUST_ACCOUNT
public static final Integer UAC_WORKSTATION_TRUST_ACCOUNT
public static final Integer UAC_SERVER_TRUST_ACCOUNT
public static final Integer UAC_DONT_EXPIRE_PASSWORD
public static final Integer UAC_MNS_LOGON_ACCOUNT
public static final Integer UAC_SMARTCARD_REQUIRED
public static final Integer UAC_TRUSTED_FOR_DELEGATION
public static final Integer UAC_NOT_DELEGATED
public static final Integer UAC_USE_DES_KEY_ONLY
public static final Integer UAC_DONT_REQ_PREAUTH
public static final Integer UAC_PASSWORD_EXPIRED
public static final Integer UAC_TRUSTED_TO_AUTH_FOR_DELEGATION
public static final Integer UAC_SET_SCRIPT
public static final Integer UAC_UNSET_SCRIPT
public static final Integer UAC_SET_ACCOUNTDISABLE
public static final Integer UAC_UNSET_ACCOUNTDISABLE
public static final Integer UAC_SET_HOMEDIR_REQUIRED
public static final Integer UAC_UNSET_HOMEDIR_REQUIRED
public static final Integer UAC_SET_LOCKOUT
public static final Integer UAC_UNSET_LOCKOUT
public static final Integer UAC_SET_PASSWD_NOTREQD
public static final Integer UAC_UNSET_PASSWD_NOTREQD
public static final Integer UAC_SET_PASSWD_CANT_CHANGE
public static final Integer UAC_UNSET_PASSWD_CANT_CHANGE
public static final Integer UAC_SET_ENCRYPTED_TEXT_PWD_ALLOWED
public static final Integer UAC_UNSET_ENCRYPTED_TEXT_PWD_ALLOWED
public static final Integer UAC_SET_TEMP_DUPLICATE_ACCOUNT
public static final Integer UAC_UNSET_TEMP_DUPLICATE_ACCOUNT
public static final Integer UAC_SET_NORMAL_ACCOUNT
public static final Integer UAC_UNSET_NORMAL_ACCOUNT
public static final Integer UAC_SET_INTERDOMAIN_TRUST_ACCOUNT
public static final Integer UAC_UNSET_INTERDOMAIN_TRUST_ACCOUNT
public static final Integer UAC_SET_WORKSTATION_TRUST_ACCOUNT
public static final Integer UAC_UNSET_WORKSTATION_TRUST_ACCOUNT
public static final Integer UAC_SET_SERVER_TRUST_ACCOUNT
public static final Integer UAC_UNSET_SERVER_TRUST_ACCOUNT
public static final Integer UAC_SET_DONT_EXPIRE_PASSWORD
public static final Integer UAC_UNSET_DONT_EXPIRE_PASSWORD
public static final Integer UAC_SET_MNS_LOGON_ACCOUNT
public static final Integer UAC_UNSET_MNS_LOGON_ACCOUNT
public static final Integer UAC_SET_SMARTCARD_REQUIRED
public static final Integer UAC_UNSET_SMARTCARD_REQUIRED
public static final Integer UAC_SET_TRUSTED_FOR_DELEGATION
public static final Integer UAC_UNSET_TRUSTED_FOR_DELEGATION
public static final Integer UAC_SET_NOT_DELEGATED
public static final Integer UAC_UNSET_NOT_DELEGATED
public static final Integer UAC_SET_USE_DES_KEY_ONLY
public static final Integer UAC_UNSET_USE_DES_KEY_ONLY
public static final Integer UAC_SET_DONT_REQ_PREAUTH
public static final Integer UAC_UNSET_DONT_REQ_PREAUTH
public static final Integer UAC_SET_PASSWORD_EXPIRED
public static final Integer UAC_UNSET_PASSWORD_EXPIRED
public static final Integer UAC_SET_TRUSTED_TO_AUTH_FOR_DELEGATION
public static final Integer UAC_UNSET_TRUSTED_TO_AUTH_FOR_DELEGATION
| Constructor Detail |
|---|
public AD()
| Method Detail |
|---|
public static int userAccountControlSet(int origValue,
String[] constToApply)
origValue - the original value of UserAccessControlconstToApply - an Array of constants to apply
public static boolean userAccountControlCheck(int value,
String constToCheck)
value - the value of UserAccountControlconstToCheck - a constant to test
public static int userAccountControlToggle(int value,
String constToApply)
value - the value of UserAccountControlconstToApply - the bit to toggle
public static String getUnicodePwd(String password)
throws UnsupportedEncodingException
password - The cleartext password to be encoded
UnsupportedEncodingExceptionpublic static int getNumberOfWeeksSinceLastLogon(String lastLogonTimestamp)
lastLogonTimestamp -
public static long getAccountExpires(String expireDate,
String format)
throws ParseException
expireDate - the date in any formatformat - The format of the date expireDate. See http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html.
ParseException
public static long getAccountExpires(String expireDate)
throws ParseException
expireDate - the date in the format yyyy-MM-dd.
ParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||