-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaop.cfm
68 lines (68 loc) · 2.9 KB
/
aop.cfm
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Wirebox AOP Programming</title>
<link href="p7pmm/p7PMMh07.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="p7pmm/p7PMMscripts.js"></script>
<link href="oneColLiqCtr.css" rel="stylesheet" type="text/css" />
</head>
<body class="oneColLiqCtr">
<div id="container">
<div id="p7PMM_1" class="p7PMMh07">
<ul class="p7PMM">
<li><a href="#">Home</a>
<div>
<ul>
<li><a href="implicitCreation.cfm">Implicit Creation</a></li>
<li><a href="ExplicitCreation.cfm">Explicit Binder Creation</a></li>
<li><a href="ScanLocations.cfm">Scan Locations</a></li>
</ul>
</div>
</li>
<li><a href="logbox.cfm">Wirebox & LogBox</a></li>
<li><a href="aop.cfm">AOP</a></li>
<li><a href="reset.cfm">Reset</a></li>
</ul>
<div class="p7pmmclearfloat"> </div>
<!--[if lte IE 6]>
<style>.p7PMMh07 .current_mark {font-weight: normal; text-transform: uppercase;} .p7PMMh07 ul ul .current_mark {font-weight: bold;} .p7PMMh07 li {filter: alpha(opacity=80);} .p7PMMh07 ul ul li {float:left; clear: both; width: 100%;}.p7PMMh07 {text-align: left;}.p7PMMh07 ul ul a {height: 1%;}</style>
<![endif]-->
<!--[if IE 5.500]>
<style>.p7PMMh07 {position: relative; z-index: 9999999;}</style>
<![endif]-->
<!--[if IE 7]>
<style>.p7PMMh07, .p7PMMh07 a{zoom:1;}.p7PMMh07 ul ul li{float:left;clear:both;width:100%;}</style>
<![endif]-->
<script type="text/javascript">
<!--
P7_PMMop('p7PMM_1',1,2,-5,-5,0,1,0,1,0,3,1,1,0);
//-->
</script>
</div>
<div id="mainContent">
<h1> Wirebox AOP Demo</h1>
<p><b>Wirebox provides full AOP support for before, after and around advices</b></h2>
<p>1. You need to activate the services in the Wirebox binder.<br><br>
listeners = [<br>
{ class="wirebox.system.aop.Mixer",properties={} }<br>
]
</p>
<h3>How it works</h3>
<p>
<ul style="line-height:40px;">
<li>Identify the CFC or CFC's that we want to apply AOP to</li>
<li>What methods will be decorated?</li>
<li>AOP will decorate these methods for us with the needed aspects</li>
</ul>
</p>
<p>2. Create an aspect. We can do this with ColdBox Platform Utilities</p>
<p>3. Create a mapping to this aspect in Wirebox</p>
<p>mapAspect("loggingMethodAspect").to("config.loggingAspects");</p>
<p>4. Create a binding to the target</p>
<p>bindAspect(classes=match().regex('model.logMe'),methods=match().methods('methodLogger'),aspects="loggingMethodAspect");</p>
<cfdump var="#application.wirebox.getInstance('model.logMe').methodLogger(propname="George")#">
<!-- end #mainContent --></div>
<!-- end #container --></div>
</body>
</html>