protected Map<String, String> toMetadata(ConnectorPartition partition) {
    if (partition != null && partition instanceof ConnectorPartitionDetail) {
      ConnectorPartitionDetail partitionDetail = (ConnectorPartitionDetail) partition;
      return partitionDetail.getMetadata();
    }

    return null;
  }
  protected StorageDto toStorageDto(ConnectorPartition connectorPartition) {
    if (connectorPartition != null && connectorPartition instanceof ConnectorPartitionDetail) {
      ConnectorPartitionDetail detailMetadata = (ConnectorPartitionDetail) connectorPartition;
      StorageDto storageDto = toStorageDto(detailMetadata.getStorageInfo());
      if (detailMetadata.getAuditInfo() != null) {
        storageDto.setOwner(detailMetadata.getAuditInfo().getCreatedBy());
      }
      return storageDto;
    }

    return null;
  }