Package br.gov.frameworkdemoiselle.context

Examples of br.gov.frameworkdemoiselle.context.SessionContext.activate()


    if (!registered) {
      if (!tempRequestContext.isActive())
        tempRequestContext.activate();
     
      if (!tempSessionContext.isActive())
        tempSessionContext.activate();
     
      if (!tempViewContext.isActive())
        tempViewContext.activate();
     
      if (!tempConversationContext.isActive())
View Full Code Here


    if (!sessionContext.isActive()){
      logger.debug(bundle.getString("management-debug-starting-custom-context",
          sessionContext.getClass().getCanonicalName(), managedType.getCanonicalName()));
     
      sessionContext.activate();
    }
   
    if (!conversationContext.isActive()){
      logger.debug(bundle.getString("management-debug-starting-custom-context",
          conversationContext.getClass().getCanonicalName(), managedType.getCanonicalName()));
View Full Code Here

  }

  @Before
  public void activeContext() {
    SessionContext sessionContext = Beans.getReference(SessionContext.class);
    sessionContext.activate();

    securityContext.login();
  }

  @Test(expected = AuthorizationException.class)
View Full Code Here

  }

  @Before
  public void activeContext() {
    SessionContext sessionContext = Beans.getReference(SessionContext.class);
    sessionContext.activate();
   
    securityContext.login();
  }

  @Test
View Full Code Here

      if (requestContext!=null){
        startedContextHere.put("request", requestContext.activate());
      }
     
      if (sessionContext!=null){
        startedContextHere.put("session", sessionContext.activate());
      }
     
     
      if (conversationContext!=null){
        startedContextHere.put("conversation", conversationContext.activate());
View Full Code Here

  }

  @Before
  public void activeContext() {
    SessionContext ctx = Beans.getReference(SessionContext.class);
    ctx.activate();
  }

  @Test
  public void callProtectedClassAttribNotLogged() {
    try {
View Full Code Here

  }

  @Before
  public void activeContext() {
    SessionContext sessionContext = Beans.getReference(SessionContext.class);
    sessionContext.activate();
    securityContext.login();
  }

  @Test
  public void roleOnClassAndMethod() {
View Full Code Here

  }

  @Before
  public void activeContext() {
    SessionContext sessionContext = Beans.getReference(SessionContext.class);
    sessionContext.activate();
    securityContext.login();
  }

  @Test(expected = AuthorizationException.class)
  public void wrongRoleOnClass() {
View Full Code Here

  }

  @Before
  public void activeContext() {
    SessionContext context = Beans.getReference(SessionContext.class);
    context.activate();
  }

  @After
  public void deactiveContext() {
    SessionContext context = Beans.getReference(SessionContext.class);
View Full Code Here

   
    ConversationContext conversationContext = Beans.getReference(ConversationContext.class);
    SessionContext sessionContext = Beans.getReference(SessionContext.class);
   
    conversationContext.activate();
    sessionContext.activate();
   
    ConversationBean conversationBean = Beans.getReference(ConversationBean.class);
    conversationBean.getData();
   
    SessionBean sessionBean = Beans.getReference(SessionBean.class);
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.