Class CommonDependencies

java.lang.Object
com.skava.report.service.impl.CommonDependencies
Direct Known Subclasses:
CollectionUtil, CreateCollectionServiceImpl, CreateReportServiceImpl, DeleteReportPropertyServiceImpl, DeleteReportServiceImpl, FindAllCollectionServiceImpl, FindAllReportServiceImpl, FindCollectionPropertyServiceImpl, FindCollectionServiceImpl, FindReportServiceImpl, GetReportDataServiceImpl, PatchCollectionPropertyServiceImpl, PatchUpdateReportServiceImpl, UpdateCollectionPropertyServiceImpl, UpdateCollectionServiceImpl

@Component public class CommonDependencies extends Object
This class defines common dependencies
Since:
Jul 23, 2018
Author:
Infosys Equinox
  • Field Details

    • collectionRepository

      protected CollectionRepository collectionRepository
      Collection repository to handle collection CURD operations
    • collectionPropertyRepository

      protected CollectionPropertyRepository collectionPropertyRepository
      Collection property repository to handle collection property CURD operations
    • collectionAttributeRepository

      protected CollectionAttributeRepository collectionAttributeRepository
      Report repository to handle collection CURD operations
    • context

      protected org.springframework.context.ApplicationContext context
    • validators

      protected List<com.skava.core.validation.ValidatorComponent> validators
      validators for to validate input and response model of service
    • authProps

      protected com.skava.core.properties.AuthorizationProperties authProps
      to get auth configurations like guest user role name
    • messageSource

      protected org.springframework.context.MessageSource messageSource
      MessageSource
    • reportEventService

      protected ReportEventService reportEventService
    • reportPropertyRepository

      protected ReportPropertyRepository reportPropertyRepository
    • reportAssembler

      protected ReportAssembler reportAssembler
      reportAssembler
    • reportRepository

      protected ReportRepository reportRepository
      reportRepository
  • Constructor Details

  • Method Details

    • validateAndGetCollectionProperty

      public CollectionProperty validateAndGetCollectionProperty(Long collectionId, String propName)
      This method validate the collection of given collection id. If collection not found or inactive then throws exception.
      Parameters:
      collectionId - collection id of the property
      propName - name of the property to get
      Returns:
      CollectionProperty that matches the collectionId and propName
    • checkForDuplicateName

      public void checkForDuplicateName(long businessId, String name)
    • getCollectionProperty

      public CollectionProperty getCollectionProperty(Long collectionId, String propName)
      This method returns the collection property for the given id and property name If no property is present then throws error that collection property not found.
      Parameters:
      collectionId - collection id of the property
      propName - name of the property to get
      Returns:
      CollectionProperty that matches the collectionId and propName
    • getCollectionFromRepository

      public Collection getCollectionFromRepository(long collectionId)
      validate collection in all services
      Parameters:
      collectionId - identifier of the collection to be fetch
      Returns:
      Collection that matches to the given id
    • getReportProperties

      public Map<String,String> getReportProperties(long collectionId, Report reportId)
      Get collection properties and report properties collection property value will be override if it is in report properties Taking properties from repository for JPA session issue
      Parameters:
      collectionId - collection id to fetch properties
      reportId - report id to fetch properties
      Returns:
      Map of combined properties