Class SubjectPreferences

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class SubjectPreferences
    extends javax.servlet.http.HttpServlet
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doGet​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      protected void doPost​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)  
      static java.util.Map<java.lang.String,​java.util.ArrayList<java.lang.String>> getCookieMap​(javax.servlet.http.HttpServletRequest request)  
      static java.util.List<java.lang.String> getDefaultValues​(java.lang.String rightType, boolean skipCookie)  
      static java.util.List<java.lang.String> getPermissionList​(java.lang.String rightType)  
      static java.util.List<java.lang.String> getPermissionList​(java.lang.String rightType, boolean getSubList)  
      static java.util.Map<java.lang.String,​java.util.ArrayList<java.lang.String>> getPermissionMap()  
      void init​(javax.servlet.ServletConfig config)  
      static boolean isAllowedAttribute​(java.lang.String name)  
      static void setPermission​(java.lang.String rightType, java.lang.String rightValue)  
      static void setPermission​(java.lang.String rightType, java.util.List<java.lang.String> rightValues)  
      static void setPermissionMap​(java.util.Map<java.lang.String,​java.util.ArrayList<java.lang.String>> permMap)  
      static boolean testValue​(java.lang.String rightType, java.lang.String rightValue)  
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • allowedRightTypes

        public static final java.util.List<java.lang.String> allowedRightTypes
      • COOKIE_PERMISSION_MAP_SESSION_ATTRIBUTE

        public static final java.lang.String COOKIE_PERMISSION_MAP_SESSION_ATTRIBUTE
        See Also:
        Constant Field Values
    • Constructor Detail

      • SubjectPreferences

        public SubjectPreferences()
    • Method Detail

      • init

        public void init​(javax.servlet.ServletConfig config)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
      • isAllowedAttribute

        public static boolean isAllowedAttribute​(java.lang.String name)
      • getPermissionList

        public static java.util.List<java.lang.String> getPermissionList​(java.lang.String rightType)
      • getPermissionList

        public static java.util.List<java.lang.String> getPermissionList​(java.lang.String rightType,
                                                                         boolean getSubList)
      • setPermission

        public static void setPermission​(java.lang.String rightType,
                                         java.lang.String rightValue)
      • getPermissionMap

        public static java.util.Map<java.lang.String,​java.util.ArrayList<java.lang.String>> getPermissionMap()
      • setPermissionMap

        public static void setPermissionMap​(java.util.Map<java.lang.String,​java.util.ArrayList<java.lang.String>> permMap)
      • setPermission

        public static void setPermission​(java.lang.String rightType,
                                         java.util.List<java.lang.String> rightValues)
      • doPost

        protected void doPost​(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse resp)
                       throws javax.servlet.ServletException,
                              java.io.IOException
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        java.io.IOException
      • testValue

        public static boolean testValue​(java.lang.String rightType,
                                        java.lang.String rightValue)
      • doGet

        protected void doGet​(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws javax.servlet.ServletException,
                             java.io.IOException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        java.io.IOException
      • getCookieMap

        public static java.util.Map<java.lang.String,​java.util.ArrayList<java.lang.String>> getCookieMap​(javax.servlet.http.HttpServletRequest request)
      • getDefaultValues

        public static java.util.List<java.lang.String> getDefaultValues​(java.lang.String rightType,
                                                                        boolean skipCookie)