Class RoleQueryHelper

java.lang.Object
org.codelibs.fess.helper.RoleQueryHelper

public class RoleQueryHelper extends Object
This class returns a list of a role from a request parameter, a request header and a cookie. The format of the default value is "[\d]+\nrole1,role2,role3", which you can encrypt.
Author:
shinsuke
  • Field Details

    • USER_ROLES

      protected static final String USER_ROLES
      See Also:
    • cipher

      protected org.codelibs.core.crypto.CachedCipher cipher
    • valueSeparator

      protected String valueSeparator
    • roleSeparator

      protected String roleSeparator
    • parameterKey

      protected String parameterKey
    • encryptedParameterValue

      protected boolean encryptedParameterValue
    • headerKey

      protected String headerKey
    • encryptedHeaderValue

      protected boolean encryptedHeaderValue
    • cookieKey

      protected String cookieKey
    • encryptedCookieValue

      protected boolean encryptedCookieValue
    • maxAge

      protected long maxAge
    • cookieNameMap

      protected Map<String,String> cookieNameMap
    • defaultRoleList

      protected final List<String> defaultRoleList
  • Constructor Details

    • RoleQueryHelper

      public RoleQueryHelper()
  • Method Details

    • init

      @PostConstruct public void init()
    • build

      public Set<String> build(SearchRequestParams.SearchRequestType searchRequestType)
    • processAccessToken

      protected boolean processAccessToken(javax.servlet.http.HttpServletRequest request, Set<String> roleSet, boolean isApiRequest)
    • processParameter

      protected void processParameter(javax.servlet.http.HttpServletRequest request, Set<String> roleSet)
    • processHeader

      protected void processHeader(javax.servlet.http.HttpServletRequest request, Set<String> roleSet)
    • processCookie

      protected void processCookie(javax.servlet.http.HttpServletRequest request, Set<String> roleSet)
    • buildByCookieNameMapping

      protected void buildByCookieNameMapping(javax.servlet.http.HttpServletRequest request, Set<String> roleSet)
    • addRoleFromCookieMapping

      protected void addRoleFromCookieMapping(Set<String> roleNameList, javax.servlet.http.Cookie cookie)
    • parseRoleSet

      protected void parseRoleSet(String value, boolean encrypted, Set<String> roleSet)
    • getCurrentTime

      protected long getCurrentTime()
    • addCookieNameMapping

      public void addCookieNameMapping(String cookieName, String roleName)
    • setCipher

      public void setCipher(org.codelibs.core.crypto.CachedCipher cipher)
    • setValueSeparator

      public void setValueSeparator(String valueSeparator)
    • setRoleSeparator

      public void setRoleSeparator(String roleSeparator)
    • setParameterKey

      public void setParameterKey(String parameterKey)
    • setEncryptedParameterValue

      public void setEncryptedParameterValue(boolean encryptedParameterValue)
    • setHeaderKey

      public void setHeaderKey(String headerKey)
    • setEncryptedHeaderValue

      public void setEncryptedHeaderValue(boolean encryptedHeaderValue)
    • setCookieKey

      public void setCookieKey(String cookieKey)
    • setEncryptedCookieValue

      public void setEncryptedCookieValue(boolean encryptedCookieValue)
    • setMaxAge

      public void setMaxAge(long maxAge)