Class LifeCycleFilter

java.lang.Object
org.nuxeo.ecm.core.api.impl.LifeCycleFilter
All Implemented Interfaces:
Filter

public class LifeCycleFilter extends Object implements Filter
A filter based on the document's life cycle.
Author:
Thomas Roger
  • Constructor Details

    • LifeCycleFilter

      public LifeCycleFilter(List<String> accepted, List<String> excluded)
      Generic constructor.

      To be accepted, the document must have its lifecycle state in the required list and the excluded list must not contain its lifecycle state.

      Parameters:
      accepted - the list of accepted lifecycle states
      excluded - the list of excluded lifecycle states
    • LifeCycleFilter

      public LifeCycleFilter(String lifeCycle, boolean isRequired)
      Convenient constructor to filter on a lifecycle state.
      Parameters:
      lifeCycle - the lifecycle to filter on
      isRequired - if true accepted documents must have this lifecycle state, if false accepted documents must not have this lifecycle state.
  • Method Details

    • accept

      public boolean accept(DocumentModel docModel)
      Description copied from interface: Filter
      Filters data models objects.
      Specified by:
      accept in interface Filter
      Returns:
      true if accepting the object false otherwise