public class BoxMetadataFilter extends Object
BoxMetadataFilter is used to help organize the request for when making metadata filter request in conjuction with search. The translation will look something like this: [{"templateKey":"marketingCollateral", "scope":"enterprise", "filters":{"documentType": "datasheet"}}]
Constructor and Description |
---|
BoxMetadataFilter()
Constructor for BoxMetadataFilter that initizlizes the JSON Object.
|
Modifier and Type | Method and Description |
---|---|
void |
addDateRangeFilter(String key,
DateRange dateRange)
Set a filter to the filterList, example: key=documentNumber, gt : "", lt : "".
|
void |
addFilter(String key,
String value)
Set a filter to the filterList, example: key=documentType, value=special.
|
void |
addNumberRangeFilter(String key,
SizeRange sizeRange)
Set a NumberRanger filter to the filter numbers, example: key=documentNumber, lt : 20, gt : 5.
|
JsonObject |
getFiltersList()
return this.a list of the current filters that are being set.
|
String |
getScope()
return this.the current scope being used.
|
String |
getTemplateKey()
Returns the template key that currently set.
|
void |
setScope(String scope)
Set the scope for the key, currently only "enterprise" and "global" are allowed.
|
void |
setTemplateKey(String templateKey)
Set the current template key for the search filter.
|
public BoxMetadataFilter()
public String getTemplateKey()
public void setTemplateKey(String templateKey)
templateKey
- must be a metadata template key.public JsonObject getFiltersList()
public void addFilter(String key, String value)
key
- the key that the filter should be looking for.value
- the specific value that corresponds to the key.public void addNumberRangeFilter(String key, SizeRange sizeRange)
key
- the key that the filter should be looking for.sizeRange
- the specific value that corresponds to the key.public void addDateRangeFilter(String key, DateRange dateRange)
key
- the key that the filter should be looking for.dateRange
- the date range that is start and end datespublic String getScope()