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

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


                for(int i=0; i<propertyList.size(); i++)
                {

                    Property property = propertyList.get(i).asProperty();
                    ServerGroupRecord record = model2ServerGroup(
                            property.getName(),
                            property.getValue()
                    );
                    records.add(record);
                }
View Full Code Here


     * @param groupName
     * @param model
     * @return
     */
    private ServerGroupRecord model2ServerGroup(String groupName, ModelNode model) {
        ServerGroupRecord record = factory.serverGroup().as();

        record.setGroupName(groupName);
        record.setProfileName(model.get("profile").asString());
        record.setSocketBinding(model.get("socket-binding-group").asString());

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

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

        return record;
    }
View Full Code Here

    public void deleteCurrentRecord() {

        if(selectedRecord!=null)
        {
            final ServerGroupRecord deletion = selectedRecord;
            serverGroupStore.delete(deletion, new SimpleCallback<Boolean>() {
                @Override
                public void onSuccess(Boolean wasSuccessful) {
                    if(wasSuccessful)
                    {
                        Console.MODULES.getMessageCenter().notify(
                                new Message("Deleted server group "+deletion.getGroupName())
                        );

                        getEventBus().fireEvent(new StaleModelEvent(StaleModelEvent.SERVER_GROUPS));
                    }
                    else
                    {
                        Console.MODULES.getMessageCenter().notify(
                                new Message("Failed to delete "+deletion.getGroupName(), Message.Severity.Error)
                        );
                    }
                }
            });
View Full Code Here

                assertTrue("Expected no deployments", result.isEmpty());
                didCallback = true;
            }
        };

        ServerGroupRecord group = new ServerGroupImpl();
        group.setGroupName("main-server-group");
        group.setProfileName("default");

        //group.setJvm(new Jvm());
        group.setSocketBinding("standard-sockets");
        List<ServerGroupRecord> groups = new ArrayList<ServerGroupRecord>();
        groups.add(group);

        store.loadDeployments(groups, callback);
View Full Code Here

        submit.getElement().setAttribute("style", "float:right");
        submit.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
              // merge base
                ServerGroupRecord newGroup = form.getUpdatedEntity();
                ServerGroupRecord base = null;
                for(ServerGroupRecord rec : existing)
                {
                    if(rec.getGroupName().equals(basedOnSelection.getValue()))
                    {
                        base = rec;
                        break;
                    }
                }

                newGroup.setJvm(base.getJvm());
                newGroup.setSocketBinding(base.getSocketBinding());
                newGroup.setProfileName(base.getProfileName());
                newGroup.setProperties(base.getProperties());

                presenter.onNewGroup(newGroup);

            }
        });
View Full Code Here

        final SingleSelectionModel<ServerGroupRecord> selectionModel = new SingleSelectionModel<ServerGroupRecord>();
        groupList.setSelectionModel(selectionModel);
        selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            public void onSelectionChange(SelectionChangeEvent event) {
                ServerGroupRecord selectedRecord = selectionModel.getSelectedObject();
                final String groupName = selectedRecord.getGroupName();

                Console.MODULES.getPlaceManager().revealPlaceHierarchy(
                        new ArrayList<PlaceRequest>() {{
                            add(new PlaceRequest("domain"));
                            add(new PlaceRequest(NameTokens.ServerGroupPresenter).with("name", groupName));
View Full Code Here

        return layout;
    }

    private void onSave() {
        ServerGroupRecord updatedEntity = form.getUpdatedEntity();
        updatedEntity.setProperties(new HashMap<String,String>());

        for(PropertyRecord prop : propertyProvider.getList())
        {
            updatedEntity.getProperties().put(prop.getKey(), prop.getValue());
        }

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

    private void wireTablesTogether() {
        final SingleSelectionModel<ServerGroupRecord> selectionModel = this.serverGroupTableSelectionModel;
        selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
            @Override
            public void onSelectionChange(SelectionChangeEvent event) {
                ServerGroupRecord selectedServerGroup = selectionModel.getSelectedObject();
                refreshServerGroupDeploymentsTable(selectedServerGroup);
            }
        });
    }
View Full Code Here

    @Override
    public void updateDeploymentInfo(DomainDeploymentInfo domainDeploymentInfo, DeploymentRecord... targets) {
        List<ServerGroupRecord> serverGroups = this.presenter.getServerGroups();

        ServerGroupRecord serverGroupTarget = findSingleTarget(serverGroups, targets);

        this.serverGroupDeploymentProvider.setList(serverGroups);

        // Set the backing data for domain tables
        domainDeploymentProvider.setList(domainDeploymentInfo.getDomainDeployments());
View Full Code Here

    private void setServerGroupTableSelection(ServerGroupRecord serverGroupTarget) {
        if (this.serverGroupTable.isEmpty()) return;

        List<ServerGroupRecord> serverGroups = this.presenter.getServerGroups();
        ServerGroupRecord previouslySelectedServerGroup = findPreviouslySelectedGroup();
        if (previouslySelectedServerGroup == null) {
            serverGroupTableSelectionModel.setSelected(serverGroups.get(0), true);
        } else if (serverGroupTarget != null) {
            serverGroupTableSelectionModel.setSelected(serverGroupTarget, true);
        } else {
View Full Code Here

TOP

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

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.