transformStream(serviceName, stream) {
    _.set(stream, 'info.notifications', []);
    _.set(stream, 'info.archives', []);
    // asynchronously fetch all notification of a stream
    this.LogsStreamsAlertsService.getAlertIds(serviceName, stream.info.streamId)
      .then((notifications) => {
        _.set(stream, 'info.notifications', notifications);
      });
    // asynchronously fetch all archives of a stream
    this.LogsStreamsArchivesService.getArchiveIds(serviceName, stream.info.streamId)
      .then((archives) => {
        _.set(stream, 'info.archives', archives);
      });
    return stream;
  }
/**
   * add additional data to stream before sending back to controller
   * 1. asynchronously gets notifications of a stream
   * 2. asynchronously gets archives of a stream
   * 3. updates operationStreamMap to get number of streams assigned to each operation
   *
   * @param {any} serviceName
   * @param {any} stream
   * @returns stream object after adding notifications
   * @memberof LogsStreamsService
   */
add additional data to stream before sending back to controller
1. asynchronously gets notifications of a stream
2. asynchronously gets archives of a stream
3. updates operationStreamMap to get number of streams assigned to each operation

@param {any} serviceName
@param {any} stream
@returns stream object after adding notifications
@memberof LogsStreamsService
add additional data to stream before sending back to controller 1 . asynchronously gets notifications of a stream 2 . asynchronously gets archives of a stream 3 . updates operationStreamMap to get number of streams assigned to each operation @param { any } serviceName @param { any } stream @returns stream object after adding notifications @memberof LogsStreamsService
transformStream(serviceName, stream) {
    _.set(stream, 'info.notifications', []);
    _.set(stream, 'info.archives', []);
    this.LogsStreamsAlertsService.getAlertIds(serviceName, stream.info.streamId)
      .then((notifications) => {
        _.set(stream, 'info.notifications', notifications);
      });
    this.LogsStreamsArchivesService.getArchiveIds(serviceName, stream.info.streamId)
      .then((archives) => {
        _.set(stream, 'info.archives', archives);
      });
    return stream;
  }
transformStream ( serviceName , stream ) { _ . set ( stream , 'info.notifications' , [ ] ) ; _ . set ( stream , 'info.archives' , [ ] ) ; this . LogsStreamsAlertsService . getAlertIds ( serviceName , stream . info . streamId ) . then ( ( notifications ) => { _ . set ( stream , 'info.notifications' , notifications ) ; } ) ; this . LogsStreamsArchivesService . getArchiveIds ( serviceName , stream . info . streamId ) . then ( ( archives ) => { _ . set ( stream , 'info.archives' , archives ) ; } ) ; return stream ; }
add additional data to stream before sending back to controller
 1. asynchronously gets notifications of a stream
 2. asynchronously gets archives of a stream
 3. updates operationStreamMap to get number of streams assigned to each operation
add additional data to stream before sending back to controller 1 . asynchronously gets notifications of a stream 2 . asynchronously gets archives of a stream 3 . updates operationStreamMap to get number of streams assigned to each operation
// asynchronously fetch all notification of a stream // asynchronously fetch all archives of a stream