|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IProjectDAO
This is the interface for the data access object(s) which will access for example the file system to manage the available projects.
Method Summary | |
---|---|
void |
addProject(String projectName,
String username)
This method adds a new project to the application. |
void |
copyProject(String originalProjectName,
String newProjectName)
This method makes a copy of a project and saves it under another name. |
boolean |
deleteLibrary(String projectName,
String libName)
Deletes the given library of the given project. |
String |
getAnalysisLayout(String projectName)
Delivers the stored analysis layout for the given project. |
ComponentListContainer |
getAvailableComponents(String project)
Delivers the available components (readers, filters and repositories) for the given project. |
ClassLoader |
getClassLoader(String projectName,
Object requester)
This method delivers a class loader containing the currently available libraries of the given project. |
String |
getCockpitLayout(String projectName)
Delivers the stored cockpit layout for the given project. |
long |
getCurrTimeStamp(String projectName)
Delivers the current time stamp of the given project. |
String |
getLastUser(String projectName)
Delivers the last user of the given project or a substitution if the meta data is corrupt or missing. |
String |
getOwner(String projectName)
Delivers the owner of the given project or a substitution if the meta data is corrupt or missing. |
File |
getProjectFile(String projectName)
Delivers the kax-file for the given project. |
void |
importProject(String projectName,
String username,
org.primefaces.model.UploadedFile file)
This method imports an existing kax-file into the application. |
List<String> |
listAllLibraries(String projectName)
This method lists all available libraries of the given project. |
Collection<String> |
listAllProjects()
This method lists all available projects on the file system. |
kieker.analysis.model.analysisMetaModel.MIProject |
loadProject(String projectName)
This method loads the kax-file for the given project name and delivers an initializes instance of MIProject . |
Object |
loadProject(String projectName,
ClassContainer classAndMethodContainer)
This method loads the kax-file for the given project name and delivers an initializes instance of MIProject - but instead of using the "normal" class
loader, it uses the methods and classes stored in the given instance of ClassContainer . |
void |
removeProject(String projectName)
This method removes the given project from the application. |
void |
saveProject(String projectName,
kieker.analysis.model.analysisMetaModel.MIProject project,
long timeStamp,
boolean overwriteNewerProject,
String username,
String analysisLayout,
String cockpitLayout)
This method tries to save the given model instance for the given project. |
void |
uploadLibrary(org.primefaces.model.UploadedFile file,
String projectName)
This method tries to upload a dependency to the given project. |
Method Detail |
---|
@PreAuthorize(value="hasAnyRole(\'User\', \'Administrator\')") void addProject(String projectName, String username) throws ProjectAlreadyExistingException, IOException
IOException
, it will make sure that the project-directories will be removed as if the method would never have been called.
projectName
- The name of the new project.username
- The name of the user who created the project.
ProjectAlreadyExistingException
- If a project with the same name exists already.
IOException
- If something went wrong during the creation of the project.@PreAuthorize(value="hasAnyRole(\'User\', \'Administrator\')") void removeProject(String projectName) throws IOException, ProjectNotExistingException
projectName
- The name of the project.
IOException
- If something went wrong during the removing.
ProjectNotExistingException
- If a project with the given name does not exist.@PreAuthorize(value="hasAnyRole(\'User\', \'Administrator\')") void importProject(String projectName, String username, org.primefaces.model.UploadedFile file) throws ProjectAlreadyExistingException, IOException
projectName
- The name of the new project.username
- The name of the user who imported the project.file
- The kax file to be uploaded.
ProjectAlreadyExistingException
- If a project with the same name exists already.
IOException
- If something went wrong during the creation of the project or the uploading of the file.@PreAuthorize(value="hasAnyRole(\'User\', \'Administrator\')") void copyProject(String originalProjectName, String newProjectName) throws ProjectNotExistingException, ProjectAlreadyExistingException, IOException
IOException
, it will make sure that the
project-directories of the destination-project will be removed as if the method would never have been called.
originalProjectName
- The name of the source project.newProjectName
- The name of the target project.
ProjectNotExistingException
- If a project with the given (source) name doesn't exist.
ProjectAlreadyExistingException
- If a project with the same (target) name exists already.
IOException
- If something went wrong during the creation of the target-project or during the loading of the source-project.@PreAuthorize(value="isAuthenticated()") kieker.analysis.model.analysisMetaModel.MIProject loadProject(String projectName) throws ProjectNotExistingException, IOException
MIProject
.
projectName
- The name of the project to be loaded.
ProjectNotExistingException
- If a project with the given (source) name doesn't exist.
IOException
- If something went wrong during the opening of the project.@PreAuthorize(value="isAuthenticated()") Object loadProject(String projectName, ClassContainer classAndMethodContainer) throws ProjectNotExistingException, IOException
MIProject
- but instead of using the "normal" class
loader, it uses the methods and classes stored in the given instance of ClassContainer
. This means that this method does return an
instance of MIProject
, but the one defined in the container. This is also the reason why this method has to return an Object
-instance.
projectName
- The name of the project to be loaded.classAndMethodContainer
- The container, which will be used to load the project instance.
ProjectNotExistingException
- If a project with the given (source) name doesn't exist.
IOException
- If something went wrong during the opening of the project. This can also mean that the given ClassContainer
is somehow invalid.@PreAuthorize(value="hasAnyRole(\'User\', \'Administrator\')") void saveProject(String projectName, kieker.analysis.model.analysisMetaModel.MIProject project, long timeStamp, boolean overwriteNewerProject, String username, String analysisLayout, String cockpitLayout) throws ProjectNotExistingException, IOException, NewerProjectException
NewerProjectException
will be thrown. If
something goes wrong during the storage, it is not guaranteed that the resulting file will be valid.
projectName
- The name of the project which has to be saved.project
- The model instance to be stored in the corresponding kax-file.timeStamp
- The time stamp which has to be compared with the "real" time stamp of the project.overwriteNewerProject
- Determines whether a newer project file will be overwritten without further warning or not.username
- The name of the user who saves the project.analysisLayout
- The current layout of the analysis graph. It is valid if this parameter is null. In this case the stored layout will not be changed.cockpitLayout
- The current layout of the cockpit. It is valid if this parameter is null. In this case the stored layout will not be changed.
ProjectNotExistingException
- If a project with the given name does not exist.
IOException
- If something went wrong during the storage of the model instance.
NewerProjectException
- If the project on the file system is newer and the overwriteNewerProject-flag has not been set.@PreAuthorize(value="isAuthenticated()") long getCurrTimeStamp(String projectName) throws ProjectNotExistingException
projectName
- The name of the project whose time stamp will be delivered.
ProjectNotExistingException
- If a project with the given name does not exist.@PreAuthorize(value="hasAnyRole(\'User\', \'Administrator\')") void uploadLibrary(org.primefaces.model.UploadedFile file, String projectName) throws ProjectNotExistingException, IOException
file
- The file to be uploaded to the project.projectName
- The name of the project.
ProjectNotExistingException
- If a project with the given name does not exist.
IOException
- If something went wrong during the uploading.@PreAuthorize(value="isAuthenticated()") ClassLoader getClassLoader(String projectName, Object requester) throws ProjectNotExistingException, IOException
projectName
- The name of the project.requester
- The requester of the classloader.
ProjectNotExistingException
- If a project with the given name does not exist.
IOException
- If something went wrong during the initialization of the class loader.@PreAuthorize(value="isAuthenticated()") List<String> listAllLibraries(String projectName) throws ProjectNotExistingException
projectName
- The name of the project whose libraries have to be delivered.
ProjectNotExistingException
- If a project with the given name does not exist.Collection<String> listAllProjects()
@PreAuthorize(value="isAuthenticated()") File getProjectFile(String projectName)
projectName
- The name of the project.
@PreAuthorize(value="hasAnyRole(\'User\', \'Administrator\')") boolean deleteLibrary(String projectName, String libName) throws IOException, ProjectNotExistingException
projectName
- The name of the project.libName
- The name of the library.
IOException
- If something went wrong during the reloading of the components.
ProjectNotExistingException
- If a project with the given name does not exist.@PreAuthorize(value="isAuthenticated()") ComponentListContainer getAvailableComponents(String project)
project
- The project whose components should be loaded.
@PreAuthorize(value="isAuthenticated()") String getOwner(String projectName)
projectName
- The name of the project whose owner should be delivered.
@PreAuthorize(value="isAuthenticated()") String getLastUser(String projectName)
projectName
- The name of the project whose last user should be delivered.
@PreAuthorize(value="isAuthenticated()") String getAnalysisLayout(String projectName)
projectName
- The name of the project.
@PreAuthorize(value="isAuthenticated()") String getCockpitLayout(String projectName)
projectName
- The name of the project.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |