Package org.apache.commons.lang.text

Examples of org.apache.commons.lang.text.StrSubstitutor


     */
    public synchronized StrSubstitutor getSubstitutor()
    {
        if (substitutor == null)
        {
            substitutor = new StrSubstitutor(createInterpolator());
        }
        return substitutor;
    }
View Full Code Here


     * @param core
     * @param fstFolderConfig
     * @return
     */
    private File getFstDirectory(SolrCore core, String fstFolderConfig) {
        StrSubstitutor substitutor = new StrSubstitutor(new SolrCoreStrLookup(
            indexReference, core, bundleContext));
        substitutor.setEnableSubstitutionInVariables(true);
        String folderStr = substitutor.replace(fstFolderConfig);
        if(folderStr.indexOf("${") > 0){
            folderStr = substitutor.replace(folderStr);
        }
        //convert separators to the current OS
        folderStr = FilenameUtils.separatorsToSystem(folderStr);
        File fstDir = new File(folderStr);
        if(!fstDir.isDirectory()){ //create the FST directory
View Full Code Here

    _projCode = getProjCode();
    _profile = getProfile();
    _modules = getModules();
   
    connectServer(_host, _port, _projCode, _profile, _modules);
    substitutor = new StrSubstitutor(createInterpolator());
  }
View Full Code Here

    _projCode = projCode;
    _profile = profile;
    _modules = "";
   
    connectServer(_host, _port, _projCode, _profile, _modules);
    substitutor = new StrSubstitutor(createInterpolator());
  }
View Full Code Here

    _projCode = projCode;
    _profile = profile;
    _modules = modules;
   
    connectServer(_host, _port, _projCode, _profile, _modules);
    substitutor = new StrSubstitutor(createInterpolator());
  }
View Full Code Here

    _projCode = projCode;
    _profile = profile;
    _modules = "";
   
    connectServer(_host, _port, _projCode, _profile, _modules);
    substitutor = new StrSubstitutor(createInterpolator());
  }
View Full Code Here

    _projCode = projCode;
    _profile = profile;
    _modules = modules;
   
    connectServer(_host, _port, _projCode, _profile, _modules);
    substitutor = new StrSubstitutor(createInterpolator());
  }
View Full Code Here

  public void initialize( Bootstrap<?> bootstrap )
  {
    bootstrap.setConfigurationSourceProvider(
        new SubstitutingSourceProvider(
            bootstrap.getConfigurationSourceProvider(),
            new StrSubstitutor( new EnvironmentVariableLookup() )
        )
    );
  }
View Full Code Here

  @Override
  public InputStream open( String path ) throws IOException
  {
    String config = convertStreamToString( baseProvider.open( path ) );
    StrSubstitutor environmentVariableSubstitutor = strSubstitutor;

    String substitutedConfig = environmentVariableSubstitutor.replace( config );
    return new ByteArrayInputStream( substitutedConfig.getBytes() );
  }
View Full Code Here

   * Therefore the test is "/a/b".startsWith("/a");
   */
  @VisibleForTesting
  protected static boolean impliesURI(String policy, String request) {
    try {
      URI policyURI = new URI(new StrSubstitutor(System.getProperties()).replace(policy));
      URI requestURI = new URI(request);
      if(policyURI.getScheme() == null || policyURI.getPath() == null) {
        LOGGER.warn("Policy URI " + policy + " is not valid. Either no scheme or no path.");
        return false;
      }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.text.StrSubstitutor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.