LibreOffice Module jvmfwk (master) 1
Namespaces | Classes | Enumerations | Functions | Variables
jfw Namespace Reference

Namespaces

namespace  BootParams
 

Classes

class  CNodeJavaInfo
 represents the settings saved in the /java/javaInfo element. More...
 
class  CXmlCharPtr
 
class  CXmlDocPtr
 
class  CXPathContextPtr
 
class  CXPathObjectPtr
 
class  FrameworkException
 
class  MergedSettings
 merges the settings for shared, user and installation during construction. More...
 
class  NodeJava
 this class represents the java settings based on a particular settings file. More...
 
class  VendorSettings
 
struct  VersionInfo
 

Enumerations

enum  JFW_MODE {
  JFW_MODE_APPLICATION ,
  JFW_MODE_DIRECT
}
 
enum  FileStatus {
  FILE_OK ,
  FILE_DOES_NOT_EXIST ,
  FILE_INVALID
}
 

Functions

static OString getElement (OString const &docPath, xmlChar const *pathExpression)
 
OString getElementUpdated ()
 gets the value of the updated element from the javavendors.xml. More...
 
void createSettingsStructure (xmlDoc *document, bool *bNeedsSave)
 create the child elements within the root structure for each platform. More...
 
JFW_MODE getMode ()
 
OUString getApplicationClassPath ()
 
OString makeClassPathOption (std::u16string_view sUserClassPath)
 creates the -Djava.class.path option with the complete classpath, including the paths which are set by UNO_JAVA_JFW_CLASSPATH_URLS. More...
 
OString getUserSettingsPath ()
 Get the system path to the javasettings.xml Converts the URL returned from getUserSettingsURL to a Systempath. More...
 
OString getSharedSettingsPath ()
 Returns the system path of the share settings file. More...
 
OString getSettingsPath (const OUString &sURL)
 
OString getVendorSettingsPath ()
 
void setJavaSelected ()
 Called from writeJavaInfoData. More...
 
bool wasJavaSelectedInSameProcess ()
 Determines if the currently selected Java was set in this process. More...
 
const rtl::Bootstrap * Bootstrap ()
 provides a bootstrap class which already knows the values from the jvmfkwrc file. More...
 
osl::Mutex & FwkMutex ()
 
rtl::ByteSequence encodeBase16 (const rtl::ByteSequence &rawData)
 
rtl::ByteSequence decodeBase16 (const rtl::ByteSequence &data)
 
OUString getDirFromFile (std::u16string_view usFilePath)
 
OUString getLibraryLocation ()
 Returns the file URL of the directory where the framework library (this library) resides. More...
 
jfw::FileStatus checkFileURL (const OUString &path)
 checks if the URL is a file. More...
 

Variables

static bool g_bJavaSet = false
 

Enumeration Type Documentation

◆ FileStatus

Enumerator
FILE_OK 
FILE_DOES_NOT_EXIST 
FILE_INVALID 

Definition at line 51 of file fwkutil.hxx.

◆ JFW_MODE

Enumerator
JFW_MODE_APPLICATION 
JFW_MODE_DIRECT 

Definition at line 75 of file fwkbase.hxx.

Function Documentation

◆ Bootstrap()

const rtl::Bootstrap * jfw::Bootstrap ( )

◆ checkFileURL()

FileStatus jfw::checkFileURL ( const OUString &  path)

checks if the URL is a file.

If it is a link to a file than it is resolved. Assuming that the argument represents a relative URL then FILE_INVALID is returned.

Returns
one of the values of FileStatus.
Exceptions
Errorsoccurred during determining if the file exists

Definition at line 158 of file fwkutil.cxx.

References FILE_DOES_NOT_EXIST, FILE_INVALID, and FILE_OK.

Referenced by jfw::BootParams::getVendorSettings(), and jfw::NodeJava::load().

◆ createSettingsStructure()

void jfw::createSettingsStructure ( xmlDoc *  document,
bool *  bNeedsSave 
)

create the child elements within the root structure for each platform.

Parameters
bNeedsSave[out]If true then the respective structure of elements was added and the document needs to be saved.

Definition at line 85 of file elements.cxx.

References JFW_E_ERROR, and NS_SCHEMA_INSTANCE.

Referenced by jfw::NodeJava::prepareSettingsDocument().

◆ decodeBase16()

rtl::ByteSequence jfw::decodeBase16 ( const rtl::ByteSequence &  data)

Definition at line 100 of file fwkutil.cxx.

References i, and pData.

Referenced by jfw::CNodeJavaInfo::loadFromNode().

◆ encodeBase16()

rtl::ByteSequence jfw::encodeBase16 ( const rtl::ByteSequence &  rawData)

Definition at line 72 of file fwkutil.cxx.

References i.

Referenced by jfw::CNodeJavaInfo::writeToNode().

◆ FwkMutex()

osl::Mutex & jfw::FwkMutex ( )

◆ getApplicationClassPath()

OUString jfw::getApplicationClassPath ( )

◆ getDirFromFile()

OUString jfw::getDirFromFile ( std::u16string_view  usFilePath)

Definition at line 139 of file fwkutil.cxx.

References index.

Referenced by jfw::NodeJava::createSettingsDocument(), and getLibraryLocation().

◆ getElement()

static OString jfw::getElement ( OString const &  docPath,
xmlChar const *  pathExpression 
)
static

Definition at line 49 of file elements.cxx.

References JFW_E_ERROR, and NS_JAVA_FRAMEWORK.

Referenced by getElementUpdated().

◆ getElementUpdated()

OString jfw::getElementUpdated ( )

gets the value of the updated element from the javavendors.xml.

Definition at line 79 of file elements.cxx.

References getElement(), and getVendorSettingsPath().

Referenced by jfw_getSelectedJRE(), jfw_startVM(), and jfw::CNodeJavaInfo::writeToNode().

◆ getLibraryLocation()

OUString jfw::getLibraryLocation ( )

Returns the file URL of the directory where the framework library (this library) resides.

Definition at line 145 of file fwkutil.cxx.

References getDirFromFile(), getLibraryLocation(), and JFW_E_ERROR.

Referenced by Bootstrap(), getLibraryLocation(), and jfw::BootParams::getVendorSettings().

◆ getMode()

JFW_MODE jfw::getMode ( )

◆ getSettingsPath()

OString jfw::getSettingsPath ( const OUString &  sURL)

Definition at line 486 of file fwkbase.cxx.

References JFW_E_ERROR, and OUStringToOString().

Referenced by getSharedSettingsPath(), and getUserSettingsPath().

◆ getSharedSettingsPath()

OString jfw::getSharedSettingsPath ( )

Returns the system path of the share settings file.

Returns a valid string or throws an exception.

Exceptions
FrameworkException

Definition at line 481 of file fwkbase.cxx.

References getSettingsPath(), and jfw::BootParams::getSharedData().

Referenced by jfw::NodeJava::getSettingsPath().

◆ getUserSettingsPath()

OString jfw::getUserSettingsPath ( )

Get the system path to the javasettings.xml Converts the URL returned from getUserSettingsURL to a Systempath.

An empty string is returned if the file does not exist.

Exceptions
FrameworkException

Definition at line 476 of file fwkbase.cxx.

References getSettingsPath(), and jfw::BootParams::getUserData().

Referenced by jfw::NodeJava::getSettingsPath().

◆ getVendorSettingsPath()

OString jfw::getVendorSettingsPath ( )

◆ makeClassPathOption()

OString jfw::makeClassPathOption ( std::u16string_view  sUserClassPath)

creates the -Djava.class.path option with the complete classpath, including the paths which are set by UNO_JAVA_JFW_CLASSPATH_URLS.

Definition at line 446 of file fwkbase.cxx.

References getApplicationClassPath(), OUStringToOString(), and SAL_PATHSEPARATOR.

Referenced by jfw_startVM().

◆ setJavaSelected()

void jfw::setJavaSelected ( )

Called from writeJavaInfoData.

It sets the process identifier. When java is to be started, then the current id is compared to the one set by this function. If they are identical then the Java was selected in the same process. If that Java needs a prepared environment, such as a LD_LIBRARY_PATH, then it must not be started in this process.

Definition at line 504 of file fwkbase.cxx.

References g_bJavaSet.

Referenced by jfw_findAndSelectJRE(), and jfw_setSelectedJRE().

◆ wasJavaSelectedInSameProcess()

bool jfw::wasJavaSelectedInSameProcess ( )

Determines if the currently selected Java was set in this process.

See also
setProcessId()

Definition at line 509 of file fwkbase.cxx.

References g_bJavaSet.

Referenced by jfw_startVM().

Variable Documentation

◆ g_bJavaSet

bool jfw::g_bJavaSet = false
static

Definition at line 45 of file fwkbase.cxx.

Referenced by setJavaSelected(), and wasJavaSelectedInSameProcess().