Search in sources :

Example 11 with ActionLogRecordSearchBean

use of org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean in project entando-core by entando.

the class TestSocialActivityStreamDAO method testActionLogSearch.

public void testActionLogSearch() {
    IActionLogRecordSearchBean bean = null;
    List<Integer> ids = this._actionLoggerDAO.getActionRecords(bean);
    this.compareIds(new Integer[] {}, ids);
    ActionLogRecord record1 = this._helper.createActionRecord(1, "username1", "actionName1", "namespace1", DateConverter.parseDate("01/01/2009 00:00", "dd/MM/yyyy HH:mm"), "params1");
    ActionLogRecord record2 = this._helper.createActionRecord(2, "username2", "actionName2", "namespace2", DateConverter.parseDate("01/01/2009 10:00", "dd/MM/yyyy HH:mm"), "params2");
    ActionLogRecord record3 = this._helper.createActionRecord(3, "username123", "actionName123", "namespace123", DateConverter.parseDate("02/01/2009 12:00", "dd/MM/yyyy HH:mm"), "params123");
    this._helper.addActionRecord(record1);
    this._helper.addActionRecord(record2);
    this._helper.addActionRecord(record3);
    ActionLogRecordSearchBean searchBean = this._helper.createSearchBean(null, "Name", null, null, DateConverter.parseDate("02/01/2009 10:01", "dd/MM/yyyy HH:mm"), DateConverter.parseDate("02/01/2009 14:01", "dd/MM/yyyy HH:mm"));
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 3 }, ids);
}
Also used : ActionLogRecord(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecord) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) ActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean)

Example 12 with ActionLogRecordSearchBean

use of org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean in project entando-core by entando.

the class TestSocialActivityStreamDAO method testGetActionRecords.

public void testGetActionRecords() {
    IActionLogRecordSearchBean bean = null;
    List<Integer> ids = this._actionLoggerDAO.getActionRecords(bean);
    this.compareIds(new Integer[] {}, ids);
    ActionLogRecord record1 = this._helper.createActionRecord(1, "username1", "actionName1", "namespace1", DateConverter.parseDate("01/01/2009 00:00", "dd/MM/yyyy HH:mm"), "params1");
    ActionLogRecord record2 = this._helper.createActionRecord(2, "username2", "actionName2", "namespace2", DateConverter.parseDate("01/01/2009 10:00", "dd/MM/yyyy HH:mm"), "params2");
    ActionLogRecord record3 = this._helper.createActionRecord(3, "username123", "actionName123", "namespace123", DateConverter.parseDate("02/01/2009 12:00", "dd/MM/yyyy HH:mm"), "params123");
    this._helper.addActionRecord(record1);
    this._helper.addActionRecord(record2);
    this._helper.addActionRecord(record3);
    ids = this._actionLoggerDAO.getActionRecords(bean);
    this.compareIds(new Integer[] { 1, 2, 3 }, ids);
    ActionLogRecordSearchBean searchBean = this._helper.createSearchBean("name", "Name", "space", "arams", null, null);
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 1, 2, 3 }, ids);
    searchBean = this._helper.createSearchBean("name", "Name", "space", "arams", DateConverter.parseDate("01/01/2009 10:01", "dd/MM/yyyy HH:mm"), null);
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 3 }, ids);
    searchBean = this._helper.createSearchBean(null, null, null, null, null, DateConverter.parseDate("01/01/2009 10:01", "dd/MM/yyyy HH:mm"));
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 1, 2 }, ids);
    searchBean = this._helper.createSearchBean(null, "Name", null, null, DateConverter.parseDate("01/01/2009 09:01", "dd/MM/yyyy HH:mm"), DateConverter.parseDate("01/01/2009 10:01", "dd/MM/yyyy HH:mm"));
    ids = this._actionLoggerDAO.getActionRecords(searchBean);
    this.compareIds(new Integer[] { 2 }, ids);
}
Also used : ActionLogRecord(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecord) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) IActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean) ActionLogRecordSearchBean(org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean)

Aggregations

ActionLogRecordSearchBean (org.entando.entando.aps.system.services.actionlog.model.ActionLogRecordSearchBean)12 ActionLogRecord (org.entando.entando.aps.system.services.actionlog.model.ActionLogRecord)9 Content (com.agiletec.plugins.jacms.aps.system.services.content.model.Content)5 IActionLogRecordSearchBean (org.entando.entando.aps.system.services.actionlog.model.IActionLogRecordSearchBean)4 UserDetails (com.agiletec.aps.system.services.user.UserDetails)3 Date (java.util.Date)3 Properties (java.util.Properties)2 ActivityStreamInfo (org.entando.entando.aps.system.services.actionlog.model.ActivityStreamInfo)2 ActivityStreamSeachBean (org.entando.entando.aps.system.services.actionlog.model.ActivityStreamSeachBean)2