summaryrefslogtreecommitdiff
path: root/jvmfwk/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-09 17:24:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-09 17:27:20 +0200
commit2ceeee914e3ff69811ca04ecccf30a582c58b34a (patch)
treebba87c6d0d2c783ce47134349f7c8fd5dc19c932 /jvmfwk/source
parent3de89997f492c1216592fa4db1c7e6ce6c3fe4fa (diff)
Remove jvmfwk plugin feature
...which was effectively unused; there only ever was a single sunjavaplugin that is now folded directly into jvmfwk. Leaves room for further clean up. Change-Id: I14dd2a3a09bd1ce9a8c3f5c156628ec11d954a0b
Diffstat (limited to 'jvmfwk/source')
-rw-r--r--jvmfwk/source/elements.hxx17
-rw-r--r--jvmfwk/source/framework.cxx277
-rw-r--r--jvmfwk/source/fwkbase.cxx111
-rw-r--r--jvmfwk/source/fwkbase.hxx13
4 files changed, 49 insertions, 369 deletions
diff --git a/jvmfwk/source/elements.hxx b/jvmfwk/source/elements.hxx
index 17d66fef227f..28abbaef7291 100644
--- a/jvmfwk/source/elements.hxx
+++ b/jvmfwk/source/elements.hxx
@@ -353,23 +353,6 @@ public:
sal_Int32 getExcludeVersionSize();
};
-struct PluginLibrary
-{
- PluginLibrary()
- {
- }
- PluginLibrary(const OUString & vendor, const OUString & path) :
- sVendor(vendor), sPath(path)
- {
- }
- /** contains the vendor string which is later userd in the xml API
- */
- OUString sVendor;
- /** File URL the plug-in library
- */
- OUString sPath;
-};
-
} //end namespace
#endif
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 1a32be20919f..cd7d55194d92 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -22,7 +22,6 @@
#include "rtl/bootstrap.hxx"
#include "osl/thread.hxx"
#include "osl/file.hxx"
-#include "osl/module.hxx"
#include "jvmfwk/framework.h"
#include "jvmfwk/vendorplugin.h"
#include <cassert>
@@ -48,41 +47,6 @@ bool areEqualJavaInfo(
}
-#ifdef DISABLE_DYNLOADING
-
-extern "C"
-javaPluginError jfw_plugin_getAllJavaInfos(
- rtl_uString *sVendor,
- rtl_uString *sMinVersion,
- rtl_uString *sMaxVersion,
- rtl_uString * *arExcludeList,
- sal_Int32 nLenList,
- JavaInfo*** parJavaInfo,
- sal_Int32 *nLenInfoList);
-
-extern "C"
-javaPluginError jfw_plugin_getJavaInfoByPath(
- rtl_uString *path,
- rtl_uString *sVendor,
- rtl_uString *sMinVersion,
- rtl_uString *sMaxVersion,
- rtl_uString * *arExcludeList,
- sal_Int32 nLenList,
- JavaInfo ** ppInfo);
-
-extern "C"
-javaPluginError jfw_plugin_startJavaVirtualMachine(
- const JavaInfo *pInfo,
- const JavaVMOption* arOptions,
- sal_Int32 cOptions,
- JavaVM ** ppVm,
- JNIEnv ** ppEnv);
-
-extern "C"
-javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist);
-
-#endif
-
javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSize)
{
javaFrameworkError retVal = JFW_E_NONE;
@@ -94,16 +58,8 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
return JFW_E_INVALID_ARG;
jfw::VendorSettings aVendorSettings;
- //Get a list of plugins which provide Java information
- std::vector<jfw::PluginLibrary> vecPlugins =
- aVendorSettings.getPluginData();
-#ifndef DISABLE_DYNLOADING
- //Create a vector that holds the libraries, which will be later
- //dynamically loaded;
- boost::scoped_array<osl::Module> sarModules;
- sarModules.reset(new osl::Module[vecPlugins.size()]);
- osl::Module * arModules = sarModules.get();
-#endif
+ std::vector<OUString> vecVendors =
+ aVendorSettings.getSupportedVendors();
//Add the JavaInfos found by jfw_plugin_getAllJavaInfos to the vector
//Make sure that the contents are destroyed if this
//function returns with an error
@@ -119,42 +75,20 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
const std::vector<OUString>& vecJRELocations =
settings.getJRELocations();
//Use every plug-in library to get Java installations.
- typedef std::vector<jfw::PluginLibrary>::const_iterator ci_pl;
+ typedef std::vector<OUString>::const_iterator ci_pl;
int cModule = 0;
- for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); ++i, ++cModule)
+ for (ci_pl i = vecVendors.begin(); i != vecVendors.end(); ++i, ++cModule)
{
- const jfw::PluginLibrary & library = *i;
+ const OUString & vendor = *i;
jfw::VersionInfo versionInfo =
- aVendorSettings.getVersionInformation(library.sVendor);
-#ifndef DISABLE_DYNLOADING
- arModules[cModule].load(library.sPath);
- osl::Module & pluginLib = arModules[cModule];
-
- if (!pluginLib.is())
- {
- OString msg = OUStringToOString(
- library.sPath, osl_getThreadTextEncoding());
- fprintf(stderr,"[jvmfwk] Could not load plugin %s\n" \
- "Modify the javavendors.xml accordingly!\n", msg.getStr());
- return JFW_E_NO_PLUGIN;
- }
- jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc =
- (jfw_plugin_getAllJavaInfos_ptr) pluginLib.getFunctionSymbol(
- OUString("jfw_plugin_getAllJavaInfos"));
-#else
- jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc =
- jfw_plugin_getAllJavaInfos;
-#endif
- OSL_ASSERT(getAllJavaFunc);
- if (getAllJavaFunc == NULL)
- return JFW_E_ERROR;
+ aVendorSettings.getVersionInformation(vendor);
//get all installations of one vendor according to minVersion,
//maxVersion and excludeVersions
sal_Int32 cInfos = 0;
JavaInfo** arInfos = NULL;
- javaPluginError plerr = (*getAllJavaFunc)(
- library.sVendor.pData,
+ javaPluginError plerr = jfw_plugin_getAllJavaInfos(
+ vendor.pData,
versionInfo.sMinVersion.pData,
versionInfo.sMaxVersion.pData,
versionInfo.getExcludeVersions(),
@@ -173,27 +107,15 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
//Check if the current plugin can detect JREs at the location
// of the paths added by jfw_addJRELocation
//get the function from the plugin
-#ifndef DISABLE_DYNLOADING
- jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
- (jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol(
- OUString("jfw_plugin_getJavaInfoByPath"));
- OSL_ASSERT(jfw_plugin_getJavaInfoByPathFunc);
- if (jfw_plugin_getJavaInfoByPathFunc == NULL)
- return JFW_E_ERROR;
-#else
- jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
- jfw_plugin_getJavaInfoByPath;
-#endif
-
typedef std::vector<OUString>::const_iterator citLoc;
//Check every manually added location
for (citLoc ii = vecJRELocations.begin();
ii != vecJRELocations.end(); ++ii)
{
jfw::CJavaInfo aInfo;
- plerr = (*jfw_plugin_getJavaInfoByPathFunc)(
+ plerr = jfw_plugin_getJavaInfoByPath(
ii->pData,
- library.sVendor.pData,
+ vendor.pData,
versionInfo.sMinVersion.pData,
versionInfo.sMaxVersion.pData,
versionInfo.getExcludeVersions(),
@@ -225,9 +147,9 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
std::vector<jfw::CJavaInfo> vecInfoManual2;
for (it_info ivm = vecInfoManual.begin(); ivm != vecInfoManual.end(); ++ivm)
{
- for (ci_pl ii = vecPlugins.begin(); ii != vecPlugins.end(); ++ii)
+ for (ci_pl ii = vecVendors.begin(); ii != vecVendors.end(); ++ii)
{
- if ( ii->sVendor.equals((*ivm)->sVendor))
+ if ( ii->equals((*ivm)->sVendor))
{
vecInfoManual2.push_back(*ivm);
break;
@@ -378,23 +300,6 @@ javaFrameworkError SAL_CALL jfw_startVM(
//get the function jfw_plugin_startJavaVirtualMachine
jfw::VendorSettings aVendorSettings;
- OUString sLibPath = aVendorSettings.getPluginLibrary(pInfo->sVendor);
-
-#ifndef DISABLE_DYNLOADING
- osl::Module modulePlugin(sLibPath);
- if ( ! modulePlugin)
- return JFW_E_NO_PLUGIN;
-
- OUString sFunctionName("jfw_plugin_startJavaVirtualMachine");
- jfw_plugin_startJavaVirtualMachine_ptr pFunc =
- (jfw_plugin_startJavaVirtualMachine_ptr)
- osl_getFunctionSymbol(modulePlugin, sFunctionName.pData);
- if (pFunc == NULL)
- return JFW_E_ERROR;
-#else
- jfw_plugin_startJavaVirtualMachine_ptr pFunc =
- jfw_plugin_startJavaVirtualMachine;
-#endif
// create JavaVMOptions array that is passed to the plugin
// it contains the classpath and all options set in the
@@ -434,7 +339,7 @@ javaFrameworkError SAL_CALL jfw_startVM(
//start Java
JavaVM *pVm = NULL;
SAL_INFO("jfw", "Starting Java");
- javaPluginError plerr = (*pFunc)(pInfo, arOpt, index, & pVm, ppEnv);
+ javaPluginError plerr = jfw_plugin_startJavaVirtualMachine(pInfo, arOpt, index, & pVm, ppEnv);
if (plerr == JFW_PLUGIN_E_VM_CREATION_FAILED)
{
errcode = JFW_E_VM_CREATION_FAILED;
@@ -483,47 +388,24 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
//Get a list of services which provide Java information
jfw::VendorSettings aVendorSettings;
- std::vector<jfw::PluginLibrary> vecPlugins =
- aVendorSettings.getPluginData();
-#ifndef DISABLE_DYNLOADING
- //Create a vector that holds the libraries, which will be later
- //dynamically loaded;
- boost::scoped_array<osl::Module> sarModules;
- sarModules.reset(new osl::Module[vecPlugins.size()]);
- osl::Module * arModules = sarModules.get();
-#endif
- //Use every plug-in library to get Java installations. At the first usable
+ std::vector<OUString> vecVendors =
+ aVendorSettings.getSupportedVendors();
+ //Use every vendor to get Java installations. At the first usable
//Java the loop will break
- typedef std::vector<jfw::PluginLibrary>::const_iterator ci_pl;
+ typedef std::vector<OUString>::const_iterator ci_pl;
int cModule = 0;
- for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); ++i, ++cModule)
+ for (ci_pl i = vecVendors.begin(); i != vecVendors.end(); ++i, ++cModule)
{
- const jfw::PluginLibrary & library = *i;
+ const OUString & vendor = *i;
jfw::VersionInfo versionInfo =
- aVendorSettings.getVersionInformation(library.sVendor);
-#ifndef DISABLE_DYNLOADING
- arModules[cModule].load(library.sPath);
- osl::Module & pluginLib = arModules[cModule];
- if (!pluginLib.is())
- return JFW_E_NO_PLUGIN;
-
- jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc =
- (jfw_plugin_getAllJavaInfos_ptr) pluginLib.getFunctionSymbol(
- OUString("jfw_plugin_getAllJavaInfos"));
-#else
- jfw_plugin_getAllJavaInfos_ptr getAllJavaFunc =
- jfw_plugin_getAllJavaInfos;
-#endif
- OSL_ASSERT(getAllJavaFunc);
- if (getAllJavaFunc == NULL)
- continue;
+ aVendorSettings.getVersionInformation(vendor);
//get all installations of one vendor according to minVersion,
//maxVersion and excludeVersions
sal_Int32 cInfos = 0;
JavaInfo** arInfos = NULL;
- javaPluginError plerr = (*getAllJavaFunc)(
- library.sVendor.pData,
+ javaPluginError plerr = jfw_plugin_getAllJavaInfos(
+ vendor.pData,
versionInfo.sMinVersion.pData,
versionInfo.sMaxVersion.pData,
versionInfo.getExcludeVersions(),
@@ -581,37 +463,20 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
settings.getJRELocations();
//use every plug-in to determine the JavaInfo objects
bool bInfoFound = false;
- for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); ++i)
+ for (ci_pl i = vecVendors.begin(); i != vecVendors.end(); ++i)
{
- const jfw::PluginLibrary & library = *i;
+ const OUString & vendor = *i;
jfw::VersionInfo versionInfo =
- aVendorSettings.getVersionInformation(library.sVendor);
-#ifndef DISABLE_DYNLOADING
- osl::Module pluginLib(library.sPath);
- if (!pluginLib.is())
- return JFW_E_NO_PLUGIN;
- //Check if the current plugin can detect JREs at the location
- // of the paths added by jfw_addJRELocation
- //get the function from the plugin
- jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
- (jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol(
- OUString("jfw_plugin_getJavaInfoByPath"));
-#else
- jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
- jfw_plugin_getJavaInfoByPath;
-#endif
- OSL_ASSERT(jfw_plugin_getJavaInfoByPathFunc);
- if (jfw_plugin_getJavaInfoByPathFunc == NULL)
- return JFW_E_ERROR;
+ aVendorSettings.getVersionInformation(vendor);
typedef std::vector<OUString>::const_iterator citLoc;
for (citLoc it = vecJRELocations.begin();
it != vecJRELocations.end(); ++it)
{
jfw::CJavaInfo aInfo;
- javaPluginError err = (*jfw_plugin_getJavaInfoByPathFunc)(
+ javaPluginError err = jfw_plugin_getJavaInfoByPath(
it->pData,
- library.sVendor.pData,
+ vendor.pData,
versionInfo.sMinVersion.pData,
versionInfo.sMaxVersion.pData,
versionInfo.getExcludeVersions(),
@@ -787,61 +652,27 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
return JFW_E_INVALID_ARG;
jfw::VendorSettings aVendorSettings;
- //Get a list of plugins which provide Java information
- std::vector<jfw::PluginLibrary> vecPlugins =
- aVendorSettings.getPluginData();
-#ifndef DISABLE_DYNLOADING
- //Create a vector that holds the libraries, which will be later
- //dynamically loaded;
- boost::scoped_array<osl::Module> sarModules;
- sarModules.reset(new osl::Module[vecPlugins.size()]);
- osl::Module * arModules = sarModules.get();
-#endif
- typedef std::vector<OUString>::const_iterator CIT_VENDOR;
std::vector<OUString> vecVendors =
aVendorSettings.getSupportedVendors();
//Use every plug-in library to determine if the path represents a
//JRE. If a plugin recognized it then the loop will break
- typedef std::vector<jfw::PluginLibrary>::const_iterator ci_pl;
+ typedef std::vector<OUString>::const_iterator ci_pl;
int cModule = 0;
- for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end();
+ for (ci_pl i = vecVendors.begin(); i != vecVendors.end();
++i, ++cModule)
{
- const jfw::PluginLibrary & library = *i;
+ const OUString & vendor = *i;
jfw::VersionInfo versionInfo =
- aVendorSettings.getVersionInformation(library.sVendor);
-
-#ifndef DISABLE_DYNLOADING
- arModules[cModule].load(library.sPath);
- osl::Module & pluginLib = arModules[cModule];
- if (!pluginLib.is())
- {
- OString msg = OUStringToOString(
- library.sPath, osl_getThreadTextEncoding());
- fprintf(stderr,"[jvmfwk] Could not load plugin %s\n" \
- "Modify the javavendors.xml accordingly!\n", msg.getStr());
- return JFW_E_NO_PLUGIN;
- }
-
- jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
- (jfw_plugin_getJavaInfoByPath_ptr) pluginLib.getFunctionSymbol(
- OUString("jfw_plugin_getJavaInfoByPath"));
-#else
- jfw_plugin_getJavaInfoByPath_ptr jfw_plugin_getJavaInfoByPathFunc =
- jfw_plugin_getJavaInfoByPath;
-#endif
- OSL_ASSERT(jfw_plugin_getJavaInfoByPathFunc);
- if (jfw_plugin_getJavaInfoByPathFunc == NULL)
- continue;
+ aVendorSettings.getVersionInformation(vendor);
//ask the plugin if this is a JRE.
//If so check if it meets the version requirements.
//Only if it does return a JavaInfo
JavaInfo* pInfo = NULL;
- javaPluginError plerr = (*jfw_plugin_getJavaInfoByPathFunc)(
+ javaPluginError plerr = jfw_plugin_getJavaInfoByPath(
pPath,
- library.sVendor.pData,
+ vendor.pData,
versionInfo.sMinVersion.pData,
versionInfo.sMaxVersion.pData,
versionInfo.getExcludeVersions(),
@@ -850,29 +681,8 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
if (plerr == JFW_PLUGIN_E_NONE)
{
- //check if the vendor of the found JRE is supported
- if (vecVendors.empty())
- {
- //vendor does not matter
- *ppInfo = pInfo;
- break;
- }
- else
- {
- OUString sVendor(pInfo->sVendor);
- CIT_VENDOR ivendor = std::find(vecVendors.begin(), vecVendors.end(),
- sVendor);
- if (ivendor != vecVendors.end())
- {
- *ppInfo = pInfo;
- }
- else
- {
- *ppInfo = NULL;
- errcode = JFW_E_NOT_RECOGNIZED;
- }
- break;
- }
+ *ppInfo = pInfo;
+ break;
}
else if(plerr == JFW_PLUGIN_E_FAILED_VERSION)
{//found JRE but it has the wrong version
@@ -1141,22 +951,7 @@ javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
jfw::VendorSettings aVendorSettings;
jfw::CJavaInfo aInfo;
aInfo = (const ::JavaInfo*) pInfo; //makes a copy of pInfo
-#ifndef DISABLE_DYNLOADING
- OUString sLibPath = aVendorSettings.getPluginLibrary(aInfo.getVendor());
- osl::Module modulePlugin(sLibPath);
- if ( ! modulePlugin)
- return JFW_E_NO_PLUGIN;
- OUString sFunctionName("jfw_plugin_existJRE");
- jfw_plugin_existJRE_ptr pFunc =
- (jfw_plugin_existJRE_ptr)
- osl_getFunctionSymbol(modulePlugin, sFunctionName.pData);
- if (pFunc == NULL)
- return JFW_E_ERROR;
-#else
- jfw_plugin_existJRE_ptr pFunc =
- jfw_plugin_existJRE;
-#endif
- javaPluginError plerr = (*pFunc)(pInfo, exist);
+ javaPluginError plerr = jfw_plugin_existJRE(pInfo, exist);
javaFrameworkError ret = JFW_E_NONE;
switch (plerr)
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 3b4fba351a54..84dcbb5d0eca 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -118,53 +118,6 @@ VendorSettings::VendorSettings():
}
}
-std::vector<PluginLibrary> VendorSettings::getPluginData()
-{
- OString sExcMsg("[Java framework] Error in function VendorSettings::getVendorPluginURLs "
- "(fwkbase.cxx).");
- std::vector<PluginLibrary> vecPlugins;
- CXPathObjectPtr result(xmlXPathEvalExpression(
- (xmlChar*)"/jf:javaSelection/jf:plugins/jf:library",
- m_xmlPathContextVendorSettings));
- if (xmlXPathNodeSetIsEmpty(result->nodesetval))
- throw FrameworkException(JFW_E_ERROR, sExcMsg);
-
- //get the values of the library elements + vendor attribute
- xmlNode* cur = result->nodesetval->nodeTab[0];
-
- while (cur != NULL)
- {
- //between library elements are also text elements
- if (cur->type == XML_ELEMENT_NODE)
- {
- CXmlCharPtr sAttrVendor(xmlGetProp(cur, (xmlChar*) "vendor"));
- CXmlCharPtr sTextLibrary(
- xmlNodeListGetString(m_xmlDocVendorSettings,
- cur->xmlChildrenNode, 1));
- PluginLibrary plugin;
- OString osVendor((sal_Char*)(xmlChar*) sAttrVendor);
- plugin.sVendor = OStringToOUString(osVendor, RTL_TEXTENCODING_UTF8);
-
- //create the file URL to the library
- OUString sUrl = findPlugin(
- m_xmlDocVendorSettingsFileUrl, sTextLibrary);
- if (sUrl.isEmpty())
- {
- OString sPlugin = OUStringToOString(
- sTextLibrary, osl_getThreadTextEncoding());
- throw FrameworkException(
- JFW_E_CONFIGURATION,
- "[Java framework] The file: " + sPlugin + " does not exist.");
- }
- plugin.sPath = sUrl;
-
- vecPlugins.push_back(plugin);
- }
- cur = cur->next;
- }
- return vecPlugins;
-}
-
VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
{
OSL_ASSERT(!sVendor.isEmpty());
@@ -250,67 +203,29 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
std::vector<OUString> VendorSettings::getSupportedVendors()
{
std::vector<OUString> vecVendors;
- //get the nodeset for the library elements
+ //get the nodeset for the vendor elements
jfw::CXPathObjectPtr result;
result = xmlXPathEvalExpression(
- (xmlChar*)"/jf:javaSelection/jf:plugins/jf:library",
+ (xmlChar*)"/jf:javaSelection/jf:vendorInfos/jf:vendor",
m_xmlPathContextVendorSettings);
- if (xmlXPathNodeSetIsEmpty(result->nodesetval))
- throw FrameworkException(
- JFW_E_ERROR,
- OString("[Java framework] Error in function getSupportedVendors (fwkbase.cxx)."));
-
- //get the values of the library elements + vendor attribute
- xmlNode* cur = result->nodesetval->nodeTab[0];
- while (cur != NULL)
+ if (!xmlXPathNodeSetIsEmpty(result->nodesetval))
{
- //between library elements are also text elements
- if (cur->type == XML_ELEMENT_NODE)
+ //get the values of the vendor elements + name attribute
+ xmlNode* cur = result->nodesetval->nodeTab[0];
+ while (cur != NULL)
{
- jfw::CXmlCharPtr sAttrVendor(xmlGetProp(cur, (xmlChar*) "vendor"));
- vecVendors.push_back(sAttrVendor);
+ //between vendor elements are also text elements
+ if (cur->type == XML_ELEMENT_NODE)
+ {
+ jfw::CXmlCharPtr sAttrVendor(xmlGetProp(cur, (xmlChar*) "name"));
+ vecVendors.push_back(sAttrVendor);
+ }
+ cur = cur->next;
}
- cur = cur->next;
}
return vecVendors;
}
-OUString VendorSettings::getPluginLibrary(const OUString& sVendor)
-{
- OSL_ASSERT(!sVendor.isEmpty());
-
- OString sExcMsg("[Java framework] Error in function getPluginLibrary (fwkbase.cxx).");
- OUStringBuffer usBuffer(256);
- usBuffer.appendAscii("/jf:javaSelection/jf:plugins/jf:library[@vendor=\"");
- usBuffer.append(sVendor);
- usBuffer.appendAscii("\"]/text()");
- OUString ouExpr = usBuffer.makeStringAndClear();
- OString sExpression =
- OUStringToOString(ouExpr, osl_getThreadTextEncoding());
- CXPathObjectPtr pathObjVendor;
- pathObjVendor = xmlXPathEvalExpression(
- (xmlChar*) sExpression.getStr(), m_xmlPathContextVendorSettings);
- if (xmlXPathNodeSetIsEmpty(pathObjVendor->nodesetval))
- throw FrameworkException(JFW_E_ERROR, sExcMsg);
-
- CXmlCharPtr xmlCharPlugin;
- xmlCharPlugin =
- xmlNodeListGetString(
- m_xmlDocVendorSettings,pathObjVendor->nodesetval->nodeTab[0], 1);
-
- //make an absolute file url from the relative plugin URL
- OUString sUrl = findPlugin(m_xmlDocVendorSettingsFileUrl, xmlCharPlugin);
- if (sUrl.isEmpty())
- {
- OString sPlugin = OUStringToOString(
- xmlCharPlugin, osl_getThreadTextEncoding());
- throw FrameworkException(
- JFW_E_CONFIGURATION,
- "[Java framework] The file: " + sPlugin + " does not exist.");
- }
- return sUrl;
-}
-
::std::vector<OString> BootParams::getVMParameters()
{
::std::vector<OString> vecParams;
diff --git a/jvmfwk/source/fwkbase.hxx b/jvmfwk/source/fwkbase.hxx
index 89e7b570af03..a8efc2a119ea 100644
--- a/jvmfwk/source/fwkbase.hxx
+++ b/jvmfwk/source/fwkbase.hxx
@@ -34,19 +34,6 @@ class VendorSettings
public:
VendorSettings();
- /** Gets all plugin library URLs with the corresponding vendor name.
-
- It uses the /javaSelection/plugins/library element from the javavendors.xml
- to locate the library.
- Is is verified that the plug-in exist. If a plug-in does not exist then an
- exception is thrown containing the error JFW_E_CONFIGURATION
- */
- ::std::vector<PluginLibrary> getPluginData();
-
- /* returns the file URL to the plugin.
- */
- OUString getPluginLibrary(const OUString& sVendor);
-
VersionInfo getVersionInformation(const OUString & sVendor);
::std::vector< OUString> getSupportedVendors();