Package org.rhq.core.domain.criteria

Examples of org.rhq.core.domain.criteria.PluginCriteria


            @QueryParam("reload") boolean reload,
        @ApiParam("Page size for paging") @QueryParam("ps") @DefaultValue("20") int pageSize,
        @ApiParam("Page for paging, 0-based") @QueryParam("page") Integer page,
        @Context HttpHeaders headers, @Context UriInfo uriInfo) throws Exception {

        PluginCriteria crit = new PluginCriteria();
        if (name != null) {
            crit.addFilterName(name);
        }

        if (enabled != null) {
            crit.addFilterEnabled(enabled);
        }

        if (version != null) {
            crit.addFilterVersion(version);
        }

        if (deleted != null) {
            crit.addFilterDeleted(deleted);
        }

        if (reload) {
            pluginManager.update(caller);
        }

        if (page != null) {
            crit.setPaging(page, pageSize);
        }

        PageList<Plugin> plugins = pluginManager.findPluginsByCriteria(caller, crit);

        return paginate(headers, uriInfo, plugins, PluginRest.list(plugins), PluginRest.class).build();
View Full Code Here


    @ApiOperation("Gets info about a single plugin")
    public Response getPluginInfo(
        @ApiParam("The id of the plugin") @PathParam("id") int id,
        @Context HttpHeaders headers) {

        PluginCriteria crit = new PluginCriteria();
        crit.addFilterId(id);

        PageList<Plugin> plugins = pluginManager.findPluginsByCriteria(caller, crit);

        if (plugins.isEmpty()) {
            throw new StuffNotFoundException("Plugin");
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.criteria.PluginCriteria

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.