@Service public class ExternalElementsGetterController extends java.lang.Object implements ExternalElementsGetterInterface
Modifier and Type | Field and Description |
---|---|
private MeasurementGoalRepository |
measurementGoalRepository |
private MetricCRUDInterface |
metricController |
private ModelMapperFactoryInterface |
modelMapperFactory |
private QuestionCRUDInterface |
questionController |
private ExternalElementsRepositoryInterface |
repository |
Constructor and Description |
---|
ExternalElementsGetterController() |
Modifier and Type | Method and Description |
---|---|
<T,Z> java.util.ArrayList<T> |
fromArrayListToArrayListDTO(java.util.ArrayList<Z> input,
java.lang.Class<T> clazz)
This function converts ArrayList of entities in ArrayList of DTO, and viceversa.
|
AssumptionDTO |
getAssumptionByPointerBus(PointerBus pointerBus) |
ContextFactorDTO |
getContextFactorByPointerBus(PointerBus pointerBus) |
InstanceProjectDTO |
getInstanceProjectByPointerBus(PointerBus pointerBus) |
ExternalElementsDTO |
getMeasurementGoalExternalElements(java.lang.String measurementGoalId)
this method fills the return dto with every external informations that are related to
a Measurement Goal.
|
OrganizationalGoalDTO |
getOrganizationalGoalByPointerBus(PointerBus pointerBus) |
@Autowired private MeasurementGoalRepository measurementGoalRepository
@Autowired private ModelMapperFactoryInterface modelMapperFactory
@Autowired private ExternalElementsRepositoryInterface repository
@Autowired private MetricCRUDInterface metricController
@Autowired private QuestionCRUDInterface questionController
public ExternalElementsDTO getMeasurementGoalExternalElements(java.lang.String measurementGoalId) throws java.io.IOException, BusException, BadInputException
getMeasurementGoalExternalElements
in interface ExternalElementsGetterInterface
measurementGoalId
- BadInputException
java.io.IOException
BusException
public <T,Z> java.util.ArrayList<T> fromArrayListToArrayListDTO(java.util.ArrayList<Z> input, java.lang.Class<T> clazz)
e.g. fromArrayListToArrayListDTO(listOfAssumption, AssumptionDTO.class)
fromArrayListToArrayListDTO
in interface ExternalElementsGetterInterface
T
- T is the type of parameter for the new arrayZ
- Z is the type of parameter for the old arrayinput
- is the arraylist to mapclazz
- is the parameter of the new arrayList to fill uppublic AssumptionDTO getAssumptionByPointerBus(PointerBus pointerBus) throws java.io.IOException, BusException, NotFoundException
getAssumptionByPointerBus
in interface ExternalElementsGetterInterface
java.io.IOException
BusException
NotFoundException
public ContextFactorDTO getContextFactorByPointerBus(PointerBus pointerBus) throws java.io.IOException, BusException, NotFoundException
getContextFactorByPointerBus
in interface ExternalElementsGetterInterface
java.io.IOException
BusException
NotFoundException
public OrganizationalGoalDTO getOrganizationalGoalByPointerBus(PointerBus pointerBus) throws java.io.IOException, BusException, NotFoundException
getOrganizationalGoalByPointerBus
in interface ExternalElementsGetterInterface
java.io.IOException
BusException
NotFoundException
public InstanceProjectDTO getInstanceProjectByPointerBus(PointerBus pointerBus) throws java.io.IOException, BusException, NotFoundException
getInstanceProjectByPointerBus
in interface ExternalElementsGetterInterface
java.io.IOException
BusException
NotFoundException