wt.inf.team
Class LoadContainerTeam

java.lang.Object
  extended bywt.inf.team.LoadContainerTeam

public final class LoadContainerTeam
extends Object

Provides utility methods for accessing container team-related APIs via load files

Supported API: false

Extendable: false


Constructor Summary
LoadContainerTeam()
           
 
Method Summary
static boolean activateContainer(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Activate a container.
static boolean addGuest(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Assign a principal as guest member to a container.
static boolean addPrincipalToRole(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Assign a principal to a role in a container.
static boolean confirmParticipation(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Confirm a user's participation in the current container.
private static ContainerTeamManaged getContainer(String container_class_name, String container_name, Hashtable nv, Hashtable cmd_line)
          Get the container to use for assignRoleToUser.
private static WTPrincipal getPrincipal(Hashtable nv, Hashtable cmd_line)
          Gets a WTPrincipal from the load parameters, assuming the principal is configured with the principalNameOrDN and serviceName properties.
private static Role getRole(String role_name, Hashtable nv, Hashtable cmd_line)
          Get the Role with the given internal name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadContainerTeam

public LoadContainerTeam()
Method Detail

addPrincipalToRole

public static boolean addPrincipalToRole(Hashtable nv,
                                         Hashtable cmd_line,
                                         Vector return_objects)
Assign a principal to a role in a container. The format of the load entry is as follows:
 containerClass~containerName~role~principalNameOrDN~serviceName~confirmParticipation
 
Notes

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

addGuest

public static boolean addGuest(Hashtable nv,
                               Hashtable cmd_line,
                               Vector return_objects)
Assign a principal as guest member to a container. The format of the load entry is as follows:
 containerClass~containerName~principalNameOrDN~serviceName
 
Notes

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

confirmParticipation

public static boolean confirmParticipation(Hashtable nv,
                                           Hashtable cmd_line,
                                           Vector return_objects)
Confirm a user's participation in the current container. The load line is of the format:
 userNameOrDN
 

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

activateContainer

public static boolean activateContainer(Hashtable nv,
                                        Hashtable cmd_line,
                                        Vector return_objects)
Activate a container. The format of the load entry is as follows:
 containerClass~containerName
 
Notes

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
return_objects -
Returns:
true If the load succeeds

getContainer

private static ContainerTeamManaged getContainer(String container_class_name,
                                                 String container_name,
                                                 Hashtable nv,
                                                 Hashtable cmd_line)
                                          throws Exception
Get the container to use for assignRoleToUser. If container_class and container_name are specified, then search for the container in the current container. Otherwise use the current container

Parameters:
container_class_name - The name of the container class (may be null)
container_name - The name of the container (may be null)
nv - Load parameters
cmd_line - Command line overrides
Returns:
The matching container
Throws:
Exception

getPrincipal

private static WTPrincipal getPrincipal(Hashtable nv,
                                        Hashtable cmd_line)
                                 throws Exception
Gets a WTPrincipal from the load parameters, assuming the principal is configured with the principalNameOrDN and serviceName properties.

Parameters:
nv - map of load parameters
cmd_line - Command line overrides
Returns:
The matching principal
Throws:
WTException - If the principal can't be found, or if more than one principal matches the parameters
Exception

getRole

private static Role getRole(String role_name,
                            Hashtable nv,
                            Hashtable cmd_line)
                     throws Exception
Get the Role with the given internal name

Parameters:
role_name - A role name (such as LIBRARY_MANAGER)
nv - map of load parameters
cmd_line - command line overrides
Returns:
The matching role
Throws:
Exception