Class DataApplication
- java.lang.Object
-
- org.palladiosimulator.measurementsui.dataprovider.DataApplication
-
public final class DataApplication extends Object
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DataApplication
getInstance()
Get the instance of DataApplicationModelAccessor
getModelAccessor()
Returns an instance of ModelAccessor which can be used to access all pcm models after they are loadedorg.palladiosimulator.monitorrepository.MonitorRepository
getMonitorRepository()
Returns the selected monitorRepositoryIProject
getProject()
Returns the project to which the dataApplication is currently connectedorg.palladiosimulator.servicelevelobjective.ServiceLevelObjectiveRepository
getSLORepository()
Returns the selected sloRepositoryValidProjectAccessor
getValidProjectAccessor()
Returns an instance of the DataGatherer which is responsible for getting projects and paths in the eclipse workbenchvoid
loadData(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 Detail
-
getInstance
public static DataApplication getInstance()
Get the instance of DataApplication- Returns:
- instance of DataApplication
-
loadData
public void loadData(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
public ModelAccessor getModelAccessor()
Returns an instance of ModelAccessor which can be used to access all pcm models after they are loaded- Returns:
- ModelAccessor instance
-
getValidProjectAccessor
public ValidProjectAccessor getValidProjectAccessor()
Returns an instance of the DataGatherer which is responsible for getting projects and paths in the eclipse workbench- Returns:
- DataGathering instance
-
getProject
public 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:
-
-