com.arsdigita.kernel.permissions
Class PermissionsObserver

java.lang.Object
  extended bycom.arsdigita.kernel.permissions.PermissionsObserver
All Implemented Interfaces:
DomainObjectObserver, GlobalObserver

public class PermissionsObserver
extends Object
implements GlobalObserver

Global observer to enforce permissions on ACS Objects. This observer verifies that the user has write access to the object before the object is saved.

Author:
richardl@redhat.com

Field Summary
 
Fields inherited from interface com.arsdigita.domain.GlobalObserver
versionId
 
Constructor Summary
PermissionsObserver()
           
 
Method Summary
 void add(DomainObject dobj, String name, DataObject dataObject)
          Callback for an add operation on the observed DomainObject
 void afterDelete(DomainObject dobj)
          Callback after a delete operation on the observed DomainObject
 void afterSave(DomainObject dobj)
          Callback after a save operation on the observed DomainObject
 void beforeDelete(DomainObject dobj)
          Callback before a delete operation on the observed DomainObject
 void beforeSave(DomainObject dobj)
          Callback before a save operation on the observed DomainObject
 void clear(DomainObject dobj, String name)
          Callback for a clear operation on the observed DomainObject
 void remove(DomainObject dobj, String name, DataObject dataObject)
          Callback for a remove operation on the observed DomainObject
 void set(DomainObject dobj, String name, Object old_value, Object new_value)
          Callback for a set operation on the observed DomainObject
 boolean shouldObserve(DomainObject dobj)
          This method should return a value indicating whether or not this GlobalObserver wishes to observe the given domain object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionsObserver

public PermissionsObserver()
Method Detail

set

public void set(DomainObject dobj,
                String name,
                Object old_value,
                Object new_value)
Description copied from interface: DomainObjectObserver
Callback for a set operation on the observed DomainObject

Specified by:
set in interface DomainObjectObserver
Parameters:
dobj - the observed domain object
name - the name of the parameter being set
old_value - the old value of the parameter being set
new_value - the old value of the parameter being set

add

public void add(DomainObject dobj,
                String name,
                DataObject dataObject)
Description copied from interface: DomainObjectObserver
Callback for an add operation on the observed DomainObject

Specified by:
add in interface DomainObjectObserver
Parameters:
dobj - the observed domain object
name - the name of the parameter being set

remove

public void remove(DomainObject dobj,
                   String name,
                   DataObject dataObject)
Description copied from interface: DomainObjectObserver
Callback for a remove operation on the observed DomainObject

Specified by:
remove in interface DomainObjectObserver
Parameters:
dobj - the observed domain object
name - the name of the parameter being set

clear

public void clear(DomainObject dobj,
                  String name)
Description copied from interface: DomainObjectObserver
Callback for a clear operation on the observed DomainObject

Specified by:
clear in interface DomainObjectObserver
Parameters:
dobj - the observed domain object
name - the name of the parameter being set

beforeSave

public void beforeSave(DomainObject dobj)
Description copied from interface: DomainObjectObserver
Callback before a save operation on the observed DomainObject

Specified by:
beforeSave in interface DomainObjectObserver
Parameters:
dobj - the observed domain object

afterSave

public void afterSave(DomainObject dobj)
Description copied from interface: DomainObjectObserver
Callback after a save operation on the observed DomainObject

Specified by:
afterSave in interface DomainObjectObserver
Parameters:
dobj - the observed domain object

beforeDelete

public void beforeDelete(DomainObject dobj)
Description copied from interface: DomainObjectObserver
Callback before a delete operation on the observed DomainObject

Specified by:
beforeDelete in interface DomainObjectObserver
Parameters:
dobj - the observed domain object

afterDelete

public void afterDelete(DomainObject dobj)
Description copied from interface: DomainObjectObserver
Callback after a delete operation on the observed DomainObject

Specified by:
afterDelete in interface DomainObjectObserver
Parameters:
dobj - the observed domain object

shouldObserve

public boolean shouldObserve(DomainObject dobj)
Description copied from interface: GlobalObserver
This method should return a value indicating whether or not this GlobalObserver wishes to observe the given domain object.

Specified by:
shouldObserve in interface GlobalObserver
Parameters:
dobj - The domain object that is a candidate for observation.


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC