Class SecurityHeaderService
- java.lang.Object
-
- fr.paris.lutece.portal.service.securityheader.SecurityHeaderService
-
public class SecurityHeaderService extends java.lang.ObjectThis class provides a service that offers methods to manage security headers.
-
-
Constructor Summary
Constructors Constructor Description SecurityHeaderService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(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.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.List<SecurityHeader>findAllSorted(java.util.Locale locale)Returns a list of all security headers used in manage security headers page.ReferenceListgetPageCategoryList()Returns the reference list of security headers page categoriesReferenceListgetTypeList()Returns 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.
-
-
-
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 headerstrType- The type of the security headerpageCategory- The page category of the security header- Returns:
- list of 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
-
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
-
-