Package org.alfresco.traitextender


package org.alfresco.traitextender
  • Class
    Description
    Static utility used for aspectJ extension consistency , routing and for maintaining thread-local extension-bypass context stack.
    AspectJ extension routing distinguishes between the following contexts in which an extended method (i.e. a method with an Extend annotation) can be called: Extend context
    when an extended method is called and the extension overrides the method call Local proceed context
    when an extension method needs to execute the original method that it has overridden. Extension bypass context
    when a call to an extended method needs to be completed with the extensions disabled for that call
    The AJExtender can check ExtensionPoint definitions for consistency by compiling extensible classes.
    Implementors are aspectJ extension ignoring closures.
    Java Proxy InvocationHandler to be used in conjuction with asprctJ extended traits.
    Method calls will be delegated to a given Extensible object method having the same signature within an AJExtender.ExtensionBypass context.
    A runtime retained annotation that marks AJ-trait-extended methods of Extensible objects.
    It defines the actual circumstances in which the ExtensionPoint defined using Extend.extensionAPI() and Extend.traitAPI() has its extension invoked.
    Methods marked by this aspect are advised by an extension-routing around advice in RouteExtensions.
    ExtendedTrait<T extends Trait>
    Trait based extension reference holder.
    Keeps track of extension references for one extensible and allows the collection of those extensions when the extensible is collected.
    Trait-extender central extension registry and life cycle handler.
    Implementors must handle: ExtensionBundle life cycle operations that start and stop bundles of extension points implementations at runtime.
    Standard-singleton Extender implementation.
    An Extensible object exposes a set of Traits as ExtendedTraits objects.
    An ExtendedTrait is an association between a Trait exposing object and several extension objects.
    The actual Traits and associated extensions provided by an Extensible object are given by its ExtensionPoint handling strategy and by the current set of registered extensions (see Extender).
    The exposed Traits can be thought of as parts of an object's interface that will be exposed to an extension.
    Implementors are sets of extension implementations that are registered on specific ExtensionPoint for given Extenders.
    Creates extension instances for given Traits and ExtensionPoints.
    ExtensionPoint<E,M extends Trait>
    Defines a two-way interfacing mechanism between a Trait exposing object and an extension of that object.
    The extended object can call methods of the ExtensionPoint.extensionAPI which will be able to interact with the extended object through the ExtensionPoint.traitAPI interface it was paired with in the extension point.
    Trait-extension runtime target-exception wrapper.
    Sub classes are extension API implementors that get instantiated once per extensible-extension point definition.
    Creates extension sub classes that are extension API implementors once per extensible-extension point definition.
    Signals an invalid extension state or extension definition.
    ExtensionBundle that supports simple ExtensionPoint to ExtensionFactory association registration.
    An method override extension routing aspect.
    Overrides calls to methods marked by an Extend annotation with calls to methods having the same signature in extensions registered for the ExtensionPoint referred by the Extend method annotation.
    Overriding methods can call the overridden method using its correspondent Trait representation (i.e. a method having the same signature).
    If no extension is defined the call proceeds with the original method.
    The aspect uses the AJExtender static utility to for extension invocation and for maintaining thread-local extension-bypass contexts as not all calls must be overridden and calls from within the extension must be aware of this context (see AJProxyTrait).
    A singleton extension API implementor.
    Creates singleton extension sub classes that are extension API implementors.
    A SingletonExtension extension-API implementor defined as a spring-bean.
    Handles also spring-bundle extension registrations.
    A SpringBeanExtensions collection that get registered on the Extender's registry on SpringExtensionBundle.afterPropertiesSet().
    Works in conjunction with SpringBeanExtensions and SpringExtensionPoints to define and start spring based ExtensionBundles of SingletonExtensions.
    The spring-context XML sample bellow shows the definition of spring-bundled trait-extensions:
    An ExtensionPoint spring bean wrapper with spring registering life-cycle management.
    Works in conjunction with SpringBeanExtensions and SpringExtensionBundles to define spring based ExtensionBundle s of singleton extensions.
    Markup interface.
    Subinterfaces represent distiguishing features of Extensible objects that are meant to be extended and exposed to the extending code.
    Ideally they would be the only means of interaction between extensions and the extended modules.