Package wt.inf.team
Interface ContainerTeamService
- All Known Implementing Classes:
StandardContainerTeamService
Methods for manipulating ContainerTeams
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionactivate(ContainerTeamManaged container) activate/start the ContainerTeamManaged object
Supported API: truebooleanaddGuestMember(ContainerTeam team, WTPrincipal principal) This method adds the principal to guest group.booleanaddGuestMembers(ContainerTeam team, List<WTPrincipal> principal_list) This method adds the given principals to the guest group.voidaddMember(ContainerTeam team, Role role, WTPrincipal principal) This method adds the user to the necessary groups in the containers that use the container team.booleanaddMembers(ContainerTeam team, Role role, List<WTPrincipal> principalList) This method adds the principals to the necessary groups in the containers that use the container team.createContainerTeam(String name, OrgContainer orgContainer, String desc, TeamCategory category) Creates a new Container Team.createContainerTeam(String name, OrgContainer orgContainer, String desc, TeamCategory category, boolean shared, boolean enabled, boolean extendable, String sharedTeamInvitationMsg, WTPrincipalReference creator) Creates a container team.Returns a list of the ContainerTeamManaged objects that use the team.findContainerTeamGroup(ContainerTeamManaged container, String searchBase, String groupName) This method returns a group stored in the container team ldap hiearchy.findContainerTeamGroup(ContainerTeam containerTeam, String searchBase, String groupName) This method returns a group stored in the container team structure.findContainerTeamGroups(ContainerTeamManaged container, String searchBase) This method returns groups stored in the container team ldap hiearchy.findContainerTeamGroups(ContainerTeam containerTeam, String searchBase)
Supported API: truegetContainerTeam(ContainerTeamManaged container) Returns the container team for the specified container.getContextTeamRoleMembers(WTUser user, Collection<Class> contextClasses, Collection<String> roleNames) Returns information for the users that are context members of one or more of the specified team roles in contexts of the specified context class types.getRoleDescription(Role role, ContainerTeam team)
Supported API: trueinactivate(ContainerTeamManaged container, ContainerTeamManagedState state) inactivate/suspend the ContainerTeamManaged object
Supported API: truevoidrecomputeMembership(ContainerTeamManaged container) Synchs the ContainerTeamMembership with the LDAP groups.voidrecomputeMembership(WTGroup group) Synchs the ContainerTeamMembership with the LDAP groups.voidremoveGuestMember(ContainerTeam team, WTPrincipal principal) This method removes the principal from the guest group.voidremoveGuestMembers(ContainerTeam team, List<WTPrincipal> principal_list) This method removes principals from the guest group.voidremoveMember(ContainerTeam team, Role role, WTPrincipal principal) This method removes the user from the necessary groups in the containers that use the container team.voidremoveMembers(ContainerTeam team, Role role, List<WTPrincipal> principalList) This method removes users from the necessary groups in the containers that use the container team.voidremoveRole(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.voidreplaceUser(ContainerTeamReference teamReference, WTUser replacedUser, WTUser newUser, boolean reassign, boolean removed) Replace the user in all containers that use the container team.voidreplaceUsers(ContainerTeamReference teamReference, ArrayList<WTUser> replacedUsers, WTUser newUser, boolean reassign, boolean removed) Replace a list of users in all containers that use the container team.setPrincipalAdHocAcl(ContainerTeamManaged container, AdHocControlled per, Vector perms, WTPrincipal principal) Set the ad-hoc access rights for a given user or group.setRoleAdHocAcl(ContainerTeamManaged container, AdHocControlled per, Vector perms, String roleName) Set the ad-hoc access rights for a given role in the container's team.voidsetRoleDescription(Role role, String description, ContainerTeam team) The description to assign to the role.void
Supported API: true
-
Method Details
-
createContainerTeam
ContainerTeamReference createContainerTeam(String name, OrgContainer orgContainer, String desc, TeamCategory category) throws WTException Creates a new Container Team.
Supported API: true- 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
-
createContainerTeam
ContainerTeamReference createContainerTeam(String name, OrgContainer orgContainer, String desc, TeamCategory category, boolean shared, boolean enabled, boolean extendable, String sharedTeamInvitationMsg, WTPrincipalReference creator) throws WTException Creates a container team. This method replaces an older method of the same name, but now includes the 'shared', 'enabled', and 'extendable' attributes in the signature.
Supported API: true- 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.shared- Indicates whether or not the team is shared.enabled- Determines if the team can be put into use.extendable- Gives the ability of a shared team to be extended locally.sharedTeamInvitationMsg- If the team being created is shared, an invitation message is allowed to be passed in and will be set on the container team itself. This message will be sent out to users who are added to the shared team.creator- Specifies the creator of the team. If this field is null, the current user will be used instead.- Returns:
- ContainerTeamReference
- Throws:
WTException
-
addMember
This method adds the user to the necessary groups in the containers that use the container team.
Supported API: true- 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
-
addMembers
boolean addMembers(ContainerTeam team, Role role, List<WTPrincipal> principalList) throws WTException This method adds the principals to the necessary groups in the containers that use the container team. Returns whether or any members were added.
Supported API: true- Parameters:
team- The team where the participants should be added to the specified role.role- The role where the participants will be added as a team member.principalList- The list of principals to be added to the role in the team.- Returns:
- boolean
- Throws:
WTException
-
removeMember
This method removes the user from the necessary groups in the containers that use the container team.
Supported API: true- 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
-
removeMembers
void removeMembers(ContainerTeam team, Role role, List<WTPrincipal> principalList) throws WTException This method removes users from the necessary groups in the containers that use the container team.
Supported API: true- 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.principalList- The principals to be removed from the role in the team.- Throws:
WTException
-
removeRole
This method removes the user participating in the role from the necessary groups in the containers that use the container team.
Supported API: true- 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
-
recomputeMembership
Synchs the ContainerTeamMembership with the LDAP groups.
Supported API: true- Parameters:
container- The container that should be synched with the team.- Throws:
WTException
-
recomputeMembership
Synchs the ContainerTeamMembership with the LDAP groups.
Supported API: true- Parameters:
group-- Throws:
WTException
-
inactivate
ContainerTeamManaged inactivate(ContainerTeamManaged container, ContainerTeamManagedState state) throws WTException inactivate/suspend the ContainerTeamManaged object
Supported API: true- Parameters:
container- the containerTeamManaged object to be inactiviated/suspendedstate- the ContainerTeamManagedState that the inactivated container should be set to- Returns:
- ContainerTeamManaged
- Throws:
WTException
-
activate
activate/start the ContainerTeamManaged object
Supported API: true- Parameters:
container- the ContainerTeamManaged object to be activated/started- Returns:
- ContainerTeamManaged
- Throws:
WTException
-
findContainerTeamGroups
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: true- Parameters:
container-searchBase-- Returns:
- Enumeration
- Throws:
WTException
-
findContainerTeamGroups
Enumeration findContainerTeamGroups(ContainerTeam containerTeam, String searchBase) throws WTException
Supported API: true- Parameters:
containerTeam-searchBase-- Returns:
- Enumeration
- Throws:
WTException
-
findContainerTeamGroup
WTGroup findContainerTeamGroup(ContainerTeam containerTeam, String searchBase, String groupName) throws WTException This method returns a group stored in the container team structure. The search base indicates the top level group to search in the database. The groupName is the name of the group you want to find.
Supported API: true- Parameters:
containerTeam-searchBase-groupName-- Returns:
- WTGroup
- Throws:
WTException
-
getContainerTeam
Returns the container team for the specified container. A check is done to see if a local team exists, if so that team is returned, otherwise the shared team is returned, if one exists.
Supported API: true- Parameters:
container- The container of interest.- Returns:
- ContainerTeam
- Throws:
WTException
-
findContainerTeamGroup
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: true- Parameters:
container-searchBase-groupName-- Returns:
- WTGroup
- Throws:
WTException
-
getContextTeamRoleMembers
WTKeyedMap getContextTeamRoleMembers(WTUser user, Collection<Class> contextClasses, Collection<String> roleNames) throws WTException Returns information for the users that are context members of one or more of the specified team roles in contexts of the specified context class types. The contexts searched are those contexts of the specified types for which the specified user is a member.The results are returned as a WTKeyedMap where each key is a WTUser object and the value is another WTKeyedMap where each key is a WTContainer object that the user is a member of and the value is a String Collection of the role names for the roles the user is a member of in that container.
If the session user does not have read access for a WTUser object or a WTContainer object, then a deflated ObjectReference for the user object or for the container object is added to the return Map.
If no matching users are found an empty collection is returned.
Supported API: true- Parameters:
user- The user whose contexts are to be searched. If null is specified, an empty collection is returned.contextClasses- Collection of context Classes for the contexts types that should be searched. These context types must be ContainerTeam Managed context types as these are the only contexts that have team roles. If a null or empty collection is specified, or any of the context types is not ContainerTeamManaged, an empty collection is returned.roleNames- A String array of the team role names to be searched. If no role names are specified, an empty collection is returned.- Returns:
- WTKeyedMap<WTUser, WTKeyedMap<WTContainer, Collection
>> - Throws:
WTException- See Also:
-
addGuestMember
This method adds the principal to guest group.
Supported API: true- 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.- Returns:
- boolean
- Throws:
WTException
-
addGuestMembers
This method adds the given principals to the guest group.
Supported API: true- Parameters:
team- The team where the participant should be added to the specified role.principal_list- The principals to be added to the role in the team.- Returns:
- boolean
- Throws:
WTException
-
removeGuestMember
This method removes the principal from the guest group.
Supported API: true- 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
-
removeGuestMembers
This method removes principals from the guest group.
Supported API: true- Parameters:
team- The team where the participant should be removed from the specified role.principal_list- The principals to be removed from the role in the team.- Throws:
WTException
-
replaceUser
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- 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
-
replaceUsers
void replaceUsers(ContainerTeamReference teamReference, ArrayList<WTUser> replacedUsers, WTUser newUser, boolean reassign, boolean removed) throws WTException Replace a list of users in all containers that use the container team.
Supported API: true- Parameters:
teamReference- A reference to the ContainerTeam where the user should be replaced.replacedUsers- The users being replaced.newUser- The user taking the place of the replaced users.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
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- 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
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- 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
-
findContainersForTeam
Returns a list of the ContainerTeamManaged objects that use the team.
Supported API: true- Parameters:
team-- Returns:
- List
- Throws:
WTException
-
setRoleDescription
The description to assign to the role.
Supported API: true- Parameters:
role-description-team-- Throws:
WTException
-
getRoleDescription
Supported API: true- Parameters:
role-team-- Returns:
- String
- Throws:
WTException
-
updateContainerTeam
Supported API: true- Parameters:
team-- Throws:
WTException
-