Interface AdminToolsResource

  • All Superinterfaces:
    org.xwiki.rest.XWikiRestComponent

    public interface AdminToolsResource
    extends org.xwiki.rest.XWikiRestComponent
    Provides the APIs needed by the Admin Tools server in order to download and view configuration files and logs.
    Version:
    $Id$
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response flushCache()
      Flush the cache of the XWiki instance, including all wikis, plugins and renderers.
      default javax.ws.rs.core.Response flushJMXCache()
      Flush all JMX managed caches.
      default javax.ws.rs.core.Response flushJMXEntryCache​(String cacheName)
      Flush a single JMX managed cache identified by its name.
      javax.ws.rs.core.Response getFile​(String type)
      Access the content of a specific file, based on received type.
      javax.ws.rs.core.Response getFiles()
      Download an archive with the requested files.
      default javax.ws.rs.core.Response uploadPackageArchive​(String attachReference, String jobId)
      Start a package upload job based on the attachment reference that was sent.
    • Method Detail

      • getFile

        javax.ws.rs.core.Response getFile​(String type)
                                   throws org.xwiki.rest.XWikiRestException
        Access the content of a specific file, based on received type.
        Parameters:
        type - identifier of the requested file.
        Returns:
        the content of this file.
        Throws:
        org.xwiki.rest.XWikiRestException - if an error occurred while accessing the file.
      • getFiles

        javax.ws.rs.core.Response getFiles()
                                    throws org.xwiki.rest.XWikiRestException
        Download an archive with the requested files.
        Returns:
        an archive with files.
        Throws:
        org.xwiki.rest.XWikiRestException - if an error occurred while getting the archive.
      • flushCache

        javax.ws.rs.core.Response flushCache()
                                      throws org.xwiki.rest.XWikiRestException
        Flush the cache of the XWiki instance, including all wikis, plugins and renderers.
        Returns:
        the status of the operation.
        Throws:
        org.xwiki.rest.XWikiRestException - if an error occurred while flushing the cache.
      • uploadPackageArchive

        @Unstable
        default javax.ws.rs.core.Response uploadPackageArchive​(String attachReference,
                                                               String jobId)
                                                        throws org.xwiki.rest.XWikiRestException
        Start a package upload job based on the attachment reference that was sent.
        Parameters:
        attachReference - the reference of the attachment.
        jobId - a unique id for the job.
        Returns:
        HTML status code 202 to hint that the upload job has started; Return status code 102 if the job already exists and is in progress; Return status code 401 if the user does not have admin rights; Return status code 500 if there is any error.
        Throws:
        org.xwiki.rest.XWikiRestException - if an error occurred while creating the job, or if the user lacks admin rights.
        Since:
        1.1
      • flushJMXCache

        @Unstable
        default javax.ws.rs.core.Response flushJMXCache()
                                                 throws org.xwiki.rest.XWikiRestException
        Flush all JMX managed caches.
        Returns:
        the status of the operation
        Throws:
        org.xwiki.rest.XWikiRestException - if an error occurred while flushing the cache
        Since:
        1.4
      • flushJMXEntryCache

        @Unstable
        default javax.ws.rs.core.Response flushJMXEntryCache​(String cacheName)
                                                      throws org.xwiki.rest.XWikiRestException
        Flush a single JMX managed cache identified by its name.
        Parameters:
        cacheName - the name of the cache to flush
        Returns:
        the status of the operation
        Throws:
        org.xwiki.rest.XWikiRestException - if an error occurred while flushing the cache
        Since:
        1.4