Package org.nasutekds.guitools.controlpanel.datamodel

Examples of org.nasutekds.guitools.controlpanel.datamodel.ServerDescriptor


  /**
   * {@inheritDoc}
   */
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    ServerDescriptor desc = ev.getNewDescriptor();
    final SortedSet<DN> newElements = new TreeSet<DN>();
    for (BackendDescriptor backend : desc.getBackends())
    {
      if (!backend.isConfigBackend())
      {
        for (BaseDNDescriptor baseDN : backend.getBaseDns())
        {
          newElements.add(baseDN.getDn());
        }
      }
    }
    updateList(newElements);
    updateErrorPaneAndOKButtonIfAuthRequired(desc,
        isLocal() ?
            INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_BASE_DN_DELETE.get() :
      INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get(desc.getHostname()));
  }
View Full Code Here


  /**
   * {@inheritDoc}
   */
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    final ServerDescriptor desc = ev.getNewDescriptor();
    updateErrorPaneIfAuthRequired(desc,
        isLocal() ?
            INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_INDEX_EDITING.get() :
      INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get(desc.getHostname()));
    SwingUtilities.invokeLater(new Runnable()
    {
      /**
       * {@inheritDoc}
       */
 
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    ServerDescriptor desc = ev.getNewDescriptor();
    if (updateLayout(desc))
    {
      updateErrorPaneAndOKButtonIfAuthRequired(desc,
         isLocal() ? INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_NEW_VLV.get() :
      INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get(desc.getHostname()));
    }
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    final ServerDescriptor desc = ev.getNewDescriptor();

    Schema s = desc.getSchema();
    final boolean[] repack = {false};
    final boolean[] error = {false};
    if (s != null)
    {
      schema = s;
      repack[0] = attributes.getItemCount() == 0;
      LinkedHashSet<CategorizedComboBoxElement> newElements =
        new LinkedHashSet<CategorizedComboBoxElement>();

//    Check that the index does not exist
      BackendDescriptor backend = null;
      for (BackendDescriptor b : getInfo().getServerDescriptor().getBackends())
      {
        if (b.getBackendID().equalsIgnoreCase(backendName.getText()))
        {
          backend = b;
          break;
        }
      }

      TreeSet<String> standardAttrNames = new TreeSet<String>();
      TreeSet<String> configurationAttrNames = new TreeSet<String>();
      TreeSet<String> customAttrNames = new TreeSet<String>();
      for (AttributeType attr : schema.getAttributeTypes().values())
      {
        String name = attr.getPrimaryName();
        boolean defined = false;
        if (backend != null)
        {
          for (IndexDescriptor index : backend.getIndexes())
          {
            if (index.getName().equalsIgnoreCase(name))
            {
              defined = true;
              break;
            }
          }
        }
        if (!defined)
        {
          if (Utilities.isStandard(attr))
          {
            standardAttrNames.add(name);
          }
          else if (Utilities.isConfiguration(attr))
          {
            configurationAttrNames.add(name);
          }
          else
          {
            customAttrNames.add(name);
          }
        }
      }
      if (customAttrNames.size() > 0)
      {
        newElements.add(new CategorizedComboBoxElement(
            CUSTOM_ATTRIBUTES,
            CategorizedComboBoxElement.Type.CATEGORY));
        for (String attrName : customAttrNames)
        {
          newElements.add(new CategorizedComboBoxElement(
              attrName,
              CategorizedComboBoxElement.Type.REGULAR));
        }
      }
      if (standardAttrNames.size() > 0)
      {
        newElements.add(new CategorizedComboBoxElement(
            STANDARD_ATTRIBUTES,
            CategorizedComboBoxElement.Type.CATEGORY));
        for (String attrName : standardAttrNames)
        {
          newElements.add(new CategorizedComboBoxElement(
              attrName,
              CategorizedComboBoxElement.Type.REGULAR));
        }
      }
      // Ignore configuration attr names
      /*
        if (configurationAttrNames.size() > 0)
        {
          newElements.add(new CategorizedComboBoxDescriptor(
              "Configuration Attributes",
              CategorizedComboBoxDescriptor.Type.CATEGORY));
          for (String attrName : configurationAttrNames)
          {
            newElements.add(new CategorizedComboBoxDescriptor(
                attrName,
                CategorizedComboBoxDescriptor.Type.REGULAR));
          }
        }
       */
      DefaultComboBoxModel model =
        (DefaultComboBoxModel)attributes.getModel();
      updateComboBoxModel(newElements, model);
    }
    else
    {
      updateErrorPane(errorPane,
          ERR_CTRL_PANEL_SCHEMA_NOT_FOUND_SUMMARY.get(),
          ColorAndFontConstants.errorTitleFont,
          ERR_CTRL_PANEL_SCHEMA_NOT_FOUND_DETAILS.get(),
          ColorAndFontConstants.defaultFont);
      repack[0] = true;
      error[0] = true;
    }

    SwingUtilities.invokeLater(new Runnable()
    {
      public void run()
      {
        setEnabledOK(!error[0]);
        errorPane.setVisible(error[0]);
        if (repack[0])
        {
          packParentDialog();
          if (relativeComponent != null)
          {
            Utilities.centerGoldenMean(
                Utilities.getParentDialog(NewIndexPanel.this),
                relativeComponent);
          }
        }
      }
    });
    if (!error[0])
    {
      updateErrorPaneAndOKButtonIfAuthRequired(desc,
       isLocal() ? INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_NEW_INDEX.get() :
      INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get(desc.getHostname()));
    }
  }
View Full Code Here

   * {@inheritDoc}
   */
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    ignoreSelectionEvents = true;
    ServerDescriptor desc = ev.getNewDescriptor();
    updateSimpleBackendComboBoxModel(backends, lNoBackendsFound,
        desc);
    refreshContents(desc);
  }
View Full Code Here

   * Updates the contents of the panel.
   *
   */
  public void updateContents()
  {
    ServerDescriptor server = null;
    if (getInfo() != null)
    {
      server = getInfo().getServerDescriptor();
    }
    CustomSearchResult csr = null;
    if (server != null)
    {
      csr = server.getEntryCachesMonitor();
    }
    if (csr != null)
    {
      updateMonitoringInfo(ngOperations, monitoringLabels, csr);
      int index = 0;
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    ServerDescriptor desc = ev.getNewDescriptor();
    updateSimpleBackendComboBoxModel(backends, lNoBackendsFound,
        ev.getNewDescriptor());

    updateErrorPaneAndOKButtonIfAuthRequired(desc,
       isLocal() ? INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_EXPORT.get() :
      INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get(desc.getHostname()));

    SwingUtilities.invokeLater(new Runnable()
    {
      public void run()
      {
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    final ServerDescriptor desc = ev.getNewDescriptor();

    updateMenus(desc);

    super.configurationChanged(ev);
  }
View Full Code Here

        {
          BackendDescriptor backend = null;

          if (backendName != null)
          {
            ServerDescriptor server = getInfo().getServerDescriptor();
            for (BackendDescriptor b : server.getBackends())
            {
              if (b.getBackendID().equalsIgnoreCase(backendName))
              {
                backend = b;
                break;
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    final ServerDescriptor desc = ev.getNewDescriptor();
    SwingUtilities.invokeLater(new Runnable()
    {
      /**
       * {@inheritDoc}
       */
      public void run()
      {
        boolean isReadOnly = true;
        boolean canDelete = false;
        if ((searchResult != null) && desc.isAuthenticated())
        {
          isReadOnly = isReadOnly(searchResult.getDN());
          canDelete = canDelete(searchResult.getDN());
        }

View Full Code Here

TOP

Related Classes of org.nasutekds.guitools.controlpanel.datamodel.ServerDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.