|
||||||||||
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(java.lang.String aComputerName,
int aStartIndex,
int aEntriesRequested,
java.util.Vector aGroupsNames)
Retrieves a "paged" list of the global groups accounts on the specified machine (should be PDC machine). |
static java.util.Vector |
getGlobalGroupUsers(java.lang.String aComputerName,
java.lang.String aGlobalGroupName)
Retrieves a list of all users that are members of the global group specified. |
static java.util.Vector |
getLocalGroupGlobalGroups(java.lang.String aComputerName,
java.lang.String aLocalGroupName)
Retrieves a list of all global groups that are members of the local group specified. |
static java.util.Vector |
getLocalGroupsNames(java.lang.String aComputerName)
Retrieves a list of all local group accounts on the specified machine. |
static java.util.Vector |
getLocalGroupUsers(java.lang.String aComputerName,
java.lang.String aLocalGroupName)
Retrieves a list of all users that are members of the local group specified. |
static java.util.Vector |
getUserGlobalGroups(java.lang.String aComputerName,
java.lang.String aUserName)
Retrieves a list of all global groups that the specified user is member of. |
static java.util.Vector |
getUserLocalGroups(java.lang.String aComputerName,
java.lang.String aUserName)
Retrieves a list of all local groups that the specified user is member of. |
static int |
getUsersNames(java.lang.String aComputerName,
int aStartIndex,
int aEntriesRequested,
java.util.Vector aUsersNames)
Retrieves a "paged" list of the users accounts on the specified machine. |
static void |
globalGroupAdd(java.lang.String aComputerName,
GroupInfo aGroupInfo)
Adds a global group account to the machine specified (should be PDC machine). |
static void |
globalGroupAddUser(java.lang.String aComputerName,
java.lang.String aGlobalGroupName,
java.lang.String aUserName)
Makes the specified user member of the specified global group. |
static void |
globalGroupDel(java.lang.String aComputerName,
java.lang.String aGlobalGroupName)
Removes the specified global group account from the specified machine (should be PDC machine). |
static void |
globalGroupDelUser(java.lang.String aComputerName,
java.lang.String aGlobalGroupName,
java.lang.String aUserName)
Removes the specified user from the member list of the specified global group. |
static GroupInfo |
globalGroupGetInfo(java.lang.String aComputerName,
java.lang.String aGlobalGroupName)
Retrieves all information accessible for the global group specified. |
static void |
globalGroupSetInfo(java.lang.String aComputerName,
java.lang.String aGlobalGroupName,
GroupInfo aGroupInfo)
Modifies global group account properties. |
static void |
globalGroupSetUsers(java.lang.String aComputerName,
java.lang.String aGlobalGroupName,
java.util.Vector aUsers)
Sets global group's user membership. |
static boolean |
isPrimaryDomainController(java.lang.String aComputerName)
Checks if the machine given is a Primary Domain Controller machine. |
static void |
localGroupAdd(java.lang.String aComputerName,
GroupInfo aGroupInfo)
Adds a local group account to the machine specified. |
static void |
localGroupAddGlobalGroups(java.lang.String aComputerName,
java.lang.String aLocalGroupName,
java.util.Vector aGlobalGroups)
Makes the specified global groups members of the specified local group. |
static void |
localGroupAddUsers(java.lang.String aComputerName,
java.lang.String aLocalGroupName,
java.util.Vector aUsers)
Makes the specified users members of the specified local group. |
static void |
localGroupDel(java.lang.String aComputerName,
java.lang.String aLocalGroupName)
Removes the specified local group account from the specified machine. |
static void |
localGroupDelGlobalGroups(java.lang.String aComputerName,
java.lang.String aLocalGroupName,
java.util.Vector aGlobalGroups)
Removes the specified global groups from the member list of the specified local group. |
static void |
localGroupDelUsers(java.lang.String aComputerName,
java.lang.String aLocalGroupName,
java.util.Vector aUsers)
Removes the specified users from the member list of the specified local group. |
static GroupInfo |
localGroupGetInfo(java.lang.String aComputerName,
java.lang.String aLocalGroupName)
Retrieves all information accessible for the local group specified. |
static void |
localGroupSetInfo(java.lang.String aComputerName,
java.lang.String aLocalGroupName,
GroupInfo aGroupInfo)
Modifies local group account properties. |
static void |
localGroupSetMembers(java.lang.String aComputerName,
java.lang.String aLocalGroupName,
java.util.Vector aMembers)
Sets local group's user/global group membership. |
static boolean |
logOn(java.lang.String aComputerName,
java.lang.String aUserName,
java.lang.String aPassword)
Tries to log on an arbitrary Windows machine. |
static void |
userAdd(java.lang.String aComputerName,
UserInfo aUserInfo)
Adds a user account to the machine specified. |
static void |
userDel(java.lang.String aComputerName,
java.lang.String aUserName)
Removes the specified user account from the specified machine. |
static UserInfo |
userGetInfo(java.lang.String aComputerName,
java.lang.String aUserName)
Retrieves all information accessible for the user specified. |
static java.lang.String |
userGetPrimaryGroup(java.lang.String aComputerName,
java.lang.String aUserName)
Retrieves user's Primary Group. |
static void |
userSetGlobalGroups(java.lang.String aComputerName,
java.lang.String aUserName,
java.util.Vector aGlobalGroups)
Sets user's global group membership. |
static void |
userSetInfo(java.lang.String aComputerName,
java.lang.String aUserName,
UserInfo aUserInfo)
Modifies user account properties. |
static void |
userSetPrimaryGroup(java.lang.String aComputerName,
java.lang.String aUserName,
java.lang.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(java.lang.String aComputerName, java.lang.String aUserName, java.lang.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(java.lang.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(java.lang.String aComputerName, java.lang.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(java.lang.String aComputerName, int aStartIndex, int aEntriesRequested, java.util.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 java.util.Vector getUserLocalGroups(java.lang.String aComputerName, java.lang.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 java.util.Vector getUserGlobalGroups(java.lang.String aComputerName, java.lang.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(java.lang.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(java.lang.String aComputerName, java.lang.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(java.lang.String aComputerName, java.lang.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(java.lang.String aComputerName, java.lang.String aUserName, java.util.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(java.lang.String aComputerName, java.lang.String aUserName, java.lang.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 java.lang.String userGetPrimaryGroup(java.lang.String aComputerName, java.lang.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(java.lang.String aComputerName, java.lang.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(java.lang.String aComputerName, int aStartIndex, int aEntriesRequested, java.util.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 java.util.Vector getGlobalGroupUsers(java.lang.String aComputerName, java.lang.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(java.lang.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(java.lang.String aComputerName, java.lang.String aGlobalGroupName, java.lang.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(java.lang.String aComputerName, java.lang.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(java.lang.String aComputerName, java.lang.String aGlobalGroupName, java.lang.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(java.lang.String aComputerName, java.lang.String aGlobalGroupName, java.util.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(java.lang.String aComputerName, java.lang.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(java.lang.String aComputerName, java.lang.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 java.util.Vector getLocalGroupsNames(java.lang.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 java.util.Vector getLocalGroupUsers(java.lang.String aComputerName, java.lang.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 java.util.Vector getLocalGroupGlobalGroups(java.lang.String aComputerName, java.lang.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(java.lang.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(java.lang.String aComputerName, java.lang.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(java.lang.String aComputerName, java.lang.String aLocalGroupName, java.util.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(java.lang.String aComputerName, java.lang.String aLocalGroupName, java.util.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(java.lang.String aComputerName, java.lang.String aLocalGroupName, java.util.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(java.lang.String aComputerName, java.lang.String aLocalGroupName, java.util.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(java.lang.String aComputerName, java.lang.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(java.lang.String aComputerName, java.lang.String aLocalGroupName, java.util.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 |