Class SecurityHeaderService
java.lang.Object
fr.paris.lutece.portal.service.securityheader.SecurityHeaderService
This class provides a service that offers methods to manage security headers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(SecurityHeader securityHeader) Create the security header given in parameter.voiddisable(int nSecurityHeaderId) Disable the security header with the id given in parameter.voidenable(int nSecurityHeaderId) Enable the security header with the id given in parameter.Returns all the security headers that match specified name, type and page category (if not null for the latter).findActive(String strType, String strPageCategory) Returns all security headers from the specified type and the specified category (if not null) that are active (attribute is_enable = true).findAll()Returns a collection of all security headers.findAllSorted(Locale locale) Returns a list of all security headers used in manage security headers page.Returns the reference list of security headers page categoriesReturns the reference list of security headers typesvoidremove(int nSecurityHeaderId) Remove the security header given in parameter.voidupdate(SecurityHeader securityHeader) Update the security header given in parameter.
-
Constructor Details
-
SecurityHeaderService
public SecurityHeaderService()
-
-
Method Details
-
find
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 headerstrType- The type of the security headerpageCategory- The page category of the security header- Returns:
- list od security headers matching the criteria
-
findActive
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
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
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
Returns the reference list of security headers types- Returns:
- ReferenceList object with security headers types
-
getPageCategoryList
Returns the reference list of security headers page categories- Returns:
- ReferenceList object with security headers page categories
-
create
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
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
-