001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 *      Portions Copyright 2014-2015 ForgeRock AS
026 */
027
028package org.opends.guitools.controlpanel.ui;
029
030import java.util.HashSet;
031
032import org.opends.guitools.controlpanel.datamodel.AbstractIndexDescriptor;
033import org.opends.guitools.controlpanel.datamodel.AbstractIndexTableModel;
034import org.opends.guitools.controlpanel.datamodel.BackendDescriptor;
035import org.opends.guitools.controlpanel.datamodel.VLVIndexTableModel;
036import org.opends.messages.AdminToolMessages;
037import org.forgerock.i18n.LocalizableMessage;
038
039/**
040 * Panel displaying a table containing the VLV indexes of a backend.
041 *
042 */
043public class BackendVLVIndexesPanel extends AbstractBackendIndexesPanel
044{
045  private static final long serialVersionUID = -5864660402543106492L;
046
047  /** Default constructor. */
048  public BackendVLVIndexesPanel()
049  {
050    super();
051  }
052
053  /** {@inheritDoc} */
054  public LocalizableMessage getTitle()
055  {
056    return AdminToolMessages.INFO_CTRL_PANEL_BACKEND_VLV_INDEXES_TITLE.get();
057  }
058
059  /** {@inheritDoc} */
060  protected AbstractIndexTableModel getIndexTableModel()
061  {
062    return new VLVIndexTableModel();
063  }
064
065  /** {@inheritDoc} */
066  protected void updateTableModel(BackendDescriptor backend)
067  {
068    tableModel.setData(
069        new HashSet<AbstractIndexDescriptor>(backend.getVLVIndexes()),
070        getInfo());
071  }
072}