X Tutup
Skip to content

Commit 78f28cb

Browse files
author
Russ Miles
committed
Updated according to api changes to the Application Context in the core container. Related to SESPRINGPYTHONPY-74.
git-svn-id: https://src.springframework.org/svn/se-springpython-py/trunk/springpython@166 ce8fead1-4192-4296-8608-a705134b927f
1 parent 41a863a commit 78f28cb

24 files changed

+124
-124
lines changed

docs/reference/src/components.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
<programlisting><![CDATA[
6767
appContext = XmlApplicationContext("myAppContext.xml")
68-
movieLister = appContext.getComponent("MovieLister")
68+
movieLister = appContext.get_component("MovieLister")
6969
]]></programlisting>
7070

7171
<para>By injecting components into other components, the program looking up this movieLister

docs/reference/src/remoting.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ print service.getData("Hello")
7272

7373
<programlisting><![CDATA[
7474
appContext = XmlApplicationContext("applicationContext.xml")
75-
service = appContext.getComponent("service")
75+
service = appContext.get_component("service")
7676
print service.getData("Hello")
7777
7878
"You got remote data => Hello"

docs/reference/src/samples.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ if __name__ == "__main__":
527527
# the channel and the bot that supports it.
528528
applicationContext = CoilyWebClient()
529529
530-
cherrypy.root = applicationContext.getComponent(componentId = "root")
530+
cherrypy.root = applicationContext.get_component(componentId = "root")
531531
cherrypy.server = MiddlewareServer()
532532
533533
# Configure cherrypy programmatically.
@@ -540,7 +540,7 @@ if __name__ == "__main__":
540540
"/scripts": {"static_filter.on": True, "static_filter.dir": "js"}
541541
})
542542
543-
middleware = applicationContext.getComponent(componentId = "filterChainProxy")
543+
middleware = applicationContext.get_component(componentId = "filterChainProxy")
544544
middleware.application = wsgiApp
545545
546546
# Start the CherryPy server.

samples/petclinic/cherrypy/petclinic-client-xml.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def make_security_filter(manager):
6060
cherrypy.tools.securityFilter = cherrypy.Tool('before_handler', filter_chainer, priority=75)
6161
return securityFilter
6262

63-
manager = applicationContext.getComponent("authenticationManager")
64-
accessDecisionManager = applicationContext.getComponent("accessDecisionManager")
63+
manager = applicationContext.get_component("authenticationManager")
64+
accessDecisionManager = applicationContext.get_component("accessDecisionManager")
6565
objectDefinitionSource = [
6666
("/vets.*", ["VET_ANY"]),
6767
("/editOwner.*", ["VET_ANY", "OWNER"]),
@@ -98,8 +98,8 @@ def make_security_filter(manager):
9898
}
9999
}
100100

101-
cherrypy.tree.mount(applicationContext.getComponent(componentId = "root"), '/', config=conf)
102-
cherrypy.tree.mount(applicationContext.getComponent(componentId = "loginForm"), '/login', config=login_conf)
101+
cherrypy.tree.mount(applicationContext.get_component(componentId = "root"), '/', config=conf)
102+
cherrypy.tree.mount(applicationContext.get_component(componentId = "loginForm"), '/login', config=login_conf)
103103

104104
cherrypy.engine.start()
105105
cherrypy.engine.block()

samples/petclinic/cherrypy/petclinic-client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def make_security_filter(manager):
6060
cherrypy.tools.securityFilter = cherrypy.Tool('before_handler', filter_chainer, priority=75)
6161
return securityFilter
6262

63-
manager = applicationContext.getComponent("authenticationManager")
64-
accessDecisionManager = applicationContext.getComponent("accessDecisionManager")
63+
manager = applicationContext.get_component("authenticationManager")
64+
accessDecisionManager = applicationContext.get_component("accessDecisionManager")
6565
objectDefinitionSource = [
6666
("/vets.*", ["VET_ANY"]),
6767
("/editOwner.*", ["VET_ANY", "OWNER"]),
@@ -98,8 +98,8 @@ def make_security_filter(manager):
9898
}
9999
}
100100

101-
cherrypy.tree.mount(applicationContext.getComponent(componentId = "root"), '/', config=conf)
102-
cherrypy.tree.mount(applicationContext.getComponent(componentId = "loginForm"), '/login', config=login_conf)
101+
cherrypy.tree.mount(applicationContext.get_component(componentId = "root"), '/', config=conf)
102+
cherrypy.tree.mount(applicationContext.get_component(componentId = "loginForm"), '/login', config=login_conf)
103103

104104
cherrypy.engine.start()
105105
cherrypy.engine.block()

samples/petclinic/cherrypy/petclinic-xml.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def make_security_filter(manager):
6262
cherrypy.tools.securityFilter = cherrypy.Tool('before_handler', filter_chainer, priority=75)
6363
return securityFilter
6464

65-
manager = applicationContext.getComponent("authenticationManager")
66-
accessDecisionManager = applicationContext.getComponent("accessDecisionManager")
65+
manager = applicationContext.get_component("authenticationManager")
66+
accessDecisionManager = applicationContext.get_component("accessDecisionManager")
6767
objectDefinitionSource = [
6868
("/vets.*", ["VET_ANY"]),
6969
("/editOwner.*", ["VET_ANY", "OWNER"]),
@@ -100,8 +100,8 @@ def make_security_filter(manager):
100100
}
101101
}
102102

103-
cherrypy.tree.mount(applicationContext.getComponent(componentId = "root"), '/', config=conf)
104-
cherrypy.tree.mount(applicationContext.getComponent(componentId = "loginForm"), '/login', config=login_conf)
103+
cherrypy.tree.mount(applicationContext.get_component(componentId = "root"), '/', config=conf)
104+
cherrypy.tree.mount(applicationContext.get_component(componentId = "loginForm"), '/login', config=login_conf)
105105

106106
cherrypy.engine.start()
107107
cherrypy.engine.block()

samples/petclinic/cherrypy/petclinic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def make_security_filter(manager):
6262
cherrypy.tools.securityFilter = cherrypy.Tool('before_handler', filter_chainer, priority=75)
6363
return securityFilter
6464

65-
manager = applicationContext.getComponent("authenticationManager")
66-
accessDecisionManager = applicationContext.getComponent("accessDecisionManager")
65+
manager = applicationContext.get_component("authenticationManager")
66+
accessDecisionManager = applicationContext.get_component("accessDecisionManager")
6767
objectDefinitionSource = [
6868
("/vets.*", ["VET_ANY"]),
6969
("/editOwner.*", ["VET_ANY", "OWNER"]),
@@ -100,8 +100,8 @@ def make_security_filter(manager):
100100
}
101101
}
102102

103-
cherrypy.tree.mount(applicationContext.getComponent(componentId = "root"), '/', config=conf)
104-
cherrypy.tree.mount(applicationContext.getComponent(componentId = "loginForm"), '/login', config=login_conf)
103+
cherrypy.tree.mount(applicationContext.get_component(componentId = "root"), '/', config=conf)
104+
cherrypy.tree.mount(applicationContext.get_component(componentId = "loginForm"), '/login', config=login_conf)
105105

106106
cherrypy.engine.start()
107107
cherrypy.engine.block()

samples/springirc/coily

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ if __name__ == "__main__":
230230
# the channel and the bot that supports it.
231231
applicationContext = CoilyWebClient()
232232

233-
cherrypy.root = applicationContext.getComponent(componentId = "root")
233+
cherrypy.root = applicationContext.get_component(componentId = "root")
234234
cherrypy.server = MiddlewareServer()
235235

236236
# Configure cherrypy programmatically.
@@ -243,7 +243,7 @@ if __name__ == "__main__":
243243
"/scripts": {"static_filter.on": True, "static_filter.dir": "js"}
244244
})
245245

246-
middleware = applicationContext.getComponent(componentId = "filterChainProxy")
246+
middleware = applicationContext.get_component(componentId = "filterChainProxy")
247247
middleware.application = wsgiApp
248248

249249
# Start the CherryPy server.

samples/springwiki/springwiki-noxml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def start(self, middleware):
5555
# to objects. In this case, it is being assigned an object that was created in the
5656
# IoC container, allowing the web server components to be totally decoupled from the
5757
# view component.
58-
cherrypy.root = applicationContext.getComponent(componentId = "read")
58+
cherrypy.root = applicationContext.get_component(componentId = "read")
5959

6060
cherrypy.server = MiddlewareServer()
6161

@@ -133,7 +133,7 @@ def start(self, middleware):
133133
}
134134
})
135135

136-
middleware = applicationContext.getComponent(componentId = "filterChainProxy")
136+
middleware = applicationContext.get_component(componentId = "filterChainProxy")
137137
middleware.application = wsgiApp
138138

139139
# Start the CherryPy server.

samples/springwiki/springwiki.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def start(self, middleware):
5454
# to objects. In this case, it is being assigned an object that was created in the
5555
# IoC container, allowing the web server components to be totally decoupled from the
5656
# view component.
57-
cherrypy.root = applicationContext.getComponent(componentId = "read")
57+
cherrypy.root = applicationContext.get_component(componentId = "read")
5858

5959
cherrypy.server = MiddlewareServer()
6060

@@ -132,7 +132,7 @@ def start(self, middleware):
132132
}
133133
})
134134

135-
middleware = applicationContext.getComponent(componentId = "filterChainProxy")
135+
middleware = applicationContext.get_component(componentId = "filterChainProxy")
136136
middleware.application = wsgiApp
137137

138138
# Start the CherryPy server.

0 commit comments

Comments
 (0)
X Tutup