Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @GET @Path("/user-operation") public java.util.List<org.camunda.bpm.engine.rest.dto.history.UserOperationLogEntryDto> getHistoricUserOperationLogs(@QueryParam("occurredAfter") String occurredAfterAsString, @QueryParam("occurredAt") String occurredAtAsString, @QueryParam("maxResults") int maxResults)
        public virtual IList <UserOperationLogEntryDto> getHistoricUserOperationLogs(string occurredAfterAsString, string occurredAtAsString, int maxResults)
        {
            DateTime occurredAfter = dateConverter.convertQueryParameterToType(occurredAfterAsString);
            DateTime occurredAt    = dateConverter.convertQueryParameterToType(occurredAtAsString);

            maxResults = ensureValidMaxResults(maxResults);

            ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl)ProcessEngine.ProcessEngineConfiguration;

            IList <UserOperationLogEntry> operationLogEntries = config.OptimizeService.getHistoricUserOperationLogs(occurredAfter, occurredAt, maxResults);

            IList <UserOperationLogEntryDto> result = new List <UserOperationLogEntryDto>();

            foreach (UserOperationLogEntry logEntry in operationLogEntries)
            {
                UserOperationLogEntryDto dto = UserOperationLogEntryDto.map(logEntry);
                result.Add(dto);
            }
            return(result);
        }
Beispiel #2
0
        public virtual IList <UserOperationLogEntryDto> queryUserOperationEntries(UriInfo uriInfo, int?firstResult, int?maxResults)
        {
            UserOperationLogQueryDto queryDto = new UserOperationLogQueryDto(objectMapper, uriInfo.QueryParameters);
            UserOperationLogQuery    query    = queryDto.toQuery(processEngine);

            if (firstResult == null && maxResults == null)
            {
                return(UserOperationLogEntryDto.map(query.list()));
            }
            else
            {
                if (firstResult == null)
                {
                    firstResult = 0;
                }
                if (maxResults == null)
                {
                    maxResults = int.MaxValue;
                }
                return(UserOperationLogEntryDto.map(query.listPage(firstResult, maxResults)));
            }
        }