Package org.nasutekds.guitools.controlpanel.datamodel

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


    ServerDescriptor server = null;
    if (getInfo() != null)
    {
      server = getInfo().getServerDescriptor();
    }
    CustomSearchResult csr = null;
    if (server != null)
    {
      csr = server.getWorkQueueMonitor();
    }
    if (csr != null)
View Full Code Here


        while (entryDNs.hasMore())
        {
          SearchResult sr = entryDNs.next();
          if (!sr.getName().equals(""))
          {
            CustomSearchResult res =
              new CustomSearchResult(sr, dnToRemove.toString());
            entryDNFound = DN.decode(res.getDN());
            deleteSubtreeRecursively(ctx, entryDNFound, null, toNotify);
          }
        }
      }
      finally
View Full Code Here

      }
      finally
      {
        en.close();
      }
      CustomSearchResult csr =
        new CustomSearchResult(sr, "cn=Version,cn=monitor");

      String hostName = ConnectionUtils.getHostName(ctx);

      String productName = String.valueOf(Utilities.getFirstMonitoringValue(csr,
          VersionMonitorProvider.ATTR_PRODUCT_NAME));
View Full Code Here

   * @param sr the search result to use.
   * @return the filtered search result to be used to be displayed.
   */
  protected CustomSearchResult filterSearchResult(CustomSearchResult sr)
  {
    CustomSearchResult filteredSr;
    List<Object> values =
      sr.getAttributeValues(EntryHistorical.HISTORICALATTRIBUTENAME);
    if (values != null)
    {
      List<Object> newValues = new ArrayList<Object>();
      for (Object v : values)
      {
        newValues.add(filterStringValue(String.valueOf(v)));
      }
      if (newValues.equals(values))
      {
        filteredSr = sr;
      }
      else
      {
        filteredSr = sr.clone();
        filteredSr.set(EntryHistorical.HISTORICALATTRIBUTENAME, newValues);
      }
    }
    else
    {
      filteredSr = sr;
View Full Code Here

      return values;
    }

    private void updateObjectClass(ObjectClassValue newValue)
    {
      CustomSearchResult oldResult = searchResult;
      CustomSearchResult newResult =
        new CustomSearchResult(searchResult.getDN());

      for (String attrName : schemaReadOnlyAttributesLowerCase)
      {
        List<Object> values = searchResult.getAttributeValues(attrName);
        if (!values.isEmpty())
        {
          newResult.set(attrName, values);
        }
      }
      ignoreEntryChangeEvents = true;

      Schema schema = getInfo().getServerDescriptor().getSchema();
View Full Code Here

    ServerDescriptor server = null;
    if (getInfo() != null)
    {
      server = getInfo().getServerDescriptor();
    }
    CustomSearchResult csrSystem = null;
    CustomSearchResult csrMemory = null;
    if (server != null)
    {
      csrSystem = server.getSystemInformationMonitor();
      csrMemory = server.getJvmMemoryUsageMonitor();
    }
    if (csrSystem != null)
    {
      for (int i=0 ; i<generalAttributes.size(); i++)
      {
        String value =
          getMonitoringValue(generalAttributes.get(i), csrSystem);
        JComponent l = generalMonitoringComps.get(i);
        if (l instanceof JLabel)
        {
          ((JLabel)l).setText(value);
        }
        else if (l instanceof JTextComponent)
        {
          ((JTextComponent)l).setText(value);
        }
        else
        {
          throw new RuntimeException("Unexpected component: "+l);
        }
      }
    }
    else
    {
      for (JComponent l : generalMonitoringComps)
      {
        if (l instanceof JLabel)
        {
          ((JLabel)l).setText(NO_VALUE_SET.toString());
        }
        else if (l instanceof JTextComponent)
        {
          ((JTextComponent)l).setText(NO_VALUE_SET.toString());
        }
        else
        {
          throw new RuntimeException("Unexpected component: "+l);
        }
      }
    }
    if (csrMemory != null)
    {
      if (memoryAttributes.isEmpty())
      {
        Set<String> allNames = csrMemory.getAttributeNames();
        SortedSet<String> sortedNames = new TreeSet<String>();
        for (String attrName : allNames)
        {
          if (!attrName.equalsIgnoreCase(
              ServerConstants.OBJECTCLASS_ATTRIBUTE_TYPE_NAME) &&
View Full Code Here

TOP

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

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.