org.lsst.ccs.startup
Class BootUtils

java.lang.Object
  extended by org.lsst.ccs.startup.BootUtils

public class BootUtils
extends Object

A collection of static utilities linked to boot operations. Note that:

Author:
bamade

Nested Class Summary
static class BootUtils.LocalBootObject
           
 
Constructor Summary
BootUtils()
           
 
Method Summary
static String baseNameFromNames(NamesAndTag namesAndTag)
          creates a fileName from a NamesAndTag object (reverse operation of namesFromPath
static void bootFromCache()
           
static void bootSubsystemFromDescriptionNode(org.lsst.gruth.jutils.ComponentNode node, ConfigProfile profile, String subsystemName, String configName, String tag)
          Deprecated. 
static void bootSubsystemFromEffectiveNode(org.lsst.gruth.jutils.ComponentNode effectiveNode, ConfigProfile profile, String pathName)
          Deprecated. 
static void bootSubsystemFromEffectiveNode(org.lsst.gruth.jutils.ComponentNode effectiveNode, ConfigProfile profile, String subsystemName, String configName, String tag)
          Deprecated. 
static org.lsst.gruth.jutils.ComponentNode getDescriptiveNode(String pathName)
          gets a descriptive node from a file
static org.lsst.gruth.jutils.ComponentNode getEffectiveNode(org.lsst.gruth.jutils.ComponentNode descriptionNode)
          gets an effective node from a description node
static org.lsst.gruth.jutils.ComponentNode getEffectiveNodeFromFile(String pathName)
          gets an effective node from a file
static InputStream getInput(Class clazz, String pathName)
          searches for a file as a local file or a resource linked to a class or a global resource.
static org.lsst.gruth.jutils.ComponentNode getLatestInCache()
           
static org.lsst.ccs.Subsystem getRawSubsystemFromEffectiveNode(org.lsst.gruth.jutils.ComponentNode effectiveNode, ConfigProfile profile, String pathName)
          Deprecated. 
static org.lsst.ccs.Subsystem getRawSubsystemFromEffectiveNode(org.lsst.gruth.jutils.ComponentNode effectiveNode, ConfigProfile profile, String subsystemName, String configName, String tag)
           
static org.lsst.ccs.Subsystem getSubsystemFromFile(String pathName)
           
static org.lsst.ccs.Subsystem getSubsystemFromFile(String pathName, String propertiesFileName)
           
static NamesAndTag namesFromPath(String pathName)
          gets subsystem name, configName and tag name from pathName
static org.lsst.ccs.Subsystem rawSubsystemFromDescriptionNode(org.lsst.gruth.jutils.ComponentNode descriptionNode, ConfigProfile profile, String subsystemName, String configName, String tag)
           
static void saveInCache(org.lsst.gruth.jutils.ComponentNode node, String subsystemName, String configName, String tag)
          saves the latest run configuration in a local cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BootUtils

public BootUtils()
Method Detail

getDescriptiveNode

public static org.lsst.gruth.jutils.ComponentNode getDescriptiveNode(String pathName)
                                                              throws Exception
gets a descriptive node from a file

Parameters:
pathName -
Returns:
Throws:
Exception

getEffectiveNode

public static org.lsst.gruth.jutils.ComponentNode getEffectiveNode(org.lsst.gruth.jutils.ComponentNode descriptionNode)
                                                            throws InvocationTargetException,
                                                                   NoSuchMethodException,
                                                                   IllegalAccessException
gets an effective node from a description node

Parameters:
descriptionNode -
Returns:
Throws:
InvocationTargetException
NoSuchMethodException
IllegalAccessException

getEffectiveNodeFromFile

public static org.lsst.gruth.jutils.ComponentNode getEffectiveNodeFromFile(String pathName)
                                                                    throws Exception
gets an effective node from a file

Parameters:
pathName -
Returns:
Throws:
Exception

getRawSubsystemFromEffectiveNode

public static org.lsst.ccs.Subsystem getRawSubsystemFromEffectiveNode(org.lsst.gruth.jutils.ComponentNode effectiveNode,
                                                                      ConfigProfile profile,
                                                                      String subsystemName,
                                                                      String configName,
                                                                      String tag)

getRawSubsystemFromEffectiveNode

@Deprecated
public static org.lsst.ccs.Subsystem getRawSubsystemFromEffectiveNode(org.lsst.gruth.jutils.ComponentNode effectiveNode,
                                                                                 ConfigProfile profile,
                                                                                 String pathName)
Deprecated. 


rawSubsystemFromDescriptionNode

public static org.lsst.ccs.Subsystem rawSubsystemFromDescriptionNode(org.lsst.gruth.jutils.ComponentNode descriptionNode,
                                                                     ConfigProfile profile,
                                                                     String subsystemName,
                                                                     String configName,
                                                                     String tag)
                                                              throws Exception
Throws:
Exception

bootSubsystemFromDescriptionNode

@Deprecated
public static void bootSubsystemFromDescriptionNode(org.lsst.gruth.jutils.ComponentNode node,
                                                               ConfigProfile profile,
                                                               String subsystemName,
                                                               String configName,
                                                               String tag)
                                             throws Exception
Deprecated. 

Throws:
Exception

bootSubsystemFromEffectiveNode

@Deprecated
public static void bootSubsystemFromEffectiveNode(org.lsst.gruth.jutils.ComponentNode effectiveNode,
                                                             ConfigProfile profile,
                                                             String subsystemName,
                                                             String configName,
                                                             String tag)
Deprecated. 


bootSubsystemFromEffectiveNode

@Deprecated
public static void bootSubsystemFromEffectiveNode(org.lsst.gruth.jutils.ComponentNode effectiveNode,
                                                             ConfigProfile profile,
                                                             String pathName)
                                           throws Exception
Deprecated. 

Throws:
Exception

getSubsystemFromFile

public static org.lsst.ccs.Subsystem getSubsystemFromFile(String pathName)
                                                   throws Exception
Throws:
Exception

getSubsystemFromFile

public static org.lsst.ccs.Subsystem getSubsystemFromFile(String pathName,
                                                          String propertiesFileName)
                                                   throws Exception
Throws:
Exception

saveInCache

public static void saveInCache(org.lsst.gruth.jutils.ComponentNode node,
                               String subsystemName,
                               String configName,
                               String tag)
saves the latest run configuration in a local cache. This is saved in a file (see naming convention handled by baseNameFromNames that will reside in tha cache directory. The name of this file will be reported in another text file in this directory named "latest.txt".

TODO: The path of the cache directory is to be determined.

Parameters:
node -
subsystemName -
configName -
tag -

getLatestInCache

public static org.lsst.gruth.jutils.ComponentNode getLatestInCache()

bootFromCache

public static void bootFromCache()

getInput

public static InputStream getInput(Class clazz,
                                   String pathName)
                            throws IOException
searches for a file as a local file or a resource linked to a class or a global resource.

Parameters:
clazz -
pathName -
Returns:
Throws:
IOException

namesFromPath

public static NamesAndTag namesFromPath(String pathName)
gets subsystem name, configName and tag name from pathName

Parameters:
pathName -
Returns:

baseNameFromNames

public static String baseNameFromNames(NamesAndTag namesAndTag)
creates a fileName from a NamesAndTag object (reverse operation of namesFromPath

Parameters:
namesAndTag -
Returns:


Copyright © 2013 LSST. All Rights Reserved.