All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.exhibitor.core.rest.UITabImpl Maven / Gradle / Ivy

/*
 * Copyright 2012 Netflix, Inc.
 *
 *    Licensed 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.netflix.exhibitor.core.rest;

import javax.ws.rs.core.UriInfo;

@SuppressWarnings("UnusedDeclaration")
public class UITabImpl implements UITab
{
    private final String        name;
    private final String        content;

    public UITabImpl()
    {
        name = "";
        content = "";
    }

    public UITabImpl(String name)
    {
        this.name = name;
        content = "";
    }

    public UITabImpl(String name, String content)
    {
        this.name = name;
        this.content = content;
    }

    /**
     * Return the tab name
     *
     * @return name
     */
    @Override
    public String       getName()
    {
        return name;
    }

    /**
     * Return the content (as text/plain) for the tab
     * @return content
     * @throws Exception errors
     * @param info request info
     */
    @Override
    public String       getContent(UriInfo info) throws Exception
    {
        return content;
    }

    @Override
    public boolean contentIsHtml()
    {
        return false;
    }

    @Override
    public UITabType getUITabType()
    {
        return UITabType.SIMPLE;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy