Examples of EntityContext


Examples of org.rhq.core.domain.common.EntityContext

    @Override
    public List<AvailabilityPoint> findAvailabilitiesForAutoGroup(Subject subject, int parentResourceId,
        int resourceTypeId, long fullRangeBeginTime, long fullRangeEndTime, int numberOfPoints,
        boolean withCurrentAvailability) {
        EntityContext context = new EntityContext(-1, -1, parentResourceId, resourceTypeId);
        return getAvailabilitiesForContext(subject, context, fullRangeBeginTime, fullRangeEndTime, numberOfPoints,
            withCurrentAvailability);
    }
View Full Code Here

Examples of org.rhq.core.domain.common.EntityContext

        long begin = rangePreferences.begin;
        long end = rangePreferences.end;

        int[] measurementDefinitionIds;
        try {
            EntityContext context = new EntityContext(-1, -1, parent, type);
            measurementDefinitionIds = fillDefinitionIdsFromUserPreferences(context, viewName, subject);
        } catch (IllegalArgumentException iae) {
            // If we can't get stuff from preferences, get the defaults.
            measurementDefinitionIds = resourceGroupManager.findDefinitionsForAutoGroup(subject, parent, type, true);
        }
View Full Code Here

Examples of org.rhq.core.domain.common.EntityContext

        /*
         * Try to get the schedules for this view from the preferences and extract the
         * schedule ids from it. If this fails, fall back to defaults.
         */
        try {
            EntityContext context = new EntityContext(resourceId, -1, -1, -1);
            List<String> charts = viewManager.getCharts(subject, context, viewName);

            int[] schIds = new int[charts.size()];
            int i = 0;
            for (String metric : charts) {
View Full Code Here

Examples of org.rhq.core.domain.common.EntityContext

        INITIAL_CRITERIA.addCriteria(EventCompositeDatasource.FILTER_SEVERITIES, severityNames);
    }

    public static EventCompositeHistoryView get(ResourceGroupComposite composite) {
        String tableTitle = MSG.view_inventory_eventHistory_groupEventHistory();
        EntityContext context = EntityContext.forGroup(composite.getResourceGroup().getId());
        boolean hasWriteAccess = composite.getResourcePermission().isEvent();
        return new EventCompositeHistoryView(tableTitle, context, hasWriteAccess);
    }
View Full Code Here

Examples of org.rhq.core.domain.common.EntityContext

        return new EventCompositeHistoryView(tableTitle, context, hasWriteAccess);
    }

    public static EventCompositeHistoryView get(ResourceComposite composite) {
        String tableTitle = MSG.view_inventory_eventHistory_resourceEventHistory();
        EntityContext context = EntityContext.forResource(composite.getResource().getId());
        boolean hasWriteAccess = composite.getResourcePermission().isEvent();
        return new EventCompositeHistoryView(tableTitle, context, hasWriteAccess);
    }
View Full Code Here

Examples of org.rhq.core.domain.common.EntityContext

                    String title = record.getAttribute(NAME.propertyName());
                    ChartViewWindow window = new ChartViewWindow("", title);
                    int defId = record.getAttributeAsInt(GroupMembersComparisonDataSource.ATTR_DEFINITION_ID);

                    ResourceGroup group = groupComposite.getResourceGroup();
                    EntityContext context = EntityContext.forGroup(group);
                    CompositeGroupD3GraphListView graph = new CompositeGroupD3MultiLineGraph(context, defId);
                    window.addItem(graph);
                    graph.populateData();
                    window.show();
                }
View Full Code Here

Examples of org.rhq.core.domain.common.EntityContext

            String mode = WebUtility.getOptionalRequestParameter(request, "mode", "normal");

            EventManagerLocal eventManager = LookupUtil.getEventManager();

            Subject subject = user.getSubject();
            EntityContext context = new EntityContext(resourceId, groupId, parent, type);
            PageList<EventComposite> events = eventManager.findEventComposites(subject, context, begin, begin
                + interval, null, null, null, new PageControl(0, MAX_EVENTS_PER_DOT));

            MessageResources res = getResources(request);
            StringBuffer html;
View Full Code Here

Examples of org.rhq.core.domain.common.EntityContext

        }

        // Perform the query and get the (filtered) events
        EventSeverity eventSeverityFilter = getSeverityFromString(eForm.getSevFilter());

        EntityContext context = new EntityContext(resourceId, groupId, parent, type);
        List<EventComposite> events = eventManager.findEventComposites(subject, context, begin, end,
            new EventSeverity[] { eventSeverityFilter }, sourceFilter, searchString, pc);

        // highlight filter info
        for (EventComposite event : events) {
View Full Code Here

Examples of org.rhq.core.domain.common.EntityContext

        if (ctypeId > 0 && typeId == -1) {
            typeId = ctypeId;
        }

        EventManagerLocal eventManager = LookupUtil.getEventManager();
        EntityContext context = new EntityContext(resourceId, groupId, parentId, typeId);
        EventSeverity[] eventsCounts = eventManager.getSeverityBucketsByContext(user.getSubject(), context, begin, end,
            DefaultConstants.DEFAULT_CHART_POINTS);

        // Create the time intervals beans
        TimelineBean[] beans = new TimelineBean[intervals.length];
View Full Code Here

Examples of org.rhq.core.domain.common.EntityContext

    private void setDashboard(Dashboard dashboard) {
        Canvas[] members = getMembers();
        removeMembers(members);
        //pass in the group information
        EntityContext context = EntityContext.forGroup(groupComposite.getResourceGroup().getId(), isAutoCluster,
            isAutoGroup);
        dashboardView = new DashboardView(this, dashboard, context, groupComposite);
        addMember(dashboardView);

        footer = new EnhancedToolStrip();
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.