Package org.rhq.core.domain.operation.composite

Examples of org.rhq.core.domain.operation.composite.ResourceOperationScheduleComposite


        final DSRequest request) {
        HashSet<Integer> typesSet = new HashSet<Integer>();
        HashSet<String> ancestries = new HashSet<String>();
        for (OperationScheduleComposite composite : result) {
            if (composite instanceof ResourceOperationScheduleComposite) {
                ResourceOperationScheduleComposite resourceComposite = (ResourceOperationScheduleComposite) composite;
                typesSet.add(resourceComposite.getResourceTypeId());
                ancestries.add(resourceComposite.getAncestry());
            }
        }

        // In addition to the types of the result resources, get the types of their ancestry
        // NOTE: this may be too labor intensive in general, but since this datasource is a singleton I couldn't
View Full Code Here


    @Override
    public ListGridRecord copyValues(OperationScheduleComposite from) {
        ListGridRecord record = new ListGridRecord();
        if (from instanceof ResourceOperationScheduleComposite) {
            ResourceOperationScheduleComposite resource = (ResourceOperationScheduleComposite) from;
            record.setAttribute(Field.RESOURCE_OR_GROUP.propertyName, resource.getResourceName());
           
            // for ancestry handling
            record.setAttribute(AncestryUtil.RESOURCE_ID, resource.getResourceId());
            record.setAttribute(AncestryUtil.RESOURCE_NAME, resource.getResourceName());
            record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY, resource.getAncestry());
            record.setAttribute(AncestryUtil.RESOURCE_TYPE_ID, resource.getResourceTypeId());
        } else { // group
            GroupOperationScheduleComposite resource = (GroupOperationScheduleComposite) from;
            record.setAttribute(Field.RESOURCE_OR_GROUP.propertyName, resource.getGroupName());
            record.setAttribute(Field.GROUP_ID.propertyName, resource.getGroupId());
            record.setAttribute(Field.GROUP_TYPE.propertyName, resource.getGroupResourceTypeName());
        }
        record.setAttribute("id", from.getId());
        record.setAttribute(Field.OPERATION.propertyName, from.getOperationName());
        record.setAttribute(Field.TIME.propertyName, new Date(from.getOperationNextFireTime()));
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.operation.composite.ResourceOperationScheduleComposite

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.