Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.api.impl
Class LifeCycleFilter

java.lang.Object
  extended by org.nuxeo.ecm.core.api.impl.LifeCycleFilter
All Implemented Interfaces:
java.io.Serializable, Filter

public class LifeCycleFilter
extends java.lang.Object
implements Filter

A filter based on the document's life cycle.

Author:
Thomas Roger
See Also:
Serialized Form

Constructor Summary
LifeCycleFilter(java.util.List<java.lang.String> accepted, java.util.List<java.lang.String> excluded)
          Generic constructor.
LifeCycleFilter(java.lang.String lifeCycle, boolean isRequired)
          Convenient constructor to filter on a lifecycle state.
 
Method Summary
 boolean accept(DocumentModel docModel)
          Filters data models objects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifeCycleFilter

public LifeCycleFilter(java.util.List<java.lang.String> accepted,
                       java.util.List<java.lang.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(java.lang.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 Detail

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

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.