Class AbstractPluginAspect<EXTENSIONPOINT>

    • Field Detail

      • beanFactory

        protected final org.springframework.beans.factory.ListableBeanFactory beanFactory
    • Constructor Detail

      • AbstractPluginAspect

        protected AbstractPluginAspect​(org.springframework.beans.factory.ListableBeanFactory beanFactory,
                                       Class<EXTENSIONPOINT> clazz)
    • Method Detail

      • inServiceLayerPC

        public void inServiceLayerPC()
      • proceed

        protected Object proceed​(org.aspectj.lang.ProceedingJoinPoint pjp,
                                 Object[] args)
        Proceed with Error handling.
        Parameters:
        pjp -
        args -
        Returns:
      • proceedWithPluginExtensionPoints

        protected <IN,​OUT> OUT proceedWithPluginExtensionPoints​(org.aspectj.lang.ProceedingJoinPoint pjp,
                                                                      org.apache.commons.lang3.function.TriFunction<EXTENSIONPOINT,​IN,​Function<IN,​OUT>,​OUT> extensionPointMethod,
                                                                      Function<Object[],​IN> argsToInputObj,
                                                                      BiFunction<IN,​Object[],​Object[]> setArgs)
        Proceeds with the invocation by calling the given method on all extension points in ascending order and then the service method (analog to Spring AOP aspects behaviour).
        Type Parameters:
        IN - POJO Type used by extensionPointMethod for argument aggregation
        OUT - return type of extensionPointMethod and the service method invocation represented by pjp
        Parameters:
        pjp -
        extensionPointMethod - Method that is part of Type EXTENSIONPOINT to call
        argsToInputObj - Function to convert from an Object array to the input type IN used by extensionPointMethod
        setArgs - Function to set/modify the Object array used for ProceedingJoinPoint::proceed using an object of type IN
        Returns:
        result of passing the method call through all extension points to the service layer and processing the return value back through all extension points
      • proceedWithPluginExtensionPoints

        protected <IN,​OUT> OUT proceedWithPluginExtensionPoints​(org.aspectj.lang.ProceedingJoinPoint pjp,
                                                                      org.apache.commons.lang3.function.TriFunction<EXTENSIONPOINT,​IN,​Function<IN,​OUT>,​OUT> extensionPointMethod,
                                                                      Function<Object[],​IN> argsToInputObj,
                                                                      BiFunction<IN,​Object[],​Object[]> setArgs,
                                                                      Function<Object,​OUT> afterProceed)
        Proceeds with the invocation by calling the given method on all extension points in ascending order and then the service method (analog to Spring AOP aspects behaviour).
        Type Parameters:
        IN - POJO Type used by extensionPointMethod for argument aggregation
        OUT - return type of extensionPointMethod and in most cases the service method invocation represented by pjp
        Parameters:
        pjp -
        extensionPointMethod - Method that is part of Type EXTENSIONPOINT to call
        argsToInputObj - Function to convert from an Object array to the input type IN used by extensionPointMethod
        setArgs - Function to set/modify the Object array used for ProceedingJoinPoint::proceed using an object of type IN
        afterProceed - function to apply to adapt the return value of the service call to the return type of the extension point method (OUT)
        Returns:
        result of passing the method call through all extension points to the service layer and processing the return value back through all extension points