|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.classloader.Util
public class Util
The Util
provides helper methods for the repository
classloader and its class path entry and resource classes.
This class may not be extended or instantiated, it just contains static utility methods.
Method Summary | |
---|---|
static long |
getLastModificationTime(Property prop)
Returns the last modification time of the property, which is the long value of the jcr:lastModified property of the parent node
of prop . |
static Property |
getProperty(Item item)
Resolves the given item to a Property from
which contents can be read. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Property getProperty(Item item) throws ValueFormatException, RepositoryException
item
to a Property
from
which contents can be read.
The following mechanism is used to derive the contents:
item
is a property, this property is useditem
is a node, three steps are tested:
jcr:content
child node, use that
child node in the next steps. Otherwise continue with the node.jcr:data
property and use that property
if existing.getPrimaryItem
method repeatedly until
a property is returned or until no more primary item is available.null
is
returned. Otherwise if the resulting property is a REFERENCE
property, the node referred to is retrieved and this method is called
recursively with the node. Otherwise, the resulting property is returned.
item
- The Item
to resolve to a Property
.
Property
or null
if
the resolved property is a multi-valued property or the
item
is a node which cannot be resolved to a data
property.
ValueFormatException
- If the item
resolves to a
single-valued REFERENCE
type property which
cannot be resolved to the node referred to.
RepositoryException
- if another error occurrs accessing the
repository.public static long getLastModificationTime(Property prop) throws ItemNotFoundException, PathNotFoundException, AccessDeniedException, RepositoryException
jcr:lastModified
property of the parent node
of prop
. If the parent node does not have a
jcr:lastModified
property the current system time is
returned.
prop
- The property for which to return the last modification time.
jcr:lastModified
property.
ItemNotFoundException
- If the parent node of the property cannot
be retrieved.
AccessDeniedException
- If (read) access to the parent node is
denied.
RepositoryException
- If any other error occurrs accessing the
repository to retrieve the last modification time.
PathNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |