Class PathFactoryLogger
java.lang.Object
org.apache.jackrabbit.spi.commons.logging.AbstractLogger
org.apache.jackrabbit.spi.commons.logging.PathFactoryLogger
- All Implemented Interfaces:
PathFactory
Log wrapper for a
PathFactory.-
Constructor Summary
ConstructorsConstructorDescriptionPathFactoryLogger(PathFactory pathFactory, LogWriter writer) Create a new instance for the givenpathFactorywhich useswriterfor persisting log messages. -
Method Summary
Modifier and TypeMethodDescriptionReturns aPathholding the value of the specified string.Creates a relative path based on aName.Creates a relative path based on aNameand a normalized index.create(Path.Element element) Creates a path from the given element.create(Path.Element[] elements) Create a newPathfrom the given elements.Creates a newPathout of the givenparentpath and the give name.Creates a newPathout of the givenparentpath and the give name and normalized index.Return a newPathout of the givenparentpath and the given relative path.createElement(String identifier) Creates a path element from the givenidentifier.createElement(Name name) Creates a path element from the givenname.createElement(Name name, int index) Same asPathFactory.createElement(Name)except that an explicit index can be specified.Return the current element.Return the parent element.Return the root element.Return thePathof the root node.
-
Constructor Details
-
PathFactoryLogger
Create a new instance for the givenpathFactorywhich useswriterfor persisting log messages.- Parameters:
pathFactory-writer-
-
-
Method Details
-
getPathFactory
- Returns:
- the wrapped PathFactory
-
create
Description copied from interface:PathFactoryReturn a newPathout of the givenparentpath and the given relative path. Ifnormalizeistrue, the returned path will be normalized (or canonicalized, if the parent path is absolute).- Specified by:
createin interfacePathFactory- Parameters:
parent-relPath-normalize-- Returns:
- Throws:
RepositoryException- If thenormalizedistrueand the resulting path cannot be normalized.
-
create
Description copied from interface:PathFactoryCreates a newPathout of the givenparentpath and the give name. Ifnormalizeistrue, the returned path will be normalized (or canonicalized, if the parent path is absolute). UsePathFactory.create(Path, Name, int, boolean)in order to build aPathhaving an index with his name element.- Specified by:
createin interfacePathFactory- Parameters:
parent- the parent pathname- the name of the new path element.normalize- If true the Path is normalized before being returned.- Returns:
- Throws:
RepositoryException- If thenormalizedistrueand the resulting path cannot be normalized.
-
create
Description copied from interface:PathFactoryCreates a newPathout of the givenparentpath and the give name and normalized index. See alsoPathFactory.create(Path, Name, boolean).- Specified by:
createin interfacePathFactory- Parameters:
parent- the parent path.name- the name of the new path element.index- the index of the new path element.normalize- If true the Path is normalized before being returned.- Returns:
- Throws:
RepositoryException- If thenormalizedistrueand the resulting path cannot be normalized.
-
create
Description copied from interface:PathFactoryCreates a relative path based on aName.- Specified by:
createin interfacePathFactory- Parameters:
name- singleNamefor this relative path.- Returns:
- the relative path created from
name.
-
create
Description copied from interface:PathFactoryCreates a relative path based on aNameand a normalized index. Same asPathFactory.create(Name)but allows to explicitly specify an index.- Specified by:
createin interfacePathFactory- Parameters:
name- singleNamefor this relative path.index- index of the single name element.- Returns:
- the relative path created from
nameandnormalizedIndex.
-
create
Description copied from interface:PathFactoryCreates a path from the given element.- Specified by:
createin interfacePathFactory- Parameters:
element- path element- Returns:
- the created path
-
create
Description copied from interface:PathFactoryCreate a newPathfrom the given elements.- Specified by:
createin interfacePathFactory- Parameters:
elements-- Returns:
- the
Pathcreated from the elements.
-
create
Description copied from interface:PathFactoryReturns aPathholding the value of the specified string. The string must be in the format returned by thePath.getString()method.- Specified by:
createin interfacePathFactory- Parameters:
pathString- aStringcontaining thePathrepresentation to be parsed.- Returns:
- the
Pathrepresented by the argument - See Also:
-
createElement
Description copied from interface:PathFactoryCreates a path element from the givenname. The created path element does not contain an explicit index.If the specified name denotes a special path element (either
PathFactory.getParentElement(),PathFactory.getCurrentElement()orPathFactory.getRootElement()) then the associated constant is returned.- Specified by:
createElementin interfacePathFactory- Parameters:
name- the name of the element- Returns:
- a path element
-
createElement
Description copied from interface:PathFactorySame asPathFactory.createElement(Name)except that an explicit index can be specified.Note that an IllegalArgumentException will be thrown if the specified name denotes a special path element (either
PathFactory.getParentElement(),PathFactory.getCurrentElement()orPathFactory.getRootElement()) since an explicit index is not allowed in this context.- Specified by:
createElementin interfacePathFactory- Parameters:
name- the name of the elementindex- the index if the element.- Returns:
- a path element
-
createElement
Description copied from interface:PathFactoryCreates a path element from the givenidentifier.- Specified by:
createElementin interfacePathFactory- Parameters:
identifier- Node identifier for which the path element should be created.- Returns:
- a path element.
- Throws:
IllegalArgumentException- If theidentifierisnull.
-
getCurrentElement
Description copied from interface:PathFactoryReturn the current element.- Specified by:
getCurrentElementin interfacePathFactory- Returns:
- the current element.
-
getParentElement
Description copied from interface:PathFactoryReturn the parent element.- Specified by:
getParentElementin interfacePathFactory- Returns:
- the parent element.
-
getRootElement
Description copied from interface:PathFactoryReturn the root element.- Specified by:
getRootElementin interfacePathFactory- Returns:
- the root element.
-
getRootPath
Description copied from interface:PathFactoryReturn thePathof the root node.- Specified by:
getRootPathin interfacePathFactory- Returns:
- the
Pathof the root node.
-