Class DataApplication
java.lang.Object
org.palladiosimulator.measurementsui.dataprovider.DataApplication
This class manages the current project and monitorRepository of the workspace which are selected
and provides access to all necessary data from this project.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataApplication
Get the instance of DataApplicationReturns an instance of ModelAccessor which can be used to access all pcm models after they are loadedorg.palladiosimulator.monitorrepository.MonitorRepository
Returns the selected monitorRepositoryorg.eclipse.core.resources.IProject
Returns the project to which the dataApplication is currently connectedorg.palladiosimulator.servicelevelobjective.ServiceLevelObjectiveRepository
Returns the selected sloRepositoryReturns an instance of the DataGatherer which is responsible for getting projects and paths in the eclipse workbenchvoid
loadData
(org.eclipse.core.resources.IProject project, int monitorRepositorySelectionIndex, int sloRepositorySelectionIndex) Loads all Palladio component models Models given a project is selected and it has a .aird file(modeling Project nature).void
updateData
(int monitorRepositorySelectionIndex, int sloRepositorySelectionIndex) Updates the models by reloading them through a new session also reloads the selected monitorRepositoryvoid
updateMonitorRepository
(int selectionIndex) Updates the currently selected monitorRepository based on the selectionIndexvoid
updateSLORepository
(int selectionIndex)
-
Method Details
-
getInstance
Get the instance of DataApplication- Returns:
- instance of DataApplication
-
loadData
public void loadData(org.eclipse.core.resources.IProject project, int monitorRepositorySelectionIndex, int sloRepositorySelectionIndex) Loads all Palladio component models Models given a project is selected and it has a .aird file(modeling Project nature). Initializes a session corresponding to the project, which is used to load the models. Checks for Monitor-/MeasuringPoint-Repositories and creates them if none exist.- Parameters:
project
- to load data frommonitorRepositorySelectionIndex
- index from the monitorRepository to load
-
updateData
public void updateData(int monitorRepositorySelectionIndex, int sloRepositorySelectionIndex) Updates the models by reloading them through a new session also reloads the selected monitorRepository- Parameters:
monitorRepositorySelectionIndex
- index from the monitorRepository to loadsloRepositorySelectionIndex
-
-
updateMonitorRepository
public void updateMonitorRepository(int selectionIndex) Updates the currently selected monitorRepository based on the selectionIndex- Parameters:
selectionIndex
- which monitorRepository should be selected
-
updateSLORepository
public void updateSLORepository(int selectionIndex) -
getModelAccessor
Returns an instance of ModelAccessor which can be used to access all pcm models after they are loaded- Returns:
- ModelAccessor instance
-
getValidProjectAccessor
Returns an instance of the DataGatherer which is responsible for getting projects and paths in the eclipse workbench- Returns:
- DataGathering instance
-
getProject
public org.eclipse.core.resources.IProject getProject()Returns the project to which the dataApplication is currently connected- Returns:
- current Project
-
getMonitorRepository
public org.palladiosimulator.monitorrepository.MonitorRepository getMonitorRepository()Returns the selected monitorRepository- Returns:
- MonitorRepository
-
getSLORepository
public org.palladiosimulator.servicelevelobjective.ServiceLevelObjectiveRepository getSLORepository()Returns the selected sloRepository- Returns:
-