Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

VOS::VobjectAccessControl Class Reference

This is the base class for Vobject access control policies. More...

#include <vos/corelibs/vos/accesscontrol.hh>

Inheritance diagram for VOS::VobjectAccessControl:

VOS::SiteAccessControl VOS::LocalOnlyAccessControl VOS::NoAccessControl VOS::ReadOnlyAccessControl List of all members.

Public Member Functions

Static Public Member Functions


Detailed Description

This is the base class for Vobject access control policies.

A policy decides whether a particular action on Vobject is permitted. This class also stores a mapping of text strings to control policies, so that a user may request a policy by name (such as "readonly") rather than having to supply the class directly. This capability can also be used to save access control policies persistantly.

Definition at line 56 of file accesscontrol.hh.


Member Function Documentation

void VobjectAccessControl::addPolicy VobjectAccessControl ac  )  [static]
 

Add a new access control policy.

This policy will be available as whatever name is returned by ac->getPolicyName().

Parameters:
ac The policy object.

Definition at line 39 of file accesscontrol.cc.

void VobjectAccessControl::addPolicyFactory const string &  name,
VobjectAccessControlFactory  ac
[static]
 

Add a new access control policy.

The difference between this and the other addPolicy method is that a policy factory creates a new policy object each time getPolicy() is called, whereas otherwise the same policy object will be returned each time. This is useful if you want to write an access control policy bound to a specific object that keeps some state about that object.

Parameters:
name The policy name. This should be the same as the name returned by getPolicyName() for the factory-created objects.
ac The policy factory.

Definition at line 45 of file accesscontrol.cc.

virtual bool VOS::VobjectAccessControl::checkAddTypePermission VobjectEvent e,
string &  message
[pure virtual]
 

Called when a type add is requested by a remote object.

Parameters:
e The event to validate
Returns:
true if allowed, false if denied

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

virtual bool VOS::VobjectAccessControl::checkChildListenPermission VobjectEvent e,
string &  message
[pure virtual]
 

Called when a remote object wants to listen to the child list of some object.

Parameters:
e The event to validate
Returns:
true if allowed, false if denied

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

virtual bool VOS::VobjectAccessControl::checkInsertChildPermission VobjectEvent e,
string &  message
[pure virtual]
 

Called when a child insert is requested by a remote object.

Parameters:
e The event to validate
Returns:
true if allowed, false if denied

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

virtual bool VOS::VobjectAccessControl::checkParentListenPermission VobjectEvent e,
string &  message
[pure virtual]
 

Called when a remote object wants to listen to the parent set of some object.

Parameters:
e The event to validate
Returns:
true if allowed, false if denied

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

virtual bool VOS::VobjectAccessControl::checkReadChildPermission VobjectEvent e,
string &  message
[pure virtual]
 

Called when a child read is requested by a remote object.

Parameters:
e The event to validate
Returns:
true if allowed, false if denied

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

virtual bool VOS::VobjectAccessControl::checkReadParentPermission VobjectEvent e,
string &  message
[pure virtual]
 

Called when a parent read is requested by a remote object.

Parameters:
e The event to validate
Returns:
true if allowed, false if denied

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

virtual bool VOS::VobjectAccessControl::checkReadTypePermission VobjectEvent e,
string &  message
[pure virtual]
 

Called when a type read is requested by a remote object.

Parameters:
e The event to validate
Returns:
true if allowed, false if denied

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

virtual bool VOS::VobjectAccessControl::checkRemoveChildPermission VobjectEvent e,
string &  message
[pure virtual]
 

Called when a child remove is requested by a remote object.

Parameters:
e The event to validate
Returns:
true if allowed, false if denied

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

virtual bool VOS::VobjectAccessControl::checkSetChildPermission VobjectEvent e,
string &  message
[pure virtual]
 

Called when a child replace is requested by a remote object.

Parameters:
e The event to validate
Returns:
true if allowed, false if denied

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

VobjectAccessControl * VobjectAccessControl::getPolicy const string &  name,
LocalVobject lv
[static]
 

Get the requested policy given the name and LocalVobject.

Parameters:
name The policy name, registered at some point using addPolicy()
lv The LocalVobject this policy will be added to (doesn't actually add it, but a policy factory may want to know what object it is being added to)
Returns:
the policy object, or NULL if there is no registered policy with that name

Definition at line 51 of file accesscontrol.cc.

virtual const string VOS::VobjectAccessControl::getPolicyName  )  [pure virtual]
 

Get a short string describing this policy.

Implemented in VOS::NoAccessControl, VOS::ReadOnlyAccessControl, and VOS::LocalOnlyAccessControl.

Referenced by addPolicy().

void VobjectAccessControl::removePolicy const string &  name  )  [static]
 

Remove policy with the given name.

Parameters:
name policy name

Definition at line 61 of file accesscontrol.cc.


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:56:08 2003 for Interreality Project - VOS by doxygen 1.3.2