Tabnine Logo
PropertiesSource
Code IndexAdd Tabnine to your IDE (free)

How to use
PropertiesSource
in
com.marklogic.client.ext.tokenreplacer

Best Java code snippets using com.marklogic.client.ext.tokenreplacer.PropertiesSource (Showing top 2 results out of 315)

origin: com.marklogic/ml-javaclient-util

/**
 * Initialize the Properties instance based on all the PropertiesSources that have been registered.
 */
protected void initializeProperties() {
  properties = new Properties();
  for (PropertiesSource source : propertiesSources) {
    Properties p = source.getProperties();
    if (p != null) {
      properties.putAll(p);
    }
  }
}
origin: com.marklogic/ml-app-deployer

/**
 * Populate the customTokens map in this class with the properties from the given properties source.
 * @param propertiesSource
 * @param prefix optional; if set, then each token key that is added has the prefix prepended to it
 * @param suffix optional; if set, then each token key that is added has the suffix appended to it
 */
public void populateCustomTokens(PropertiesSource propertiesSource, String prefix, String suffix) {
  Properties props = propertiesSource.getProperties();
  if (props != null) {
    if (customTokens == null) {
      customTokens = new HashMap<>();
    }
    for (Object key : props.keySet()) {
      String skey = (String)key;
      String value = props.getProperty(skey);
      if (value != null) {
        String token = skey;
        if (prefix != null) {
          token = prefix + token;
        }
        if (suffix != null) {
          token = token + suffix;
        }
        customTokens.put(token, value);
      }
    }
  }
}
com.marklogic.client.ext.tokenreplacerPropertiesSource

Javadoc

Intent is to allow for a Properties object to be provided to DefaultTokenReplacer without that class knowing where the properties are retrieved from.

Most used methods

  • getProperties

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • JList (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now