Sets the scope of the query.

@param  scope  The scope of the query.  Cannot be null.
169402
protected void setScope(String scope) {
        requireArgument(scope != null && !scope.isEmpty(), "Scope cannot be null or empty.");
        _scope = scope;
    }
62713
public void setScope(String key) {
        Integer value = key != null ? SCOPES.get(key.toLowerCase()) : null;
        varScope = value != null ? value : null;
    }
749238
public void setGlobal(Object key, Object value) {
		for (Scope cur=this; true; cur=cur.parent) {
			if (cur.parent == null) {
				cur.data.put(key, value);
				return ;
			}
		}
	}
902336
public void addScope(String scope, int maxItemsInMemory) throws Exception {
        // Ignore maxItemsInMemory, since we don't run an eviction algorithm.
        scopeCaches.put(scope, new ConcurrentHashMap<Object, CacheItem>());
    }
120742
@Override
    public void init(final String scope) throws InitializationException, InterruptedException {
        try {
            init(ScopeProcessor.generateScope(scope));
        } catch (CouldNotPerformException | NullPointerException ex) {
            throw new InitializationException(this, ex);
        }
    }
961695
public void setGlobalScopes(Iterable<GlobalScope> globalScopes) {
    this.globalScopes = Lists.newArrayList(Iterables.concat(globalScopes, serviceGlobalScopes));
  }
254942
public void setAccess(String access) {
        if ("public".equals(access)) publicScope = true;
        else if ("protected".equals(access)) protectedScope = true;
        else if ("package".equals(access)) packageScope = true;
        else if ("private".equals(access)) privateScope = true;
    }
615360
public void setParentScope(Scope parentScope) {
        this.parentScope = parentScope;
        this.top = parentScope == null ? (ScriptNode)this : parentScope.top;
    }
1326657
protected void setAttribute(String key, Object value, int scope) {
        Map<String, Object> replacedInScope = getReplacedAttributes(scope);
        if (!replacedInScope.containsKey(key)) {
            Object current = pageContext.getAttribute(key, scope);
            replacedInScope.put(key, current);
        }
        pageContext.setAttribute(key, value, scope);
    }
1154262
public void setScope(String scope) {
        SystemAssert.requireArgument(scope != null && !scope.isEmpty(), "Scope cannot be null or empty.");
        this.scope = scope;
    }
467809
public static void setGlobalScope (@Nonnull final IGlobalScope aGlobalScope)
  {
    ValueEnforcer.notNull (aGlobalScope, "GlobalScope");

    s_aGlobalLock.locked ( () -> {
      if (s_aGlobalScope != null)
        throw new IllegalStateException ("Another global scope with ID '" +
                                         s_aGlobalScope.getID () +
                                         "' is already present. New global scope with ID '" +
                                         aGlobalScope.getID () +
                                         "' is not set!");

      s_aGlobalScope = aGlobalScope;

      aGlobalScope.initScope ();
      if (ScopeHelper.debugGlobalScopeLifeCycle (LOGGER))
        LOGGER.info ("Global scope '" + aGlobalScope.getID () + "' initialized!", ScopeHelper.getDebugStackTrace ());

      // Invoke SPIs
      ScopeSPIManager.getInstance ().onGlobalScopeBegin (aGlobalScope);
    });
  }
1009938
public void addChildScope(Scope child) {
        if (childScopes == null) {
            childScopes = new ArrayList<Scope>();
        }
        childScopes.add(child);
        child.setParentScope(this);
    }
1009901
public Void visitScope(Scope scope) {
    messages.add(new Message(PrettyPrinter.format("Explicit scope unsupported: key=%s scope=%s",
        targetKey, scope)));
    return null;
  }
767493
public void setScope(String scope) throws ApplicationException {
	scope = scope.toLowerCase().trim();

	if (scope.equals("server")) this.scope = SCOPE_SERVER;
	else if (scope.equals("application")) this.scope = SCOPE_APPLICATION;
	else if (scope.equals("session")) this.scope = SCOPE_SESSION;
	else if (scope.equals("request")) this.scope = SCOPE_REQUEST;
	else throw new ApplicationException("invalid value [" + scope + "] for attribute [scope] from tag [lock]", "valid values are [server,application,session]");
    }
1063669
ProcScope createScope(Scope scope) {
        ProcScope created = scopes.get(scope);
        if (created == null) {
            created = new ProcScope(scope.getName());
            scopes.put(scope, created);
            created.setStrong(scope.isStrong());
            created.setIgnoreText(scope.isIgnoreText());
            if (scope.getParent() != null) {
                created.setParent(createScope(scope.getParent()));
            }
            Set<ProcCode> scopeCodes = new HashSet<ProcCode>();
            for (Code code : scope.getCodes()) {
                scopeCodes.add(createCode(code));
            }
            created.setScopeCodes(scopeCodes);
            created.setMin(scope.getMin());
            created.setMax(scope.getMax());
        }
        return created;
    }
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;
        }
    }
1120155
@Override
    public NGScope scope() {
        NGScope isolateScope = NGScope.create();
        isolateScope.put(getName(), "=");
        return isolateScope;
    }