Class SecurityHeaderService


  • public class SecurityHeaderService
    extends java.lang.Object
    This class provides a service that offers methods to manage security headers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void create​(SecurityHeader securityHeader)
      Create the security header given in parameter.
      void disable​(int nSecurityHeaderId)
      Disable the security header with the id given in parameter.
      void enable​(int nSecurityHeaderId)
      Enable the security header with the id given in parameter.
      java.util.List<SecurityHeader> find​(java.lang.String strName, java.lang.String strType, java.lang.String pageCategory)
      Returns all the security headers that match specified name, type and page category (if not null for the latter).
      java.util.Collection<SecurityHeader> findActive​(java.lang.String strType, java.lang.String strPageCategory)
      Returns all security headers from the specified type and the specified category (if not null) that are active (attribute is_enable = true).
      java.util.Collection<SecurityHeader> findAll()
      Returns a collection of all security headers.
      java.util.List<SecurityHeader> findAllSorted​(java.util.Locale locale)
      Returns a list of all security headers used in manage security headers page.
      ReferenceList getPageCategoryList()
      Returns the reference list of security headers page categories
      ReferenceList getTypeList()
      Returns the reference list of security headers types
      void remove​(int nSecurityHeaderId)
      Remove the security header given in parameter.
      void update​(SecurityHeader securityHeader)
      Update the security header given in parameter.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SecurityHeaderService

        public SecurityHeaderService()
    • Method Detail

      • find

        public java.util.List<SecurityHeader> find​(java.lang.String strName,
                                                   java.lang.String strType,
                                                   java.lang.String pageCategory)
        Returns all the security headers that match specified name, type and page category (if not null for the latter). If page category is null (REST api case), this criterion is ignored.
        Parameters:
        strName - The name of the security header
        strType - The type of the security header
        pageCategory - The page category of the security header
        Returns:
        list od security headers matching the criteria
      • findActive

        public java.util.Collection<SecurityHeader> findActive​(java.lang.String strType,
                                                               java.lang.String strPageCategory)
        Returns all security headers from the specified type and the specified category (if not null) that are active (attribute is_enable = true).
        Parameters:
        strType -
        strPageCategory -
        Returns:
        collection on security headers
      • findAll

        public java.util.Collection<SecurityHeader> findAll()
        Returns a collection of all security headers. Security headers are fetched from database (if data are stale) or from security headers map in memory (if the data in map are still up to date).
        Returns:
        collection of security headers
      • findAllSorted

        public java.util.List<SecurityHeader> findAllSorted​(java.util.Locale locale)
        Returns a list of all security headers used in manage security headers page. They are sorted by type, page category and name.
        Parameters:
        locale - The locale
        Returns:
        list of all security headers
      • getTypeList

        public ReferenceList getTypeList()
        Returns the reference list of security headers types
        Returns:
        ReferenceList object with security headers types
      • getPageCategoryList

        public ReferenceList getPageCategoryList()
        Returns the reference list of security headers page categories
        Returns:
        ReferenceList object with security headers page categories
      • create

        public void create​(SecurityHeader securityHeader)
        Create the security header given in parameter. Like all the actions, this one invalidates the map containing the security headers.
        Parameters:
        securityHeader - The security header to create
      • update

        public void update​(SecurityHeader securityHeader)
        Update the security header given in parameter. Like all the actions, this one invalidates the map containing the security headers.
        Parameters:
        securityHeader - The security header to update
      • remove

        public void remove​(int nSecurityHeaderId)
        Remove the security header given in parameter. Like all the actions, this one invalidates the map containing the security headers.
        Parameters:
        securityHeader - The security header to remove
      • enable

        public void enable​(int nSecurityHeaderId)
        Enable the security header with the id given in parameter. Like all the actions, this one invalidates the map containing the security headers.
        Parameters:
        nSecurityHeaderId - The id of the security header to enable
      • disable

        public void disable​(int nSecurityHeaderId)
        Disable the security header with the id given in parameter. Like all the actions, this one invalidates the map containing the security headers.
        Parameters:
        nSecurityHeaderId - The id of the security header to disable