alma::acs::commandcenter::app::CommandCenterLogic Class Reference

Collaboration diagram for alma::acs::commandcenter::app::CommandCenterLogic:
Collaboration graph
[legend]

List of all members.

Classes

class  DeploymentTreeControllerImpl
class  MyProjectRunModel
class  StartupOptions

Public Member Functions

void prepare (StartupOptions startupOptions)
void go ()
void stop ()
void exit (final int code)
String version ()
URL findResource (String name)
URL findResource (String name, String where)
HelpSet getHelpSet ()
void installExtraTools (URL url) throws Exception
void removeExtraTools ()
void loadBuiltinTools (URL url) throws Exception
AcsCommandCenterProject createProject ()
void loadProject (File f)
AcsCommandCenterProject readProject (File f) throws FileNotFoundException, MarshalException, ValidationException, IOException
void writeProject (AcsCommandCenterProject p, File f) throws IOException, MarshalException, ValidationException
void moreContainers ()
void lessContainers ()
ContainerT removeContainer (int index)
void insertContainer (ContainerT cont, int index)
Map< String, Object >[] giveVariableMapsForGui ()
void handleUnresolvableVariable (String name)
List< String > giveProjectVariableNames ()
void runBackground (Runnable r)

Public Attributes

AcsCommandCenterProject project
MyProjectRunModel model
StartupOptions startupOptions
ExecuteServices executeServices
ExecuteManager executeManager
ExecuteContainer executeContainer
ExecuteAcs executeAcs
ExecuteTools executeTools
Firestarter firestarter
URL latestBuiltinToolsUrl
URL currentExtraToolsUrl
DeploymentTreeControllerImpl deploymentTreeControllerImpl

Protected Member Functions

void installExtraTools (InputStream f) throws Exception
void loadBuiltinTools (InputStream f) throws Exception

Protected Attributes

CommandCenterGui gui
ProjectMaker projectMaker
Logger log
String version = null
final String HELPSET_NAME = "AcsCommandCenter.hs"
HelpSet helpSet

Private Member Functions

void scanForVariables (Object[] xx, List< String > l)
void scanForVariables (Object x, List< String > l)
void scanForVariables (String s, int i, List< String > l)

Private Attributes

List< String > variablesDiscoveredOnTheFly = new LinkedList<String>()
ExecutorService bgThreads

Detailed Description

The business logic for Command Center.


Member Function Documentation

AcsCommandCenterProject alma::acs::commandcenter::app::CommandCenterLogic::createProject (  )  [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::exit ( final int  code  )  [inline]

System.exit() can be prevented by setting the boolean flag to false through the corresponding command line switch.

References alma::acs::commandcenter::app::CommandCenterLogic::StartupOptions::doExitOnClose, log, and startupOptions.

Referenced by prepare(), and stop().

URL alma::acs::commandcenter::app::CommandCenterLogic::findResource ( String  name,
String  where 
) [inline]

Finds a resource in the specified location.

References log.

URL alma::acs::commandcenter::app::CommandCenterLogic::findResource ( String  name  )  [inline]
HelpSet alma::acs::commandcenter::app::CommandCenterLogic::getHelpSet (  )  [inline]
List<String> alma::acs::commandcenter::app::CommandCenterLogic::giveProjectVariableNames (  )  [inline]

For later use by whoever, could currently as well be "protected"

References project, scanForVariables(), and variablesDiscoveredOnTheFly.

Referenced by giveVariableMapsForGui().

Map<String, Object> [] alma::acs::commandcenter::app::CommandCenterLogic::giveVariableMapsForGui (  )  [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::go (  )  [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::handleUnresolvableVariable ( String  name  )  [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::insertContainer ( ContainerT  cont,
int  index 
) [inline]

Inserts a container into the project at the given index, that is, the container will afterwards have the index index.

References project.

Referenced by alma::acs::commandcenter::gui::TabPanel::ActionMoveContainerDown::actionPerformed(), and alma::acs::commandcenter::gui::TabPanel::ActionMoveContainerUp::actionPerformed().

void alma::acs::commandcenter::app::CommandCenterLogic::installExtraTools ( InputStream  f  )  throws Exception [inline, protected]
void alma::acs::commandcenter::app::CommandCenterLogic::installExtraTools ( URL  url  )  throws Exception [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::lessContainers (  )  [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::loadBuiltinTools ( InputStream  f  )  throws Exception [inline, protected]

internal method

void alma::acs::commandcenter::app::CommandCenterLogic::loadBuiltinTools ( URL  url  )  throws Exception [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::loadProject ( File  f  )  [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::moreContainers (  )  [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::prepare ( StartupOptions  startupOptions  )  [inline]
AcsCommandCenterProject alma::acs::commandcenter::app::CommandCenterLogic::readProject ( File  f  )  throws FileNotFoundException, MarshalException, ValidationException, IOException [inline]
ContainerT alma::acs::commandcenter::app::CommandCenterLogic::removeContainer ( int  index  )  [inline]

Removes a container from the project.

Returns:
the removed container, or null if index invalid

References project.

Referenced by alma::acs::commandcenter::gui::TabPanel::ActionMoveContainerDown::actionPerformed(), and alma::acs::commandcenter::gui::TabPanel::ActionMoveContainerUp::actionPerformed().

void alma::acs::commandcenter::app::CommandCenterLogic::removeExtraTools (  )  [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::runBackground ( Runnable  r  )  [inline]
void alma::acs::commandcenter::app::CommandCenterLogic::scanForVariables ( String  s,
int  i,
List< String >  l 
) [inline, private]

References scanForVariables().

void alma::acs::commandcenter::app::CommandCenterLogic::scanForVariables ( Object  x,
List< String >  l 
) [inline, private]

References scanForVariables().

void alma::acs::commandcenter::app::CommandCenterLogic::scanForVariables ( Object[]  xx,
List< String >  l 
) [inline, private]
void alma::acs::commandcenter::app::CommandCenterLogic::stop (  )  [inline]

Returns the first non-empty line of file "src/VERSION", or the empty string in any erroneous case.

Returns:
a valid version info or ""

Referenced by prepare().

void alma::acs::commandcenter::app::CommandCenterLogic::writeProject ( AcsCommandCenterProject  p,
File  f 
) throws IOException, MarshalException, ValidationException [inline]

Member Data Documentation

Initial value:
 Executors.newCachedThreadPool(new ThreadFactory(){
                ThreadFactory def = Executors.defaultThreadFactory();
                public Thread newThread (Runnable r) {
                        Thread ret = def.newThread(r);
                        ret.setDaemon(true);
                        return ret;
                }
        })

Factory for unlimited number of daemons threads

Referenced by alma::acs::commandcenter::app::CommandCenterLogic::DeploymentTreeControllerImpl::getBackgroundExecutor(), runBackground(), and stop().

Referenced by getHelpSet(), and prepare().

final String alma::acs::commandcenter::app::CommandCenterLogic::HELPSET_NAME = "AcsCommandCenter.hs" [protected]

Referenced by prepare().

Referenced by alma::acs::commandcenter::gui::TabPanel::ActionMoveContainerDown::actionPerformed(), alma::acs::commandcenter::gui::TabPanel::ActionMoveContainerUp::actionPerformed(), alma::acs::commandcenter::gui::TabPanel::ActionStopAllContainers::actionPerformed(), alma::acs::commandcenter::gui::TabPanel::ActionStartAllContainers::actionPerformed(), alma::acs::commandcenter::gui::TabPanel::ActionStopContainer::actionPerformed(), alma::acs::commandcenter::gui::TabPanel::ActionStartContainer::actionPerformed(), alma::acs::commandcenter::gui::CommandCenterGui::ActionSaveAsProject::actionPerformed(), alma::acs::commandcenter::gui::CommandCenterGui::ActionSaveProject::actionPerformed(), alma::acs::commandcenter::gui::CommandCenterGui::ActionNewProject::actionPerformed(), alma::acs::commandcenter::gui::TabPanel::getMode(), giveProjectVariableNames(), insertContainer(), lessContainers(), loadProject(), moreContainers(), prepare(), removeContainer(), alma::acs::commandcenter::gui::CommandCenterGui::showContainerSettingsDialog(), alma::acs::commandcenter::gui::CommandCenterGui::writeFrontPanelToModel(), alma::acs::commandcenter::gui::CommandCenterGui::writeManagerLocationForContainersToModel(), alma::acs::commandcenter::gui::CommandCenterGui::writeManagerLocationForToolsToModel(), alma::acs::commandcenter::gui::CommandCenterGui::writeModelToContainerSettingsDialog(), alma::acs::commandcenter::gui::CommandCenterGui::writeModelToFrontPanel(), alma::acs::commandcenter::gui::CommandCenterGui::writeModelToManagerLocationForContainers(), and alma::acs::commandcenter::gui::CommandCenterGui::writeModelToManagerLocationForTools().

List<String> alma::acs::commandcenter::app::CommandCenterLogic::variablesDiscoveredOnTheFly = new LinkedList<String>() [private]

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2