NodeUtil
instead.@Deprecated public class ContentUtil extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ContentUtil.PostVisitor
Deprecated.
Used in
ContentUtil.Visitor.visit(Content) if the visitor wants to use post order. |
static interface |
ContentUtil.Visitor
Deprecated.
Used in
ContentUtil.Visitor.visit(Content) to visit the hierarchy. |
Modifier and Type | Field and Description |
---|---|
static Content.ContentFilter |
ALL_NODES_CONTENT_FILTER
Deprecated.
Content filter accepting everything.
|
static Content.ContentFilter |
ALL_NODES_EXCEPT_JCR_CONTENT_FILTER
Deprecated.
Content filter accepting everything exept nodes with namespace jcr (version and system store).
|
static Content.ContentFilter |
EXCLUDE_META_DATA_CONTENT_FILTER
Deprecated.
Content filter accepting everything except meta data and jcr types.
|
static Content.ContentFilter |
MAGNOLIA_FILTER
Deprecated.
Content filter accepting all nodes with a nodetype of namespace mgnl.
|
Constructor and Description |
---|
ContentUtil()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static Content |
asContent(javax.jcr.Node content)
Deprecated.
|
static void |
changeNodeType(Content node,
ItemType newType,
boolean replaceAll)
Deprecated.
Utility method to change the
jcr:primaryType value of a node. |
static List<Content> |
collectAllChildren(Content node)
Deprecated.
Get all children recursively (content and contentnode).
|
static List<Content> |
collectAllChildren(Content node,
Content.ContentFilter filter)
Deprecated.
Get all children using a filter.
|
static List<Content> |
collectAllChildren(Content node,
ItemType type)
Deprecated.
Get all children of a particular type.
|
static List<Content> |
collectAllChildren(Content node,
ItemType[] types)
Deprecated.
Get all children of a particular type.
|
static void |
copyInSession(Content src,
String dest)
Deprecated.
Session based copy operation.
|
static Content |
createPath(Content parent,
String path,
ItemType type)
Deprecated.
|
static Content |
createPath(Content parent,
String path,
ItemType type,
boolean save)
Deprecated.
|
static Content |
createPath(HierarchyManager hm,
String path)
Deprecated.
|
static Content |
createPath(HierarchyManager hm,
String path,
boolean save)
Deprecated.
|
static Content |
createPath(HierarchyManager hm,
String path,
ItemType type)
Deprecated.
|
static Content |
createPath(HierarchyManager hm,
String path,
ItemType type,
boolean save)
Deprecated.
|
static void |
deleteAndRemoveEmptyParents(Content node)
Deprecated.
|
static void |
deleteAndRemoveEmptyParents(Content node,
int level)
Deprecated.
|
static Collection<Content> |
getAllChildren(Content node)
Deprecated.
Returns all children (not recursively) independent of there type.
|
static Collection<Content> |
getAllChildren(Content node,
Comparator<Content> comp)
Deprecated.
Returns all children (not recursively) independent of there type.
|
static Content |
getAncestorOfType(Content firstNode,
String nodeType)
Deprecated.
Returns the first found ancestor of the given node which is of the given type,
or the given node itself, it is of the given type.
|
static Content |
getCaseInsensitive(Content node,
String name)
Deprecated.
Get a subnode case insensitive.
|
static Content |
getContent(Content node,
String name)
Deprecated.
Get the node or null if not exists.
|
static Content |
getContent(String repository,
String path)
Deprecated.
Returns a Content object of the named repository or null if not existing.
|
static Content |
getContentByUUID(String repository,
String uuid)
Deprecated.
|
static Content |
getOrCreateContent(Content node,
String name,
ItemType contentType)
Deprecated.
If the node doesn't exist just create it.
|
static Content |
getOrCreateContent(Content node,
String name,
ItemType contentType,
boolean save)
Deprecated.
If the node doesn't exist just create it.
|
static void |
moveInSession(Content src,
String dest)
Deprecated.
Magnolia uses by default workspace move operation to move nodes.
|
static void |
orderAfter(Content nodeToMove,
String targetNodeName)
Deprecated.
Convenient method for ordering a node after a specific target node.
|
static void |
orderBefore(Content nodeToMove,
String targetNodeName)
Deprecated.
Convenient method to order a node before a target node.
|
static void |
orderNodes(Content node,
Comparator<Content> comparator)
Deprecated.
Uses the passed comparator to create the jcr ordering of the children.
|
static void |
orderNodes(Content node,
String[] nodes)
Deprecated.
|
static String |
path2uuid(String repository,
String path)
Deprecated.
|
static void |
rename(Content node,
String newName)
Deprecated.
|
static String |
uuid2path(String repository,
String uuid)
Deprecated.
|
static void |
visit(Content node,
ContentUtil.Visitor visitor)
Deprecated.
|
static void |
visit(Content node,
ContentUtil.Visitor visitor,
Content.ContentFilter filter)
Deprecated.
|
public static Content.ContentFilter ALL_NODES_CONTENT_FILTER
public static Content.ContentFilter ALL_NODES_EXCEPT_JCR_CONTENT_FILTER
public static Content.ContentFilter EXCLUDE_META_DATA_CONTENT_FILTER
public static Content.ContentFilter MAGNOLIA_FILTER
public static Content getContent(String repository, String path)
public static Content getContentByUUID(String repository, String uuid)
public static Content getContent(Content node, String name)
public static Content getOrCreateContent(Content node, String name, ItemType contentType) throws AccessDeniedException, javax.jcr.RepositoryException
AccessDeniedException
javax.jcr.RepositoryException
public static Content getOrCreateContent(Content node, String name, ItemType contentType, boolean save) throws AccessDeniedException, javax.jcr.RepositoryException
AccessDeniedException
javax.jcr.RepositoryException
public static Content getCaseInsensitive(Content node, String name)
public static List<Content> collectAllChildren(Content node)
public static List<Content> collectAllChildren(Content node, Content.ContentFilter filter)
public static List<Content> collectAllChildren(Content node, ItemType type)
public static Collection<Content> getAllChildren(Content node)
public static Collection<Content> getAllChildren(Content node, Comparator<Content> comp)
public static List<Content> collectAllChildren(Content node, ItemType[] types)
public static Content getAncestorOfType(Content firstNode, String nodeType) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static void orderBefore(Content nodeToMove, String targetNodeName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static void orderAfter(Content nodeToMove, String targetNodeName) throws javax.jcr.RepositoryException
NodeUtil.orderAfter(Node, String)
this method won't throw an exception in case the targetNodeName does not exist.javax.jcr.RepositoryException
public static void orderNodes(Content node, String[] nodes) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static void orderNodes(Content node, Comparator<Content> comparator) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static void visit(Content node, ContentUtil.Visitor visitor) throws Exception
Exception
public static void visit(Content node, ContentUtil.Visitor visitor, Content.ContentFilter filter) throws Exception
Exception
public static Content createPath(HierarchyManager hm, String path) throws AccessDeniedException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
public static Content createPath(HierarchyManager hm, String path, boolean save) throws AccessDeniedException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
public static Content createPath(HierarchyManager hm, String path, ItemType type) throws AccessDeniedException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
public static Content createPath(HierarchyManager hm, String path, ItemType type, boolean save) throws AccessDeniedException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
public static Content createPath(Content parent, String path, ItemType type) throws javax.jcr.RepositoryException, javax.jcr.PathNotFoundException, AccessDeniedException
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException
AccessDeniedException
public static Content createPath(Content parent, String path, ItemType type, boolean save) throws javax.jcr.RepositoryException, javax.jcr.PathNotFoundException, AccessDeniedException
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException
AccessDeniedException
public static void deleteAndRemoveEmptyParents(Content node) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public static void deleteAndRemoveEmptyParents(Content node, int level) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public static void copyInSession(Content src, String dest) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static void moveInSession(Content src, String dest) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static void rename(Content node, String newName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static void changeNodeType(Content node, ItemType newType, boolean replaceAll) throws javax.jcr.RepositoryException
jcr:primaryType
value of a node.public static Content asContent(javax.jcr.Node content)
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.