Package org.domain.model.component.topic

Examples of org.domain.model.component.topic.Topic


      add(new HomePageMenuPanel("homePageMenuPanel", this));

      ModelContext topicsModelContext = new ModelContext();
      topicsModelContext.setDomainModel(app.getDomainModel());
      Topics topics = (Topics) app.getEntry("Topics");
      Topic modelAndWebTopic = (Topic) topics.getTopic(MODEL_AND_WEB);
      if (modelAndWebTopic != null) {
        Topics modelAndWebTopicSubtopics = (Topics) modelAndWebTopic
            .getSubtopics();
        topicsModelContext.setEntities(modelAndWebTopicSubtopics);
      } else {
        topicsModelContext.setEntities(topics);
      }
View Full Code Here


          "projectDescription", projectDescription);
      item.add(projectDescriptionLabel);

      App app = (App) getApplication();
      Topics topics = (Topics) app.getEntry("Topics");
      Topic projectTopic = (Topic) topics.getTopic(project.getName());
      Links projectTopicLinks;
      if (projectTopic == null) {
        projectTopicLinks = new Links(project.getDomainModel());
      } else {
        projectTopicLinks = (Links) projectTopic.getLinks();
      }
      ModelContext linkModelContext = new ModelContext(modelContext);
      Links approvedOrderedLinks = (Links) projectTopicLinks
          .getApprovedLinks().getLinksOrderedByName();
      linkModelContext.setEntities(approvedOrderedLinks);
View Full Code Here

    this.viewContext = viewContext;
  }

  protected void populateItem(final ListItem item) {
    try {
      Topic topic = (Topic) item.getModelObject();
      String title = topic.getName().toUpperCase();
      Label topicNameLabel = new Label("topicName", title);
      item.add(topicNameLabel);

      ModelContext linkModelContext = new ModelContext(modelContext);
      Links topicLinks = (Links) topic.getLinks();
      Links approvedOrderedLinks = (Links) topicLinks.getApprovedLinks()
          .getLinksOrderedByName();
      linkModelContext.setEntities(approvedOrderedLinks);
      ViewContext linkViewContext = new ViewContext(viewContext);
      linkViewContext.setWicketId("linkListPanel");
View Full Code Here

    boolean post = true;
    try {
      if (super.postAdd(entity)) {
        if (getDomainModel().isInitialized()) {
          Interest interest = (Interest) entity;
          Topic interestTopic = interest.getTopic();
          if (getTopic() == null) {
            if (!interestTopic.getInterests().contain(interest)) {
              post = interestTopic.getInterests().add(interest);
            }
          }
        }
      } else {
        post = false;
View Full Code Here

  protected boolean postRemove(Interest entity) {
    boolean post = true;
    try {
      if (super.postRemove(entity)) {
        Interest interest = (Interest) entity;
        Topic interestTopic = interest.getTopic();
        if (getTopic() == null) {
          if (interestTopic.getInterests().contain(interest)) {
            post = interestTopic.getInterests().remove(interest);
          }
        }
      } else {
        post = false;
      }
View Full Code Here

    boolean post = true;
    try {
      if (super.postUpdate(beforeEntity, afterEntity)) {
        Interest beforeInterest = (Interest) beforeEntity;
        Interest afterInterest = (Interest) afterEntity;
        Topic beforeTopic = beforeInterest.getTopic();
        Topic afterTopic = afterInterest.getTopic();
        if (beforeTopic != afterTopic) {
          post = beforeTopic.getInterests().remove(beforeInterest);
          if (post) {
            post = afterTopic.getInterests().add(afterInterest);
          }
        }
      } else {
        post = false;
      }
View Full Code Here

    }
  }

  private void test03() {
    Topics topics = getTopics();
    Topic firstTopic = (Topic) topics.first();
    if (firstTopic != null) {
      Topics firstTopicSubtopics = firstTopic.getSubtopics();
      Topic firstSubtopic = (Topic) firstTopicSubtopics.first();
      if (firstSubtopic != null) {
        Links firstSubtopicLinks = (Links) firstSubtopic.getLinks();
        firstSubtopicLinks.output("First Subtopic Links");
      }
    }
  }
View Full Code Here

  }

  private void test13() {
    try {
      Topics topics = getTopics();
      Topic topic = new Topic(this.getDomainModel());
      topic.setName("SE");
      topic.setDescription("Software Engineering");
      if (topics.add(topic)) {
        topic.output("Software Engineering");
      }
    } catch (ActionException ae) {
      log.info("Add topic problem: " + ae.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of org.domain.model.component.topic.Topic

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.