|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.inf.container.OrganizationSync
Ensures that organization-related properties of a user or set of users are in sync with their current organization. This enables administrators to safely update a user's organization.
For each user, OrganizationSync
does the following:
AdministrativeDomain
of the user's current
WTOrganization
. If the user does not have an
organization, then these objects are assigned to the
AdministrativeDomainHelper.UNAFFILIATED_DOMAIN
.
The objects whose domains are reassigned are:
WTUser
object
Notebook
AdministrativeDomain
.
Container Teams
the user is a
member of to reflect the user's current organizational
membership.
Notes:
OrganizationSync
does not remove the user from
their roles in any of their current team memberhsips. This must
be done manually by an administrator, if desired.
Usage:
java wt.inf.container.OrganizationSync selection-options
selection-options:
[--users user-list] | [--domains domain-list] |
[--domain-hierarchies domain-list] |
[--organizations organization-list]
user-list: A space-separated list of user names
domain-list: A space-separated list of domain paths
organization-list: A space-separated list of organization names
When domain-list
or organization-list
are
specified, then all the users in each domain or organization are
synchronized. When domain-hierarchies
is specified,
then all the users in each domain and in each domain's
descendent domains are synchronized.
Examples:
//Update the foo and bar users
java wt.inf.container.OrganizationSync --users foo bar
// Update all users in the site-level unaffiliated domain
// and the "PTC Inc" domain in the "PTC Inc" org container
java wt.inf.container.OrganizationSync --domains [/]/User/Unaffiliated "[/wt.inf.container.OrgContainer=PTC Inc]/PTC Inc"
// Update all users in the site-level user domain, and in
// all of its child domains
java wt.inf.container.OrgainzationSync --domain-hierarchies [/]/User
// Update all members of the "Acme Inc." and
// "Widget Intl." organizations
java wt.inf.container.OrganizationSync --organizations "Acme Inc." "Widget Intl."
Supported API: false
Extendable: false
Nested Class Summary | |
private static class |
OrganizationSync.UnaffiliatedDomain
|
Field Summary | |
private static String |
CLASSNAME
|
private static boolean |
DEBUG
|
private static String |
DOMAIN_ID
|
private static DebugWriter |
LOG
|
private static String |
SEPARATOR
|
Fields inherited from interface wt.method.RemoteAccess |
versionID |
Constructor Summary | |
OrganizationSync()
|
Method Summary | |
private static void |
checkAccess()
|
static void |
main(String[] args)
Command-line interface for synchronizing org information. |
private static void |
printUsage()
|
private static boolean |
removeMember(WTUser user,
WTPrincipalReference group_ref)
|
private static void |
resetPrincipalCache()
|
private static void |
sendFeedback(String message)
|
private static void |
sync(WTUser user)
|
static void |
syncDomain(String domain_path,
boolean include_descendents)
Synchronizes the organization information for the users in domain domain_path . |
static void |
syncOrganization(String org_name)
Synchronizes the organization information for the users in organization org_name . |
static void |
syncUser(String user_name)
Synchronizes the organization information for the user named user_name |
private static Boolean |
valueOf(boolean b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String CLASSNAME
private static final boolean DEBUG
private static final DebugWriter LOG
private static final String DOMAIN_ID
private static final String SEPARATOR
Constructor Detail |
public OrganizationSync()
Method Detail |
public static void main(String[] args)
args
- A list of users, domain paths, or organizations to synchronizeprivate static void printUsage()
public static void syncUser(String user_name) throws Exception
user_name
user_name
- The name of the user to synchronize
WTException
- If the user can't be found
Exception
public static void syncDomain(String domain_path, boolean include_descendents) throws Exception
domain_path
.
domain_path
- The path of the domain to look for users ininclude_descendents
- If true
, then users in descendent
domains are also synchronized
WTException
- If the domain can't be found
Exception
AdministrativeDomainManager.getDomain(String)
public static void syncOrganization(String org_name) throws Exception
org_name
.
org_name
- The name of the organization to look for users in
WTException
- If the organization can't be found
Exception
private static void sync(WTUser user) throws Exception
Exception
private static void checkAccess() throws Exception
Exception
private static void sendFeedback(String message) throws Exception
Exception
private static boolean removeMember(WTUser user, WTPrincipalReference group_ref) throws WTException
WTException
private static final void resetPrincipalCache() throws WTException
WTException
private static Boolean valueOf(boolean b)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |