com.belladati.sdk.view.ViewLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-api Show documentation
Show all versions of sdk-api Show documentation
The BellaDati SDK allows accessing a BellaDati server from 3rd-party applications using Java. This project contains the SDK's interface definitions.
package com.belladati.sdk.view;
import java.util.Collection;
import com.belladati.sdk.filter.Filter;
import com.belladati.sdk.intervals.DateUnit;
import com.belladati.sdk.intervals.Interval;
import com.belladati.sdk.intervals.TimeUnit;
import com.belladati.sdk.util.IdElement;
/**
* A loader object that can hold various parameters to load a view. Use a loader
* to set multiple parameters while loading views, such as date or time
* intervals or filters.
*
* @author Chris Hennigfeld
*/
public interface ViewLoader extends IdElement {
/**
* Returns the ID of the view that will be loaded.
*
* @return the ID of the view that will be loaded
*/
String getId();
/**
* Returns the type of the view that will be loaded.
*
* @return the type of the view that will be loaded
*/
ViewType getType();
/**
* Loads the view's content using the loader's current settings. The type of
* this view determines what content to expect.
*
* @return the view's content
*/
Object loadContent();
/**
* Sets a date interval to use with this loader. Replaces any date intervals
* previously set on this loader.
*
* @param dateInterval the interval to set
* @return this loader
*/
ViewLoader setDateInterval(Interval dateInterval);
/**
* Sets a time interval to use with this loader. Replaces any time intervals
* previously set on this loader.
*
* @param timeInterval the interval to set
* @return this loader
*/
ViewLoader setTimeInterval(Interval timeInterval);
/**
* Adds filters to this loader. The filters are added to any other filters
* already defined on this loader.
*
* @param filters the filters to add
* @return this loader
*/
ViewLoader addFilters(Filter>... filters);
/**
* Adds filters to this loader. The filters are added to any other filters
* already defined on this loader.
*
* @param filters the filters to add
* @return this loader
*/
ViewLoader addFilters(Collection> filters);
}