Xindice API

org.apache.xindice.core.security
Class ResourcePermissions

java.lang.Object
  |
  +--org.apache.xindice.core.security.ResourcePermissions
All Implemented Interfaces:
Configurable

public class ResourcePermissions
extends java.lang.Object
implements Configurable


Constructor Summary
ResourcePermissions(java.lang.String resource)
           
 
Method Summary
 void addPermissionAllow(int type, java.lang.String group)
          Grants the specified group a permission for this resource.
 void addPermissionDeny(int type, java.lang.String group)
          Denys the specified group a permission for this resource.
 boolean checkPermission(int access, int type, java.lang.String group)
          Checks whether the specified group has type permission to access this resource.
 Configuration getConfig()
          getConfig retrieves the configuration information for the Configurable object instance.
 void setConfig(Configuration config)
          setConfig sets the configuration information for the Configurable object instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcePermissions

public ResourcePermissions(java.lang.String resource)
Method Detail

addPermissionAllow

public void addPermissionAllow(int type,
                               java.lang.String group)
Grants the specified group a permission for this resource. Valid permission types are Permission.READ Permission.WRITE Permission.DELETE Permission.MODIFY Permission.EXECUTE Permission.ADMIN
Parameters:
type - The type of permission to set.
group - The group being given the permission.

addPermissionDeny

public void addPermissionDeny(int type,
                              java.lang.String group)
Denys the specified group a permission for this resource. Valid permission types are Permission.READ Permission.WRITE Permission.DELETE Permission.MODIFY Permission.EXECUTE Permission.ADMIN
Parameters:
type - The type of permission to set.
group - The group being denied the permission.

checkPermission

public boolean checkPermission(int access,
                               int type,
                               java.lang.String group)
Checks whether the specified group has type permission to access this resource. Valid permission types are Permission.READ Permission.WRITE Permission.DELETE Permission.MODIFY Permission.EXECUTE Permission.ADMIN
Parameters:
type - The type of permission to check.
group - The group requested permission.

setConfig

public void setConfig(Configuration config)
setConfig sets the configuration information for the Configurable object instance.
Specified by:
setConfig in interface Configurable
Parameters:
config - The configuration Node

getConfig

public Configuration getConfig()
getConfig retrieves the configuration information for the Configurable object instance.
Specified by:
getConfig in interface Configurable
Returns:
The configuration Node

Xindice API

Copyright (c) 1999-2001 The Apache Software Foundation