Class ProgramStorage

java.lang.Object
io.meeds.gamification.storage.ProgramStorage
Direct Known Subclasses:
ProgramCachedStorage

public class ProgramStorage extends Object
  • Field Details

    • organizationService

      protected final org.exoplatform.services.organization.OrganizationService organizationService
  • Constructor Details

    • ProgramStorage

      public ProgramStorage(org.exoplatform.commons.file.services.FileService fileService, org.exoplatform.upload.UploadService uploadService, ProgramDAO programDAO, RuleDAO ruleDAO, org.exoplatform.services.organization.OrganizationService organizationService)
  • Method Details

    • saveProgram

      public ProgramDTO saveProgram(ProgramDTO program)
    • updateProgramDate

      public void updateProgramDate(long programId)
    • getProgramByTitle

      public ProgramDTO getProgramByTitle(String programTitle)
    • findHighestBudgetProgramIdsBySpacesIds

      public List<Long> findHighestBudgetProgramIdsBySpacesIds(ProgramFilter programFilter, int offset, int limit)
      The budget-ordered listing. Its five branches mirror ProgramDAO#buildPredicates' audience predicates one for one, but through Rule.getHighestBudget… named queries: a narrowing expressed only in those predicates does not reach this path. Two differences are deliberate and the caller should know them: it is enabled-only (every query hard-codes domain.isEnabled = true and rule.isEnabled = true), so it honours neither ProgramFilter#getStatus() nor ProgramFilter#isIncludeDeleted(); and it returns only programs that have at least one rule, since the queries select through Rule. countPrograms goes through the predicates, so a count taken beside this list can legitimately differ.
    • getProgramIdsByFilter

      public List<Long> getProgramIdsByFilter(ProgramFilter filter, int offset, int limit)
    • countPrograms

      public int countPrograms(ProgramFilter programFilter)
    • getProgramById

      public ProgramDTO getProgramById(Long id)
    • isProgramColorExists

      public boolean isProgramColorExists(String newColor)
    • getImageAsStream

      public InputStream getImageAsStream(long fileId)
    • deleteImage

      public void deleteImage(long fileId)
    • getAdministrators

      public List<String> getAdministrators()
    • clearCache

      public void clearCache()