/** open a state or category ! */ public void openState(String title, String widgetID) { if (!explorerViewCenterPanel.showIfOpen(widgetID)) { final String stateName = widgetID.substring(widgetID.indexOf("-") + 1); final StatePagedTable table = new StatePagedTable(stateName, createEditEvent()); final ServerPushNotification push = new ServerPushNotification() { public void messageReceived(PushResponse response) { if (response.messageType.equals("statusChange") && (response.message).equals(stateName)) { table.refresh(); } } }; PushClient.instance().subscribe(push); table.addUnloadListener( new Command() { public void execute() { PushClient.instance().unsubscribe(push); } }); explorerViewCenterPanel.addTab(constants.Status() + title, table, widgetID); } }
/** open a category */ public void openCategory(String title, String widgetID) { if (!explorerViewCenterPanel.showIfOpen(widgetID)) { final String categoryPath = widgetID.substring(widgetID.indexOf("-") + 1); final CategoryPagedTable table = new CategoryPagedTable( categoryPath, createEditEvent(), GWT.getModuleBaseURL() + "feed/category?name=" + categoryPath + "&viewUrl=" + Util.getSelfURL()); final ServerPushNotification push = new ServerPushNotification() { public void messageReceived(PushResponse response) { if (response.messageType.equals("categoryChange") && response.message.equals(categoryPath)) { table.refresh(); } } }; PushClient.instance().subscribe(push); table.addUnloadListener( new Command() { public void execute() { PushClient.instance().unsubscribe(push); } }); explorerViewCenterPanel.addTab((constants.CategoryColon()) + title, table, widgetID); } }
public void openVerifierView(String packageUuid, String packageName) { if (!explorerViewCenterPanel.showIfOpen("analysis" + packageUuid)) { // NON-NLS String m = constants.AnalysisForPackage(packageName); explorerViewCenterPanel.addTab( m, new AnalysisView(packageUuid, packageName, createEditEvent()), "analysis" + packageUuid); } }
private void openPerspectivesManager() { if (!explorerViewCenterPanel.showIfOpen(PERSPECTIVES_MANAGER)) { PerspectivesManagerView perspectivesManagerView = new PerspectivesManagerViewImpl(); new PerspectivesManager( GWT.<ConfigurationServiceAsync>create(ConfigurationService.class), perspectivesManagerView); explorerViewCenterPanel.addTab( constants.PerspectivesConfiguration(), perspectivesManagerView, PERSPECTIVES_MANAGER); } }
public void openTestScenario(String packageUuid, String packageName) { if (!explorerViewCenterPanel.showIfOpen("scenarios" + packageUuid)) { String m = constants.ScenariosForPackage(packageName); explorerViewCenterPanel.addTab( m, new ScenarioPackageView( packageUuid, packageName, createEditEvent(), explorerViewCenterPanel), "scenarios" + packageUuid); } }
public void openSnapshotAssetList( final String name, final String uuid, final String[] assetTypes, String key) { if (!explorerViewCenterPanel.showIfOpen(key)) { AssetPagedTable table = new AssetPagedTable(uuid, Arrays.asList(assetTypes), null, createEditEvent()); VerticalPanel vp = new VerticalPanel(); vp.add(new HTML("<i><small>" + constants.SnapshotListingFor() + name + "</small></i>")); vp.add(table); explorerViewCenterPanel.addTab(constants.SnapshotItems(), vp, key); } }
/** Show the inbox of the given name. */ public void openInbox(String title, final String inboxName) { if (!explorerViewCenterPanel.showIfOpen(inboxName)) { InboxPagedTable table; if (inboxName.equals(ExplorerNodeConfig.INCOMING_ID)) { table = new InboxIncomingPagedTable(inboxName, createEditEvent()); } else { table = new InboxPagedTable(inboxName, createEditEvent()); } explorerViewCenterPanel.addTab(title, table, inboxName); } }
public void openFind() { if (!explorerViewCenterPanel.showIfOpen("FIND")) { // NON-NLS explorerViewCenterPanel.addTab( constants.Find(), new QueryWidget( new OpenItemCommand() { public void open(String uuid) { openAsset(uuid); } public void open(MultiViewRow[] rows) { openAssetsToMultiView(rows); } }), "FIND"); // NON-NLS } }
public void openPackageViewAssets( final String packageUuid, final String packageName, String key, final List<String> formatInList, Boolean formatIsRegistered, final String itemName) { if (!explorerViewCenterPanel.showIfOpen(key)) { String feedUrl = GWT.getModuleBaseURL() + "feed/package?name=" + packageName + "&viewUrl=" + Util.getSelfURL() + "&status=*"; final AssetPagedTable table = new AssetPagedTable( packageUuid, formatInList, formatIsRegistered, createEditEvent(), feedUrl); explorerViewCenterPanel.addTab(itemName + " [" + packageName + "]", table, key); final ServerPushNotification sub = new ServerPushNotification() { public void messageReceived(PushResponse response) { if (response.messageType.equals("packageChange") && response.message.equals(packageName)) { table.refresh(); } } }; PushClient.instance().subscribe(sub); table.addUnloadListener( new Command() { public void execute() { PushClient.instance().unsubscribe(sub); } }); } }
public void openAssetsToMultiView(MultiViewRow[] rows) { String blockingAssetName = null; final String[] uuids = new String[rows.length]; final String[] names = new String[rows.length]; for (int i = 0; i < rows.length; i++) { // Check if any of these assets are already opened. if (explorerViewCenterPanel.showIfOpen(rows[i].uuid)) { blockingAssetName = rows[i].name; break; } uuids[i] = rows[i].uuid; names[i] = rows[i].name; } if (blockingAssetName != null) { FormStylePopup popup = new FormStylePopup( images.information(), constants.Asset0IsAlreadyOpenPleaseCloseItBeforeOpeningMultiview(blockingAssetName)); popup.show(); return; } MultiViewEditor multiview = new MultiViewEditor(rows, createEditEvent()); multiview.setCloseCommand( new Command() { public void execute() { explorerViewCenterPanel.close(Arrays.toString(uuids)); } }); explorerViewCenterPanel.addTab(Arrays.toString(names), multiview, uuids); }
public void openAdministrationSelection(int id) { switch (id) { case 0: if (!explorerViewCenterPanel.showIfOpen(CATMAN)) { explorerViewCenterPanel.addTab( constants.CategoryManager(), new CategoryManager(), CATMAN); } break; case 1: if (!explorerViewCenterPanel.showIfOpen(ARCHMAN)) { explorerViewCenterPanel.addTab( constants.ArchivedManager(), new ArchivedAssetManager(), ARCHMAN); } break; case 2: if (!explorerViewCenterPanel.showIfOpen(STATEMAN)) { explorerViewCenterPanel.addTab(constants.StateManager(), new StateManager(), STATEMAN); } break; case 3: if (!explorerViewCenterPanel.showIfOpen(BAKMAN)) { explorerViewCenterPanel.addTab(constants.ImportExport(), new BackupManager(), BAKMAN); } break; case 4: if (!explorerViewCenterPanel.showIfOpen(ERROR_LOG)) { explorerViewCenterPanel.addTab(constants.EventLog(), new LogViewer(), ERROR_LOG); } break; case 5: if (!explorerViewCenterPanel.showIfOpen(SECURITY_PERMISSIONS)) { explorerViewCenterPanel.addTab( constants.UserPermissionMappings(), new PermissionViewer(), SECURITY_PERMISSIONS); } break; case 6: Frame aboutInfoFrame = new Frame("../AboutInfo.html"); // NON-NLS FormStylePopup aboutPop = new FormStylePopup(); aboutPop.setWidth(600 + "px"); aboutPop.setTitle(constants.About()); String hhurl = GWT.getModuleBaseURL() + "webdav"; aboutPop.addAttribute(constants.WebDAVURL() + ":", new SmallLabel("<b>" + hhurl + "</b>")); aboutPop.addAttribute(constants.Version() + ":", aboutInfoFrame); aboutPop.show(); break; case 7: if (!explorerViewCenterPanel.showIfOpen(RULE_VERIFIER_MANAGER)) { explorerViewCenterPanel.addTab( constants.RulesVerificationManager(), new RuleVerifierManager(), RULE_VERIFIER_MANAGER); } break; case 8: if (!explorerViewCenterPanel.showIfOpen(REPOCONFIG)) explorerViewCenterPanel.addTab( constants.RepositoryConfig(), new RepoConfigManager(), REPOCONFIG); break; case 9: if (!explorerViewCenterPanel.showIfOpen(WORKSPACES)) explorerViewCenterPanel.addTab( constants.Workspaces(), new WorkspaceManager(), WORKSPACES); break; case 10: openPerspectivesManager(); break; } }