Package com.xwiki.admintools.rest
Interface AdminToolsResource
-
- All Superinterfaces:
org.xwiki.rest.XWikiRestComponent
public interface AdminToolsResource extends org.xwiki.rest.XWikiRestComponentProvides 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 Modifier and Type Method Description javax.ws.rs.core.ResponseflushCache()Flush the cache of the XWiki instance, including all wikis, plugins and renderers.javax.ws.rs.core.ResponsegetFile(String type)Access the content of a specific file, based on received type.javax.ws.rs.core.ResponsegetFiles()Download an archive with the requested files.javax.ws.rs.core.ResponseuploadPackageArchive(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.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 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
-
-