Class WebappRepository

    • Constructor Detail

      • WebappRepository

        public WebappRepository​(jakarta.servlet.ServletContext context,
                                java.lang.String path)
      • WebappRepository

        protected WebappRepository​(jakarta.servlet.ServletContext context,
                                   WebappRepository parent,
                                   java.lang.String name)
    • Method Detail

      • getChecksum

        public long getChecksum()
        Description copied from interface: Trackable
        Checksum of the resource content. Implementations should make sure to return a different checksum if the resource's content has changed.
        Returns:
        checksum
      • lastModified

        public long lastModified()
        Description copied from interface: Trackable
        Returns the date the resource was last modified
        Returns:
        last modified date
      • exists

        public boolean exists()
                       throws java.io.IOException
        Description copied from interface: Trackable
        Checks wether this resource actually (still) exists
        Returns:
        true if the resource exists
        Throws:
        java.io.IOException
      • getUrl

        public java.net.URL getUrl()
                            throws java.net.MalformedURLException
        Description copied from interface: Trackable
        Returns an url to the resource if the repository of this resource is able to provide urls.
        Returns:
        url to the resource
        Throws:
        java.net.MalformedURLException
      • lookupResource

        protected Resource lookupResource​(java.lang.String name)
        Description copied from class: AbstractRepository
        Called to create a child resource for this repository if it exists.
        Specified by:
        lookupResource in class AbstractRepository
        Parameters:
        name - the name of the child resource
        Returns:
        the child resource, or null if no resource with the given name exists
      • getResources

        protected void getResources​(java.util.List<Resource> list,
                                    boolean recursive)
                             throws java.io.IOException
        Description copied from class: AbstractRepository
        Add the repository's resources into the list, optionally descending into nested repositories.
        Specified by:
        getResources in class AbstractRepository
        Parameters:
        list - the list to add the resources to
        recursive - whether to descend into nested repositories
        Throws:
        java.io.IOException - an I/O related error occurred
      • getRepositories

        public Repository[] getRepositories()
                                     throws java.io.IOException
        Description copied from interface: Repository
        Returns this repository's direct child repositories
        Returns:
        direct repositories
        Throws:
        java.io.IOException - an I/O error occurred
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object