Class JSPUtils


  • public class JSPUtils
    extends Object
    Utilities for the JSP-based quicklink launcher service
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  JSPUtils.QuicklinkLaunchKey
      A value holder for the details of a quicklink launch attempt
    • Constructor Summary

      Constructors 
      Constructor Description
      JSPUtils​(javax.servlet.http.HttpSession session)
      Constructs a new JSPUtils with an HttpSession and the default threadlocal context
      JSPUtils​(sailpoint.api.SailPointContext context, javax.servlet.http.HttpSession session)
      Constructs a new JSPUtils with the specified HttpSession and context
    • Constructor Detail

      • JSPUtils

        public JSPUtils​(javax.servlet.http.HttpSession session)
                 throws sailpoint.tools.GeneralException
        Constructs a new JSPUtils with an HttpSession and the default threadlocal context
        Parameters:
        session - The HTTP session
        Throws:
        sailpoint.tools.GeneralException - if getting the current context fails
      • JSPUtils

        public JSPUtils​(sailpoint.api.SailPointContext context,
                        javax.servlet.http.HttpSession session)
        Constructs a new JSPUtils with the specified HttpSession and context
        Parameters:
        context - The IIQ context to use for this utility instance
        session - The HTTP session
    • Method Detail

      • getLaunchKey

        public static String getLaunchKey​(sailpoint.api.SailPointContext context,
                                          sailpoint.object.Identity targetIdentity,
                                          sailpoint.object.Identity launcherIdentity,
                                          String quicklinkName)
                                   throws sailpoint.tools.GeneralException
        Gets the input key for the quicklink launcher.

        You should expose a plugin endpoint that produces this key.

        Parameters:
        context - The IIQ context
        targetIdentity - The target of the quicklink launch
        launcherIdentity - The launcher of the quicklink
        quicklinkName - The name of the quicklink to launch
        Returns:
        An encrypted JSON string containing the configuration
        Throws:
        sailpoint.tools.GeneralException - if encryption goes wrong
      • getLaunchKey

        public static String getLaunchKey​(sailpoint.api.SailPointContext context,
                                          String target,
                                          String launcher,
                                          String quicklinkName)
                                   throws sailpoint.tools.GeneralException
        Gets the input key for the quicklink launcher.

        You should expose a plugin endpoint that produces this key.

        Parameters:
        context - The IIQ context
        target - The target of the quicklink launch
        launcher - The launcher of the quicklink
        quicklinkName - The name of the quicklink to launch
        Returns:
        An encrypted JSON string containing the configuration
        Throws:
        sailpoint.tools.GeneralException - if encryption goes wrong
      • launchQuicklink

        public String launchQuicklink​(String encryptedKey)
                               throws sailpoint.tools.GeneralException
        Launches a quicklink for the QL, target, and launcher specified in the encrypted key value.

        If the quicklink launch produces a form work item, the user will be redirected to the commonWorkItem page.

        Parameters:
        encryptedKey - An encrypted configuration key, from getLaunchKey(SailPointContext, String, String, String)
        Returns:
        The redirect URL
        Throws:
        sailpoint.tools.GeneralException - if decryption or quicklink launch fails