de.uni_paderborn.fujaba.coobra
Class FujabaChangeManager

java.lang.Object
  extended byde.uni_paderborn.fujaba.coobra.FujabaChangeManager

public class FujabaChangeManager
extends java.lang.Object

The change manager provides access to the CoObRA LocalRepository for the current Virtual Machine. (Fujaba uses only one repository at a time)

Version:
$Revision: 1.32 $
Author:
$Author: lowende $

Field Summary
private static de.upb.lib.userinterface.ActionExecutionListener ael
          Stores the ActionExecutionListener for pushing a cause on user action
private static de.tu_bs.coobra.errors.ErrorHandlerInterface errorHandler
          No comment provided by developer, please add a comment to improve documentation.
(package private) static org.apache.log4j.Logger log
          log4j logging
private static de.tu_bs.coobra.LocalRepository vMRepository
          the LocalRepository that is used by this VMs CoObRAPersistentObjects
 
Constructor Summary
FujabaChangeManager()
           
 
Method Summary
static void addActionCauseListener()
          Adds a listener to the UserInterfaceManager to push a cause on the begin of every Action tyken by the user.
static UMLProject getUMLProject()
          Get the uMLProject attribute of the FujabaChangeManager class
static de.tu_bs.coobra.LocalRepository getVMRepository()
          Get the vMRepository attribute of the CoObRAPersistentObject class
static boolean isCollectionField(java.lang.Class cls, java.lang.String fieldName)
          Helper method to determine if a field may contain multiple items
static boolean isInUndoRedo()
           
static void setVMRepository(de.tu_bs.coobra.LocalRepository vMRepository)
          Changes the repository for CoObRAPersistentObjects in this Virtual Machine.
static void updateUndoRedoActions()
          update the enabled state of undo- and redo-action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

static final transient org.apache.log4j.Logger log
log4j logging


vMRepository

private static de.tu_bs.coobra.LocalRepository vMRepository
the LocalRepository that is used by this VMs CoObRAPersistentObjects


errorHandler

private static de.tu_bs.coobra.errors.ErrorHandlerInterface errorHandler
No comment provided by developer, please add a comment to improve documentation.


ael

private static de.upb.lib.userinterface.ActionExecutionListener ael
Stores the ActionExecutionListener for pushing a cause on user action

Constructor Detail

FujabaChangeManager

public FujabaChangeManager()
Method Detail

getVMRepository

public static de.tu_bs.coobra.LocalRepository getVMRepository()
Get the vMRepository attribute of the CoObRAPersistentObject class

Returns:
The VMRepository

setVMRepository

public static void setVMRepository(de.tu_bs.coobra.LocalRepository vMRepository)
Changes the repository for CoObRAPersistentObjects in this Virtual Machine.
Use with care!

Parameters:
vMRepository - the new repository for all newly created CoObRAPersistentObjects

addActionCauseListener

public static void addActionCauseListener()
Adds a listener to the UserInterfaceManager to push a cause on the begin of every Action tyken by the user.


isCollectionField

public static boolean isCollectionField(java.lang.Class cls,
                                        java.lang.String fieldName)
Helper method to determine if a field may contain multiple items

Parameters:
cls - Class in which the field resides
fieldName - name of the field (e.g. "position")
Returns:
true when field is a collection (has an addTo-Method)

getUMLProject

public static UMLProject getUMLProject()
Get the uMLProject attribute of the FujabaChangeManager class

Returns:
The uMLProject value

isInUndoRedo

public static boolean isInUndoRedo()
Returns:
true when an undo or redo operation is in progress (in current thread)

updateUndoRedoActions

public static void updateUndoRedoActions()
update the enabled state of undo- and redo-action