@Override protected String getConfiguredTooltipText() { return TEXTS.get("SaveCheckedFormsAndShutdown"); } }
/** * @see IBrowserField#getExternalWindowFieldText() */ @Order(230) @ConfigProperty(ConfigProperty.STRING) protected String getConfiguredExternalWindowFieldText() { return TEXTS.get("ExternalWindowFieldText"); }
@Override @ConfigProperty(ConfigProperty.TEXT) @Order(10) protected String getConfiguredText() { return TEXTS.get("BookmarksMainMenu"); }
@ConfigProperty(ConfigProperty.TEXT) @Order(30) protected String getConfiguredCancelVerificationText() { return TEXTS.get("FormSaveChangesQuestion"); }
@ConfigProperty(ConfigProperty.TEXT) @Order(10) protected String getConfiguredGlobalBookmarkLabel() { return TEXTS.get("GlobalBookmarks"); }
@ConfigProperty(ConfigProperty.TEXT) @Order(20) protected String getConfiguredPrivateBookmarkLabel() { return TEXTS.get("PrivateBookmarks"); }
/** * Creates a message box with yes, no and cancel buttons. */ public static IMessageBox createYesNoCancel() { return createYesNo().withCancelButtonText(TEXTS.get("CancelButton")); }
/** * @see IBrowserField#getExternalWindowButtonText() */ @Order(230) @ConfigProperty(ConfigProperty.STRING) protected String getConfiguredExternalWindowButtonText() { return TEXTS.get("ExternalWindowButtonText"); }
protected String newConfigName() { int profileNr = 1; String baseName = TEXTS.get("New") + " "; while (getColumnSet().getColumnByClass(ConfigNameColumn.class).getValues().contains(baseName + profileNr)) { ++profileNr; } return baseName + profileNr; }
protected void handleAwaitModelJobsTimedOutError(final IClientSession clientSession, final Class<? extends ExceptionHandler> exceptionHandler, TimedOutError e) { LOG.warn("Timeout while waiting for model jobs to finish, cancelling running and scheduled model jobs."); cancelModelJobs(clientSession); ModelJobs.schedule((IRunnable) MessageBoxes.createOk() .withHeader(TEXTS.get("ui.RequestTimeout")) .withBody(TEXTS.get("ui.RequestTimeoutMsg")) .withSeverity(IStatus.ERROR)::show, ModelJobs.newInput(ClientRunContexts.copyCurrent().withSession(clientSession, true)) .withName("Handling await model jobs timeout")); }
@Override public void doExportXml(boolean saveAs) { // export search parameters try (ByteArrayOutputStream bos = new ByteArrayOutputStream(); Writer w = new OutputStreamWriter(bos, StandardCharsets.UTF_8)) { XmlUtility.wellformDocument(storeToXml(), w); BinaryResource res = new BinaryResource("form.xml", bos.toByteArray()); getDesktop().openUri(res, OpenUriAction.DOWNLOAD); } catch (Exception e) { BEANS.get(ExceptionHandler.class).handle(new ProcessingException(TEXTS.get("FormExportXml") + " " + getTitle(), e)); } }
private <T extends Comparable<T>> IStatus checkFromTo(IValueField<T> from, IValueField<T> to, boolean lessMessage) { if (from != null && to != null && ObjectUtility.compareTo(from.getValue(), to.getValue()) > 0) { if (lessMessage) { return new InvalidSequenceStatus(TEXTS.get("XMustBeLessThanOrEqualY", from.getLabel(), to.getLabel())); } else { return new InvalidSequenceStatus(TEXTS.get("XMustBeGreaterThanOrEqualY", to.getLabel(), from.getLabel())); } } return null; }
@Override public List<ILookupRow<T>> getDataByAll(ILookupCall<T> call) { String sql = getConfiguredSqlSelect(); if (containsRefusingAllTag(sql)) { throw new VetoException(TEXTS.get("SearchTextIsTooGeneral")); } List<ILookupRow<T>> rows = execLoadLookupRows(sql, filterSqlByAll(sql), call); return rows; }
private void throwNumberTooLarge() { if (getMinValue() == null || ObjectUtility.equals(getMinValue(), getMinPossibleValue())) { throw new VetoException(TEXTS.get("NumberTooLargeMessageX", formatValueInternal(getMaxValue()))); } else { throw new VetoException(TEXTS.get("NumberTooLargeMessageXY", formatValueInternal(getMinValue()), formatValueInternal(getMaxValue()))); } }
private void throwNumberTooSmall() { if (getMaxValue() == null || ObjectUtility.equals(getMaxValue(), getMaxPossibleValue())) { throw new VetoException(TEXTS.get("NumberTooSmallMessageX", formatValueInternal(getMinValue()))); } else { throw new VetoException(TEXTS.get("NumberTooSmallMessageXY", formatValueInternal(getMinValue()), formatValueInternal(getMaxValue()))); } }
@Override protected void execStore() { if (getNewPasswordField().getValue() != null && !getNewPasswordField().getValue().equals(getRepeatPasswordField().getValue())) { throw new VetoException(TEXTS.get("PasswordsDoNotMatch")); } IPasswordManagementService svc = BEANS.get(IPasswordManagementService.class); svc.changePassword(getUserId(), getOldPasswordField().getValue().toCharArray(), getNewPasswordField().getValue().toCharArray()); } }
@Override protected void execStore() { if (getNewPasswordField().getValue() != null && !getNewPasswordField().getValue().equals(getRepeatPasswordField().getValue())) { throw new VetoException(TEXTS.get("PasswordsDoNotMatch")); } IPasswordManagementService svc = BEANS.get(IPasswordManagementService.class); svc.resetPassword(getUserId(), getNewPasswordField().getValue().toCharArray()); } }
@Override protected void execInitAction() { setText(TEXTS.get("ExtendedSearchAddEntityPrefix") + " " + m_entity.getText()); setIconId(m_entity.getIconId()); if (m_propertyChangeListener == null) { m_propertyChangeListener = new P_PropertyChangeListener(); m_entity.addPropertyChangeListener(m_propertyChangeListener); } updateVisibility(); }