/**
 * hub-common
 *
 * Copyright (C) 2018 Black Duck Software, Inc.
 * http://www.blackducksoftware.com/
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package com.blackducksoftware.integration.hub.notification;

import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.Optional;

import org.apache.commons.lang3.builder.RecursiveToStringStyle;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

import com.blackducksoftware.integration.hub.api.view.CommonNotificationState;
import com.blackducksoftware.integration.hub.service.bucket.HubBucket;

public class NotificationResults {
    private final NotificationViewResults notificationViewResults;
    private final HubBucket hubBucket;

    public NotificationResults(final NotificationViewResults notificationViewResults, final HubBucket hubBucket) {
        super();
        this.notificationViewResults = notificationViewResults;
        this.hubBucket = hubBucket;
    }

    public Collection<CommonNotificationState> getNotificationContentItems() {
        if (notificationViewResults == null) {
            return Collections.emptyList();
        }
        return notificationViewResults.getCommonNotificationStates();
    }

    public HubBucket getHubBucket() {
        return hubBucket;
    }

    public Optional<Date> getLatestNotificationCreatedAtDate() {
        return notificationViewResults.getLatestNotificationCreatedAtDate();
    }

    public Optional<String> getLatestNotificationCreatedAtString() {
        return notificationViewResults.getLatestNotificationCreatedAtString();
    }

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this, RecursiveToStringStyle.JSON_STYLE);
    }

}

@@ -1728,32 +1728,153 @@
 bBucket;%0A    %7D%0A%0A
+    // TODO We should rename this to something like getCommonNotificationStates (but this would be a breaking change...)%0A
     public Colle

Add TODO for major release.