Package com.xwiki.admintools.rest
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
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponseFlush the cache of the XWiki instance, including all wikis, plugins and renderers.default javax.ws.rs.core.ResponseFlush all JMX managed caches.default javax.ws.rs.core.ResponseflushJMXEntryCache(String cacheName) Flush a single JMX managed cache identified by its name.javax.ws.rs.core.ResponseAccess the content of a specific file, based on received type.javax.ws.rs.core.ResponsegetFiles()Download an archive with the requested files.default javax.ws.rs.core.ResponseuploadPackageArchive(String attachReference, String jobId) Start a package upload job based on the attachment reference that was sent.
-
Method Details
-
getFile
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.XWikiRestExceptionDownload 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.XWikiRestExceptionFlush 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.XWikiRestExceptionFlush 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
-