nl.lxtreme.ols.api.data.project
Interface ProjectManager


public interface ProjectManager

Provides a way of loading and storing projects.


Method Summary
 void addPropertyChangeListener(PropertyChangeListener aListener)
          Adds the given listener to the list of property change listeners.
 Project createNewProject()
          Creates a new project.
 Project createTemporaryProject()
          Deprecated. do not use, no replacement.
 Project getCurrentProject()
          Returns the current project.
 void loadProject(InputStream aInput)
          Loads a project from the given input stream.
 void removePropertyChangeListener(PropertyChangeListener aListener)
          Removes the given listener from the list of property change listeners.
 void saveProject(OutputStream aOutput)
          Stores a project to the given output stream.
 

Method Detail

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener aListener)
Adds the given listener to the list of property change listeners.

Parameters:
aListener - a property change listener, cannot be null.

createNewProject

Project createNewProject()
Creates a new project.

Returns:
a new project, managed by this manager.

createTemporaryProject

@Deprecated
Project createTemporaryProject()
Deprecated. do not use, no replacement.

Creates a temporary project, useful for loading data files.

Returns:
a new project, not managed by this manager!

getCurrentProject

Project getCurrentProject()
Returns the current project.

Returns:
a project, never null.

loadProject

void loadProject(InputStream aInput)
                 throws IOException
Loads a project from the given input stream.

Parameters:
aInput - the input to read the project from, cannot be null.
Throws:
IOException - in case of I/O problems during the read of the project.

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener aListener)
Removes the given listener from the list of property change listeners.

Parameters:
aListener - a property change listener, cannot be null.

saveProject

void saveProject(OutputStream aOutput)
                 throws IOException
Stores a project to the given output stream.

Parameters:
aOutput - the output to write the project to, cannot be null.
Throws:
IOException - in case of I/O problems during writing of the project.


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.