org.mycore.access.strategies
Class MCRObjectTypeStrategy

java.lang.Object
  extended by org.mycore.access.strategies.MCRObjectTypeStrategy
All Implemented Interfaces:
MCRAccessCheckStrategy

public class MCRObjectTypeStrategy
extends Object
implements MCRAccessCheckStrategy

Use this class if you want to have a fallback to some default access rules. First a check is done for the MCRObjectID. If no rule for the ID is specified it will be tried to check the permission agains the rule ID default_<ObjectType> if it exists. If not the last fallback is done against default.

Version:
$Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
Author:
Thomas Scheffler (yagee)

Constructor Summary
MCRObjectTypeStrategy()
           
 
Method Summary
 boolean checkPermission(String id, String permission)
          determines whether the current user has the permission to perform a certain action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCRObjectTypeStrategy

public MCRObjectTypeStrategy()
Method Detail

checkPermission

public boolean checkPermission(String id,
                               String permission)
Description copied from interface: MCRAccessCheckStrategy
determines whether the current user has the permission to perform a certain action.

Specified by:
checkPermission in interface MCRAccessCheckStrategy
Parameters:
id - the MCRObjectID of the object
permission - the access permission for the rule
Returns:
true if the access is allowed otherwise it return
See Also:
MCRAccessManager.checkPermission(String, String)