Class MacroContextServiceImpl
java.lang.Object
org.qubership.atp.dataset.service.jpa.model.MacroContextServiceImpl
- All Implemented Interfaces:
MacroContextService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ThreadLocal<CachedDslMacroResultContainer> protected ThreadLocal<DataSetListEvaluatedParametersCache> Cached parameter values.protected DataSetListContextServiceprotected ModelsProviderprotected DataSetParameterProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAttributeName(UUID dataSetListId) getCachedEvaluatedValues(UUID dataSetListId) Returns evaluated parameters (in reference macros) by DSL ID.getDataSetList(UUID visibilityAreaId, PathStep dataSetListPathStep) Get dataSetList, by its name or id, provided in dataSetListPathStep parameter.getDataSetListName(UUID dataSetListId) getDataSetName(UUID dataSetListId) getDataSetUuid(String dataSetName, UUID dataSetListId) Returns evaluated parameters (in reference DSL macros).getTextParameterByExternalListDataSetAndPath(UUID visibilityAreaId, PathStep dataSetList, PathStep dataSetPath, List<PathStep> referenceAttributePath, PathStep attribute) For REF_DSL.getTextParameterByListDataSetAndPath(UUID visibilityAreaId, PathStep dataSetList, PathStep dataSetPath, List<PathStep> referenceAttributePath, PathStep attribute) For REF.getTextParameterFromCachedContextByNamesPath(UUID visibilityAreaId, PathStep topLevelDataSetList, UUID dataSetId, int dataSetColumn, List<UUID> macroPosition, List<PathStep> pathSteps, PathStep attribute) For REF_THIS.
-
Field Details
-
dataSetListContextService
-
modelsProvider
-
parameterProvider
-
cachedEvaluatedValues
Cached parameter values. Used for macros, if they reference to some parameter with not yet evaluated macro value. Value being evaluated and stored in cache, just to make sure it's values will be always the same for any references. -
cachedDslMacroValues
-
-
Constructor Details
-
MacroContextServiceImpl
public MacroContextServiceImpl()
-
-
Method Details
-
getTextParameterByListDataSetAndPath
@Transactional(readOnly=true, propagation=REQUIRES_NEW) public String getTextParameterByListDataSetAndPath(UUID visibilityAreaId, PathStep dataSetList, PathStep dataSetPath, List<PathStep> referenceAttributePath, PathStep attribute) throws DataSetServiceException For REF. Gets parameter from DS context (probably cached).- Specified by:
getTextParameterByListDataSetAndPathin interfaceMacroContextService- Throws:
DataSetServiceException
-
getTextParameterByExternalListDataSetAndPath
@Transactional(readOnly=true, propagation=REQUIRES_NEW) public String getTextParameterByExternalListDataSetAndPath(UUID visibilityAreaId, PathStep dataSetList, PathStep dataSetPath, List<PathStep> referenceAttributePath, PathStep attribute) throws DataSetServiceException For REF_DSL.- Specified by:
getTextParameterByExternalListDataSetAndPathin interfaceMacroContextService- Throws:
DataSetServiceException
-
getTextParameterFromCachedContextByNamesPath
@Transactional(readOnly=true, propagation=REQUIRES_NEW) public String getTextParameterFromCachedContextByNamesPath(UUID visibilityAreaId, PathStep topLevelDataSetList, UUID dataSetId, int dataSetColumn, List<UUID> macroPosition, List<PathStep> pathSteps, PathStep attribute) throws DataSetServiceException For REF_THIS.- Specified by:
getTextParameterFromCachedContextByNamesPathin interfaceMacroContextService- Throws:
DataSetServiceException
-
getDataSetListName
- Specified by:
getDataSetListNamein interfaceMacroContextService
-
getDataSetName
- Specified by:
getDataSetNamein interfaceMacroContextService- Throws:
DataSetServiceException
-
getDataSetUuid
- Specified by:
getDataSetUuidin interfaceMacroContextService- Throws:
DataSetServiceException
-
getAttributeName
- Specified by:
getAttributeNamein interfaceMacroContextService- Throws:
DataSetServiceException
-
getDataSetList
public DataSetList getDataSetList(UUID visibilityAreaId, PathStep dataSetListPathStep) throws DataSetServiceException Get dataSetList, by its name or id, provided in dataSetListPathStep parameter. Useful to collect referenced fromRefDslMacrodataSetLists. Used in Export functionality.- Specified by:
getDataSetListin interfaceMacroContextService- Throws:
DataSetServiceException
-
getCachedEvaluatedValues
Returns evaluated parameters (in reference macros) by DSL ID.- Specified by:
getCachedEvaluatedValuesin interfaceMacroContextService
-
dropLocalThreadCache
public void dropLocalThreadCache()- Specified by:
dropLocalThreadCachein interfaceMacroContextService
-
getDslMacroCache
Returns evaluated parameters (in reference DSL macros).- Specified by:
getDslMacroCachein interfaceMacroContextService
-