javax.jdo.spi

Class JDOPermission


public final class JDOPermission
extends java.security.BasicPermission

The JDOPermission class is for operations that are reserved for JDO implementations and should not be called by other code. A JDOPermission is a named permission and has no actions. There are two names currently defined. Each named permission has a corresponding public static final field which contains an instance of the named permission.

The following table provides a summary description of what each named permission allows, and discusses the risks of granting code the permission.

Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
setStateManagerThis allows setting the StateManager for an instance of PersistenceCapable. The StateManager has unlimited access to get and set persistent and transactional fields of the PersistenceCapable instance.This is dangerous in that information (possibly confidential) normally unavailable would be accessible to malicious code.
getMetadataThis allows getting metadata for any PersistenceCapable class that has registered with JDOImplHelper.This is dangerous in that metadata information (possibly confidential) normally unavailable would be accessible to malicious code.
manageMetadataThis allows managing metadata for any PersistenceCapable class that has registered with JDOImplHelper.This is dangerous in that metadata information (possibly confidential) normally unavailable would be manageable (modifiable) by malicious code.
closePersistenceManagerFactoryThis allows closing a PersistenceManagerFactory, thereby releasing resources.This is dangerous in that resources bound to the PersistenceManagerFactory would be releaseable by malicious code.
Version:
1.0.2
See Also:
java.security.Permission, java.security.BasicPermission, JDOImplHelper, PersistenceCapable

Field Summary

static JDOPermission
CLOSE_PERSISTENCE_MANAGER_FACTORY
An instance of JDOPermission to be used for closePersistenceManagerFactory permission checking.
static JDOPermission
GET_METADATA
An instance of JDOPermission to be used for getMetadata permission checking.
static JDOPermission
MANAGE_METADATA
An instance of JDOPermission to be used for manageMetadata permission checking.
static JDOPermission
SET_STATE_MANAGER
An instance of JDOPermission to be used for setStateManager permission checking.

Constructor Summary

JDOPermission(String name)
Constructs a JDOPermission with the specified name.
JDOPermission(String name, String actions)
Constructs a JDOPermission with the specified name and actions.

Field Details

CLOSE_PERSISTENCE_MANAGER_FACTORY

public static final JDOPermission CLOSE_PERSISTENCE_MANAGER_FACTORY
An instance of JDOPermission to be used for closePersistenceManagerFactory permission checking.
Since:
1.0.1

GET_METADATA

public static final JDOPermission GET_METADATA
An instance of JDOPermission to be used for getMetadata permission checking.

MANAGE_METADATA

public static final JDOPermission MANAGE_METADATA
An instance of JDOPermission to be used for manageMetadata permission checking.
Since:
1.0.2

SET_STATE_MANAGER

public static final JDOPermission SET_STATE_MANAGER
An instance of JDOPermission to be used for setStateManager permission checking.

Constructor Details

JDOPermission

public JDOPermission(String name)
Constructs a JDOPermission with the specified name.
Parameters:
name - the name of the JDOPermission

JDOPermission

public JDOPermission(String name,
                     String actions)
Constructs a JDOPermission with the specified name and actions. The actions should be null; they are ignored. This constructor exists for use by the Policy object to instantiate new Permission objects.
Parameters:
name - the name of the JDOPermission
actions - should be null.