Package org.apache.jackrabbit.value

Examples of org.apache.jackrabbit.value.StringValue


        pe = createEntry(testPrincipal, privs, true, restr);
        assertNull(pe.getRestriction(glob));

        restr = new HashMap<String, Value>();
        restr.put(nodePath,  restrictions.get(nodePath));
        restr.put(glob,  new StringValue(""));

        pe = createEntry(testPrincipal, privs, true, restr);
        assertEquals("", pe.getRestriction(glob).getString());

        restr = new HashMap<String, Value>();
View Full Code Here


        // ACLTemplate impl tries to convert the property types if the don't
        // match the required ones.
        Privilege[] privs = privilegesFromName(Privilege.JCR_ALL);

        Map<String, Value> restr = new HashMap<String, Value>();
        restr.put(nodePath, new StringValue("/a/b/c/d"));
        JackrabbitAccessControlEntry pe = createEntry(testPrincipal, privs, true, restr);

        assertEquals("/a/b/c/d", pe.getRestriction(nodePath).getString());
        assertEquals(PropertyType.PATH, pe.getRestriction(nodePath).getType());
View Full Code Here

        return new DateValue(calendar);
    }

    @Converter
    public static Value toValue(String value) {
        return new StringValue(value);
    }
View Full Code Here

                    // this can happen in the case of a reference to an external repository which doesn't use UUIDs as identifiers
                    value = new ExternalReferenceValue(val.getString(), PropertyType.WEAKREFERENCE);
                }
                break;
            case GWTJahiaNodePropertyType.STRING:
                value = new StringValue(val.getString());
                break;
            case GWTJahiaNodePropertyType.UNDEFINED:
                value = new StringValue(val.getString());
                break;
            default:
                value = new StringValue(val.getString());
        }

        return value;
    }
View Full Code Here

        }
        List<Value> values = new LinkedList<Value>();
        String[] categories = StringUtils.split(value, ",");
        for (String categoryKey : categories) {
            try {
                values.add(new StringValue(Category.getCategoryPath(categoryKey.trim())));
            } catch (JahiaException e) {
                logger.warn("Unable to retrieve category path for category key '" + categoryKey + "'. Cause: " + e.getMessage(), e);
            }
        }
        return values;
View Full Code Here

            return row.getScore(selectorName);
        }

        public Value getValue(String columnName) throws ItemNotFoundException, RepositoryException {
            if (columnName.equals(JcrConstants.JCR_PATH)) {
                return new StringValue(getPath());
            }
            Value result = row.getValue(columnName);
            if (result == null && session.getLocale() != null) {
                JCRPropertyWrapper property = null;
                if (!columnName.startsWith("rep:spellcheck(")
View Full Code Here

                if (v instanceof Value) {
                    // create copy of the value
                    value = ValueHelper.copy((Value) v, valueFactory);
                } else {
                    // fallback
                    value = new StringValue(v.toString());
                }
                this.restrictions.put(key.toString(), value);
            }
        }
    }
View Full Code Here

        pe = createEntry(testPrincipal, privs, true, restr);
        assertNull(pe.getRestriction(glob));

        restr = new HashMap();
        restr.put(nodePath,  restrictions.get(nodePath));
        restr.put(glob,  new StringValue(""));

        pe = createEntry(testPrincipal, privs, true, restr);
        assertEquals("", pe.getRestriction(glob).getString());

        restr = new HashMap();
View Full Code Here

        // ACLTemplate impl tries to convert the property types if the don't
        // match the required ones.
        Privilege[] privs = privilegesFromName(Privilege.JCR_ALL);

        Map restr = new HashMap();
        restr.put(nodePath, new StringValue("/a/b/c/d"));
        JackrabbitAccessControlEntry pe = createEntry(testPrincipal, privs, true, restr);

        assertEquals("/a/b/c/d", pe.getRestriction(nodePath).getString());
        assertEquals(PropertyType.PATH, pe.getRestriction(nodePath).getType());
View Full Code Here

                case PropertyType.PATH:
                    return vf.createValue(resolver.getJCRPath((Path) val), PropertyType.PATH);
                case PropertyType.NAME:
                    return vf.createValue(resolver.getJCRName((Name) val), PropertyType.NAME);
                case PropertyType.STRING:
                    return new StringValue((String) val);
                default:
                    throw new RepositoryException("illegal internal value type");
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.value.StringValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.