Package edu.stanford.bmir.protege.web.client.rpc

Examples of edu.stanford.bmir.protege.web.client.rpc.ProjectManagerServiceAsync


        dataToForm(projectId);

        setDialogButtonHandler(DialogButton.OK, new WebProtegeDialogButtonHandler<ProjectConfigurationInfo>() {
            public void handleHide(ProjectConfigurationInfo data, final WebProtegeDialogCloser closer) {

                ProjectManagerServiceAsync pms = GWT.create(ProjectManagerService.class);
                pms.setProjectConfiguration(data, new AsyncCallback<Void>() {
                    public void onFailure(Throwable caught) {
                    }

                    public void onSuccess(Void result) {
                        closer.hide();
View Full Code Here


        UserId userId = Application.get().getUserId();
        if(userId.isGuest()) {
            throw new RuntimeException("User is guest.  Guest users are not allowed to create projects.");
        }
        NewProjectSettings newProjectSettings = new NewProjectSettings(userId, data.getProjectName(), data.getProjectDescription(), data.getProjectType());
        ProjectManagerServiceAsync projectManagerService = GWT.create(ProjectManagerService.class);
        projectManagerService.createNewProject(newProjectSettings, new AsyncCallback<ProjectDetails>() {
            public void onFailure(Throwable caught) {
                handleCreateProjectFailure(caught);
            }

            public void onSuccess(ProjectDetails result) {
View Full Code Here

        MessageBox.showAlert("Upload failed", result.getUploadRejectedMessage());
    }

    private void createProjectFromUpload(UploadFileInfo data, FileUploadResponse result) {
        UIUtil.showLoadProgessBar(PROGRESS_DIALOG_TITLE, "Creating project");
        ProjectManagerServiceAsync projectManagerService = GWT.create(ProjectManagerService.class);
        UserId userId = Application.get().getUserId();
        DocumentId documentId = result.getDocumentId();
        String projectName = data.getProjectSettings().getProjectName();
        String projectDescription = data.getProjectSettings().getProjectDescription();
        ProjectType projectType = data.getProjectSettings().getProjectType();
        NewProjectSettings newProjectSettings = new NewProjectSettings(userId, projectName, projectDescription, projectType, documentId);

        projectManagerService.createNewProject(newProjectSettings, new AsyncCallback<ProjectDetails>() {
            public void onFailure(Throwable caught) {
                UIUtil.hideLoadProgessBar();
                caught.printStackTrace();
                handleCreateProjectFailure(caught);
            }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.client.rpc.ProjectManagerServiceAsync

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.