Interface ApplicationService<P extends Application>

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

public interface ApplicationService<P extends Application> extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Application business domain specific version of CrudEntityService.
Author:
Jeff Fischer
  • Method Summary

    Modifier and Type
    Method
    Description
     
    readActiveByApplicationIdentifierAndIdentifierType(String identifier, String identifierType, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads the application by its Application.getIdentifierValue() and, optionally, by Application.getIdentifierType().
    org.springframework.data.domain.Page<P>
    readAllActive(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Reads all Applications where Application.isDeactivated() is false.
    org.springframework.data.domain.Page<P>
    readAllByApplicationIdIn(Collection<String> applicationIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    org.springframework.data.domain.Page<P>
    readByActiveStatus(boolean isActive, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Finds and returns all Applications where Application.isDeactivated() satisfies the isActive parameter.
    org.springframework.data.domain.Page<P>
    readByActiveStatusAndApplicationIdIn(Collection<String> applicationIds, boolean active, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    readByToken(String applicationToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds and returns the application associated with the provided application token.
    org.springframework.data.domain.Page<ApplicationCatalogRef>
    readCatalogsForAdd(String id, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Finds and returns the catalog's for the given owning application that are available to be added when selecting a catalog for add operations.
    readOptionalByContextId(String contextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Similar to CrudEntityService.readByContextId(String, ContextInfo), but returns an Optional instead.

    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

    • readOptionalByContextId

      Optional<P> readOptionalByContextId(String contextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Similar to CrudEntityService.readByContextId(String, ContextInfo), but returns an Optional instead.
      Parameters:
      contextId - the ID of the application to find
      contextInfo - context information surrounding multitenant state
      Returns:
      an Optional containing the entity if found, Optional.empty() otherwise
    • readByToken

      Optional<P> readByToken(String applicationToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds and returns the application associated with the provided application token.
      Parameters:
      applicationToken - the application token
      contextInfo - the context info
      Returns:
      the application
    • readCatalogsForAdd

      org.springframework.data.domain.Page<ApplicationCatalogRef> readCatalogsForAdd(String id, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds and returns the catalog's for the given owning application that are available to be added when selecting a catalog for add operations.
      Parameters:
      id - the application's id for which to return catalogs for adding
      pageable - the requested page of results from the database
      context - context information surrounding sandboxing and multitenant state
      Returns:
      catalogs available for add operations for the given application
      See Also:
    • readAllActive

      org.springframework.data.domain.Page<P> readAllActive(@Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads all Applications where Application.isDeactivated() is false.
      Parameters:
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      pageable - the requested page of results from the database
      context - context information surrounding sandboxing and multitenant state
      Returns:
      all Applications where Application.isDeactivated() is false.
    • readByActiveStatus

      org.springframework.data.domain.Page<P> readByActiveStatus(boolean isActive, @Nullable cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds and returns all Applications where Application.isDeactivated() satisfies the isActive parameter.
      Parameters:
      isActive - true if only active applications should be returned, false if only deactivated applications should be returned
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      pageable - the requested page of results from the database
      context - context information surrounding sandboxing and multitenant state
      Returns:
      all Applications where Application.isDeactivated() satisfies the isActive parameter
    • readActiveByApplicationIdentifierAndIdentifierType

      Optional<P> readActiveByApplicationIdentifierAndIdentifierType(String identifier, @Nullable String identifierType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads the application by its Application.getIdentifierValue() and, optionally, by Application.getIdentifierType(). If not provided, identifier will default to ResolutionIdentifierType.DOMAIN.
      Parameters:
      identifier - the Application.getIdentifierValue()
      identifierType - the Application.getIdentifierType()
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      the Application with the matching Application.getIdentifierValue()
    • getRepositoryDomain

      @NonNull String getRepositoryDomain()
    • readAllByApplicationIdIn

      org.springframework.data.domain.Page<P> readAllByApplicationIdIn(Collection<String> applicationIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • readByActiveStatusAndApplicationIdIn

      org.springframework.data.domain.Page<P> readByActiveStatusAndApplicationIdIn(Collection<String> applicationIds, boolean active, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)