de.agilecoders.wicket.webjars.util
Class Helper

java.lang.Object
  extended by de.agilecoders.wicket.webjars.util.Helper

public final class Helper
extends Object

some helper methods

Author:
miha

Field Summary
static String PATH_PREFIX
           
 
Constructor Summary
Helper()
           
 
Method Summary
static String appendLeadingSlash(String path)
          prepends a leading slash if there is none.
static String prependWebjarsPathIfMissing(String path)
          prepends the webjars path if missing
static String removeLeadingSlash(String path)
          Removes the leading slash if there is one.
static String reversePath(String assetPath)
          Make paths like aa/bb/cc = cc/bb/aa.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_PREFIX

public static final String PATH_PREFIX
See Also:
Constant Field Values
Constructor Detail

Helper

public Helper()
Method Detail

prependWebjarsPathIfMissing

public static String prependWebjarsPathIfMissing(String path)
prepends the webjars path if missing

Parameters:
path - the file name to check
Returns:
file name that starts with "/webjars/"

appendLeadingSlash

public static String appendLeadingSlash(String path)
prepends a leading slash if there is none.

Parameters:
path - the path
Returns:
path with leading slash

removeLeadingSlash

public static String removeLeadingSlash(String path)
Removes the leading slash if there is one.

Parameters:
path - the path
Returns:
path without leading slash

reversePath

public static String reversePath(String assetPath)
Make paths like aa/bb/cc = cc/bb/aa.

Parameters:
assetPath - the path to revert
Returns:
reverted path


Copyright © 2016 agilecoders.de. All Rights Reserved.