On Thu, Aug 14, 2008 at 12:38 AM, Shakti Purohit
<[EMAIL PROTECTED]> wrote:
> I am very new to Roller and its APIs. Can you provide me some more details
> as how to detect if some action has occurred in Roller (blog creation, post
> creation). If it would be possible for you to elaborate on general concepts
> involved in such implementation.
Since we don't have listeners, the approach I suggest is this:
- Read and understand the code in JPAWeblogEntryManagerImpl.saveWebogEntry()
- Extend JPAWeblogEntryManagerImpl, override the saveWeblogEntry() method
- Add logic to determine if post is new, being updated etc. and to
react accordingly
- call super.saveWeblogEntry() as appropriate
- Create a new Guice module by copying the code for JPAWebloggerModule
- replace the reference to JPAWeblogEntryManagerImpl with one to
your implementation
- Specify your new Guice module by overriding a property in your
roller-custom.properties
guice.backend.module=org.apache.roller.weblogger.business.jpa.MyWebloggerModule
Make sense?
- Dave