Class XMLPersistenceManager

  • All Implemented Interfaces:
    PersistenceManager

    @Deprecated
    public class XMLPersistenceManager
    extends AbstractPersistenceManager
    Deprecated.
    Please migrate to a bundle persistence manager (JCR-2802)
    XMLPersistenceManager is a FileSystem-based PersistenceManager that persists ItemState and NodeReferences objects in XML format.
    • Field Detail

      • DEFAULT_ENCODING

        public static final Charset DEFAULT_ENCODING
        Deprecated.
        The default encoding used in serialization
    • Constructor Detail

      • XMLPersistenceManager

        public XMLPersistenceManager()
        Deprecated.
        Creates a new XMLPersistenceManager instance.
    • Method Detail

      • getNodePathTemplate

        public String getNodePathTemplate()
        Deprecated.
        Returns the node path template.
        Returns:
        node path template
      • setNodePathTemplate

        public void setNodePathTemplate​(String template)
        Deprecated.
        Sets the node path template.
        Parameters:
        template - node path template
      • init

        public void init​(PMContext context)
                  throws Exception
        Deprecated.
        Initializes the persistence manager. The persistence manager is permanently bound to the given context, and any required external resources are acquired.

        An appropriate exception is thrown if the persistence manager initialization fails for whatever reason. In this case the state of the persistence manager is undefined and the instance should be discarded.

        Parameters:
        context - persistence manager context
        Throws:
        Exception - if the persistence manager initialization failed
      • close

        public void close()
                   throws Exception
        Deprecated.
        Closes the persistence manager. The consistency of the persistent storage is guaranteed and all acquired resources are released. It is an error to invoke any methods on a closed persistence manager, and implementations are free to enforce this constraint by throwing IllegalStateExceptions in such cases.

        An appropriate exception is thrown if the persistence manager could not be closed properly. In this case the state of the persistence manager is undefined and the instance should be discarded.

        Throws:
        Exception - if the persistence manager failed to close properly
      • exists

        public boolean exists​(NodeId id)
                       throws ItemStateException
        Deprecated.
        Checks whether the identified node exists.
        Parameters:
        id - node id
        Returns:
        true if the node exists, false otherwise
        Throws:
        ItemStateException - on persistence manager errors
      • exists

        public boolean exists​(PropertyId id)
                       throws ItemStateException
        Deprecated.
        Checks whether the identified property exists.
        Parameters:
        id - property id
        Returns:
        true if the property exists, false otherwise
        Throws:
        ItemStateException - on persistence manager errors
      • existsReferencesTo

        public boolean existsReferencesTo​(NodeId id)
                                   throws ItemStateException
        Deprecated.
        Checks whether references of the identified target node exist.
        Parameters:
        id - target node id
        Returns:
        true if the references exist, false otherwise
        Throws:
        ItemStateException - on persistence manager errors