Package javax.jdo.spi
Class JDOPermission
- java.lang.Object
-
- java.security.Permission
-
- java.security.BasicPermission
-
- javax.jdo.spi.JDOPermission
-
- All Implemented Interfaces:
Serializable,Guard
public final class JDOPermission extends BasicPermission
TheJDOPermissionclass is for operations that are reserved for JDO implementations and should not be called by other code. AJDOPermissionis 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 Name What the Permission Allows Risks of Allowing this Permission setStateManagerThis allows setting the StateManagerfor an instance ofPersistenceCapable. TheStateManagerhas unlimited access to get and set persistent and transactional fields of thePersistenceCapableinstance.This is dangerous in that information (possibly confidential) normally unavailable would be accessible to malicious code. getMetadataThis allows getting metadata for any PersistenceCapableclass that has registered withJDOImplHelper.This is dangerous in that metadata information (possibly confidential) normally unavailable would be accessible to malicious code. manageMetadataThis allows managing metadata for any PersistenceCapableclass that has registered withJDOImplHelper.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 PersistenceManagerFactorywould be releaseable by malicious code.- Version:
- 1.0.2
- See Also:
Permission,BasicPermission,JDOImplHelper,PersistenceCapable, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static JDOPermissionCLOSE_PERSISTENCE_MANAGER_FACTORYAn instance ofJDOPermissionto be used forclosePersistenceManagerFactorypermission checking.static JDOPermissionGET_METADATAAn instance ofJDOPermissionto be used forgetMetadatapermission checking.static JDOPermissionMANAGE_METADATAAn instance ofJDOPermissionto be used formanageMetadatapermission checking.static JDOPermissionSET_STATE_MANAGERAn instance ofJDOPermissionto be used forsetStateManagerpermission checking.
-
Constructor Summary
Constructors Constructor Description JDOPermission(String name)Constructs aJDOPermissionwith the specified name.JDOPermission(String name, String actions)Constructs aJDOPermissionwith the specified name and actions.
-
Method Summary
-
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
-
Methods inherited from class java.security.Permission
checkGuard, getName, toString
-
-
-
-
Field Detail
-
GET_METADATA
public static final JDOPermission GET_METADATA
An instance ofJDOPermissionto be used forgetMetadatapermission checking.
-
MANAGE_METADATA
public static final JDOPermission MANAGE_METADATA
An instance ofJDOPermissionto be used formanageMetadatapermission checking.- Since:
- 1.0.2
-
SET_STATE_MANAGER
public static final JDOPermission SET_STATE_MANAGER
An instance ofJDOPermissionto be used forsetStateManagerpermission checking.
-
CLOSE_PERSISTENCE_MANAGER_FACTORY
public static final JDOPermission CLOSE_PERSISTENCE_MANAGER_FACTORY
An instance ofJDOPermissionto be used forclosePersistenceManagerFactorypermission checking.- Since:
- 1.0.1
-
-
Constructor Detail
-
JDOPermission
public JDOPermission(String name)
Constructs aJDOPermissionwith the specified name.- Parameters:
name- the name of theJDOPermission
-
JDOPermission
public JDOPermission(String name, String actions)
Constructs aJDOPermissionwith the specified name and actions. The actions should benull; they are ignored. This constructor exists for use by thePolicyobject to instantiate newPermissionobjects.- Parameters:
name- the name of theJDOPermissionactions- should benull.
-
-