@SuppressWarnings("unused") public List<String> hostClusterChangeDetails(URI hostId,URI clusterId,URI vCenterDataCenterId,boolean isVcenter){
  List<String> result=Lists.newArrayList();
  Host host=_dbClient.queryObject(Host.class,hostId);
  if (host == null) {
    return Lists.newArrayList("Host has been deleted");
  }
  URI oldClusterURI=host.getCluster();
  Cluster oldCluster=null;
  if (!NullColumnValueGetter.isNullURI(oldClusterURI)) {
    oldCluster=_dbClient.queryObject(Cluster.class,oldClusterURI);
  }
  Cluster newCluster=null;
  if (!NullColumnValueGetter.isNullURI(clusterId)) {
    newCluster=_dbClient.queryObject(Cluster.class,clusterId);
  }
  if (newCluster != null && oldCluster != null) {
    result.add(ComputeSystemDialogProperties.getMessage("ComputeSystem.hostClusterChangeDetails",host.getLabel(),oldCluster.getLabel(),newCluster.getLabel()));
  }
 else   if (newCluster == null && oldCluster != null) {
    result.add(ComputeSystemDialogProperties.getMessage("ComputeSystem.hostClusterChangeDetailsRemovedFromCluster",host.getLabel(),oldCluster.getLabel()));
  }
 else   if (newCluster != null && oldCluster == null) {
    result.add(ComputeSystemDialogProperties.getMessage("ComputeSystem.hostClusterChangeDetailsAddedToCluster",host.getLabel(),newCluster.getLabel()));
  }
  if (!NullColumnValueGetter.isNullURI(oldClusterURI) && NullColumnValueGetter.isNullURI(clusterId) && ComputeSystemHelper.isClusterInExport(_dbClient,oldClusterURI)) {
    List<ExportGroup> exportGroups=ComputeSystemControllerImpl.getSharedExports(_dbClient,oldClusterURI);
    for (    ExportGroup export : exportGroups) {
      if (export != null) {
        List<BlockObjectDetails> affectedVolumes=getBlockObjectDetails(hostId,export.getVolumes());
        result.addAll(getVolumeDetails(affectedVolumes,false));
      }
    }
  }
 else   if (NullColumnValueGetter.isNullURI(oldClusterURI) && !NullColumnValueGetter.isNullURI(clusterId) && ComputeSystemHelper.isClusterInExport(_dbClient,clusterId)) {
    List<ExportGroup> exportGroups=ComputeSystemControllerImpl.getSharedExports(_dbClient,clusterId);
    for (    ExportGroup eg : exportGroups) {
      List<BlockObjectDetails> affectedVolumes=getBlockObjectDetails(hostId,eg.getVolumes());
      result.addAll(getVolumeDetails(affectedVolumes,true));
    }
  }
 else   if (!NullColumnValueGetter.isNullURI(oldClusterURI) && !NullColumnValueGetter.isNullURI(clusterId) && !oldClusterURI.equals(clusterId)&& (ComputeSystemHelper.isClusterInExport(_dbClient,oldClusterURI) || ComputeSystemHelper.isClusterInExport(_dbClient,clusterId))) {
    List<ExportGroup> exportGroups=ComputeSystemControllerImpl.getSharedExports(_dbClient,oldClusterURI);
    for (    ExportGroup export : exportGroups) {
      if (export != null) {
        List<BlockObjectDetails> affectedVolumes=getBlockObjectDetails(hostId,export.getVolumes());
        result.addAll(getVolumeDetails(affectedVolumes,false));
      }
    }
    exportGroups=ComputeSystemControllerImpl.getSharedExports(_dbClient,clusterId);
    for (    ExportGroup eg : exportGroups) {
      List<BlockObjectDetails> affectedVolumes=getBlockObjectDetails(hostId,eg.getVolumes());
      result.addAll(getVolumeDetails(affectedVolumes,true));
    }
  }
  return result;
}

@ SuppressWarnings ( "unused" ) public List < String > hostClusterChangeDetails ( URI hostId , URI clusterId , URI vCenterDataCenterId , boolean isVcenter ) { List < String > result = Lists . newArrayList ( ) ; Host host = _dbClient . queryObject ( Host . class , hostId ) ; if ( host == null ) { return Lists . newArrayList ( "Host has been deleted" ) ; } URI oldClusterURI = host . getCluster ( ) ; Cluster oldCluster = null ; if ( ! NullColumnValueGetter . isNullURI ( oldClusterURI ) ) { oldCluster = _dbClient . queryObject ( Cluster . class , oldClusterURI ) ; } Cluster newCluster = null ; if ( ! NullColumnValueGetter . isNullURI ( clusterId ) ) { newCluster = _dbClient . queryObject ( Cluster . class , clusterId ) ; } if ( newCluster != null && oldCluster != null ) { result . add ( ComputeSystemDialogProperties . getMessage ( "ComputeSystem.hostClusterChangeDetails" , host . getLabel ( ) , oldCluster . getLabel ( ) , newCluster . getLabel ( ) ) ) ; } else if ( newCluster == null && oldCluster != null ) { result . add ( ComputeSystemDialogProperties . getMessage ( "ComputeSystem.hostClusterChangeDetailsRemovedFromCluster" , host . getLabel ( ) , oldCluster . getLabel ( ) ) ) ; } else if ( newCluster != null && oldCluster == null ) { result . add ( ComputeSystemDialogProperties . getMessage ( "ComputeSystem.hostClusterChangeDetailsAddedToCluster" , host . getLabel ( ) , newCluster . getLabel ( ) ) ) ; } if ( ! NullColumnValueGetter . isNullURI ( oldClusterURI ) && NullColumnValueGetter . isNullURI ( clusterId ) && ComputeSystemHelper . isClusterInExport ( _dbClient , oldClusterURI ) ) { List < ExportGroup > exportGroups = ComputeSystemControllerImpl . getSharedExports ( _dbClient , oldClusterURI ) ; for ( ExportGroup export : exportGroups ) { if ( export != null ) { List < BlockObjectDetails > affectedVolumes = getBlockObjectDetails ( hostId , export . getVolumes ( ) ) ; result . addAll ( getVolumeDetails ( affectedVolumes , false ) ) ; } } } else if ( NullColumnValueGetter . isNullURI ( oldClusterURI ) && ! NullColumnValueGetter . isNullURI ( clusterId ) && ComputeSystemHelper . isClusterInExport ( _dbClient , clusterId ) ) { List < ExportGroup > exportGroups = ComputeSystemControllerImpl . getSharedExports ( _dbClient , clusterId ) ; for ( ExportGroup eg : exportGroups ) { List < BlockObjectDetails > affectedVolumes = getBlockObjectDetails ( hostId , eg . getVolumes ( ) ) ; result . addAll ( getVolumeDetails ( affectedVolumes , true ) ) ; } } else if ( ! NullColumnValueGetter . isNullURI ( oldClusterURI ) && ! NullColumnValueGetter . isNullURI ( clusterId ) && ! oldClusterURI . equals ( clusterId ) && ( ComputeSystemHelper . isClusterInExport ( _dbClient , oldClusterURI ) || ComputeSystemHelper . isClusterInExport ( _dbClient , clusterId ) ) ) { List < ExportGroup > exportGroups = ComputeSystemControllerImpl . getSharedExports ( _dbClient , oldClusterURI ) ; for ( ExportGroup export : exportGroups ) { if ( export != null ) { List < BlockObjectDetails > affectedVolumes = getBlockObjectDetails ( hostId , export . getVolumes ( ) ) ; result . addAll ( getVolumeDetails ( affectedVolumes , false ) ) ; } } exportGroups = ComputeSystemControllerImpl . getSharedExports ( _dbClient , clusterId ) ; for ( ExportGroup eg : exportGroups ) { List < BlockObjectDetails > affectedVolumes = getBlockObjectDetails ( hostId , eg . getVolumes ( ) ) ; result . addAll ( getVolumeDetails ( affectedVolumes , true ) ) ; } } return result ; }
get details for the hostclusterchange method note : in order to maintain backwards compatibility , do not change the signature of this method .
