Esempio n. 1
0
  /**
   * Gets all delivered modules.
   *
   * @return List DataModel.DeliveredModules
   */
  public List<DeliveredModule> getAllDeliveredModules() {
    List<DeliveredModule> modules = new ArrayList<DeliveredModule>();

    List<ModuleDelivery> deliveries = this.getDeliveredModuels();
    for (ModuleDelivery entry : deliveries) {
      DeliveredModule deliveredEntry = new DeliveredModule();
      deliveredEntry.setDeliveredModule(entry);
      deliveredEntry.setModuleInfo(this.getModule(entry.getModuleTableId()));
      modules.add(deliveredEntry);
    }
    return modules;
  }
Esempio n. 2
0
  /**
   * Gets delivered module from user with the content.
   *
   * @param userId
   * @return List DataModel.DeliveredModule
   */
  public List<DeliveredModule> getDeliveredModuleForUserWithContent(String userId) {
    List<DeliveredModule> modules = new ArrayList<DeliveredModule>();

    List<ModuleDelivery> deliveries = this.getDeliveredModuelsFromUser(userId);
    for (ModuleDelivery entry : deliveries) {
      DeliveredModule deliveredEntry = new DeliveredModule();
      deliveredEntry.setDeliveredModule(entry);
      deliveredEntry.setModuleInfo(this.getModule(entry.getModuleTableId()));
      modules.add(deliveredEntry);
    }
    return modules;
  }