|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.connector.NT4UserMetaDataConnector.NTMetaData
public class NTMetaData
This class represents the Windows Users and Groups Connector JNI layer. It encapsulates all native methods to access the WinAPI functions.
Constructor Summary | |
---|---|
NTMetaData()
|
Method Summary | |
---|---|
static int |
getGlobalGroupsNames(String aComputerName,
int aStartIndex,
int aEntriesRequested,
Vector aGroupsNames)
Retrieves a "paged" list of the global groups accounts on the specified machine (should be PDC machine). |
static Vector |
getGlobalGroupUsers(String aComputerName,
String aGlobalGroupName)
Retrieves a list of all users that are members of the global group specified. |
static Vector |
getLocalGroupGlobalGroups(String aComputerName,
String aLocalGroupName)
Retrieves a list of all global groups that are members of the local group specified. |
static Vector |
getLocalGroupsNames(String aComputerName)
Retrieves a list of all local group accounts on the specified machine. |
static Vector |
getLocalGroupUsers(String aComputerName,
String aLocalGroupName)
Retrieves a list of all users that are members of the local group specified. |
static Vector |
getUserGlobalGroups(String aComputerName,
String aUserName)
Retrieves a list of all global groups that the specified user is member of. |
static Vector |
getUserLocalGroups(String aComputerName,
String aUserName)
Retrieves a list of all local groups that the specified user is member of. |
static int |
getUsersNames(String aComputerName,
int aStartIndex,
int aEntriesRequested,
Vector aUsersNames)
Retrieves a "paged" list of the users accounts on the specified machine. |
static void |
globalGroupAdd(String aComputerName,
GroupInfo aGroupInfo)
Adds a global group account to the machine specified (should be PDC machine). |
static void |
globalGroupAddUser(String aComputerName,
String aGlobalGroupName,
String aUserName)
Makes the specified user member of the specified global group. |
static void |
globalGroupDel(String aComputerName,
String aGlobalGroupName)
Removes the specified global group account from the specified machine (should be PDC machine). |
static void |
globalGroupDelUser(String aComputerName,
String aGlobalGroupName,
String aUserName)
Removes the specified user from the member list of the specified global group. |
static GroupInfo |
globalGroupGetInfo(String aComputerName,
String aGlobalGroupName)
Retrieves all information accessible for the global group specified. |
static void |
globalGroupSetInfo(String aComputerName,
String aGlobalGroupName,
GroupInfo aGroupInfo)
Modifies global group account properties. |
static void |
globalGroupSetUsers(String aComputerName,
String aGlobalGroupName,
Vector aUsers)
Sets global group's user membership. |
static boolean |
isPrimaryDomainController(String aComputerName)
Checks if the machine given is a Primary Domain Controller machine. |
static void |
localGroupAdd(String aComputerName,
GroupInfo aGroupInfo)
Adds a local group account to the machine specified. |
static void |
localGroupAddGlobalGroups(String aComputerName,
String aLocalGroupName,
Vector aGlobalGroups)
Makes the specified global groups members of the specified local group. |
static void |
localGroupAddUsers(String aComputerName,
String aLocalGroupName,
Vector aUsers)
Makes the specified users members of the specified local group. |
static void |
localGroupDel(String aComputerName,
String aLocalGroupName)
Removes the specified local group account from the specified machine. |
static void |
localGroupDelGlobalGroups(String aComputerName,
String aLocalGroupName,
Vector aGlobalGroups)
Removes the specified global groups from the member list of the specified local group. |
static void |
localGroupDelUsers(String aComputerName,
String aLocalGroupName,
Vector aUsers)
Removes the specified users from the member list of the specified local group. |
static GroupInfo |
localGroupGetInfo(String aComputerName,
String aLocalGroupName)
Retrieves all information accessible for the local group specified. |
static void |
localGroupSetInfo(String aComputerName,
String aLocalGroupName,
GroupInfo aGroupInfo)
Modifies local group account properties. |
static void |
localGroupSetMembers(String aComputerName,
String aLocalGroupName,
Vector aMembers)
Sets local group's user/global group membership. |
static boolean |
logOn(String aComputerName,
String aUserName,
String aPassword)
Tries to log on an arbitrary Windows machine. |
static void |
userAdd(String aComputerName,
UserInfo aUserInfo)
Adds a user account to the machine specified. |
static void |
userDel(String aComputerName,
String aUserName)
Removes the specified user account from the specified machine. |
static UserInfo |
userGetInfo(String aComputerName,
String aUserName)
Retrieves all information accessible for the user specified. |
static String |
userGetPrimaryGroup(String aComputerName,
String aUserName)
Retrieves user's Primary Group. |
static void |
userSetGlobalGroups(String aComputerName,
String aUserName,
Vector aGlobalGroups)
Sets user's global group membership. |
static void |
userSetInfo(String aComputerName,
String aUserName,
UserInfo aUserInfo)
Modifies user account properties. |
static void |
userSetPrimaryGroup(String aComputerName,
String aUserName,
String aPrimaryGroup)
Sets user's Primary Group. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NTMetaData()
Method Detail |
---|
public static boolean logOn(String aComputerName, String aUserName, String aPassword) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine to log on.aUserName
- The user name of the account to log on with.aPassword
- The password of the account to log on with.
NT4UserMetaDataException
- If an error occurs while trying to log on.public static boolean isPrimaryDomainController(String aComputerName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine to check for PDC.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static UserInfo userGetInfo(String aComputerName, String aUserName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the user account
resides.aUserName
- The name of the user (the account name) which information will
be retrieved.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static int getUsersNames(String aComputerName, int aStartIndex, int aEntriesRequested, Vector aUsersNames) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine which users will be
retrieved.aStartIndex
- A resume-index for enumerating users. Specify "0" at the first
call; specify function's return value on subsequent calls.aEntriesRequested
- The number of Entries requested, i.e. the "page size". Should
be between 1 and 100.aUsersNames
- a java.util.Vector that will be populated with String elements
each one specifying a user account name. All previous vector
data is erased.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static Vector getUserLocalGroups(String aComputerName, String aUserName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the user account
and the local group accounts reside.aUserName
- The name of the user (the account name) which local groups
will be retrieved.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static Vector getUserGlobalGroups(String aComputerName, String aUserName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the user account
resides.aUserName
- The name of the user (the account name) which global groups
will be retrieved.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static void userAdd(String aComputerName, UserInfo aUserInfo) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the user account
will be added.aUserInfo
- UserInfo structure describing the user that will be added
(along with all his details).
NT4UserMetaDataException
- If an error occurs while adding the user in Windows security
database.public static void userDel(String aComputerName, String aUserName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the user account
will be removed from.aUserName
- The name of the user that will be removed.
NT4UserMetaDataException
- If an error occurs while removing the user from Windows
security database.public static void userSetInfo(String aComputerName, String aUserName, UserInfo aUserInfo) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where is the user
account that will be modified.aUserName
- The name of the user that will be modified.aUserInfo
- UserInfo structure describing the new user's details.
NT4UserMetaDataException
- If an error occurs while modifying the user in Windows
security database.public static void userSetGlobalGroups(String aComputerName, String aUserName, Vector aGlobalGroups) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the user account
resides (should be a PDC machine).aUserName
- The name of the user which global group membership will be
set.aGlobalGroups
- Vector of String elements each one specifying the name of a
global group account.
NT4UserMetaDataException
- If an error occurs while setting user's global groups
membership in Windows security database.public static void userSetPrimaryGroup(String aComputerName, String aUserName, String aPrimaryGroup) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the user account
resides (should be a PDC machine).aUserName
- The name of the user which Primary Group will be set.aPrimaryGroup
- The name of the user's new Primary Group (should be a global
group).
NT4UserMetaDataException
- If an error occurs while setting user's Primary Group in
Windows security database.public static String userGetPrimaryGroup(String aComputerName, String aUserName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the user account
resides (should be a PDC machine).aUserName
- The name of the user which Primary Group will be retrieved.
NT4UserMetaDataException
- If an error occurs while retrieving user's Primary Group from
Windows security database.public static GroupInfo globalGroupGetInfo(String aComputerName, String aGlobalGroupName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the PDC machine where the global
group account resides.aGlobalGroupName
- The name of the global group (the account name) which
information will be retrieved.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static int getGlobalGroupsNames(String aComputerName, int aStartIndex, int aEntriesRequested, Vector aGroupsNames) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the PDC machine which global
groups will be retrieved.aStartIndex
- A resume-index for enumerating global groups. Specify "0" at
the first call; specify function's return value on subsequent
calls.aEntriesRequested
- The number of Entries requested, i.e. the "page size". Should
be between 1 and 100.aGroupsNames
- a java.util.Vector that will be populated with String elements
each one specifying a global group account name. All previous
vector data is erased.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static Vector getGlobalGroupUsers(String aComputerName, String aGlobalGroupName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the PDC machine where the global
group account resides.aGlobalGroupName
- The name of the global group (the account name) which users
will be retrieved.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static void globalGroupAdd(String aComputerName, GroupInfo aGroupInfo) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the PDC machine where the global
group account will be added.aGroupInfo
- GroupInfo structure describing the global group that will be
added (along with all its details).
NT4UserMetaDataException
- If an error occurs while adding the global group in Windows
security database.public static void globalGroupAddUser(String aComputerName, String aGlobalGroupName, String aUserName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the PDC machine where the global
group account resides.aGlobalGroupName
- The name of the global group where the user will be added as
member.aUserName
- The name of the user that will be added as member of the
global group.
NT4UserMetaDataException
- If an error occurs while adding member in the global group.public static void globalGroupDel(String aComputerName, String aGlobalGroupName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the PDC machine where the global
group account will be removed from.aGlobalGroupName
- The name of the global group that will be removed.
NT4UserMetaDataException
- If an error occurs while removing the global group from
Windows security database.public static void globalGroupDelUser(String aComputerName, String aGlobalGroupName, String aUserName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the PDC machine where the global
group account resides.aGlobalGroupName
- The name of the global group account.aUserName
- The name of the user that will be removed from the global
group's members.
NT4UserMetaDataException
- If an error occurs while removing the user from the global
group members list.public static void globalGroupSetUsers(String aComputerName, String aGlobalGroupName, Vector aUsers) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the PDC machine where the global
group account resides.aGlobalGroupName
- The name of the global group which user membership will be
set.aUsers
- Vector of String elements each one specifying the name of a
user account.
NT4UserMetaDataException
- If an error occurs while setting global group's user
membership in Windows security database.public static void globalGroupSetInfo(String aComputerName, String aGlobalGroupName, GroupInfo aGroupInfo) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the PDC machine where is the
global group account that will be modified.aGlobalGroupName
- The name of the global group that will be modified.aGroupInfo
- GroupInfo structure describing the new global group's details.
NT4UserMetaDataException
- If an error occurs while modifying the global group in
Windows security database.public static GroupInfo localGroupGetInfo(String aComputerName, String aLocalGroupName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account resides.aLocalGroupName
- The name of the local group (the account name) which
information will be retrieved.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static Vector getLocalGroupsNames(String aComputerName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine which local groups
will be retrieved.
NT4UserMetaDataException
- If an error occurred while querying the machine specified.public static Vector getLocalGroupUsers(String aComputerName, String aLocalGroupName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account resides.aLocalGroupName
- The name of the local group (the account name) which users
will be retrieved.
NT4UserMetaDataException
- If an error occurs while querying the machine specified.public static Vector getLocalGroupGlobalGroups(String aComputerName, String aLocalGroupName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account resides.aLocalGroupName
- The name of the local group (the account name) which global
groups will be retrieved.
NT4UserMetaDataException
- If an error occured while quering the machine specified.public static void localGroupAdd(String aComputerName, GroupInfo aGroupInfo) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account will be added.aGroupInfo
- GroupInfo structure describing the local group that will be
added (along with all its details).
NT4UserMetaDataException
- If an error occurs while adding the local group in Windows
security database.public static void localGroupDel(String aComputerName, String aLocalGroupName) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account will be removed from.aLocalGroupName
- The name of the local group that will be removed.
NT4UserMetaDataException
- If an error occurs while removing the local group from
Windows security database.public static void localGroupAddUsers(String aComputerName, String aLocalGroupName, Vector aUsers) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account resides.aLocalGroupName
- The name of the local group where the users will be added as
members.aUsers
- Vector of String elements each one specifying the name of a
user to be added as member of the local group. Domain users
should be specified in the format NT4UserMetaDataException
- If an error occurs while adding members in the local group.public static void localGroupAddGlobalGroups(String aComputerName, String aLocalGroupName, Vector aGlobalGroups) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account resides.aLocalGroupName
- The name of the local group where the global groups will be
added as members.aGlobalGroups
- Vector of String elements each one specifying the name of a
global group to be added as member of the local group. Global
group names can be specified either in the format
NT4UserMetaDataException
- If an error occurs while adding members in the local group.public static void localGroupDelUsers(String aComputerName, String aLocalGroupName, Vector aUsers) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account resides.aLocalGroupName
- The name of the local group account.aUsers
- Vector of String elements each one specifying the name of a
user to be removed from the local group's members. User names
can be specified either in the format NT4UserMetaDataException
- If an error occurs while removing the users from the local
group members list.public static void localGroupDelGlobalGroups(String aComputerName, String aLocalGroupName, Vector aGlobalGroups) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account resides.aLocalGroupName
- The name of the local group account.aGlobalGroups
- Vector of String elements each one specifying the name of a
global group to be removed from the local group's members.
Global group names can be specified either in the format
NT4UserMetaDataException
- If an error occurs while removing the global groups from the
local group members list.public static void localGroupSetInfo(String aComputerName, String aLocalGroupName, GroupInfo aGroupInfo) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where is the local
group account that will be modified.aLocalGroupName
- The name of the local group that will be modified.aGroupInfo
- GroupInfo structure describing the new local group's details.
NT4UserMetaDataException
- If an error occurs while modifying the local group in Windows
security database.public static void localGroupSetMembers(String aComputerName, String aLocalGroupName, Vector aMembers) throws NT4UserMetaDataException
aComputerName
- The name (or IP address) of the machine where the local group
account resides.aLocalGroupName
- The name of the local group which membership will be set.aMembers
- Vector of String elements each one specifying the name of
either a user or a global group account. Domain members (users
or groups) should be specified in the format NT4UserMetaDataException
- If an error occurs while setting local group's membership in
Windows security database.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |