Package org.nasutekds.server.protocols.ldap

Examples of org.nasutekds.server.protocols.ldap.LDAPAttribute


                                   e.getMessageObject(), e);
    }

    ArrayList<ByteString> valueList = new ArrayList<ByteString>(1);
    valueList.add(ServerConstants.TRUE_VALUE);
    LDAPAttribute a = new LDAPAttribute(ATTR_BACKEND_ENABLED, valueList);

    LDAPModification m = new LDAPModification(ModificationType.REPLACE, a);

    ArrayList<RawModification> modList = new ArrayList<RawModification>(1);
    modList.add(m);
View Full Code Here


                                   e.getMessageObject(), e);
    }

    ArrayList<ByteString> valueList = new ArrayList<ByteString>(1);
    valueList.add(ServerConstants.FALSE_VALUE);
    LDAPAttribute a = new LDAPAttribute(ATTR_BACKEND_ENABLED, valueList);

    LDAPModification m = new LDAPModification(ModificationType.REPLACE, a);

    ArrayList<RawModification> modList = new ArrayList<RawModification>(1);
    modList.add(m);
View Full Code Here

        }
        Attribute a = readSingleValueAttribute(lines, line, entryDN, attrDescr);
        builder.addAll(a);
      }

      LDAPAttribute ldapAttr = new LDAPAttribute(builder.toAttribute());
      LDAPModification mod = new LDAPModification(modType, ldapAttr);
      modifications.add(mod);
    }

    return new ModifyChangeRecordEntry(entryDN, modifications);
View Full Code Here

      List<String> vals = attr.getValue();
      for(String val : vals)
      {
        values.add(ByteString.valueOf(val));
      }
      LDAPAttribute ldapAttr = new LDAPAttribute(attrType, values);

      LDAPModification ldapMod = new LDAPModification(type, ldapAttr);
      modifications.add(ldapMod);

    }
View Full Code Here

      List<String> vals = attr.getValue();
      for(String val : vals)
      {
        values.add(ByteString.valueOf(val));
      }
      LDAPAttribute ldapAttribute = new LDAPAttribute(attr.getName(), values);
      attributes.add(ldapAttribute);
    }

    // Create and send the LDAP request to the server.
    ProtocolOp op = new AddRequestProtocolOp(dnStr, attributes);
View Full Code Here

            !backUpAll.getValue().equals(
                    backUpAll.getDefaultValue())) {
      values = new ArrayList<ByteString>(1);
      values.add(ByteString.valueOf(backUpAll.getValue()));
      attributes.add(
              new LDAPAttribute(ATTR_TASK_BACKUP_ALL, values));
    }

    if (compress.getValue() != null &&
            !compress.getValue().equals(
                    compress.getDefaultValue())) {
      values = new ArrayList<ByteString>(1);
      values.add(ByteString.valueOf(compress.getValue()));
      attributes.add(
              new LDAPAttribute(ATTR_TASK_BACKUP_COMPRESS, values));
    }

    if (encrypt.getValue() != null &&
            !encrypt.getValue().equals(
                    encrypt.getDefaultValue())) {
      values = new ArrayList<ByteString>(1);
      values.add(ByteString.valueOf(encrypt.getValue()));
      attributes.add(
              new LDAPAttribute(ATTR_TASK_BACKUP_ENCRYPT, values));
    }

    if (hash.getValue() != null &&
            !hash.getValue().equals(
                    hash.getDefaultValue())) {
      values = new ArrayList<ByteString>(1);
      values.add(ByteString.valueOf(hash.getValue()));
      attributes.add(
              new LDAPAttribute(ATTR_TASK_BACKUP_HASH, values));
    }

    if (incremental.getValue() != null &&
            !incremental.getValue().equals(
                    incremental.getDefaultValue())) {
      values = new ArrayList<ByteString>(1);
      values.add(ByteString.valueOf(incremental.getValue()));
      attributes.add(
              new LDAPAttribute(ATTR_TASK_BACKUP_INCREMENTAL, values));
    }

    if (signHash.getValue() != null &&
            !signHash.getValue().equals(
                    signHash.getDefaultValue())) {
      values = new ArrayList<ByteString>(1);
      values.add(ByteString.valueOf(signHash.getValue()));
      attributes.add(
              new LDAPAttribute(ATTR_TASK_BACKUP_SIGN_HASH, values));
    }

    List<String> backendIDs = backendID.getValues();
    if (backendIDs != null && backendIDs.size() > 0) {
      values = new ArrayList<ByteString>(backendIDs.size());
      for (String s : backendIDs) {
        values.add(ByteString.valueOf(s));
      }
      attributes.add(
              new LDAPAttribute(ATTR_TASK_BACKUP_BACKEND_ID, values));
    }

    if (backupIDString.getValue() != null &&
            !backupIDString.getValue().equals(
                    backupIDString.getDefaultValue())) {
      values = new ArrayList<ByteString>(1);
      values.add(ByteString.valueOf(backupIDString.getValue()));
      attributes.add(
              new LDAPAttribute(ATTR_BACKUP_ID, values));
    }

    if (backupDirectory.getValue() != null &&
            !backupDirectory.getValue().equals(
                    backupDirectory.getDefaultValue())) {
      values = new ArrayList<ByteString>(1);
      values.add(ByteString.valueOf(backupDirectory.getValue()));
      attributes.add(
              new LDAPAttribute(ATTR_BACKUP_DIRECTORY_PATH, values));
    }

    if (incrementalBaseID.getValue() != null &&
            !incrementalBaseID.getValue().equals(
                    incrementalBaseID.getDefaultValue())) {
      values = new ArrayList<ByteString>(1);
      values.add(ByteString.valueOf(incrementalBaseID.getValue()));
      attributes.add(
              new LDAPAttribute(ATTR_TASK_BACKUP_INCREMENTAL_BASE_ID, values));
    }

  }
View Full Code Here

   */
  private ResultCode runUpdateStateEntry(DN serverStateEntryDN)
  {
    ArrayList<ByteString> values = state.toASN1ArrayList();

    LDAPAttribute attr =
      new LDAPAttribute(REPLICATION_STATE, values);
    LDAPModification mod = new LDAPModification(ModificationType.REPLACE, attr);
    ArrayList<RawModification> mods = new ArrayList<RawModification>(1);
    mods.add(mod);

    ModifyOperationBasis op =
View Full Code Here

          List<Attribute> attrs = addEntry.getAttributes();
          ArrayList<RawAttribute> attributes =
              new ArrayList<RawAttribute>(attrs.size());
          for(Attribute a : attrs)
          {
            attributes.add(new LDAPAttribute(a));
          }
          protocolOp = new AddRequestProtocolOp(asn1OctetStr, attributes);
          out.println(INFO_PROCESSING_OPERATION.get(
                  operationType, asn1OctetStr.toString()));
          break;
View Full Code Here

    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();

    ArrayList<ByteString> values = new ArrayList<ByteString>();
    values.add(ByteString.valueOf("1"));
    LDAPAttribute attr = new LDAPAttribute("ds-cfg-max-psearches", values);

    ArrayList<RawModification> mods = new ArrayList<RawModification>();
    mods.add(new LDAPModification(ModificationType.REPLACE, attr));

    ModifyOperation modifyOperation =
View Full Code Here

    // Convert the set of modifications to a set of LDAP modifications.
    ArrayList<RawModification> modList = new ArrayList<RawModification>();
    for (Modification m : modifications)
    {
      modList.add(RawModification.create(m.getModificationType(),
                       new LDAPAttribute(m.getAttribute())));
    }

    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();
    ModifyOperation internalModify =
View Full Code Here

TOP

Related Classes of org.nasutekds.server.protocols.ldap.LDAPAttribute

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.