Package javax.jdo.spi
Class JDOPermission
java.lang.Object
java.security.Permission
java.security.BasicPermission
javax.jdo.spi.JDOPermission
- All Implemented Interfaces:
Serializable
,Guard
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 Name | What the Permission Allows | Risks of Allowing this Permission |
---|---|---|
setStateManager |
This 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. |
getMetadata |
This 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. |
manageMetadata |
This 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. |
closePersistenceManagerFactory |
This 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JDOPermission
An instance ofJDOPermission
to be used forclosePersistenceManagerFactory
permission checking.static final JDOPermission
An instance ofJDOPermission
to be used forgetMetadata
permission checking.static final JDOPermission
An instance ofJDOPermission
to be used formanageMetadata
permission checking.static final JDOPermission
An instance ofJDOPermission
to be used forsetStateManager
permission checking. -
Constructor Summary
ConstructorsConstructorDescriptionJDOPermission
(String name) Constructs aJDOPermission
with the specified name.JDOPermission
(String name, String actions) Constructs aJDOPermission
with 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 Details
-
GET_METADATA
An instance ofJDOPermission
to be used forgetMetadata
permission checking. -
MANAGE_METADATA
An instance ofJDOPermission
to be used formanageMetadata
permission checking.- Since:
- 1.0.2
-
SET_STATE_MANAGER
An instance ofJDOPermission
to be used forsetStateManager
permission checking. -
CLOSE_PERSISTENCE_MANAGER_FACTORY
An instance ofJDOPermission
to be used forclosePersistenceManagerFactory
permission checking.- Since:
- 1.0.1
-
-
Constructor Details
-
JDOPermission
Constructs aJDOPermission
with the specified name.- Parameters:
name
- the name of theJDOPermission
-
JDOPermission
Constructs aJDOPermission
with the specified name and actions. The actions should benull
; they are ignored. This constructor exists for use by thePolicy
object to instantiate newPermission
objects.- Parameters:
name
- the name of theJDOPermission
actions
- should benull
.
-