I recall talking to Darius about this in Kigali as something i wished to do
in a small module, but it appears someone else is already planning to do it
so i might give it up.

Rohit, i understand springs has support for integrating audit logging via
AOP in the application context file, you might want to look into it.

Wyclif

On Tue, Oct 18, 2011 at 8:05 AM, Darius Jazayeri <[email protected]> wrote:

> Hi Rohit,
>
> I'm copying the developers mailing list. Future discussion of the feature
> should happen there, so others can chime in if I say anything wrong.
>
> Yes, you're on the right track with all this.
>
> 2. You can find an AuditableInterceptor as an example of a Hibernate
> Interceptor in our codebase.
>
> 4. See our conventions <https://wiki.openmrs.org/x/LwAJ> for naming.
> Presumably the table would be called audit_log and the java class would be
> AuditLog.
>
> 5. I'm not actually convinced that starting with just one class will be any
> easier, but that approach is fine.
>
> You should be able to say Context.getAuthenticatedUser() in the interceptor
> and this will get the authenticated user from the session.
>
> -Darius
>
>
> On Mon, Oct 17, 2011 at 8:07 PM, Rohit Manohar <[email protected]> wrote:
>
>> Hi Darius,
>>
>> We have set up the OpenMRS environment as given in the wiki. Looking into
>> the code base, we were able to obtain a more concrete understanding of the
>> task. We briefly summarize our understanding below:
>>
>> 1. The hibernate mapping for OpenMRS is present in
>> trunk/api/src/main/resources/org/openmrs/api/db/hibernate
>>
>> 2. Our fundamental job is to write a hibernate interceptor like
>> http://java.dzone.com/articles/using-a-hibernate-interceptor-
>>
>> 3. This interceptor would basically trigger an audit table insert for any
>> insert/update/delete operation on any other table.
>>
>> 4. We will need a centralized table 'auditTrail' to store all the audit
>> logs.
>>
>> 5. We will prototype this by starting with PersonAddress class, and later
>> extend it to the rest.
>>
>> Please verify and validate our understanding.
>>
>> Also, how do we get user session information in our interceptor class.
>>
>> Since, the above content is in continuation with this thread, I am sending
>> it on your personal email. In future, we will use the mailing list.
>>
>> Regards,
>>
>>
>>
>> On Mon, Oct 17, 2011 at 12:55 PM, Darius Jazayeri <[email protected]>wrote:
>>
>>> See:
>>> https://wiki.openmrs.org/display/docs/Code+Repository#CodeRepository-Requestingabranch
>>>
>>> -Darius
>>>
>>> On Mon, Oct 17, 2011 at 9:04 AM, Darius Jazayeri <[email protected]>wrote:
>>>
>>>> You'll need to email [email protected]. Look on the wiki for details on
>>>> requesting a branch.
>>>>
>>>> -Darius (by phone)
>>>>
>>>> On Oct 17, 2011 8:52 AM, "Rohit Manohar" <[email protected]> wrote:
>>>>
>>>> Hi
>>>>
>>>> Thanks for your help.
>>>>
>>>> We expect to start coding by next week. Meanwhile, we would appreciate
>>>> if you could create a branch for us. We will go through the existing code
>>>> base and try to get a better understanding of the system. Also, if could
>>>> shed some light on accesssing the APIs and the database, that would be
>>>> helpful.
>>>>
>>>> Please let me know when a branch is forked and how do we access it.
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>> On Mon, Oct 17, 2011 at 10:54 AM, Darius Jazayeri <[email protected]>
>>>> wrote:
>>>> >
>>>> > So, the long run...
>>>>
>>>> --
>>>> Rohit Manohar
>>>> Graduate Student
>>>> North Carolina State University
>>>> Raleigh, US.
>>>>
>>>>
>>>
>>
>>
>> --
>> Rohit Manohar
>> Graduate Student
>> North Carolina State University
>> Raleigh, US.
>>
>>
> ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to