Package org.rhq.core.domain.operation

Examples of org.rhq.core.domain.operation.OperationRequestStatus


        statusField.setShowHover(true);
        statusField.setHoverCustomizer(new HoverCustomizer() {
            @Override
            public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
                String statusStr = record.getAttribute(AbstractOperationHistoryDataSource.Field.STATUS);
                OperationRequestStatus status = OperationRequestStatus.valueOf(statusStr);
                switch (status) {
                case SUCCESS: {
                    return MSG.common_status_success();
                }
                case FAILURE: {
                    return MSG.common_status_failed();
                }
                case INPROGRESS: {
                    return MSG.common_status_inprogress();
                }
                case CANCELED: {
                    return MSG.common_status_canceled();
                }
                }
                // should never get here
                return MSG.common_status_unknown();
            }
        });
        statusField.setCellFormatter(new CellFormatter() {
            public String format(Object o, ListGridRecord listGridRecord, int i, int i1) {
                OperationRequestStatus status = OperationRequestStatus.valueOf((String) o);
                String icon = ImageManager.getOperationResultsIcon(status);
                return Canvas.imgHTML(icon, 16, 16);
            }
        });
        statusField.addRecordClickHandler(new RecordClickHandler() {
            @Override
            public void onRecordClick(RecordClickEvent event) {
                Record record = event.getRecord();
                String statusStr = record.getAttribute(AbstractOperationHistoryDataSource.Field.STATUS);
                OperationRequestStatus status = OperationRequestStatus.valueOf(statusStr);
                if (status == OperationRequestStatus.FAILURE) {
                    final Window winModal = new Window();
                    winModal.setTitle(MSG.common_title_details());
                    winModal.setOverflow(Overflow.VISIBLE);
                    winModal.setShowMinimizeButton(false);
View Full Code Here


    }

    protected List<FormItem> createFields(final T operationHistory) {
        List<FormItem> items = new ArrayList<FormItem>();

        OperationRequestStatus status = operationHistory.getStatus();

        StaticTextItem idItem = new StaticTextItem(AbstractOperationHistoryDataSource.Field.ID, "Execution ID");
        idItem.setValue(operationHistory.getId());
        items.add(idItem);
View Full Code Here

            String resourceFilter = getResourceFilter();
            String parentFilter = getParentFilter();
            Long startMillis = getDateSubmittedFilter() == null ? null : getDateSubmittedFilter().getTime();
            Long endMillis = getDateCompletedFilter() == null ? null : getDateCompletedFilter().getTime();
            String cleansedStatus = SelectItemUtils.cleanse(getStatusFilter());
            OperationRequestStatus status = cleansedStatus == null ? null : OperationRequestStatus
                .valueOf(cleansedStatus);

            PageList<ResourceOperationHistoryComposite> result;
            result = manager.getResourceOperationHistories(getSubject(), resourceFilter, parentFilter, startMillis,
                endMillis, status, pc);
View Full Code Here

        }

        // The history item may have been created already, so find it in the database and
        // set the new state from our input
        boolean isNewHistory = (0 == history.getId());
        OperationRequestStatus originalStatus = null;
        if (!isNewHistory) {
            OperationHistory existingHistoryItem = entityManager.find(OperationHistory.class, history.getId());
            if (null == existingHistoryItem) {
                throw new IllegalArgumentException(
                    "Can not update operation history, history record not found. This call creates a new operation history record only if the supplied history argument has id set to 0. ["
View Full Code Here

                 * we'll be a little lenient with the logic here, and say that if a group operation hasn't already
                 * been marked for timeout, and if all of its children reach some terminating state, that it
                 * can not be marked for timeout now...it can only be marked as failure if there was in fact a
                 * resource-level operation failure
                 */
                OperationRequestStatus groupStatus = OperationRequestStatus.SUCCESS;

                for (ResourceOperationHistory resourceHistory : groupHistory.getResourceOperationHistories()) {
                    if (resourceHistory.getStatus() != OperationRequestStatus.SUCCESS) {
                        /*
                         * some child was either canceled or failed for some reason, and so the group operation must
View Full Code Here

        // if this was a resource invocation that was part of a group operation
        // see if the rest of the group members are done too, if so, close out the group history
        if (groupHistory != null) {
            List<ResourceOperationHistory> allResourceHistories = groupHistory.getResourceOperationHistories();
            boolean stillInProgress = false; // assume all are finished
            OperationRequestStatus groupStatus = OperationRequestStatus.SUCCESS; // will be FAILURE if at least one resource operation failed
            StringBuilder groupErrorMessage = null; // will be the group error message if at least one resource operation failed

            for (ResourceOperationHistory resourceHistory : allResourceHistories) {
                if (resourceHistory.getStatus() == OperationRequestStatus.INPROGRESS) {
                    stillInProgress = true;
View Full Code Here

            });
    }

    @Override
    protected Canvas buildResultsSection(ResourceOperationHistory operationHistory) {
        OperationRequestStatus status = operationHistory.getStatus();
        if (status == OperationRequestStatus.SUCCESS || status == OperationRequestStatus.FAILURE) {
            EnhancedVLayout resultsSection = new EnhancedVLayout();

            Label title = new Label("<h4>" + MSG.view_operationHistoryDetails_results() + "</h4>");
            title.setHeight(27);
View Full Code Here

                        availabilityComposite.getAvailabilityType(), alertConditionOperator.toString(), icee));
            }
        } else if (alertConditionCategory == AlertConditionCategory.CONTROL) {
            AlertConditionControlCategoryComposite controlComposite = (AlertConditionControlCategoryComposite) composite;
            String option = alertCondition.getOption();
            OperationRequestStatus operationRequestStatus = OperationRequestStatus.valueOf(option.toUpperCase());

            try {
                ResourceOperationCacheElement cacheElement = new ResourceOperationCacheElement(alertConditionOperator,
                    operationRequestStatus, alertConditionId);
View Full Code Here

            if (operationHistory instanceof ResourceOperationHistory) {
                ResourceOperationHistory resourceOperationHistory = (ResourceOperationHistory) operationHistory;

                Resource resource = resourceOperationHistory.getResource();
                OperationDefinition operationDefinition = resourceOperationHistory.getOperationDefinition();
                OperationRequestStatus operationStatus = resourceOperationHistory.getStatus();

                List<ResourceOperationCacheElement> cacheElements = lookupResourceOperationHistoryCacheElements(
                    resource.getId(), operationDefinition.getId());

                processCacheElements(cacheElements, operationStatus, resourceOperationHistory.getModifiedTime(), stats);
View Full Code Here

            String[] parsedValues = currentSetting.trim().split(",");
            if (!(currentSetting.trim().isEmpty() || parsedValues.length == OperationRequestStatus.values().length)) {
                OperationRequestStatus[] operationStatuses = new OperationRequestStatus[parsedValues.length];
                int indx = 0;
                for (String priority : parsedValues) {
                    OperationRequestStatus s = OperationRequestStatus.valueOf(priority);
                    operationStatuses[indx++] = s;
                }
                criteria.addFilterStatuses(operationStatuses);
            }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.operation.OperationRequestStatus

Copyright © 2018 www.massapicom. 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.