OOoRunner test harness

util
Class utils

java.lang.Object
  |
  +--util.utils

public class utils
extends Object


Constructor Summary
utils()
           
 
Method Summary
static boolean copyFile(XMultiServiceFactory msf, String oldF, String newF)
          This method copies a given file to a new one
static String getFullTestDocName(String sDocName)
          This method adds the DOCPTH to a given file
static String getFullTestURL(String sDocName)
          This method adds the DOCPTH to a given file and changes the format to an file URL
static String getFullURL(String sDocName)
          This method changes a given URL to a valid file URL
static String getImplName(Object aObject)
          This method returns the implementation name of a given object
static int getNextFreePort(int startPort)
          Scan localhost for the next free port-number from a starting port on.
static String getOfficeTemp(XMultiServiceFactory msf)
          This method get's the temp dir of the connected office
static String getOfficeTempDir(XMultiServiceFactory msf)
          Gets StarOffice temp directory without 'file:///' prefix.
static String getOfficeTempDirSys(XMultiServiceFactory msf)
          Gets StarOffice temp directory without 'file:///' prefix.
static String getOfficeURL(XMultiServiceFactory msf)
           
static String getVersion(String aFile, String aPlatform, String aTestbase)
          This method get the version for a given TestBase/platform combination
static boolean hasPropertyByName(XPropertySet props, String aName)
           
static boolean isVoid(Object aObject)
          This method checks if an Object is void
static void make_Directories(String first, String path)
          This method creates folders needed
static boolean overwriteFile(XMultiServiceFactory msf, String oldF, String newF)
          Copies file to a new location using SOffice features.
static URL parseURL(XMultiServiceFactory xMSF, String url)
           
static String replacePart(String all, String toReplace, String replacement)
          This method replaces a substring with another
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

utils

public utils()
Method Detail

getFullTestDocName

public static String getFullTestDocName(String sDocName)
This method adds the DOCPTH to a given file

getFullTestURL

public static String getFullTestURL(String sDocName)
This method adds the DOCPTH to a given file and changes the format to an file URL

getFullURL

public static String getFullURL(String sDocName)
This method changes a given URL to a valid file URL

make_Directories

public static void make_Directories(String first,
                                    String path)
This method creates folders needed

getVersion

public static String getVersion(String aFile,
                                String aPlatform,
                                String aTestbase)
This method get the version for a given TestBase/platform combination

getOfficeTemp

public static String getOfficeTemp(XMultiServiceFactory msf)
This method get's the temp dir of the connected office

getOfficeTempDir

public static String getOfficeTempDir(XMultiServiceFactory msf)
Gets StarOffice temp directory without 'file:///' prefix. For example is usefull for Registry URL specifying.
Returns:
SOffice temporary directory in form for example 'd:/Office60/user/temp/'.

getOfficeTempDirSys

public static String getOfficeTempDirSys(XMultiServiceFactory msf)
Gets StarOffice temp directory without 'file:///' prefix. and System dependend file separator

copyFile

public static boolean copyFile(XMultiServiceFactory msf,
                               String oldF,
                               String newF)
This method copies a given file to a new one

overwriteFile

public static boolean overwriteFile(XMultiServiceFactory msf,
                                    String oldF,
                                    String newF)
Copies file to a new location using SOffice features. If the target file already exists, the file is deleted.

hasPropertyByName

public static boolean hasPropertyByName(XPropertySet props,
                                        String aName)

getImplName

public static String getImplName(Object aObject)
This method returns the implementation name of a given object

isVoid

public static boolean isVoid(Object aObject)
This method checks if an Object is void

replacePart

public static String replacePart(String all,
                                 String toReplace,
                                 String replacement)
This method replaces a substring with another

getNextFreePort

public static int getNextFreePort(int startPort)
Scan localhost for the next free port-number from a starting port on. If the starting port is smaller than 1024, port number starts with 10000 as default, because numbers < 1024 are never free on unix machines.
Parameters:
startPort - The port where scanning starts.
Returns:
The next free port.

parseURL

public static URL parseURL(XMultiServiceFactory xMSF,
                           String url)

getOfficeURL

public static String getOfficeURL(XMultiServiceFactory msf)

OOoRunner test harness