Package com.skava.report.service.impl
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
This class defines common dependencies
- Since:
- Jul 23, 2018
- Author:
- Infosys Equinox
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.skava.core.properties.AuthorizationProperties
to get auth configurations like guest user role nameprotected CollectionAttributeRepository
Report repository to handle collection CURD operationsprotected CollectionPropertyRepository
Collection property repository to handle collection property CURD operationsprotected CollectionRepository
Collection repository to handle collection CURD operationsprotected org.springframework.context.ApplicationContext
protected org.springframework.context.MessageSource
MessageSourceprotected ReportAssembler
reportAssemblerprotected ReportEventService
protected ReportPropertyRepository
protected ReportRepository
reportRepositoryprotected List<com.skava.core.validation.ValidatorComponent>
validators for to validate input and response model of service -
Constructor Summary
ConstructorsConstructorDescriptionCommonDependencies
(ReportAssembler reportAssembler, ReportRepository reportRepository, ReportPropertyRepository reportPropertyRepository, CollectionRepository collectionRepository, CollectionPropertyRepository collectionPropertyRepository, CollectionAttributeRepository collectionAttributeRepository, org.springframework.context.ApplicationContext context, com.skava.core.properties.AuthorizationProperties authProps, org.springframework.context.MessageSource messageSource, ReportEventService reportEventService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkForDuplicateName
(long businessId, String name) getCollectionFromRepository
(long collectionId) validate collection in all servicesgetCollectionProperty
(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.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 issuevalidateAndGetCollectionProperty
(Long collectionId, String propName) This method validate the collection of given collection id.
-
Field Details
-
collectionRepository
Collection repository to handle collection CURD operations -
collectionPropertyRepository
Collection property repository to handle collection property CURD operations -
collectionAttributeRepository
Report repository to handle collection CURD operations -
context
protected org.springframework.context.ApplicationContext context -
validators
validators for to validate input and response model of service -
authProps
protected com.skava.core.properties.AuthorizationProperties authPropsto get auth configurations like guest user role name -
messageSource
protected org.springframework.context.MessageSource messageSourceMessageSource -
reportEventService
-
reportPropertyRepository
-
reportAssembler
reportAssembler -
reportRepository
reportRepository
-
-
Constructor Details
-
CommonDependencies
@Autowired public CommonDependencies(ReportAssembler reportAssembler, ReportRepository reportRepository, ReportPropertyRepository reportPropertyRepository, CollectionRepository collectionRepository, CollectionPropertyRepository collectionPropertyRepository, CollectionAttributeRepository collectionAttributeRepository, org.springframework.context.ApplicationContext context, com.skava.core.properties.AuthorizationProperties authProps, org.springframework.context.MessageSource messageSource, ReportEventService reportEventService)
-
-
Method Details
-
validateAndGetCollectionProperty
This method validate the collection of given collection id. If collection not found or inactive then throws exception.- Parameters:
collectionId
- collection id of the propertypropName
- name of the property to get- Returns:
- CollectionProperty that matches the collectionId and propName
-
checkForDuplicateName
-
getCollectionProperty
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 propertypropName
- name of the property to get- Returns:
- CollectionProperty that matches the collectionId and propName
-
getCollectionFromRepository
validate collection in all services- Parameters:
collectionId
- identifier of the collection to be fetch- Returns:
- Collection that matches to the given id
-
getReportProperties
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 propertiesreportId
- report id to fetch properties- Returns:
- Map of combined properties
-