|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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. |
static Property |
getProperty(Item item)
Resolves the given item to a Property . |
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 ItemNotFoundException, ValueFormatException, RepositoryException
item
to a Property
. If the
item
is a node, the getPrimaryItem
method is
called repeatedly until a property is returned or until no more primary
item is available. If the resulting property is a multivalue property,
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.
ItemNotFoundException
- If the item
is a node which
cannot be resolved to a property through (repeated) calls to
Node.getPrimaryItem
.
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
nt:resource
the long
value
of the jcr:lastModified
property of the parent node is
returned. Otherwise the current system time is returned.
prop
- The property for which to return the last modification
time.
nt:resource
node.
ItemNotFoundException
- If the parent node of the property cannot
be retrieved.
PathNotFoundException
- If the "jcr:lastModified" property of the
parent node cannot be retrieved. This exception is unlikely in a
correctly configured repository as the jcr:lastModified property
has to be present in a node of type nt:resource.
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |