wirispluginengine 3.62.0.1322 → 7.14.0.1422
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +34 -34
- data/app/assets/javascripts/wirispluginengine/WIRISplugins.js +1040 -64
- data/app/controllers/wirispluginengine/application_controller.rb +84 -75
- data/app/helpers/wirispluginengine/application_helper.rb +4 -4
- data/config/routes.rb +4 -4
- data/lib/com/wiris/common/WInteger.rb +52 -51
- data/lib/com/wiris/plugin/api/Cas.rb +5 -5
- data/lib/com/wiris/plugin/api/CleanCache.rb +5 -5
- data/lib/com/wiris/plugin/api/Configuration.rb +5 -5
- data/lib/com/wiris/plugin/api/ConfigurationKeys.rb +94 -91
- data/lib/com/wiris/plugin/api/Editor.rb +5 -5
- data/lib/com/wiris/plugin/api/Filter.rb +5 -5
- data/lib/com/wiris/plugin/api/ImageFormatController.rb +5 -5
- data/lib/com/wiris/plugin/api/ParamsProvider.rb +5 -5
- data/lib/com/wiris/plugin/api/PluginBuilder.rb +88 -74
- data/lib/com/wiris/plugin/api/Render.rb +5 -5
- data/lib/com/wiris/plugin/api/ServiceResourceLoader.rb +5 -5
- data/lib/com/wiris/plugin/api/Test.rb +5 -5
- data/lib/com/wiris/plugin/api/TextService.rb +5 -5
- data/lib/com/wiris/plugin/configuration/ConfigurationUpdater.rb +5 -5
- data/lib/com/wiris/plugin/impl/CacheFormulaImpl.rb +15 -0
- data/lib/com/wiris/plugin/impl/CacheImpl.rb +124 -0
- data/lib/com/wiris/plugin/impl/CasImpl.rb +140 -138
- data/lib/com/wiris/plugin/impl/CleanCacheImpl.rb +103 -101
- data/lib/com/wiris/plugin/impl/ConfigurationImpl.rb +165 -166
- data/lib/com/wiris/plugin/impl/CustomConfigurationUpdater.rb +32 -30
- data/lib/com/wiris/plugin/impl/DefaultConfigurationUpdater.rb +24 -22
- data/lib/com/wiris/plugin/impl/EditorImpl.rb +80 -78
- data/lib/com/wiris/plugin/impl/FileConfigurationUpdater.rb +29 -27
- data/lib/com/wiris/plugin/impl/FileStorageAndCache.rb +55 -53
- data/lib/com/wiris/plugin/impl/FolderTreeStorageAndCache.rb +65 -134
- data/lib/com/wiris/plugin/impl/GenericParamsProviderImpl.rb +50 -48
- data/lib/com/wiris/plugin/impl/HttpImpl.rb +49 -48
- data/lib/com/wiris/plugin/impl/HttpListener.rb +5 -5
- data/lib/com/wiris/plugin/impl/ImageFormatControllerPng.rb +71 -63
- data/lib/com/wiris/plugin/impl/ImageFormatControllerSvg.rb +37 -28
- data/lib/com/wiris/plugin/impl/PluginBuilderImpl.rb +280 -248
- data/lib/com/wiris/plugin/impl/RenderImpl.rb +303 -257
- data/lib/com/wiris/plugin/impl/ServiceResourceLoaderImpl.rb +41 -39
- data/lib/com/wiris/plugin/impl/TestImpl.rb +177 -157
- data/lib/com/wiris/plugin/impl/TextFilter.rb +210 -194
- data/lib/com/wiris/plugin/impl/TextFilterTags.rb +57 -50
- data/lib/com/wiris/plugin/impl/TextServiceImpl.rb +158 -107
- data/lib/com/wiris/plugin/storage/StorageAndCache.rb +5 -5
- data/lib/com/wiris/util/json/JSon.rb +505 -493
- data/lib/com/wiris/util/json/JSonIntegerFormat.rb +17 -16
- data/lib/com/wiris/util/json/JsonAPIResponse.rb +70 -0
- data/lib/com/wiris/util/json/StringParser.rb +57 -56
- data/lib/com/wiris/util/sys/AccessProvider.rb +8 -0
- data/lib/com/wiris/util/sys/Cache.rb +8 -0
- data/lib/com/wiris/util/sys/HttpConnection.rb +14 -13
- data/lib/com/wiris/util/sys/HttpConnectionListener.rb +5 -5
- data/lib/com/wiris/util/sys/HttpSync.rb +28 -0
- data/lib/com/wiris/util/sys/IniFile.rb +132 -131
- data/lib/com/wiris/util/sys/Lock.rb +8 -0
- data/lib/com/wiris/util/sys/LockProvider.rb +8 -0
- data/lib/com/wiris/util/sys/Store.rb +126 -101
- data/lib/com/wiris/util/sys/StoreCache.rb +63 -0
- data/lib/com/wiris/util/sys/TimerProxy.rb +21 -0
- data/lib/com/wiris/util/sys/TimerTask.rb +8 -0
- data/lib/com/wiris/util/type/Arrays.rb +275 -0
- data/lib/com/wiris/util/type/ByteBuffer.rb +69 -0
- data/lib/com/wiris/util/type/Comparator.rb +8 -0
- data/lib/com/wiris/util/type/DataUtils.rb +24 -0
- data/lib/com/wiris/util/type/DoubleTools.rb +14 -0
- data/lib/com/wiris/util/type/HashCache.rb +43 -0
- data/lib/com/wiris/util/type/IntegerTools.rb +32 -0
- data/lib/com/wiris/util/type/Queue.rb +31 -0
- data/lib/com/wiris/util/type/SortArrayByStringLength.rb +26 -0
- data/lib/com/wiris/util/type/SortStringByLength.rb +26 -0
- data/lib/com/wiris/util/type/SortedHash.rb +45 -0
- data/lib/com/wiris/util/type/Stack.rb +31 -0
- data/lib/com/wiris/util/type/StringUtils.rb +56 -0
- data/lib/com/wiris/util/type/Tokenizer.rb +40 -0
- data/lib/com/wiris/util/type/UrlUtils.rb +78 -0
- data/lib/com/wiris/util/xml/ContentHandler.rb +8 -0
- data/lib/com/wiris/util/xml/DefaultHandler.rb +25 -0
- data/lib/com/wiris/util/xml/EntityResolver.rb +8 -0
- data/lib/com/wiris/util/xml/MathMLEntityResolver.rb +19 -0
- data/lib/com/wiris/util/xml/SAXParser.rb +470 -0
- data/lib/com/wiris/util/xml/SerializableImpl.rb +16 -15
- data/lib/com/wiris/util/xml/WCharacterBase.rb +968 -627
- data/lib/com/wiris/util/xml/WEntities.rb +11 -9
- data/lib/com/wiris/util/xml/WXmlUtils.rb +660 -490
- data/lib/com/wiris/util/xml/XmlSerializer.rb +517 -471
- data/lib/com/wiris/util/xml/XmlWriter.rb +260 -262
- data/lib/loader.rb +15 -12
- data/lib/src-generic/Array.rb +22 -22
- data/lib/src-generic/ArrayInt.rb +31 -31
- data/lib/src-generic/Base64.rb +14 -14
- data/lib/src-generic/BaseCode.rb +93 -93
- data/lib/src-generic/Boolean.rb +27 -0
- data/lib/src-generic/Bytes.rb +50 -50
- data/lib/src-generic/BytesInput.rb +37 -37
- data/lib/src-generic/EReg.rb +55 -55
- data/lib/src-generic/File.rb +35 -35
- data/lib/src-generic/FileLock.rb +26 -26
- data/lib/src-generic/FileSystem.rb +37 -37
- data/lib/src-generic/Hash.rb +42 -42
- data/lib/src-generic/Http.rb +111 -107
- data/lib/src-generic/HttpRequest.rb +25 -25
- data/lib/src-generic/HttpResponse.rb +70 -70
- data/lib/src-generic/Iterator.rb +20 -19
- data/lib/src-generic/Math.rb +14 -14
- data/lib/src-generic/Md5.rb +8 -8
- data/lib/src-generic/Md5Tools.rb +11 -11
- data/lib/src-generic/PropertiesTools.rb +32 -32
- data/lib/src-generic/Reflect.rb +16 -16
- data/lib/src-generic/RubyConfigurationUpdater.rb +49 -45
- data/lib/src-generic/Serializer.rb +84 -84
- data/lib/src-generic/Std.rb +74 -74
- data/lib/src-generic/Storage.rb +152 -152
- data/lib/src-generic/StringBuf.rb +40 -40
- data/lib/src-generic/StringTools.rb +44 -46
- data/lib/src-generic/Timer.rb +6 -6
- data/lib/src-generic/Type.rb +18 -18
- data/lib/src-generic/TypeTools.rb +31 -31
- data/lib/src-generic/Unserializer.rb +72 -72
- data/lib/src-generic/Utf8.rb +26 -26
- data/lib/src-generic/Xml.rb +199 -198
- data/lib/src-generic/extended/Integer.rb +5 -5
- data/lib/src-generic/extended/Math.rb +6 -6
- data/lib/src-generic/extended/Properties.rb +11 -11
- data/lib/src-generic/extended/String.rb +38 -38
- data/lib/src-generic/settings/PlatformSettings.rb +18 -18
- data/lib/src-generic/system/HttpProxy.rb +23 -0
- data/lib/src-generic/system/HttpProxyAuth.rb +10 -0
- data/lib/wirispluginengine.rb +5 -5
- data/lib/wirispluginengine/engine.rb +5 -5
- data/lib/wirispluginengine/integration/cleancache.rb +8 -8
- data/lib/wirispluginengine/integration/configurationjs.rb +8 -15
- data/lib/wirispluginengine/integration/configurationjson.rb +6 -6
- data/lib/wirispluginengine/integration/createimage.rb +7 -7
- data/lib/wirispluginengine/integration/getmathml.rb +18 -18
- data/lib/wirispluginengine/integration/resource.rb +8 -8
- data/lib/wirispluginengine/integration/service.rb +5 -5
- data/lib/wirispluginengine/integration/showimage.rb +28 -21
- data/lib/wirispluginengine/integration/test.rb +5 -5
- data/lib/wirispluginengine/integration/testfilter.rb +10 -0
- data/lib/wirispluginengine/version.rb +2 -2
- data/resources/VERSION +1 -1
- data/resources/WEB-INF/web.xml +25 -0
- data/resources/WIRISplugins.js +3809 -0
- data/resources/default-configuration.ini +47 -45
- data/resources/tech.txt +1 -1
- data/resources/wirisplugin.css +43 -42
- metadata +40 -4
- data/configuration.ini.dist +0 -104
@@ -1,75 +1,84 @@
|
|
1
|
-
require_dependency "wirispluginengine/integration/configurationjs"
|
2
|
-
require_dependency "wirispluginengine/integration/createimage"
|
3
|
-
require_dependency "wirispluginengine/integration/showimage"
|
4
|
-
require_dependency "wirispluginengine/integration/service"
|
5
|
-
require_dependency "wirispluginengine/integration/getmathml"
|
6
|
-
require_dependency "wirispluginengine/integration/test"
|
7
|
-
require_dependency "wirispluginengine/integration/cleancache"
|
8
|
-
require_dependency "wirispluginengine/integration/resource"
|
9
|
-
require_dependency "wirispluginengine/integration/configurationjson"
|
10
|
-
require_dependency "
|
11
|
-
|
12
|
-
|
13
|
-
module Wirispluginengine
|
14
|
-
class ApplicationController < ActionController::Base
|
15
|
-
include Wiris
|
16
|
-
include WirisPlugin
|
17
|
-
def integration
|
18
|
-
#Loading resources for WirisPlugin (gem/resources dir).
|
19
|
-
spec = Gem::Specification.find_by_name("wirispluginengine")
|
20
|
-
gem_root = spec.gem_dir
|
21
|
-
Storage.resourcesDir = gem_root.to_s + '/resources'
|
22
|
-
|
23
|
-
wirishash = Hash.new()
|
24
|
-
params.each do |key, value|
|
25
|
-
wirishash[key] = value
|
26
|
-
end
|
27
|
-
propertiesparams = PropertiesTools.toProperties(wirishash)
|
28
|
-
rcu = RubyConfigurationUpdater.new()
|
29
|
-
rcu.request = request
|
30
|
-
pb = PluginBuilderImpl.getInstance()
|
31
|
-
pb.addConfigurationUpdater(rcu)
|
32
|
-
provider = GenericParamsProviderImpl.new(propertiesparams)
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
render :text =>
|
60
|
-
when '
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
render
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
1
|
+
require_dependency "wirispluginengine/integration/configurationjs"
|
2
|
+
require_dependency "wirispluginengine/integration/createimage"
|
3
|
+
require_dependency "wirispluginengine/integration/showimage"
|
4
|
+
require_dependency "wirispluginengine/integration/service"
|
5
|
+
require_dependency "wirispluginengine/integration/getmathml"
|
6
|
+
require_dependency "wirispluginengine/integration/test"
|
7
|
+
require_dependency "wirispluginengine/integration/cleancache"
|
8
|
+
require_dependency "wirispluginengine/integration/resource"
|
9
|
+
require_dependency "wirispluginengine/integration/configurationjson"
|
10
|
+
require_dependency "wirispluginengine/integration/testfilter"
|
11
|
+
require_dependency "com/wiris/plugin/api/PluginBuilder"
|
12
|
+
|
13
|
+
module Wirispluginengine
|
14
|
+
class ApplicationController < ActionController::Base
|
15
|
+
include Wiris
|
16
|
+
include WirisPlugin
|
17
|
+
def integration
|
18
|
+
#Loading resources for WirisPlugin (gem/resources dir).
|
19
|
+
spec = Gem::Specification.find_by_name("wirispluginengine")
|
20
|
+
gem_root = spec.gem_dir
|
21
|
+
Storage.resourcesDir = gem_root.to_s + '/resources'
|
22
|
+
|
23
|
+
wirishash = Hash.new()
|
24
|
+
params.each do |key, value|
|
25
|
+
wirishash[key] = value
|
26
|
+
end
|
27
|
+
propertiesparams = PropertiesTools.toProperties(wirishash)
|
28
|
+
rcu = RubyConfigurationUpdater.new()
|
29
|
+
rcu.request = request
|
30
|
+
pb = PluginBuilderImpl.getInstance()
|
31
|
+
pb.addConfigurationUpdater(rcu)
|
32
|
+
provider = GenericParamsProviderImpl.new(propertiesparams)
|
33
|
+
pb.setStorageAndCacheCacheObject(CacheImpl.new(pb.getConfiguration().getFullConfiguration()));
|
34
|
+
pb.setStorageAndCacheCacheFormulaObject(CacheFormulaImpl.new(pb.getConfiguration().getFullConfiguration()));
|
35
|
+
|
36
|
+
pb.addCorsHeaders(HttpResponse.new(self), request.headers['Origin'])
|
37
|
+
|
38
|
+
case self.params[:script].inspect.gsub('"', '')
|
39
|
+
when 'configurationjs'
|
40
|
+
configurationjs = Configurationjs.new
|
41
|
+
render :js => configurationjs.dispatch(request, response, pb)
|
42
|
+
when 'createimage'
|
43
|
+
createimage = CreateImage.new
|
44
|
+
render :plain => createimage.dispatch(request, response, provider, pb)
|
45
|
+
when 'showimage'
|
46
|
+
showimage = ShowImage.new
|
47
|
+
image = showimage.dispatch(request, response, provider, pb)
|
48
|
+
if (pb.getConfiguration().getProperty('wirispluginperformance', 'false') == 'true')
|
49
|
+
expires_in 60.minutes
|
50
|
+
render :json => image
|
51
|
+
else
|
52
|
+
send_data image.pack("C*"), :type => response.content_type, :disposition => 'inline'
|
53
|
+
end
|
54
|
+
when 'service'
|
55
|
+
service = Service.new()
|
56
|
+
render :plain => service.dispatch(request, response, provider, pb)
|
57
|
+
when 'getmathml'
|
58
|
+
getmathml = GetMathMLDispatcher.new()
|
59
|
+
render :text => getmathml.dispatch(request, response, provider, pb)
|
60
|
+
when 'test'
|
61
|
+
#test variable changed to wiristest
|
62
|
+
#in order to avoid conflict with rails production consoles
|
63
|
+
wiristest = WirisTest.new()
|
64
|
+
render :html => wiristest.dispatch(request, pb).html_safe
|
65
|
+
when 'cleancache'
|
66
|
+
wiriscleancache = CleanCache.new()
|
67
|
+
render :text => wiriscleancache.dispatch(request, response, provider, pb)
|
68
|
+
when 'resource'
|
69
|
+
wirisresource = Resource.new()
|
70
|
+
render :text => wirisresource.dispatch(response, provider, pb)
|
71
|
+
when 'configurationjson'
|
72
|
+
wirisconfiguration = ConfigurationJson.new()
|
73
|
+
render :json => wirisconfiguration.dispatch(request, response, provider, pb)
|
74
|
+
when 'testfilter'
|
75
|
+
filteredText = TestFilter.new()
|
76
|
+
render :plain => filteredText.dispatch(request, response, provider, pb)
|
77
|
+
|
78
|
+
else
|
79
|
+
render plain:"Method no exists"
|
80
|
+
end
|
81
|
+
Storage.resourcesDir = nil
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module Wirispluginengine
|
2
|
-
module ApplicationHelper
|
3
|
-
end
|
4
|
-
end
|
1
|
+
module Wirispluginengine
|
2
|
+
module ApplicationHelper
|
3
|
+
end
|
4
|
+
end
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Wirispluginengine::Engine.routes.draw do
|
2
|
-
get 'integration/:script' => 'application#integration'
|
3
|
-
post 'integration/:script' => 'application#integration'
|
4
|
-
end
|
1
|
+
Wirispluginengine::Engine.routes.draw do
|
2
|
+
get 'integration/:script' => 'application#integration'
|
3
|
+
post 'integration/:script' => 'application#integration'
|
4
|
+
end
|
@@ -1,57 +1,58 @@
|
|
1
1
|
module WirisPlugin
|
2
2
|
include Wiris
|
3
|
-
|
4
|
-
|
3
|
+
class WInteger
|
4
|
+
include Wiris
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
15
|
-
def self.min(x,y)
|
16
|
-
if x<y
|
17
|
-
return x
|
18
|
-
end
|
19
|
-
return y
|
20
|
-
end
|
21
|
-
def self.toHex(x,digits)
|
22
|
-
s = ""
|
23
|
-
while (x!=0)&&((digits)>0)
|
24
|
-
digits-=1
|
25
|
-
d = x&15
|
26
|
-
s = Std::fromCharCode(d+(d>=10 ? 55 : 48)).to_s+s
|
27
|
-
x = x>>4
|
28
|
-
end
|
29
|
-
while (digits-=1)>0
|
30
|
-
s = "0"+s
|
31
|
-
end
|
32
|
-
return s
|
33
|
-
end
|
34
|
-
def self.parseHex(str)
|
35
|
-
return Std::parseInt("0x"+str)
|
36
|
-
end
|
37
|
-
def self.isInteger(str)
|
38
|
-
str = StringTools::trim(str)
|
39
|
-
i = 0
|
40
|
-
n = str::length()
|
41
|
-
if str::startsWith("-")
|
42
|
-
i+=1
|
43
|
-
end
|
44
|
-
if str::startsWith("+")
|
45
|
-
i+=1
|
46
|
-
end
|
47
|
-
while i<n
|
48
|
-
c = Std::charCodeAt(str,i)
|
49
|
-
if (c<48)||(c>57)
|
50
|
-
return false
|
6
|
+
def initialize()
|
7
|
+
super()
|
8
|
+
end
|
9
|
+
def self.max(x, y)
|
10
|
+
if x > y
|
11
|
+
return x
|
12
|
+
end
|
13
|
+
return y
|
51
14
|
end
|
52
|
-
|
53
|
-
|
54
|
-
|
15
|
+
def self.min(x, y)
|
16
|
+
if x < y
|
17
|
+
return x
|
18
|
+
end
|
19
|
+
return y
|
20
|
+
end
|
21
|
+
def self.toHex(x, digits)
|
22
|
+
s = ""
|
23
|
+
while (x != 0) && ((digits) > 0)
|
24
|
+
digits-=1
|
25
|
+
d = x&15
|
26
|
+
s = Std::fromCharCode(d + (d >= 10 ? 55 : 48)).to_s + s
|
27
|
+
x = x >> 4
|
28
|
+
end
|
29
|
+
while (digits-=1) > 0
|
30
|
+
s = "0" + s
|
31
|
+
end
|
32
|
+
return s
|
33
|
+
end
|
34
|
+
def self.parseHex(str)
|
35
|
+
return Std::parseInt("0x" + str)
|
36
|
+
end
|
37
|
+
def self.isInteger(str)
|
38
|
+
str = StringTools::trim(str)
|
39
|
+
i = 0
|
40
|
+
n = str::length()
|
41
|
+
if str::startsWith("-")
|
42
|
+
i+=1
|
43
|
+
end
|
44
|
+
if str::startsWith("+")
|
45
|
+
i+=1
|
46
|
+
end
|
47
|
+
while i < n
|
48
|
+
c = Std::charCodeAt(str,i)
|
49
|
+
if (c < 48) || (c > 57)
|
50
|
+
return false
|
51
|
+
end
|
52
|
+
i+=1
|
53
|
+
end
|
54
|
+
return true
|
55
|
+
end
|
56
|
+
|
55
57
|
end
|
56
|
-
end
|
57
58
|
end
|
@@ -1,96 +1,99 @@
|
|
1
1
|
module WirisPlugin
|
2
2
|
include Wiris
|
3
|
-
|
4
|
-
|
3
|
+
class ConfigurationKeys
|
4
|
+
include Wiris
|
5
|
+
|
6
|
+
def initialize()
|
7
|
+
super()
|
8
|
+
end
|
9
|
+
DEBUG = "wirisdebug"
|
10
|
+
FORMULA_FOLDER = "wirisformuladirectory"
|
11
|
+
CACHE_FOLDER = "wiriscachedirectory"
|
12
|
+
INTEGRATION_PATH = "wirisintegrationpath"
|
13
|
+
EDITOR_PARAMETERS_LIST = "wiriseditorparameterslist"
|
14
|
+
STORAGE_CLASS = "wirisstorageclass"
|
15
|
+
CONFIGURATION_CLASS = "wirisconfigurationclass"
|
16
|
+
CONFIGURATION_PATH = "wirisconfigurationpath"
|
17
|
+
ACCESSPROVIDER_CLASS = "wirisaccessproviderclass"
|
18
|
+
CONTEXT_PATH = "wiriscontextpath"
|
19
|
+
SERVICE_PROTOCOL = "wirisimageserviceprotocol"
|
20
|
+
SERVICE_PORT = "wirisimageserviceport"
|
21
|
+
SERVICE_HOST = "wirisimageservicehost"
|
22
|
+
SERVICE_PATH = "wirisimageservicepath"
|
23
|
+
CAS_LANGUAGES = "wiriscaslanguages"
|
24
|
+
CAS_CODEBASE = "wiriscascodebase"
|
25
|
+
CAS_ARCHIVE = "wiriscasarchive"
|
26
|
+
CAS_CLASS = "wiriscasclass"
|
27
|
+
CAS_WIDTH = "wiriscaswidth"
|
28
|
+
CAS_HEIGHT = "wiriscasheight"
|
29
|
+
SHOWIMAGE_PATH = "wirishowimagepath"
|
30
|
+
SHOWCASIMAGE_PATH = "wirishowcasimagepath"
|
31
|
+
CLEAN_CACHE_PATH = "wiriscleancachepath"
|
32
|
+
RESOURCE_PATH = "wirisresourcespath"
|
33
|
+
LATEX_TO_MATHML_URL = "wirislatextomathmlurl"
|
34
|
+
SAVE_MODE = "wiriseditorsavemode"
|
35
|
+
EDITOR_TOOLBAR = "wiriseditortoolbar"
|
36
|
+
HOST_PLATFORM = "wirishostplatform"
|
37
|
+
VERSION_PLATFORM = "wirisversionplatform"
|
38
|
+
WIRIS_DPI = "wirisimagedpi"
|
39
|
+
FONT_FAMILY = "wirisfontfamily"
|
40
|
+
FILTER_OUTPUT_MATHML = "wirisfilteroutputmathml"
|
41
|
+
SAVE_MATHML_SEMANTICS = "wirissavehandtraces"
|
42
|
+
EDITOR_MATHML_ATTRIBUTE = "wiriseditormathmlattribute"
|
43
|
+
EDITOR_PARAMS = "wiriseditorparameters"
|
44
|
+
EDITOR_PARAMETERS_DEFAULT_LIST = "mml,color,centerbaseline,zoom,dpi,fontSize,fontFamily,defaultStretchy,backgroundColor,format,saveLatex"
|
45
|
+
EDITOR_PARAMETERS_NOTRENDER_LIST = "toolbar, toolbarHidden, reservedWords, autoformat, mml, language, rtlLanguages, ltrLanguages, arabicIndicLanguages, easternArabicIndicLanguages, europeanLanguages"
|
46
|
+
HTTPPROXY = "wirisproxy"
|
47
|
+
HTTPPROXY_HOST = "wirisproxy_host"
|
48
|
+
HTTPPROXY_PORT = "wirisproxy_port"
|
49
|
+
HTTPPROXY_USER = "wirisproxy_user"
|
50
|
+
HTTPPROXY_PASS = "wirisproxy_password"
|
51
|
+
REFERER = "wirisreferer"
|
52
|
+
IMAGE_FORMAT = "wirisimageformat"
|
53
|
+
EXTERNAL_PLUGIN = "wirisexternalplugin"
|
54
|
+
EXTERNAL_REFERER = "wirisexternalreferer"
|
55
|
+
IMPROVE_PERFORMANCE = "wirispluginperformance"
|
56
|
+
EDITOR_KEY = "wiriseditorkey"
|
57
|
+
CLEAN_CACHE_TOKEN = "wiriscleancachetoken"
|
58
|
+
CLEAN_CACHE_GUI = "wiriscleancachegui"
|
59
|
+
def self.imageConfigProperties
|
60
|
+
@@imageConfigProperties
|
61
|
+
end
|
62
|
+
def self.imageConfigProperties=(imageConfigProperties)
|
63
|
+
@@imageConfigProperties = imageConfigProperties
|
64
|
+
end
|
65
|
+
def self.imageConfigPropertiesInv
|
66
|
+
@@imageConfigPropertiesInv
|
67
|
+
end
|
68
|
+
def self.imageConfigPropertiesInv=(imageConfigPropertiesInv)
|
69
|
+
@@imageConfigPropertiesInv = imageConfigPropertiesInv
|
70
|
+
end
|
71
|
+
SERVICES_PARAMETERS_LIST = "mml,lang,service,latex,mode"
|
72
|
+
def self.computeInverse(dict)
|
73
|
+
keys = dict::keys()
|
74
|
+
outDict = Hash.new()
|
75
|
+
while keys::hasNext()
|
76
|
+
key = keys::next()
|
77
|
+
outDict::set(dict::get(key),key)
|
78
|
+
end
|
79
|
+
return outDict
|
80
|
+
end
|
81
|
+
@@imageConfigProperties = Hash.new()
|
82
|
+
@@imageConfigProperties::set("backgroundColor","wirisimagebackgroundcolor")
|
83
|
+
@@imageConfigProperties::set("transparency","wiristransparency")
|
84
|
+
@@imageConfigProperties::set("fontSize","wirisimagefontsize")
|
85
|
+
@@imageConfigProperties::set("version","wirisimageserviceversion")
|
86
|
+
@@imageConfigProperties::set("color","wirisimagecolor")
|
87
|
+
@@imageConfigProperties::set("dpi","wirisimagedpi")
|
88
|
+
@@imageConfigProperties::set("fontFamily",ConfigurationKeys::FONT_FAMILY)
|
89
|
+
@@imageConfigProperties::set("rtlLanguages","wirisrtllanguages")
|
90
|
+
@@imageConfigProperties::set("ltrLanguages","wirisltrlanguages")
|
91
|
+
@@imageConfigProperties::set("arabicIndicLanguages","wirisarabicindiclanguages")
|
92
|
+
@@imageConfigProperties::set("easternArabicIndicLanguages","wiriseasternarabicindiclanguages")
|
93
|
+
@@imageConfigProperties::set("europeanLanguages","wiriseuropeanlanguages")
|
94
|
+
@@imageConfigProperties::set("defaultStretchy","wirisimagedefaultstretchy")
|
95
|
+
@@imageConfigProperties::set("parseMemoryLimit","wirisparsememorylimit")
|
96
|
+
@@imageConfigPropertiesInv = ConfigurationKeys.computeInverse(@@imageConfigProperties)
|
5
97
|
|
6
|
-
def initialize()
|
7
|
-
super()
|
8
|
-
end
|
9
|
-
DEBUG = "wirisdebug"
|
10
|
-
FORMULA_FOLDER = "wirisformuladirectory"
|
11
|
-
CACHE_FOLDER = "wiriscachedirectory"
|
12
|
-
INTEGRATION_PATH = "wirisintegrationpath"
|
13
|
-
EDITOR_PARAMETERS_LIST = "wiriseditorparameterslist"
|
14
|
-
STORAGE_CLASS = "wirisstorageclass"
|
15
|
-
CONFIGURATION_CLASS = "wirisconfigurationclass"
|
16
|
-
CONFIGURATION_PATH = "wirisconfigurationpath"
|
17
|
-
CONTEXT_PATH = "wiriscontextpath"
|
18
|
-
SERVICE_PROTOCOL = "wirisimageserviceprotocol"
|
19
|
-
SERVICE_PORT = "wirisimageserviceport"
|
20
|
-
SERVICE_HOST = "wirisimageservicehost"
|
21
|
-
SERVICE_PATH = "wirisimageservicepath"
|
22
|
-
CAS_LANGUAGES = "wiriscaslanguages"
|
23
|
-
CAS_CODEBASE = "wiriscascodebase"
|
24
|
-
CAS_ARCHIVE = "wiriscasarchive"
|
25
|
-
CAS_CLASS = "wiriscasclass"
|
26
|
-
CAS_WIDTH = "wiriscaswidth"
|
27
|
-
CAS_HEIGHT = "wiriscasheight"
|
28
|
-
SHOWIMAGE_PATH = "wirishowimagepath"
|
29
|
-
SHOWCASIMAGE_PATH = "wirishowcasimagepath"
|
30
|
-
CLEAN_CACHE_PATH = "wiriscleancachepath"
|
31
|
-
RESOURCE_PATH = "wirisresourcespath"
|
32
|
-
LATEX_TO_MATHML_URL = "wirislatextomathmlurl"
|
33
|
-
SAVE_MODE = "wiriseditorsavemode"
|
34
|
-
EDITOR_TOOLBAR = "wiriseditortoolbar"
|
35
|
-
HOST_PLATFORM = "wirishostplatform"
|
36
|
-
VERSION_PLATFORM = "wirisversionplatform"
|
37
|
-
WIRIS_DPI = "wirisimagedpi"
|
38
|
-
FONT_FAMILY = "wirisfontfamily"
|
39
|
-
FILTER_OUTPUT_MATHML = "wirisfilteroutputmathml"
|
40
|
-
EDITOR_MATHML_ATTRIBUTE = "wiriseditormathmlattribute"
|
41
|
-
EDITOR_PARAMS = "wiriseditorparameters"
|
42
|
-
EDITOR_PARAMETERS_DEFAULT_LIST = "mml,color,centerbaseline,zoom,dpi,fontSize,fontFamily,defaultStretchy,backgroundColor,format"
|
43
|
-
EDITOR_PARAMETERS_NOTRENDER_LIST = "toolbar, toolbarHidden, reservedWords, autoformat, mml, language, rtlLanguages, ltrLanguages, arabicIndicLanguages, easternArabicIndicLanguages, europeanLanguages"
|
44
|
-
HTTPPROXY = "wirisproxy"
|
45
|
-
HTTPPROXY_HOST = "wirisproxy_host"
|
46
|
-
HTTPPROXY_PORT = "wirisproxy_port"
|
47
|
-
HTTPPROXY_USER = "wirisproxy_user"
|
48
|
-
HTTPPROXY_PASS = "wirisproxy_password"
|
49
|
-
REFERER = "wirisreferer"
|
50
|
-
IMAGE_FORMAT = "wirisimageformat"
|
51
|
-
EXTERNAL_PLUGIN = "wirisexternalplugin"
|
52
|
-
EXTERNAL_REFERER = "wirisexternalreferer"
|
53
|
-
IMPROVE_PERFORMANCE = "wirispluginperformance"
|
54
|
-
EDITOR_KEY = "wiriseditorkey"
|
55
|
-
CLEAN_CACHE_TOKEN = "wiriscleancachetoken"
|
56
|
-
CLEAN_CACHE_GUI = "wiriscleancachegui"
|
57
|
-
def self.imageConfigProperties
|
58
|
-
@@imageConfigProperties
|
59
|
-
end
|
60
|
-
def self.imageConfigProperties=(imageConfigProperties)
|
61
|
-
@@imageConfigProperties = imageConfigProperties
|
62
|
-
end
|
63
|
-
def self.imageConfigPropertiesInv
|
64
|
-
@@imageConfigPropertiesInv
|
65
|
-
end
|
66
|
-
def self.imageConfigPropertiesInv=(imageConfigPropertiesInv)
|
67
|
-
@@imageConfigPropertiesInv = imageConfigPropertiesInv
|
68
|
-
end
|
69
|
-
SERVICES_PARAMETERS_LIST = "mml,lang,service,latex"
|
70
|
-
def self.computeInverse(dict)
|
71
|
-
keys = dict::keys()
|
72
|
-
outDict = Hash.new()
|
73
|
-
while keys::hasNext()
|
74
|
-
key = keys::next()
|
75
|
-
outDict::set(dict::get(key),key)
|
76
|
-
end
|
77
|
-
return outDict
|
78
98
|
end
|
79
|
-
@@imageConfigProperties = Hash.new()
|
80
|
-
@@imageConfigProperties::set("backgroundColor","wirisimagebackgroundcolor")
|
81
|
-
@@imageConfigProperties::set("transparency","wiristransparency")
|
82
|
-
@@imageConfigProperties::set("fontSize","wirisimagefontsize")
|
83
|
-
@@imageConfigProperties::set("version","wirisimageserviceversion")
|
84
|
-
@@imageConfigProperties::set("color","wirisimagecolor")
|
85
|
-
@@imageConfigProperties::set("dpi","wirisimagedpi")
|
86
|
-
@@imageConfigProperties::set("fontFamily",ConfigurationKeys::FONT_FAMILY)
|
87
|
-
@@imageConfigProperties::set("rtlLanguages","wirisrtllanguages")
|
88
|
-
@@imageConfigProperties::set("ltrLanguages","wirisltrlanguages")
|
89
|
-
@@imageConfigProperties::set("arabicIndicLanguages","wirisarabicindiclanguages")
|
90
|
-
@@imageConfigProperties::set("easternArabicIndicLanguages","wiriseasternarabicindiclanguages")
|
91
|
-
@@imageConfigProperties::set("europeanLanguages","wiriseuropeanlanguages")
|
92
|
-
@@imageConfigProperties::set("defaultStretchy","wirisimagedefaultstretchy")
|
93
|
-
@@imageConfigProperties::set("parseMemoryLimit","wirisparsememorylimit")
|
94
|
-
@@imageConfigPropertiesInv = computeInverse(@@imageConfigProperties)
|
95
|
-
end
|
96
99
|
end
|