Package org.glassfish.admin.rest.results

Examples of org.glassfish.admin.rest.results.OptionsResult


        data.put("DEFAULT", propertiesString);
        data.put("target", (parent == null) ? getParent(uriInfo) : parent);

        RestActionReporter actionReport = ResourceUtil.runCommand("create-system-properties", data, habitat, "");
        ActionReport.ExitCode exitCode = actionReport.getActionExitCode();
        ActionReportResult results = new ActionReportResult(commandName, actionReport, new OptionsResult());

        int status = HttpURLConnection.HTTP_OK; /*200 - ok*/
        if (exitCode == ActionReport.ExitCode.FAILURE) {
            status = HttpURLConnection.HTTP_INTERNAL_ERROR;
        }
View Full Code Here


        data.put("DEFAULT", propName);
        data.put("target", (parent == null) ? getParent(uriInfo) : parent);

        RestActionReporter actionReport = ResourceUtil.runCommand("delete-system-property", data, habitat, "");
        ActionReport.ExitCode exitCode = actionReport.getActionExitCode();
        ActionReportResult results = new ActionReportResult(commandName, actionReport, new OptionsResult());

        int status = HttpURLConnection.HTTP_OK; /*200 - ok*/
        if (exitCode == ActionReport.ExitCode.FAILURE) {
            status = HttpURLConnection.HTTP_INTERNAL_ERROR;
        }
View Full Code Here

        if (Util.useLegacyResponseFormat(requestHeaders)) {
            RestActionReporter ar = new RestActionReporter();
            ar.setExtraProperties(new Properties());
            ar.setActionDescription(commandDisplayName);

            OptionsResult optionsResult = new OptionsResult(resourceName);
            Map<String, MethodMetaData> mmd = new HashMap<String, MethodMetaData>();
            MethodMetaData methodMetaData = ResourceUtil.getMethodMetaData(commandName, getCommandParams(), habitat, RestService.logger);

            optionsResult.putMethodMetaData(commandMethod, methodMetaData);
            mmd.put(commandMethod, methodMetaData);
            ResourceUtil.addMethodMetaData(ar, mmd);

            ActionReportResult ret = new ActionReportResult(ar, null, optionsResult);
            ret.setCommandDisplayName(commandDisplayName);
View Full Code Here

        RestActionReporter ar = new RestActionReporter();
        final String typeKey = upperCaseFirstLetter((decode(getName())));
        ar.setActionDescription(typeKey);
        ar.getExtraProperties().put("leafList", getEntity());

        OptionsResult optionsResult = new OptionsResult(Util.getResourceName(uriInfo.get()));
        Map<String, MethodMetaData> mmd = getMethodMetaData();
        optionsResult.putMethodMetaData("GET", mmd.get("GET"));
        optionsResult.putMethodMetaData("POST", mmd.get("POST"));

        ResourceUtil.addMethodMetaData(ar, mmd);
        return new ActionReportResult(ar, optionsResult);
    }
View Full Code Here

        RestActionReporter ar = new RestActionReporter();
        final String typeKey = upperCaseFirstLetter((decode(getName())));
        ar.setActionDescription(typeKey);
        ar.getExtraProperties().put("leafList", getEntity());

        OptionsResult optionsResult = new OptionsResult(Util.getResourceName(uriInfo.get()));
        Map<String, MethodMetaData> mmd = getMethodMetaData();
        optionsResult.putMethodMetaData("GET", mmd.get("GET"));
        optionsResult.putMethodMetaData("POST", mmd.get("POST"));

        ResourceUtil.addMethodMetaData(ar, mmd);
        return new ActionReportResult(ar, optionsResult);
    }
View Full Code Here

        RestActionReporter ar = new RestActionReporter();
        final String typeKey = (decode(getName()));
        ar.setActionDescription(typeKey);
        ar.getExtraProperties().put("entityLeaf", getEntity());

        OptionsResult optionsResult = new OptionsResult(Util.getResourceName(uriInfo.get()));
        Map<String, MethodMetaData> mmd = getMethodMetaData();
        optionsResult.putMethodMetaData("GET", mmd.get("GET"));
        optionsResult.putMethodMetaData("POST", mmd.get("POST"));

        ResourceUtil.addMethodMetaData(ar, mmd);
        ActionReportResult r= new ActionReportResult(ar, optionsResult);
        r.setLeafContent(entity);
        return r;
View Full Code Here

        Protocol p = nl.findHttpProtocol();
        RestActionReporter ar = new RestActionReporter();
        ar.setActionExitCode(ActionReport.ExitCode.SUCCESS);
        ar.getTopMessagePart().getProps().put("protocol", p.getName());

        ActionReportResult result = new ActionReportResult("find-http-protocol", ar, new OptionsResult());

        return result;
    }
View Full Code Here

        actionReport.getExtraProperties().put("systemProperties", new ArrayList(properties.values()));
        if (properties.isEmpty()) {
            actionReport.getTopMessagePart().setMessage("Nothing to list."); // i18n
        }
        ActionReportResult results = new ActionReportResult(commandName, actionReport, new OptionsResult());

        return results;
    }
View Full Code Here

        data.put("DEFAULT", propertiesString);
        data.put("target", (parent == null) ? getParent(uriInfo) : parent);

        RestActionReporter actionReport = ResourceUtil.runCommand("create-system-properties", data, habitat.getRemoteLocator(), "");
        ActionReport.ExitCode exitCode = actionReport.getActionExitCode();
        ActionReportResult results = new ActionReportResult(commandName, actionReport, new OptionsResult());

        int status = HttpURLConnection.HTTP_OK; /*200 - ok*/
        if (exitCode == ActionReport.ExitCode.FAILURE) {
            status = HttpURLConnection.HTTP_INTERNAL_ERROR;
        }
View Full Code Here

        data.put("DEFAULT", propName);
        data.put("target", (parent == null) ? getParent(uriInfo) : parent);

        RestActionReporter actionReport = ResourceUtil.runCommand("delete-system-property", data, habitat.getRemoteLocator(), "");
        ActionReport.ExitCode exitCode = actionReport.getActionExitCode();
        ActionReportResult results = new ActionReportResult(commandName, actionReport, new OptionsResult());

        int status = HttpURLConnection.HTTP_OK; /*200 - ok*/
        if (exitCode == ActionReport.ExitCode.FAILURE) {
            status = HttpURLConnection.HTTP_INTERNAL_ERROR;
        }
View Full Code Here

TOP

Related Classes of org.glassfish.admin.rest.results.OptionsResult

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.