Package org.rhq.enterprise.server.rest.domain

Examples of org.rhq.enterprise.server.rest.domain.EventSourceRest


        Resource res = fetchResource(resourceId);
        Set<EventSource> eventSources = res.getEventSources();

        List<EventSourceRest> restSources = new ArrayList<EventSourceRest>(eventSources.size());
        for (EventSource source : eventSources) {
            EventSourceRest esr = convertEventSource(source);
            restSources.add(esr);
        }


        Response.ResponseBuilder builder;
View Full Code Here


    @ApiOperation(value = "Retrieve the event source with the passed id", responseClass = "EventSourceRest")
    @ApiError(code = 404, reason = "There is no event source with the passed id")
    public EventSourceRest getEventSource(@ApiParam("Id of the source to retrieve") @PathParam("id") int sourceId) {

        EventSource source = findEventSourceById(sourceId);
        EventSourceRest esr = convertEventSource(source);

        return esr;
    }
View Full Code Here

            source = sources.get(0);
        } else {
            throw new IllegalStateException("We have more than one EventSource on the same Definition with the same location - must not happen");
        }

        EventSourceRest result = convertEventSource(source);
        return result;
    }
View Full Code Here

        return builder;
    }

    private EventSourceRest convertEventSource(EventSource source) {
        EventSourceRest esr = new EventSourceRest();
        esr.setId(source.getId());
        esr.setDescription(source.getEventDefinition().getDescription());
        esr.setDisplayName(source.getEventDefinition().getDisplayName());
        esr.setName(source.getEventDefinition().getName());
        esr.setLocation(source.getLocation());
        esr.setResourceId(source.getResourceId());

        return esr;
    }
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.rest.domain.EventSourceRest

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.