public class RepositoryPublishService extends Object
Modifier and Type | Field and Description |
---|---|
protected IPlatformImporter |
platformImporter |
protected IAuthorizationPolicy |
policy |
Constructor and Description |
---|
RepositoryPublishService() |
Modifier and Type | Method and Description |
---|---|
protected IPlatformImportBundle |
buildBundle(String pathId,
InputStream fileContents,
Boolean overwriteFile)
Deprecated.
|
protected IPlatformImporter |
getPlatformImporter() |
protected IAuthorizationPolicy |
getPolicy() |
protected IPlatformImportBundle |
prepareBundle(String fullPath,
InputStream fileContents,
Boolean overwriteFile) |
void |
publishFile(String pathId,
InputStream fileContents,
Boolean overwriteFile)
Publishes the file to the provided path in the repository via registered importers.
|
protected void |
validateAccess()
Check if user has the rights to publish or is administrator
|
void |
writeFile(String pathId,
InputStream fileContents,
Boolean overwriteFile)
Deprecated.
use publishFile(String, InputStream, Boolean) instead
|
protected IAuthorizationPolicy policy
protected IPlatformImporter platformImporter
@Deprecated public void writeFile(String pathId, InputStream fileContents, Boolean overwriteFile) throws PlatformImportException, PentahoAccessControlException
pathId
- path for the repository file
/path/to/file/id
fileContents
- (input stream containing the data)overwriteFile
- (flag to determine whether to overwrite the existing file in the repository or not)
true
PlatformImportException
PentahoAccessControlException
public void publishFile(String pathId, InputStream fileContents, Boolean overwriteFile) throws PlatformImportException, PentahoAccessControlException
overwrite
is true
pathId
- slash-separated path for the repository file /path/to/file/id
fileContents
- input stream containing the dataoverwriteFile
- flag to determine whether to overwrite the existing file in the repository or not true
PentahoAccessControlException
- if current user is not allowed to publish filesPlatformImportException
- rethrows any exception raised in the importerRuntimeException
- rethrows any exception raised in the importerprotected void validateAccess() throws PentahoAccessControlException
PentahoAccessControlException
protected IAuthorizationPolicy getPolicy()
protected IPlatformImporter getPlatformImporter()
@Deprecated protected IPlatformImportBundle buildBundle(String pathId, InputStream fileContents, Boolean overwriteFile)
protected IPlatformImportBundle prepareBundle(String fullPath, InputStream fileContents, Boolean overwriteFile)
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.