org.eodisp.ui.mm.models
Class FedPermissionsModel

java.lang.Object
  extended by org.eodisp.ui.common.components.AbstractEodispModel
      extended by org.eodisp.ui.mm.models.FedPermissionsModel
All Implemented Interfaces:
EodispModel

public class FedPermissionsModel
extends AbstractEodispModel

Version:
$Id:$
Author:
eglimi

Field Summary
(package private) static org.apache.log4j.Logger logger
          Log4J logger for this class
 
Constructor Summary
FedPermissionsModel(Federate curObj)
           
 
Method Summary
 void distrustSm(int[] indices)
           
 void doSave()
          Executes the save command in the model.
 void doUpdate()
           Instructs the model to do an update of its data.
 org.eodisp.ui.mm.models.FedPermissionsModel.SmListModel getTrustedSmListModel()
           
 org.eodisp.ui.mm.models.FedPermissionsModel.SmListModel getUntrustedSmListModel()
           
 boolean hasChanges()
          Returns a value stating whether the model has some changes since the last change.
 boolean isReposConntected()
          This is only a convenient method to test the connection to the repository
 void registerTrustedSm()
           
 void trustSm(int[] indices)
           
 void undo()
          Undo all changes in the repository datagraph.
 
Methods inherited from class org.eodisp.ui.common.components.AbstractEodispModel
addModelListener, fireModelChanged, getModelListener, redo, removeModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
Log4J logger for this class

Constructor Detail

FedPermissionsModel

public FedPermissionsModel(Federate curObj)
Method Detail

doSave

public void doSave()
            throws java.io.IOException
Executes the save command in the model. This saves the changes since the last save persistently.

Throws:
java.io.IOException

doUpdate

public void doUpdate()

Instructs the model to do an update of its data. Many EodispModels are just intermediated models for view components and do not hold the actual data. The actual data is usually retrieved and maintained by a persistency framework. Thus, if the real data has been changed, a model can be informed of this updated and it can be instructed to reload the data.

This should in most cases lead to an update of the visual component representing the data as well.

Specified by:
doUpdate in interface EodispModel
Overrides:
doUpdate in class AbstractEodispModel

hasChanges

public boolean hasChanges()
Returns a value stating whether the model has some changes since the last change.

Returns:
True if the model has changes since the last change or false, if there are no changes.

undo

public void undo()
Undo all changes in the repository datagraph.

This makes and undo of the last command executed by the model. How an undo is implemented depends on the model. This operation might not be available on all models. Models not supporting undo should ignore such a request.

Specified by:
undo in interface EodispModel
Overrides:
undo in class AbstractEodispModel

trustSm

public void trustSm(int[] indices)

distrustSm

public void distrustSm(int[] indices)

getUntrustedSmListModel

public org.eodisp.ui.mm.models.FedPermissionsModel.SmListModel getUntrustedSmListModel()

getTrustedSmListModel

public org.eodisp.ui.mm.models.FedPermissionsModel.SmListModel getTrustedSmListModel()

registerTrustedSm

public void registerTrustedSm()

isReposConntected

public boolean isReposConntected()
This is only a convenient method to test the connection to the repository

Returns:
true, if there is a connection, otherwise false