info.magnolia.ui.vaadin.integration.jcr
Class JcrItemUtil
java.lang.Object
info.magnolia.ui.vaadin.integration.jcr.JcrItemUtil
public class JcrItemUtil
- extends Object
Utility methods for item ids used in the container.
The format is:
- for nodes <node identifier>
- for properties <node identifier>@<propertyName>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_NAME_AND_IDENTIFIER_SEPARATOR
public static final String PROPERTY_NAME_AND_IDENTIFIER_SEPARATOR
- String separating property name and node identifier.
- See Also:
- Constant Field Values
JcrItemUtil
public JcrItemUtil()
parseNodeIdentifier
public static String parseNodeIdentifier(String itemId)
- Returns:
- all chars in front of #PROPERTY_NAME_AND_IDENTIFIER_SEPARATOR - if it doesn't contain #PROPERTY_NAME_AND_IDENTIFIER_SEPARATOR the provided itemId (then we assume it's already a nodeId)
parsePropertyName
public static String parsePropertyName(String itemId)
isPropertyItemId
public static boolean isPropertyItemId(String itemId)
getJcrItem
public static javax.jcr.Item getJcrItem(String workspaceName,
String itemId)
throws javax.jcr.RepositoryException
- Returns the JCR Item represented by the given itemId or returns null if it doesn't exist.
- Throws:
javax.jcr.RepositoryException
itemExists
public static boolean itemExists(String workspaceName,
String itemId)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getItemId
public static String getItemId(javax.jcr.Item jcrItem)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getItemId
public static String getItemId(String workspaceName,
String absPath)
throws javax.jcr.RepositoryException
- Returns the itemId for a node at the given path if it exists, otherwise returns null.
- Throws:
javax.jcr.RepositoryException
getJcrItems
public static List<javax.jcr.Item> getJcrItems(String workspaceName,
List<String> ids)
getItemPath
public static String getItemPath(javax.jcr.Item item)
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.