protected String expand ( final String string, final Map<String, String> properties ) { return StringReplacer.replace ( string, new ExtendedPropertiesReplacer ( properties, true ), StringReplacer.DEFAULT_PATTERN ); }
/** * Replace variables in a string <br/> * Actually calls * <code>replace ( string, replcaeSource, pattern, true )</code>. */ public static String replace ( final String string, final ReplaceSource replaceSource, final Pattern pattern ) { return replace ( string, replaceSource, pattern, true ); } }
protected String getPath () { return StringHelper.join ( this.path, "/" ); } }
private static String replace(final String string) { return StringReplacer.replace(string, StringReplacer.newExtendedSource(System.getenv()), StringReplacer.DEFAULT_PATTERN); }
/** * Replace with the default pattern of <code>${var}</code> * * @param string * the string which should be processed, may be <code>null</code> * @param properties * the properties used for replacing * @return the source string with patterns replaced */ public static String replace ( final String string, final Map<?, ?> properties ) { return replace ( string, newSource ( properties ), DEFAULT_PATTERN ); }
private void recordChecksum ( final String fileName, final byte[] bs ) { this.checkSums.put ( fileName, StringHelper.toHex ( bs ) ); }
/** * Create a new ReplaceSource for Map sources which allows additional * operators. * * @see ExtendedPropertiesReplacer * @param properties * the Map acting as a source * @return the new replace source based on the Map */ public static ReplaceSource newExtendedSource ( final Map<?, ?> properties ) { return new ExtendedPropertiesReplacer ( properties ); }
private static String toRegEx ( final Collection<String> parts ) { return StringHelper.join ( parts, ".*", new Apply<String> () { //$NON-NLS-1$ @Override public String apply ( final String parameter ) { return Pattern.quote ( parameter ); } } ); } }
private String makePath ( final Map<String, String> vars, final DSFileBackend s ) { return StringReplacer.replace ( s.getPath (), StringReplacer.newExtendedSource ( vars ), VAR_PATTERN, true ); }
private void recordChecksum ( final String fileName, final byte[] bs ) { this.checkSums.put ( fileName, StringHelper.toHex ( bs ) ); }
private static String toRegEx ( final Collection<String> parts ) { return StringHelper.join ( parts, ".*", new Apply<String> () { //$NON-NLS-1$ @Override public String apply ( final String parameter ) { return Pattern.quote ( parameter ); } } ); } }
private String makePath ( final Map<String, String> vars, final ConfigurationAdminFileBackend s ) { return StringReplacer.replace ( s.getPath (), StringReplacer.newExtendedSource ( vars ), VAR_PATTERN, true ); }
public static String makeHierarchy ( final List<String> hierarchy ) { return StringHelper.join ( hierarchy, delimiter ); }
public static String makeHierarchy ( final List<String> hierarchy ) { return StringHelper.join ( hierarchy, delimiter ); }
private String makePath () { if ( this.subtargets == null || this.subtargets.isEmpty () ) { return null; } return "/" + StringHelper.join ( this.subtargets, "/" ); }
private String makePath () { if ( this.subtargets == null || this.subtargets.isEmpty () ) { return null; } return "/" + StringHelper.join ( this.subtargets, "/" ); }
@Override public String toString () { return String.format ( "[%s, %s]", this.id, StringHelper.join ( this.ioDirection, ", " ) ); }
public NoSuchFolderException ( final String[] path ) { super ( StatusCodes.NO_SUCH_FOLDER, String.format ( "No such folder (%s)", StringHelper.join ( path, "/" ) ) ); } }
public NoSuchFolderException ( final String[] path ) { super ( StatusCodes.NO_SUCH_FOLDER, String.format ( "No such folder (%s)", StringHelper.join ( path, "/" ) ) ); } }
private void updateValue () { this.value.setValue ( StringHelper.join ( this.wrappedList, this.delimiter ) ); }