Class PathFactoryLogger

java.lang.Object
org.apache.jackrabbit.spi.commons.logging.AbstractLogger
org.apache.jackrabbit.spi.commons.logging.PathFactoryLogger
All Implemented Interfaces:
PathFactory

public class PathFactoryLogger extends AbstractLogger implements PathFactory
Log wrapper for a PathFactory.
  • Constructor Details

    • PathFactoryLogger

      public PathFactoryLogger(PathFactory pathFactory, LogWriter writer)
      Create a new instance for the given pathFactory which uses writer for persisting log messages.
      Parameters:
      pathFactory -
      writer -
  • Method Details

    • getPathFactory

      public PathFactory getPathFactory()
      Returns:
      the wrapped PathFactory
    • create

      public Path create(Path parent, Path relPath, boolean normalize) throws RepositoryException
      Description copied from interface: PathFactory
      Return a new Path out of the given parent path and the given relative path. If normalize is true, the returned path will be normalized (or canonicalized, if the parent path is absolute).
      Specified by:
      create in interface PathFactory
      Parameters:
      parent -
      relPath -
      normalize -
      Returns:
      Throws:
      RepositoryException - If the normalized is true and the resulting path cannot be normalized.
    • create

      public Path create(Path parent, Name name, boolean normalize) throws RepositoryException
      Description copied from interface: PathFactory
      Creates a new Path out of the given parent path and the give name. If normalize is true, the returned path will be normalized (or canonicalized, if the parent path is absolute). Use PathFactory.create(Path, Name, int, boolean) in order to build a Path having an index with his name element.
      Specified by:
      create in interface PathFactory
      Parameters:
      parent - the parent path
      name - the name of the new path element.
      normalize - If true the Path is normalized before being returned.
      Returns:
      Throws:
      RepositoryException - If the normalized is true and the resulting path cannot be normalized.
    • create

      public Path create(Path parent, Name name, int index, boolean normalize) throws RepositoryException
      Description copied from interface: PathFactory
      Creates a new Path out of the given parent path and the give name and normalized index. See also PathFactory.create(Path, Name, boolean).
      Specified by:
      create in interface PathFactory
      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 the normalized is true and the resulting path cannot be normalized.
    • create

      public Path create(Name name)
      Description copied from interface: PathFactory
      Creates a relative path based on a Name.
      Specified by:
      create in interface PathFactory
      Parameters:
      name - single Name for this relative path.
      Returns:
      the relative path created from name.
    • create

      public Path create(Name name, int index)
      Description copied from interface: PathFactory
      Creates a relative path based on a Name and a normalized index. Same as PathFactory.create(Name) but allows to explicitly specify an index.
      Specified by:
      create in interface PathFactory
      Parameters:
      name - single Name for this relative path.
      index - index of the single name element.
      Returns:
      the relative path created from name and normalizedIndex.
    • create

      public Path create(Path.Element element)
      Description copied from interface: PathFactory
      Creates a path from the given element.
      Specified by:
      create in interface PathFactory
      Parameters:
      element - path element
      Returns:
      the created path
    • create

      public Path create(Path.Element[] elements)
      Description copied from interface: PathFactory
      Create a new Path from the given elements.
      Specified by:
      create in interface PathFactory
      Parameters:
      elements -
      Returns:
      the Path created from the elements.
    • create

      public Path create(String pathString)
      Description copied from interface: PathFactory
      Returns a Path holding the value of the specified string. The string must be in the format returned by the Path.getString() method.
      Specified by:
      create in interface PathFactory
      Parameters:
      pathString - a String containing the Path representation to be parsed.
      Returns:
      the Path represented by the argument
      See Also:
    • createElement

      public Path.Element createElement(Name name)
      Description copied from interface: PathFactory
      Creates a path element from the given name. The created path element does not contain an explicit index.

      If the specified name denotes a special path element (either PathFactory.getParentElement(), PathFactory.getCurrentElement() or PathFactory.getRootElement()) then the associated constant is returned.

      Specified by:
      createElement in interface PathFactory
      Parameters:
      name - the name of the element
      Returns:
      a path element
    • createElement

      public Path.Element createElement(Name name, int index)
      Description copied from interface: PathFactory
      Same as PathFactory.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() or PathFactory.getRootElement()) since an explicit index is not allowed in this context.

      Specified by:
      createElement in interface PathFactory
      Parameters:
      name - the name of the element
      index - the index if the element.
      Returns:
      a path element
    • createElement

      public Path.Element createElement(String identifier) throws IllegalArgumentException
      Description copied from interface: PathFactory
      Creates a path element from the given identifier.
      Specified by:
      createElement in interface PathFactory
      Parameters:
      identifier - Node identifier for which the path element should be created.
      Returns:
      a path element.
      Throws:
      IllegalArgumentException - If the identifier is null.
    • getCurrentElement

      public Path.Element getCurrentElement()
      Description copied from interface: PathFactory
      Return the current element.
      Specified by:
      getCurrentElement in interface PathFactory
      Returns:
      the current element.
    • getParentElement

      public Path.Element getParentElement()
      Description copied from interface: PathFactory
      Return the parent element.
      Specified by:
      getParentElement in interface PathFactory
      Returns:
      the parent element.
    • getRootElement

      public Path.Element getRootElement()
      Description copied from interface: PathFactory
      Return the root element.
      Specified by:
      getRootElement in interface PathFactory
      Returns:
      the root element.
    • getRootPath

      public Path getRootPath()
      Description copied from interface: PathFactory
      Return the Path of the root node.
      Specified by:
      getRootPath in interface PathFactory
      Returns:
      the Path of the root node.