Examples of addFilterEndTime()


Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

        }

        Date endDateFilter = getFilter(request, DateFilterItem.END_DATE_FILTER, Date.class);
        if( endDateFilter!= null){
            Date endOfDay = DateFilterItem.adjustTimeToEndOfDay(endDateFilter);
            criteria.addFilterEndTime(endOfDay.getTime());
        }
        criteria.addFilterResourceIds(getArrayFilter(request, FILTER_RESOURCE_IDS, Integer.class));
        criteria.addFilterEntityContext(entityContext);
        criteria.fetchConditionLogs(true);
//        criteria.fetchGroupAlertDefinition(true);
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

                    //Advanced time settings
                    currentSetting = portletConfig.getSimpleValue(Constant.METRIC_RANGE, Constant.METRIC_RANGE_DEFAULT);
                    String[] range = currentSetting.split(",");
                    if (range.length == 2) {
                        criteria.addFilterStartTime(Long.valueOf(range[0]));
                        criteria.addFilterEndTime(Long.valueOf(range[1]));
                    }
                } else {
                    //Simple time settings
                    property = portletConfig.getSimple(Constant.METRIC_RANGE_LASTN);
                    if (property != null) {
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

                            Constant.METRIC_RANGE_LASTN_DEFAULT));
                        Integer units = Integer.valueOf(portletConfig.getSimpleValue(Constant.METRIC_RANGE_UNIT,
                            Constant.METRIC_RANGE_UNIT_DEFAULT));
                        ArrayList<Long> beginEnd = MeasurementUtility.calculateTimeFrame(lastN, units);
                        criteria.addFilterStartTime(Long.valueOf(beginEnd.get(0)));
                        criteria.addFilterEndTime(Long.valueOf(beginEnd.get(1)));
                    }
                }
            }

            //result count
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

    public static void testAlertCriteria() {
        AlertCriteria alertCriteria = new AlertCriteria();
        alertCriteria.addFilterName("joe");
        alertCriteria.addFilterDescription("query generation is cool");
        alertCriteria.addFilterStartTime(42L);
        alertCriteria.addFilterEndTime(100L);
        alertCriteria.addFilterResourceIds(1, 2, 3);
        alertCriteria.fetchAlertDefinition(true);
        alertCriteria.addSortPriority(PageOrdering.DESC);
        alertCriteria.addSortName(PageOrdering.ASC);
        alertCriteria.setPaging(0, 100);
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

                if(startTime != null){
                    criteria.addFilterStartTime(startTime);
                }
                if(endTime != null){
                    criteria.addFilterEndTime(endTime);
                }
                // lets default the end time for them to now if they didnt enter it
                if(startTime != null && endTime == null){
                    Date today = new Date();
                    criteria.addFilterEndTime(today.getTime());
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

                    criteria.addFilterEndTime(endTime);
                }
                // lets default the end time for them to now if they didnt enter it
                if(startTime != null && endTime == null){
                    Date today = new Date();
                    criteria.addFilterEndTime(today.getTime());
                }

                criteria.addFilterPriorities(getAlertPriorities());

                CriteriaQueryExecutor<Alert, AlertCriteria> queryExecutor =
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

            // show alerts for any resource in the group, not just those attached to the group alert definitions
            List<Integer> resourceIds = resourceManager.findImplicitResourceIdsByResourceGroup(resourceGroupId);
            searchCriteria.addFilterResourceIds(resourceIds.toArray(new Integer[resourceIds.size()]));
            searchCriteria.addFilterPriorities(alertPriority);
            searchCriteria.addFilterStartTime(beginTime);
            searchCriteria.addFilterEndTime(endTime);
            searchCriteria.setPageControl(pc);
            searchCriteria.fetchAlertDefinition(true);
            // this is done by default at the object layer
            // searchCriteria.fetchConditionLogs(true);
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

            AlertCriteria criteria = new AlertCriteria();
            criteria.addFilterResourceIds(resource.getId());
            criteria.addFilterAlertDefinitionIds(alertDefinitionId);
            criteria.addFilterPriorities(alertPriority);
            criteria.addFilterStartTime(beginTime);
            criteria.addFilterEndTime(endTime);
            criteria.setPageControl(pc);

            PageList<Alert> alerts = alertManager.findAlertsByCriteria(getSubject(), criteria);

            List<AlertWithLatestConditionLog> results = new ArrayList<AlertWithLatestConditionLog>(alerts.size());
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

                    //Advanced time settings
                    currentSetting = configuration.getSimpleValue(Constant.METRIC_RANGE, Constant.METRIC_RANGE_DEFAULT);
                    String[] range = currentSetting.split(",");
                    if (range.length == 2) {
                        criteria.addFilterStartTime(Long.valueOf(range[0]));
                        criteria.addFilterEndTime(Long.valueOf(range[1]));
                    }
                } else {
                    //Simple time settings
                    property = configuration.getSimple(Constant.METRIC_RANGE_LASTN);
                    if (property != null) {
View Full Code Here

Examples of org.rhq.core.domain.criteria.AlertCriteria.addFilterEndTime()

                            Constant.METRIC_RANGE_LASTN_DEFAULT));
                        Integer units = Integer.valueOf(configuration.getSimpleValue(Constant.METRIC_RANGE_UNIT,
                            Constant.METRIC_RANGE_UNIT_DEFAULT));
                        ArrayList<Long> beginEnd = MeasurementUtility.calculateTimeFrame(lastN, units);
                        criteria.addFilterStartTime(Long.valueOf(beginEnd.get(0)));
                        criteria.addFilterEndTime(Long.valueOf(beginEnd.get(1)));
                    }
                }
            }
            String filters = this.configuration.getSimpleValue(Constant.ALERT_FILTER, Constant.ALERT_FILTER_DEFAULT);
            if(filters != null && filters.length() > 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.