Examples of BundleGWTServiceAsync


Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

            });
    }

    private void processAssignment() {

        BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
        bundleServer.assignBundlesToBundleGroups(getInitialBundleIds(), new int[] { wizard.getBundleVersion()
            .getBundle().getId() }, new AsyncCallback<Void>() {
            @Override
            public void onSuccess(Void result) {
                CoreGUI.getMessageCenter().notify(
                    new Message(MSG.view_bundle_createWizard_groupsStep_successAssign(wizard.getBundleVersion()
View Full Code Here

Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

                BundleType bundleType = knownBundleTypes.get(event.getValue());
                setSelected(bundleType);
            }
        });

        BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
        bundleServer.getAllBundleTypes(new AsyncCallback<ArrayList<BundleType>>() {
            public void onSuccess(ArrayList<BundleType> result) {
                if (result == null || result.size() == 0) {
                    setSelected(null);
                    CoreGUI.getMessageCenter().notify(
                        new Message(CoreGUI.getMessages().view_bundle_createWizard_noBundleTypesSupported(),
View Full Code Here

Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

            wizard.setBundleVersion(null);
            setButtonsDisableMode(false);
            return;
        }

        BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService(10 * 60 * 1000); // if upload takes more than 10m, you have other things to worry about
        bundleServer.createOrStoreBundleVersionViaURL(urlString, urlUserName, urlPassword,
            new AsyncCallback<BundleVersion>() {
                @Override
                public void onSuccess(BundleVersion result) {
                    CoreGUI.getMessageCenter().notify(
                        new Message(
View Full Code Here

Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

        // before moving to the next step, get the assignable/assigned bundle groups for this new bundle version
        boolean isInitialVersion = this.wizard.getBundleVersion() == null
            || this.wizard.getBundleVersion().getVersionOrder() == 0;
        int bundleId = isInitialVersion ? 0 : this.wizard.getBundleVersion().getBundle().getId();

        BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
        bundleServer.getAssignableBundleGroups(bundleId, new AsyncCallback<BundleGroupAssignmentComposite>() {

            public void onSuccess(BundleGroupAssignmentComposite result) {
                wizard.setBundleGroupAssignmentComposite(result);
                wizard.getView().incrementStep(); // go to the next step
            }
View Full Code Here

Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

            } else {
                int bvId = uploadDistroForm.getBundleVersionId();
                BundleVersionCriteria criteria = new BundleVersionCriteria();
                criteria.addFilterId(bvId);
                criteria.fetchBundle(true);
                BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
                bundleServer.findBundleVersionsByCriteria(criteria, new AsyncCallback<PageList<BundleVersion>>() {
                    @Override
                    public void onSuccess(PageList<BundleVersion> result) {
                        BundleVersion bv = result.get(0);
                        CoreGUI.getMessageCenter().notify(
                            new Message(MSG.view_bundle_createWizard_createSuccessful(bv.getName(), bv.getVersion()),
View Full Code Here

Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

            setButtonsDisableMode(false);
            return;
        }

        this.wizard.setRecipe(recipeString);
        BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
        bundleServer.createBundleVersionViaRecipe(this.wizard.getRecipe(), new AsyncCallback<BundleVersion>() {
            @Override
            public void onSuccess(BundleVersion result) {
                CoreGUI.getMessageCenter().notify(
                    new Message(MSG.view_bundle_createWizard_createSuccessful(result.getName(), result.getVersion()),
                        Message.Severity.Info));
View Full Code Here

Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

        // delete a newly created deployment but only if it's status is failure and it has
        // no deployments.  This should be rare, or maybe impossible, but in an odd case that
        // the deployment fails and they user wants to Cancel as opposed to Finish, let's
        // clean up as best as possible.
        if ((null != getNewDeployment()) && (0 < getNewDeployment().getId())) {
            BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
            BundleDeploymentCriteria c = new BundleDeploymentCriteria();
            c.addFilterId(getNewDeployment().getId());
            c.fetchResourceDeployments(true);
            bundleServer.findBundleDeploymentsByCriteria(c, //
                new AsyncCallback<PageList<BundleDeployment>>() {
                    public void onSuccess(PageList<BundleDeployment> newDeploymentList) {
                        if (!newDeploymentList.isEmpty()) {
                            BundleDeployment newDeployment = newDeploymentList.get(0);
                            boolean isFailedToLaunch = BundleDeploymentStatus.FAILURE.equals(newDeployment.getStatus())
                                || BundleDeploymentStatus.PENDING.equals(newDeployment.getStatus());
                            boolean hasNoResourceDeployments = ((null == newDeployment.getResourceDeployments()) || newDeployment
                                .getResourceDeployments().isEmpty());

                            // go ahead and delete it if it hasn't really done anything but get created.
                            // otherwise, let folks inspect via the ui and take further action.
                            // if the deployment can't be deleted then don't try to delete the destination,
                            // it's now in use by the deployment
                            if (isFailedToLaunch && hasNoResourceDeployments) {
                                BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
                                bundleServer.deleteBundleDeployment(newDeployment.getId(), //
                                    new AsyncCallback<Void>() {
                                        public void onSuccess(Void voidReturn) {
                                            deleteNewDestination();
                                        }
View Full Code Here

Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

        }
    }

    private void deleteNewDestination() {
        if (this.isNewDestination() && (null != this.getDestination())) {
            BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();

            bundleServer.deleteBundleDestination(this.getDestination().getId(), //
                new AsyncCallback<Void>() {
                    public void onSuccess(Void voidReturn) {
                        CoreGUI.refresh();
                    }
View Full Code Here

Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

                BundleWithLatestVersionComposite object = dataSource.copyValues(selection);
                doomedNames.add(object.getBundleName());
                doomedIds[i++] = object.getBundleId();
            }

            BundleGWTServiceAsync bundleManager = GWTServiceLookup.getBundleService();
            final Duration duration = new Duration();
            bundleManager.deleteBundles(doomedIds, new AsyncCallback<Void>() {
                @Override
                public void onFailure(final Throwable caught) {
                    Timer timer = new Timer() {
                        @Override
                        public void run() {
View Full Code Here

Examples of org.rhq.coregui.client.gwt.BundleGWTServiceAsync

        @Override
        public void executeAction(ListGridRecord[] selection, Object actionValue) {
            final BundleWithLatestVersionComposite object = dataSource.copyValues(selection[0]);
            BundleCriteria bc = new BundleCriteria();
            bc.addFilterId(object.getBundleId());
            BundleGWTServiceAsync bundleManager = GWTServiceLookup.getBundleService();
            bundleManager.findBundlesByCriteria(bc, new AsyncCallback<PageList<Bundle>>() {
                @Override
                public void onFailure(Throwable caught) {
                    getErrorHandler().handleError(MSG.view_bundle_list_loadFailure(object.getBundleName()), caught);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.