LibreOffice Module jvmfwk (master) 1
fwkbase.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_JVMFWK_INC_FWKBASE_HXX
20#define INCLUDED_JVMFWK_INC_FWKBASE_HXX
21
22#include <sal/config.h>
23
24#include <string_view>
25#include <vector>
26
27#include <rtl/ustring.hxx>
28#include "libxmlutil.hxx"
29
30namespace jfw
31{
32struct VersionInfo;
33
35{
38
39public:
41
42 VersionInfo getVersionInformation(std::u16string_view sVendor) const;
43};
44
45/* The class offers functions to retrieve verified bootstrap parameters.
46 */
47namespace BootParams
48{
49/* Gets the file URL to the JRE which has been determined by the
50 bootstrap parameter UNO_JAVA_JFW_JREHOME or UNO_JAVA_JFW_ENV_JREHOME.
51
52 In direct mode either of them must be set. If not an exception is thrown.
53*/
54OUString getJREHome();
55
56::std::vector<OString> getVMParameters();
57
58OUString getUserData();
59
60OUString getSharedData();
61
62/* returns the file URL to the vendor settings xml file.
63 */
64OUString getVendorSettings();
65
66/* User the parameter UNO_JAVA_JFW_CLASSPATH and UNO_JAVA_JFW_ENV_CLASSPATH
67 to compose a classpath
68 */
69OString getClasspath();
70
71OUString getClasspathUrls();
72
73} //end namespace
74
76{
78
80};
81
83
87OString makeClassPathOption(std::u16string_view sUserClassPath);
88
89OString getSettingsPath(const OUString& sURL);
90
97OString getUserSettingsPath();
98
103OString getSharedSettingsPath();
104
105/* returns a valid string or throws an exception.
106 @throws FrameworkException
107 */
108OString getVendorSettingsPath();
109
116void setJavaSelected();
117
123/* Only for application mode.
124 */
125OUString getApplicationClassPath();
126}
127
128#endif
129
130/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
CXPathContextPtr m_xmlPathContextVendorSettings
Definition: fwkbase.hxx:37
CXmlDocPtr m_xmlDocVendorSettings
Definition: fwkbase.hxx:36
VersionInfo getVersionInformation(std::u16string_view sVendor) const
Definition: fwkbase.cxx:123
OUString getJREHome()
Definition: fwkbase.cxx:310
::std::vector< OString > getVMParameters()
Definition: fwkbase.cxx:211
OString getClasspath()
Definition: fwkbase.cxx:244
OUString getClasspathUrls()
Definition: fwkbase.cxx:365
OUString getVendorSettings()
Definition: fwkbase.cxx:274
OUString getSharedData()
Definition: fwkbase.cxx:239
OUString getUserData()
Definition: fwkbase.cxx:234
Definition: elements.cxx:47
OString getSettingsPath(const OUString &sURL)
Definition: fwkbase.cxx:486
void setJavaSelected()
Called from writeJavaInfoData.
Definition: fwkbase.cxx:504
OUString getApplicationClassPath()
Definition: fwkbase.cxx:416
bool wasJavaSelectedInSameProcess()
Determines if the currently selected Java was set in this process.
Definition: fwkbase.cxx:509
OString getSharedSettingsPath()
Returns the system path of the share settings file.
Definition: fwkbase.cxx:481
JFW_MODE getMode()
Definition: fwkbase.cxx:376
JFW_MODE
Definition: fwkbase.hxx:76
@ JFW_MODE_APPLICATION
Definition: fwkbase.hxx:77
@ JFW_MODE_DIRECT
Definition: fwkbase.hxx:79
OString makeClassPathOption(std::u16string_view sUserClassPath)
creates the -Djava.class.path option with the complete classpath, including the paths which are set b...
Definition: fwkbase.cxx:446
OString getVendorSettingsPath()
Definition: fwkbase.cxx:499
OString getUserSettingsPath()
Get the system path to the javasettings.xml Converts the URL returned from getUserSettingsURL to a Sy...
Definition: fwkbase.cxx:476