当前位置: 首页>>代码示例>>Java>>正文


Java RemoteCallback类代码示例

本文整理汇总了Java中org.jboss.errai.common.client.api.RemoteCallback的典型用法代码示例。如果您正苦于以下问题:Java RemoteCallback类的具体用法?Java RemoteCallback怎么用?Java RemoteCallback使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RemoteCallback类属于org.jboss.errai.common.client.api包,在下文中一共展示了RemoteCallback类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: afterInitialization

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
@AfterInitialization
public void afterInitialization() {
    authenticationServiceCaller.call(new RemoteCallback<User>() {
        @Override
        public void callback(User user) {
            Label userLabel = new Label(
                    "User logged in: username=" + user.getIdentifier() + ", roles=" + user.getRoles());
            RootPanel.get().add(userLabel);
            SimplePanel panel = new SimplePanel();
            Anchor logoutLink = new Anchor("Spring Security Logout URL", GWT.getHostPageBaseURL() + "logout");
            panel.add(logoutLink);
            RootPanel.get().add(panel);
            initBtns();
        }
    }).getUser();
}
 
开发者ID:expansel,项目名称:errai-spring-boot-sample,代码行数:17,代码来源:App.java

示例2: getRemoteCallback

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
private RemoteCallback<GitHubResponse> getRemoteCallback() {
	return new RemoteCallback<GitHubResponse>() {

		@Override
		public void callback(GitHubResponse response) {
			autoMessageBox.hide();
			GitHubContentResponse content = response.getContent();
			String shaUpdate = content.getSha(); 
			String url = content.getDownloadUrl();
			String message = UIMessages.INSTANCE.gitHubSavedSucsessfully(url);
			if(shaUpdate.equals(gitHubParameter.getSha())) {
				message = UIMessages.INSTANCE.gitHubResponseNotUpdate();
			}								
			messageDialogBuilder.createInfo(UIMessages.INSTANCE.gitHubResponseTitle(), message).show();
			
			VectorLayer layer = (VectorLayer) layerManagerWidget
					.getSelectedLayer(LayerManagerWidget.VECTOR_TAB);
			GitHubLayerVectorSource source = (GitHubLayerVectorSource) layer
					.getSource();
			source.setSha(shaUpdate);
		}
	};
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:24,代码来源:GitHubUpdateFileExporter.java

示例3: getRemoteCallback

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
private RemoteCallback<GitHubResponse> getRemoteCallback() {
	return new RemoteCallback<GitHubResponse>() {

		@Override
		public void callback(GitHubResponse response) {
			autoMessageBox.hide();
			GitHubContentResponse content = response.getContent();
			String url = content.getDownloadUrl();
			messageDialogBuilder.createInfo(
					UIMessages.INSTANCE.gitHubResponseTitle(),
					UIMessages.INSTANCE.gitHubSavedSucsessfully(url))
					.show();
		}

	};
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:17,代码来源:GitHubCreateFileExporter.java

示例4: onProjectNameChange

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
@Override
public void onProjectNameChange() {
    String projectName = view.getProjectName();
    projectName = projectName != null ? projectName.trim() : null;
    if (projectName != null && !projectName.equals(view.getProjectName())) {
        view.setProjectName(projectName);
    }
    model.setProjectName(projectName);

    repositoryStructureService.call(new RemoteCallback<Boolean>() {
                                        @Override
                                        public void callback(Boolean isValid) {
                                            if (isValid) {
                                                view.clearProjectNameErrorMessage();
                                            } else {
                                                view.setProjectNameErrorMessage(Constants.INSTANCE.InvalidProjectName());
                                            }
                                            if (isValid != isProjectValid) {
                                                isProjectValid = isValid;
                                                fireEvent();
                                            }
                                        }
                                    },
                                    new DefaultErrorCallback()).isValidProjectName(projectName);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:26,代码来源:RepositoryStructurePage.java

示例5: fetchMetadata

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
void fetchMetadata(final String uuid,
                   final RemoteCallback<DataSetMetadata> callback) {
    try {
        clientServices.fetchMetadata(uuid,
                                     new DataSetMetadataCallback() {

                                         public void callback(DataSetMetadata metadata) {
                                             dataSetMetadata = metadata;
                                             callback.callback(metadata);
                                         }

                                         public void notFound() {
                                             view.errorDataSetNotFound(uuid);
                                         }

                                         public boolean onError(ClientRuntimeError error) {
                                             view.error(error);
                                             return false;
                                         }
                                     });
    } catch (Exception e) {
        view.error(new ClientRuntimeError(e));
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:25,代码来源:DataSetLookupEditor.java

示例6: configureRepository

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
public void configureRepository(String repository,
                                String sourceBranch,
                                String devBranch,
                                String releaseBranch,
                                String version) {
    assetManagementServices.call(new RemoteCallback<Long>() {
                                     @Override
                                     public void callback(Long taskId) {
                                         view.displayNotification("Repository Configuration Started!");
                                     }
                                 },
                                 new ErrorCallback<Message>() {
                                     @Override
                                     public boolean error(Message message,
                                                          Throwable throwable) {
                                         errorPopup.showMessage("Unexpected error encountered : " + throwable.getMessage());
                                         return true;
                                     }
                                 }
    ).configureRepository(repository,
                          sourceBranch,
                          devBranch,
                          releaseBranch,
                          version);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:26,代码来源:RepositoryConfigurationPresenter.java

示例7: getLoadContentSuccessCallback

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
private RemoteCallback<SolverModelContent> getLoadContentSuccessCallback() {
    return new RemoteCallback<SolverModelContent>() {

        @Override
        public void callback(final SolverModelContent content) {
            //Path is set to null when the Editor is closed (which can happen before async calls complete).
            if (versionRecordManager.getCurrentPath() == null) {
                return;
            }

            resetEditorPages(content.getOverview());

            addXMLSourcePage();

            model = content.getConfig();

            view.setTerminationConfigModel(model.getTermination());
            view.setScoreDirectorFactoryConfig(model.getScoreDirectorFactoryConfig(),
                                               versionRecordManager.getCurrentPath());
            view.setPhaseConfigModel(model.getPhaseConfigList());

            view.hideBusyIndicator();
            createOriginalHash(model);
        }
    };
}
 
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:27,代码来源:SolverEditorPresenter.java

示例8: configureRepository

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
private void configureRepository() {
    assetManagementServices.call(new RemoteCallback<Long>() {
                                     @Override
                                     public void callback(Long taskId) {
                                         //view.displayNotification( "Repository Configuration Started!" );
                                     }
                                 },
                                 new ErrorCallback<Message>() {
                                     @Override
                                     public boolean error(Message message,
                                                          Throwable throwable) {
                                         ErrorPopup.showMessage("Unexpected error encountered : " + throwable.getMessage());
                                         return true;
                                     }
                                 }).configureRepository(projectContext.getActiveRepository().getAlias(),
                                                        projectContext.getActiveBranch(),
                                                        configureScreenPopupView.getDevBranch(),
                                                        configureScreenPopupView.getReleaseBranch(),
                                                        configureScreenPopupView.getVersion());
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:21,代码来源:RepositoryStructureMenu.java

示例9: init

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
public void init(final String xml03File) {
    bayesianService.call(new RemoteCallback<BayesNetwork>() {
                             @Override
                             public void callback(final BayesNetwork response) {
                                 bayesianNodes.clear();
                                 for (BayesVariable bay : response.getNodos()) {
                                     drawBayesianNode(bay);
                                 }
                                 readyEvent.fire(new RenderBayesianNetworkEvent(bayesianNodes));
                             }
                         },
                         new ErrorCallback<Object>() {

                             @Override
                             public boolean error(Object message,
                                                  Throwable throwable) {
                                 Window.alert("Sorry.. the " + xml03File + " could not be read..");
                                 ProgressBar.setInfinite(false);
                                 return false;
                             }
                         }
    ).buildXml03(BayesianUtils.XML3_RESOURCE_PATH + xml03File);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:BayesianFactory.java

示例10: onDataSetSelected

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
void onDataSetSelected() {
    String selectedUUID = view.getSelectedDataSetId();
    for (DataSetDef dataSetDef : _dataSetDefList) {
        if (dataSetDef.getUUID().equals(selectedUUID)) {
            fetchMetadata(selectedUUID,
                          new RemoteCallback<DataSetMetadata>() {

                              public void callback(DataSetMetadata metadata) {
                                  dataSetLookup = lookupConstraints.newDataSetLookup(metadata);
                                  updateDataSetLookup();
                                  changeEvent.fire(new DataSetLookupChangedEvent(dataSetLookup));
                              }
                          });
        }
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:DataSetLookupEditor.java

示例11: addOrganizationalUnitRepository

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
@Override
@ResourceCheck(action = ORG_UNIT_UPDATE)
public void addOrganizationalUnitRepository(final OrganizationalUnit organizationalUnit,
                                            final Repository repository) {
    view.showBusyIndicator(OrganizationalUnitManagerConstants.INSTANCE.Wait());
    organizationalUnit.getRepositories().add(repository);
    organizationalUnitService.call(new RemoteCallback<Void>() {
                                       @Override
                                       public void callback(final Void v) {
                                           view.setOrganizationalUnitRepositories(organizationalUnit.getRepositories(),
                                                                                  getAvailableRepositories());
                                           view.hideBusyIndicator();
                                       }
                                   },
                                   new HasBusyIndicatorDefaultErrorCallback(view)).addRepository(organizationalUnit,
                                                                                                 repository);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:OrganizationalUnitManagerPresenterImpl.java

示例12: createDroolsQuerySocialItemsWidget

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
private void createDroolsQuerySocialItemsWidget(final SocialTimelineWidgetModel model) {
    MessageBuilder.createCall(new RemoteCallback<List<SocialActivitiesEvent>>() {
                                  public void callback(List<SocialActivitiesEvent> events) {
                                      RecentUpdatesModel recentUpdatesModel = RecentUpdatesModel.generate(events);
                                      Map<String, List<UpdateItem>> updateItems = recentUpdatesModel.getUpdateItems();
                                      if (updateItems.keySet().isEmpty()) {
                                          displayNoEvents();
                                      } else {
                                          createExpandedItemsWidget(recentUpdatesModel,
                                                                    updateItems,
                                                                    model);
                                      }
                                  }
                              },
                              SocialTimelineRulesQueryAPI.class).executeSpecificRule(model.getGlobals(),
                                                                                     model.getDrlName(),
                                                                                     model.getMaxResults());
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:19,代码来源:SocialTimelineWidget.java

示例13: createNewOrganizationalUnit

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
@Override
@ResourceCheck(type = ORG_UNIT_TYPE, action = ORG_UNIT_CREATE)
public void createNewOrganizationalUnit(final String organizationalUnitName,
                                        final String organizationalUnitOwner,
                                        final String defaultGroupId) {
    final Collection<Repository> repositories = new ArrayList<Repository>();
    view.showBusyIndicator(OrganizationalUnitManagerConstants.INSTANCE.Wait());
    organizationalUnitService.call(new RemoteCallback<OrganizationalUnit>() {

                                       @Override
                                       public void callback(final OrganizationalUnit newOrganizationalUnit) {
                                           createOUEvent.fire(new AfterCreateOrganizationalUnitEvent(newOrganizationalUnit));
                                           allOrganizationalUnits.add(newOrganizationalUnit);
                                           view.addOrganizationalUnit(newOrganizationalUnit);
                                           view.hideBusyIndicator();
                                       }
                                   },
                                   new HasBusyIndicatorDefaultErrorCallback(view)).createOrganizationalUnit(organizationalUnitName,
                                                                                                            organizationalUnitOwner,
                                                                                                            defaultGroupId,
                                                                                                            repositories);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:OrganizationalUnitManagerPresenterImpl.java

示例14: onRangeChanged

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
@Override
protected void onRangeChanged(HasData<JarListPageRow> display) {
    final Range range = display.getVisibleRange();
    JarListPageRequest request = new JarListPageRequest(range.getStart(),
                                                        range.getLength(),
                                                        filter,
                                                        fileFormats,
                                                        getSortColumnDataStoreName(),
                                                        isSortColumnAscending());

    m2RepoService.call(new RemoteCallback<PageResponse<JarListPageRow>>() {
        @Override
        public void callback(final PageResponse<JarListPageRow> response) {
            updateRowCount(response.getTotalRowSize(),
                           response.isTotalRowSizeExact());
            updateRowData(response.getStartRowIndex(),
                          response.getPageRowList());
        }
    }).listArtifacts(request);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:21,代码来源:ArtifactListPresenterImpl.java

示例15: createSimpleWidgetWithLink

import org.jboss.errai.common.client.api.RemoteCallback; //导入依赖的package包/类
private void createSimpleWidgetWithLink(final SocialActivitiesEvent event) {

        final SimpleItemWidgetModel itemModel = new SimpleItemWidgetModel(model,
                                                                          event.getType(),
                                                                          event.getTimestamp(),
                                                                          event.getLinkLabel(),
                                                                          event.getLinkTarget(),
                                                                          event.getLinkType(),
                                                                          SocialBundleHelper.getItemDescription(event.getAdicionalInfos()),
                                                                          event.getSocialUser())
                .withLinkCommand(model.getLinkCommand())
                .withLinkParams(event.getLinkParams());

        if (event.isVFSLink()) {
            MessageBuilder.createCall(new RemoteCallback<Path>() {
                                          public void callback(Path path) {
                                              itemModel.withLinkPath(path);
                                              addItemWidget(itemModel);
                                          }
                                      },
                                      VFSService.class).get(event.getLinkTarget());
        } else {
            addItemWidget(itemModel);
        }
    }
 
开发者ID:kiegroup,项目名称:appformer,代码行数:26,代码来源:SimpleSocialTimelineWidget.java


注:本文中的org.jboss.errai.common.client.api.RemoteCallback类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。