public class UgcFilter
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
UgcFilter.Comparison
Deprecated.
Use
ComparisonType instead. |
class |
UgcFilter.PropertyFilter
Deprecated.
Use
addConstraint instead of creating PropertyFilters. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_CONTENT_TYPE
The default content type.
|
| Constructor and Description |
|---|
UgcFilter()
Creates a new UgcFilter with the default content type.
|
UgcFilter(java.lang.String contentType)
Creates a new UgcFilter with the given content type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ConstraintVisitor constraintVisitor)
Accept the constraint visitor.
|
void |
addConstraint(Constraint constraint)
Adds a constraint to this UgcFilter.
|
void |
addSort(UgcSort sort)
Add a UgcSort to the list.
|
void |
and(Constraint constraint)
A Convenience method which will set the operator of the given constraint to AND and add it to this UgcFilter.
|
static java.lang.String |
escape(java.lang.String str)
Escape any special characters in the specified string by a preceding \.
|
void |
filterAndByConstraintGroup(java.lang.String constraintGroupName,
java.lang.String propertyName,
java.lang.String propertyValue,
UgcFilter.Comparison comparison)
Deprecated.
Use
and with a ValueConstraint instead. |
void |
filterAndByProperty(java.lang.String propertyName,
java.lang.String propertyValue,
UgcFilter.Comparison comparison)
Deprecated.
Use
and with a ValueConstraint instead. |
void |
filterByPath(java.lang.String parentPath)
Deprecated.
Use
addConstraint with PathConstraint
instead. |
void |
filterContentType(java.lang.String ct)
Deprecated.
Use
addConstraint with PathConstraint
instead. Set the content type to filter. |
void |
filterOrByConstraintGroup(java.lang.String constraintGroupName,
java.lang.String propertyName,
java.lang.String propertyValue,
UgcFilter.Comparison comparison)
Deprecated.
Use
or with a ValueConstraint instead. |
void |
filterOrByProperty(java.lang.String propertyName,
java.lang.String propertyValue,
UgcFilter.Comparison comparison)
Deprecated.
Use
or with a ValueConstraint instead. |
java.util.Map<java.lang.String,java.util.List<UgcFilter.PropertyFilter>> |
getAndPropertyFilters()
Deprecated.
Use
getConstraints instead. |
java.util.Collection<Constraint> |
getConstraints()
Gets all constraints which have been added to this UgcFilter.
|
java.lang.String |
getContentFilter()
Deprecated.
Use
getContentType instead. |
java.lang.String |
getContentType()
Returns the content type for this UgcFilter.
|
java.util.Map<java.lang.String,java.util.List<UgcFilter.PropertyFilter>> |
getOrPropertyFilters()
Deprecated.
Use
getConstraints instead. |
java.lang.String[] |
getPathFilters()
Deprecated.
Use
getConstraints() getConstraints} instead. |
UgcSort |
getSort()
Deprecated.
Use the
getSortOrder method. |
java.util.List<UgcSort> |
getSortOrder()
Gets the sort order of this UgcFilter.
|
java.util.Map<java.lang.String,java.lang.Object> |
getVariables()
Return the variable map.
|
boolean |
hasConstraints()
Gets whether or not the UgcFilter has constraints.
|
boolean |
hasPropertyFilters()
Deprecated.
Use
hasConstraints instead. |
boolean |
hasVariables()
Gets whether or not variables have been added to this UgcFilter.
|
boolean |
isContentTypeFiltered()
Deprecated.
Use
getConstraints() getConstraints} instead. |
boolean |
isPathFiltered()
Deprecated.
use
hasConstraints instead. |
boolean |
isSorted()
Gets whether or not this UgcFilter is sorted.
|
void |
or(Constraint constraint)
A Convenience method which will set the operator of the given constraint to OR and add it to this UgcFilter.
|
void |
setContentType(java.lang.String contentType)
Set the node type to be matched.
|
<T> void |
setVariableValue(java.lang.String variableName,
T variable)
Set a variable.
|
void |
sortByAscending(java.lang.String propertyName)
Deprecated.
Use the
addSort method. |
void |
sortByDescending(java.lang.String propertyName)
Deprecated.
Use the
addSort method. |
public static final java.lang.String DEFAULT_CONTENT_TYPE
public UgcFilter()
public UgcFilter(java.lang.String contentType)
contentType - String containing the given content type.public void addConstraint(Constraint constraint)
constraint - Constraint to add.public void and(Constraint constraint)
constraint - Constraint to add.public void or(Constraint constraint)
constraint - Constraint to add.public boolean hasConstraints()
public java.util.Collection<Constraint> getConstraints()
public void addSort(UgcSort sort)
sort - the UgcSort to add.public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType - the content type to usepublic static java.lang.String escape(java.lang.String str)
str - the input stringpublic boolean isSorted()
public java.util.List<UgcSort> getSortOrder()
public boolean hasVariables()
public <T> void setVariableValue(java.lang.String variableName,
T variable)
T - the type of variable.variableName - the name of the variable.variable - the value of the variable.public java.util.Map<java.lang.String,java.lang.Object> getVariables()
public void accept(ConstraintVisitor constraintVisitor)
constraintVisitor - the ConstraintVisitor.@Deprecated public UgcSort getSort()
getSortOrder method.@Deprecated public void sortByAscending(java.lang.String propertyName)
addSort method.addSort should be used instead.propertyName - Name of the property to sort.@Deprecated public void sortByDescending(java.lang.String propertyName)
addSort method.addSort should be used instead.propertyName - Name of the property to sort.@Deprecated
public void filterOrByProperty(java.lang.String propertyName,
java.lang.String propertyValue,
UgcFilter.Comparison comparison)
or with a ValueConstraint instead.propertyName - the name of the property.propertyValue - the property value.comparison - the type of comparison.@Deprecated
public void filterOrByConstraintGroup(java.lang.String constraintGroupName,
java.lang.String propertyName,
java.lang.String propertyValue,
UgcFilter.Comparison comparison)
or with a ValueConstraint instead.constraintGroupName - the name of the constraint group.propertyName - the name of the property.propertyValue - the property value.comparison - the type of comparison.@Deprecated
public void filterAndByProperty(java.lang.String propertyName,
java.lang.String propertyValue,
UgcFilter.Comparison comparison)
and with a ValueConstraint instead.propertyName - the name of the property.propertyValue - the property value.comparison - the type of comparison.@Deprecated
public void filterAndByConstraintGroup(java.lang.String constraintGroupName,
java.lang.String propertyName,
java.lang.String propertyValue,
UgcFilter.Comparison comparison)
and with a ValueConstraint instead.constraintGroupName - the name of the constraint group.propertyName - the name of the property.propertyValue - the property value.comparison - the type of comparison.@Deprecated public boolean hasPropertyFilters()
hasConstraints instead.@Deprecated public java.util.Map<java.lang.String,java.util.List<UgcFilter.PropertyFilter>> getOrPropertyFilters()
getConstraints instead.@Deprecated public java.util.Map<java.lang.String,java.util.List<UgcFilter.PropertyFilter>> getAndPropertyFilters()
getConstraints instead.@Deprecated public void filterContentType(java.lang.String ct)
addConstraint with PathConstraint
instead. Set the content type to filter.ct - the content type to filter.@Deprecated public boolean isContentTypeFiltered()
getConstraints() getConstraints} instead.@Deprecated public java.lang.String getContentFilter()
getContentType instead.@Deprecated public void filterByPath(java.lang.String parentPath)
addConstraint with PathConstraint
instead.parentPath - the path of the parent to filter.@Deprecated public boolean isPathFiltered()
hasConstraints instead.@Deprecated public java.lang.String[] getPathFilters()
getConstraints() getConstraints} instead."Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"