com.jstatcom.project
Class ProjectDataManager
- java.lang.Object
-
- com.jstatcom.project.ProjectDataManager
-
public final class ProjectDataManager extends java.lang.ObjectSingleton mediator class for managing setting and getting of all project data to and from the respective handlers. All instances ofProjectDataHandlermust register with this class at program start.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static ProjectDataManagergetInstance()Gets the singleton instance of this class.ProjectData[]getProjectData()Gets an array with all project data from the data handlers that have been registered with this manager.voidregister(ProjectDataHandler handler)Registers a project data handler with this manager class.voidsetProjectData(ProjectData data)Sets the project data to the respective handler.
-
-
-
Method Detail
-
getInstance
public static ProjectDataManager getInstance()
Gets the singleton instance of this class.- Returns:
- project data manager
-
setProjectData
public void setProjectData(ProjectData data)
Sets the project data to the respective handler.- Parameters:
data- the project data to set- Throws:
java.lang.IllegalArgumentException-if (data == null)
-
getProjectData
public ProjectData[] getProjectData()
Gets an array with all project data from the data handlers that have been registered with this manager.- Returns:
- project data array
-
register
public void register(ProjectDataHandler handler)
Registers a project data handler with this manager class. Only one handler is allowed for each instance ofProjectDataTypes.- Parameters:
handler- data handler object that should take part in the project management system- Throws:
java.lang.IllegalArgumentException-if (handler == null)java.lang.IllegalStateException- if another listener has already been registered for the same project data type
-
-
DMelt 3.0 © DataMelt by jWork.ORG