Projects >> nuxeo-features >>a8ce1ddfb30b6b52ffcb0ce4c32f5a1770b28585

Chunk
Conflicting content
        BatchInfo batchInfo = BatchHelper.getBatchInfo(sessionId, dateRangeQuery);

<<<<<<< HEAD
        List logEntries = getLogsBean().queryLogsByPage(eventIds,
                batchInfo.getPageDateRange(), batchInfo.getNextPage(), batchInfo.getPageSize());
        if (logEntries.size() < batchInfo.getPageSize()) {
=======

        List logEntries = getLogsBean().queryLogsByPage(null,
                batchInfo.getPageDateRange(), "eventDocumentCategory",null,batchInfo.getNextPage(), batchInfo.getPageSize());
        if (logEntries.size()< batchInfo.getPageSize())
        {
>>>>>>> af5d8ee64a74f44232278416065ca49c6df27a53
            // we are at the end of the batch
            // ==> reset the batch
            BatchHelper.resetBatchInfo(sessionId);
Solution content
        BatchInfo batchInfo = BatchHelper.getBatchInfo(sessionId, dateRangeQuery);


        List logEntries = getLogsBean().queryLogsByPage(null,
                batchInfo.getPageDateRange(), "eventDocumentCategory",null,batchInfo.getNextPage(), batchInfo.getPageSize());
        if (logEntries.size()< batchInfo.getPageSize())
        {
            // we are at the end of the batch
            // ==> reset the batch
            BatchHelper.resetBatchInfo(sessionId);
File
WSAuditBean.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
        else
        return docs;
    }

<<<<<<< HEAD
=======
    @WebMethod
    public ModifiedDocumentDescriptorPage listModifiedDocumentsByPage(@WebParam(name = "sessionId") String sessionId,
            @WebParam(name = "dataRangeQuery") String dateRangeQuery,@WebParam(name = "docPath") String path,@WebParam(name = "pageIndex") int page, @WebParam(name = "pageSize") int pageSize) throws AuditException {

        try {
            initSession(sessionId);
        } catch (ClientException ce) {
            throw new AuditException(ce.getMessage(), ce);
        }

        List logEntries = getLogsBean().queryLogsByPage(null,
                dateRangeQuery, "eventDocumentCategory",path, page, pageSize);

        boolean hasMorePage=false;
        if (logEntries.size()< pageSize)
        {
            hasMorePage=false;
        }
        else
        {
            hasMorePage=true;
        }

        List ldocs = new ArrayList();
        Set uuids = new HashSet();
        for (LogEntry logEntry : logEntries) {
            if (!uuids.contains(logEntry.getDocUUID())) {
                uuids.add(logEntry.getDocUUID());
                ldocs.add(new ModifiedDocumentDescriptor(
                        logEntry.getEventDate(), logEntry.getDocType(),
                        logEntry.getDocUUID()));
            }
        }

        ModifiedDocumentDescriptor[] docs = new ModifiedDocumentDescriptor[ldocs.size()];
        ldocs.toArray(docs);


        return new ModifiedDocumentDescriptorPage(docs, page, hasMorePage);
    }


    @WebMethod
    public EventDescriptorPage listEventsByPage(@WebParam(name = "sessionId") String sessionId,
            @WebParam(name = "dataRangeQuery") String dateRangeQuery, @WebParam(name = "pageIndex")int page, @WebParam(name = "pageSize")int pageSize) throws AuditException {

        try {
            initSession(sessionId);
        } catch (ClientException ce) {
            throw new AuditException(ce.getMessage(), ce);
        }

        List logEntries = getLogsBean().queryLogsByPage(null,
                dateRangeQuery,null,null, page, pageSize);
        boolean hasMorePage=false;
        if (logEntries.size()< pageSize)
        {
            hasMorePage=false;
        }
        {
            hasMorePage=true;
        }

        List events =  new ArrayList();

        for (LogEntry logEntry : logEntries) {
            events.add(new EventDescriptor(logEntry.getEventId(),logEntry.getEventDate(),logEntry.getDocPath(), logEntry.getDocUUID()));
        }

        EventDescriptor[] evts = new EventDescriptor[events.size()];
        events.toArray(evts);

        return new EventDescriptorPage(evts,page, hasMorePage);
    }



    @WebMethod
    public EventDescriptorPage queryEventsByPage(@WebParam(name = "sessionId") String sessionId,
            @WebParam(name = "whereClause") String whereClause, @WebParam(name = "pageIndex")int page, @WebParam(name = "pageSize")int pageSize) throws AuditException {

        try {
            initSession(sessionId);
        } catch (ClientException ce) {
            throw new AuditException(ce.getMessage(), ce);
        }

        List logEntries = getLogsBean().nativeQueryLogs(whereClause, page, pageSize);
        boolean hasMorePage=false;
        if (logEntries.size()< pageSize)
        {
            hasMorePage=false;
        }
        else
        {
            hasMorePage=true;
        }

        List events =  new ArrayList();

        for (LogEntry logEntry : logEntries) {
            events.add(new EventDescriptor(logEntry.getEventId(),logEntry.getEventDate(),logEntry.getDocPath(), logEntry.getDocUUID()));
        }

        EventDescriptor[] evts = new EventDescriptor[events.size()];
        events.toArray(evts);

        return new EventDescriptorPage(evts,page, hasMorePage);
    }

>>>>>>> af5d8ee64a74f44232278416065ca49c6df27a53
}
Solution content
        return docs;
    }

    @WebMethod
    public ModifiedDocumentDescriptorPage listModifiedDocumentsByPage(@WebParam(name = "sessionId") String sessionId,
            @WebParam(name = "dataRangeQuery") String dateRangeQuery,@WebParam(name = "docPath") String path,@WebParam(name = "pageIndex") int page, @WebParam(name = "pageSize") int pageSize) throws AuditException {

        try {
            initSession(sessionId);
        } catch (ClientException ce) {
            throw new AuditException(ce.getMessage(), ce);
        }

        List logEntries = getLogsBean().queryLogsByPage(null,
                dateRangeQuery, "eventDocumentCategory",path, page, pageSize);

        boolean hasMorePage=false;
        if (logEntries.size()< pageSize)
        {
            hasMorePage=false;
        }
        else
        {
            hasMorePage=true;
        }

        List ldocs = new ArrayList();
        Set uuids = new HashSet();
        for (LogEntry logEntry : logEntries) {
            if (!uuids.contains(logEntry.getDocUUID())) {
                uuids.add(logEntry.getDocUUID());
                ldocs.add(new ModifiedDocumentDescriptor(
                        logEntry.getEventDate(), logEntry.getDocType(),
                        logEntry.getDocUUID()));
            }
        }

        ModifiedDocumentDescriptor[] docs = new ModifiedDocumentDescriptor[ldocs.size()];
        ldocs.toArray(docs);


        return new ModifiedDocumentDescriptorPage(docs, page, hasMorePage);
    }


    @WebMethod
    public EventDescriptorPage listEventsByPage(@WebParam(name = "sessionId") String sessionId,
            @WebParam(name = "dataRangeQuery") String dateRangeQuery, @WebParam(name = "pageIndex")int page, @WebParam(name = "pageSize")int pageSize) throws AuditException {

        try {
            initSession(sessionId);
        } catch (ClientException ce) {
            throw new AuditException(ce.getMessage(), ce);
        }

        List logEntries = getLogsBean().queryLogsByPage(null,
                dateRangeQuery,null,null, page, pageSize);
        boolean hasMorePage=false;
        if (logEntries.size()< pageSize)
        {
            hasMorePage=false;
        }
        else
        {
            hasMorePage=true;
        }

        List events =  new ArrayList();

        for (LogEntry logEntry : logEntries) {
            events.add(new EventDescriptor(logEntry.getEventId(),logEntry.getEventDate(),logEntry.getDocPath(), logEntry.getDocUUID()));
        }

        EventDescriptor[] evts = new EventDescriptor[events.size()];
        events.toArray(evts);

        return new EventDescriptorPage(evts,page, hasMorePage);
    }



    @WebMethod
    public EventDescriptorPage queryEventsByPage(@WebParam(name = "sessionId") String sessionId,
            @WebParam(name = "whereClause") String whereClause, @WebParam(name = "pageIndex")int page, @WebParam(name = "pageSize")int pageSize) throws AuditException {

        try {
            initSession(sessionId);
        } catch (ClientException ce) {
            throw new AuditException(ce.getMessage(), ce);
        }

        List logEntries = getLogsBean().nativeQueryLogs(whereClause, page, pageSize);
        boolean hasMorePage=false;
        if (logEntries.size()< pageSize)
        {
            hasMorePage=false;
        }
        else
        {
            hasMorePage=true;
        }

        List events =  new ArrayList();

        for (LogEntry logEntry : logEntries) {
            events.add(new EventDescriptor(logEntry.getEventId(),logEntry.getEventDate(),logEntry.getDocPath(), logEntry.getDocUUID()));
        }

        EventDescriptor[] evts = new EventDescriptor[events.size()];
        events.toArray(evts);

        return new EventDescriptorPage(evts,page, hasMorePage);
    }

}
File
WSAuditBean.java
Developer's decision
Version 2
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
        // :FIXME: This is not working remotelty since the LogEntryImpl returned
        // is not within the api package.

<<<<<<< HEAD
        if (eventIds == null || eventIds.length == 0) {
            throw new AuditException("You must give a not null eventId");
        }
=======

>>>>>>> af5d8ee64a74f44232278416065ca49c6df27a53
        Class klass = getLogEntryClass();

        List results = new ArrayList();
Solution content
        // :FIXME: This is not working remotelty since the LogEntryImpl returned
        // is not within the api package.


        Class klass = getLogEntryClass();

        List results = new ArrayList();
File
LogsBean.java
Developer's decision
Version 2
Kind of conflict
If statement