protected void setNodeProperty(String relPath, Node nodeValue) throws RepositoryException { if (hasNode()) { getCheckedOutNode().setProperty(relPath, nodeValue); } }
protected void setLongProperty(String relPath, Long newValue) throws RepositoryException { if (hasNode()) { getCheckedOutNode().setProperty(relPath, newValue); } }
protected void setDateProperty(String relPath, Date date) throws RepositoryException { if (hasNode()) { Calendar cal = Calendar.getInstance(); cal.setTime(date); getCheckedOutNode().setProperty(relPath, cal); } }
protected void setBooleanProperty(String relPath, Boolean newValue) throws RepositoryException { if (hasNode()) { getCheckedOutNode().setProperty(relPath, newValue); } }
protected void setStringProperty(String relPath, String value) throws RepositoryException { if (hasNode()) { Node node = getCheckedOutNode(); if (value == null) { if (node.hasProperty(relPath)) { node.getProperty(relPath).remove(); } } else { node.setProperty(relPath, value); } } }
protected void setStringsProperty(String relPath, String[] values) throws RepositoryException { if (hasNode()) { Node node = getCheckedOutNode(); if (values == null) { if (node.hasProperty(relPath)) { node.getProperty(relPath).remove(); } } else { node.setProperty(relPath, values); } } }
protected Date getDateProperty(String relPath) throws RepositoryException { Calendar cal = null; if (hasNode()) { cal = JcrUtils.getDateProperty(getNode(), relPath, null); } return cal != null ? cal.getTime() : null; }
protected String[] getStringsProperty(String relPath) throws RepositoryException { String[] result = null; if (hasNode() && getNode().hasProperty(relPath)) { Value[] values = getNode().getProperty(relPath).getValues(); result = new String[values.length]; int i = 0; for (Value v : values) { result[i++] = v.getString(); } } return result; }
protected String getStringProperty(String relPath) throws RepositoryException { return hasNode() ? JcrUtils.getStringProperty(getNode(), relPath, null) : null; }
protected Boolean getBooleanProperty(String relPath) throws RepositoryException { return hasNode() ? JcrUtils.getBooleanProperty(getNode(), relPath, null) : null; }
protected Long getLongProperty(String relPath) throws RepositoryException { return hasNode() ? JcrUtils.getLongProperty(getNode(), relPath, null) : null; }
protected Node getNodeProperty(String relPath) throws RepositoryException { return hasNode() ? JcrUtils.getNodeProperty(getNode(), relPath, null) : null; }