Package org.jboss.as.console.client.domain.model

Examples of org.jboss.as.console.client.domain.model.Server


            public void onSuccess(DMRResponse result) {

                ModelNode response = result.get();
                ModelNode model = response.get("result").asObject();

                Server server = serverAdapter.fromDMR(model);
                server.setStarted(model.get("status").asString().equals("STARTED"));

                callback.onSuccess(server);
            }

        });
View Full Code Here


                List<Server> records = new LinkedList<Server>();
                for(ModelNode item : payload)
                {
                    ModelNode model = item.asProperty().getValue();
                    Server server = serverAdapter.fromDMR(model);
                    server.setStarted(model.get("status").asString().equals("STARTED"));
                    records.add(server);
                }


                callback.onSuccess(records);
View Full Code Here

        ToolButton deleteBtn = new ToolButton(Console.CONSTANTS.common_label_delete());
        deleteBtn.addClickHandler(new ClickHandler(){
            @Override
            public void onClick(ClickEvent clickEvent) {

                final Server server = getSelectionModel().getSelectedObject();

                Feedback.confirm(
                        Console.MESSAGES.deleteServerConfig(),
                        Console.MESSAGES.deleteServerConfigConfirm(server.getName()),
                        new Feedback.ConfirmationHandler() {
                            @Override
                            public void onConfirmation(boolean isConfirmed) {
                                if(isConfirmed)
                                    presenter.tryDelete(server);
                            }
                        });
            }
        });

        deleteBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_delete_serverConfigView());
        toolStrip.addToolButtonRight(deleteBtn);


        // ------------------------------------------------------

        // Create columns
        Column<Server, String> nameColumn = new Column<Server, String>(new TextCell()) {
            @Override
            public String getValue(Server object) {
                return object.getName();
            }
        };


        Column<Server, String> groupColumn = new Column<Server, String>(new TextCell()) {
            @Override
            public String getValue(Server object) {
                return object.getGroup();
            }
        };


        serverConfigTable.addColumn(nameColumn, "Configuration Name");
        serverConfigTable.addColumn(groupColumn, Console.CONSTANTS.common_label_serverGroup());


        // ---------------------


        details = new ServerConfigDetails(presenter);

        // jvm editor
        jvmEditor = new JvmEditor(presenter, true, true);
        jvmEditor.setAddressCallback(new FormHelpPanel.AddressCallback() {
            @Override
            public ModelNode getAddress() {

                ModelNode address = new ModelNode();
                address.add("host", presenter.getSelectedHost());
                address.add("server-config", "*");
                address.add("jvm", "*");
                return address;
            }
        });

        propertyEditor = new PropertyEditor(presenter);

        portsView = new PortsView();


        // --------------------


        MultipleToOneLayout layout = new MultipleToOneLayout()
                .setTitle(Console.CONSTANTS.common_label_serverGroupConfigurations())
                .setHeadline("Server Configurations")
                .setDescription(Console.CONSTANTS.common_serverConfig_desc())
                .setMaster(Console.MESSAGES.available(Console.CONSTANTS.common_label_serverConfigs()), serverConfigTable)
                .setMasterTools(toolStrip.asWidget())
                .addDetail("Attributes", details.asWidget())
                .addDetail(Console.CONSTANTS.common_label_virtualMachine(), jvmEditor.asWidget())
                .addDetail(Console.CONSTANTS.common_label_systemProperties(), propertyEditor.asWidget());


        details.bind(serverConfigTable);

        serverConfigTable.getSelectionModel().addSelectionChangeHandler(
                new SelectionChangeEvent.Handler() {
                    @Override
                    public void onSelectionChange(SelectionChangeEvent selectionChangeEvent) {
                        Server server = getSelectionModel().getSelectedObject();
                        presenter.loadJVMConfiguration(server);
                        presenter.loadProperties(server);
                        presenter.loadPorts(server);
                    }
                });
View Full Code Here

                List<Server> records = new LinkedList<Server>();
                for(ModelNode item : payload)
                {
                    ModelNode model = item.asProperty().getValue();
                    Server server = serverAdapter.fromDMR(model);
                    server.setStarted(model.get("status").asString().equals("STARTED"));
                    records.add(server);
                }


                callback.onSuccess(records);
View Full Code Here

            public void onSuccess(DMRResponse result) {

                ModelNode response = result.get();
                ModelNode model = response.get("result").asObject();

                Server server = serverAdapter.fromDMR(model);
                server.setStarted(model.get("status").asString().equals("STARTED"));

                callback.onSuccess(server);
            }

        });
View Full Code Here

                List<Server> records = new LinkedList<Server>();
                for(ModelNode item : payload)
                {
                    ModelNode model = item.asProperty().getValue();
                    Server server = serverAdapter.fromDMR(model);
                    server.setStarted(model.get("status").asString().equals("STARTED"));
                    records.add(server);
                }


                callback.onSuccess(records);
View Full Code Here

            public void onSuccess(DMRResponse result) {

                ModelNode response = result.get();
                ModelNode model = response.get("result").asObject();

                Server server = serverAdapter.fromDMR(model);
                server.setStarted(model.get("status").asString().equals("STARTED"));

                callback.onSuccess(server);
            }

        });
View Full Code Here

        FormValidation validation = form.validate();

        if(!validation.hasErrors())
        {
            Server updatedEntity = form.getUpdatedEntity();
            Map<String,Object> changedValues = form.getChangedValues();

            // https://issues.jboss.org/browse/AS7-662
            if(changedValues.containsKey("portOffset"))
                changedValues.put("socketBinding", updatedEntity.getSocketBinding());
            else if(changedValues.containsKey("socketBinding"))
                changedValues.put("portOffset", updatedEntity.getPortOffset());

            presenter.onSaveChanges(updatedEntity.getName(), changedValues);
        }
    }
View Full Code Here

                //System.out.println(response.toString());

                List<Server> records = new ArrayList<Server>(payload.size());
                for(ModelNode item : payload)
                {
                    Server record = factory.server().as();

                    ModelNode server = item.asProperty().getValue();

                    record.setName(server.get("name").asString());
                    record.setGroup(server.get("group").asString());

                    if(server.hasDefined("socket-binding-group"))
                        record.setSocketBinding(server.get("socket-binding-group").asString());

                    try {
                        record.setPortOffset(server.get("socket-binding-port-offset").asInt());
                    } catch (IllegalArgumentException e) {
                        //
                    }

                    try {
                        record.setAutoStart(server.get("auto-start").asBoolean());
                    } catch (IllegalArgumentException e) {
                        // TODO: https://issues.jboss.org/browse/JBAS-9163

                    }

                    record.setStarted(server.get("status").asString().equals("STARTED"));


                    List<PropertyRecord> propertyRecords = ModelAdapter.model2Property(factory, server);
                    record.setProperties(propertyRecords);

                    Jvm jvm = ModelAdapter.model2JVM(factory, server);
                    record.setJvm(jvm);

                    records.add(record);
                }

                callback.onSuccess(records);
View Full Code Here

                List<Server> records = new LinkedList<Server>();
                for(ModelNode item : payload)
                {
                    ModelNode model = item.asProperty().getValue();
                    Server server = serverAdapter.fromDMR(model);
                    server.setStarted(model.get("status").asString().equals("STARTED"));
                    records.add(server);
                }


                callback.onSuccess(records);
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.domain.model.Server

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.