Replaces the dynamic content in the given list of cookies
@param context The context to replace the variables with
189753
private Cookie[] constructCookies(final TestContext context) {
        final List<Cookie> cookies = cookieEnricher.enrich(template.getCookies(), context);
        return cookies.toArray(new Cookie[0]);
    }
1328846
private void addHeadersToContext(final HttpHeaders headers) {
        for (HttpHeader header : headers.all()) {
            final String rawKey = header.key();
            final String transformedKey = rawKey.replaceAll("-", "");
            context.put("requestHeader".concat(transformedKey), header.values()
                    .toString());
        }
    }
214219
protected void createDeviceFingerPrintCookie(final RequestContext context, final HttpServletRequest request, final String cookieValue) {
        val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(context);
        cookieGenerator.addCookie(request, response, cookieValue);
    }
559440
public static void addCookie (@Nonnull final Cookie aCookie)
  {
    ValueEnforcer.notNull (aCookie, "Cookie");

    final String sKey = aCookie.getName ();

    s_aRWLock.writeLocked ( () -> s_aCookies.put (sKey, aCookie));
  }
1203919
public void sendCookie(String name, String value) {
        RequestContext.getHttpResponse().addCookie(Cookie.toServletCookie(new Cookie(name, value)));
    }
1308887
public final static void addCookie(String name, String value) {
		getServletResponse().addCookie(new Cookie(name, value));
	}
579094
@Initialize(scope = Scope.SCENARIO)
    public void initializeContextVariables() {
        Properties p = new HandlerConfigLoader().loadProperties(configurationManager, "context");
        for ( Map.Entry e : p.entrySet()) {
            ChorusContext.getContext().put(e.getKey().toString(), e.getValue().toString());
        }
    }
733746
public static void removeAllCookies(Context context) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            removeAllCookiesV21();
        } else {
            removeAllCookiesV14(context.getApplicationContext());
        }
    }
1274998
@Override
	public void bind(Object context) {
		if (m_validationEngine != null && context instanceof ValidationObject) {
	        m_validationSession = m_validationEngine.createSession();
	        m_validationSession.bind((ValidationObject) context);
		}
	}
531679
protected void addRequestCookies(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
        final Cookie[] cookies = httpServletRequest.getCookies();
        if (cookies == null) {
            return;
        }

        for (final Cookie cookie : cookies) {
            final String cookieName = cookie.getName();
            if (this.cookieAttributeMapping.containsKey(cookieName)) {
                for (final String attributeName : this.cookieAttributeMapping.get(cookieName)) {
                    attributes.put(attributeName, list(cookie.getValue()));
                }
            }
        }
    }
784103
public static void addCookiesToResponse(List<Cookie> cookieList, HttpServletResponse resp) {
        Iterator<Cookie> iterator = cookieList.listIterator();
        while (iterator.hasNext()) {
            Cookie cookie = iterator.next();
            if (cookie != null) {
                resp.addCookie(cookie);
            }
        }
    }
859017
public static void contextPath(String context) {
        if (S.blank(context)) ctx = "";
        else {
            E.illegalArgumentIf(!context.startsWith("/"), "context path should start with \"/\"");
            if (context.endsWith("/")) {
                ctx = S.str(context).beforeLast("/").toString();
            }
        }
    }
176236
public void addAllCloned(List<Cookie> cookies) {
		for(Cookie cookie : cookies) {
			Cookie clone = new Cookie(cookie);
			getStore().addCookie(clone.getHttpCookie());
		}
	}
831617
private synchronized void addContext(final EvaluatorContext context) {
    this.contextStack.add(context);
    this.contextIds.add(context.getId());
  }
347108
public static void replaceExpression(HTMLElement context, String expression, Object value) {
        SafeHtml safeValue;
        if (value instanceof SafeHtml) {
            safeValue = (SafeHtml) value;
        } else {
            safeValue = SafeHtmlUtils.fromString(String.valueOf(value));
        }
        // Text nodes are automatically made safe by the browser, so we need to use value here instead of safeValue to avoid escaping the string twice.
        replaceNestedExpressionInText(context, expression, String.valueOf(value));
        replaceNestedExpressionInAttributes(context, expression, safeValue.asString());
        // The call above does not catch the attributes in 'context', we need to replace them explicitly.
        replaceExpressionInAttributes(context, expression, safeValue.asString());
    }
209258
def apply_overwrites_to_context(context, overwrite_context):
    """"""
    for variable, overwrite in overwrite_context.items():
        if variable not in context:
            # Do not include variables which are not used in the template
            continue

        context_value = context[variable]

        if isinstance(context_value, list):
            # We are dealing with a choice variable
            if overwrite in context_value:
                # This overwrite is actually valid for the given context
                # Let's set it as default (by definition first item in list)
                # see ``cookiecutter.prompt.prompt_choice_for_config``
                context_value.remove(overwrite)
                context_value.insert(0, overwrite)
        else:
            # Simply overwrite the value for this variable
            context[variable] = overwrite
343649
public static synchronized void init(Context context) {
        mContext = context;

        // Set the appropriate log TAG
        setTAG(QuickUtils.system.getApplicationNameByContext());

        // resets all timestamps
        QuickUtils.timer.resetAllTimestamps();

        // init Rest
        QuickUtils.rest.init();

        // init image cache
        QuickUtils.imageCache.initialize(context);

        // init the objects cache
        try {
            cacheMagic.init(4096); // in bytes
        } catch (Exception e) {
           QuickUtils.log.e("Error initing cache");
        }
    }