Add entries to the blacklist.

        This method adds the given 'entry' to the blacklist.

        :param entry: entry to add to the blacklist
519867
def add(self, entry):
        
        # Empty or None values for organizations are not allowed
        if not entry:
            return CMD_SUCCESS

        try:
            api.add_to_matching_blacklist(self.db, entry)
        except InvalidValueError as e:
            # If the code reaches here, something really wrong has happened
            # because entry cannot be None or empty
            raise RuntimeError(str(e))
        except AlreadyExistsError as e:
            msg = "%s already exists in the registry" % entry
            self.error(msg)
            return e.code

        return CMD_SUCCESS
726540
private void appendEntry(Map.Entry<String, EDBObjectEntry> entry, StringBuilder builder) {
        if (builder.length() > 2) {
            builder.append(",");
        }
        builder.append(" \"").append(entry.getKey()).append("\"");
        builder.append(" : ").append(entry.getValue());
    }
51476
public final void addBin(@NotNull final BinClasspathEntry entry) {
        Contract.requireArgNotNull("entry", entry);
        if (binList == null) {
            binList = new ArrayList<>();
        }
        binList.add(entry);
    }
1356653
def insert_entries(self, entries_xml, taxids=None):
        

        entries = etree.fromstring(entries_xml)
        del entries_xml

        for entry in entries:
            self.insert_entry(entry, taxids)
            entry.clear()
            del entry

        entries.clear()
        del entries

        self.session.commit()
379280
def add_entry(entry)
      return add_header_entry(entry) if entry[:msgid] && entry[:msgid].empty?

      @entries << Entry.new(entry)
    end
1133133
def add_entry(opts)
      raise ArgumentError, "Expected Hash or Keepassx::Entry, got #{opts.class}" unless valid_entry?(opts)

      if opts.is_a?(Keepassx::Entry)
        # Add entry
        @entries << opts

        # Increment counter
        header.entries_count += 1

        # Return entry
        opts

      elsif opts.is_a?(Hash)
        opts = deep_copy(opts)
        opts = build_entry_options(opts)

        # Create entry
        entry = create_entry(opts)

        # Increment counter
        header.entries_count += 1

        # Return entry
        entry
      end
    end
669499
def delete(self, entry):
        
        if not entry:
            return CMD_SUCCESS

        try:
            api.delete_from_matching_blacklist(self.db, entry)
        except NotFoundError as e:
            self.error(str(e))
            return e.code

        return CMD_SUCCESS
1069047
def get_blacklist_entry(self, blacklist_entry_id):
        
        get_blacklist_entries_endpoint = Template("${rest_root}/blacklist/${public_key}/${blacklist_entry_id}")
        url = get_blacklist_entries_endpoint.substitute(rest_root=self._rest_root, public_key=self._public_key, blacklist_entry_id=blacklist_entry_id)

        response = self.__get_request(url)
        return response["entry"]
978017
def add_blacklisted_filepaths(self, filepaths, remove_from_stored=True):
        
        self.file_manager.add_blacklisted_filepaths(filepaths,
                                                    remove_from_stored)
882104
public void add(WorkbenchEntry entry) {
		assert ! entry.isEmpty() : entry;
		assert ! entry.acquired : entry;
		entries.add(entry);
		approximatedSize.incrementAndGet();
	}
272674
def append(self, x):
        
        super(EntriesList, self).append(x)

        if self.entries_collection is not None:
            self.entries_collection.add_entry(self.date, x)
600044
def insert_entry(self, entry, taxids):
        
        entry_dict = entry.attrib
        entry_dict['created'] = datetime.strptime(entry_dict['created'], '%Y-%m-%d')
        entry_dict['modified'] = datetime.strptime(entry_dict['modified'], '%Y-%m-%d')

        taxid = self.get_taxid(entry)

        if taxids is None or taxid in taxids:
            entry_dict = self.update_entry_dict(entry, entry_dict, taxid)
            entry_obj = models.Entry(**entry_dict)
            del entry_dict

            self.session.add(entry_obj)
186243
public static void addEntries(File zip, ZipEntrySource[] entries, File destZip) {
    if (log.isDebugEnabled()) {
      log.debug("Copying '" + zip + "' to '" + destZip + "' and adding " + Arrays.asList(entries) + ".");
    }

    OutputStream destOut = null;
    try {
      destOut = new BufferedOutputStream(new FileOutputStream(destZip));
      addEntries(zip, entries, destOut);
    }
    catch (IOException e) {
      ZipExceptionUtil.rethrow(e);
    }
    finally {
      IOUtils.closeQuietly(destOut);
    }
  }
855016
def add_whitelist_entry(self, address, netmask, note=None):
        
        result = self._client.post("{}/whitelist".format(Profile.api_endpoint),
                data={
                    "address": address,
                    "netmask": netmask,
                    "note": note,
        })

        if not 'id' in result:
            raise UnexpectedResponseError("Unexpected response creating whitelist entry!")

        return WhitelistEntry(result['id'], self._client, json=result)
699860
public static void addIds(List<Entry> entries, boolean updateRdn) {
        for (Entry entry : entries) {
            addId(entry, updateRdn);
        }
    }
1180388
def add(self, entry, local_file):
        """"""
        row = self.rowClass()

        for key, val in entry.items():
            if key in self.columns:
                setattr(row, key, val)

        row.local_filename = os.path.join('.', os.path.relpath(local_file))

        self.rows.append(row)
469633
private function addEntry($entry)
	{
		if($entry != null)
		{
			if($this->entries == null)
				$this->entries = array();
			$this->entries[] = $entry;
		}
	}