26#include <elements.hxx>
27#include <osl/mutex.hxx>
28#include <osl/file.hxx>
34#include <libxml/parser.h>
35#include <libxml/xpath.h>
36#include <libxml/xpathInternals.h>
50 xmlChar
const * pathExpression)
53 OSL_ASSERT(!docPath.isEmpty());
58 "[Java framework] Error in function getElement (elements.cxx)");
61 if (xmlXPathRegisterNs(context,
reinterpret_cast<xmlChar
const *
>(
"jf"),
65 "[Java framework] Error in function getElement (elements.cxx)");
67 CXPathObjectPtr pathObj = xmlXPathEvalExpression(pathExpression, context);
69 if (xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
73 "[Java framework] Error in function getElement (elements.cxx)");
75 sValue =
reinterpret_cast<char*
>(pathObj->nodesetval->nodeTab[0]->content);
82 reinterpret_cast<xmlChar
const *
>(
"/jf:javaSelection/jf:updated/text()"));
87 OString sExcMsg(
"[Java framework] Error in function createSettingsStructure "
89 xmlNode * root = xmlDocGetRootElement(document);
93 xmlNode * cur = root->children;
94 while (cur !=
nullptr)
96 if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"enabled")) == 0)
112 xmlNs* nsXsi = xmlSearchNsByHref(
116 xmlNode * nodeEn = xmlNewTextChild(
117 root,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"enabled"),
reinterpret_cast<xmlChar
const *
>(
""));
118 if (nodeEn ==
nullptr)
120 xmlSetNsProp(nodeEn, nsXsi,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
"true"));
122 xmlNode * nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
123 xmlAddChild(root, nodeCrLf);
126 xmlNode * nodeUs = xmlNewTextChild(
127 root,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"userClassPath"),
reinterpret_cast<xmlChar
const *
>(
""));
128 if (nodeUs ==
nullptr)
130 xmlSetNsProp(nodeUs, nsXsi,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
"true"));
132 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
133 xmlAddChild(root, nodeCrLf);
136 xmlNode * nodeVm = xmlNewTextChild(
137 root,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"vmParameters"),
reinterpret_cast<xmlChar
const *
>(
""));
138 if (nodeVm ==
nullptr)
140 xmlSetNsProp(nodeVm, nsXsi,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
"true"));
142 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
143 xmlAddChild(root, nodeCrLf);
146 xmlNode * nodeJre = xmlNewTextChild(
147 root,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"jreLocations"),
reinterpret_cast<xmlChar
const *
>(
""));
148 if (nodeJre ==
nullptr)
150 xmlSetNsProp(nodeJre, nsXsi,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
"true"));
152 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
153 xmlAddChild(root, nodeCrLf);
156 xmlNode * nodeJava = xmlNewTextChild(
157 root,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"javaInfo"),
reinterpret_cast<xmlChar
const *
>(
""));
158 if (nodeJava ==
nullptr)
160 xmlSetNsProp(nodeJava, nsXsi,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
"true"));
162 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
163 xmlAddChild(root, nodeCrLf);
174 "[Java framework] Trying to access settings files in direct mode.");
180 static constexpr OStringLiteral sExcMsg(
"[Java framework] Error in function NodeJava::load"
193 "[Java framework] Invalid file for shared Java settings.");
202 SAL_INFO(
"jfw.level1",
"no path to load user settings document from");
208 OSL_FAIL(
"[Java framework] Unknown enum used.");
215 CXmlDocPtr docUser(xmlParseFile(sSettingsPath.getStr()));
216 if (docUser ==
nullptr)
219 xmlNode * cur = xmlDocGetRootElement(docUser);
220 if (cur ==
nullptr || cur->children ==
nullptr)
225 while (cur !=
nullptr)
227 if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"enabled")) == 0)
231 cur,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
NS_SCHEMA_INSTANCE));
234 if (xmlStrcmp(sNil,
reinterpret_cast<xmlChar
const *
>(
"false")) == 0)
237 docUser, cur->children, 1));
238 if (xmlStrcmp(sEnabled,
reinterpret_cast<xmlChar
const *
>(
"true")) == 0)
239 m_enabled = std::optional<sal_Bool>(
true);
240 else if (xmlStrcmp(sEnabled,
reinterpret_cast<xmlChar
const *
>(
"false")) == 0)
241 m_enabled = std::optional<sal_Bool>(
false);
244 else if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"userClassPath")) == 0)
247 cur,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
NS_SCHEMA_INSTANCE));
250 if (xmlStrcmp(sNil,
reinterpret_cast<xmlChar
const *
>(
"false")) == 0)
253 docUser, cur->children, 1));
257 else if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"javaInfo")) == 0)
260 cur,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
NS_SCHEMA_INSTANCE));
264 if (xmlStrcmp(sNil,
reinterpret_cast<xmlChar
const *
>(
"false")) == 0)
271 else if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"vmParameters")) == 0)
274 cur,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
NS_SCHEMA_INSTANCE));
277 if (xmlStrcmp(sNil,
reinterpret_cast<xmlChar
const *
>(
"false")) == 0)
281 std::vector<OUString> ());
283 xmlNode * pOpt = cur->children;
284 while (pOpt !=
nullptr)
286 if (xmlStrcmp(pOpt->name,
reinterpret_cast<xmlChar
const *
>(
"param")) == 0)
289 docUser, pOpt->children, 1);
296 else if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"jreLocations")) == 0)
299 cur,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
NS_SCHEMA_INSTANCE));
302 if (xmlStrcmp(sNil,
reinterpret_cast<xmlChar
const *
>(
"false")) == 0)
306 std::vector<OUString>());
308 xmlNode * pLoc = cur->children;
309 while (pLoc !=
nullptr)
311 if (xmlStrcmp(pLoc->name,
reinterpret_cast<xmlChar
const *
>(
"location")) == 0)
314 docUser, pLoc->children, 1);
333 OSL_FAIL(
"[Java framework] NodeJava::getSettingsPath()");
346 OSL_FAIL(
"[Java framework] NodeJava::getSettingsURL()");
354 "[Java framework] Error in function prepareSettingsDocument"
361 CXmlDocPtr doc(xmlParseFile(sSettings.getStr()));
365 bool bNeedsSave =
false;
369 if (xmlSaveFormatFileEnc(
370 sSettings.getStr(), doc,
"UTF-8", 1) == -1)
378 OString sExcMsg(
"[Java framework] Error in function NodeJava::writeSettings "
386 SAL_INFO(
"jfw.level1",
"no path to write settings document to");
392 docUser = xmlParseFile(sSettingsPath.getStr());
393 if (docUser ==
nullptr)
395 contextUser = xmlXPathNewContext(docUser);
396 if (xmlXPathRegisterNs(contextUser,
reinterpret_cast<xmlChar
const *
>(
"jf"),
400 xmlNode * root = xmlDocGetRootElement(docUser);
402 xmlNs* nsXsi = xmlSearchNsByHref(docUser,
410 pathObj = xmlXPathEvalExpression(
reinterpret_cast<xmlChar
const *
>(
"/jf:java/jf:enabled"),
412 if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
415 xmlNode * nodeEnabled = pathObj->nodesetval->nodeTab[0];
416 xmlSetNsProp(nodeEnabled,
418 reinterpret_cast<xmlChar
const *
>(
"nil"),
419 reinterpret_cast<xmlChar
const *
>(
"false"));
421 if (
m_enabled == std::optional<sal_Bool>(
true))
422 xmlNodeSetContent(nodeEnabled,
reinterpret_cast<xmlChar
const *
>(
"true"));
424 xmlNodeSetContent(nodeEnabled,
reinterpret_cast<xmlChar
const *
>(
"false"));
431 pathObj = xmlXPathEvalExpression(
reinterpret_cast<xmlChar
const *
>(
"/jf:java/jf:userClassPath"),
433 if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
436 xmlNode * nodeEnabled = pathObj->nodesetval->nodeTab[0];
437 xmlSetNsProp(nodeEnabled, nsXsi,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
"false"));
444 pathObj = xmlXPathEvalExpression(
reinterpret_cast<xmlChar
const *
>(
"/jf:java/jf:javaInfo"),
446 if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
449 docUser, pathObj->nodesetval->nodeTab[0]);
455 pathObj = xmlXPathEvalExpression(
reinterpret_cast<xmlChar
const *
>(
"/jf:java/jf:vmParameters"),
457 if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
459 xmlNode* vmParameters = pathObj->nodesetval->nodeTab[0];
461 xmlSetNsProp(vmParameters, nsXsi,
reinterpret_cast<xmlChar
const *
>(
"nil"),
462 reinterpret_cast<xmlChar
const *
>(
"false"));
465 xmlNode* cur = vmParameters->children;
466 while (cur !=
nullptr)
468 xmlNode* lastNode = cur;
470 xmlUnlinkNode(lastNode);
471 xmlFreeNode(lastNode);
476 xmlNode * nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
477 xmlAddChild(vmParameters, nodeCrLf);
482 xmlNewTextChild(vmParameters,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"param"),
485 xmlNode * nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
486 xmlAddChild(vmParameters, nodeCrLf);
493 pathObj = xmlXPathEvalExpression(
reinterpret_cast<xmlChar
const *
>(
"/jf:java/jf:jreLocations"),
495 if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
497 xmlNode* jreLocationsNode = pathObj->nodesetval->nodeTab[0];
499 xmlSetNsProp(jreLocationsNode, nsXsi,
reinterpret_cast<xmlChar
const *
>(
"nil"),
500 reinterpret_cast<xmlChar
const *
>(
"false"));
503 xmlNode* cur = jreLocationsNode->children;
504 while (cur !=
nullptr)
506 xmlNode* lastNode = cur;
508 xmlUnlinkNode(lastNode);
509 xmlFreeNode(lastNode);
514 xmlNode * nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
515 xmlAddChild(jreLocationsNode, nodeCrLf);
520 xmlNewTextChild(jreLocationsNode,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"location"),
523 xmlNode * nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
524 xmlAddChild(jreLocationsNode, nodeCrLf);
528 if (xmlSaveFormatFile(sSettingsPath.getStr(), docUser, 1) == -1)
534 m_enabled = std::optional<sal_Bool>(bEnabled);
550 if (pInfo !=
nullptr)
566 m_javaInfo->arVendorData = rtl::ByteSequence();
572 m_vmParameters = std::optional<std::vector<OUString> >(arOptions);
579 std::vector<OUString> ());
581 std::vector<OUString>::const_iterator it =
592 ::osl::DirectoryItem item;
593 File::RC rc = ::osl::DirectoryItem::get(sURL, item);
594 if (File::E_None == rc)
597 File::RC rc_stat = item.getFileStatus(stat);
598 if (File::E_None == rc_stat)
602 else if (File::E_NOENT == rc_stat)
611 else if(File::E_NOENT == rc)
630 OString sExcMsg(
"[Java framework] Error in function createSettingsDocument "
637 FileBase::RC rcFile = Directory::createPath(
getDirFromFile(sURL));
638 if (rcFile != FileBase::E_EXIST && rcFile != FileBase::E_None)
642 CXmlDocPtr doc(xmlNewDoc(
reinterpret_cast<xmlChar
const *
>(
"1.0")));
647 xmlNodePtr root = xmlNewDocNode(
648 doc,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"java"),
reinterpret_cast<xmlChar
const *
>(
"\n"));
653 if (xmlNewNs(root,
reinterpret_cast<xmlChar
const *
>(
NS_JAVA_FRAMEWORK),
nullptr) ==
nullptr)
655 if (xmlNewNs(root,
reinterpret_cast<xmlChar
const *
>(
NS_SCHEMA_INSTANCE),
reinterpret_cast<xmlChar
const *
>(
"xsi")) ==
nullptr)
657 xmlDocSetRootElement(doc, root);
660 xmlNodePtr
com = xmlNewComment(
661 reinterpret_cast<xmlChar
const *
>(
"This is a generated file. Do not alter this file!"));
665 if (xmlAddPrevSibling(root,
com) ==
nullptr)
669 if (xmlSaveFormatFileEnc(path.getStr(), doc,
"UTF-8", 1) == -1)
676 m_bEmptyNode(false), bNil(true), bAutoSelect(true),
683 OString sExcMsg(
"[Java framework] Error in function NodeJavaInfo::loadFromNode "
686 OSL_ASSERT(pJavaInfo && pDoc);
687 if (pJavaInfo->children ==
nullptr)
691 pJavaInfo,
reinterpret_cast<xmlChar
const *
>(
"nil"),
reinterpret_cast<xmlChar
const *
>(
NS_SCHEMA_INSTANCE));
695 if (xmlStrcmp(sNil,
reinterpret_cast<xmlChar
const *
>(
"true")) == 0)
697 else if (xmlStrcmp(sNil,
reinterpret_cast<xmlChar
const *
>(
"false")) == 0)
706 pJavaInfo,
reinterpret_cast<xmlChar
const *
>(
"autoSelect"));
710 if (xmlStrcmp(sAutoSelect,
reinterpret_cast<xmlChar
const *
>(
"true")) == 0)
712 else if (xmlStrcmp(sAutoSelect,
reinterpret_cast<xmlChar
const *
>(
"false")) == 0)
717 xmlNode * cur = pJavaInfo->children;
719 while (cur !=
nullptr)
721 if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"vendor")) == 0)
724 pDoc, cur->children, 1);
729 else if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"location")) == 0)
732 pDoc, cur->children, 1);
735 else if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"version")) == 0)
738 pDoc, cur->children, 1);
741 else if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"requirements")) == 0)
744 pDoc, cur->children, 1);
745 OUString sRequire = xmlRequire;
758 else if (xmlStrcmp(cur->name,
reinterpret_cast<xmlChar
const *
>(
"vendorData")) == 0)
761 pDoc, cur->children, 1);
762 xmlChar* _data =
static_cast<xmlChar*
>(xmlData);
765 rtl::ByteSequence seq(
reinterpret_cast<sal_Int8*
>(_data), strlen(
reinterpret_cast<char*
>(_data)));
776 reinterpret_cast<xmlChar
const *
>(
"vendorUpdate"));
777 if ( ! sVendorUpdate)
784 xmlNode* pJavaInfoNode)
const
787 OSL_ASSERT(pJavaInfoNode && pDoc);
794 xmlSetProp(pJavaInfoNode,
reinterpret_cast<xmlChar
const *
>(
"vendorUpdate"),
795 reinterpret_cast<xmlChar
const *
>(sUpdated.getStr()));
798 xmlSetProp(pJavaInfoNode,
reinterpret_cast<xmlChar
const *
>(
"autoSelect"),
799 reinterpret_cast<xmlChar
const *
>(
bAutoSelect ?
"true" :
"false"));
803 xmlNs* nsXsi = xmlSearchNsByHref(pDoc,
807 xmlSetNsProp(pJavaInfoNode,
809 reinterpret_cast<xmlChar
const *
>(
"nil"),
810 reinterpret_cast<xmlChar
const *
>(
"false"));
813 xmlNode* cur = pJavaInfoNode->children;
814 while (cur !=
nullptr)
816 xmlNode* lastNode = cur;
818 xmlUnlinkNode(lastNode);
819 xmlFreeNode(lastNode);
828 xmlNode * nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
829 xmlAddChild(pJavaInfoNode, nodeCrLf);
832 xmlNewTextChild(pJavaInfoNode,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"vendor"),
835 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
836 xmlAddChild(pJavaInfoNode, nodeCrLf);
839 xmlNewTextChild(pJavaInfoNode,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"location"),
842 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
843 xmlAddChild(pJavaInfoNode, nodeCrLf);
846 xmlNewTextChild(pJavaInfoNode,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"version"),
849 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
850 xmlAddChild(pJavaInfoNode, nodeCrLf);
854 xmlNewTextChild(pJavaInfoNode,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"features"),
855 reinterpret_cast<xmlChar
const *
>(
"0"));
857 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
858 xmlAddChild(pJavaInfoNode, nodeCrLf);
862 OUString sRequirements = OUString::number(
864 xmlNewTextChild(pJavaInfoNode,
nullptr,
reinterpret_cast<xmlChar
const *
>(
"requirements"),
867 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
868 xmlAddChild(pJavaInfoNode, nodeCrLf);
873 xmlNode* dataNode = xmlNewChild(pJavaInfoNode,
nullptr,
874 reinterpret_cast<xmlChar
const *
>(
"vendorData"),
875 reinterpret_cast<xmlChar
const *
>(
""));
876 xmlNodeSetContentLen(dataNode,
877 reinterpret_cast<xmlChar*
>(data.getArray()), data.getLength());
879 nodeCrLf = xmlNewText(
reinterpret_cast<xmlChar
const *
>(
"\n"));
880 xmlAddChild(pJavaInfoNode, nodeCrLf);
886 return std::unique_ptr<JavaInfo>();
887 return std::unique_ptr<JavaInfo>(
900 sharedSettings.
load();
901 merge(sharedSettings, settings);
941 ::std::vector< OString> ret;
955bool MergedSettings::getJavaInfoAttrAutoSelect()
const
963 assert(parParams !=
nullptr);
represents the settings saved in the /java/javaInfo element.
bool bAutoSelect
contains the value of the /java/javaInfo@autoSelect attribute.
::rtl::ByteSequence arVendorData
std::unique_ptr< JavaInfo > makeJavaInfo() const
returns NULL if javaInfo is nil.
bool bNil
contains the nil value of the /java/javaInfo@xsi:nil attribute.
OString sAttrVendorUpdate
Contains the value of the <updated> element of the javavendors.xml after loadFromNode was called.
void writeToNode(xmlDoc *pDoc, xmlNode *pJavaInfo) const
The attribute nil will be set to false.
bool m_bEmptyNode
if true, then javaInfo is empty.
void loadFromNode(xmlDoc *pDoc, xmlNode *pJavaInfo)
reads the node /java/javaInfo.
::std::vector< OUString > m_JRELocations
::std::vector< OString > getVmParametersUtf8() const
::std::vector< OUString > m_vmParams
void merge(const NodeJava &share, const NodeJava &user)
std::unique_ptr< JavaInfo > createJavaInfo() const
returns a JavaInfo structure representing the node /java/javaInfo.
void getVmParametersArray(std::vector< OUString > *parParameters) const
this class represents the java settings based on a particular settings file.
const std::optional<::std::vector< OUString > > & getVmParameters() const
returns the parameters from the element /java/vmParameters/param.
void setUserClassPath(const OUString &sClassPath)
sets m_sUserClassPath.
const std::optional< CNodeJavaInfo > & getJavaInfo() const
returns the value of the element /java/javaInfo.
std::optional<::std::vector< OUString > > m_vmParameters
User configurable option.
Layer m_layer
Determines the layer for which the instance the loads and writes the data.
const std::optional< sal_Bool > & getEnabled() const
returns the value of the element /java/enabled
OString getSettingsPath() const
returns the system path to the data file which is to be used.
bool createSettingsDocument() const
helper function for prepareSettingsDocument.
OUString getSettingsURL() const
returns the file URL to the data file which is to be used.
void load()
load the values of the settings file.
bool prepareSettingsDocument() const
creates settings file and fills it with default values.
const std::optional< OUString > & getUserClassPath() const
returns the value of the element /java/userClassPath.
void addJRELocation(OUString const &sLocation)
adds a location to the already existing locations.
std::optional<::std::vector< OUString > > m_JRELocations
User configurable option.
static jfw::FileStatus checkSettingsFileStatus(OUString const &sURL)
Verifies if the respective settings file exist.
void setEnabled(bool bEnabled)
sets m_enabled.
void write() const
writes the data to user settings.
void setJavaInfo(const JavaInfo *pInfo, bool bAutoSelect)
sets m_aInfo.
void setVmParameters(std::vector< OUString > const &arParameters)
sets the /java/vmParameters/param elements.
std::optional< sal_Bool > m_enabled
User configurable option.
const std::optional<::std::vector< OUString > > & getJRELocations() const
returns the parameters from the element /java/jreLocations/location.
std::optional< OUString > m_userClassPath
User configurable option.
std::optional< CNodeJavaInfo > m_javaInfo
User configurable option.
#define NS_JAVA_FRAMEWORK
#define NS_SCHEMA_INSTANCE
#define SAL_INFO(area, stream)
static OString getElement(OString const &docPath, xmlChar const *pathExpression)
OString getElementUpdated()
gets the value of the updated element from the javavendors.xml.
void createSettingsStructure(xmlDoc *document, bool *bNeedsSave)
create the child elements within the root structure for each platform.
rtl::ByteSequence encodeBase16(const rtl::ByteSequence &rawData)
OString getSharedSettingsPath()
Returns the system path of the share settings file.
OString getVendorSettingsPath()
OUString getDirFromFile(std::u16string_view usFilePath)
rtl::ByteSequence decodeBase16(const rtl::ByteSequence &data)
jfw::FileStatus checkFileURL(const OUString &sURL)
checks if the URL is a file.
OString getUserSettingsPath()
Get the system path to the javasettings.xml Converts the URL returned from getUserSettingsURL to a Sy...
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
an instance of this struct represents an installation of a Java Runtime Environment (JRE).
OUString sVersion
contains the version of this Java distribution.
sal_uInt64 nRequirements
indicates requirements for running the java runtime.
OUString sLocation
contains the file URL to the installation directory.
OUString sVendor
contains the vendor.
rtl::ByteSequence arVendorData
contains data needed for the creation of the java runtime.