[Hippo-cms7-user] Accessing "History" list in CMS from code

Frank van Lankvelt f.vanlankvelt at onehippo.com
Wed Jun 13 14:48:19 CEST 2012


On Wed, Jun 13, 2012 at 2:35 PM, Kenan Salic <k.salic at onehippo.com> wrote:

> The "History" colomn is showing the events logged (located under
> /hippo:log) with the:
>
> org.hippoecm.frontend.plugins.reporting.ReportPlugin
>
> configuration is located:
>
> /hippo:configuration/hippo:frontend/cms/cms-dashboard/currentActivityPlugin
> and
> /hippo:configuration/hippo:frontend/cms/cms-reports/currentActivityReport
>
> Depending which archetype version you are using the latest:
> WorkflowEventLoggerWorkflowImpl is logging the events.
>
> e.g.:
>
>   WorkflowEventLoggerWorkflowImpl eventlogger = new
> WorkflowEventLoggerWorkflowImpl(session, session, subject);
>                     eventlogger.logEvent(who, className, methodName);
>
> there's a cleaner way of getting to the workflow (without needing to have
a compile dependency to the repository-engine), by using the workflow
manager:

EventLoggerWorkflow workflow
= (EventLoggerWorkflow) workflowManager.getWorkflow("internal",
session.getRootNode().getNode("hippo:log"));
workflow.logEvent(session.getUserID(), className, methodName);

this will create the jcr node; customizing the label in the history list is
a bit harder.  You'll need to look at the current activity plugin for that.

cheers, Frank

Regards
>
> On Tue, Jun 12, 2012 at 3:58 PM, marijan milicevic <
> m.milicevic at onehippo.com> wrote:
>
>>  Hi Mike,
>>
>> On 06/12/2012 03:35 PM, Mykhailo Kotsur wrote:
>>
>> Hi Marijan,
>>
>>  I meant this table (on the right side of screenshot). Don't know what
>> is the proper technical name for it.
>>
>>
>> that one is  called "TODO plugin" see [1]..I am not sure , but I think
>> you can use EventLoggerWorkflow to log events to it..
>>
>> cheers
>> marijan
>>
>>
>> [1] org.hippoecm.frontend.plugins.cms.dashboard.todo.TodoPlugin
>>
>>
>>
>>  Mike
>>
>>
>>  On Jun 12, 2012, at 3:16 PM, marijan milicevic wrote:
>>
>>  Hi Mike,
>>
>> On 06/12/2012 12:05 PM, Mykhailo Kotsur wrote:
>>
>> Hi!
>>
>>
>>  I'm quite sure there is a simple way to publish some messages to the
>> "HIstory" list in CMS from site module. Would appreciate a hint how to do
>> it.
>>
>>
>> do you mean Document history (revisions)? I so, have a look @ following
>> classes:
>>
>> org.hippoecm.frontend.plugins.reviewedactions.model.VariantHistoryIterator
>> org.hippoecm.frontend.plugins.reviewedactions.model.RevisionHistory
>>
>> hth,
>> cheers
>> marijan
>>
>> Thanks in advance.
>>
>>
>>  Mike
>>
>> _______________________________________________
>>
>> Hippo-cms7-user mailing list and forums
>>
>> http://www.onehippo.org/cms7/support/forums.html
>>
>>
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>>
>>
>>
>>
>> _______________________________________________
>> Hippo-cms7-user mailing list and forumshttp://www.onehippo.org/cms7/support/forums.html
>>
>>
>>
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>>
>
>
>
> --
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
>



-- 
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onehippo.org/pipermail/hippo-cms7-user/attachments/20120613/0950189f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 41616 bytes
Desc: not available
URL: <http://lists.onehippo.org/pipermail/hippo-cms7-user/attachments/20120613/0950189f/attachment.png>


More information about the Hippo-cms7-user mailing list