org.apache.jetspeed.om.registry
Interface SecurityEntry

All Known Implementing Classes:
BaseSecurityEntry

public interface SecurityEntry

Interface for manipulatin the security entries on the registry entries

Version:
$Id: SecurityEntry.java,v 1.6 2004/02/23 03:11:39 jford Exp $
Author:
Paul Spencer, Scott T. Weaver, Mark Orciuch

Method Summary
 boolean allowsGroup(java.lang.String group, java.lang.String action)
          Authorizes action for a group
 boolean allowsGroupRole(java.lang.String group, java.lang.String role, java.lang.String action)
          Authorizes action for a group role
 boolean allowsRole(java.lang.String role, java.lang.String action)
          Aututhorizes action for a role
 boolean allowsSpecificGroup(java.lang.String action, java.lang.String group)
          Checks whether a group is specifically allowed to access the request action This method ignores the "*" action and is here to play a maintenance role.
 boolean allowsSpecificGroupRole(java.lang.String action, java.lang.String group, java.lang.String role)
          Checks whether a group role is specifically allowed to access the request action This method ignores the "*" action and is here to play a maintenance role.
 boolean allowsSpecificRole(java.lang.String action, java.lang.String role)
          Checks whether a role is specifically allowed to access the request action This method ignores the "*" action and is here to play a maintenance role.
 boolean allowsSpecificUser(java.lang.String action, java.lang.String user)
          Checks whether a user is specifically allowed to access the request action This method ignores the "*" action and is here to play a maintenance role.
 boolean allowsUser(java.lang.String userName, java.lang.String action)
          Aututhorizes action for a named user
 boolean allowsUser(java.lang.String userName, java.lang.String action, java.lang.String ownerUserName)
          Aututhorizes action for a named user
 SecurityAccess getAccess(java.lang.String action)
          Returns the SecurityAccess object for the action requested or null if no specific access is defined for this action.
 java.util.Vector getAccesses()
          Getter for property accesses.
 java.lang.String getDescription()
          Getter for property description.
 long getId()
          Getter for property id.
 MetaInfo getMetaInfo()
          Getter for property metaInfo.
 java.lang.String getName()
          Getter for property name.
 SecurityReference getSecurityRef()
          Getter for property securityRef.
 java.lang.String getTitle()
          Getter for property title.
 boolean grantGroupAccess(java.lang.String action, java.lang.String group)
          Grants access for a specific action to a specific group for this SecurityEntry.
 boolean grantGroupRoleAccess(java.lang.String action, java.lang.String group, java.lang.String role)
          Grants access for a specific action to a specific group role for this SecurityEntry.
 boolean grantRoleAccess(java.lang.String action, java.lang.String role)
          Grants access for a specific action to a specific role for this SecurityEntry.
 boolean grantUserAccess(java.lang.String action, java.lang.String user)
          Grants access for a specific action to a specific user for this SecurityEntry.
 boolean isHidden()
          Getter for property hidden.
 void revokeAccess(java.lang.String action)
          Removes a security access for the named action.
 boolean revokeGroupAccess(java.lang.String action, java.lang.String group)
          Removes a group's access to a specific action.
 boolean revokeGroupRoleAccess(java.lang.String action, java.lang.String group, java.lang.String role)
          Removes a group role's access to a specific action.
 boolean revokeRoleAccess(java.lang.String action, java.lang.String role)
          Removes a role's access to a specific action.
 boolean revokeUserAccess(java.lang.String action, java.lang.String user)
          Removes a user's access to a specific action.
 void setAccesses(java.util.Vector accesses)
          Setter for property accesses.
 void setDescription(java.lang.String description)
          Setter for property description.
 void setHidden(boolean hidden)
          Setter for property hidden.
 void setMetaInfo(MetaInfo metaInfo)
          Setter for property metaInfo.
 void setName(java.lang.String name)
          Setter for property name.
 void setSecurityRef(SecurityReference securityRef)
          Setter for property securityRef.
 void setTitle(java.lang.String title)
          Setter for property title.
 

Method Detail

getAccesses

public java.util.Vector getAccesses()
Getter for property accesses.

Returns:
Value of property accesses.

setAccesses

public void setAccesses(java.util.Vector accesses)
Setter for property accesses.

Parameters:
accesses - New value of property accesses.

getName

public java.lang.String getName()
Getter for property name.

Returns:
Value of property name.

setName

public void setName(java.lang.String name)
Setter for property name.

Parameters:
name - New value of property name.

getDescription

public java.lang.String getDescription()
Getter for property description.

Returns:
Value of property description.

setDescription

public void setDescription(java.lang.String description)
Setter for property description.

Parameters:
description - New value of property description.

getSecurityRef

public SecurityReference getSecurityRef()
Getter for property securityRef.

Returns:
Value of property securityRef.

setSecurityRef

public void setSecurityRef(SecurityReference securityRef)
Setter for property securityRef.

Parameters:
securityRef - New value of property securityRef.

getTitle

public java.lang.String getTitle()
Getter for property title.

Returns:
Value of property title.

setTitle

public void setTitle(java.lang.String title)
Setter for property title.

Parameters:
title - New value of property title.

getMetaInfo

public MetaInfo getMetaInfo()
Getter for property metaInfo.

Returns:
Value of property metaInfo.

setMetaInfo

public void setMetaInfo(MetaInfo metaInfo)
Setter for property metaInfo.

Parameters:
metaInfo - New value of property metaInfo.

isHidden

public boolean isHidden()
Getter for property hidden.

Returns:
Value of property hidden.

setHidden

public void setHidden(boolean hidden)
Setter for property hidden.

Parameters:
hidden - New value of property hidden.

getId

public long getId()
Getter for property id.

Returns:
Value of property id.

allowsRole

public boolean allowsRole(java.lang.String role,
                          java.lang.String action)
Aututhorizes action for a role

Parameters:
role - requesting action
action - being requested
Returns:
true if action is allowed for role

allowsGroup

public boolean allowsGroup(java.lang.String group,
                           java.lang.String action)
Authorizes action for a group

Parameters:
group - requesting action
action - being requested
Returns:
true if action is allowed for role

allowsGroupRole

public boolean allowsGroupRole(java.lang.String group,
                               java.lang.String role,
                               java.lang.String action)
Authorizes action for a group role

Parameters:
group - requesting action
role - requesting action
action - being requested
Returns:
true if action is allowed for role

allowsUser

public boolean allowsUser(java.lang.String userName,
                          java.lang.String action)
Aututhorizes action for a named user

Parameters:
userName - requesting action
action - being requested
Returns:
true if action is allowed for named user

allowsUser

public boolean allowsUser(java.lang.String userName,
                          java.lang.String action,
                          java.lang.String ownerUserName)
Aututhorizes action for a named user

Parameters:
userName - requesting action
action - being requested
ownerUserName - Onwers username
Returns:
true if action is allowed for named user

grantRoleAccess

public boolean grantRoleAccess(java.lang.String action,
                               java.lang.String role)
Grants access for a specific action to a specific role for this SecurityEntry. This grants specific access ignores "*" action, if it exists.

Returns:
boolean Whether or not the access was granted. Basically, a false means that this role already has specific access.

allowsSpecificRole

public boolean allowsSpecificRole(java.lang.String action,
                                  java.lang.String role)
Checks whether a role is specifically allowed to access the request action This method ignores the "*" action and is here to play a maintenance role.

Returns:
boolean whether or not the role has access to this specific action.

grantGroupAccess

public boolean grantGroupAccess(java.lang.String action,
                                java.lang.String group)
Grants access for a specific action to a specific group for this SecurityEntry. This grants specific access ignores "*" action, if it exists.

Returns:
boolean Whether or not the access was granted. Basically, a false means that this group already has specific access.

allowsSpecificGroup

public boolean allowsSpecificGroup(java.lang.String action,
                                   java.lang.String group)
Checks whether a group is specifically allowed to access the request action This method ignores the "*" action and is here to play a maintenance role.

Returns:
boolean whether or not the group has access to this specific action.

grantGroupRoleAccess

public boolean grantGroupRoleAccess(java.lang.String action,
                                    java.lang.String group,
                                    java.lang.String role)
Grants access for a specific action to a specific group role for this SecurityEntry. This grants specific access ignores "*" action, if it exists.

Returns:
boolean Whether or not the access was granted. Basically, a false means that this group role already has specific access.

allowsSpecificGroupRole

public boolean allowsSpecificGroupRole(java.lang.String action,
                                       java.lang.String group,
                                       java.lang.String role)
Checks whether a group role is specifically allowed to access the request action This method ignores the "*" action and is here to play a maintenance role.

Returns:
boolean whether or not the group role has access to this specific action.

getAccess

public SecurityAccess getAccess(java.lang.String action)
Returns the SecurityAccess object for the action requested or null if no specific access is defined for this action. The "*" does change this, if an action is not specifically defined in the registry, null is returned

Returns:
SecurityAccess that is defined for this action or null if one is not specifically defined

allowsSpecificUser

public boolean allowsSpecificUser(java.lang.String action,
                                  java.lang.String user)
Checks whether a user is specifically allowed to access the request action This method ignores the "*" action and is here to play a maintenance role.

Returns:
boolean whether or not the user has access to this specific action.

grantUserAccess

public boolean grantUserAccess(java.lang.String action,
                               java.lang.String user)
Grants access for a specific action to a specific user for this SecurityEntry. This grants specific access ignores "*" action, if it exists.

Returns:
boolean Whether or not the access was granted. Basically, a false means that this role already has specific access.

revokeAccess

public void revokeAccess(java.lang.String action)
Removes a security access for the named action. This does not take into account the "*" action when the "*" is not the named action.


revokeUserAccess

public boolean revokeUserAccess(java.lang.String action,
                                java.lang.String user)
Removes a user's access to a specific action.

Parameters:
action - Action to remove access from.
Returns:
boolean Whehter or not the access existed and was removed.

revokeRoleAccess

public boolean revokeRoleAccess(java.lang.String action,
                                java.lang.String role)
Removes a role's access to a specific action.

Parameters:
action - Action to remove access from.
role - The role whose access we are revoking.
Returns:
boolean Whehter or not the access existed and was removed.

revokeGroupAccess

public boolean revokeGroupAccess(java.lang.String action,
                                 java.lang.String group)
Removes a group's access to a specific action.

Parameters:
action - Action to remove access from.
group - The group whose access we are revoking.
Returns:
boolean Whether or not the access existed and was removed.

revokeGroupRoleAccess

public boolean revokeGroupRoleAccess(java.lang.String action,
                                     java.lang.String group,
                                     java.lang.String role)
Removes a group role's access to a specific action.

Parameters:
action - Action to remove access from.
group - The group whose access we are revoking.
role - The role whose access we are revoking.
Returns:
boolean Whether or not the access existed and was removed.


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.