|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blackboard.platform.security.PermissionParser
public class PermissionParser
Utility class to parse and serialize permission sets for system extension manifests.
Constructor Summary | |
---|---|
PermissionParser()
|
Method Summary | |
---|---|
static java.security.Permission |
buildPermissionObject(java.lang.String type,
java.lang.String name,
java.lang.String actions)
Creates a permission object given type, name, and actions. |
static java.lang.Class |
getPermissionClass(java.lang.String type)
Returns the implementation class for a permission identifed by the type string. |
static java.lang.String |
getPermissionType(java.security.Permission perm)
Returns the type string for a permission, given its XML type identifier. |
static boolean |
isRestricted(java.security.Permission perm)
Simple check to see if the permission being created is "restricted" and thus not allowed for assignment to a system extension. |
static java.security.Permissions |
parsePermissions(org.w3c.dom.Element elem)
Fills a permissions collection from the XML element passed in. |
static java.security.Permissions |
parsePermissions(java.lang.String permDef)
Returns a Permissions collection parsed from the string. |
static java.lang.String |
serializePermissions(java.security.Permissions permList)
Streams the specified Permissions object into an XML format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermissionParser()
Method Detail |
---|
public static java.lang.String getPermissionType(java.security.Permission perm)
perm
- Permission to query.
public static java.lang.Class getPermissionClass(java.lang.String type)
type
- String used to identify the permission in its XML form. Examples include: "runtime", "persist",
"socket", and "attribute".
public static java.security.Permissions parsePermissions(java.lang.String permDef)
permDef
is expected to be an XML
fragment conforming to the XML spec in the System Extension framework.
Example:
<permissions> <permission type="attribute" name="user.givenname" actions="get,set"> </permissions>
permDef
- String containing permission definitions. The string must use the XML format described in the
System Extensions framework specification.
permDef
, the
collection will be empty.public static java.security.Permissions parsePermissions(org.w3c.dom.Element elem)
elem
- Element containing the permission definitions. The permissions are expected to be the
first level elements, conforming to the manifest declaration.
Permissions
collectionpublic static java.lang.String serializePermissions(java.security.Permissions permList)
Permissions
object into an XML format. Only permission types
supported for plugins are encoded (Runtime permissions and Attribute permissions).
perm
- Permissions collection to encode
public static java.security.Permission buildPermissionObject(java.lang.String type, java.lang.String name, java.lang.String actions)
type
- type string. This should correspond to one of the types defined in this classname
- name to give the permissionactions
- actions to give the permission
public static boolean isRestricted(java.security.Permission perm)
perm
- permission to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |