org.apache.naming

Class ContextAccessController

public class ContextAccessController extends Object

Handles the access control on the JNDI contexts.

Version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $

Author: Remy Maucherat

Method Summary
static booleancheckSecurityToken(Object name, Object token)
Check a submitted security token.
static booleanisWritable(Object name)
Returns if a context is writable.
static voidsetReadOnly(Object name)
Set whether or not a context is writable.
static voidsetSecurityToken(Object name, Object token)
Set a security token for a context.
static voidsetWritable(Object name, Object token)
Allow writing to a context.
static voidunsetSecurityToken(Object name, Object token)
Remove a security token for a context.

Method Detail

checkSecurityToken

public static boolean checkSecurityToken(Object name, Object token)
Check a submitted security token. The submitted token must be equal to the token present in the repository. If no token is present for the context, then returns true.

Parameters: name Name of the context token Submitted security token

isWritable

public static boolean isWritable(Object name)
Returns if a context is writable.

Parameters: name Name of the context

setReadOnly

public static void setReadOnly(Object name)
Set whether or not a context is writable.

Parameters: name Name of the context

setSecurityToken

public static void setSecurityToken(Object name, Object token)
Set a security token for a context. Can be set only once.

Parameters: name Name of the context token Security token

setWritable

public static void setWritable(Object name, Object token)
Allow writing to a context.

Parameters: name Name of the 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 context token Security token

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