Class RelatedItemColumnActionFactory

All Implemented Interfaces:
DynamicActionAttributes, ActionFactory<ListColumnAction<Annotatable,​Object>>

public class RelatedItemColumnActionFactory
extends AbstractJspActionFactory<ListColumnAction<Annotatable,​Object>>
Action factory for adding columns to a table that pull data from a parent or child item from an arbitrary location up or down the chain of linked items. The factory will scan the "columns" setting from the current context for entries matching the pattern: /ITEMTYPE/Subtype/property-or-annotation It will use the item list API to find a parent item that matches the ITEMTYPE and Subtype and the retrieve the property using a Metadata.PropertyPath or an annotation.
3.16, 3.17
  • Constructor Details

    • RelatedItemColumnActionFactory

      public RelatedItemColumnActionFactory()
  • Method Details

    • prepareContext

      public boolean prepareContext​(InvokationContext<? super ListColumnAction<Annotatable,​Object>> context)
      We get the "columns" setting from the current ItemContext and check if there seems to be an entry for a related item.
      Specified by:
      prepareContext in interface ActionFactory<ListColumnAction<Annotatable,​Object>>
      prepareContext in class AbstractJspActionFactory<ListColumnAction<Annotatable,​Object>>
      context - The current invokation context
      Always TRUE
    • getActions

      public ListColumnAction<Annotatable,​Object>[] getActions​(InvokationContext<? super ListColumnAction<Annotatable,​Object>> context)
      Description copied from interface: ActionFactory
      This method may be called one or several times for each request. This is decided by the extension point. If, for example, the extension point is a pure single-item extension point then this method is probably only called once. If the extension point is a per-item extension point in a list context, then this method may be called once for every item in the list. The context parameter contains all information about the context of the extension point, including the current item, if any.
      context - The current invokation context
      An array of actions that should be added to the extension point. Returns null or an empty array if there are no actions in the current context.