wt.inf.team
Class StandardContainerTeamService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.inf.team.StandardContainerTeamService
All Implemented Interfaces:
ContainerTeamService, ContainerTeamServiceSvr, Manager, NetFactor, Serializable

public class StandardContainerTeamService
extends StandardManager
implements ContainerTeamServiceSvr, ContainerTeamService, Serializable

Use the newStandardContainerTeamService static factory method(s), not the StandardContainerTeamService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static Vector ALL_PERMISSION
           
private static String CLASSNAME
           
private  ProcessingQueue ctmdRecomputeMembershipQueue
           
private static ScheduleQueue ctScheduleQueue
           
private static boolean DEBUG
           
private static String DEFAULT_SENDER_EMAIL
           
static Object FORCE_USER_REMOVE
           
private static DebugWriter LOG
           
private static Vector READ_PERMISSION
           
private static int RECOMPUTE_MEMBERSHIP_QUEUE_DAY
           
private static String RECOMPUTE_MEMBERSHIP_QUEUE_NAME
           
private static String RECOMPUTE_MEMBERSHIP_QUEUE_TIME
           
private static int RECOMPUTE_QUEUE_INTERVAL
           
private static String REFRESH_GROUPS_QUEUE_TIME
           
private static String RESOURCE
           
private static String SCHEDULE_QUEUE_NAME
           
static StandardContainerTeamService service
           
private static String SERVICE_NAME
           
private static String TOP_CLASS
           
private static boolean USE_ALL_GROUP
           
private static boolean USE_RECOMPUTE_QUEUE
           
private static boolean USE_SCHEDULED_RECOMPUTE
           
private static boolean USE_SCHEDULED_REFRESH_GROUPS
           
private static boolean VERBOSE
           
private static boolean WTUSERS_USE_ACCESSPOLICYRULES
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardContainerTeamService()
           
 
Method Summary
private  StatusInfo _processRefreshGroups()
           
private  StatusInfo _recomputeAllCtmedObjects()
           
 ContainerTeamManaged activate(ContainerTeamManaged container)
          activate/start the ContainerTeamManaged object

Supported API: true
private  Vector activateMember(WTPrincipal princ, ContainerTeamManaged container, Vector invitationsToSend)
           
private  void addAdHocsForConfirmedWTOrg(WTOrganization usersOrg, ContainerTeamManaged container)
           
private  void addAdHocsForWTPrincipal(WTPrincipal principal, ContainerTeamManaged container)
           
 void addGuestMember(ContainerTeam team, WTPrincipal principal)
          This method adds the principal to guest group.
 void addMember(ContainerTeam team, Role role, WTPrincipal principal)
          This method adds the user to the necessary groups in the containers that use the container team.
private  HashMap addPrincipalToHashMap(HashMap hash, String role, WTPrincipal principal)
           
private  List addPrincipalToTeam(ContainerTeam team, Role role, WTPrincipal principal, List containers)
           
private  Vector addPrincipalToUserVector(Vector userVector, WTPrincipal principal)
           
private  void addToContainer(ContainerTeamManaged container, Role role, WTUser user, WTOrganization org, boolean emitEvent)
           
private  void addUserToOrgGroup(WTUser user, WTOrganization org, ContainerTeamManaged container, WTGroup group)
           
private  void autoPopulateAdminRole(ContainerTeamManaged container, Role role)
           
private  Timestamp calculateScheduleTime(String time, int day)
           
 void confirmParticipation(ContainerTeamManaged container, WTUser user)
          Given a WTContainer object and a WTUser, record the fact that the user has confirmed they will be participating in the container.
private  ContainerTeam copyContainerTeam(ContainerTeam team, String copyName, AdminDomainRef domain, boolean persist)
           
private  WTGroup createAndOrGetGroup(ContainerTeamManaged container, String nodeName, String groupName)
           
 ContainerTeamReference createContainerTeam(String name, OrgContainer orgContainer, String desc, TeamCategory category)
          Creates a new Container Team.
private  void createOrUpdateMyPageQueryableLink(ContainerTeamManaged container, WTUser user, boolean enabled)
           
private  ProcessingQueue createQueue(String queue_name, int queue_interval)
          Creates, sets and starts processing queues.
private  void deleteMyPageQueryableLink(ContainerTeamManaged container, WTUser user)
           
private  void deletePreviousEntries(QueryResult entries)
           
protected  void dispatchVetoableEvent(String eventType, ContainerTeamManaged object, WTUser replacedUser, WTUser newUser, ContainerTeamManagedState state, boolean reassign)
           
private  List findAHCObjects(WTContainer container, WTPrincipalReference user_ref)
           
private  List findContainersForTeam(ContainerTeam team)
           
 WTGroup findContainerTeamGroup(ContainerTeamManaged container, String searchBase, String groupName)
          This method returns a group stored in the container team ldap hiearchy.
 Enumeration findContainerTeamGroups(ContainerTeamManaged container, String searchBase)
          This method returns groups stored in the container team ldap hiearchy.
private  Set findContainerTeamManagedObjects(WTGroup principal)
           
private  QueryResult findContainerTeamManagedObjects(WTUser user)
           
private  Enumeration findExternalGroups(ContainerTeamManaged container)
           
private  WTGroup findGroup(ContainerTeamManaged container, String nodeName, String groupName)
           
private  QueryResult findPreviousEntries(String method_name)
          Deletes a previous schedule entry for the method and target object specified.
 QueryResult findRolePrincipalMap(Role role, WTPrincipal principal, ContainerTeam containerTeam)
          Based on the input parameters, return a QueryResult of RolePrincipalMap objects

Supported API: false
 Enumeration findRoles(ContainerTeamReference containerTeamReference, WTPrincipal principal)
          Find all the roles which this principal is a member of in the container team.
private  Enumeration findRoles2(ContainerTeam team, WTUser user)
           
private  List findSubscriptions(WTContainer container, WTUser user)
           
 Enumeration findUsers(ContainerTeamManaged container)
          

Supported API: true
 void fixInternalOrgGroups(WTUser user)
          Given a WTUser object this API will 'fix' the internal Org groups.
private  void fixInternalOrgGroups(WTUser user, ContainerTeamManaged container)
           
 String getConceptualClassname()
          Deprecated.  
static Enumeration getContainerRootDomains(ObjectIdentifier containerOID, boolean includeSystemDomain)
           
 ContainerTeam getContainerTeam(ContainerTeamManaged container)
          Returns the container team for the specified container.
private  DirectoryContextProvider getContextProvider(ContainerTeam team)
           
private  DirectoryContextProvider getContextProvider(ContainerTeamManaged container, String searchBase)
           
private  String getDeletedTeamName(ContainerTeam team)
           
private  InvitationTemplateProcessor getInvitationTemplateProcessor()
           
 QueryResult getMembersOf(ContainerSpec spec, int membership_state)
          Returns the WTUsers that are members of the containers specified by the ContainerSpec.
private  String getName(Object obj)
           
private  DirectoryInfrastructureNode getNode(ContainerTeam team, String name)
           
private  ObjectIdentifier getOid(Object obj)
           
private  WTOrganization getOrganization(WTUser user)
           
private  String getOrgGroupName(WTOrganization o)
           
 ProcessingQueue getRecomputeQueue()
           
private  String getRoleGroupName(Role role)
           
private  List getRoles(ContainerTeam team, WTUser user)
           
private static ScheduleQueue getScheduleQueue()
           
private  String getStringOfObjectIdentities(QueryResult qr)
           
private  DirectorySubtree getSubtree(ContainerTeam team)
           
private  DirectorySubtree getSubtree(ContainerTeamManaged container, String nodeName)
           
static boolean getUseAllGroup()
           
private  void handleDisabledWTGroup(WTGroup principal)
           
private  void handleDisabledWTUser(WTUser principal)
           
private  WTContainer hasCheckedOutObjs(List containers, WTUser user)
          Returns a container in the given list in which the has a checked out object; if there isn't a container in this situation, null is returned.
 ContainerTeamManaged inactivate(ContainerTeamManaged container, ContainerTeamManagedState state)
          inactivate/suspend the ContainerTeamManaged object

Supported API: true
private  boolean isAccessNode(String nodeName)
           
 boolean isConfirmedParticipant(ContainerTeamManaged container, WTUser user)
          Given a WTUser and a WTContainer return true/false - whether that user is a confirmed participant in that particular container.
private  boolean isContainerAdHocApplicable(Object target)
           
private  boolean isContainerAdHocApplicable(WTContainer container)
           
private  boolean isExplicitMember(ContainerTeam team, WTPrincipal principal, Role role)
           
 boolean isMember(ContainerTeamManaged container, WTUser user)
          Given a WTUser and Container, return whether that user is a member of the container's team.
private  boolean isMember(ContainerTeam team, WTPrincipal principal, Role role)
           
private  boolean isMemberOfTeam(ContainerTeam team, WTGroup group)
           
private  boolean isMemberOfTeam(ContainerTeam team, WTUser user)
           
private  boolean isObjectAdHocApplicable(Object target, boolean enforcePredecessorCheck)
           
private  boolean isPrincipalEquivOrNested(WTPrincipal principal, WTPrincipal lookingFor)
           
private  boolean isRole(ContainerTeam team, Role role)
           
private  boolean isUserEquivOrNested(WTPrincipalReference principalRef, WTUser user)
           
private  boolean isVirtuallyEmpty(WTGroup group)
           
private  void markContainerTeamDeleted(ContainerTeamManaged container)
           
private  void markContainerTeamRestored(ContainerTeamManaged container)
           
private  void markSelectedTeamsAsRefreshed(long[] oids)
           
private  void markTeamsToBeRefreshed(WTGroup group)
           
static StandardContainerTeamService newStandardContainerTeamService()
          Default factory for the class.
protected  void performStartupProcess()
          Dummy method to be overridden by subclasses.
private  void populateMyPageQueryable(ContainerTeamManaged container, WTUser user, Role role)
           
static StatusInfo processRefreshGroups()
           
private  void queuePeriodicRecompute()
           
private  void queueTeamsNeedingRefresh()
           
private  void reassignPermission(AdHocControlled ahc_obj, WTPrincipalReference old_user_ref, WTPrincipalReference new_user_ref)
           
private  void reassignPermissions(ContainerTeamManaged container, WTUser old_user, WTUser new_user)
           
private  void reassignSubscription(ObjectSubscription subscription, WTUser old_user, WTUser new_user)
           
private  void reassignSubscriptions(ContainerTeamManaged container, WTUser old_user, WTUser new_user)
           
private  void recompute(ContainerTeamManaged container)
           
static void recompute(ObjectIdentifier container_obj_id)
           
static StatusInfo recomputeAllCtmedObjects()
           
 void recomputeMembership(ContainerTeamManaged container)
          Synchs the ContainerTeamMembership with the LDAP groups.
private  void recomputeMembership(ObjectIdentifier oid)
           
 void recomputeMembership(WTGroup group)
          Synchs the ContainerTeamMembership with the LDAP groups.
protected  void registerAsListener()
          Register as a listener for dispatched events.
 void registerEvents()
           
private  void removeAdHocsForConfirmedOrg(WTOrganization usersOrg, ContainerTeamManaged container)
           
private  void removeAdHocsForExternalGroup(WTGroup group, ContainerTeamManaged container)
           
private  void removeAdHocsForUser(WTUser user, ContainerTeamManaged container)
           
private  void removeFromContainer(ContainerTeamManaged container, Role role, WTUser user, WTOrganization org, boolean emitEvent, boolean autoPopAdminGroup)
           
private  void removeFromContainerInternals(ContainerTeamManaged container, WTUser user, WTOrganization org, boolean emitEvent)
           
 void removeGuestMember(ContainerTeam team, WTPrincipal principal)
          This method removes the principal from the guest group.
 void removeMember(ContainerTeam team, Role role, WTPrincipal principal)
          This method removed the user from the necessary groups in the containers that use the container team.
private  void removePrincipalFromTeam(ContainerTeam team, Role role, WTPrincipal principal)
           
 void removeRole(ContainerTeam team, Role role)
          This method removes the user participating in the role from the necessary groups in the containers that use the container team.
private  void removeUserFromOrgGroup(WTUser user, WTOrganization org, ContainerTeamManaged container, WTGroup group)
           
private  void removeWTPrincipalAdHocs(ContainerTeamManaged container)
           
static void removeWTPrincipalAdHocs(ObjectIdentifier oid)
          Used for queued processing of deleted containers

Supported API: false
private  void renameLDAPnode(ContainerTeamManaged container)
           
static void renameLDAPnode(ObjectIdentifier oid)
          Used for queued processing of deleted and restored containers

Supported API: false
 void replaceUser(ContainerTeamReference teamReference, WTUser replacedUser, WTUser newUser, boolean reassign)
          Deprecated.  
 void replaceUser(ContainerTeamReference teamReference, WTUser replacedUser, WTUser newUser, boolean reassign, boolean removed)
          Replace the user in all containers that use the container team.
private  void sendInvite(ContainerTeamManaged container, WTUser invitee, WTUser replacedUser)
           
private  void sendReplaceInvitation(List containers, WTUser new_user, WTUser old_user)
           
 WTContained setDefaultAdHocAcl(ContainerTeamManaged container, WTContained contained)
          

Supported API: false
private  WTCollection setDefaultAdHocAcl(Folder location, WTCollection collection)
           
private  WTCollection setDefaultAdHocAcl(WTCollection collection)
           
 AdHocControlled setPrincipalAdHocAcl(ContainerTeamManaged container, AdHocControlled per, Vector perms, WTPrincipal principal)
          Set the ad-hoc access rights for a given user or group.
 AdHocControlled setRoleAdHocAcl(ContainerTeamManaged container, AdHocControlled per, Vector perms, String roleName)
          Set the ad-hoc access rights for a given role in the container's team.
private  String showList(List list)
           
private  void terminateProcesses(Enumeration enum)
           
private  void undoCheckouts(List containers, WTUser user)
           
private  void updateContainerTeamName(WTContainer container)
           
private  QueryResult whereUsed(ContainerTeam team)
           
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

service

public static StandardContainerTeamService service

RECOMPUTE_MEMBERSHIP_QUEUE_NAME

private static final String RECOMPUTE_MEMBERSHIP_QUEUE_NAME
See Also:
Constant Field Values

ctmdRecomputeMembershipQueue

private ProcessingQueue ctmdRecomputeMembershipQueue

USE_RECOMPUTE_QUEUE

private static final boolean USE_RECOMPUTE_QUEUE

RECOMPUTE_QUEUE_INTERVAL

private static final int RECOMPUTE_QUEUE_INTERVAL

ctScheduleQueue

private static ScheduleQueue ctScheduleQueue

SCHEDULE_QUEUE_NAME

private static final String SCHEDULE_QUEUE_NAME
See Also:
Constant Field Values

USE_SCHEDULED_RECOMPUTE

private static final boolean USE_SCHEDULED_RECOMPUTE

RECOMPUTE_MEMBERSHIP_QUEUE_DAY

private static final int RECOMPUTE_MEMBERSHIP_QUEUE_DAY

RECOMPUTE_MEMBERSHIP_QUEUE_TIME

private static final String RECOMPUTE_MEMBERSHIP_QUEUE_TIME

USE_SCHEDULED_REFRESH_GROUPS

private static final boolean USE_SCHEDULED_REFRESH_GROUPS

REFRESH_GROUPS_QUEUE_TIME

private static final String REFRESH_GROUPS_QUEUE_TIME

TOP_CLASS

private static final String TOP_CLASS

DEBUG

private static final boolean DEBUG

LOG

private static final DebugWriter LOG

VERBOSE

private static final boolean VERBOSE

SERVICE_NAME

private static final String SERVICE_NAME
See Also:
Constant Field Values

DEFAULT_SENDER_EMAIL

private static final String DEFAULT_SENDER_EMAIL

ALL_PERMISSION

private static final Vector ALL_PERMISSION

WTUSERS_USE_ACCESSPOLICYRULES

private static final boolean WTUSERS_USE_ACCESSPOLICYRULES

USE_ALL_GROUP

private static final boolean USE_ALL_GROUP

READ_PERMISSION

private static final Vector READ_PERMISSION

FORCE_USER_REMOVE

public static final Object FORCE_USER_REMOVE
Constructor Detail

StandardContainerTeamService

public StandardContainerTeamService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

newStandardContainerTeamService

public static StandardContainerTeamService newStandardContainerTeamService()
                                                                    throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardContainerTeamService
Throws:
WTException

isConfirmedParticipant

public boolean isConfirmedParticipant(ContainerTeamManaged container,
                                      WTUser user)
                               throws WTException
Given a WTUser and a WTContainer return true/false - whether that user is a confirmed participant in that particular container.

Supported API: false

Specified by:
isConfirmedParticipant in interface ContainerTeamServiceSvr
Parameters:
container - The container of interest.
user - The WTUser of interest.
Returns:
boolean
Throws:
WTException

findRoles

public Enumeration findRoles(ContainerTeamReference containerTeamReference,
                             WTPrincipal principal)
                      throws WTException
Find all the roles which this principal is a member of in the container team.

Supported API: false

Specified by:
findRoles in interface ContainerTeamServiceSvr
Parameters:
containerTeamReference - The container to search for the user's roles.
principal - The principal to search for membership in roles.
Returns:
Enumeration
Throws:
WTException

isMember

public boolean isMember(ContainerTeamManaged container,
                        WTUser user)
                 throws WTException
Given a WTUser and Container, return whether that user is a member of the container's team.

Supported API: true

Specified by:
isMember in interface ContainerTeamServiceSvr
Parameters:
container - The container to search for membership of user.
user - The user to determine membership of.
Returns:
boolean
Throws:
WTException

findUsers

public Enumeration findUsers(ContainerTeamManaged container)
                      throws WTException


Supported API: true

Specified by:
findUsers in interface ContainerTeamServiceSvr
Parameters:
container -
Returns:
Enumeration
Throws:
WTException

fixInternalOrgGroups

public void fixInternalOrgGroups(WTUser user)
                          throws WTException
Given a WTUser object this API will 'fix' the internal Org groups. The user will be removed from any existing org groups and added to the 'correct' one (based on the current user's o= attribute setting). .

Supported API: true

Specified by:
fixInternalOrgGroups in interface ContainerTeamServiceSvr
Parameters:
user -
Throws:
WTException

confirmParticipation

public void confirmParticipation(ContainerTeamManaged container,
                                 WTUser user)
                          throws WTException
Given a WTContainer object and a WTUser, record the fact that the user has confirmed they will be participating in the container.

Supported API: false

Specified by:
confirmParticipation in interface ContainerTeamService
Parameters:
container -
user - The user that is confirming participation in the project
Throws:
WTException

setDefaultAdHocAcl

public WTContained setDefaultAdHocAcl(ContainerTeamManaged container,
                                      WTContained contained)
                               throws WTException,
                                      ClassNotFoundException


Supported API: false

Specified by:
setDefaultAdHocAcl in interface ContainerTeamService
Parameters:
container -
contained -
Returns:
WTContained
Throws:
WTException
ClassNotFoundException

createContainerTeam

public ContainerTeamReference createContainerTeam(String name,
                                                  OrgContainer orgContainer,
                                                  String desc,
                                                  TeamCategory category)
                                           throws WTException
Creates a new Container Team.

Supported API: true

Specified by:
createContainerTeam in interface ContainerTeamService
Parameters:
name - The name of the container team.
orgContainer - The OrgContainer where the container is being created.
desc - A description of the container team.
category - Enumerated TeamCategory value.
Returns:
ContainerTeamReference
Throws:
WTException

addMember

public void addMember(ContainerTeam team,
                      Role role,
                      WTPrincipal principal)
               throws WTException
This method adds the user to the necessary groups in the containers that use the container team.

Supported API: true

Specified by:
addMember in interface ContainerTeamService
Parameters:
team - The team where the participant should be added to the specified role.
role - The role where the participant will be added as a team member.
principal - The principal to be added to the role in the team.
Throws:
WTException

removeMember

public void removeMember(ContainerTeam team,
                         Role role,
                         WTPrincipal principal)
                  throws WTException
This method removed the user from the necessary groups in the containers that use the container team.

Supported API: true

Specified by:
removeMember in interface ContainerTeamService
Parameters:
team - The team where the participant should be removed from the specified role.
role - The role where the participant will be removed as a team member.
principal - The principal to be removed from the role in the team.
Throws:
WTException

removeRole

public void removeRole(ContainerTeam team,
                       Role role)
                throws WTException
This method removes the user participating in the role from the necessary groups in the containers that use the container team.

Supported API: true

Specified by:
removeRole in interface ContainerTeamService
Parameters:
team - The team where the role and should be removed. Participants who do not belong to additional roles in the team will be removed completely from the container team.
role - The role that should be removed from the team.
Throws:
WTException

replaceUser

public void replaceUser(ContainerTeamReference teamReference,
                        WTUser replacedUser,
                        WTUser newUser,
                        boolean reassign)
                 throws WTException
Deprecated.  

Replace the user in all containers that use the container team.

Supported API: false

Specified by:
replaceUser in interface ContainerTeamService
Parameters:
teamReference - A reference to the ContainerTeam where the user should be replaced.
replacedUser - The user being replaced.
newUser - The user taking the place of the replaced user.
reassign - A flag that indicates whether or not ad hoc acls and object subscriptions should be assigned to the new user.
Throws:
WTException

recomputeMembership

public void recomputeMembership(ContainerTeamManaged container)
                         throws WTException
Synchs the ContainerTeamMembership with the LDAP groups.

Supported API: true

Specified by:
recomputeMembership in interface ContainerTeamService
Parameters:
container - The container that should be synched with the team.
Throws:
WTException

recomputeMembership

public void recomputeMembership(WTGroup group)
                         throws WTException
Synchs the ContainerTeamMembership with the LDAP groups.

Supported API: true

Specified by:
recomputeMembership in interface ContainerTeamService
Parameters:
group -
Throws:
WTException

inactivate

public ContainerTeamManaged inactivate(ContainerTeamManaged container,
                                       ContainerTeamManagedState state)
                                throws WTException
inactivate/suspend the ContainerTeamManaged object

Supported API: true

Specified by:
inactivate in interface ContainerTeamService
Parameters:
container - the containerTeamManaged object to be inactiviated/suspended
state - the ContainerTeamManagedState that the inactivated container should be set to
Returns:
ContainerTeamManaged
Throws:
WTException

activate

public ContainerTeamManaged activate(ContainerTeamManaged container)
                              throws WTException
activate/start the ContainerTeamManaged object

Supported API: true

Specified by:
activate in interface ContainerTeamService
Parameters:
container - the ContainerTeamManaged object to be activated/started
Returns:
ContainerTeamManaged
Throws:
WTException

findRolePrincipalMap

public QueryResult findRolePrincipalMap(Role role,
                                        WTPrincipal principal,
                                        ContainerTeam containerTeam)
                                 throws WTException
Based on the input parameters, return a QueryResult of RolePrincipalMap objects

Supported API: false

Specified by:
findRolePrincipalMap in interface ContainerTeamService
Parameters:
role -
principal -
containerTeam -
Returns:
QueryResult
Throws:
WTException

findContainerTeamGroups

public Enumeration findContainerTeamGroups(ContainerTeamManaged container,
                                           String searchBase)
                                    throws WTException
This method returns groups stored in the container team ldap hiearchy. The search base indicates the node to search in the LDAP hiearchy. Node: ContainerTeamHelper.MEMBERSHIP_GROUPS Groups that will be found in node: ContainerTeamHelper.MY_PAGE_QUERYABLE ContainerTeamHelper.INVITED ContainerTeamHelper.USERS Node: ContainerTeamHelper.OTHER_GROUPS Groups that will be found in node: ContainerTeamHelper.GUEST ContainerTeamHelper.CONFIRMED Node: ContainerTeamHelper.ROLE_GROUPS Groups that will be found in node: Any group created from a role Node: ContainerTeamHelper.ORG_GROUPS Groups that will be found in node: Any group created from a role. Node: ContainerTeamHelper.ACCESS_GROUPS All groups found under the OTHER_GROUPS, ROLE_GROUPS and ORG_GROUPS nodes.

Supported API: false

Specified by:
findContainerTeamGroups in interface ContainerTeamService
Parameters:
container -
searchBase -
Returns:
Enumeration
Throws:
WTException

getContainerTeam

public ContainerTeam getContainerTeam(ContainerTeamManaged container)
                               throws WTException
Returns the container team for the specified container.

Supported API: true

Specified by:
getContainerTeam in interface ContainerTeamService
Parameters:
container - The container of interest.
Returns:
ContainerTeam
Throws:
WTException

findContainerTeamGroup

public WTGroup findContainerTeamGroup(ContainerTeamManaged container,
                                      String searchBase,
                                      String groupName)
                               throws WTException
This method returns a group stored in the container team ldap hiearchy. The search base indicates the node to search in the LDAP hiearchy. The groupName is the name of the group you want to find. Valid search bases are as follows: Node: ContainerTeamHelper.MEMBERSHIP_GROUPS Groups found in node: ContainerTeamHelper.MY_PAGE_QUERYABLE ContainerTeamHelper.INVITED ContainerTeamHelper.USERS Node: ContainerTeamHelper.OTHER_GROUPS Groups found in node: ContainerTeamHelper.GUEST ContainerTeamHelper.CONFIRMED Node: ContainerTeamHelper.ROLE_GROUPS Groups found in node: Any group created from a role Node: ContainerTeamHelper.ORG_GROUPS Groups found in node: Any group created from a role.

Supported API: false

Specified by:
findContainerTeamGroup in interface ContainerTeamService
Parameters:
container -
searchBase -
groupName -
Returns:
WTGroup
Throws:
WTException

getMembersOf

public QueryResult getMembersOf(ContainerSpec spec,
                                int membership_state)
                         throws WTException
Returns the WTUsers that are members of the containers specified by the ContainerSpec.

Supported API: false

Specified by:
getMembersOf in interface ContainerTeamService
Parameters:
spec - Defines the set of containers to search in
membership_state - The membership state of the users that are returned. This is one of the membership state constants defined in ContainerSpec.
Returns:
QueryResult
Throws:
WTException
See Also:
ContainerSpec

addGuestMember

public void addGuestMember(ContainerTeam team,
                           WTPrincipal principal)
                    throws WTException
This method adds the principal to guest group.

Supported API: true

Specified by:
addGuestMember in interface ContainerTeamService
Parameters:
team - The team where the participant should be added to the specified role.
principal - The principal to be added to the role in the team.
Throws:
WTException

removeGuestMember

public void removeGuestMember(ContainerTeam team,
                              WTPrincipal principal)
                       throws WTException
This method removes the principal from the guest group.

Supported API: true

Specified by:
removeGuestMember in interface ContainerTeamService
Parameters:
team - The team where the participant should be removed from the specified role.
principal - The principal to be removed from the role in the team.
Throws:
WTException

replaceUser

public void replaceUser(ContainerTeamReference teamReference,
                        WTUser replacedUser,
                        WTUser newUser,
                        boolean reassign,
                        boolean removed)
                 throws WTException
Replace the user in all containers that use the container team.

Supported API: true

Specified by:
replaceUser in interface ContainerTeamService
Parameters:
teamReference - A reference to the ContainerTeam where the user should be replaced.
replacedUser - The user being replaced.
newUser - The user taking the place of the replaced user.
reassign - A flag that indicates whether or not ad hoc acls and object subscriptions should be assigned to the new user.
removed - This should be true if this was called as a result of the user being removed from the container. This boolean is needed to determine the message to display if the user cannot be removed due to checked out objects.
Throws:
WTException

setRoleAdHocAcl

public AdHocControlled setRoleAdHocAcl(ContainerTeamManaged container,
                                       AdHocControlled per,
                                       Vector perms,
                                       String roleName)
                                throws WTException
Set the ad-hoc access rights for a given role in the container's team. To remove all the ad-hoc access rights granted by the ProjectLink access ui or by this method previously, pass it an empty Vector of permissions. The object is returned after is has been saved.

Supported API: true

Specified by:
setRoleAdHocAcl in interface ContainerTeamService
Parameters:
container - The Container for which the object is located in and for which to get the role from.
per - The object to set access on.
perms - a list of wt.access.AccessPermissions to grant to the role. If MODIFY is specified, a READ permission will be implicitly added as well. If the list is empty, all permissions will be removed for the role.
roleName - The role name that is used to find the container's role. Example, for out-of-the box roles, pass is all upper-case forms of the role name in english: "MANUFACTURER". For custom roles, pass in the string exactly as entered in the modify team ui: "my Custom Role".
Returns:
AdHocControlled
Throws:
WTException

setPrincipalAdHocAcl

public AdHocControlled setPrincipalAdHocAcl(ContainerTeamManaged container,
                                            AdHocControlled per,
                                            Vector perms,
                                            WTPrincipal principal)
                                     throws WTException
Set the ad-hoc access rights for a given user or group. To remove all the ad-hoc access rights granted by the ProjectLink access ui or by this method previously, pass it an empty Vector of permissions. The object is returned after is has been saved.

Supported API: true

Specified by:
setPrincipalAdHocAcl in interface ContainerTeamService
Parameters:
container - The Container for which the object is located in and for which to get the role from.
per - The object to set access on.
perms - a list of wt.access.AccessPermissions to grant to the role. If MODIFY is specified, a READ permission will be implicitly added as well. If the list is empty, all permissions will be removed for the role.
principal - The user or group that is getting the new access level.
Returns:
AdHocControlled
Throws:
WTException

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
Description copied from class: StandardManager
Dummy method to be overridden by subclasses. Subclasses should override this method and provide startup processing.

Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

registerAsListener

protected void registerAsListener()
                           throws ManagerException
Register as a listener for dispatched events. This method registers for:

Throws:
ManagerException

registerEvents

public void registerEvents()

dispatchVetoableEvent

protected void dispatchVetoableEvent(String eventType,
                                     ContainerTeamManaged object,
                                     WTUser replacedUser,
                                     WTUser newUser,
                                     ContainerTeamManagedState state,
                                     boolean reassign)
                              throws WTException,
                                     WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

isContainerAdHocApplicable

private boolean isContainerAdHocApplicable(Object target)
                                    throws WTException
Throws:
WTException

isContainerAdHocApplicable

private boolean isContainerAdHocApplicable(WTContainer container)

isObjectAdHocApplicable

private boolean isObjectAdHocApplicable(Object target,
                                        boolean enforcePredecessorCheck)

whereUsed

private QueryResult whereUsed(ContainerTeam team)
                       throws WTException
Throws:
WTException

removeWTPrincipalAdHocs

public static final void removeWTPrincipalAdHocs(ObjectIdentifier oid)
                                          throws WTException
Used for queued processing of deleted containers

Supported API: false

Parameters:
oid - The oid of the container of interest.
Returns:
void
Throws:
WTException

removeWTPrincipalAdHocs

private void removeWTPrincipalAdHocs(ContainerTeamManaged container)
                              throws WTException
Throws:
WTException

handleDisabledWTUser

private void handleDisabledWTUser(WTUser principal)
                           throws WTException
Throws:
WTException

handleDisabledWTGroup

private void handleDisabledWTGroup(WTGroup principal)
                            throws WTException
Throws:
WTException

autoPopulateAdminRole

private void autoPopulateAdminRole(ContainerTeamManaged container,
                                   Role role)
                            throws WTException
Throws:
WTException

markContainerTeamDeleted

private void markContainerTeamDeleted(ContainerTeamManaged container)
                               throws WTException
Throws:
WTException

markContainerTeamRestored

private void markContainerTeamRestored(ContainerTeamManaged container)
                                throws WTException
Throws:
WTException

copyContainerTeam

private ContainerTeam copyContainerTeam(ContainerTeam team,
                                        String copyName,
                                        AdminDomainRef domain,
                                        boolean persist)
                                 throws WTException
Throws:
WTException

addPrincipalToTeam

private List addPrincipalToTeam(ContainerTeam team,
                                Role role,
                                WTPrincipal principal,
                                List containers)
                         throws WTException
Throws:
WTException

addToContainer

private void addToContainer(ContainerTeamManaged container,
                            Role role,
                            WTUser user,
                            WTOrganization org,
                            boolean emitEvent)
                     throws WTException
Throws:
WTException

activateMember

private Vector activateMember(WTPrincipal princ,
                              ContainerTeamManaged container,
                              Vector invitationsToSend)
                       throws WTException
Throws:
WTException

populateMyPageQueryable

private void populateMyPageQueryable(ContainerTeamManaged container,
                                     WTUser user,
                                     Role role)
                              throws WTException
Throws:
WTException

createOrUpdateMyPageQueryableLink

private void createOrUpdateMyPageQueryableLink(ContainerTeamManaged container,
                                               WTUser user,
                                               boolean enabled)
                                        throws WTException
Throws:
WTException

addUserToOrgGroup

private void addUserToOrgGroup(WTUser user,
                               WTOrganization org,
                               ContainerTeamManaged container,
                               WTGroup group)
                        throws WTException
Throws:
WTException

addAdHocsForWTPrincipal

private void addAdHocsForWTPrincipal(WTPrincipal principal,
                                     ContainerTeamManaged container)
                              throws WTException
Throws:
WTException

addAdHocsForConfirmedWTOrg

private void addAdHocsForConfirmedWTOrg(WTOrganization usersOrg,
                                        ContainerTeamManaged container)
                                 throws WTException
Throws:
WTException

removePrincipalFromTeam

private void removePrincipalFromTeam(ContainerTeam team,
                                     Role role,
                                     WTPrincipal principal)
                              throws WTException
Throws:
WTException

removeFromContainer

private void removeFromContainer(ContainerTeamManaged container,
                                 Role role,
                                 WTUser user,
                                 WTOrganization org,
                                 boolean emitEvent,
                                 boolean autoPopAdminGroup)
                          throws WTException
Throws:
WTException

isVirtuallyEmpty

private boolean isVirtuallyEmpty(WTGroup group)
                          throws WTException
Throws:
WTException

removeFromContainerInternals

private void removeFromContainerInternals(ContainerTeamManaged container,
                                          WTUser user,
                                          WTOrganization org,
                                          boolean emitEvent)
                                   throws WTException
Throws:
WTException

removeUserFromOrgGroup

private void removeUserFromOrgGroup(WTUser user,
                                    WTOrganization org,
                                    ContainerTeamManaged container,
                                    WTGroup group)
                             throws WTException
Throws:
WTException

deleteMyPageQueryableLink

private void deleteMyPageQueryableLink(ContainerTeamManaged container,
                                       WTUser user)
                                throws WTException
Throws:
WTException

removeAdHocsForUser

private void removeAdHocsForUser(WTUser user,
                                 ContainerTeamManaged container)
                          throws WTException
Throws:
WTException

removeAdHocsForConfirmedOrg

private void removeAdHocsForConfirmedOrg(WTOrganization usersOrg,
                                         ContainerTeamManaged container)
                                  throws WTException
Throws:
WTException

removeAdHocsForExternalGroup

private void removeAdHocsForExternalGroup(WTGroup group,
                                          ContainerTeamManaged container)
                                   throws WTException
Throws:
WTException

getRoles

private List getRoles(ContainerTeam team,
                      WTUser user)
               throws WTException
Throws:
WTException

hasCheckedOutObjs

private WTContainer hasCheckedOutObjs(List containers,
                                      WTUser user)
                               throws WTException
Returns a container in the given list in which the has a checked out object; if there isn't a container in this situation, null is returned. passed as argument.

Throws:
WTException

undoCheckouts

private void undoCheckouts(List containers,
                           WTUser user)
                    throws WTException
Throws:
WTException

reassignSubscriptions

private void reassignSubscriptions(ContainerTeamManaged container,
                                   WTUser old_user,
                                   WTUser new_user)
                            throws WTException
Throws:
WTException

findSubscriptions

private List findSubscriptions(WTContainer container,
                               WTUser user)
                        throws WTException
Throws:
WTException

reassignSubscription

private void reassignSubscription(ObjectSubscription subscription,
                                  WTUser old_user,
                                  WTUser new_user)
                           throws WTException
Throws:
WTException

reassignPermissions

private void reassignPermissions(ContainerTeamManaged container,
                                 WTUser old_user,
                                 WTUser new_user)
                          throws WTException
Throws:
WTException

findAHCObjects

private List findAHCObjects(WTContainer container,
                            WTPrincipalReference user_ref)
                     throws WTException
Throws:
WTException

reassignPermission

private void reassignPermission(AdHocControlled ahc_obj,
                                WTPrincipalReference old_user_ref,
                                WTPrincipalReference new_user_ref)
                         throws WTException
Throws:
WTException

getRecomputeQueue

public ProcessingQueue getRecomputeQueue()
                                  throws WTException
Throws:
WTException

createQueue

private ProcessingQueue createQueue(String queue_name,
                                    int queue_interval)
                             throws WTException
Creates, sets and starts processing queues.

Parameters:
queue_name - - queue name
queue_interval - - queue polling interval
Throws:
WTException

recompute

public static void recompute(ObjectIdentifier container_obj_id)
                      throws WTException
Throws:
WTException

recompute

private void recompute(ContainerTeamManaged container)
                throws WTException
Throws:
WTException

queuePeriodicRecompute

private void queuePeriodicRecompute()
                             throws WTException
Throws:
WTException

queueTeamsNeedingRefresh

private void queueTeamsNeedingRefresh()
                               throws WTException
Throws:
WTException

findPreviousEntries

private QueryResult findPreviousEntries(String method_name)
                                 throws WTException
Deletes a previous schedule entry for the method and target object specified. Because this method is called every time an entry is queued, there is at most one previous entry.

This is to prevent multiple triggering of the same method.

Throws:
WTException

deletePreviousEntries

private void deletePreviousEntries(QueryResult entries)
                            throws WTException
Throws:
WTException

getScheduleQueue

private static ScheduleQueue getScheduleQueue()
                                       throws WTException
Throws:
WTException

recomputeAllCtmedObjects

public static StatusInfo recomputeAllCtmedObjects()
                                           throws WTException
Throws:
WTException

_recomputeAllCtmedObjects

private StatusInfo _recomputeAllCtmedObjects()
                                      throws WTException
Throws:
WTException

processRefreshGroups

public static StatusInfo processRefreshGroups()
                                       throws WTException
Throws:
WTException

_processRefreshGroups

private StatusInfo _processRefreshGroups()
                                  throws WTException
Throws:
WTException

calculateScheduleTime

private Timestamp calculateScheduleTime(String time,
                                        int day)

addPrincipalToHashMap

private HashMap addPrincipalToHashMap(HashMap hash,
                                      String role,
                                      WTPrincipal principal)
                               throws WTException
Throws:
WTException

addPrincipalToUserVector

private Vector addPrincipalToUserVector(Vector userVector,
                                        WTPrincipal principal)
                                 throws WTException
Throws:
WTException

fixInternalOrgGroups

private void fixInternalOrgGroups(WTUser user,
                                  ContainerTeamManaged container)
                           throws WTException
Throws:
WTException

sendInvite

private void sendInvite(ContainerTeamManaged container,
                        WTUser invitee,
                        WTUser replacedUser)
                 throws WTException,
                        WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getInvitationTemplateProcessor

private InvitationTemplateProcessor getInvitationTemplateProcessor()

sendReplaceInvitation

private void sendReplaceInvitation(List containers,
                                   WTUser new_user,
                                   WTUser old_user)

findContainerTeamManagedObjects

private QueryResult findContainerTeamManagedObjects(WTUser user)
                                             throws WTException
Throws:
WTException

isExplicitMember

private boolean isExplicitMember(ContainerTeam team,
                                 WTPrincipal principal,
                                 Role role)
                          throws WTException
Throws:
WTException

isMember

private boolean isMember(ContainerTeam team,
                         WTPrincipal principal,
                         Role role)
                  throws WTException
Throws:
WTException

isRole

private boolean isRole(ContainerTeam team,
                       Role role)
                throws WTException
Throws:
WTException

isMemberOfTeam

private boolean isMemberOfTeam(ContainerTeam team,
                               WTGroup group)
                        throws WTException
Throws:
WTException

isMemberOfTeam

private boolean isMemberOfTeam(ContainerTeam team,
                               WTUser user)
                        throws WTException
Throws:
WTException

findExternalGroups

private Enumeration findExternalGroups(ContainerTeamManaged container)
                                throws WTException
Throws:
WTException

createAndOrGetGroup

private WTGroup createAndOrGetGroup(ContainerTeamManaged container,
                                    String nodeName,
                                    String groupName)
                             throws WTException
Throws:
WTException

findGroup

private WTGroup findGroup(ContainerTeamManaged container,
                          String nodeName,
                          String groupName)
                   throws WTException
Throws:
WTException

getContextProvider

private DirectoryContextProvider getContextProvider(ContainerTeamManaged container,
                                                    String searchBase)
                                             throws WTException
Throws:
WTException

getContextProvider

private DirectoryContextProvider getContextProvider(ContainerTeam team)
                                             throws WTException
Throws:
WTException

getSubtree

private DirectorySubtree getSubtree(ContainerTeam team)
                             throws WTException
Throws:
WTException

getSubtree

private DirectorySubtree getSubtree(ContainerTeamManaged container,
                                    String nodeName)
                             throws WTException
Throws:
WTException

isAccessNode

private boolean isAccessNode(String nodeName)

getRoleGroupName

private String getRoleGroupName(Role role)
                         throws WTException
Throws:
WTException

getOrgGroupName

private String getOrgGroupName(WTOrganization o)
                        throws WTException
Throws:
WTException

findContainerTeamManagedObjects

private Set findContainerTeamManagedObjects(WTGroup principal)
                                     throws WTException
Throws:
WTException

findContainersForTeam

private List findContainersForTeam(ContainerTeam team)
                            throws WTException
Throws:
WTException

getOrganization

private WTOrganization getOrganization(WTUser user)
                                throws WTException
Throws:
WTException

getOid

private ObjectIdentifier getOid(Object obj)
                         throws WTException
Throws:
WTException

getStringOfObjectIdentities

private String getStringOfObjectIdentities(QueryResult qr)
                                    throws WTException
Throws:
WTException

findRoles2

private Enumeration findRoles2(ContainerTeam team,
                               WTUser user)
                        throws WTException
Throws:
WTException

isUserEquivOrNested

private boolean isUserEquivOrNested(WTPrincipalReference principalRef,
                                    WTUser user)
                             throws WTException
Throws:
WTException

isPrincipalEquivOrNested

private boolean isPrincipalEquivOrNested(WTPrincipal principal,
                                         WTPrincipal lookingFor)
                                  throws WTException
Throws:
WTException

showList

private String showList(List list)
                 throws WTException
Throws:
WTException

getName

private String getName(Object obj)
                throws WTException
Throws:
WTException

updateContainerTeamName

private void updateContainerTeamName(WTContainer container)
                              throws WTException
Throws:
WTException

renameLDAPnode

public static final void renameLDAPnode(ObjectIdentifier oid)
                                 throws WTException
Used for queued processing of deleted and restored containers

Supported API: false

Parameters:
oid - The oid of the container of interest.
Returns:
void
Throws:
WTException

renameLDAPnode

private void renameLDAPnode(ContainerTeamManaged container)
                     throws WTException
Throws:
WTException

getDeletedTeamName

private String getDeletedTeamName(ContainerTeam team)

getNode

private DirectoryInfrastructureNode getNode(ContainerTeam team,
                                            String name)
                                     throws WTException
Throws:
WTException

terminateProcesses

private void terminateProcesses(Enumeration enum)
                         throws WTException
Throws:
WTException

getUseAllGroup

public static boolean getUseAllGroup()

setDefaultAdHocAcl

private WTCollection setDefaultAdHocAcl(WTCollection collection)
                                 throws WTException,
                                        ClassNotFoundException
Throws:
WTException
ClassNotFoundException

setDefaultAdHocAcl

private WTCollection setDefaultAdHocAcl(Folder location,
                                        WTCollection collection)
                                 throws WTException,
                                        ClassNotFoundException
Throws:
WTException
ClassNotFoundException

recomputeMembership

private void recomputeMembership(ObjectIdentifier oid)
                          throws WTException
Throws:
WTException

markSelectedTeamsAsRefreshed

private void markSelectedTeamsAsRefreshed(long[] oids)
                                   throws WTException
Throws:
WTException

markTeamsToBeRefreshed

private void markTeamsToBeRefreshed(WTGroup group)
                             throws WTException
Throws:
WTException

getContainerRootDomains

public static Enumeration getContainerRootDomains(ObjectIdentifier containerOID,
                                                  boolean includeSystemDomain)
                                           throws WTException
Throws:
WTException