List of usage examples for java.lang ExceptionInInitializerError ExceptionInInitializerError
public ExceptionInInitializerError(String s)
From source file:org.asynchttpclient.test.TestUtils.java
public static SslEngineFactory createSslEngineFactory(AtomicBoolean trust) throws SSLException { try {// w w w . j av a2 s . co m KeyManager[] keyManagers = createKeyManagers(); TrustManager[] trustManagers = new TrustManager[] { dummyTrustManager(trust, (X509TrustManager) createTrustManagers()[0]) }; SecureRandom secureRandom = new SecureRandom(); SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(keyManagers, trustManagers, secureRandom); return new JsseSslEngineFactory(sslContext); } catch (Exception e) { throw new ExceptionInInitializerError(e); } }
From source file:org.lsc.configuration.PropertiesConfigurationHelper.java
private static void checkTaskOldProperty(Properties props, String taskName, String propertyName, String message) {//from w w w. j a v a 2 s .c o m if (props.getProperty( PropertiesConfigurationHelper.TASKS_PROPS_PREFIX + "." + taskName + "." + propertyName) != null) { String errorMessage = "Deprecated value specified in task " + taskName + " for " + propertyName + "! Please read upgrade notes ! (" + message + ")"; LOGGER.error(errorMessage); throw new ExceptionInInitializerError(errorMessage); } }
From source file:org.lsc.configuration.PropertiesConfigurationHelper.java
private static String getTaskPropertyAndCheckNotNull(String taskName, Properties props, String propertyName) { String value = props.getProperty( PropertiesConfigurationHelper.TASKS_PROPS_PREFIX + "." + taskName + "." + propertyName); if (value == null) { String errorMessage = "No value specified in task " + taskName + " for " + propertyName + "! Aborting."; LOGGER.error(errorMessage);/*from ww w. j a v a2 s . c o m*/ throw new ExceptionInInitializerError(errorMessage); } return value; }
From source file:Evaluation.EvaluationAPI.java
/** * Setup the session factory with hibernate native api * * @throws Exception//from w ww .j a v a 2s . co m */ protected void setUpBackend() throws Exception { try { Configuration configuration = new Configuration(); configuration.configure("hibernate.evaluation.cfg.xml"); configuration.addAnnotatedClass(EvaluationRunBean.class); configuration.addAnnotatedClass(EvaluationRecordBean.class); serviceRegistry = new StandardServiceRegistryBuilder().applySettings(configuration.getProperties()) .build(); sessionFactory = configuration.buildSessionFactory(serviceRegistry); } catch (HibernateException he) { System.err.println("Error creating Session: " + he); throw new ExceptionInInitializerError(he); } }
From source file:org.webical.plugin.registration.PluginSystemInitializer.java
/** * Checks the variables (hopefully) set by spring * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() *//*w ww.j a va2 s . c o m*/ public void afterPropertiesSet() throws Exception { if (pluginRegistrationStore == null) { throw new ExceptionInInitializerError("No pluginRegistrationStore available"); } if (pluginManifestReader == null) { throw new ExceptionInInitializerError("No plugin mainfest reader set by spring"); } if (StringUtils.isEmpty(webicalVersion)) { throw new ExceptionInInitializerError("Webical version is required here"); } else { log.info("Webical version: " + webicalVersion); } }
From source file:com.opentable.db.postgres.embedded.EmbeddedPostgres.java
private static File prepareBinaries(PgBinaryResolver pgBinaryResolver) { PREPARE_BINARIES_LOCK.lock();/*from ww w. j a v a 2 s . c o m*/ try { if (BINARY_DIR.get() != null) { return BINARY_DIR.get(); } final String system = getOS(); final String machineHardware = getArchitecture(); LOG.info("Detected a {} {} system", system, machineHardware); File pgDir; File pgTbz; final InputStream pgBinary; try { pgTbz = File.createTempFile("pgpg", "pgpg"); pgBinary = pgBinaryResolver.getPgBinary(system, machineHardware); } catch (final IOException e) { throw new ExceptionInInitializerError(e); } if (pgBinary == null) { throw new IllegalStateException("No Postgres binary found for " + system + " / " + machineHardware); } try (final DigestInputStream pgArchiveData = new DigestInputStream(pgBinary, MessageDigest.getInstance("MD5")); final FileOutputStream os = new FileOutputStream(pgTbz)) { IOUtils.copy(pgArchiveData, os); pgArchiveData.close(); os.close(); String pgDigest = Hex.encodeHexString(pgArchiveData.getMessageDigest().digest()); pgDir = new File(TMP_DIR, String.format("PG-%s", pgDigest)); mkdirs(pgDir); final File unpackLockFile = new File(pgDir, LOCK_FILE_NAME); final File pgDirExists = new File(pgDir, ".exists"); if (!pgDirExists.exists()) { try (final FileOutputStream lockStream = new FileOutputStream(unpackLockFile); final FileLock unpackLock = lockStream.getChannel().tryLock()) { if (unpackLock != null) { try { Preconditions.checkState(!pgDirExists.exists(), "unpack lock acquired but .exists file is present."); LOG.info("Extracting Postgres..."); extractTxz(pgTbz.getPath(), pgDir.getPath()); Verify.verify(pgDirExists.createNewFile(), "couldn't make .exists file"); } catch (Exception e) { LOG.error("while unpacking Postgres", e); } } else { // the other guy is unpacking for us. int maxAttempts = 60; while (!pgDirExists.exists() && --maxAttempts > 0) { Thread.sleep(1000L); } Verify.verify(pgDirExists.exists(), "Waited 60 seconds for postgres to be unpacked but it never finished!"); } } finally { if (unpackLockFile.exists()) { Verify.verify(unpackLockFile.delete(), "could not remove lock file %s", unpackLockFile.getAbsolutePath()); } } } } catch (final IOException | NoSuchAlgorithmException e) { throw new ExceptionInInitializerError(e); } catch (final InterruptedException ie) { Thread.currentThread().interrupt(); throw new ExceptionInInitializerError(ie); } finally { Verify.verify(pgTbz.delete(), "could not delete %s", pgTbz); } BINARY_DIR.set(pgDir); LOG.info("Postgres binaries at {}", pgDir); return pgDir; } finally { PREPARE_BINARIES_LOCK.unlock(); } }
From source file:org.nuclos.client.main.MainController.java
void init() throws CommonPermissionException, BackingStoreException { debugFrame = new SwingDebugFrame(this); try {/*from w w w .j ava2s.c om*/ // force to load real permission (tp) SecurityCache.getInstance().revalidate(); cmdExecuteRport = createEntityAction(NuclosEntity.REPORTEXECUTION); /** @todo this is a workaround - because Main.getMainController() is called to get the user name */ Main.getInstance().setMainController(this); LOG.debug(">>> read user rights..."); loginController.increaseLoginProgressBar(StartUp.PROGRESS_INIT_SECURITYCACHE); if (!getSecurityCache().isActionAllowed(Actions.ACTION_SYSTEMSTART)) { throw new CommonPermissionException(getSpringLocaleDelegate().getMessage("MainController.23", "Sie haben nicht das Recht, {0} zu benutzen.", ApplicationProperties.getInstance().getName())); } loginController.increaseLoginProgressBar(StartUp.PROGRESS_READ_ATTRIBUTES); // DefaultCollectableEntityProvider.setInstance(NuclosCollectableEntityProvider.getInstance()); Thread threadGenericObjectMetaDataCache = new Thread("MainController.readMetaData") { @Override public void run() { LOG.debug(">>> read metadata..."); // GenericObjectMetaDataCache.getInstance(); SpringApplicationContextHolder.getBean(GenericObjectMetaDataCache.class); } }; loginController.increaseLoginProgressBar(StartUp.PROGRESS_READ_LOMETA); Thread threadSearchFilterCache = new Thread("MainController.readSearchFilter") { @Override public void run() { LOG.debug(">>> read searchfilter..."); // SearchFilterCache.getInstance(); SpringApplicationContextHolder.getBean(SearchFilterCache.class); } }; loginController.increaseLoginProgressBar(StartUp.PROGRESS_READ_SEARCHFILTER); Thread threadRuleCache = new Thread("MainController.readRules") { @Override public void run() { LOG.debug(">>> read rules..."); // RuleCache.getInstance(); SpringApplicationContextHolder.getBean(RuleCache.class); } }; loginController.increaseLoginProgressBar(StartUp.PROGRESS_READ_RULES); List<Thread> lstCacheThreads = new ArrayList<Thread>(); lstCacheThreads.add(threadGenericObjectMetaDataCache); lstCacheThreads.add(threadSearchFilterCache); lstCacheThreads.add(threadRuleCache); threadGenericObjectMetaDataCache.start(); threadSearchFilterCache.start(); threadRuleCache.start(); for (Thread t : lstCacheThreads) { try { t.join(); } catch (InterruptedException e) { // do noting here LOG.warn("MainController: " + e); } } // !!! init messagelisteners here. // initialzing chaches in these threads will cause an deadlock situation at realSubscribe in TopicNotificationReceiver. // genericObjectMetaDataCache.initMessageListener(); // searchFilterCache.initMessageListener(); // ruleCache.initMessageListener(); SpringApplicationContextHolder.getBean(GenericObjectMetaDataCache.class).initMessageListener(); SpringApplicationContextHolder.getBean(SearchFilterCache.class).initMessageListener(); SpringApplicationContextHolder.getBean(RuleCache.class).initMessageListener(); LOG.debug(">>> create mainframe..."); // this.frm = new MainFrame(this.getUserName(), this.getNuclosServerName()); setMainFrame(SpringApplicationContextHolder.getBean(MainFrameSpringComponent.class).getMainFrame()); final MainFrame frm = getMainFrame(); frm.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); // Attention: Do not use ListenerUtil here! (tp) frm.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent ev) { cmdWindowClosing(new ResultListener<Boolean>() { @Override public void done(Boolean result) { } }); } }); loginController.increaseLoginProgressBar(StartUp.PROGRESS_CREATE_MAINFRAME); LOG.debug(">>> init client communication..."); this.notificationdlg = new NuclosNotificationDialog(frm); getTopicNotificationReceiver().subscribe(JMSConstants.TOPICNAME_RULENOTIFICATION, messagelistener); loginController.increaseLoginProgressBar(StartUp.PROGRESS_INIT_NOTIFICATION); LOG.debug(">>> setup menus..."); this.setupMenus(); loginController.increaseLoginProgressBar(StartUp.PROGRESS_CREATE_MAINMENU); LOG.debug(">>> create explorer controller..."); this.ctlExplorer = new ExplorerController(); LOG.debug(">>> create task controller..."); this.ctlTasks = new TaskController(getUserName()); this.ctlTasks.setExplorerController(ctlExplorer); this.ctlExplorer.setTaskController(ctlTasks); initActions(); LOG.debug(">>> restore last workspace..."); try { Main.getInstance().getMainFrame().readMainFramePreferences(prefs); getRestoreUtils().restoreWorkspaceThreaded(MainFrame.getLastWorkspaceIdFromPreferences(), MainFrame.getLastWorkspaceFromPreferences(), MainFrame.getLastAlwaysOpenWorkspaceIdFromPreferences(), MainFrame.getLastAlwaysOpenWorkspaceFromPreferences()); } catch (Exception ex) { final String sMessage = getSpringLocaleDelegate().getMessage("MainController.4", "Die in der letzten Sitzung ge\u00f6ffneten Fenster konnten nicht wiederhergestellt werden."); Errors.getInstance().showExceptionDialog(null, sMessage, ex); } finally { loginController.increaseLoginProgressBar(StartUp.PROGRESS_RESTORE_WORKSPACE); } LOG.debug(">>> show mainFrame..."); frm.setVisible(true); try { LOG.debug(">>> restore last controllers (for migration only)..."); reopenAllControllers(ClientPreferences.getUserPreferences()); } catch (Exception ex) { final String sMessage = getSpringLocaleDelegate().getMessage("MainController.4", "Die in der letzten Sitzung ge\u00f6ffneten Fenster konnten nicht wiederhergestellt werden."); Errors.getInstance().showExceptionDialog(null, sMessage, ex); } LOG.debug(">>> restore task views (for migration only)..."); try { ctlTasks.restoreGenericObjectTaskViewsFromPreferences(); } catch (Exception ex) { final String sMessage = getSpringLocaleDelegate().getMessage("tasklist.error.restore", "Die Aufgabenlisten konnten nicht wiederhergestellt werden."); LOG.error(sMessage, ex); Errors.getInstance().showExceptionDialog(null, sMessage, ex); } Thread theadTaskController = new Thread("MainController.refreshTasks") { @Override public void run() { LOG.debug(">>> refresh tasks..."); ctlTasks.run(); } }; theadTaskController.start(); /* Release note HACK: Caused by: java.lang.NullPointerException at org.nuclos.client.help.releasenotes.ReleaseNotesController.showNuclosReleaseNotesNotice(ReleaseNotesController.java:148) at org.nuclos.client.help.releasenotes.ReleaseNotesController.showReleaseNotesIfNewVersion(ReleaseNotesController.java:161) at org.nuclos.client.main.MainController.showReleaseNotesIfNewVersion(MainController.java:1752) at org.nuclos.client.main.MainController.<init>(MainController.java:382) */ while (getHomePane() == null) { Thread.sleep(200); } // Show the release notes for this version, if the user hasn't seen it yet. showReleaseNotesIfNewVersion(); // Debug purposes final String sKeyWindowShow = "CtlShiftF11"; frm.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( KeyStroke.getKeyStroke(KeyEvent.VK_F11, (KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK)), sKeyWindowShow); frm.getRootPane().getActionMap().put(sKeyWindowShow, new AbstractAction() { @Override public void actionPerformed(ActionEvent ev) { debugFrame.showComponentDetails(frm.findComponentAt(frm.getMousePosition())); } }); //Call wikipage final String sKeyWikiShow = "CtlShiftF1"; frm.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( KeyStroke.getKeyStroke(KeyEvent.VK_F1, (KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK)), sKeyWikiShow); frm.getRootPane().getActionMap().put(sKeyWikiShow, new AbstractAction() { @Override public void actionPerformed(ActionEvent ev) { Component fundComponent = frm.getFocusOwner() != null ? frm.getFocusOwner() : frm.findComponentAt(frm.getMousePosition()); CollectController<?> clctctrl = getControllerForTab(UIUtils.getTabForComponent(fundComponent)); WikiController wikiCtrl = WikiController.getInstance(); wikiCtrl.openURLinBrowser(wikiCtrl.getWikiPageForComponent(fundComponent, clctctrl)); } }); } catch (Throwable e) { LOG.fatal("Creating MainController failed, this is fatal: " + e.toString(), e); throw new ExceptionInInitializerError(e); } }
From source file:org.viafirma.cliente.ViafirmaClient.java
public FirmaClienteRMI getRemoteObject() { try {/*from ww w . j ava2s . c o m*/ if (urlRMI.startsWith("rmi")) { if (log.isDebugEnabled()) log.debug("Recuperando el cliente rmi desde: " + urlRMI); return (FirmaClienteRMI) java.rmi.Naming.lookup(urlRMI); } else if (urlRMI.startsWith("http")) { if (log.isDebugEnabled()) log.debug("Recuperando el cliente WS desde: " + urlRMI); // QName qNamePort=new // QName("http://viafirma.org/client/","clientPort"); QName qNameService = new QName("http://viafirma.org/client", "ConectorFirmaRMIService"); URL wsdl = new URL(urlRMI + "?wsdl"); Service service = Service.create(wsdl, qNameService); FirmaClienteRMI clienteProxy = service.getPort(FirmaClienteRMI.class); // probando la conexin web service. // utilizamos el conector WebServices. // Service serviceModel = new // ObjectServiceFactory().create(FirmaClienteRMI.class); // serviceModel.setProperty(SoapConstants.MTOM_ENABLED, "true"); // recuperamos la interfaz webservice. // return (FirmaClienteRMI) new // XFireProxyFactory().create(serviceModel, urlRMI); return clienteProxy; } else { throw new ExceptionInInitializerError( "Protocolo no soportado para '" + Constantes.PARAM_URL_CONECTOR_FIRMA_RMI + "'= " + urlRMI); } } catch (MalformedURLException e) { throw new ExceptionInInitializerError("La url indicada en '" + Constantes.PARAM_URL_CONECTOR_FIRMA_RMI + "'= " + urlRMI + " no es correcta." + e.getMessage()); } catch (RemoteException e) { throw new ExceptionInInitializerError("Error al conectar con '" + Constantes.PARAM_URL_CONECTOR_FIRMA_RMI + "'= " + urlRMI + " ," + e.getMessage()); } catch (NotBoundException e) { throw new ExceptionInInitializerError("Error al conectar con '" + Constantes.PARAM_URL_CONECTOR_FIRMA_RMI + "'= " + urlRMI + " ," + e.getMessage()); } }
From source file:org.nuclos.client.main.MainController.java
private void initActions() { try {//from w w w . j av a2s. c om dha = new DirectHelpActionListener(); // init Actions cmdDirectHelp = new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { dha.actionPerformed(e); } }; cmdShowTimelimitTasks = new AbstractAction( getSpringLocaleDelegate().getMessage("miShowTimelimitTasks", "Fristen anzeigen"), Icons.getInstance().getIconTabTimtlimit()) { @Override public void actionPerformed(ActionEvent e) { MainController.this.getTaskController().getTimelimitTaskController().cmdShowTimelimitTasks(); } @Override public boolean isEnabled() { return getSecurityCache().isActionAllowed(Actions.ACTION_TIMELIMIT_LIST); } }; cmdShowPersonalTasks = new AbstractAction( getSpringLocaleDelegate().getMessage("miShowPersonalTasks", "Meine Aufgaben anzeigen"), Icons.getInstance().getIconTabTask()) { @Override public void actionPerformed(ActionEvent e) { MainController.this.getTaskController().getPersonalTaskController().cmdShowPersonalTasks(); } @Override public boolean isEnabled() { return getSecurityCache().isActionAllowed(Actions.ACTION_TASKLIST); } }; cmdShowPersonalSearchFilters = new AbstractAction( getSpringLocaleDelegate().getMessage("ExplorerPanel.3", "Meine Suchfilter anzeigen"), Icons.getInstance().getIconFilter16()) { @Override public void actionPerformed(ActionEvent e) { MainController.this.getExplorerController().cmdShowPersonalSearchFilters(); } }; cmdChangePassword = new AbstractAction() { private Boolean enabled; @Override public void actionPerformed(ActionEvent evt) { ChangePasswordPanel cpp = new ChangePasswordPanel(true, "", false); boolean result = cpp.showInDialog(getFrame(), new ChangePasswordPanel.ChangePasswordDelegate() { @Override public void changePassword(String oldPw, String newPw) throws CommonBusinessException { RemoteAuthenticationManager ram = SpringApplicationContextHolder .getBean(RemoteAuthenticationManager.class); ram.changePassword(sUserName, oldPw, newPw); getNuclosRemoteServerSession().relogin(sUserName, newPw); try { MainController.this.prefs.flush(); } catch (BackingStoreException e) { LOG.fatal("actionPerformed failed: " + e, e); } LocalUserProperties props = LocalUserProperties.getInstance(); props.setUserPasswd(""); props.store(); } }); } @Override public synchronized boolean isEnabled() { if (enabled == null) { enabled = !SecurityDelegate.getInstance().isLdapAuthenticationActive() || SecurityDelegate.getInstance().isSuperUser(); } return LangUtils.defaultIfNull(enabled, Boolean.FALSE); } }; cmdOpenManagementConsole = new AbstractAction( getSpringLocaleDelegate().getMessage("miManagementConsole", "Management Console"), MainFrame.resizeAndCacheTabIcon(NuclosResourceCache.getNuclosResourceIcon( "org.nuclos.client.resource.icon.glyphish-blue.158-wrench-2.png"))) { @Override public void actionPerformed(ActionEvent evt) { UIUtils.runCommand(getMainFrame(), new Runnable() { @Override public void run() { try { NuclosConsoleGui.showInFrame(getMainFrame().getHomePane().getComponentPanel()); } catch (Exception e) { LOG.error("showInFrame failed: " + e, e); } } }); } }; cmdOpenEntityWizard = new AbstractAction( getSpringLocaleDelegate().getMessage("miEntityWizard", "Entity Wizard"), MainFrame.resizeAndCacheTabIcon(NuclosResourceCache.getNuclosResourceIcon( "org.nuclos.client.resource.icon.glyphish-blue.81-dashboard.png"))) { @Override public void actionPerformed(ActionEvent evt) { final MainFrameTabbedPane desktopPane = MainController.this.getHomePane(); UIUtils.runCommand(getMainFrame(), new ShowNuclosWizard.NuclosWizardRoRunnable(desktopPane)); } }; cmdOpenEventSupportManagement = new AbstractAction( getSpringLocaleDelegate().getMessage("miEventSupportManagement", "Regelmanagement"), MainFrame.resizeAndCacheTabIcon(NuclosResourceCache.getNuclosResourceIcon( "org.nuclos.client.resource.icon.glyphish-blue.34-coffee.png"))) { @Override public void actionPerformed(ActionEvent evt) { final MainFrameTabbedPane desktopPane = MainController.this.getHomePane(); UIUtils.runCommand(getMainFrame(), new EventSupportManagementController.NuclosESMRunnable(desktopPane)); } }; cmdOpenCustomComponentWizard = new AbstractAction( getSpringLocaleDelegate().getMessage("miResPlanWizard", "Ressourcenplanung"), MainFrame.resizeAndCacheTabIcon(NuclosResourceCache.getNuclosResourceIcon( "org.nuclos.client.resource.icon.glyphish-blue.83-calendar.png"))) { @Override public void actionPerformed(final ActionEvent evt) { UIUtils.runCommand(getMainFrame(), new Runnable() { @Override public void run() { try { CustomComponentWizard.run(); } catch (Exception e) { LOG.error("CustomComponentWizard failed: " + e, e); } } }); } }; cmdOpenRelationEditor = new AbstractAction( getSpringLocaleDelegate().getMessage("miRelationEditor", "Relationeneditor"), MainFrame.resizeAndCacheTabIcon(NuclosResourceCache.getNuclosResourceIcon( "org.nuclos.client.resource.icon.glyphish-blue.55-network.png"))) { @Override public void actionPerformed(final ActionEvent evt) { UIUtils.runCommand(getMainFrame(), new Runnable() { @Override public void run() { try { final CollectControllerFactorySingleton factory = CollectControllerFactorySingleton .getInstance(); Collection<MasterDataVO> colRelation = MasterDataDelegate.getInstance() .getMasterData(NuclosEntity.ENTITYRELATION.getEntityName()); EntityRelationShipCollectController result = factory .newEntityRelationShipCollectController(MainController.this.getFrame(), null); if (colRelation.size() > 0) { MasterDataVO vo = colRelation.iterator().next(); result.runViewSingleCollectableWithId(vo.getId()); } else { result.runNew(); } } catch (/* CommonBusiness */ Exception e1) { LOG.error("actionPerformed " + evt + ": " + e1); } } }); } }; cmdOpenRelationEditor = new AbstractAction( getSpringLocaleDelegate().getMessage("miRelationEditor", "Relationeneditor"), MainFrame.resizeAndCacheTabIcon(NuclosResourceCache.getNuclosResourceIcon( "org.nuclos.client.resource.icon.glyphish-blue.55-network.png"))) { @Override public void actionPerformed(final ActionEvent evt) { UIUtils.runCommand(getMainFrame(), new Runnable() { @Override public void run() { try { final CollectControllerFactorySingleton factory = CollectControllerFactorySingleton .getInstance(); Collection<MasterDataVO> colRelation = MasterDataDelegate.getInstance() .getMasterData(NuclosEntity.ENTITYRELATION.getEntityName()); EntityRelationShipCollectController result = factory .newEntityRelationShipCollectController(MainController.this.getFrame(), null); if (colRelation.size() > 0) { MasterDataVO vo = colRelation.iterator().next(); result.runViewSingleCollectableWithId(vo.getId()); } else { result.runNew(); } } catch (/* CommonBusiness */ Exception e1) { LOG.error("actionPerformed " + evt + ": " + e1); } } }); } }; cmdOpenSettings = new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { cmdOpenSettings(); } }; cmdRefreshClientCaches = new AbstractAction() { @Override public void actionPerformed(ActionEvent evt) { UIUtils.runCommandLater(getFrame(), new CommonRunnable() { @Override public void run() throws CommonBusinessException { invalidateAllClientCaches(); JOptionPane.showMessageDialog(getFrame(), getSpringLocaleDelegate().getMessage( "MainController.3", "Die folgenden Aktionen wurden erfolgreich durchgef\u00fchrt:\n" + "Caches aktualisiert: MasterDataCache, SecurityCache, AttributeCache, GenericObjectLayoutCache, GeneratorCache, MetaDataCache, ResourceCache, SearchFilterCache.\n" + "Men\u00fcs aktualisiert.")); } }); } }; cmdSelectAll = new AbstractAction() { @Override public void actionPerformed(ActionEvent evt) { // select all rows in the Result panel of the current CollectController (if any): final MainFrameTab ifrm = (MainFrameTab) MainController.this.frm.getHomePane() .getSelectedComponent(); if (ifrm != null) { final CollectController<?> ctl = getControllerForTab(ifrm); if (ctl != null && ctl.getCollectState().getOuterState() == CollectStateModel.OUTERSTATE_RESULT) { ctl.getResultTable().selectAll(); } else if (ctl != null && ((ctl.getCollectState().getOuterState() == CollectStateModel.OUTERSTATE_DETAILS) || ctl.getCollectState() .getOuterState() == CollectStateModel.OUTERSTATE_SEARCH)) { Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager() .getPermanentFocusOwner(); if (focusOwner instanceof JTextComponent) { ((JTextComponent) focusOwner).selectAll(); } } } } }; cmdHelpContents = new AbstractAction() { @Override public void actionPerformed(ActionEvent evt) { WikiController.getInstance().openURLinBrowser(ClientParameterProvider.getInstance() .getValue(ClientParameterProvider.KEY_WIKI_STARTPAGE)); } }; cmdShowAboutDialog = new AbstractAction() { @Override public void actionPerformed(ActionEvent evt) { cmdShowAboutDialog(); } }; cmdShowProjectReleaseNotes = new AbstractAction() { @Override public void actionPerformed(ActionEvent evt) { new ReleaseNotesController().showReleaseNotes(ApplicationProperties.getInstance().getName()); } }; cmdShowNuclosReleaseNotes = new AbstractAction() { @Override public void actionPerformed(ActionEvent evt) { ReleaseNotesController.openReleaseNotesInBrowser(); } }; cmdWindowClosing = new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { cmdWindowClosing(new ResultListener<Boolean>() { @Override public void done(Boolean result) { } }); } }; cmdLogoutExit = new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { cmdLogoutExit(); } }; cmdExecuteRport = createEntityAction(NuclosEntity.REPORTEXECUTION); } catch (Throwable e) { LOG.fatal("Creating MainController failed, this is fatal: " + e.toString(), e); throw new ExceptionInInitializerError(e); } }