SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-597
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Lauri
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Compass

Apply custom filters for objects to be saved or created with CompassOperations

Created: 27/Mar/08 05:57 AM   Updated: 28/Mar/08 05:44 PM
Component/s: Compass::Core
Affects Version/s: None
Fix Version/s: 2.0.0 RC1


 Description  « Hide
I would like to register a filter for CompassOperations. The filter would be called on save/create/delete operations with the user object as a parameter. The filter could then decide whether the user object is eligible for save/create/delete or not.

This functionality could then be used for denying save/create/delete on unwanted objects.

For example, I have a business object which contains sensitive data. I do not wish this sensitive data to be indexed. To achieve this, I would like to implement a filter interface found in the Compass library, and register an object of the implementation to CompassOperations.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 28/Mar/08 05:44 PM
Added package org.compass.core.events package which has event listener for create/save/delete operations with the ability to filter them out in the "pre" phase.

Documentation can be found in the javadoc, and configuration within the reference docs under the configuration section. As an example:

If we have a custom PreCreateEventListener, then configuring it will be:

compass.event.preSave.mylistener.type=eg.MyCustomListener