本文整理汇总了Java中org.uberfire.lifecycle.OnStartup类的典型用法代码示例。如果您正苦于以下问题:Java OnStartup类的具体用法?Java OnStartup怎么用?Java OnStartup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OnStartup类属于org.uberfire.lifecycle包,在下文中一共展示了OnStartup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup( final PlaceRequest place ) {
// Init validators
doInitValidators();
String fromScreen = place.getParameter(Constants.FROM_SCREEN,Constants.UNKNOWN);
if(fromScreen!=null && fromScreen.equals(Constants.MANAGE_SOURCES_SCREEN)) {
restoreServiceState();
updateStatus();
} else {
serviceNameTextBox.setText(Constants.BLANK);
viewEditorPanel.setServiceName(Constants.BLANK);
updateStatus();
}
}
示例2: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup( final PlaceRequest place ) {
// Process delete and clone requests from serviceWidget
String deleteName = place.getParameter(Constants.DELETE_SERVICE_KEY, "NONE");
String cloneName = place.getParameter(Constants.CLONE_SERVICE_KEY, "NONE");
if(!deleteName.equals("NONE")) {
// Display the Confirmation Dialog for deleting a Service
deleteServiceName = deleteName;
Map<String,String> parameters = new HashMap<String,String>();
parameters.put(Constants.CONFIRMATION_DIALOG_MESSAGE, i18n.format("dslibrary.confirm-delete-dialog-message",deleteServiceName));
parameters.put(Constants.CONFIRMATION_DIALOG_TYPE, Constants.CONFIRMATION_DIALOG_DELETE_SERVICE);
placeManager.goTo(new DefaultPlaceRequest(Constants.CONFIRMATION_DIALOG,parameters));
//placeManager.goTo(new DefaultPlaceRequest("MyTestPopUp"));
} else if(!cloneName.equals("NONE")) {
doCloneService(cloneName);
} else {
doGetServices();
}
cleanupTestVdbs();
}
示例3: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup( final PlaceRequest place ) {
// Init validators
doInitValidators();
String fromScreen = place.getParameter(Constants.FROM_SCREEN,Constants.UNKNOWN);
if(fromScreen!=null && fromScreen.equals(Constants.MANAGE_SOURCES_SCREEN)) {
restoreServiceState();
updateStatus();
} else {
String serviceName = place.getParameter(Constants.SERVICE_NAME_KEY, Constants.UNKNOWN);
serviceNameTextBox.setText(serviceName);
serviceOriginalName = serviceName;
viewEditorPanel.setServiceName(serviceName);
// Get details for this service
doGetDataServiceDetails(serviceName);
}
}
示例4: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup(final Path path,
final PlaceRequest placeRequest) {
vfsServices.call(new RemoteCallback<String>() {
@Override
public void callback(String response) {
if (response == null) {
view.setContent(CoreConstants.INSTANCE.EmptyEntry(),
getAceEditorMode());
} else {
view.setContent(response,
getAceEditorMode());
}
changeTitleWidgetEvent.fire(
new ChangeTitleWidgetEvent(
placeRequest,
CoreConstants.INSTANCE.TextEditor() + " [" + path.getFileName() + "]"));
}
}).readAllString(path);
}
示例5: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup(final ObservablePath path) {
this.path = path;
vfsServices.call(new RemoteCallback<String>() {
@Override
public void callback(String response) {
if (response == null) {
view.setContent(CoreConstants.INSTANCE.EmptyEntry(),
getAceEditorMode());
} else {
view.setContent(response,
getAceEditorMode());
}
onAfterViewLoaded();
}
}).readAllString(path);
}
示例6: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup(final ObservablePath path) {
this.path = path;
vfsServices.call(new RemoteCallback<String>() {
@Override
public void callback(String response) {
if (response == null) {
view.setContent(CoreConstants.INSTANCE.EmptyEntry(),
AceEditorMode.TEXT);
} else {
view.setContent(response,
AceEditorMode.TEXT);
}
}
}).readAllString(path);
}
示例7: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup(final PlaceRequest placeRequest) {
final String activeTab = placeRequest.getParameter(ACTIVE_TAB,
ROLES_TAB);
userSystemManager.waitForInitialization(() -> {
if (userSystemManager.isActive()) {
groupsExplorer.show();
usersExplorer.show();
view.groupsEnabled(true);
view.usersEnabled(true);
if (activeTab.equals(USERS_TAB)) {
view.rolesActive(false);
view.groupsActive(false);
view.usersActive(true);
} else if (activeTab.equals(GROUPS_TAB)) {
view.rolesActive(false);
view.groupsActive(true);
view.usersActive(false);
}
}
});
}
示例8: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup(final PlaceRequest placeRequest) {
screen = placeRequest.getParameter("screen",
adminPage.getDefaultScreen());
perspectiveIdentifierToGoBackTo = placeRequest.getParameter("perspectiveIdentifierToGoBackTo",
null);
view.init(this);
if (screen == null) {
notification.fire(new NotificationEvent(view.getNoScreenParameterError(),
NotificationEvent.NotificationType.ERROR));
} else {
init(screen);
}
}
示例9: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup(final ObservablePath path,
final PlaceRequest place) {
init(path,
place,
getResourceType(),
true,
false,
SAVE,
COPY,
RENAME,
DELETE);
// This is only used to define the "name" used by @WorkbenchPartTitle which is called by Uberfire after @OnStartup
// but before the async call in "loadContent()" has returned. When the *real* plugin is loaded this is overwritten
this.plugin = new Plugin(place.getParameter("name",
""),
getPluginType(),
path);
this.place = place;
}
示例10: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup(final ObservablePath path,
final PlaceRequest place) {
init(path,
place,
resourceType,
true,
false,
SAVE,
COPY,
RENAME,
DELETE);
// This is only used to define the "name" used by @WorkbenchPartTitle which is called by Uberfire after @OnStartup
// but before the async call in "loadContent()" has returned. When the *real* plugin is loaded this is overwritten
this.plugin = new Plugin(place.getParameter("name",
""),
PluginType.DYNAMIC_MENU,
path);
}
示例11: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup() {
view.reset();
view.showBusyIndicator(OrganizationalUnitManagerConstants.INSTANCE.Wait());
view.setAddOrganizationalUnitEnabled(controller.canCreateOrgUnits());
view.setEditOrganizationalUnitEnabled(false);
view.setDeleteOrganizationalUnitEnabled(false);
repositoryService.call(new RemoteCallback<Collection<Repository>>() {
@Override
public void callback(final Collection<Repository> repositories) {
OrganizationalUnitManagerPresenterImpl.this.allRepositories = repositories;
loadOrganizationalUnits();
}
},
new HasBusyIndicatorDefaultErrorCallback(view)).getRepositories();
}
示例12: reset
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void reset() {
view.reset();
guvnorStructureContext.getRepositories(new Callback<Collection<Repository>>() {
@Override
public void callback(final Collection<Repository> response) {
for (final Repository root : response) {
if (repositories.containsKey(root.getAlias())) {
view.removeRepository(root);
}
view.addNewRepository(root,
guvnorStructureContext.getCurrentBranch(root.getAlias()));
repositories.put(root.getAlias(),
root);
}
}
});
}
示例13: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup(final PlaceRequest place) {
this.place = place;
this.alias = place.getParameters().get("alias");
repositoryService.call(new RemoteCallback<RepositoryInfo>() {
@Override
public void callback(final RepositoryInfo repo) {
root = repo.getRoot();
view.setRepositoryInfo(repo.getAlias(),
repo.getOwner(),
!repositoryController.canUpdateRepository(repo.getId()),
repo.getPublicURIs(),
CoreConstants.INSTANCE.Empty(),
repo.getInitialVersionList());
}
}).getRepositoryInfo(alias);
}
示例14: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup(final ObservablePath path,
final PlaceRequest place) {
loading = true;
loadTypesInfo = !dataModelerWBContext.isTypesInfoLoaded();
context = new DataModelerContext(editorId);
setSourceEditionGrant();
init(path,
place,
resourceType);
currentMessageType = "DataModeler" + path.toURI();
cleanSystemMessages(getCurrentMessageType());
javaSourceEditor.addChangeHandler(new EditJavaSourceWidget.TextChangeHandler() {
@Override
public void onTextChange() {
if (context != null) {
context.setEditionStatus(DataModelerContext.EditionStatus.SOURCE_CHANGED);
}
}
});
}
示例15: onStartup
import org.uberfire.lifecycle.OnStartup; //导入依赖的package包/类
@OnStartup
public void onStartup( final ObservablePath path,
final PlaceRequest place ) {
super.onStartup( path,
place );
if ( typeText.accept( path ) ) {
mode = AceEditorMode.TEXT;
} else if ( typeXML.accept( path ) ) {
mode = AceEditorMode.XML;
} else if ( typeWhiteList.accept( path ) ) {
mode = AceEditorMode.TEXT;
} else {
mode = AceEditorMode.TEXT;
}
// set xml mode for business processes
if(path.getFileName().endsWith(".bpmn") || path.getFileName().endsWith(".bpmn2")) {
mode = AceEditorMode.XML;
}
}