Class CommonPluginUtils

    • Method Detail

      • singleServerExecute

        public static void singleServerExecute​(sailpoint.api.SailPointContext context,
                                               sailpoint.object.ServiceDefinition self,
                                               CommonPluginUtils.SingleServerExecute executor)
                                        throws sailpoint.tools.GeneralException
        Executes the task given by the functional CommonPluginUtils.SingleServerExecute if this server is the alphabetically lowest server on which this Service is allowed to run.

        Server names are sorted by the database using an ‘order by’ on query.

        This is intended to be used as the bulk of the execute() method of a Service class. You can either pass a lambda/closure to this method or implement the SingleServerExecute interface in your Service class (in which case you’d simply pass ‘this’).

        Parameters:
        context - The context
        self - The current ServiceDefinition
        executor - The executor to run
        Throws:
        sailpoint.tools.GeneralException - if any failures occur
      • toStatusResponse

        public static Map<String,​StringtoStatusResponse​(String message)
        Gets a map / JSON object indicating a status response
        Parameters:
        message - The message to associate with the response
        Returns:
        The response object
      • toStatusResponse

        public static Map<String,​StringtoStatusResponse​(String message,
                                                                Throwable error)
        Gets a map / JSON object indicating a status response with an optional error
        Parameters:
        message - The message to associate with the response
        error - The error to associate with the response
        Returns:
        The response object