Sets the active global scopes

@param globalScopes New active global scopes
961695
public void setGlobalScopes(Iterable<GlobalScope> globalScopes) {
    this.globalScopes = Lists.newArrayList(Iterables.concat(globalScopes, serviceGlobalScopes));
  }
540004
public static void setGlobals(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime, boolean singleton) {
        Globals globals = runtime.getSessionGlobals();
        if (globals != null) {
            Map<String, Object> globalsMap = new HashMap<String, Object>();
            globalsMap.put(GLOBALS, new ConcurrentHashMap<String, Object>());
            Map<String, Object> expressionMap = getMap(message, operation.getGlobalExpressionMappings(), null);
            if (expressionMap != null) {
                globalsMap.putAll(expressionMap);
            }
            for (Entry<String, Object> globalsEntry : globalsMap.entrySet()) {
                if (!singleton) {
                    globals.set(globalsEntry.getKey(), globalsEntry.getValue());
                } else {
                    if (globals.get(globalsEntry.getKey()) == null
                        || (globalsEntry.getValue() != null && (globalsEntry.getValue() instanceof Map && !((Map)globalsEntry.getValue()).isEmpty()))) {
                        globals.set(globalsEntry.getKey(), globalsEntry.getValue());
                    }
                }
            }
        }
    }
66409
public void setGlobalTables(java.util.Collection<GlobalTable> globalTables) {
        if (globalTables == null) {
            this.globalTables = null;
            return;
        }

        this.globalTables = new java.util.ArrayList<GlobalTable>(globalTables);
    }
1349615
void traverseWithScope(Node root, AbstractScope<?, ?> s) {
    checkState(s.isGlobal() || s.isModuleScope(), s);
    try {
      initTraversal(root);
      curNode = root;
      pushScope(s);
      traverseBranch(root, null);
      popScope();
    } catch (Error | Exception unexpectedException) {
      throwUnexpectedException(unexpectedException);
    }
  }
686159
public void setDomainsAlwaysInScope(List<DomainAlwaysInScopeMatcher> domainsAlwaysInScope) {
		if (domainsAlwaysInScope == null || domainsAlwaysInScope.isEmpty()) {
			this.domainsAlwaysInScope = Collections.emptyList();
		} else {
			this.domainsAlwaysInScope = domainsAlwaysInScope;
		}
	}
573768
@Override
    public void setVariablesScope(Variables variables) {
	this.variables = variables;
	undefinedScope().setVariableScope(variables);

	if (variables instanceof ClosureScope) {
	    variables = ((ClosureScope) variables).getVariables();
	}
	if (variables instanceof StaticScope) {
	    activeComponent = ((StaticScope) variables).getComponent();
	}
	else if (variables instanceof ComponentScope) {
	    activeComponent = ((ComponentScope) variables).getComponent();
	}
	else {
	    activeComponent = null;
	}
    }
144140
public void setGalleryDefaultScope(String galleryDefaultScope) {

        m_galleryDefaultScope = galleryDefaultScope;
        try {
            CmsGallerySearchScope.valueOf(galleryDefaultScope);
        } catch (Throwable t) {
            LOG.warn(t.getLocalizedMessage(), t);
        }
    }
566762
public void setListeners(Collection<RetryListener> globalListeners) {
		ArrayList<RetryListener> retryListeners = new ArrayList<RetryListener>(
				globalListeners);
		AnnotationAwareOrderComparator.sort(retryListeners);
		this.globalListeners = retryListeners.toArray(new RetryListener[0]);
	}
257352
void regenerateGlobalTypedScope(AbstractCompiler compiler, Node root) {
    typedScopeCreator = new TypedScopeCreator(compiler);
    topScope = typedScopeCreator.createScope(root, null);
  }
223411
public function setAuthenticationScopes()
    {

        $scopes = $this->verifyToken()['Scopes'];

        // Add the internal 'public' scope
        $scopes = $scopes . ' public';
        $this->authentication->scopes = explode(' ', $scopes);
    }
1261334
public static void reset() {
    for (Object name : Collections.list(MAP_KEY_TO_SCOPE.keys())) {
      closeScope(name);
    }
    ConfigurationHolder.configuration.onScopeForestReset();
    ScopeImpl.resetUnBoundProviders();
  }
112138
public void setScope(String scope) {

        if (CmsStringUtil.isNotEmpty(scope)) {
            scope = scope.trim().toLowerCase();
            m_scope = getScopeAsInt(scope);
        } else {
            // empty scope, use default "page" scope
            m_scope = PageContext.PAGE_SCOPE;
        }
    }
650347
@Override
	public void setScope(String scope) {
		requireArgument(scope != null && !scope.trim().isEmpty(), "Scope cannot be null or empty.");
		super.setScope(scope);
	}
1081462
public function addGlobals($globals)
    {
        foreach ($globals as $name => $value) {
            if (is_array($value) && isset($value['class'])) {
                $value = new ViewRendererStaticClassProxy($value['class']);
            }
            $this->twig->addGlobal($name, $value);
        }
    }
440830
boolean setLocalScope(TransactionScope<Txn> scope, boolean detached) {
        TransactionScope<Txn> existing = mLocalScope.get();
        if (((existing == null || existing.isInactive()) && detached) || existing == scope) {
            attachNotification(scope.getActiveTxn());
            mLocalScope.set(scope);
            return true;
        }
        return false;
    }
684743
public void setGlobalSetting(String name, String value) {
        String oldValue;

        // Avoid redundant setting
        if (globalSettings.containsKey(name)) {
            oldValue = globalSettings.get(name);
            if (value.compareTo(oldValue) == 0)
                return;
        }
        globalSettings.put(name, value);
        setDirty(true);
    }
1321336
function addPluginsToScope(scope) {
    var name;
    for (name in plugins) {
        if (plugins.hasOwnProperty(name)) {
            scope[name] = plugins[name];
        }
    }
}