atg.userdirectory.droplet
Class ViewPrincipalsDroplet
java.lang.Object
   atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
       atg.nucleus.GenericService
atg.nucleus.GenericService
           atg.nucleus.TimedOperationService
atg.nucleus.TimedOperationService
               atg.nucleus.servlet.ServletService
atg.nucleus.servlet.ServletService
                   atg.nucleus.servlet.HttpServletService
atg.nucleus.servlet.HttpServletService
                       atg.servlet.DynamoServlet
atg.servlet.DynamoServlet
                           atg.userdirectory.droplet.ViewPrincipalsDroplet
atg.userdirectory.droplet.ViewPrincipalsDroplet
- All Implemented Interfaces: 
- atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, 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 ViewPrincipalsDroplet 
- extends DynamoServlet- implements atg.userdirectory.droplet.Constants
This Droplet is used to retrieve a list of Principals for a particular
 user whose userId is passed in as one of the input parameters.  
 The list of Principals returned can either be organizations or roles. 
 
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 a JSP page
   
    - userId
    
- This is the repository Id for the user whose Principals
        are to be retrieved.
 
    
- principalType
    
- This is the type of Principal to be retrieved for the user.
        Currently, the userDirectory supports either "organization" 
        or "role".
   
The following output parameters are supported for this droplet
  
    - output
    
- This parameter is serviced if the Principals could be
        retrieved for the specified user. The list of principals 
        can be referenced in the page by the "principals". 
    
- error
    
- This parameter is serviced if an error had occured while
        retrieving the Principals for the specific user.
    
- empty
    
- This parameter is serviced if there are no principals assigned
        to the specified user
  
Example:
  
 <dsp:droplet name="ViewPrincipals">
   <dsp:param name="userId" bean="Profile.id"/>
   <dsp:param name="principalType" value="organization"/>
   <dsp:oparam name="output">
     <dsp:droplet name="ForEach">
       <dsp:param name="array" param="principals"/>
       <dsp:oparam name="output">
         <br /><dsp:valueof param="element">null</dsp:valueof>
       </dsp:oparam>
     </dsp:droplet>
   </dsp:oparam>
   <dsp:oparam name="error">
     <br />error
   </dsp:oparam>
   <dsp:oparam name="empty">
     <br />empty
   </dsp:oparam>
 </dsp:droplet>
  
- See Also:
- RepositoryUserDirectory
 
 
 
 
| 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 | 
 
 
 
 
| Methods inherited from class atg.servlet.DynamoServlet | 
| doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter | 
 
 
 
| Methods inherited from class atg.nucleus.GenericService | 
| addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, 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, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService | 
 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 | 
 
CLASS_VERSION
public static java.lang.String CLASS_VERSION
- Class version string
 
 
PRINCIPALS
public static final java.lang.String PRINCIPALS
- See Also:
- Constant Field Values
PRINCIPAL_TYPE
public static final ParameterName PRINCIPAL_TYPE
USER_ID
public static final ParameterName USER_ID
DEFAULT_PRINCIPAL
public static final java.lang.String DEFAULT_PRINCIPAL
- See Also:
- Constant Field Values
ROLE_PRINCIPAL
public static final java.lang.String ROLE_PRINCIPAL
- See Also:
- Constant Field Values
VALID_PRINCIPALS
public static final java.lang.String[] VALID_PRINCIPALS
ViewPrincipalsDroplet
public ViewPrincipalsDroplet()
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
- This method services the request and returns the desired principles.
 It checks for a required userIdparameter and an
 optionalprincipalparameter.
 If principalTypeis not defined via the request, 
 or is an invalid value i.e. not one ofROLE_PRINCIPALorORGANIZATION_PRINCIPAL, then we default toDEFAULT_PRINCIPLE.
 
 If the userIdparameter
 is not defined, or the {@link atg.userdirectory.UserUsercorresponding to the passed in id cannot be found, then theerroroparam is serviced
 
 If no principals are found of the requested type for the 
 requested user, then the emptyoparam will be serviced
 
 
- 
- Overrides:
- servicein class- DynamoServlet
 
- 
- Parameters:
- pRequest- the request used to get/set parameters
- pResponse- the response associated with- pRequest
- Throws:
- javax.servlet.ServletException- if a servlet error occurs
- java.io.IOException- if an io error occurs