Class CmsHookList

All Implemented Interfaces:
Serializable, Cloneable, Iterable<String>, Collection<String>, Deque<String>, List<String>, Queue<String>
Direct Known Subclasses:
CmsHookListSearchCategory

public abstract class CmsHookList extends LinkedList<String>
A list intended for subclassing that triggers "listlet" operations that may access a on a "peer" object that is provided by a template method to implement in subclasses.

This is intended to react on modifications on List instances performed by CmsWidgetDialogParameter instances linked to them. Using normal list implementations makes it impossible to intervene in those list modification by the widget technology.

"Listlet" operations are operations that are triggered upon modification of this list. They are called "on<methodName(>[e]d(<peerObject>, <argList>)" where <methodName> is the name of the original list operation that took place, "[e]d" stands for the past (operation took place), <peerObject> is the given class to perform reactions on (see constructors) and <argList> are the arguments of the original list method in that order.

Currently only the operations used by CmsWidgetDialog (see implementation of CmsWidgetDialog.actionToggleElement()) are supported and sufficient for this purpose. More general usability enforces extending the pattern shown here.

Since:
6.0.0
See Also:
  • Constructor Details

    • CmsHookList

      public CmsHookList(Object peer)
      Creates an empty list.

      Subclasses should increase "safety by design" by narrowing the type of peer.

      Parameters:
      peer - the object reactions on operations shall be made on in the "listlet" methods of subclasses
    • CmsHookList

      public CmsHookList(Object peer, Collection<String> c)
      Creates a list filled with all elements of the given argument.

      Subclasses should increase "safety by design" by narrowing the type of peer.

      Parameters:
      peer - the object reactions on operations shall be made on in the "listlet" methods of subclasses
      c - a collection with all values for this list
  • Method Details