Top Description Fields Constructors Methods
org.apache.naming

public Class ContextAccessController

extends Object
Class Inheritance
Imports
java.util.Map, java.util.concurrent.ConcurrentHashMap

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

Field Summary

Modifier and TypeField and Description
private static final Map<Object, Object>
readOnlyContexts

Catalina context names on which writing is not allowed.

private static final Map<Object, Object>
securityTokens

Security tokens repository.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean

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
checkSecurityToken
(Object
Name of the Catalina context
name
,
Object
Submitted security token
token
)

Check a submitted security token.

public static boolean

Returns:

true if it is writable, otherwise false
isWritable
(Object
Name of the Catalina context
name
)

Is the context is writable?

public static void
setReadOnly(Object
Name of the Catalina context
name
)

Set whether or not a Catalina context is writable.

public static void
setSecurityToken(Object
Name of the Catalina context
name
,
Object
Security token
token
)

Set a security token for a Catalina context.

public static void
setWritable(Object
Name of the Catalina context
name
,
Object
Security token
token
)

Allow writing to a context.

public static void
unsetSecurityToken(Object
Name of the Catalina context
name
,
Object
Security token
token
)

Remove a security token for a context.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

readOnlyContextsback to summary
private static final Map<Object, Object> readOnlyContexts

Catalina context names on which writing is not allowed.

securityTokensback to summary
private static final Map<Object, Object> securityTokens

Security tokens repository.

Constructor Detail

ContextAccessControllerback to summary
public ContextAccessController()

Method Detail

checkSecurityTokenback to summary
public static boolean checkSecurityToken(Object name, Object token)

Check a submitted security token.

Parameters
name:Object

Name of the Catalina context

token:Object

Submitted security token

Returns:boolean

true if the submitted token is equal to the token in the repository or if no token is present in the repository. Otherwise, false

isWritableback to summary
public static boolean isWritable(Object name)

Is the context is writable?

Parameters
name:Object

Name of the Catalina context

Returns:boolean

true if it is writable, otherwise false

setReadOnlyback to summary
public static void setReadOnly(Object name)

Set whether or not a Catalina context is writable.

Parameters
name:Object

Name of the Catalina context

setSecurityTokenback to summary
public static void setSecurityToken(Object name, Object token)

Set a security token for a Catalina context. Can be set only once.

Parameters
name:Object

Name of the Catalina context

token:Object

Security token

setWritableback to summary
public static void setWritable(Object name, Object token)

Allow writing to a context.

Parameters
name:Object

Name of the Catalina context

token:Object

Security token

unsetSecurityTokenback to summary
public static void unsetSecurityToken(Object name, Object token)

Remove a security token for a context.

Parameters
name:Object

Name of the Catalina context

token:Object

Security token