ContextAccessController (Apache Tomcat 8.5.20 API Documentation)

org.apache.naming

## Class ContextAccessController

- java.lang.Object
- - org.apache.naming.ContextAccessController

-     public class ContextAccessController
      extends Object

  Handles the access control on the JNDI contexts.
  Author:
    Remy Maucherat

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContextAccessController()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `checkSecurityToken(Object name, Object token)` Check a submitted security token.
    `static boolean` | `isWritable(Object name)` Is the context is writable?
    `static void` | `setReadOnly(Object name)` Set whether or not a Catalina context is writable.
    `static void` | `setSecurityToken(Object name, Object token)` Set a security token for a Catalina context.
    `static void` | `setWritable(Object name, Object token)` Allow writing to a context.
    `static void` | `unsetSecurityToken(Object name, Object token)` Remove a security token for a context.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ContextAccessController

          public ContextAccessController()

  - ### Method Detail

    - #### setSecurityToken

          public static void setSecurityToken(Object name,
                              Object token)

      Set a security token for a Catalina context. Can be set only once.
      Parameters:
        `name` - Name of the Catalina context
        `token` - Security token

    - #### unsetSecurityToken

          public static void unsetSecurityToken(Object name,
                                Object token)

      Remove a security token for a context.
      Parameters:
        `name` - Name of the Catalina context
        `token` - Security token

    - #### checkSecurityToken

          public static boolean checkSecurityToken(Object name,
                                   Object token)

      Check a submitted security token.
      Parameters:
        `name` - Name of the Catalina context
        `token` - Submitted security token
      Returns:
        `true` if the submitted token is equal to the token in the repository or if no token is present in the repository. Otherwise, `false`

    - #### setWritable

          public static void setWritable(Object name,
                         Object token)

      Allow writing to a context.
      Parameters:
        `name` - Name of the Catalina context
        `token` - Security token

    - #### setReadOnly

          public static void setReadOnly(Object name)

      Set whether or not a Catalina context is writable.
      Parameters:
        `name` - Name of the Catalina context

    - #### isWritable

          public static boolean isWritable(Object name)

      Is the context is writable?
      Parameters:
        `name` - Name of the Catalina context
      Returns:
        `true` if it is writable, otherwise `false`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.