public class SharedObjects extends Object
Constructor and Description |
---|
SharedObjects() |
SharedObjects(String sharedObjectsFile) |
Modifier and Type | Method and Description |
---|---|
static String |
createFilename(String sharedObjectsFile) |
String |
getFilename() |
Map<org.pentaho.di.shared.SharedObjects.SharedEntry,SharedObjectInterface> |
getObjectsMap() |
DatabaseMeta |
getSharedDatabase(String name)
Get the shared database with the specified name
|
SharedObjectInterface |
getSharedObject(Class<SharedObjectInterface> clazz,
String objectName)
Return the shared object with the given class and name
|
SharedObjectInterface |
getSharedObject(String className,
String objectName)
Return the shared object with the given class name and object name
|
protected OutputStream |
initOutputStreamUsingKettleVFS(org.apache.commons.vfs2.FileObject fileObject) |
void |
removeObject(SharedObjectInterface sharedObject)
Remove the sharedObject from the object map.
|
protected void |
restoreFileFromBackup(String backupFileName)
Call
copyFile(String, String) method to restore file from backup |
void |
saveToFile() |
void |
setFilename(String filename) |
void |
setObjectsMap(Map<org.pentaho.di.shared.SharedObjects.SharedEntry,SharedObjectInterface> objects) |
void |
storeObject(SharedObjectInterface sharedObject)
Store the sharedObject in the object map.
|
String |
toString() |
protected void |
writeToFile(org.apache.commons.vfs2.FileObject fileObject,
String backupFileName)
Write sharedObjects to file.
|
public SharedObjects(String sharedObjectsFile) throws KettleXMLException
KettleXMLException
public SharedObjects() throws KettleXMLException
KettleXMLException
public Map<org.pentaho.di.shared.SharedObjects.SharedEntry,SharedObjectInterface> getObjectsMap()
public void setObjectsMap(Map<org.pentaho.di.shared.SharedObjects.SharedEntry,SharedObjectInterface> objects)
public void storeObject(SharedObjectInterface sharedObject)
sharedObject
- public void removeObject(SharedObjectInterface sharedObject)
sharedObject
- public void saveToFile() throws IOException, KettleException
IOException
KettleException
public SharedObjectInterface getSharedObject(Class<SharedObjectInterface> clazz, String objectName)
clazz
- The class of the shared objectobjectName
- the name of the objectpublic SharedObjectInterface getSharedObject(String className, String objectName)
className
- The class name of the shared objectobjectName
- the name of the objectpublic DatabaseMeta getSharedDatabase(String name)
name
- The name of the shared databasepublic String getFilename()
public void setFilename(String filename)
filename
- the filename to setprotected void writeToFile(org.apache.commons.vfs2.FileObject fileObject, String backupFileName) throws IOException, KettleException
fileObject
- is file for writingbackupFileName
- is backup file nameIOException
KettleException
protected OutputStream initOutputStreamUsingKettleVFS(org.apache.commons.vfs2.FileObject fileObject) throws IOException
IOException
protected void restoreFileFromBackup(String backupFileName) throws IOException, KettleFileException
copyFile(String, String)
method to restore file from backupbackupFileName
- IOException
KettleFileException
Copyright © 2018 Hitachi Vantara. All rights reserved.