{@inheritDoc}

@return {@inheritDoc}

@throws CouldNotPerformException {@inheritDoc}
779870
@Override
    public List<ENTRY> getEntries() throws CouldNotPerformException {
        registryLock.readLock().lock();
        try {
            pluginPool.beforeGetEntries();
            return new ArrayList<>(entryMap.values());
        } finally {
            registryLock.readLock().unlock();
        }
    }
444375
public function getInnerIterator()
    {
        if (is_callable($this->inner)) {
            // callable
            $this->inner = call_user_func($this->inner);
        }

        if (is_array($this->inner)) {
            // array
            $this->inner = new \ArrayIterator($this->inner);
        } elseif ($this->inner instanceof \IteratorAggregate) {
            // IteratorAggregate
            while ($this->inner instanceof \IteratorAggregate) {
                $this->inner = $this->inner->getIterator();
            }
        }

        if (!$this->inner instanceof \Iterator) {
            throw new UnexpectedTypeException($this->inner, 'Iterator');
        }

        return $this->inner;
    }
818883
@Override
  public final IConverter<?, ColumnsValues> lazyGet(//NOPMD
    // Rule:DoubleCheckedLocking isn't true see in beige-common:
    // org.beigesoft.test.DoubleCkeckLockingWrApTest
    final Map<String, Object> pAddParam,
      final Class<?> pBeanClass) throws Exception {
    IConverter<?, ColumnsValues> convrt =
      this.convertersMap.get(pBeanClass);
    if (convrt == null) {
      // locking:
      synchronized (this.convertersMap) {
        // make sure again whether it's null after locking:
        convrt = this.convertersMap.get(pBeanClass);
        if (convrt == null) {
          if (IHasVersion.class.isAssignableFrom(pBeanClass)) {
            convrt = lazyGetCnvHasVersionToColumnsValues(pBeanClass);
          } else {
            convrt = lazyGetCnvObjectToColumnsValues(pBeanClass);
          }
        }
      }
    }
    return convrt;
  }
469955
public function get_capabilities() {
        global $DB;

        $sort = 'ORDER BY contextlevel,component,name';   // To group them sensibly for display

        $params = array();
        $sql = "SELECT *
                  FROM {capabilities}";

        return $DB->get_records_sql($sql.' '.$sort, $params);
    }
1077873
function(action, settings){
            var handler = this.performableActions[action];
            if(!handler){
                return false;
            }

            if(!handler.getTargetsForAction){
                return false;
            }

            settings = settings || {};
            if(!settings.skipCanPerformAction && !this.canPerformAction(action, settings)){
                return false;
            }

            return handler.getTargetsForAction.call(this, settings);
        }
713745
@Override
    protected void beforeWaitForSynchronization(final T message) throws CouldNotPerformException {
        transactionIdField = ProtoBufFieldProcessor.getFieldDescriptor(message, TransactionIdProvider.TRANSACTION_ID_FIELD_NAME);
        if (transactionIdField == null) {
            throw new NotAvailableException("transaction id field for message[" + message.getClass().getSimpleName() + "]");
        }

        if (transactionIdField.getType() != Type.UINT64) {
            throw new CouldNotPerformException("Transaction id field of message[" + message.getClass().getSimpleName() + "] has an unexpected type[" + transactionIdField.getType().name() + "]");
        }
    }
1158823
@Override
    public void afterConsistencyCheck() throws CouldNotPerformException {
        for (final ENTRY entry : changedEntryList) {
            afterUpdate(entry);
        }
        changedEntryList.clear();
    }
786837
public function getFormValue()
    {
        $mapper = new PropertyMapper();
        return $mapper->mapDataToForm($this->getEntityContainer()->getEntity(), $this->getName());
    }
133894
public function performDisabledTransformation()
    {
        $newChildren = new FieldList();
        $clone = clone $this;
        if ($clone->getChildren()) {
            foreach ($clone->getChildren() as $child) {
                        /** @var FormField $child */
                $child = $child->transform(new DisabledTransformation());
                $newChildren->push($child);
            }
        }

        $clone->setChildren($newChildren);
        $clone->setDisabled(true);
        $clone->addExtraClass($this->extraClass());
        $clone->setDescription($this->getDescription());
        foreach ($this->attributes as $k => $v) {
            $clone->setAttribute($k, $v);
        }

        return $clone;
    }
58127
@Override
    protected void doPerform() {
        Select select = getSelectElement();
        if (!select.isMultiple()) {
            throw new UnsupportedOperationException("You may only deselect all options of a multi-select");
        }

        for (WebElement option : select.getOptions()) {
            if (!option.isSelected()) {
                option.click();
            }
        }
    }
375001
@SuppressWarnings("unchecked")
    public <C extends Capability> C getCapability(Class<C> capabilityType) {
        if (capabilityType.isInstance(this)) {
            return (C) this;
        }
        return null;
    }
778746
@Override
    public void clear() throws CouldNotPerformException {
        lock();
        try {
            pluginPool.beforeClear();
            sandbox.clear();
            entryMap.clear();
            consistent = true;
        } finally {
            unlock();
        }
        notifyObservers();
    }
224304
public function canRenderWithNodeAndPath()
    {
        $currentSiteNode = $this->getCurrentSiteNode();
        $fusionRuntime = $this->getFusionRuntime($currentSiteNode);

        return $fusionRuntime->canRender($this->fusionPath);
    }
1293415
@Override
	public <T> Optional<AuditableBeanWrapper<T>> getBeanWrapperFor(T source) {

		return Optional.of(source).flatMap(it -> {

			if (it instanceof Auditable) {
				return super.getBeanWrapperFor(source);
			}

			return entities.mapOnContext(it.getClass(), (context, entity) -> {

				MappingAuditingMetadata metadata = metadataCache.computeIfAbsent(
						it.getClass(),
						key -> new MappingAuditingMetadata(context, it.getClass()));

				return Optional.<AuditableBeanWrapper<T>>ofNullable(metadata.isAuditable() //
						? new MappingMetadataAuditableBeanWrapper<T>(
								entity.getPropertyAccessor(it), metadata)
						: null);

			}).orElseGet(() -> super.getBeanWrapperFor(source));
		});
	}
1373189
public Iterable<Record> values() {
        return () -> new Iterator<Record>(){
            private final Iterator<Record> it = data.records.values().iterator();

            /** {@inheritDoc} */
            @Override
            public boolean hasNext() {
                return it.hasNext();
            }

            /** {@inheritDoc} */
            @Override
            public Record next() {
                return it.next();
            }

            /** {@inheritDoc} */
            @Override
            public void remove() {
                throw new UnsupportedOperationException("This is a read-only iterator, remove operation is not supported.");
            }
        };
    }
335608
public MultimapWithProtoValuesFluentAssertion<M> usingDoubleToleranceForFieldsForValues(
      double tolerance, Iterable<Integer> fieldNumbers) {
    return usingConfig(config.usingDoubleToleranceForFields(tolerance, fieldNumbers));
  }
61027
@Override
    public ENTRY update(final ENTRY entry) throws CouldNotPerformException {
        if (entry == null) {
            throw new NotAvailableException("entry");
        }
        log("Update " + entry + "...");
        try {
            checkWriteAccess();
            lock();
            try {
                try {
                    // validate update
                    if (!entryMap.containsKey(entry.getId())) {
                        throw new InvalidStateException("Entry not registered!");
                    }
                    // perform update
                    sandbox.update(entry);
                    // check if the new message results in an update after consistency checks
                    final boolean changed = !isSandbox() && ((sandbox instanceof MockRegistrySandbox) || !get(entry).equals(sandbox.get(entry)));
                    pluginPool.beforeUpdate(entry);
                    entryMap.put(entry.getId(), entry);
                    finishTransaction();
                    pluginPool.afterUpdate(entry);
                    // test if the entry has changed at all by this update method
                    if (changed) {
                        notifySuccessfulTransaction();
                    }
                } finally {
                    syncSandbox();
                }
            } finally {
                unlock();
            }
        } catch (CouldNotPerformException ex) {
            throw new CouldNotPerformException("Could not update " + entry + " in " + this + "!", ex);
        }
        notifyObservers();
        return get(entry);
    }