Package org.nasutekds.guitools.controlpanel.datamodel

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


      set.add(baseDN);
    }
    ArrayList<String> indirectBackendsToDelete = new ArrayList<String>();
    for (Set<BaseDNDescriptor> set : hmBackends.values())
    {
      BackendDescriptor backend = set.iterator().next().getBackend();
      if (set.size() == backend.getBaseDns().size())
      {
        // All of the suffixes must be deleted.
        indirectBackendsToDelete.add(backend.getBackendID());
      }
    }
    mb.append(INFO_CTRL_PANEL_CONFIRMATION_DELETE_BASE_DNS_DETAILS.get());
    for (BaseDNDescriptor baseDN : baseDNsToDelete)
    {
View Full Code Here


      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;
View Full Code Here

    {
      lastSelectedNode = (DefaultMutableTreeNode)path.getLastPathComponent();
    }
    TreePath newSelectionPath = null;

    BackendDescriptor backend = null;
    String backendName = (String)backends.getSelectedItem();
    if (backendName != null)
    {
      for (BackendDescriptor b : getInfo().getServerDescriptor().getBackends())
      {
        if (b.getBackendID().equalsIgnoreCase(backendName))
        {
          backend = b;
          break;
        }
      }
    }

    ArrayList<ArrayList<? extends AbstractIndexTreeNode>> nodes =
      new ArrayList<ArrayList<? extends AbstractIndexTreeNode>>();
    ArrayList<IndexTreeNode> standardIndexNodes =
      new ArrayList<IndexTreeNode>();
    ArrayList<VLVIndexTreeNode> vlvIndexNodes =
      new ArrayList<VLVIndexTreeNode>();
    nodes.add(standardIndexNodes);
    nodes.add(vlvIndexNodes);

    if (backend != null)
    {
      for (IndexDescriptor index : backend.getIndexes())
      {
        standardIndexNodes.add(new IndexTreeNode(index.getName(), index));
      }
      for (VLVIndexDescriptor index : backend.getVLVIndexes())
      {
        vlvIndexNodes.add(new VLVIndexTreeNode(index.getName(), index));
      }
    }
View Full Code Here

   * <CODE>false</CODE> otherwise.
   */
  protected boolean updateLayout(final ServerDescriptor desc)
  {
    Schema schema = desc.getSchema();
    BackendDescriptor backend = getBackend();
    final boolean[] repack = {false};
    final boolean[] error = {false};
    if (backend != null)
    {
      updateBaseDNCombo(backend);
View Full Code Here

   * @return the index descriptor for a given index name.
   */
  private IndexDescriptor getIndex(String indexName)
  {
    IndexDescriptor index = null;
    BackendDescriptor backend = getBackend();
    if (backend != null)
    {
      for (IndexDescriptor i : backend.getIndexes())
      {
        if (i.getName().equalsIgnoreCase(indexName))
        {
          index = i;
          break;
View Full Code Here

    for (JLabel l : labels)
    {
      setPrimaryValid(l);
    }

    BackendDescriptor backend = getBackend();

    ArrayList<Message> errors = new ArrayList<Message>();
    if (checkName)
    {
      String n = name.getText();
      if (n.trim().length() == 0)
      {
        errors.add(ERR_CTRL_PANEL_NO_VLV_INDEX_NAME_PROVIDED.get());
        setPrimaryInvalid(lName);
      }
      else if (backend != null)
      {
        // Check that there is no other VLV index with same name
        for (VLVIndexDescriptor index : backend.getVLVIndexes())
        {
          if (index.getName().equalsIgnoreCase(n))
          {
            errors.add(ERR_CTRL_PANEL_VLV_INDEX_ALREADY_DEFINED.get(n,
                backendName.getText()));
View Full Code Here

   * @return the backend for the index.
   */
  protected BackendDescriptor getBackend()
  {
//  Check that the index does not exist
    BackendDescriptor backend = null;
    for (BackendDescriptor b : getInfo().getServerDescriptor().getBackends())
    {
      if (b.getBackendID().equalsIgnoreCase(backendName.getText()))
      {
        backend = b;
View Full Code Here

   */
  public void update(String backendName)
  {
    this.backendName = backendName;

    BackendDescriptor backend = null;
    for (BackendDescriptor b : getInfo().getServerDescriptor().getBackends())
    {
      if (b.getBackendID().equals(backendName))
      {
        backend = b;
        break;
      }
    }

    if (backend != null)
    {
      final BackendDescriptor b = backend;
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
        {
          updateTableModel(b);
View Full Code Here

          }
          else
          {
            type = BackendDescriptor.Type.OTHER;
          }
          BackendDescriptor desc = new BackendDescriptor(
              backend.getBackendId(), baseDNs, indexes, vlvIndexes, -1,
              backend.isEnabled(), type);
          for (AbstractIndexDescriptor index: indexes)
          {
            index.setBackend(desc);
View Full Code Here

          errors.add(ERR_CTRL_PANEL_DN_NOT_VALID_WITH_VALUE.get(dnArray[i]));
          validDn = false;
        }
        else
        {
          BackendDescriptor backend = null;

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

          if (backend != null)
          {
            boolean found = false;
            for (BaseDNDescriptor baseDN : backend.getBaseDns())
            {
              try
              {
                DN dn = DN.decode(dnArray[i]);
                if (dn.isDescendantOf(baseDN.getDn()))
View Full Code Here

TOP

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

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.