@param ExternalReference $externalReference

@throws \DomainException
552565
private function assertExternalReferenceHasKnownContainer(ExternalReference $externalReference): void
    {
        if (!isset($this->containerAccessors[$externalReference->containerIdentifier()])) {
            throw new \DomainException(sprintf(
                'External container with identifier "%s" does not exist.',
                $externalReference->containerIdentifier()
            ));
        }
    }
1158962
def external=(externals_list)
      @external = []
      externals_list.each { |external_id| @external << Rlocu2::ExternalID.new(id: external_id['id'], url: external_id['url'], mobile_url: external_id['mobile_url'])}
    end
964439
public function validate() {

		if ($this->getExternalId() === null) {
			throw new ValidationException("'externalId' can't be null", 'externalId', $this);
		}
		if ($this->getProcessingType() === null) {
			throw new ValidationException("'processingType' can't be null", 'processingType', $this);
		}
		if ($this->getSubscription() === null) {
			throw new ValidationException("'subscription' can't be null", 'subscription', $this);
		}
	}
149307
@Override
	public void setEntityReference(EntityReference entityReference) {
		if(entityReference instanceof ProteinReference || entityReference == null)
			super.setEntityReference(entityReference);
		else
			throw new IllegalBioPAXArgumentException("setEntityReference failed: "
					+ entityReference.getUri() + " is not a ProteinReference.");
	}
537001
public function addReference(ChildReference $reference)
    {
        if ($this->collReferences === null) {
            $this->initReferences();
        }

        if (!$this->getReferences()->contains($reference)) {
            // only add it if the **same** object is not already associated
            $this->collReferences->push($reference);
            $this->doAddReference($reference);
        }

        return $this;
    }
1360363
public function setExtension($value)
    {
        if (!in_array($value, self::allowedTypes(), true)) {
            throw new DomainException(sprintf(self::MSG_UNEXPECTED_EXTENSION, implode(', ', self::allowedTypes())));
        }

        return $this->setAttribute('extension', $value);
    }
480489
protected void doScanReferenceClasses() throws AnnotationTargets_Exception {
        if (haveScannedReferencedClasses) {
            return;
        }

        try {
            doScanDirectClasses();

        } catch (AnnotationTargets_Exception e) {
            haveScannedReferencedClasses = true;
            rootClassSource = null;

            throw e;
        }

        haveScannedReferencedClasses = true;

        ClassSource_Aggregate useRootClassSource = rootClassSource;
        rootClassSource = null;

        if (useRootClassSource == null) {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "Attempt scan referenced classes before activation");
            }

        } else {
            if (externalClassSourceCount == 0) {
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, "Strange call to scan reference classes with no external class sources");
                }
            }

            createScanner(useRootClassSource).scanReferenced();
            // 'createScanner' and 'scan' both throw AnnotationTargets_Exception
        }
    }
240315
public function setParent(\Haven\CoreBundle\Entity\ExternalLink $parent = null)
    {
        $this->parent = $parent;
    
        return $this;
    }
1117442
public function setReference($reference)
    {
        if (!empty($reference) && ctype_print($reference)) {
            $this->reference = trim($reference);
        }

        return $this;
    }
477245
public void writeExternal(ObjectOutput out) throws IOException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "writeExternal");

        try {

            // write magic
            out.writeShort(EXTERNAL_MAGIC);
            out.writeShort(MAJOR_VERSION);
            out.writeShort(MINOR_VERSION);

            // write the interface type (HOME or REMOTE)
            if (_isHome) {
                out.writeByte(IF_HOME);
            } else {
                out.writeByte(IF_REMOTE);
            }

            //89554
            // write the Java EE name
            writeExternalJ2EEName(out);

            // write the external primary key
            writeExternalPKey(out);
            out.flush();

        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "writeExternal");
        }
    }
1225447
public function saveReference(ViewReference $viewReference, $parentId = null, $parentLocale = null)
    {
        // Transform the viewReference in array
        $arrayTransformer = $this->transformer->getViewReferenceTransformer(
            $viewReference->getViewNamespace(), 'array'
        );
        $referenceArray = $arrayTransformer->reverseTransform($viewReference);
        // Remove old url if exist
        $this->removeUrlForViewReference($viewReference);
        // Update/create the viewReference
        $this->manager->update($referenceArray['id'], $referenceArray);
        // Build the url for reference
        $this->manager->buildUrl($viewReference->getId());
        // Set parent if exist
        if ($parentId && $parentLocale === $viewReference->getLocale()) {
            $this->manager->addChild($parentId, $referenceArray['id']);
        }

        return $referenceArray['id'];
    }
1334576
private void updateExternal(ServerHeartbeat server, String externalId)
  {
    if (externalId != null) { 
      ServerHeartbeat serverExternal = _root.getServer(externalId);
      
      server.setExternalServer(serverExternal);
    }
    else {
      server.setExternalServer(null);
      /*
      if (serverExternal != null) {
        serverExternal.setDelegate(data);
        
        _root.updateSequence();
      }
      */
    }
    
    // data.setExternalId(externalId);
  }
748881
private void includeExternal(ServletRequest req, ServletResponse res) throws ServletException, IOException {

        // This is an external include, probably to a JSP page, dispatch with system dispatcher
        if (LOG.isInfoEnabled()) {
            LOG.info(
                Messages.get().getBundle().key(
                    Messages.LOG_FLEXREQUESTDISPATCHER_INCLUDING_EXTERNAL_TARGET_1,
                    m_extTarget));
        }
        m_rd.include(req, res);
    }
748083
public function update($name, $isReference)
    {
        if ($this->name === $name && $this->isReference === $isReference) {
            return $this;
        }

        return new self($name, $isReference);
    }
622873
public void writeExternal(java.io.ObjectOutput objectOutput)
                    throws java.io.IOException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "writeExternal"
                        , "objectOutput=" + objectOutput + "(java.io.ObjectOutput)"
                            );
        objectOutput.writeByte(externalVersion);
        objectOutput.writeInt(objectStoreIdentifier);
        objectOutput.writeLong(storedObjectIdentifier);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "writeExternal"
                            );
    }
960851
public function editAction($externalNetworkId, $externalRouteId, $externalLineId, $seasonId, $externalStopPointId = null)
    {
        $this->isGranted('BUSINESS_EDIT_LAYOUT');
        $lineManager = $this->get('canal_tp_mtt.line_manager');
        $perimeter = $this->get('nmm.perimeter_manager')->findOneByExternalNetworkId(
            $this->getUser()->getCustomer(),
            $externalNetworkId
        );
        $stopPointId = $this->get('canal_tp_mtt.navitia')->getStopPoints(
            $perimeter->getExternalCoverageId(),
            $perimeter->getExternalNetworkId(),
            $externalLineId,
            $externalRouteId
        )->route_schedules[0]->table->rows[0]->stop_point->id;
        $timetable = $this->getTimetable(
            $externalRouteId,
            $perimeter->getExternalCoverageId(),
            $lineManager->getLineConfigByExternalLineIdAndSeasonId($externalLineId, $seasonId)
        );

        return $this->renderLayout($timetable, $externalStopPointId, true, true, $stopPointId);
    }
1353289
public function setTransactionReference($reference)
    {
        if (strpos($reference, 'SecurityKey') !== false) {
            // A JSON string provided - the legacy transactionReference format.
            // Decode it then extact the securityKey.
            // We only need the security key here for the signature; all other
            // items from the reference will be in the server request.

            $parts = json_decode($reference, true);

            if (isset($parts['SecurityKey'])) {
                $this->setSecurityKey($parts['SecurityKey']);
            }
        }

        return $this;
    }