Class SitePolicyAspect
- java.lang.Object
-
- org.craftercms.studio.api.v2.annotation.policy.SitePolicyAspect
-
public class SitePolicyAspect extends Object
Interceptor that validates content actions before executing the actual changes.In order to intercept a method it needs to:
- Have a
ValidateAction
annotation - Have one
String
parameter with aSiteId
annotation - Have one
String
parameter with aActionTargetPath
annotation
- Since:
- 4.0.0
- Author:
- joseross
- Have a
-
-
Field Summary
Fields Modifier and Type Field Description protected PolicyService
policyService
-
Constructor Summary
Constructors Constructor Description SitePolicyAspect(PolicyService policyService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Annotation[][]
getAnnotations(org.aspectj.lang.ProceedingJoinPoint pjp)
protected String
getFullPath(String path, String filename)
protected boolean
hasAnnotation(Annotation[] annotations, Class<? extends Annotation> annotation)
Object
validateAction(org.aspectj.lang.ProceedingJoinPoint pjp, ValidateAction actionParams)
-
-
-
Field Detail
-
policyService
protected PolicyService policyService
-
-
Constructor Detail
-
SitePolicyAspect
@ConstructorProperties("policyService") public SitePolicyAspect(PolicyService policyService)
-
-
Method Detail
-
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
protected boolean hasAnnotation(Annotation[] annotations, Class<? extends Annotation> annotation)
-
-