public class RepositoryPublishService extends Object
Modifier and Type | Field and Description |
---|---|
protected IPlatformImporter |
platformImporter |
protected org.pentaho.platform.api.engine.IAuthorizationPolicy |
policy |
Constructor and Description |
---|
RepositoryPublishService() |
Modifier and Type | Method and Description |
---|---|
protected org.pentaho.platform.api.repository2.unified.IPlatformImportBundle |
buildBundle(String pathId,
InputStream fileContents,
Boolean overwriteFile)
Deprecated.
|
protected IPlatformImporter |
getPlatformImporter() |
protected org.pentaho.platform.api.engine.IAuthorizationPolicy |
getPolicy() |
protected org.pentaho.platform.api.repository2.unified.IPlatformImportBundle |
prepareBundle(String fullPath,
InputStream fileContents,
Optional<Properties> fileProperties) |
void |
publishFile(String pathId,
InputStream fileContents,
Boolean overwriteFile)
Deprecated.
|
void |
publishFile(String pathId,
InputStream fileContents,
Optional<Properties> fileProperties)
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 org.pentaho.platform.api.engine.IAuthorizationPolicy policy
protected IPlatformImporter platformImporter
@Deprecated public void writeFile(String pathId, InputStream fileContents, Boolean overwriteFile) throws PlatformImportException, org.pentaho.platform.api.engine.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
org.pentaho.platform.api.engine.PentahoAccessControlException
@Deprecated public void publishFile(String pathId, InputStream fileContents, Boolean overwriteFile) throws PlatformImportException, org.pentaho.platform.api.engine.PentahoAccessControlException
#publishFile(String, InputStream, Boolean, String)
We keep the method for backward compatibilityPlatformImportException
org.pentaho.platform.api.engine.PentahoAccessControlException
public void publishFile(String pathId, InputStream fileContents, Optional<Properties> fileProperties) throws PlatformImportException, org.pentaho.platform.api.engine.PentahoAccessControlException
overwrite
is true
pathId
- slash-separated path for the repository file /path/to/file/id
fileContents
- input stream containing the dataoptions
- any options which can be applied to the fileorg.pentaho.platform.api.engine.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 org.pentaho.platform.api.engine.PentahoAccessControlException
org.pentaho.platform.api.engine.PentahoAccessControlException
protected org.pentaho.platform.api.engine.IAuthorizationPolicy getPolicy()
protected IPlatformImporter getPlatformImporter()
@Deprecated protected org.pentaho.platform.api.repository2.unified.IPlatformImportBundle buildBundle(String pathId, InputStream fileContents, Boolean overwriteFile)
protected org.pentaho.platform.api.repository2.unified.IPlatformImportBundle prepareBundle(String fullPath, InputStream fileContents, Optional<Properties> fileProperties)
Copyright © 2019 Hitachi Vantara. All rights reserved.