private boolean matchProperty(WebDavProperty prop, String match) { if (prop == null) { return false; } if (LOG.isDebugEnabled()) { LOG.debug("Matching " + prop.getName().toString() + " against " + match); } Object value = prop.getValue(); if (value instanceof Element) { return matchText((Element) value, match); } return matchText(value.toString(), match); }
private boolean matchProperty(WebDavProperty prop, String match) { if (prop == null) { return false; } if (LOG.isDebugEnabled()) { LOG.debug("Matching " + prop.getName().toString() + " against " + match); } Object value = prop.getValue(); if (value instanceof Element) { return matchText((Element) value, match); } return matchText(value.toString(), match); }
/** * Wrap the specified <code>DavProperty</code> in a new <code>SearchResultProperty</code>. * * @param property * @param valueFactory factory used to deserialize the xml value to a JCR value. * @throws RepositoryException if an error occurs while build the property value * @throws IllegalArgumentException if the specified property does have the * required form. * @see #getValues() */ public SearchResultProperty(DavProperty<?> property, ValueFactory valueFactory) throws RepositoryException { super(property.getName(), true); if (!SEARCH_RESULT_PROPERTY.equals(getName())) { throw new IllegalArgumentException("SearchResultProperty may only be created from a property named " + SEARCH_RESULT_PROPERTY.toString()); } List<String> colList = new ArrayList<String>(); List<String> selList = new ArrayList<String>(); List<Value> valList = new ArrayList<Value>(); QueryUtil.parseResultPropertyValue(property.getValue(), colList, selList, valList, valueFactory); columnNames = colList.toArray(new String[colList.size()]); selectorNames = selList.toArray(new String[selList.size()]); values = valList.toArray(new Value[valList.size()]); }
log.warn("DAV: href element expected in the content of " + getName().toString());
log.warn("DAV: href element expected in the content of " + getName().toString());
log.warn("DAV: href element expected in the content of " + getName().toString());
writer.write(StringEscapeUtils.escapeHtml(prop.getName().toString())); writer.write("</dt><dd>"); writer.write(StringEscapeUtils.escapeHtml(text));
writer.write(StringEscapeUtils.escapeHtml(prop.getName().toString())); writer.write("</dt><dd>"); writer.write(StringEscapeUtils.escapeHtml(text));
writer.write(StringEscapeUtils.escapeHtml(prop.getName().toString())); writer.write("</dt><dd>"); writer.write(StringEscapeUtils.escapeHtml(text));
writer.write(StringEscapeUtils.escapeHtml(prop.getName().toString())); writer.write("</dt><dd>"); writer.write(StringEscapeUtils.escapeHtml(text));
writer.write(StringEscapeUtils.escapeHtml(prop.getName().toString())); writer.write("</dt><dd>"); writer.write(StringEscapeUtils.escapeHtml(text));
writer.write(StringEscapeUtils.escapeHtml(prop.getName().toString())); writer.write("</dt><dd>"); writer.write(StringEscapeUtils.escapeHtml(text));
while (iter.hasNext()) { final DavProperty property = iter.next(); attributes.put(property.getName().toString(), property.getValue());
while (iter.hasNext()) { final DavProperty property = iter.next(); attributes.put(property.getName().toString(), property.getValue());
while (iter.hasNext()) { final DavProperty property = iter.next(); attributes.put(property.getName().toString(), property.getValue());
private static void assertPropertyNames(DavPropertyNameSet expected, DavPropertyNameSet result) { assertEquals(expected.getContentSize(), result.getContentSize()); if (!(expected.getContent().containsAll(result.getContent()))) { StringBuilder missing = new StringBuilder(); for (DavPropertyName name : expected.getContent()) { if (!result.contains(name)) { missing.append("- ").append(name.toString()).append('\n'); } } fail("Missing properties : \n" + missing); } }
Map<?, ?> map = file.getContent().getAttributes(); final String name = ((URLFileName) file.getName()).getUserName(); assertTrue(map.containsKey(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); assertEquals(map.get(DeltaVConstants.CREATOR_DISPLAYNAME.toString()), "testUser"); if (name != null) { assertTrue(map.containsKey(DeltaVConstants.COMMENT.toString())); assertEquals("Modified by user " + name, map.get(DeltaVConstants.COMMENT.toString())); assertTrue(map.containsKey(VersionControlledResource.CHECKED_IN.toString())); assertTrue(map.containsKey(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); assertEquals(map.get(DeltaVConstants.CREATOR_DISPLAYNAME.toString()), "testUser"); if (name != null) { assertTrue(map.containsKey(DeltaVConstants.COMMENT.toString())); assertEquals("Modified by user " + name, map.get(DeltaVConstants.COMMENT.toString())); assertTrue(map.containsKey(VersionControlledResource.CHECKED_IN.toString())); builder.setVersioning(opts, false); builder.setCreatorName(opts, null);
Map<?, ?> map = file.getContent().getAttributes(); final String name = ((URLFileName) file.getName()).getUserName(); assertTrue(map.containsKey(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); assertEquals(map.get(DeltaVConstants.CREATOR_DISPLAYNAME.toString()), "testUser"); if (name != null) { assertTrue(map.containsKey(DeltaVConstants.COMMENT.toString())); assertEquals("Modified by user " + name, map.get(DeltaVConstants.COMMENT.toString())); assertTrue(map.containsKey(VersionControlledResource.CHECKED_IN.toString())); assertTrue(map.containsKey(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); assertEquals(map.get(DeltaVConstants.CREATOR_DISPLAYNAME.toString()), "testUser"); if (name != null) { assertTrue(map.containsKey(DeltaVConstants.COMMENT.toString())); assertEquals("Modified by user " + name, map.get(DeltaVConstants.COMMENT.toString())); assertTrue(map.containsKey(VersionControlledResource.CHECKED_IN.toString())); builder.setVersioning(opts, false); builder.setCreatorName(opts, null);
Map<?, ?> map = file.getContent().getAttributes(); final String name = ((URLFileName) file.getName()).getUserName(); assertTrue(map.containsKey(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); if (name != null) { assertEquals(name, map.get(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); assertTrue(map.containsKey(VersionControlledResource.CHECKED_IN.toString())); assertTrue(map.containsKey(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); if (name != null) { assertEquals(name, map.get(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); assertTrue(map.containsKey(VersionControlledResource.CHECKED_IN.toString())); builder.setVersioning(opts, false);
Map<?, ?> map = file.getContent().getAttributes(); final String name = ((URLFileName) file.getName()).getUserName(); assertTrue(map.containsKey(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); if (name != null) { assertEquals(name, map.get(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); assertTrue(map.containsKey(VersionControlledResource.CHECKED_IN.toString())); assertTrue(map.containsKey(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); if (name != null) { assertEquals(name, map.get(DeltaVConstants.CREATOR_DISPLAYNAME.toString())); assertTrue(map.containsKey(VersionControlledResource.CHECKED_IN.toString())); builder.setVersioning(opts, false);