Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.security
Class PortalPermission

    java.lang.Object
      java.security.Permission
          org.jboss.portal.security.PortalPermission

All Implemented Interfaces:
  java.io.Serializable, java.security.Guard

Direct Known Subclasses:
  InstancePermission, PortalObjectPermission, PortletPermission

    public abstract class PortalPermission

extends java.security.Permission

Base permission that can act either as a container or as a permission that has an URI.

Version:
  $Revision: 8784 $
Author:
  Julien Viet
See Also:
  Serialized Form

Field Summary
`protected PortalPermissionCollection` | `collection` .
`protected java.lang.String` | `uri` .

Constructor Summary
`PortalPermission(java.lang.String name, PortalPermissionCollection collection)`
`PortalPermission(java.lang.String name, java.lang.String uri)`

Method Summary
`abstract java.lang.String` | `getType()` Return the portal permission type.
`java.lang.String` | `getURI()` Return the uri for the permission or null if the permission acts as a container.
`abstract boolean` | `implies(PermissionRepository repository, javax.security.auth.Subject caller, java.lang.String roleName, PortalPermission permission)` Implement the imply logic when we check the permission against a domain.
`boolean` | `isContainer()` Return true if the permission is a container.
`java.security.PermissionCollection` | `newPermissionCollection()` Return an instance of PortalPermissionCollection or null if the permission does not act as a container.

Methods inherited from class java.security.Permission
`checkGuard, equals, getActions, getName, hashCode, implies, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### uri

    protected final java.lang.String uri

  .

### collection

    protected final PortalPermissionCollection collection

  .

Constructor Detail

### PortalPermission

    public PortalPermission(java.lang.String name,
                            PortalPermissionCollection collection)

### PortalPermission

    public PortalPermission(java.lang.String name,
                            java.lang.String uri)

Method Detail

### getURI

    public java.lang.String getURI()

  Return the uri for the permission or null if the permission acts as a container.

### newPermissionCollection

    public java.security.PermissionCollection newPermissionCollection()

  Return an instance of PortalPermissionCollection or null if the permission does not act as a container.

  Overrides:
    `newPermissionCollection` in class `java.security.Permission`

### isContainer

    public boolean isContainer()

  Return true if the permission is a container.

### getType

    public abstract java.lang.String getType()

  Return the portal permission type.

  Returns:
    the portal permission type

### implies

    public abstract boolean implies(PermissionRepository repository,
                                    javax.security.auth.Subject caller,
                                    java.lang.String roleName,
                                    PortalPermission permission)
                             throws PortalSecurityException

  Implement the imply logic when we check the permission against a domain.

  Parameters:
    `repository` -
    `caller` -
    `permission` -
  Returns:
    true if the permission is implied
  Throws:
    `PortalSecurityException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD