com.sapportals.wcm.repository
Class Selector
java.lang.Object
com.sapportals.wcm.repository.Selector
public final class Selector
- extends Object
Copyright SAP AG 2004
- Since:
- EP5, SP6, Patch1, Hotfix1; EP6, SP2_CP
Selector allows to specify hierarchical queries to define which set of
resources should be retrieved from the repository framework. A selector
might hold a list of other selector instances as well as
PropertySelectorItem instances. Its type constants define
how selection instances are combined.
|
Constructor Summary |
Selector()
standard constructor - will create a new class instance with selectortype
SELECTOR_AND. |
Selector(com.sapportals.wcm.repository.Selector.Type type)
creates a new class instance with the specified selectortype. |
SELECTOR_TYPE_AND
public static final int SELECTOR_TYPE_AND
- See Also:
- Constant Field Values
SELECTOR_TYPE_OR
public static final int SELECTOR_TYPE_OR
- See Also:
- Constant Field Values
SELECTOR_AND
public static final com.sapportals.wcm.repository.Selector.Type SELECTOR_AND
SELECTOR_OR
public static final com.sapportals.wcm.repository.Selector.Type SELECTOR_OR
Selector
public Selector(com.sapportals.wcm.repository.Selector.Type type)
- creates a new class instance with the specified selectortype.
- Parameters:
type. - If the type is null, the default
selectortype SELECTOR_AND will be used
Selector
public Selector()
- standard constructor - will create a new class instance with selectortype
SELECTOR_AND.
addSelector
public void addSelector(boolean include,
IProperty property)
- creates a new
PropertySelectorItem using the specified parameters
- Parameters:
include - the include mode for the PropertySelectorItemproperty - the property for the PropertySelectorItem
- must not be null
addSelector
public void addSelector(PropertySelectorItem selector)
- Parameters:
selector - is added to the list of selectors - must not be null
addSelector
public void addSelector(Selector selector)
- Parameters:
selector - is added to the list of selectors - must not be null
getSelectorType
public com.sapportals.wcm.repository.Selector.Type getSelectorType()
isEmpty
public boolean isEmpty()
- Returns:
- flag, stating, if any
Selector or PropertySelectorItem
has been added to this class. If not, the method will return true.
getPropertyNameList
public PropertyNameList getPropertyNameList()
- Returns:
- a list containing all the names of the properties that are used within
the
PropertySelectorItem instances that have been added to this instance.
Also the Property names of PropertySelectorItem instances that are included
in the Selector instances added to this instance are added. The current
implmentation does not check for duplicates within the list.
Might return an empty list, but never null
toString
public String toString()
- Overrides:
toString in class Object
check
public boolean check(IPropertyMap properties)
throws ResourceException
- checks, if the provided map of properties will pass all
PropertySelectorItem
instances defined within this class. Depending on the combination of these instances and
other Selector instances within this class, not all tests will be executed
to calculate the result of this method. If, for example, already the first test fails and
the Selector.Type of this class is set to SELECTOR_AND, the
method will return false without evaluating further properties
- Parameters:
properties - the properties to check, must not be null, but might be empty
- Returns:
- flag, stating if the properties passed this check or not
- Throws:
ResourceException
This class can be accessed from:
|
SC
|
DC
|
Public Part
|
ACH
|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2012 SAP AG Complete Copyright Notice