本文整理汇总了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();
}
示例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);
}
};
}
示例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();
}
};
}
示例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);
}
示例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));
}
}
示例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);
}
示例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);
}
};
}
示例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());
}
示例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);
}
示例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));
}
});
}
}
}
示例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);
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
}