Class UsernameConverter

java.lang.Object
org.kawanfw.sql.api.server.util.UsernameConverter

public class UsernameConverter
extends Object
Usernames must be converted by replacing Windows characters, because they are used as directory names when uploading/downloading Blobs.
Thus following characters are replaced for each username when reading/writing on file system:
 
< : __ac_lt__
> : __ac_gt__
: : __ac_colon__
" : __ac_dbquote__
/ : __ac_fslash__
\ : __ac_bslash__
| : __ac_vbar__
? : __ac_qmark__
∗ : __ac_aster__
 
 
Spaces are also replaced with __ac_sp__.
Since:
5.0.2
Author:
Nicolas de Pomereu
See Also:
DefaultDatabaseConfigurator.getBlobsDirectory(String)
  • Method Details

    • toSpecialChars

      public static String toSpecialChars​(String stringParm)
      Replace back space and specials characters forbidden in Windows file name from ASCII string.
      Parameters:
      stringParm - the string with replaced characters
      Returns:
      the string with original spaces and Windows characters
    • fromSpecialChars

      public static String fromSpecialChars​(String stringParm)
      Replace Windows special character and spaces by clear ASCII text
      Parameters:
      stringParm - the string to replace from the Windows special characters
      Returns:
      the string without special Windows characters