Class SharedObjectUtil

java.lang.Object
org.pentaho.di.shared.SharedObjectUtil

public class SharedObjectUtil extends Object
Utilities for dealing with Shared Objects
  • Constructor Details

    • SharedObjectUtil

      public SharedObjectUtil()
  • Method Details

    • collectChangedSharedObjects

      public static Map<org.pentaho.di.shared.SharedObjectsIO.SharedObjectType,Map<String,SharedObjectUtil.ComparedState>> collectChangedSharedObjects(AbstractMeta sourceMeta, org.pentaho.di.core.bowl.Bowl targetBowl, IRepositoryImporter importer) throws org.pentaho.di.core.exception.KettleException
      Collects the changes that would be made by moveAllSharedObjects(). This method makes no changes.
      Parameters:
      sourceMeta - File we are moving objects out of
      targetBowl - bowl we are moving objects into
      Returns:
      Map<SharedObjectType,Map<String,ComparedState>> results of comparison. Inner map key is the name of the object
      Throws:
      org.pentaho.di.core.exception.KettleException
    • collectChangedSharedObjects

      public static <T extends org.pentaho.di.shared.SharedObjectInterface<T> & org.pentaho.di.repository.RepositoryElementInterface> Map<String,SharedObjectUtil.ComparedState> collectChangedSharedObjects(SharedObjectsManagementInterface<T> sourceManager, SharedObjectsManagementInterface<T> targetManager, IRepositoryImporter importer) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • moveAllSharedObjects

      public static void moveAllSharedObjects(AbstractMeta sourceMeta, org.pentaho.di.core.bowl.Bowl targetBowl) throws org.pentaho.di.core.exception.KettleException
      Moves all shared objects from the source to the target, overwriting on conflict (case insensitive)
      Throws:
      org.pentaho.di.core.exception.KettleException
    • copySharedObjects

      public static void copySharedObjects(org.pentaho.di.core.bowl.Bowl sourceBowl, AbstractMeta targetMeta, boolean onlyUsedDbs) throws org.pentaho.di.core.exception.KettleException
      Copies shared objects from the source bowl to the target AbstractMeta if they aren't already there. If onlyUsedDbs is true, the only database connections that will be copied will be those used by the target meta.
      Parameters:
      sourceBowl -
      targetMeta -
      Throws:
      org.pentaho.di.core.exception.KettleException
    • moveAll

      public static <T extends org.pentaho.di.shared.SharedObjectInterface<T> & org.pentaho.di.repository.RepositoryElementInterface> void moveAll(SharedObjectsManagementInterface<T> sourceManager, SharedObjectsManagementInterface<T> targetManager) throws org.pentaho.di.core.exception.KettleException
      Moves all shared objects from the source manager to the target manager, overwriting existing objects (case insensitive)
      Type Parameters:
      T -
      Parameters:
      sourceManager -
      targetManager -
      Throws:
      org.pentaho.di.core.exception.KettleException
    • copyAll

      public static <T extends org.pentaho.di.shared.SharedObjectInterface<T> & org.pentaho.di.repository.RepositoryElementInterface> void copyAll(SharedObjectsManagementInterface<T> sourceManager, SharedObjectsManagementInterface<T> targetManager, boolean overwrite) throws org.pentaho.di.core.exception.KettleException
      Copies all the shared objects from the source manager to the target manager. If overwrite is true, copy will happen whether or not the target manager already has the object (case insensitive). If overwrite is false, copy will not happen if the target manager already has the object
      Parameters:
      sourceManager -
      targetManager -
      overwrite -
      Throws:
      org.pentaho.di.core.exception.KettleException
    • copyUsedDbConnections

      public static void copyUsedDbConnections(org.pentaho.di.core.bowl.Bowl sourceBowl, AbstractMeta targetMeta) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • patchDatabaseConnections

      public static void patchDatabaseConnections(org.pentaho.di.core.bowl.Bowl bowl, AbstractMeta meta) throws org.pentaho.di.core.exception.KettleException
      updates all the database connections from the bowl in the meta. Updates ObjectIds before import to the repository. Call after moveAllSharedObjects.
      Parameters:
      bowl -
      meta -
      Throws:
      org.pentaho.di.core.exception.KettleException
    • stripObjectIds

      public static void stripObjectIds(AbstractMeta meta) throws org.pentaho.di.core.exception.KettleException
      Remove ObjectIds from all the Local objects. Use before serializing to some format that should not contain object ids from the repository.
      Parameters:
      meta -
      Throws:
      org.pentaho.di.core.exception.KettleException
    • stripObjectIds

      public static <T extends org.pentaho.di.shared.SharedObjectInterface<T> & org.pentaho.di.repository.RepositoryElementInterface> void stripObjectIds(SharedObjectsManagementInterface<T> manager) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException