Class ReHomeInstance

    • Constructor Detail

      • ReHomeInstance

        public ReHomeInstance()
    • Method Detail

      • reHomeInstance

        protected static clojure.lang.IPersistentMap reHomeInstance​(String userId,
                                                                    clojure.lang.IPersistentMap existing,
                                                                    String newHomeMetadataCollectionId,
                                                                    String newHomeMetadataCollectionName)
        Makes the necessary changes to update a metadata instance's home metadata repository.
        Parameters:
        userId - doing the update
        existing - metadata instance
        newHomeMetadataCollectionId - unique identifier of the instance's new home
        newHomeMetadataCollectionName - name of the instance's new home
        Returns:
        IPersistentMap giving the updated instance representation
      • validate

        protected static void validate​(clojure.lang.IPersistentMap existing,
                                       String metadataCollectionId,
                                       String className,
                                       String methodName)
                                throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException
        Validate the re-home. The instance must originate in the liocal cohort and NOT be locally homed already, or the entity must have an instanceProvenanceType set to external and a replicatedBy that is NOT the local metadataCollectionId. Any other combination indicates a non-reference copy, and therefore cannot be re-homed.
        Parameters:
        existing - metadata instance
        metadataCollectionId - of the metadata instance
        className - calling class
        methodName - calling method
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - if the instance cannot be re-homed