/
namespacebinding.py
123 lines (108 loc) · 4.12 KB
/
namespacebinding.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# This file is part of Superwas.
#
# Superwas is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Superwas is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Superwas. If not, see <http://www.gnu.org/licenses/>.
# NameSpaceBinding classes
#
# Author: Andre van Dijk (SuperClass IT)
# Date: $Date: 2013-01-04 16:04:36 +0100 (vr, 04 jan 2013) $
# $Id: namespacebinding.py 424 2013-01-04 15:04:36Z andre $
class BaseNameSpaceBinding(WASConfig):
"""
Class to represent a Name Space binding.
"""
level=3
def __init__(self, parent=None):
WASConfig.__init__(self, parent)
self.man_attributes={
'name' : "",
'nameInNameSpace' : ""
}
def setNameInNameSpace(self, nameInNameSpace):
if nameInNameSpace!=None:
self.man_attributes['nameInNameSpace']=nameInNameSpace
self.logValue()
def getNameInNameSpace(self):
return self.man_attributes['nameInNameSpace']
def create(self):
WASConfig.create(self)
AdminConfig.create(self.getConfigType(),self.getParent().getConfigID(),Util.dictToList(self.man_attributes))
self.logCreate()
class StringNameSpaceBinding(BaseNameSpaceBinding):
def __init__(self, parent=None):
BaseNameSpaceBinding.__init__(self, parent)
self.man_attributes['stringToBind']=""
def setStringToBind(self, stringToBind):
if stringToBind!=None:
self.man_attributes['stringToBind']=stringToBind
self.logValue()
def getStringToBind(self):
return self.man_attributes['stringToBind']
class EjbNameSpaceBinding(BaseNameSpaceBinding):
def __init__(self, parent=None):
BaseNameSpaceBinding.__init__(self, parent)
self.man_attributes['applicationNodeName']=""
self.man_attributes['applicationServerName']=""
self.man_attributes['ejbJndiName']=""
self.man_attributes['bindingLocation']="SERVERCLUSTER"
def setApplicationServerName(self, applicationServerName):
if applicationServerName is not None:
self.man_attributes['applicationServerName']=applicationServerName
self.logValue()
def getApplicationServerName(self):
return self.man_attributes['applicationServerName']
def setApplicationNodeName(self, applicationNodeName):
if applicationNodeName is not None:
self.man_attributes['applicationNodeName']=applicationNodeName
self.logValue()
def getApplicationNodeName(self):
return self.man_attributes['applicationNodeName']
def setEjbJndiName(self, ejbJndiName):
if ejbJndiName is not None:
self.man_attributes['ejbJndiName']=ejbJndiName
self.logValue()
def getEjbJndiName(self):
return self.man_attributes['ejbJndiName']
def setBindingLocation(self, bindingLocation):
if bindingLocation is not None:
self.man_attributes['bindingLocation']=bindingLocation
self.logValue()
def getBindingLocation(self):
return self.man_attributes['bindingLocation']
class CORBAObjectNameSpaceBinding(BaseNameSpaceBinding):
def __init__(self, parent=None):
BaseNameSpaceBinding.__init__(self, parent)
self.man_attributes['jndiName']=""
self.man_attributes['providerURL']=""
def setProviderURL(self, providerURL):
if providerURL is not None:
self.man_attributes['providerURL']=providerURL
self.logValue()
def getProviderURL(self):
return self.man_attributes['providerURL']
def setJndiName(self, jndiName):
if jndiName is not None:
self.man_attributes['jndiName']=jndiName
self.logValue()
def getJndiName(self):
return self.man_attributes['jndiName']
class IndirectLookupNameSpaceBinding(BaseNameSpaceBinding):
def __init__(self, parent=None):
BaseNameSpaceBinding.__init__(self, parent)
self.man_attributes['corbanameUrl']=""
def setCorbanameUrl(self, corbanameUrl):
if corbanameUrl is not None:
self.man_attributes['corbanameUrl']=corbanameUrl
self.logValue()
def getCorbanameUrl(self):
return self.man_attributes['corbanameUrl']