Class AbstractAuditModel

    • Field Detail

      • handlerResourceBundle

        protected ResourceBundle handlerResourceBundle
    • Constructor Detail

      • AbstractAuditModel

        public AbstractAuditModel​(jakarta.servlet.http.HttpServletRequest request,
                                  Map sessionAttributes)
                           throws AMConsoleException
        Create a new AbstractAuditModel.
        Parameters:
        request - The HttpServletRequest
        sessionAttributes - The session attributes.
        Throws:
        AMConsoleException - If construction fails.
    • Method Detail

      • initialize

        protected void initialize​(jakarta.servlet.http.HttpServletRequest req,
                                  String rbName)
        Description copied from class: AMModelBase
        Initializes object. It does the followings
        1. check validity of SSO token
        2. get user information from user map and SSO token
        3. read console profile information from SSO token
        Overrides:
        initialize in class AMModelBase
        Parameters:
        req - HTTP Servlet Request
        rbName - resource bundle name
      • getEditEventHandlerPropertyXML

        public String getEditEventHandlerPropertyXML​(String realmName,
                                                     String handlerName,
                                                     String viewBeanClassName)
                                              throws AMConsoleException
        Get the JATO XML configuration for generation the UI used to edit event handlers.
        Parameters:
        realmName - The current realm.
        handlerName - The audit event handler name.
        viewBeanClassName - The view bean class name.
        Returns:
        The JATO XML configuration for generation the UI.
        Throws:
        AMConsoleException - If an error occurs during the XML creation.
      • getAddEventHandlerPropertyXML

        public String getAddEventHandlerPropertyXML​(String schemaId)
                                             throws AMConsoleException
        Get the JATO XML configuration for generation the UI used to add event handlers.
        Parameters:
        schemaId - The event handler schema ID.
        Returns:
        The JATO XML configuration for generation the UI.
        Throws:
        AMConsoleException - If an error occurs during the XML creation.
      • getEventHandlerTypeNames

        public Set<String> getEventHandlerTypeNames()
                                             throws AMConsoleException
        Get the type names (schema ID) for all the event handlers.
        Returns:
        A set of event handler type names.
        Throws:
        AMConsoleException
      • deleteEventHandles

        public void deleteEventHandles​(Set<String> names)
                                throws AMConsoleException
        Delete the event handlers specified.
        Parameters:
        names - Set of event handler names that are to be deleted.
        Throws:
        AMConsoleException - if sub configurations cannot be deleted.
      • getEventHandlerAttributeValues

        public Map<?,​?> getEventHandlerAttributeValues​(String eventHandlerName)
                                                      throws AMConsoleException
        Get the attribute values for the specified event handler.
        Parameters:
        eventHandlerName - The name of the event handler.
        Returns:
        A map of event handler attribute values.
        Throws:
        AMConsoleException - If an error occurs whilst reading the attributes.
      • setEventHandlerAttributeValues

        public void setEventHandlerAttributeValues​(String eventHandlerName,
                                                   Map<?,​?> values)
                                            throws AMConsoleException
        Set the attribute values for the specified event handler.
        Parameters:
        eventHandlerName - The name of the event handler.
        values - The attribute values.
        Throws:
        AMConsoleException - If an error occurs whilst writing the attributes.
      • getEventHandlerDefaultValues

        public Map<String,​Set<?>> getEventHandlerDefaultValues​(String eventHandlerType)
                                                              throws AMConsoleException
        Get the default attribute values for the specified event handler type (schema ID).
        Parameters:
        eventHandlerType - The name of the event handler type.
        Returns:
        A map of default event handler attribute values.
        Throws:
        AMConsoleException - If an error occurs whilst reading the attributes.
      • getEventHandlerAttributeNames

        public Set<String> getEventHandlerAttributeNames​(String eventHandlerType)
                                                  throws AMConsoleException
        Get the attribute names for the specified event handler type (schema ID).
        Parameters:
        eventHandlerType - The name of the event handler type.
        Returns:
        A set of attribute type names.
        Throws:
        AMConsoleException - If an error occurs whilst reading the attributes.
      • createEventHandler

        public void createEventHandler​(String eventHandlerName,
                                       String eventHandlerType,
                                       Map<String,​Set<String>> attributeValues)
                                throws AMConsoleException
        Create a new event handler with the given attributes.
        Parameters:
        eventHandlerName - The name of the new event handler.
        eventHandlerType - The name of the event handler type.
        attributeValues - The attribute values.
        Throws:
        AMConsoleException - If an error occurs whilst creating the event handler.