Interface FolderService<P extends Folder>

All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
All Known Implementing Classes:
DefaultFolderService

public interface FolderService<P extends Folder> extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Base service API for Folders. Backed by a FolderRepository.
Author:
Samarth Dhruva (samarthd)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    existsByParentFolderId(String folderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Returns whether or not there are any folders with folderId as their Folder.parentFolderId.
    org.springframework.data.domain.Page<P>
    readAllByContextIds(List<String> folderIds, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all folders with IDs in the supplied list.
    org.springframework.data.domain.Page<P>
    readAllByName(String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the folders in the database, optionally filtering by name if specified.
    org.springframework.data.domain.Page<P>
    readAllSubFoldersOfFolder(String folderId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the folders who have the given folder as a parent.

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

    create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

    readAll, readAll, readAll, readAll
  • Method Details

    • readAllByName

      org.springframework.data.domain.Page<P> readAllByName(@Nullable String nameQuery, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all of the folders in the database, optionally filtering by name if specified.
      Parameters:
      nameQuery - the name to search for (optional)
      filters - additional filters to apply in the query, can be null
      pageInfo - pagination information
      contextInfo - the context to perform the operation in
      Returns:
      the requested page of folders from the result of the query
    • readAllByContextIds

      org.springframework.data.domain.Page<P> readAllByContextIds(List<String> folderIds, @Nullable org.springframework.data.domain.Pageable pageInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all folders with IDs in the supplied list.
      Parameters:
      folderIds - the folder context IDs to search for
      pageInfo - pagination information
      contextInfo - the context to perform the operation in
      Returns:
      the folders that matched with the IDs in the given list
    • readAllSubFoldersOfFolder

      org.springframework.data.domain.Page<P> readAllSubFoldersOfFolder(@Nullable String folderId, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all of the folders who have the given folder as a parent.
      Parameters:
      folderId - the context ID of the folder whose children should be returned. If null, this will return all root folders.
      filters - additional filters to apply in the query, can be null
      pageInfo - pagination information
      contextInfo - the context to perform the operation in
      Returns:
      all of the folders who have the given folder as a parent. Throws EntityMissingException if no folder was found with the given folderId.
    • existsByParentFolderId

      boolean existsByParentFolderId(String folderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Returns whether or not there are any folders with folderId as their Folder.parentFolderId. Essentially, this determines if there are any subfolders directly in the given folder.
      Parameters:
      folderId - the context ID of the parent folder to search for
      contextInfo - the context surrounding sandboxing and mulitenant state
      Returns:
      whether or not there are any folders with folderId as their Folder.parentFolderId