atg.userdirectory.droplet
Class TargetPrincipalsDroplet

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.userdirectory.droplet.TargetPrincipalsDroplet
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, atg.userdirectory.droplet.Constants, java.util.EventListener, javax.servlet.Servlet

public class TargetPrincipalsDroplet
extends DynamoServlet
implements atg.userdirectory.droplet.Constants

This Droplet extends the PrincipalsDroplet to retrieve a list of Targeted Principals for a specific Principal associated with the user. Specifically, for the role function is passed as a parameter, the list of organizations which have the specified function associated with the user's roles are returned.

The following properties will typically be set in a properties file

userDirectory
This is the location of the userDirectory component in the Dynamo environment. This component is used to retrieve the Principals.

The following properties will typically be set in jhtml file

userId
This is the repository Id for the user whose Principals are to be retrieved.
roleName
This is the String representing the function name of a role. All organizations with this function name will be retrieved.

The following output parameters are supported for this droplet

output
This parameter is serviced if the Principals could be retrieved for the specified user
error
This parameter is serviced if an error had occured while retrieving the Principals for the specific user
empty
This parameter is serviced if no roles were found for that particular role name

See Also:
RepositoryUserDirectory

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String PRINCIPALS
           
static ParameterName ROLE_NAME
           
static ParameterName USER_ID
           
 
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
 
Fields inherited from class atg.nucleus.servlet.ServletService
SERVLET_INFO_KEY
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.userdirectory.droplet.Constants
EMPTY, ERROR, INVALID_OPTIONAL_PARAM, MISSING_REQUIRED_PARAM, NO_ORGANIZATION, NO_USER, OUTPUT
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
TargetPrincipalsDroplet()
           
 
Method Summary
 UserDirectory getUserDirectory()
          Gets the userDirectory property
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Gets the userId and roleName request parameters and does the following: 1) Gets the relative roles associated with the user 2) Gets the target principal of each role (organization) and returns them in the principals parameter
 void setUserDirectory(UserDirectory pUserDirectory)
          Sets the userDirectory property
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, init, setServletInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


ROLE_NAME

public static final ParameterName ROLE_NAME

USER_ID

public static final ParameterName USER_ID

PRINCIPALS

public static final java.lang.String PRINCIPALS
See Also:
Constant Field Values
Constructor Detail

TargetPrincipalsDroplet

public TargetPrincipalsDroplet()
Method Detail

setUserDirectory

public void setUserDirectory(UserDirectory pUserDirectory)
Sets the userDirectory property

Parameters:
pUserDirectory - the userdirectory to perform on

getUserDirectory

public UserDirectory getUserDirectory()
Gets the userDirectory property

Returns:
the userdirectory to perform on

service

public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
Gets the userId and roleName request parameters and does the following: 1) Gets the relative roles associated with the user 2) Gets the target principal of each role (organization) and returns them in the principals parameter

Overrides:
service in class DynamoServlet
Parameters:
pRequest - the request to examine
pResponse - the response associated with the request
Throws:
javax.servlet.ServletException - if a servlet error occurs
java.io.IOException - if an io error occurs