ARoad0.gBaseInterface
Interface ViewManager

All Superinterfaces:
BaseBeanManager
All Known Implementing Classes:
BaseManagerImpl

public interface ViewManager
extends BaseBeanManager

This interface is responsible for managing the views in the generic base through specific methods.

See Also:
BaseManagerImpl

Method Summary
 void closeOpenView(ViewInBase _view)
          Close an open view without save it.
 java.util.Map getEorM_OpenViews()
           
 java.util.List getL_ViewNames()
          Return the names of the open or closed views.
 long getSerialVersionUID()
           
 boolean isOpenView(ImmutableName _name)
           
 boolean knowsView(ImmutableName _name)
           
 void openAllViews()
          Open all known views.
 ViewInBase openView(ImmutableName _name)
          Open a registered and closed view from a file in the current data directory.
 void removeView(ImmutableName _name)
          The view name is removed from the view list in ViewManager.
 void saveAllViews()
          Save all the open views in some files (one per view) in the default data directory.
 void saveAndCloseOpenView(ViewInBase _view)
          Close an open view and save it before.
 void saveOpenView(ViewInBase _view)
          Save an open view without close it.
 
Methods inherited from interface ARoad0.gBaseInterface.BaseBeanManager
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Method Detail

openAllViews

void openAllViews()
                  throws BaseError,
                         DialogError
Open all known views.

Throws:
BaseError - if a view is not known or ClassNotFoundException, a view object belongs to a closed ACS (with the relevant closed ACS names that may be get through BaseError.getL_Exception()), or IOException, or if a view is open at the start of the method (if so, close it before a new call to this method).
DialogError - if a view contains closed-ACS objects.

openView

ViewInBase openView(ImmutableName _name)
                    throws BaseError,
                           DialogError
Open a registered and closed view from a file in the current data directory.

Parameters:
_name - ImmutableName of the view to open. Its file name is built with the two last components of the name, or with the sole component.
Returns:
ViewInBase: the open view.
Throws:
BaseError - if the view is not known, the view is open, the open view has not the same name, or ClassNotFoundException, IOException.
DialogError - if the view contains closed-ACS objects, and closed-ACS names are then put in the DialogError Exceptions List, or if the view contains an object which is no more known by its ACS, and removed object name is then put in the DialogError Exceptions List.

saveAllViews

void saveAllViews()
                  throws BaseError
Save all the open views in some files (one per view) in the default data directory.

Throws:
BaseError - if viewName.lastComponent() is null, FileNotFoundException or IOException.

saveAndCloseOpenView

void saveAndCloseOpenView(ViewInBase _view)
                          throws BaseError
Close an open view and save it before. The view is still known in ViewManager. In this method, THE OBJECT _VIEW IS SET TO NULL. After the call of this method, SET the object _view TO NULL.

Parameters:
_view - ViewInBase to be saved, closed and finalized.
Throws:
BaseError - if _view is not open, ViewName.lastComponent() is null, or FileNotFoundException and IOException.

saveOpenView

void saveOpenView(ViewInBase _view)
                  throws BaseError
Save an open view without close it. The view instance is not modified.

Parameters:
_view - ViewInBase to be saved.
Throws:
BaseError - if _view is not open, ViewName.lastComponent() is null, or FileNotFoundException and IOException.

getL_ViewNames

java.util.List getL_ViewNames()
Return the names of the open or closed views.

Returns:
unmodifiable list of view names

getEorM_OpenViews

java.util.Map getEorM_OpenViews()
Returns:
unmodifiable map of non-null instances of the open views

getSerialVersionUID

long getSerialVersionUID()
Returns:
long

knowsView

boolean knowsView(ImmutableName _name)
Parameters:
_name - ImmutableName of a view
Returns:
boolean true if _name is known as a view name. The view may be open or closed.

isOpenView

boolean isOpenView(ImmutableName _name)
Parameters:
_name - ImmutableName of a view
Returns:
boolean true if _name is known as a view name and the view is open.

removeView

void removeView(ImmutableName _name)
                throws BaseError
The view name is removed from the view list in ViewManager. If it is open, the view is closed and saved before. The view saving file is not deleted, but it could be (or removed) by the user. Then, ViewManager.openView(this view) can't work.

Parameters:
_name - ImmutableName of the view to remove.
Throws:
BaseError - if the view is unknown, viewName.lastComponent() is null, or FileNotFoundException and IOException.

closeOpenView

void closeOpenView(ViewInBase _view)
                   throws BaseError
Close an open view without save it. The file is not deleted.

Parameters:
_view - ViewInBase to be closed and finalized.
Throws:
BaseError - if _view is not open.