/** * Properly quotes terms in a column visibility expression. If no quoting is needed, then nothing is done. * * * Examples of using quote : * * <pre> * import static org.apache.accumulo.core.security.ColumnVisibility.quote; * . * . * . * ColumnVisibility cv = new ColumnVisibility(quote("A#C") + "&" + quote("FOO")); * </pre> * * @param term term to quote * @return quoted term (unquoted if unnecessary) */ public static String quote(String term) { return new String(quote(term.getBytes(Constants.UTF8)), Constants.UTF8); }
/** * Properly quotes terms in a column visibility expression. If no quoting is needed, then nothing is done. * * * Examples of using quote : * * <pre> * import static org.apache.accumulo.core.security.ColumnVisibility.quote; * . * . * . * ColumnVisibility cv = new ColumnVisibility(quote("A#C") + "&" + quote("FOO")); * </pre> * * @param term term to quote * @return quoted term (unquoted if unnecessary) */ public static String quote(String term) { return new String(quote(term.getBytes(Constants.UTF8)), Constants.UTF8); }