Examples of AddOperation


Examples of org.jpox.sco.queued.AddOperation

            if (queued && !ownerSM.getObjectManager().isFlushing())
            {
                Iterator iter = elements.iterator();
                while (iter.hasNext())
                {
                    addQueuedOperation(new AddOperation(iter.next()));
                }
            }
            else
            {
                try
View Full Code Here

Examples of org.jpox.sco.queued.AddOperation

                // Relationship management
                ownerSM.getRelationshipManager().relationAdd(fieldNumber, element);
            }
            if (queued && !ownerSM.getObjectManager().isFlushing())
            {
                addQueuedOperation(new AddOperation(element));
            }
            else
            {
                try
                {
View Full Code Here

Examples of org.jpox.sco.queued.AddOperation

            if (queued && !ownerSM.getObjectManager().isFlushing())
            {
                Iterator iter = c.iterator();
                while (iter.hasNext())
                {
                    addQueuedOperation(new AddOperation(iter.next()));
                }
            }
            else
            {
                try
View Full Code Here

Examples of org.nasutekds.server.core.AddOperation

        ArrayList<RawAttribute> rawAttrs =
                new ArrayList<RawAttribute>(attrs.size());
        for (Attribute a : attrs) {
          rawAttrs.add(new LDAPAttribute(a));
        }
        AddOperation addOp = cc.processAdd(dnByteString, rawAttrs);
        rc = addOp.getResultCode();
        if (rc.equals(ResultCode.SUCCESS)) {
          LOG.log(Level.INFO, "processed server add " + addOp.getEntryDN());
        } else if (rc.equals(ResultCode.ENTRY_ALREADY_EXISTS)) {
          // Compare the attributes with the existing entry to see if we
          // can ignore this add.
          boolean ignore = true;
          for (RawAttribute attr : rawAttrs) {
            ArrayList<ByteString> values = attr.getValues();
            for (ByteString value : values) {
              CompareOperation compOp =
                cc.processCompare(dnByteString, attr.getAttributeType(), value);
              if (ResultCode.ASSERTION_FAILED.equals(compOp.getResultCode())) {
                ignore = false;
                break;
              }
            }
          }
          if (!ignore) {
            MessageBuilder error = addOp.getErrorMessage();
            throw new ApplicationException(
                ReturnCode.IMPORT_ERROR,
                    INFO_ERROR_APPLY_LDIF_ADD.get(dnByteString.toString(),
                            error != null ? error.toString() : ""),
                    null);
          }
        } else {
          boolean ignore = false;

          if (rc.equals(ResultCode.ENTRY_ALREADY_EXISTS)) {

            // The entry already exists.  Compare the attributes with the
            // existing entry to see if we can ignore this add.
            try {
              InternalSearchOperation searchOp =
                      cc.processSearch(
                              cre.getDN(),
                              SearchScope.BASE_OBJECT,
                              SearchFilter.createFilterFromString(
                                      "objectclass=*"));
              LinkedList<SearchResultEntry> se = searchOp.getSearchEntries();
              if (se.size() > 0) {
                SearchResultEntry e = se.get(0);
                List<Attribute> eAttrs = new ArrayList<Attribute>();
                eAttrs.addAll(e.getAttributes());
                eAttrs.add(e.getObjectClassAttribute());
                if (compareUserAttrs(attrs, eAttrs)) {
                  LOG.log(Level.INFO, "Ignoring failure to add " +
                          dnByteString + " since the existing entry's " +
                          "attributes are identical");
                  ignore = true;
                }
              }
            } catch (Exception  e) {
              LOG.log(Level.INFO, "Error attempting to compare rejected add " +
                      "entry with existing entry", e);
            }
          }

          if (!ignore) {
            MessageBuilder error = addOp.getErrorMessage();
            throw new ApplicationException(
                    ReturnCode.IMPORT_ERROR,
                    INFO_ERROR_APPLY_LDIF_ADD.get(dnByteString.toString(),
                            error != null ? error.toString() : ""),
                    null);
View Full Code Here

Examples of org.parse4j.operation.AddOperation

  public void add(String key, Object value) {
    addAll(key, Arrays.asList(new Object[] { value }));
  }

  public void addAll(String key, Collection<?> values) {
    AddOperation operation = new AddOperation(values);
    performOperation(key, operation);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.