public class FileResource extends AbstractJaxRSResource
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_ZIP |
static String |
PATH_SEPARATOR |
TEXT_HTML
Constructor and Description |
---|
FileResource() |
FileResource(javax.servlet.http.HttpServletResponse httpServletResponse) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
copyFiles(String pathId,
Integer mode,
String params) |
javax.ws.rs.core.Response |
createFile(String pathId,
InputStream fileContents) |
javax.ws.rs.core.Response |
doDeleteFiles(String params) |
javax.ws.rs.core.Response |
doDeleteFilesPermanent(String params) |
javax.ws.rs.core.Response |
doDeleteLocale(String pathId,
String locale) |
String |
doGetCanAccess(String pathId,
String permissions) |
List<Setting> |
doGetCanAccessList(String pathId,
String permissions) |
String |
doGetCanAdminister() |
String |
doGetCanCreate() |
org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto |
doGetChildren(String pathId,
Integer depth,
String filter,
Boolean showHidden) |
org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto |
doGetContentCreator(String pathId) |
List<org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto> |
doGetDeletedFiles() |
javax.ws.rs.core.Response |
doGetDirAsZip(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile) |
javax.ws.rs.core.Response |
doGetDirAsZip(String pathId) |
org.pentaho.platform.repository2.unified.webservices.RepositoryFileAclDto |
doGetFileAcl(String pathId) |
javax.ws.rs.core.Response |
doGetFileAsInline(String pathId) |
List<org.pentaho.platform.repository2.unified.webservices.LocaleMapDto> |
doGetFileLocales(String pathId) |
javax.ws.rs.core.Response |
doGetFileOrDir(org.pentaho.platform.api.repository2.unified.RepositoryFile repoFile)
Overloaded this method to try and reduce calls to the repository
|
javax.ws.rs.core.Response |
doGetFileOrDir(String pathId)
Overloaded this method to try and reduce calls to the repository
|
javax.ws.rs.core.Response |
doGetFileOrDirAsDownload(String pathId,
String strWithManifest)
Compatibility endpoint for browsers since you can't specify Accepts headers in browsers Added path param withManifest to indicate that manifest containing
ACL and metadata should be included
|
List<org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto> |
doGetGeneratedContent(String pathId) |
List<org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto> |
doGetGeneratedContentForSchedule(String lineageId) |
List<org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto> |
doGetGeneratedContentForUser(String pathId,
String user) |
List<org.pentaho.platform.repository2.unified.webservices.StringKeyStringValueDto> |
doGetLocaleProperties(String pathId,
String locale) |
List<org.pentaho.platform.repository2.unified.webservices.StringKeyStringValueDto> |
doGetMetadata(String pathId) |
org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto |
doGetProperties(String pathId) |
org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto |
doGetRootChildren(Integer depth,
String filter,
Boolean showHidden) |
org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto |
doGetRootProperties() |
String |
doIsParameterizable(String pathId) |
javax.ws.rs.core.Response |
doRename(String pathId,
String newName) |
javax.ws.rs.core.Response |
doRestore(String params) |
javax.ws.rs.core.Response |
doSetLocaleProperties(String pathId,
String locale,
List<org.pentaho.platform.repository2.unified.webservices.StringKeyStringValueDto> properties) |
javax.ws.rs.core.Response |
doSetMetadata(String pathId,
List<org.pentaho.platform.repository2.unified.webservices.StringKeyStringValueDto> metadata)
Even though the hidden flag is a property of the file node itself, and not the metadata child, it is considered metadata from PUC and is included in the
setMetadata call
|
static org.pentaho.platform.api.engine.IAuthorizationPolicy |
getPolicy() |
static org.pentaho.platform.api.repository2.unified.IUnifiedRepository |
getRepository() |
static org.pentaho.platform.repository2.unified.webservices.DefaultUnifiedRepositoryWebService |
getRepoWs() |
org.pentaho.platform.repository.RepositoryDownloadWhitelist |
getWhitelist() |
static String |
idToPath(String pathId) |
javax.ws.rs.core.Response |
setContentCreator(String pathId,
org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto contentCreator) |
javax.ws.rs.core.Response |
setFileAcls(String pathId,
org.pentaho.platform.repository2.unified.webservices.RepositoryFileAclDto acl) |
void |
setWhitelist(org.pentaho.platform.repository.RepositoryDownloadWhitelist whitelist) |
setHttpHeaders
public static final String PATH_SEPARATOR
public static final String APPLICATION_ZIP
public FileResource()
public FileResource(javax.servlet.http.HttpServletResponse httpServletResponse)
public javax.ws.rs.core.Response doDeleteFiles(String params)
public javax.ws.rs.core.Response doDeleteFilesPermanent(String params)
public javax.ws.rs.core.Response doRestore(String params)
public javax.ws.rs.core.Response createFile(String pathId, InputStream fileContents) throws IOException
IOException
public javax.ws.rs.core.Response doGetFileOrDir(String pathId) throws FileNotFoundException
pathId
- FileNotFoundException
public javax.ws.rs.core.Response doGetFileOrDir(org.pentaho.platform.api.repository2.unified.RepositoryFile repoFile) throws FileNotFoundException
repoFile
- FileNotFoundException
public javax.ws.rs.core.Response doGetDirAsZip(String pathId)
public javax.ws.rs.core.Response doGetDirAsZip(org.pentaho.platform.api.repository2.unified.RepositoryFile repositoryFile)
repositoryFile
- public String doIsParameterizable(String pathId) throws FileNotFoundException
FileNotFoundException
public javax.ws.rs.core.Response doGetFileOrDirAsDownload(String pathId, String strWithManifest) throws FileNotFoundException
pathId
- FileNotFoundException
public javax.ws.rs.core.Response doGetFileAsInline(String pathId) throws FileNotFoundException
FileNotFoundException
public javax.ws.rs.core.Response setFileAcls(String pathId, org.pentaho.platform.repository2.unified.webservices.RepositoryFileAclDto acl)
public javax.ws.rs.core.Response setContentCreator(String pathId, org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto contentCreator)
public List<org.pentaho.platform.repository2.unified.webservices.LocaleMapDto> doGetFileLocales(String pathId)
public List<org.pentaho.platform.repository2.unified.webservices.StringKeyStringValueDto> doGetLocaleProperties(String pathId, String locale)
public javax.ws.rs.core.Response doSetLocaleProperties(String pathId, String locale, List<org.pentaho.platform.repository2.unified.webservices.StringKeyStringValueDto> properties)
public org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto doGetRootProperties()
public String doGetCanAdminister()
public String doGetCanCreate()
public org.pentaho.platform.repository2.unified.webservices.RepositoryFileAclDto doGetFileAcl(String pathId)
public org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto doGetProperties(String pathId)
public org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto doGetContentCreator(String pathId)
public List<org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto> doGetGeneratedContent(String pathId)
public List<org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto> doGetGeneratedContentForUser(String pathId, String user)
public List<org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto> doGetGeneratedContentForSchedule(String lineageId)
public org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto doGetRootChildren(Integer depth, String filter, Boolean showHidden)
public org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto doGetChildren(String pathId, Integer depth, String filter, Boolean showHidden)
public List<org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto> doGetDeletedFiles()
public List<org.pentaho.platform.repository2.unified.webservices.StringKeyStringValueDto> doGetMetadata(String pathId)
public javax.ws.rs.core.Response doSetMetadata(String pathId, List<org.pentaho.platform.repository2.unified.webservices.StringKeyStringValueDto> metadata)
pathId
- metadata
- public org.pentaho.platform.repository.RepositoryDownloadWhitelist getWhitelist()
public void setWhitelist(org.pentaho.platform.repository.RepositoryDownloadWhitelist whitelist)
public static org.pentaho.platform.api.engine.IAuthorizationPolicy getPolicy()
public static org.pentaho.platform.api.repository2.unified.IUnifiedRepository getRepository()
public static org.pentaho.platform.repository2.unified.webservices.DefaultUnifiedRepositoryWebService getRepoWs()