List of usage examples for org.apache.commons.lang3 StringUtils contains
public static boolean contains(final CharSequence seq, final CharSequence searchSeq)
Checks if CharSequence contains a search CharSequence, handling null .
From source file:com.erudika.para.rest.Api1.java
private <P extends ParaObject> Map<String, Object> buildQueryAndSearch(App app, String queryType, MultivaluedMap<String, String> params, String typeOverride) { String query = params.containsKey("q") ? params.getFirst("q") : "*"; String appid = app.getAppIdentifier(); String type = (!StringUtils.isBlank(typeOverride) && !"search".equals(typeOverride)) ? typeOverride : params.getFirst(Config._TYPE); Pager pager = new Pager(); pager.setPage(NumberUtils.toLong(params.getFirst("page"), 0)); pager.setSortby(params.getFirst("sort")); pager.setDesc(Boolean.parseBoolean(params.containsKey("desc") ? params.getFirst("desc") : "true")); pager.setLimit(NumberUtils.toInt(params.getFirst("limit"), pager.getLimit())); queryType = StringUtils.isBlank(queryType) ? params.getFirst("querytype") : queryType; Map<String, Object> result = new HashMap<String, Object>(); List<P> items = new ArrayList<P>(); if ("id".equals(queryType)) { String id = params.containsKey(Config._ID) ? params.getFirst(Config._ID) : null; P obj = search.findById(appid, id); if (obj != null) { items = Collections.singletonList(obj); pager.setCount(1);//from w ww .jav a 2 s.c o m } } else if ("ids".equals(queryType)) { List<String> ids = params.get("ids"); items = search.findByIds(appid, ids); pager.setCount(items.size()); } else if ("nearby".equals(queryType)) { String latlng = params.getFirst("latlng"); if (StringUtils.contains(latlng, ",")) { String[] coords = latlng.split(",", 2); String rad = params.containsKey("radius") ? params.getFirst("radius") : null; int radius = NumberUtils.toInt(rad, 10); double lat = NumberUtils.toDouble(coords[0], 0); double lng = NumberUtils.toDouble(coords[1], 0); items = search.findNearby(appid, type, query, radius, lat, lng, pager); } } else if ("prefix".equals(queryType)) { items = search.findPrefix(appid, type, params.getFirst("field"), params.getFirst("prefix"), pager); } else if ("similar".equals(queryType)) { List<String> fields = params.get("fields"); if (fields != null) { items = search.findSimilar(appid, type, params.getFirst("filterid"), fields.toArray(new String[] {}), params.getFirst("like"), pager); } } else if ("tagged".equals(queryType)) { List<String> tags = params.get("tags"); if (tags != null) { items = search.findTagged(appid, type, tags.toArray(new String[] {}), pager); } } else if ("in".equals(queryType)) { items = search.findTermInList(appid, type, params.getFirst("field"), params.get("terms"), pager); } else if ("terms".equals(queryType)) { String matchAll = params.containsKey("matchall") ? params.getFirst("matchall") : "true"; List<String> termsList = params.get("terms"); if (termsList != null) { Map<String, String> terms = new HashMap<String, String>(termsList.size()); for (String termTuple : termsList) { if (!StringUtils.isBlank(termTuple) && termTuple.contains(Config.SEPARATOR)) { String[] split = termTuple.split(Config.SEPARATOR, 2); terms.put(split[0], split[1]); } } if (params.containsKey("count")) { pager.setCount(search.getCount(appid, type, terms)); } else { items = search.findTerms(appid, type, terms, Boolean.parseBoolean(matchAll), pager); } } } else if ("wildcard".equals(queryType)) { items = search.findWildcard(appid, type, params.getFirst("field"), query, pager); } else if ("count".equals(queryType)) { pager.setCount(search.getCount(appid, type)); } else { items = search.findQuery(appid, type, query, pager); } result.put("items", items); result.put("page", pager.getPage()); result.put("totalHits", pager.getCount()); return result; }
From source file:com.nridge.core.base.field.data.DataTable.java
/** * Returns one or more field rows that match the search criteria of the * parameters provided. Each row of the table will be examined to determine * if a cell identified by name evaluates true when the operator and value * are applied to it.//from w ww .ja v a2 s .c om * <p> * <b>Note:</b> This method supports text based logical operators only. * You should use other <code>findValue()</code> methods for different * data types. * </p> * * @param aName Column name. * @param anOperator Logical operator. * @param aValue Comparison value. * * @return Array list of matching field rows or <i>null</i> if none evaluate true. */ public ArrayList<FieldRow> findValue(String aName, Field.Operator anOperator, String aValue) { String valueString; FieldRow fieldRow; Matcher regexMatcher = null; Pattern regexPattern = null; ArrayList<FieldRow> matchingRows = new ArrayList<FieldRow>(); int rowCount = rowCount(); int colOffset = offsetByName(aName); if ((aValue != null) && (colOffset != -1) && (rowCount > 0)) { for (int row = 0; row < rowCount; row++) { fieldRow = getRow(row); valueString = fieldRow.getValue(colOffset); switch (anOperator) { case NOT_EMPTY: if (StringUtils.isNotEmpty(valueString)) matchingRows.add(fieldRow); break; case EQUAL: if (StringUtils.equals(valueString, aValue)) matchingRows.add(fieldRow); break; case NOT_EQUAL: if (!StringUtils.equals(valueString, aValue)) matchingRows.add(fieldRow); break; case CONTAINS: if (StringUtils.contains(valueString, aValue)) matchingRows.add(fieldRow); break; case STARTS_WITH: if (StringUtils.startsWith(valueString, aValue)) matchingRows.add(fieldRow); break; case ENDS_WITH: if (StringUtils.endsWith(valueString, aValue)) matchingRows.add(fieldRow); break; case EMPTY: if (StringUtils.isEmpty(valueString)) matchingRows.add(fieldRow); break; case REGEX: // http://www.regular-expressions.info/java.html if (regexPattern == null) regexPattern = Pattern.compile(aValue); if (regexMatcher == null) regexMatcher = regexPattern.matcher(valueString); else regexMatcher.reset(valueString); if (regexMatcher.find()) matchingRows.add(fieldRow); break; } } } return matchingRows; }
From source file:com.mirth.connect.donkey.server.channel.Channel.java
protected DispatchResult dispatchRawMessage(RawMessage rawMessage, boolean batch) throws ChannelException { // Allow messages to continue processing while the channel is stopping if they are part of an existing batch if ((currentState == DeployedState.STOPPING && !batch) || currentState == DeployedState.STOPPED) { throw new ChannelException(true); }//from www . j a v a 2s .c o m Thread currentThread = Thread.currentThread(); String originalThreadName = currentThread.getName(); boolean lockAcquired = false; Long persistedMessageId = null; try { synchronized (dispatchThreads) { if (!shuttingDown) { dispatchThreads.add(currentThread); } else { throw new ChannelException(true); } } if (StringUtils.contains(originalThreadName, channelId)) { currentThread.setName("Channel Dispatch Thread < " + originalThreadName); } else { currentThread.setName( "Channel Dispatch Thread on " + name + " (" + channelId + ") < " + originalThreadName); } DonkeyDao dao = null; Message processedMessage = null; Response response = null; String responseErrorMessage = null; DispatchResult dispatchResult = null; try { obtainProcessLock(); lockAcquired = true; /* * TRANSACTION: Create Raw Message - create a source connector message from the raw * message and set the status as RECEIVED - store attachments */ dao = daoFactory.getDao(); ConnectorMessage sourceMessage = createAndStoreSourceMessage(dao, rawMessage); ThreadUtils.checkInterruptedStatus(); if (sourceConnector.isRespondAfterProcessing()) { dao.commit(storageSettings.isRawDurable()); persistedMessageId = sourceMessage.getMessageId(); dao.close(); markDeletedQueuedMessages(rawMessage, persistedMessageId); processedMessage = process(sourceMessage, false); } else { // Block other threads from adding to the source queue until both the current commit and queue addition finishes synchronized (sourceQueue) { dao.commit(storageSettings.isRawDurable()); persistedMessageId = sourceMessage.getMessageId(); dao.close(); queue(sourceMessage); } markDeletedQueuedMessages(rawMessage, persistedMessageId); } if (responseSelector.canRespond()) { try { response = responseSelector.getResponse(sourceMessage, processedMessage); } catch (Exception e) { responseErrorMessage = ExceptionUtils.getStackTrace(e); } } } catch (RuntimeException e) { // TODO determine behavior if this occurs. throw new ChannelException(true, e); } finally { if (lockAcquired && (!sourceConnector.isRespondAfterProcessing() || persistedMessageId == null || Thread.currentThread().isInterrupted())) { // Release the process lock if an exception was thrown before a message was persisted // or if the thread was interrupted because no additional processing will be done. releaseProcessLock(); lockAcquired = false; } if (dao != null && !dao.isClosed()) { dao.close(); } // Create the DispatchResult at the very end because lockAcquired might have changed if (persistedMessageId != null) { dispatchResult = new DispatchResult(persistedMessageId, processedMessage, response, sourceConnector.isRespondAfterProcessing(), lockAcquired); if (StringUtils.isNotBlank(responseErrorMessage)) { dispatchResult.setResponseError(responseErrorMessage); } } } return dispatchResult; } catch (InterruptedException e) { // This exception should only ever be thrown during a halt. // It is impossible to know whether or not the message was persisted because the task will continue to run // even though we are no longer waiting for it. Furthermore it is possible the message was actually sent. // The best we can do is cancel the task and throw a channel exception. // If the message was not queued on the source connector, recovery should take care of it. // If the message was queued, the source of the message will be notified that the message was not persisted to be safe. // This could lead to a potential duplicate message being received/sent, but it is one of the consequences of using halt. throw new ChannelException(true, e); } catch (Throwable t) { Throwable cause = t.getCause(); ChannelException channelException = null; if (cause instanceof InterruptedException) { channelException = new ChannelException(true, cause); } else if (cause instanceof ChannelException) { logger.error("Runtime error in channel " + name + " (" + channelId + ").", cause); channelException = (ChannelException) cause; } else { logger.error("Error processing message in channel " + name + " (" + channelId + ").", t); channelException = new ChannelException(false, t); } if (persistedMessageId == null) { throw channelException; } return new DispatchResult(persistedMessageId, null, null, false, lockAcquired, channelException); } finally { synchronized (dispatchThreads) { dispatchThreads.remove(currentThread); } currentThread.setName(originalThreadName); } }
From source file:ch.cyberduck.core.preferences.Preferences.java
/** * @param locale ISO Language identifier * @return Human readable language name in the target language *///from w w w. j ava 2 s .c o m public String getDisplayName(final String locale) { java.util.Locale l; if (StringUtils.contains(locale, "_")) { l = new java.util.Locale(locale.split("_")[0], locale.split("_")[1]); } else { l = new java.util.Locale(locale); } return StringUtils.capitalize(l.getDisplayName(l)); }
From source file:com.sonicle.webtop.core.xmpp.XMPPClient.java
public static boolean isInstantChat(String chatEntityBareJid) { return StringUtils.contains(chatEntityBareJid, "@" + CHAT_DOMAIN_PREFIX + "."); }
From source file:com.mirth.connect.client.ui.Frame.java
/** * Alerts the user with an exception dialog with the passed in stack trace. *///from w ww.j ava 2s. c o m public void alertThrowable(Component parentComponent, Throwable t, String customMessage, boolean showMessageOnForbidden, String safeErrorKey) { if (connectionError) { return; } if (safeErrorKey != null) { increaseSafeErrorFailCount(safeErrorKey); if (getSafeErrorFailCount(safeErrorKey) < 3) { return; } } parentComponent = getVisibleComponent(parentComponent); String message = StringUtils.trimToEmpty(customMessage); boolean showDialog = true; if (t != null) { // Always print the stacktrace for troubleshooting purposes t.printStackTrace(); if (t instanceof ExecutionException && t.getCause() != null) { t = t.getCause(); } if (t.getCause() != null && t.getCause() instanceof ClientException) { t = t.getCause(); } if (StringUtils.isBlank(message) && StringUtils.isNotBlank(t.getMessage())) { message = t.getMessage(); } /* * Logout if an exception occurs that indicates the server is no longer running or * accessible. We only want to do this if a ClientException was passed in, indicating it * was actually due to a request to the server. Other places in the application could * call this method with an exception that happens to contain the string * "Connection reset", for example. */ if (t instanceof ClientException) { if (t instanceof ForbiddenException || t.getCause() != null && t.getCause() instanceof ForbiddenException) { message = "You are not authorized to perform this action.\n\n" + message; if (!showMessageOnForbidden) { showDialog = false; } } else if (StringUtils.contains(t.getMessage(), "Received close_notify during handshake")) { return; } else if (t.getCause() != null && t.getCause() instanceof IllegalStateException && mirthClient.isClosed()) { return; } else if (StringUtils.contains(t.getMessage(), "reset") || (t instanceof UnauthorizedException || t.getCause() != null && t.getCause() instanceof UnauthorizedException)) { connectionError = true; statusUpdaterExecutor.shutdownNow(); alertWarning(parentComponent, "Sorry your connection to Mirth has either timed out or there was an error in the connection. Please login again."); if (!exportChannelOnError()) { return; } mirthClient.close(); this.dispose(); LoginPanel.getInstance().initialize(PlatformUI.SERVER_URL, PlatformUI.CLIENT_VERSION, "", ""); return; } else if (t.getCause() != null && t.getCause() instanceof HttpHostConnectException && StringUtils.contains(t.getCause().getMessage(), "Connection refused")) { connectionError = true; statusUpdaterExecutor.shutdownNow(); String server; if (!StringUtils.isBlank(PlatformUI.SERVER_NAME)) { server = PlatformUI.SERVER_NAME + "(" + PlatformUI.SERVER_URL + ")"; } else { server = PlatformUI.SERVER_URL; } alertWarning(parentComponent, "The Mirth Connect server " + server + " is no longer running. Please start it and log in again."); if (!exportChannelOnError()) { return; } mirthClient.close(); this.dispose(); LoginPanel.getInstance().initialize(PlatformUI.SERVER_URL, PlatformUI.CLIENT_VERSION, "", ""); return; } } for (String stackFrame : ExceptionUtils.getStackFrames(t)) { if (StringUtils.isNotEmpty(message)) { message += '\n'; } message += StringUtils.trim(stackFrame); } } logger.error(message); if (showDialog) { Window owner = getWindowForComponent(parentComponent); if (owner instanceof java.awt.Frame) { new ErrorDialog((java.awt.Frame) owner, message); } else { // window instanceof Dialog new ErrorDialog((java.awt.Dialog) owner, message); } } }
From source file:com.virus.removal.javafxapplication.FXMLDocumentController.java
/** * @param event// ww w. java 2 s .c o m */ @FXML private void ee(final ActionEvent event) { drop.setText("English"); /* Dashboard */ b2.setText(" Dashboard "); b2.setTooltip(new Tooltip("Dashboard")); b2.setLayoutX(1.0); b2.setLayoutY(109.0); d1.setText("Dashboard"); d2.setText("Version: Adware & Toolbar Removal Tool"); d3.setText("Demo"); statusTextInDash.setText("Status:"); lastScanTextInDash.setText("Last Scan:"); buildTextInDash.setText("Build:"); statusValInDash.setText(POTENTIALLY_UNPROTECTED); lastScanValInDash.setText("Please perform a scan"); buildValInDash.setText("01.01.193"); scan.setText("Scan Now"); scan.setTooltip(new Tooltip("Scan Now")); /* Scan */ b1.setText(" Scan "); b1.setTooltip(new Tooltip("Scan")); b1.setLayoutX(1.0); b1.setLayoutY(167.0); /* Unprotected after scan is completed */ s1.setText("Potentially Unprotected!"); s2.setText("Your computer may be at risk, please perform a scan."); s3.setText("Virus Scan"); s4.setText("Adware Cleaner"); s5.setText("Toolbar Cleaner"); s6.setText("Demo"); scan1.setText("Not up to date"); scan2.setText("Not checked"); scan3.setText("Not checked"); /* Protected after scan is completed */ protect1.setText("Potentially Protected!"); protect2.setText("Your computer has been scanned and protected."); protect3.setText("Virus Scan"); protect4.setText("Adware Cleaner"); protect5.setText("Toolbar Cleaner"); protect6.setText("Demo"); scan4.setText("Up to date"); scan5.setText("Checked"); scan6.setText("Checked"); u.setText("Start Scanning"); u.setTooltip(new Tooltip("Start Scanning")); q.setText("Cancel Scan"); /* History */ b3.setText(" History "); b3.setTooltip(new Tooltip("History")); b3.setLayoutX(1.0); b3.setLayoutY(228.0); textForLastScanInHistory.setText("Last Scan: Please perform a scan."); textForDemo.setText("Demo"); clearHistory.setText("Clear history"); clearHistory.setTooltip(new Tooltip("Clear history")); if (StringUtils.isNotBlank(textAreaForHistory.getText()) && (StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_SPANISH) || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_FRENCH) || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_PORTUGUESE))) { textAreaForHistory.clear(); textAreaForHistory.setStyle("-fx-text-fill: #00AEEF;"); textAreaForHistory.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12)); textAreaForHistory .appendText("\n\n\n\n\n\n\n\n\n\n\n "); textAreaForHistory.appendText(HISTORY_UNAVAILABLE); clearHistory.setDisable(true); } /* General Settings */ b5.setText("General Settings "); b5.setTooltip(new Tooltip("General Settings")); b5.setLayoutX(6.0); b5.setLayoutY(27.0); g1.setText("General Settings:"); g2.setText("Version: Adware & Toolbar Removal Tool"); g3.setText("Build: 01.01.193"); g4.setText("Demo"); w.setText("Apply"); e.setText("Cancel"); if (StringUtils.isNotBlank(textAreaForGeneralSettings.getText())) { textAreaForGeneralSettings.clear(); } textAreaForGeneralSettings.setStyle("-fx-text-fill: #00AEEF;"); textAreaForGeneralSettings.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12)); textAreaForGeneralSettings .appendText("\n\n\n\n\n\n\n\n\n\n\n "); textAreaForGeneralSettings.appendText(SETTINGS_UNAVAILABLE); /* Update */ b6.setText("Update "); b6.setTooltip(new Tooltip("Update")); b6.setLayoutX(3.0); b6.setLayoutY(82.0); updateFound.setText("Update(s) Found:"); updateNow.setText("Update Now"); installUpdates.setText("Install Updates"); ignore.setText("Ignore"); demoInUpdate.setText("Demo"); textAreaForUpdate.clear(); textAreaForUpdate.appendText("\n\n\n\n\n\n\n\n\n\n\n "); textAreaForUpdate.appendText(UPDATE_UNAVAILABLE); textAreaForUpdate.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12)); textAreaForUpdate.setStyle("-fx-text-fill: #00AEEF;"); /* About */ b4.setText(" About "); b4.setTooltip(new Tooltip("About")); b4.setLayoutX(4.0); b4.setLayoutY(136.0); a1.setText("About"); a2.setText("Version: Adware & Toolbar Removal Tool"); a3.setText("Device ID: Demo Version"); a4.setText("Demo"); t.setText("Help"); y.setText("Register"); /* Advanced Settings */ b7.setText("Advanced Settings"); //b7.setTooltip(new Tooltip("Advanced Settings")); b7.setLayoutX(1.0); b7.setLayoutY(292.0); txt.setText( "An important aspect of technology is its accessibility and moreover assurance that things will not go wrong, as everything which has to do with the technology industry and the ecosystem it has built, has grown phenomenally, so has the need for better security, more reliable interfaces, and optimal performance. Keeping just that in mind at VirusREM weve come up with the perfect product which caters to both the mass market of consumers and the niche requirements of corporations."); }
From source file:com.virus.removal.javafxapplication.FXMLDocumentController.java
/** * @param event//from www . j av a 2s .c om */ @FXML private void ss(final ActionEvent event) { drop.setText("Spanish"); /* Dashboard */ b2.setText(" Panel de Control "); b2.setTooltip(new Tooltip("Panel de Control")); b2.setLayoutX(1.0); b2.setLayoutY(109.0); d1.setText("Panel de Control"); d2.setText("Versin: Adware & Herramienta para remover Barra de Herramientas"); d3.setText("Demo"); statusTextInDash.setText("Estatus:"); lastScanTextInDash.setText("ltimo escaneo:"); buildTextInDash.setText("Armado:"); statusValInDash.setText("Potencialmente Desprotegido"); lastScanValInDash.setText("Por favor, haga un escaneo"); buildValInDash.setText("01.01.193"); scan.setText("Escanear Ahora"); scan.setTooltip(new Tooltip("Escanear Ahora")); /* Scan */ b1.setText(" Escaneo "); b1.setTooltip(new Tooltip("Escaneo")); b1.setLayoutX(1.0); b1.setLayoutY(167.0); /* Unprotected after scan is completed */ s1.setText("Potencialmente Desprotegido!"); s2.setText("Tu computadora puede estar en riesgo. Por favor, haz un escaneo."); s3.setText("Escaneo de virus"); s4.setText("Limpiador de Adware"); s5.setText("Limpiador de Barra de Herramientas"); s6.setText("Demo"); scan1.setText("No actualizado"); scan2.setText("Sin revisar"); scan3.setText("Sin revisar"); /* Protected after scan is completed */ protect1.setText("Potencialmente Protegido!"); protect2.setText("El ordenador ha sido escaneada y protegido."); protect3.setText("Escaneo de virus"); protect4.setText("Limpiador de Adware"); protect5.setText("Limpiador de Barra de Herramientas"); protect6.setText("Demo"); scan4.setText("A hoy"); scan5.setText("Comprobado"); scan6.setText("Comprobado"); u.setText("Comenzando escaneo"); u.setTooltip(new Tooltip("Comenzando escaneo")); q.setText("Cancelar Escaneo"); /* History */ b3.setText(" Historial "); b3.setTooltip(new Tooltip("Historial")); b3.setLayoutX(1.0); b3.setLayoutY(228.0); textForLastScanInHistory.setText("ltimo escaneo: Por favor, haga un escaneo."); textForDemo.setText("Demo"); clearHistory.setText("Limpiar historial"); clearHistory.setTooltip(new Tooltip("Limpiar historial")); if (StringUtils.isNotBlank(textAreaForHistory.getText()) && (StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE) || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_FRENCH) || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_PORTUGUESE))) { textAreaForHistory.clear(); textAreaForHistory.setStyle("-fx-text-fill: #00AEEF;"); textAreaForHistory.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12)); textAreaForHistory .appendText("\n\n\n\n\n\n\n\n\n\n\n "); textAreaForHistory.appendText(HISTORY_UNAVAILABLE_IN_SPANISH); clearHistory.setDisable(true); } /* General Settings */ b5.setText(" Configuraciones Generales "); b5.setTooltip(new Tooltip("Configuraciones Generales")); b5.setLayoutX(6.0); b5.setLayoutY(27.0); g1.setText("Configuraciones Generales:"); g2.setText("Versin: Adware & Herramienta para remover Barra de Herramientas"); g3.setText("Armado: 01.01.193"); g4.setText("Demo"); w.setText("Aplicar"); e.setText("Cancelar"); if (StringUtils.isNotBlank(textAreaForGeneralSettings.getText())) { textAreaForGeneralSettings.clear(); } textAreaForGeneralSettings.setStyle("-fx-text-fill: #00AEEF;"); textAreaForGeneralSettings.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12)); textAreaForGeneralSettings .appendText("\n\n\n\n\n\n\n\n\n\n\n "); textAreaForGeneralSettings.appendText(SETTINGS_UNAVAILABLE_IN_SPANISH); /* Update */ b6.setText(" Actualizar "); b6.setTooltip(new Tooltip("Actualizar")); b6.setLayoutX(3.0); b6.setLayoutY(82.0); updateFound.setText("Actualizaciones Encontradas:"); updateNow.setText("Actualice Ahora"); ignore.setText("Ignorar"); demoInUpdate.setText("Demo"); textAreaForUpdate.clear(); textAreaForUpdate.appendText("\n\n\n\n\n\n\n\n\n\n\n "); textAreaForUpdate.appendText(UPDATE_UNAVAILABLE_IN_SPANISH); textAreaForUpdate.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12)); textAreaForUpdate.setStyle("-fx-text-fill: #00AEEF;"); /* About */ b4.setText(" Acerca "); b4.setTooltip(new Tooltip("Acerca")); b4.setLayoutX(4.0); b4.setLayoutY(136.0); a1.setText("Acerca"); a2.setText("Versin: Adware & Herramienta para remover Barra de"); a3.setText("ID del dispositivo: Demo Versin"); a4.setText("Demo"); t.setText("Ayuda"); y.setText("Registrar"); /* Advanced Settings */ b7.setText("Configuraciones Avanzadas "); //b7.setTooltip(new Tooltip("Configuraciones Avanzadas")); b7.setLayoutX(1.0); b7.setLayoutY(292.0); txt.setText( "Un aspecto importante de la tecnologa es su accesibilidad y garanta, adems, que las cosas no van mal, como todo lo que tiene que ver con la industria de la tecnologa y el ecosistema que ha construido, ha crecido enormemente, por lo que tiene la necesidad de mejorar la seguridad, las interfaces ms fiables y un rendimiento ptimo. Mantener slo eso en mente en VirusREM que hemos llegado con el producto perfecto, que atiende a las necesidades del mercado de masas de los consumidores y las necesidades de las empresas de nicho."); }
From source file:com.virus.removal.javafxapplication.FXMLDocumentController.java
/** * @param event/* ww w .ja va 2s . c om*/ */ @FXML private void ff(final ActionEvent event) { drop.setText("French"); /* Dashboard */ // b2.setText(" Tableau de bord "); b2.setText("Tableau de bord"); b2.setTooltip(new Tooltip("Tableau de bord")); b2.setLayoutX(-12.0); b2.setLayoutY(109.0); d1.setText("Tableau de bord"); d2.setText("Version: Outil de suppression de barre doutils et Adwares (logiciels publicitaires)"); d3.setText("Dmo"); statusTextInDash.setText("Statut:"); lastScanTextInDash.setText("Dernier scan:"); buildTextInDash.setText("Construire:"); statusValInDash.setText("Potentiellement non protg"); lastScanValInDash.setText("Veuillez effectuer un scan"); buildValInDash.setText("01.01.193"); scan.setText("Scanner maintenant"); scan.setTooltip(new Tooltip("Scanner maintenant")); /* Scan */ b1.setText(" Scan "); b1.setTooltip(new Tooltip("Scan")); b1.setLayoutX(1.0); b1.setLayoutY(167.0); /* Unprotected after scan is completed */ s1.setText("Potentiellement Non protg!"); s2.setText("Votre ordinateur peut tre en risque, veuillez effectuer un scan."); s3.setText("Scan de virus"); s4.setText("Nettoyeur des Adwares"); s5.setText("Nettoyeur de barre doutils"); s6.setText("Dmo"); scan1.setText("n'est pas jour"); scan2.setText("Non vrifi"); scan3.setText("Non vrifi"); /* Protected after scan is completed */ protect1.setText("Potentiellement Protected!"); protect2.setText("Votre ordinateur a t numris et protg."); protect3.setText("Scan de virus"); protect4.setText("Nettoyeur des Adwares"); protect5.setText("Nettoyeur de barre doutils"); protect6.setText("Dmo"); scan4.setText(" jour"); scan5.setText("Vrifi"); scan6.setText("Vrifi"); u.setText("commencer le scan"); u.setTooltip(new Tooltip("commencer le scan")); q.setText("Annuler Scan"); /* History */ //b3.setText(" Historique "); b3.setText("Historique"); b3.setTooltip(new Tooltip("Historique")); b3.setLayoutX(-30.0); b3.setLayoutY(228.0); textForLastScanInHistory.setText("Dernier scan: Veuillez effectuer un scan."); textForDemo.setText("Dmo"); clearHistory.setText("Supprimer lhistorique"); clearHistory.setTooltip(new Tooltip("Supprimer lhistorique")); if (StringUtils.isNotBlank(textAreaForHistory.getText()) && (StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_SPANISH) || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE) || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_PORTUGUESE))) { textAreaForHistory.clear(); textAreaForHistory.setStyle("-fx-text-fill: #00AEEF;"); textAreaForHistory.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12)); textAreaForHistory .appendText("\n\n\n\n\n\n\n\n\n\n\n "); textAreaForHistory.appendText(HISTORY_UNAVAILABLE_IN_FRENCH); clearHistory.setDisable(true); } /* General Settings */ b5.setText(" Paramtres gnraux "); b5.setTooltip(new Tooltip("Paramtres gnraux")); b5.setLayoutX(6.0); b5.setLayoutY(27.0); g1.setText("Paramtres gnraux:"); g2.setText("Version: Outil de suppression de barre doutils et Adwares"); g3.setText("Construire: 01.01.193"); g4.setText("Dmo"); w.setText("Appliquer"); e.setText("Annuler"); if (StringUtils.isNotBlank(textAreaForGeneralSettings.getText())) { textAreaForGeneralSettings.clear(); } textAreaForGeneralSettings.setStyle("-fx-text-fill: #00AEEF;"); textAreaForGeneralSettings.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12)); textAreaForGeneralSettings .appendText("\n\n\n\n\n\n\n\n\n\n\n "); textAreaForGeneralSettings.appendText(SETTINGS_UNAVAILABLE_IN_FRENCH); /* Update */ // b6.setText(" Mise jour "); b6.setText("Mise jour"); b6.setTooltip(new Tooltip("Mise jour")); b6.setLayoutX(-18.0); b6.setLayoutY(82.0); updateFound.setText("Mise jour (s) trouve (s):"); updateNow.setText("Mettre jour maintenant"); ignore.setText("Ignorer"); demoInUpdate.setText("Dmo"); textAreaForUpdate.clear(); textAreaForUpdate.appendText("\n\n\n\n\n\n\n\n\n\n\n "); textAreaForUpdate.appendText(UPDATE_UNAVAILABLE_IN_FRENCH); textAreaForUpdate.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12)); textAreaForUpdate.setStyle("-fx-text-fill: #00AEEF;"); /* About */ // b4.setText(" propos "); b4.setText(" propos"); b4.setTooltip(new Tooltip(" propos")); b4.setLayoutX(-23.0); b4.setLayoutY(136.0); a1.setText(" propos"); a2.setText("Version: Outil de suppression de barre doutils et des Adwares"); a3.setText("ID de l'appareil: Dmo Version"); a4.setText("Dmo"); t.setText("Aide"); y.setText("S'inscrire"); /* Advanced Settings */ b7.setText("Paramtres avancs"); //b7.setTooltip(new Tooltip("Paramtres avancs")); b7.setLayoutX(1.0); b7.setLayoutY(292.0); txt.setText( "Un aspect important de la technologie est son accessibilit et de l'assurance de plus que les choses ne vont pas aller mal, comme tout ce qui a voir avec l'industrie de la technologie et de l'cosystme, il a construit, a connu une croissance phnomnale, a donc la ncessit d'une meilleure scurit, interfaces plus fiables , et des performances optimales. Garder tout cela l'esprit VirusREM nous avons mis au point le produit parfait qui rpond la fois le march de masse des consommateurs et les exigences de niche des socits."); }
From source file:com.dell.asm.asmcore.asmmanager.util.ServiceTemplateUtil.java
/** * If dependency target is not null, verify dependency value satisfies template. * If target is null returns true (no dependency, setting is actual). * @param component//from w w w .j a va2 s.c om * @param setting * @return */ public static boolean checkDependency(ServiceTemplateComponent component, ServiceTemplateSetting setting) { if (StringUtils.isNotEmpty(setting.getDependencyTarget())) { ServiceTemplateSetting depTarget = component.getTemplateSetting(setting.getDependencyTarget()); return (depTarget != null && StringUtils.contains(setting.getDependencyValue(), depTarget.getValue())); } return true; }