pl.edu.agh.cast.resources
Class ProjectStore

java.lang.Object
  extended by pl.edu.agh.cast.resources.ProjectStore

public final class ProjectStore
extends java.lang.Object

Author:
Krzysiek Used to store models during one session.

Method Summary
static ProjectStore getInstance()
           
 pl.edu.agh.cast.model.base.IModel getModel(org.eclipse.core.resources.IProject project)
          Returns model for given project.
 org.eclipse.core.resources.IProject getProject(pl.edu.agh.cast.model.base.IModel model)
          Returns IProject for given IModel
 void init(org.eclipse.core.resources.IProject project)
          Initialize the project.
 boolean isInitialized(org.eclipse.core.resources.IProject project)
           
 void remove(org.eclipse.core.resources.IProject project)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ProjectStore getInstance()

isInitialized

public boolean isInitialized(org.eclipse.core.resources.IProject project)

init

public void init(org.eclipse.core.resources.IProject project)
Initialize the project. If the project has property "id" set, then the procedure tries to find model with the same id in the DB. If there is no such model then it is created (and stored in the DB). If there are more than one model, then new default model is instantiated, but is not stored in the DB. The same happens if any other problem occurs (especially, when the DB system is not configured properly).

Parameters:
project -

getModel

public pl.edu.agh.cast.model.base.IModel getModel(org.eclipse.core.resources.IProject project)
Returns model for given project.

Parameters:
project - The project for which the model is returned.
Returns:
The model associated with the project or null if no model is associated with the project.

getProject

public org.eclipse.core.resources.IProject getProject(pl.edu.agh.cast.model.base.IModel model)
Returns IProject for given IModel

Parameters:
model - The model associated with the project
Returns:
The project associated with the model.

remove

public void remove(org.eclipse.core.resources.IProject project)


Copyright © 2007-2008 AGH University of Science and Technology. All Rights Reserved.