/** * @inheritDoc */ public long getLength() throws ValueFormatException, RepositoryException { return property.getLength(); }
/** * {@inheritDoc} */ public long getContentLength() { try { return content.getProperty(JcrConstants.JCR_DATA).getLength(); } catch (RepositoryException e) { log.error("Error while retrieving length of " + content, e); return -1; } }
public static long getDataLength(Node resourceNode, String binaryDataPropName) { try { return resourceNode.getProperty(binaryDataPropName).getLength(); } catch (RepositoryException e) { log.warn("Unable to determine binary data length", e); } return -1; }
public void testDoubleLength() throws RepositoryException { node.setProperty(propertyName1, Math.PI); superuser.save(); checkOperators(propertyName1, node.getProperty(propertyName1).getLength()); }
/** {@inheritDoc} */ public long getLength() throws RepositoryException, RemoteException { try { return property.getLength(); } catch (RepositoryException ex) { throw getRepositoryException(ex); } }
public void testStringLength() throws RepositoryException { node.setProperty(propertyName1, "abc"); superuser.save(); checkOperators(propertyName1, node.getProperty(propertyName1).getLength()); }
public void testLongLength() throws RepositoryException { node.setProperty(propertyName1, 123); superuser.save(); checkOperators(propertyName1, node.getProperty(propertyName1).getLength()); }
public void testDateLength() throws RepositoryException { node.setProperty(propertyName1, Calendar.getInstance()); superuser.save(); checkOperators(propertyName1, node.getProperty(propertyName1).getLength()); }
public void testDecimalLength() throws RepositoryException { node.setProperty(propertyName1, new BigDecimal(123)); superuser.save(); checkOperators(propertyName1, node.getProperty(propertyName1).getLength()); }
public void testLengthDateLiteral() throws RepositoryException { node.setProperty(propertyName1, "abc"); superuser.save(); Calendar length = Calendar.getInstance(); length.setTimeInMillis(node.getProperty(propertyName1).getLength()); executeQueries(propertyName1, QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, vf.createValue(length)); }
public void testLengthDecimalLiteral() throws RepositoryException { node.setProperty(propertyName1, "abc"); superuser.save(); BigDecimal length = new BigDecimal(node.getProperty(propertyName1).getLength()); executeQueries(propertyName1, QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, vf.createValue(length)); }
public void testBinaryLength() throws RepositoryException { byte[] data = "abc".getBytes(); Binary b = vf.createBinary(new ByteArrayInputStream(data)); try { node.setProperty(propertyName1, b); } finally { b.dispose(); } superuser.save(); checkOperators(propertyName1, node.getProperty(propertyName1).getLength()); }
@Override public long getContentLength() { if (!isExist()) { return 0; } try { return getJCRProperty().getLength(); } catch (RepositoryException re) { throw new RuntimeException(re); } }
@Override public long getContentLength() { if (!isExist()) { return 0; } try { return getJCRProperty().getLength(); } catch (RepositoryException re) { throw new RuntimeException(re); } }
/** * {@inheritDoc} */ public long getSize() { try { assertValid(); return getData().getLength(); } catch (RepositoryException e) { log.error("Error during getSize()", e); return -1; } }
public void testWeakReferenceLength() throws RepositoryException, NotExecutableException { ensureMixinType(node, mixReferenceable); superuser.save(); node.setProperty(propertyName1, vf.createValue(node, true)); superuser.save(); checkOperators(propertyName1, node.getProperty(propertyName1).getLength()); }
public void testLengthBinaryLiteral() throws RepositoryException { node.setProperty(propertyName1, "abc"); superuser.save(); String length = String.valueOf(node.getProperty(propertyName1).getLength()); Binary b = vf.createBinary(new ByteArrayInputStream(length.getBytes())); try { executeQueries(propertyName1, QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, vf.createValue(b)); } finally { b.dispose(); } }
@Override public Bytes length() { try { return Bytes.bytes(model.getProperty().getLength()); } catch (RepositoryException e) { return null; } }
public long getLength(Property property) throws RepositoryException { if (getPrevious() != null) { return getPrevious().getLength(property); } else { return property.getLength(); } }
@Test public void validateMigration() throws RepositoryException, IOException { verifyContent(session); verifyBlob(session); assertEquals(0, session.getNode("/libs/sling/xss/config.xml/jcr:content").getProperty("jcr:data").getLength()); } }