19#ifndef INCLUDED_JVMFWK_SOURCE_ELEMENTS_HXX
20#define INCLUDED_JVMFWK_SOURCE_ELEMENTS_HXX
27#include <rtl/ustring.hxx>
28#include <rtl/byteseq.hxx>
29#include <libxml/parser.h>
34#define NS_JAVA_FRAMEWORK "http://openoffice.org/2004/java/framework/1.0"
35#define NS_SCHEMA_INSTANCE "http://www.w3.org/2001/XMLSchema-instance"
96 void writeToNode(xmlDoc* pDoc, xmlNode* pJavaInfo)
const;
311 bool getJavaInfoAttrAutoSelect()
const;
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.
merges the settings for shared, user and installation during construction.
const ::std::vector< OUString > & getJRELocations() const
::std::vector< OUString > m_JRELocations
bool getEnabled() const
the default is true.
::std::vector< OString > getVmParametersUtf8() const
const OUString & getUserClassPath() const
::std::vector< OUString > m_vmParams
MergedSettings(MergedSettings const &)=delete
MergedSettings & operator=(MergedSettings const &)=delete
void merge(const NodeJava &share, const NodeJava &user)
std::unique_ptr< JavaInfo > createJavaInfo() const
returns a JavaInfo structure representing the node /java/javaInfo.
OString const & getJavaInfoAttrVendorUpdate() const
returns the value of the attribute /java/javaInfo[@vendorUpdate].
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.
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.
an instance of this struct represents an installation of a Java Runtime Environment (JRE).
::std::vector< OUString > vecExcludeVersions