Class PerexGroupsService

java.lang.Object
sk.iway.iwcm.components.perex_groups.PerexGroupsService

public class PerexGroupsService extends Object
  • Constructor Details

    • PerexGroupsService

      public PerexGroupsService()
  • Method Details

    • getPerexGroups

      public static List<PerexGroupsEntity> getPerexGroups()
      Get all perex groups via repo
      Returns:
    • savePerexGroup

      public static PerexGroupsEntity savePerexGroup(int groupId, String groupName, String availableGroups)
      Greate new perex group and save it
      Parameters:
      groupId -
      groupName -
      availableGroups -
    • deletePerexGroup

      public static void deletePerexGroup(int id)
      Delete perex group by id
      Parameters:
      id -
    • insertPerexGroupDocs

      public static void insertPerexGroupDocs(int docId, String[] prerexGroupIds)
      Create multiple perex group docs, where id (docId) is same and perexGroupId is from prerexGroupIds arr. Create number of perexGroupDocs for each perexGroupId in prerexGroupIds, IF perexGroupId is number bigger than 0.
      Parameters:
      docId - - docId
      prerexGroupIds - - array of perexGroupIds
    • deletePerexGroupDocsByPerexGroupId

      public static void deletePerexGroupDocsByPerexGroupId(int perexGroupId)
      Delete all perex group docs by perexGroupId
      Parameters:
      perexGroupId -
    • deletePerexGroupDocsByDocId

      public static void deletePerexGroupDocsByDocId(int docId)
      Delete all perex group docs by docId
      Parameters:
      docId -
    • savePerexGroupsDoc

      public static void savePerexGroupsDoc(int docId, int[] perexGroupIds)
      Save perex groups for doc, detects changes and update db
      Parameters:
      docId -
      perexGroupIds -
    • save

      public static PerexGroupsEntity save(PerexGroupsEntity entity, PerexGroupsRepository perexGroupsRepository)