Package org.glassfish.admin.restconnector

Examples of org.glassfish.admin.restconnector.RestConfig


    /**
     * Get the current configured indenting value for the REST layer
     * @return
     */
    public static int getFormattingIndentLevel() {
        RestConfig rg = ResourceUtil.getRestConfig(Globals.getDefaultBaseServiceLocator());
        if (rg == null) {
            return -1;
        } else {
            return Integer.parseInt(rg.getIndentLevel());
        }

    }
View Full Code Here


    /**
     * Get the current configured indenting value for the REST layer
     * @return
     */
    public static int getFormattingIndentLevel() {
        RestConfig rg = ResourceUtil.getRestConfig(Globals.getDefaultBaseServiceLocator());
        if (rg == null) {
            return -1;
        } else {
            return Integer.parseInt(rg.getIndentLevel());
        }

    }
View Full Code Here

     * attributes of a config bean
     */

    public static boolean canShowDeprecatedItems(ServiceLocator habitat) {

        RestConfig rg = getRestConfig(habitat);
        if ((rg != null) && (rg.getShowDeprecatedItems().equalsIgnoreCase("true"))) {
            return true;
        }
        return false;
    }
View Full Code Here

     * attributes of a config bean
     */

    public static boolean canShowDeprecatedItems(ServiceLocator habitat) {

        RestConfig rg = getRestConfig(habitat);
        if ((rg != null) && (rg.getShowDeprecatedItems().equalsIgnoreCase("true"))) {
            return true;
        }
        return false;
    }
View Full Code Here

    /**
     * Get the current configured indenting value for the REST layer
     * @return
     */
    public static int getFormattingIndentLevel() {
        RestConfig rg = ResourceUtil.getRestConfig(Globals.getDefaultBaseServiceLocator());
        if (rg == null) {
            return -1;
        } else {
            return Integer.parseInt(rg.getIndentLevel());
        }

    }
View Full Code Here

     * attributes of a config bean
     */

    public static boolean canShowDeprecatedItems(ServiceLocator habitat) {

        RestConfig rg = getRestConfig(habitat);
        if ((rg != null) && (rg.getShowDeprecatedItems().equalsIgnoreCase("true"))) {
            return true;
        }
        return false;
    }
View Full Code Here

    @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,"text/html;qs=2"})
    public Response create(HashMap<String, String> data) {
        if (data == null) {
            data = new HashMap<String, String>();
        }
        final RestConfig restConfig = ResourceUtil.getRestConfig(habitat);

        Response.ResponseBuilder responseBuilder = Response.status(UNAUTHORIZED);
        RestActionReporter ar = new RestActionReporter();
        Request grizzlyRequest = request.get();
View Full Code Here

    public RestConfigChangeListener(ServiceLocator habitat, Reloader reload, ResourceConfig rc, ServerContext sc) {
//        this.r = reload;
        this.sc = sc;


        RestConfig target = ResourceUtil.getRestConfig(habitat);

        if (target != null) {
            ((ObservableBean) ConfigSupport.getImpl(target)).addListener(this);
        }
View Full Code Here

    @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML,"text/html;qs=2"})
    public Response create(HashMap<String, String> data) {
        if (data == null) {
            data = new HashMap<String, String>();
        }
        final RestConfig restConfig = ResourceUtil.getRestConfig(habitat.getRemoteLocator());

        Response.ResponseBuilder responseBuilder = Response.status(UNAUTHORIZED);
        RestActionReporter ar = new RestActionReporter();
        Request grizzlyRequest = request.get();
View Full Code Here

    @Override
    public void execute(AdminCommandContext context) {

        ActionReport report = context.getActionReport();

        RestConfig restConfig = config.getExtensionByType(RestConfig.class);

        /**
         * The schedules does not exist in this Config.  We will need to
         * add it plus the default schedules.
         */
        if (restConfig == null) {
            try {
                ConfigSupport.apply(new SingleConfigCode<Config>() {

                    @Override
                    public Object run(Config parent) throws TransactionFailure {
                        RestConfig child = parent.createChild(RestConfig.class);
                        parent.getContainers().add(child);
                        return child;
                    }
                }, config);
            } catch (TransactionFailure e) {
View Full Code Here

TOP

Related Classes of org.glassfish.admin.restconnector.RestConfig

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.