public String getValue()

in src/main/java/org/apache/sling/starter/access/models/RestrictionItem.java [48:71]


    public String getValue() throws RepositoryException {
        String v = null;
        if (value instanceof Value) {
            v = ((Value)value).getString();
        } else if (value instanceof Value[]) {
            Value[] va = (Value[])value;
            if (va.length > 0) {
                v = va[0].getString();
            }
        } else if (value instanceof String) {
            v = (String)value;
        } else if (value instanceof String[]) {
            String[] values = (String[])value;
            if (values.length > 0) {
                v = values[0];
            }
        }

        if (v == null) {
            //empty string if no values yet
            v = "";
        }
        return v;
    }