org.apache.jetspeed.security
Class FragmentPermission

java.lang.Object
  extended by java.security.Permission
      extended by org.apache.jetspeed.security.PortalResourcePermission
          extended by org.apache.jetspeed.security.FragmentPermission
All Implemented Interfaces:
Serializable, Guard

public class FragmentPermission
extends PortalResourcePermission

Fragment permission.

This code was partially inspired from articles from:

This class represents access to a fragment within a content document. A FragmentPermission consists of a path, fragment name, or a simple fragment name pattern and a set of actions valid for that pathname.

Here are some examples of valid fragment permissions names:

  • "/folder/page.psml/app::portlet" matches fragments within a page for a specified portlet contained in a app
  • "security::*" matches fragments for portlets from the security app
  • "<<ALL FRAGMENTS>>" matches any fragment
  • Author:
    Randy Watler
    See Also:
    Serialized Form

    Field Summary
     
    Fields inherited from class org.apache.jetspeed.security.PortalResourcePermission
    mask
     
    Constructor Summary
    FragmentPermission(String name, int mask)
              Constructor for FragmentPermission.
    FragmentPermission(String name, String actions)
              Constructor for FragmentPermission.
     
    Method Summary
     boolean equals(Object object)
               
     boolean implies(Permission permission)
               
     
    Methods inherited from class org.apache.jetspeed.security.PortalResourcePermission
    getActions, hashCode, newPermissionCollection, parseActions
     
    Methods inherited from class java.security.Permission
    checkGuard, getName, toString
     
    Methods inherited from class java.lang.Object
    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
     

    Constructor Detail

    FragmentPermission

    public FragmentPermission(String name,
                              String actions)

    Constructor for FragmentPermission.

    Parameters:
    name - The fragment name.
    actions - The actions on the fragment.

    FragmentPermission

    public FragmentPermission(String name,
                              int mask)

    Constructor for FragmentPermission.

    Parameters:
    name - The fragment name.
    mask - The mask of actions on the fragment.
    Method Detail

    implies

    public boolean implies(Permission permission)
    Overrides:
    implies in class PortalResourcePermission

    equals

    public boolean equals(Object object)
    Specified by:
    equals in class Permission
    See Also:
    Permission.equals(Object)


    Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.