Class SitePolicyAspect
java.lang.Object
org.craftercms.studio.api.v2.annotation.policy.SitePolicyAspect
Interceptor that validates content actions before executing the actual changes.
In order to intercept a method it needs to:
- Have a
ValidateActionannotation - Have one
Stringparameter with aSiteIdannotation - Have one
Stringparameter with aActionTargetPathannotation
- Since:
- 4.0.0
- Author:
- joseross
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSitePolicyAspect(PolicyService policyService, ContentServiceInternal contentServiceInternal) -
Method Summary
Modifier and TypeMethodDescriptionprotected Annotation[][]getAnnotations(org.aspectj.lang.ProceedingJoinPoint pjp) protected StringgetFullPath(String path, String filename) protected booleanhasAnnotation(Annotation[] annotations, Class<? extends Annotation> annotation) validateAction(org.aspectj.lang.ProceedingJoinPoint pjp, ValidateAction actionParams)
-
Field Details
-
policyService
-
contentServiceInternal
-
-
Constructor Details
-
SitePolicyAspect
@ConstructorProperties({"policyService","contentServiceInternal"}) public SitePolicyAspect(PolicyService policyService, ContentServiceInternal contentServiceInternal)
-
-
Method Details
-
validateAction
public Object validateAction(org.aspectj.lang.ProceedingJoinPoint pjp, ValidateAction actionParams) throws Throwable - Throws:
Throwable
-
getAnnotations
protected Annotation[][] getAnnotations(org.aspectj.lang.ProceedingJoinPoint pjp) throws NoSuchMethodException - Throws:
NoSuchMethodException
-
hasAnnotation
-
getFullPath
-