Package org.openiaml.model.model.domain

Examples of org.openiaml.model.model.domain.DomainIterator


   * EObject container.
   * @throws JaxenException
   */
  protected CreateElementsWithinContainer createContainerHandler(InferContainedElementsAction action) throws JaxenException {
    Frame page = assertHasFrame(root, "container");
    DomainIterator di = assertHasDomainIterator(page, "domain object instance");

    return action.new CreateElementsWithinContainer(di, CachedModelInferer.getInstance().createCreateElementsFactory().createHandler(root));
  }
View Full Code Here


    setGeneratedBy(obj, by);
    return obj;
  }

  public DomainIterator generatedDomainIterator(GeneratesElements by, Scope container) throws InferenceException {
    DomainIterator obj = (DomainIterator) createElement( container, DomainPackage.eINSTANCE.getDomainIterator(), ModelPackage.eINSTANCE.getScope_Iterators() );
    setGeneratedBy(obj, by);
    return obj;
  }
View Full Code Here

    assertNotGenerated(password);

    LoginHandler handler = assertHasLoginHandler(session, "login handler");
    assertNotGenerated(handler);
    assertEquals(handler.getType(), LoginHandlerTypes.DOMAIN_OBJECT);
    DomainIterator iterator = assertHasDomainIterator(session, "logged in user");
    assertNotGenerated(iterator);
    DomainInstance instance = iterator.getCurrentInstance();
    assertNotGenerated(instance);

    // only one attribute
    DomainAttributeInstance aname = assertHasDomainAttributeInstance(instance, "name");
    assertNotGenerated(aname);
View Full Code Here

  public void testInferredAttributes() throws Exception {
    root = loadAndInfer(LoginHandlerInstance.class);

    Session session = assertHasSession(root, "my session");

    DomainIterator iterator = assertHasDomainIterator(session, "logged in user");
    DomainInstance instance = iterator.getCurrentInstance();
    assertNotGenerated(instance);

    // the domain instance should contain all attributes
    DomainAttributeInstance apassword = assertHasDomainAttributeInstance(instance, "password");
    assertGenerated(apassword);
    DomainAttributeInstance aname = assertHasDomainAttributeInstance(instance, "name");
    assertNotGenerated(aname);

    // the instance should also contain an 'empty' PrimitiveCondition
    BuiltinProperty exists = (BuiltinProperty) iterator.getEmpty();
    assertGenerated(exists);

  }
View Full Code Here

  public void testInferredSelect() throws Exception {
    root = loadAndInfer(LoginHandlerInstance.class);

    Session session = assertHasSession(root, "my session");
    LoginHandler handler = assertHasLoginHandler(session, "login handler");
    DomainIterator instance = assertHasDomainIterator(session, "logged in user");

    // check the query on the instance
    assertEquals("password = :password", instance.getQuery());

    // the login handler should have generated a key store
    Value currentPassword = assertHasValue(session, "current password");
    assertGenerated(currentPassword);
View Full Code Here

   *
   * @throws Exception
   */
  private void checkOperationCallsExists(Session session, ActivityOperation check) throws Exception {
    // find 'empty'
    DomainIterator instance = assertHasDomainIterator(session, "logged in user");
    assertNotGenerated(instance);
    BuiltinProperty exists = (BuiltinProperty) instance.getEmpty();
    assertGenerated(exists);

    // has a DecisionNode
    DecisionNode node = assertHasDecisionNode(check, "true?");
    assertGenerated(node);
View Full Code Here

    DomainType news = assertHasDomainType(root, "News");
    DomainSource db = assertHasDomainSource(root, "Database");
    assertHasSchemaEdge(db, news);

    IteratorList list = assertHasIteratorList(home, "List");
    DomainIterator iterator = assertHasDomainIterator(home, "select three news");
    assertEquals(3, iterator.getLimit());

    assertHasSetWire(root, iterator, list);

    // iterator has a source
    assertHasSelectEdge(iterator, db);
View Full Code Here

   * @throws Exception
   */
  public void testDomainIteratorHasDomainAttributes() throws Exception {
    Frame home = assertHasFrame(root, "Home");
    DomainType news = assertHasDomainType(root, "News");
    DomainIterator iterator = assertHasDomainIterator(home, "select three news");
    DomainInstance instance = iterator.getCurrentInstance();
    assertGenerated(instance);

    DomainAttributeInstance iid = assertHasDomainAttributeInstance(instance, "id");
    DomainAttributeInstance ititle = assertHasDomainAttributeInstance(instance, "title");
    DomainAttributeInstance icontent = assertHasDomainAttributeInstance(instance, "content");
View Full Code Here

   * @throws Exception
   */
  public void testLabelsConnectedBySetWire() throws Exception {
    Frame home = assertHasFrame(root, "Home");
    IteratorList list = assertHasIteratorList(home, "List");
    DomainIterator iterator = assertHasDomainIterator(home, "select three news");
    DomainInstance instance = iterator.getCurrentInstance();
    assertGenerated(instance);

    Label lid = assertHasLabel(list, "id");
    Label ltitle = assertHasLabel(list, "title");
    Label lcontent = assertHasLabel(list, "content");
View Full Code Here

   * @throws Exception
   */
  public void testLabelUpdatedOnlyIfAttributeExists() throws Exception {
    Frame home = assertHasFrame(root, "Home");
    IteratorList list = assertHasIteratorList(home, "List");
    DomainIterator iterator = assertHasDomainIterator(home, "select three news");
    DomainInstance instance = iterator.getCurrentInstance();
    assertGenerated(instance);

    Label ltitle = assertHasLabel(list, "title");
    DomainAttributeInstance ititle = assertHasDomainAttributeInstance(instance, "title");
    assertGenerated(assertHasSetWire(root, ititle, ltitle));
View Full Code Here

TOP

Related Classes of org.openiaml.model.model.domain.DomainIterator

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.