com.metamatrix.console.models
Class ExtensionSourceManager

java.lang.Object
  extended by com.metamatrix.console.models.Manager
      extended by com.metamatrix.console.models.ExtensionSourceManager

public class ExtensionSourceManager
extends Manager


Field Summary
 
Fields inherited from class com.metamatrix.console.models.Manager
MODEL_CHANGED, MODEL_STALE
 
Constructor Summary
ExtensionSourceManager(ConnectionInfo connection)
           
 
Method Summary
 void addModule(NewExtensionSourceInfo info)
           
 void deleteModule(java.lang.String moduleName)
           
 void exportToFile(java.lang.String moduleName, java.io.File target)
           
 ExtensionSourceDetailInfo getDetailForModule(java.lang.String moduleName)
           
 ExtensionSourceDetailInfo[] getModules()
           
 java.lang.String[] getModuleTypes()
           
 void init()
          Needs to be called by subclasses - sets up event listening.
 void modifyModule(java.lang.String existingModuleName, java.lang.String newModuleName, java.lang.String newDescription, java.lang.Boolean enabled, byte[] contents)
           
 boolean moduleExists(java.lang.String moduleName)
           
 void reorderModules(java.util.List modules)
           
 void replaceModule(java.lang.String moduleName, byte[] replacementContents)
           
 
Methods inherited from class com.metamatrix.console.models.Manager
addManagerListener, fireModelChangedEvent, fireModelChangedEvent, getConnection, getConnection, getEncryptor, getEventListeners, getIsStale, refresh, removeManagerListener, setIsStale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionSourceManager

public ExtensionSourceManager(ConnectionInfo connection)
Method Detail

init

public void init()
Description copied from class: Manager
Needs to be called by subclasses - sets up event listening. (Subclasses should call super.init() in the body of their init() method.)

TODO: Perhaps this superclass should set itself to stale as part of the initialization process (see commented code in method body). That would broadcast an event to listeners which would prompt them to begin calling methods on a Manager - or perhaps a start() method with this code should be defined that will be called after init() (allowing subclasses to extend init() before start() would be called)

Overrides:
init in class Manager

deleteModule

public void deleteModule(java.lang.String moduleName)
                  throws ExternalException,
                         ExtensionModuleNotFoundException
Throws:
ExternalException
ExtensionModuleNotFoundException

modifyModule

public void modifyModule(java.lang.String existingModuleName,
                         java.lang.String newModuleName,
                         java.lang.String newDescription,
                         java.lang.Boolean enabled,
                         byte[] contents)
                  throws ExtensionModuleNotFoundException,
                         ExternalException
Throws:
ExtensionModuleNotFoundException
ExternalException

replaceModule

public void replaceModule(java.lang.String moduleName,
                          byte[] replacementContents)
                   throws ExtensionModuleNotFoundException,
                          ExternalException
Throws:
ExtensionModuleNotFoundException
ExternalException

exportToFile

public void exportToFile(java.lang.String moduleName,
                         java.io.File target)
                  throws ExtensionModuleNotFoundException,
                         ExternalException
Throws:
ExtensionModuleNotFoundException
ExternalException

addModule

public void addModule(NewExtensionSourceInfo info)
               throws DuplicateExtensionModuleException,
                      ExternalException
Throws:
DuplicateExtensionModuleException
ExternalException

getDetailForModule

public ExtensionSourceDetailInfo getDetailForModule(java.lang.String moduleName)
                                             throws ExtensionModuleNotFoundException,
                                                    ExternalException
Throws:
ExtensionModuleNotFoundException
ExternalException

reorderModules

public void reorderModules(java.util.List modules)
                    throws ExtensionModuleOrderingException,
                           ExternalException
Throws:
ExtensionModuleOrderingException
ExternalException

getModules

public ExtensionSourceDetailInfo[] getModules()
                                       throws ExternalException
Throws:
ExternalException

getModuleTypes

public java.lang.String[] getModuleTypes()
                                  throws ExternalException
Throws:
ExternalException

moduleExists

public boolean moduleExists(java.lang.String moduleName)
                     throws ExternalException
Throws:
ExternalException


Copyright © 2009. All Rights Reserved.