Package org.apache.wicket.security.actions

Examples of org.apache.wicket.security.actions.ActionFactory


  /**
   * Test method for {@link SwarmAction#implies(WaspAction)}
   */
  public void testImpliesWaspAction()
  {
    ActionFactory factory = Actions.getActionFactory(KEY);
    WaspAction action = factory.getAction(Render.class);
    WaspAction action2 = action.add(factory.getAction(Inherit.class));
    assertTrue(action2.implies(action));
    assertFalse(action.implies(action2));
  }
View Full Code Here


  /**
   * Test method for {@link SwarmAction#add(int)}
   */
  public void testAddInt()
  {
    ActionFactory factory = Actions.getActionFactory(KEY);
    SwarmAction action = (SwarmAction) factory.getAction(Render.class);
    assertEquals(2, action.actions());
    SwarmAction action2 =
      (SwarmAction) action.add(((SwarmAction) factory.getAction(Access.class)).actions());
    assertEquals(2, action.actions()); // check inmutability
    assertEquals(2, action2.actions());
    assertNotSame(action, action2);
    SwarmAction action3 =
      (SwarmAction) action.add(((SwarmAction) factory.getAction(Enable.class)).actions());
    assertEquals(2, action.actions());
    assertEquals(6, action3.actions());

  }
View Full Code Here

  /**
   * Test method for {@link SwarmAction#add(WaspAction)}
   */
  public void testAddWaspAction()
  {
    ActionFactory factory = Actions.getActionFactory(KEY);
    SwarmAction action = (SwarmAction) factory.getAction(Render.class);
    assertEquals(2, action.actions());
    SwarmAction action2 = action.add(factory.getAction(Access.class));
    assertEquals(2, action.actions()); // check inmutability
    assertEquals(2, action2.actions());
    assertNotSame(action, action2);
    SwarmAction action3 = action.add(factory.getAction(Enable.class));
    assertEquals(2, action.actions());
    assertEquals(6, action3.actions());

  }
View Full Code Here

    StrategyFactory factory = getStrategyFactory();
    if (factory != null)
      factory.destroy();
    // because we destroy the actionfactory with the wicket app it is not
    // recommended to share actionfactories.
    ActionFactory factory2 = getActionFactory();
    if (factory2 != null)
      factory2.destroy();
  }
View Full Code Here

    protected void onDestroy()
    {
      StrategyFactory factory = getStrategyFactory();
      if (factory != null)
        factory.destroy();
      ActionFactory factory2 = getActionFactory();
      if (factory2 != null)
        factory2.destroy();
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.security.actions.ActionFactory

Copyright © 2018 www.massapicom. 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.