Adds a new identity of the requested entity to the discovered information.

@param identity the discovered entity's identity
9491
public void addIdentity(Identity identity) {
        identities.add(identity);
        identitiesSet.add(identity.getKey());
    }
371618
def update_identity(self, identity, identity_id):
        
        route_values = {}
        if identity_id is not None:
            route_values['identityId'] = self._serialize.url('identity_id', identity_id, 'str')
        content = self._serialize.body(identity, 'Identity')
        self._send(http_method='PUT',
                   location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7',
                   version='5.0',
                   route_values=route_values,
                   content=content)
672948
public synchronized boolean removeIdentity(DiscoverInfo.Identity identity) {
        if (identity.equals(this.identity)) return false;
        identities.remove(identity);
        // Notify others of a state change of SDM. In order to keep the state consistent, this
        // method is synchronized
        renewEntityCapsVersion();
        return true;
    }
893030
public void setId(String id) {
        logger.entering(id);
        this.id = id;
        logger.exiting();
    }
1361400
public void addDataId(Object dataId) {
	  if (lock == SET) {
		 throw new IllegalStateException("EntryInfo is locked");
	  }
	  if (dataId != null && !dataId.equals("")) {
		  dataIds.add(dataId);
	  }
   }
1305618
@Override
    public void add(IBasicEntity entity) throws CachingException {
        final EntityIdentifier entityIdentifier = entity.getEntityIdentifier();
        final Class<? extends IBasicEntity> addType = entityIdentifier.getType();

        if (!this.entityType.isAssignableFrom(addType)) {
            throw new CachingException(
                    "Problem adding "
                            + entity
                            + ": entity type '"
                            + addType
                            + "' is incompatible with cache type '"
                            + this.entityType
                            + "'.");
        }

        this.cache.put(entityIdentifier.getKey(), entity);
    }
521812
protected void systemUpdateIdentityValue(Object[] data) {

        if (identityColumn != -1) {
            Number id = (Number) data[identityColumn];

            if (id != null) {
                identitySequence.systemUpdate(id.longValue());
            }
        }
    }
1188460
def add_identity(cls, db, identity, backend):
        
        uuid = None

        try:
            uuid = api.add_identity(db, backend, identity['email'],
                                    identity['name'], identity['username'])

            logger.debug("New sortinghat identity %s %s,%s,%s ",
                         uuid, identity['username'], identity['name'], identity['email'])

            profile = {"name": identity['name'] if identity['name'] else identity['username'],
                       "email": identity['email']}

            api.edit_profile(db, uuid, **profile)

        except AlreadyExistsError as ex:
            uuid = ex.eid
        except InvalidValueError as ex:
            logger.warning("Trying to add a None identity. Ignoring it.")
        except UnicodeEncodeError as ex:
            logger.warning("UnicodeEncodeError. Ignoring it. %s %s %s",
                           identity['email'], identity['name'],
                           identity['username'])
        except Exception as ex:
            logger.warning("Unknown exception adding identity. Ignoring it. %s %s %s",
                           identity['email'], identity['name'],
                           identity['username'], exc_info=True)

        if 'company' in identity and identity['company'] is not None:
            try:
                api.add_organization(db, identity['company'])
                api.add_enrollment(db, uuid, identity['company'],
                                   datetime(1900, 1, 1),
                                   datetime(2100, 1, 1))
            except AlreadyExistsError:
                pass

        return uuid
490680
def create(self, identity):
        
        data = values.of({'Identity': identity, })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return EntityInstance(self._version, payload, service_sid=self._solution['service_sid'], )
340591
public void add(ImprintNode node, IdentityMetadata metadata) throws HashException, KSIException {
        addToHeads(heads, aggregate(node, metadata));
    }
982095
@Override
    public void onEntitiesAdded(Collection<ITypedReferenceableInstance> entities, boolean isImport) throws AtlasException {
        notifyOfEntityEvent(entities, EntityNotification.OperationType.ENTITY_CREATE);
    }
611634
private void addClient(String id, IClient client) {
        // check to see if the id already exists first
        if (!hasClient(id)) {
            clients.put(id, client);
        } else {
            log.debug("Client id: {} already registered", id);
        }
    }
523252
public static void validateEntityID(final EntityID id) {
	int changes = 0;
	// Changed new UUID(m, l)
	if (id.mostSigBits() != EntityID.DEFAULT_MOST_SIG_BITS
		|| id.leastSigBits() != EntityID.DEFAULT_LEAST_SIG_BITS) {
	    changes++;
	}

	// Changed fromString(n)
	if (!EntityID.DEFAULT_NAME.equals(id.name())) {
	    changes++;
	}

	// Changed random
	if (id.random() != EntityID.DEFAULT_RANDOM) {
	    changes++;
	}

	// Check changed more than once
	if (changes > 1) {
	    throw new IllegalArgumentException(
		    String.format("%s annotation provides multiple ID source info", EntityID.class));
	}
    }
996513
public void addEntity(Entity entity){
		boolean delayed = updating || familyManager.notifying();
		entityManager.addEntity(entity, delayed);
	}
1092415
private static void AddIdentifierToList(CommPortIdentifier cpi) {
        LOGGER.fine("CommPortIdentifier:AddIdentifierToList()");
        synchronized (Sync) {
            if (CommPortIndex == null) {
                CommPortIndex = cpi;
                LOGGER.fine("CommPortIdentifier:AddIdentifierToList() null");
            } else {
                CommPortIdentifier index = CommPortIndex;
                while (index.next != null) {
                    index = index.next;
                    LOGGER.fine("CommPortIdentifier:AddIdentifierToList() index.next");
                }
                index.next = cpi;
            }
        }
    }
1036842
@Override
    protected void handleUndeclaredEntity(String id)
        throws XMLStreamException
    {
        _reportVCViolation("Undeclared parameter entity '"+id+"'.");
        if (mCurrAttrDefault != null) {
            Location loc = getLastCharLocation();
            if (mExpandingPE) {
                mCurrAttrDefault.addUndeclaredPE(id, loc);
            } else {
                mCurrAttrDefault.addUndeclaredGE(id, loc);
            }
        }
        if (mEventListener != null) {
            // GEs only matter when expanding...
            if (mExpandingPE) {
                mEventListener.dtdSkippedEntity("%"+id);
            }
        }
    }
14873
private void addClientId(String clientId) {
        //Sometimes the client Id will be null. For instance in the case QueueConnectionFactory, there is no default client Id specified in metatype.xml.
        if (clientId == null)
            return; //do nothing

        ConcurrentHashMap<String, Integer> clientIdTable = JmsFactoryFactoryImpl.getClientIdTable();

        if (clientIdTable.containsKey(clientId)) {
            clientIdTable.put(clientId, clientIdTable.get(clientId).intValue() + 1);
        } else {
            clientIdTable.put(clientId, 1);
        }

    }