예제 #1
0
  /**
   * Retrieves the set of parsed monitor attributes for this monitor entry, mapped from a unique
   * identifier (in all lowercase characters) to the corresponding monitor attribute.
   *
   * @return The set of parsed monitor attributes for this monitor entry.
   */
  public Map<String, MonitorAttribute> getMonitorAttributes() {
    // Retrieve a map of all attributes in the entry except cn and objectClass.
    final LinkedHashMap<String, MonitorAttribute> attrs =
        new LinkedHashMap<String, MonitorAttribute>();

    for (final Attribute a : entry.getAttributes()) {
      final String lowerName = toLowerCase(a.getName());
      if (lowerName.equals("cn") || lowerName.equals("objectclass")) {
        continue;
      }

      attrs.put(lowerName, new MonitorAttribute(lowerName, a.getName(), "", a.getValues()));
    }

    return Collections.unmodifiableMap(attrs);
  }
예제 #2
0
  /** {@inheritDoc} */
  @Override()
  public Map<String, MonitorAttribute> getMonitorAttributes() {
    final LinkedHashMap<String, MonitorAttribute> attrs =
        new LinkedHashMap<String, MonitorAttribute>();

    final Attribute traceAttr = getEntry().getAttribute(ATTR_JVM_STACK_TRACE);
    if (traceAttr != null) {
      addMonitorAttribute(
          attrs,
          ATTR_JVM_STACK_TRACE,
          INFO_STACK_TRACE_DISPNAME_TRACE.get(),
          INFO_STACK_TRACE_DESC_TRACE.get(),
          Collections.unmodifiableList(Arrays.asList(traceAttr.getValues())));
    }

    return Collections.unmodifiableMap(attrs);
  }
예제 #3
0
  private void createGroupModify(String dn, Attribute attribute) {
    String[] values = attribute.getValues();

    for (String value : values) {
      value = translateDN.replaceDN(value);
      Modification mod = new Modification(ModificationType.ADD, "member", dn);
      LDIFModifyChangeRecord modLdif = new LDIFModifyChangeRecord(value, mod);
      postProcessingRecords.add(modLdif);
    }
  }