Interface UnsavedContentReferenceManager


  • @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public interface UnsavedContentReferenceManager
    Manager that can be used to find (and save) the resources that have been modified during the editing of a document that contained the expanded references to these resources.
    Since:
    23
    • Method Detail

      • getUnsavedReferencesList

        java.util.List<java.net.URL> getUnsavedReferencesList()
        Get the URLs of all the references for which the changes were not saved.
        Returns:
        The unsaved references URLs. Can be an empty list if there are no such references.
      • getUnsavedReferencedNodeDescriptors

        java.util.List<UnsavedReferenceNodeDescriptor> getUnsavedReferencedNodeDescriptors()
        Get the descriptors of nodes that correspond to all unsaved references.
        Returns:
        The descriptors of nodes corresponding to all unsaved references. Can be an empty list if there are no such references.
      • getUnsavedReferenceInputStream

        java.io.InputStream getUnsavedReferenceInputStream​(java.net.URL referenceUrl)
                                                    throws java.io.IOException
        Get the input stream of the specified reference (whose modifications are not saved). This input stream offers the entire content of the reference, with all the unsaved modifications applied.
        Parameters:
        referenceUrl - The reference URL.
        Returns:
        The input stream.
        Throws:
        java.io.IOException - Can be thrown due to incorrect system id, unsupported encodings, files saving permission, etc
      • markReferenceAsSaved

        void markReferenceAsSaved​(java.net.URL referenceUrl)
        Mark the specified reference as saved. Signal to the application that the reference should now be considered as saved.
        Parameters:
        referenceUrl - The reference URL.
      • isDocumentUnsaved

        boolean isDocumentUnsaved()
        Returns:
        true if the document has unsaved changes that are not inside references.
      • markDocumentAsSaved

        void markDocumentAsSaved()
        Mark the document as saved. Signal to the application that the document should now be considered as saved.
        Since:
        23.1