Package org.jamwiki.model

Examples of org.jamwiki.model.Category


    ofy.put(page);
    return page;
  }

  public static Category update(Category category) {
    Category existingEntity = null;
    try {
      Objectify ofy = OS.begin();
      existingEntity = ofy.get(Category.class, category.getCategoryId());
      existingEntity.setChildTopicName(category.getChildTopicName());
      existingEntity.setSortKey(category.getSortKey());
      existingEntity.setVirtualWiki(category.getVirtualWiki());
      existingEntity.setTopicType(category.getTopicType());
      ofy.put(existingEntity);
//      cache.put(existingEntity.getName(), existingEntity);
    } catch (EntityNotFoundException enf) {
    }
    return existingEntity;
View Full Code Here


    List<Category> categoryImages = new ArrayList<Category>();
    LinkedHashMap<String, String> subCategories = new LinkedHashMap<String, String>();
    int i = 0;
    // loop through the results and split out images and sub-categories
    while (i < categoryTopics.size()) {
      Category category = categoryTopics.get(i);
      if (category.getTopicType() == Topic.TYPE_IMAGE) {
        categoryTopics.remove(i);
        categoryImages.add(category);
        continue;
      }
      if (category.getTopicType() == Topic.TYPE_CATEGORY) {
        categoryTopics.remove(i);
        String value = category.getChildTopicName().substring(
            NamespaceHandler.NAMESPACE_CATEGORY.length() + NamespaceHandler.NAMESPACE_SEPARATOR.length());
        subCategories.put(category.getChildTopicName(), value);
        continue;
      }
      i++;
    }
    next.addObject("categoryTopics", categoryTopics);
View Full Code Here

    if (categories != null) {
      // add / remove categories associated with the topic
      this.deleteTopicCategories(topic);
      if (topic.getDeleteDate() == null) {
        for (String categoryName : categories.keySet()) {
          Category category = new Category();
          category.setName(categoryName);
          category.setSortKey(categories.get(categoryName));
          category.setVirtualWiki(topic.getVirtualWiki());
          category.setChildTopicName(topic.getName());
          this.addCategory(category, topic);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.jamwiki.model.Category

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.