org.mbari.siam.operations.utils
Class ServiceJarUtils

java.lang.Object
  extended by org.mbari.siam.operations.utils.ServiceJarUtils

public class ServiceJarUtils
extends java.lang.Object


Field Summary
static UUID _NULL_UUID
           
static java.lang.String _SERVICE_NAME_TOKEN
           
static java.lang.String _serviceCodePath
           
static java.lang.String _UUID_TOKEN
           
 
Constructor Summary
ServiceJarUtils()
           
 
Method Summary
static void addServiceCode(java.io.File serviceFile, UUID uuid)
          add the service code to the service code directory
static boolean creatServiceCodePath()
          create the service code direcotry if it does not exist
static java.lang.String getServiceCodeName(java.io.File serviceFile)
          get the service name from the service code file
static UUID getServiceCodeUUID(java.io.File serviceFile)
          get the intrument UUID from the service code file
static java.lang.String getServicePath(UUID uuid)
          return the path to a loaded service from the specified UUID
static boolean isServiceLoaded(UUID uuid)
          determine if service code for the specified UUID is loaded
static java.lang.String[] listServiceCode()
          return an array of strings containing the UUID and serviceName of all the loaded services
static boolean removeServiceCode(UUID uuid)
          remove the service code from the service code directory for the specified UUID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_UUID_TOKEN

public static final java.lang.String _UUID_TOKEN
See Also:
Constant Field Values

_SERVICE_NAME_TOKEN

public static final java.lang.String _SERVICE_NAME_TOKEN
See Also:
Constant Field Values

_NULL_UUID

public static final UUID _NULL_UUID

_serviceCodePath

public static final java.lang.String _serviceCodePath
Constructor Detail

ServiceJarUtils

public ServiceJarUtils()
Method Detail

isServiceLoaded

public static boolean isServiceLoaded(UUID uuid)
determine if service code for the specified UUID is loaded


getServicePath

public static java.lang.String getServicePath(UUID uuid)
return the path to a loaded service from the specified UUID


creatServiceCodePath

public static boolean creatServiceCodePath()
create the service code direcotry if it does not exist


addServiceCode

public static void addServiceCode(java.io.File serviceFile,
                                  UUID uuid)
                           throws java.io.IOException
add the service code to the service code directory

Throws:
java.io.IOException

removeServiceCode

public static boolean removeServiceCode(UUID uuid)
remove the service code from the service code directory for the specified UUID


listServiceCode

public static java.lang.String[] listServiceCode()
                                          throws java.io.IOException
return an array of strings containing the UUID and serviceName of all the loaded services

Throws:
java.io.IOException

getServiceCodeUUID

public static UUID getServiceCodeUUID(java.io.File serviceFile)
                               throws java.io.IOException,
                                      MissingPropertyException,
                                      java.lang.NumberFormatException
get the intrument UUID from the service code file

Throws:
java.io.IOException
MissingPropertyException
java.lang.NumberFormatException

getServiceCodeName

public static java.lang.String getServiceCodeName(java.io.File serviceFile)
                                           throws java.io.IOException,
                                                  MissingPropertyException
get the service name from the service code file

Throws:
java.io.IOException
MissingPropertyException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.