1
14
15 package com.liferay.portal.spring.aop;
16
17
23 public class ChainableMethodAdviceInjector {
24
25 public void afterPropertiesSet() {
26 if (_injectCondition) {
27 if (_newChainableMethodAdvice == null) {
28 throw new IllegalArgumentException(
29 "New ChainableMethodAdvice is null");
30 }
31
32 if (_parentChainableMethodAdvice == null) {
33 throw new IllegalArgumentException(
34 "Parent ChainableMethodAdvice is null");
35 }
36
37 _newChainableMethodAdvice.nextMethodInterceptor =
38 _parentChainableMethodAdvice.nextMethodInterceptor;
39 _parentChainableMethodAdvice.nextMethodInterceptor =
40 _newChainableMethodAdvice;
41 }
42 }
43
44 public void setInjectCondition(boolean injectCondition) {
45 _injectCondition = injectCondition;
46 }
47
48 public void setNewChainableMethodAdvice(
49 ChainableMethodAdvice newChainableMethodAdvice) {
50 _newChainableMethodAdvice = newChainableMethodAdvice;
51 }
52
53 public void setParentChainableMethodAdvice(
54 ChainableMethodAdvice parentChainableMethodAdvice) {
55 _parentChainableMethodAdvice = parentChainableMethodAdvice;
56 }
57
58 private boolean _injectCondition;
59
60 private ChainableMethodAdvice _newChainableMethodAdvice;
61
62 private ChainableMethodAdvice _parentChainableMethodAdvice;
63
64 }