1
22
23 package com.liferay.portal.mirage.aop;
24
25 import com.liferay.portal.kernel.annotation.BeanReference;
26
27 import com.sun.portal.cms.mirage.service.custom.BinaryContentService;
28 import com.sun.portal.cms.mirage.service.custom.ContentFeedService;
29 import com.sun.portal.cms.mirage.service.custom.ContentService;
30 import com.sun.portal.cms.mirage.service.custom.ContentTypeService;
31 import com.sun.portal.cms.mirage.service.custom.WorkflowService;
32
33 import org.aspectj.lang.ProceedingJoinPoint;
34
35
41 public abstract class BaseMirageAdvice {
42
43 public Object invoke(ProceedingJoinPoint proceedingJoinPoint)
44 throws Throwable {
45
46 try {
47 return doInvoke(proceedingJoinPoint);
48 }
49 catch (Throwable t) {
50 Throwable cause = t.getCause();
51
52 if (cause != null) {
53 throw cause;
54 }
55 else {
56 throw t;
57 }
58 }
59 }
60
61 protected abstract Object doInvoke(ProceedingJoinPoint proceedingJoinPoint)
62 throws Throwable;
63
64 @BeanReference(name = "com.liferay.portal.mirage.ArticleImageService")
65 protected BinaryContentService articleImageService;
66
67 @BeanReference(name = "com.liferay.portal.mirage.ArticleResourceService")
68 protected BinaryContentService articleResourceService;
69
70 @BeanReference(name = "com.liferay.portal.mirage.ContentFeedService")
71 protected ContentFeedService contentFeedService;
72
73 @BeanReference(name = "com.liferay.portal.mirage.ContentSearchService")
74 protected BinaryContentService contentSearchService;
75
76 @BeanReference(name = "com.liferay.portal.mirage.ContentService")
77 protected ContentService contentService;
78
79 @BeanReference(name = "com.liferay.portal.mirage.ContentTypeService")
80 protected ContentTypeService contentTypeService;
81
82 @BeanReference(name = "com.liferay.portal.mirage.WorkflowService")
83 protected WorkflowService workflowService;
84
85 }