Examples of Context


Examples of com.adobe.idp.Context

    public static void impersonateUserAndSetClientFactory(String canonicalName, String domainName, ServiceClientFactory serviceClientFactory,ResourceManager resourceManager)
            throws UMException {
        AuthenticationManagerServiceClient authClient = new AuthenticationManagerServiceClient(serviceClientFactory);
        AuthResult authResultAdmin = authClient
                .authenticate(resourceManager.getPropValue(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME), resourceManager.getPropValue(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD).getBytes());
        Context context = new Context();
        context.initPrincipal(authResultAdmin);
        AuthResult authResult = authClient.getAuthResultOnBehalfOfUser(
                canonicalName, domainName, context);

        Context impersonateContext = new Context();
        impersonateContext.initPrincipal(authResult);
        serviceClientFactory.setContext(impersonateContext);
    }
View Full Code Here

Examples of com.alexecollins.vbox.core.Context

  public void setContext(String context) {
    this.context = context;
  }

  protected Work work() {
    return new Work(new Context(context));
  }
View Full Code Here

Examples of com.alibaba.citrus.service.form.Validator.Context

    protected void validate() {
        valid = true;

        for (Validator validator : getFieldConfig().getValidators()) {
            MessageContext expressionContext = MessageContextFactory.newInstance(this, validator);
            Context context = new ValidatorContextImpl(expressionContext, this);
            boolean passed = validator.validate(context);

            if (!passed) {
                valid = false;
                message = validator.getMessage(context);
View Full Code Here

Examples of com.alibaba.citrus.turbine.Context

        rundata.getResponse().getWriter();
    }

    @Test
    public void render_exportVars() throws Exception {
        Context context1 = rundata.getContext();
        Context context2 = rundata.getContext("app2");
        assertTrue(tool.exportAll);

        context1.put("var1", "init");
        context1.put("var2", "init");

        // no current context
        tool.setTemplate("control_set").render();
        assertEquals("init", context1.get("var1"));
        assertEquals("init", context1.get("var2"));

        // app1:context -> app1:control, without exports
        rundata.pushContext(context1);

        tool.setTemplate("control_set").render();
        assertEquals("app1", context1.get("var1"));
        assertEquals(null, context1.get("var2"));

        // app1:context -> app1:control.export(var1, var2)
        context1.put("var1", "init");
        context1.put("var2", "init");

        tool.setTemplate("control_set").export("var1").render();
        assertEquals("app1", context1.get("var1"));
        assertEquals(null, context1.get("var2"));

        context1.put("var1", "init");
        context1.put("var2", "init");

        tool.setTemplate("control_set").export("var2").render();
        assertEquals("app1", context1.get("var1"));
        assertEquals(null, context1.get("var2"));

        context1.put("var1", "init");
        context1.put("var2", "init");

        tool.setTemplate("control_set").export("var1", "var2").render();
        assertEquals("app1", context1.get("var1"));
        assertEquals(null, context1.get("var2"));

        // app1:context -> app1:control -> app2:control.export(var1, var2)
        context1.put("var1", "init");
        context1.put("var2", "init");
        context2.put("var1", "init");
        context2.put("var2", "init");

        String content = tool.setTemplate("control_nest").render();

        assertEquals("app2", context1.get("var1"));
        assertEquals(null, context1.get("var2"));
        assertEquals("init", context2.get("var1"));
        assertEquals("init", context2.get("var2"));

        assertThat(content, containsAll("1. app2", "2. $var2"));

        // app1:context -> app1:control.export(var1, var2) -> app2:control.export(var1, var2)
        context1.put("var1", "init");
        context1.put("var2", "init");
        context2.put("var1", "init");
        context2.put("var2", "init");

        content = tool.setTemplate("control_nest").export("var1", "var2").render();

        assertEquals("app2", context1.get("var1"));
        assertEquals(null, context1.get("var2"));
        assertEquals("init", context2.get("var1"));
        assertEquals("init", context2.get("var2"));

        assertThat(content, containsAll("1. app2", "2. $var2"));
    }
View Full Code Here

Examples of com.alu.e3.data.model.sub.Context

  }

  private static final Context toDataModel(com.alu.e3.prov.restapi.model.Context contextData) {
    if (contextData==null) throw new IllegalArgumentException("contextData must not be null");

    Context e = new Context();
    e.setId          (contextData.getId());
    e.setStatus        (toDataModel(contextData.getStatus()));

    // Following are optional
    if(contextData.getQuotaPerDay() != null)    e.setQuotaPerDay    (toDataModel(contextData.getQuotaPerDay()));
    if(contextData.getQuotaPerMonth() != null)    e.setQuotaPerMonth    (toDataModel(contextData.getQuotaPerMonth()));
    if(contextData.getQuotaPerWeek() != null)    e.setQuotaPerWeek    (toDataModel(contextData.getQuotaPerWeek()));
    if(contextData.getRateLimitPerMinute() != nulle.setRateLimitPerMinute  (toDataModel(contextData.getRateLimitPerMinute()));
    if(contextData.getRateLimitPerSecond() != nulle.setRateLimitPerSecond  (toDataModel(contextData.getRateLimitPerSecond()));

    return e;
  }
View Full Code Here

Examples of com.alu.e3.prov.restapi.model.Context

    // CREATE
    Policy policy = new Policy();

    policy.setId(id);

    Context context = new Context();

    context.setId("anid");
    context.setStatus(Status.ACTIVE);

    policy.getContexts().add(context);

    BasicResponse response = given().contentType("application/xml").body(policy, ObjectMapper.JAXB).expect().statusCode(200).rootPath("response").body("status", equalTo("SUCCESS")).log()
        .ifError().when().post(basePoliciesPath).andReturn().as(BasicResponse.class, ObjectMapper.JAXB);
View Full Code Here

Examples of com.android.tools.lint.detector.api.Context

    private void checkProject(Project project) {

        File projectDir = project.getDir();

        Context projectContext = new Context(mClient, project, projectDir, mScope);
        fireEvent(EventType.SCANNING_PROJECT, projectContext);

        for (Detector check : mApplicableDetectors) {
            check.beforeCheckProject(projectContext);
            if (mCanceled) {
View Full Code Here

Examples of com.ardublock.core.Context

 
  private void startOpenblocksFrame() throws SAXException, IOException, ParserConfigurationException
  {
    openblocksFrame = new OpenblocksFrame();
    openblocksFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Context context = Context.getContext();
    context.setInArduino(false);
    openblocksFrame.setVisible(true);
  }
View Full Code Here

Examples of com.arjuna.mw.wsas.context.Context

     
      System.out.println("Started: "+ua.activityName()+"\n");

        ContextManager contextManager = new ContextManager();
        Context[] contexts = contextManager.contexts();
        Context theContext1 = null;
        Context theContext2 = null;
        int numContexts = (contexts != null ? contexts.length : 0);

        for (int i = 0; i < numContexts; i++) {
            if (contexts[i] != null) {
                if (theContext1 == null) {
View Full Code Here

Examples of com.arjuna.mw.wsc.context.Context

     * @param current the current AT context implememtation
     * @return the coordination context type stashed in the current AT context implememtation
     */
    private CoordinationContextType getContextType(TxContextImple current)
    {
        Context context = (Context)current.context();
        return context.getCoordinationContext();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.