Dashboard Builder Data Provider API 6.2.0.CR2

org.jboss.dashboard.provider
Interface DataProvider


public interface DataProvider

A DataProvider knows how to retrieve data sets from a given source: a database, a CSV file, ...


Method Summary
 boolean delete()
           
 DataSet filterDataSet(DataFilter filter)
          Same as getDataSet by the data set retrieved satisfy the specified filter criteria.
 String getCode()
          The code is an unique identifier that is universal and is not tied to the persistent storage.
 DataLoader getDataLoader()
          The loader used to retrieve data.
 DataProviderType getDataProviderType()
          The type of this data provider.
 DataSet getDataSet()
          Get a dataset.
 String getDescription(Locale l)
          The provider description.
 Map<Locale,String> getDescriptionI18nMap()
          The localized descriptions.
 Long getId()
          The object identifier.
 boolean isCanDelete()
          Check if the provider is deleteable.
 boolean isCanEdit()
          Check if the provider is editable.
 boolean isCanEditProperties()
          Check if the provider properties are editable.
 boolean isPersistent()
           
 boolean isReady()
          Returns if the provider is ready to build its data set.
 DataSet refreshDataSet()
          Get the most up to date data.
 boolean save()
           
 void setCanDelete(boolean canDelete)
           
 void setCanEdit(boolean canEdit)
           
 void setCanEditProperties(boolean canEditProperties)
           
 void setCode(String code)
           
 void setDataLoader(DataLoader dataLoader)
           
 void setDescription(String descr, Locale l)
           
 void setId(Long newId)
           
 

Method Detail

getDataProviderType

DataProviderType getDataProviderType()
The type of this data provider.


getDataLoader

DataLoader getDataLoader()
The loader used to retrieve data.


setDataLoader

void setDataLoader(DataLoader dataLoader)

getId

Long getId()
The object identifier.


setId

void setId(Long newId)

getCode

String getCode()
The code is an unique identifier that is universal and is not tied to the persistent storage.


setCode

void setCode(String code)

getDescription

String getDescription(Locale l)
The provider description.


setDescription

void setDescription(String descr,
                    Locale l)

getDescriptionI18nMap

Map<Locale,String> getDescriptionI18nMap()
The localized descriptions.

Returns:
A map of (Locale instance, localized description).

isCanDelete

boolean isCanDelete()
Check if the provider is deleteable.


setCanDelete

void setCanDelete(boolean canDelete)

isCanEdit

boolean isCanEdit()
Check if the provider is editable.


setCanEdit

void setCanEdit(boolean canEdit)

isCanEditProperties

boolean isCanEditProperties()
Check if the provider properties are editable.


setCanEditProperties

void setCanEditProperties(boolean canEditProperties)

isReady

boolean isReady()
Returns if the provider is ready to build its data set. This implies provider is well configured.


getDataSet

DataSet getDataSet()
                   throws Exception
Get a dataset. Cache of data might be implemented by the provider.
IMPORTANT NOTE: this method is called several times by the UI components.

Throws:
Exception

refreshDataSet

DataSet refreshDataSet()
                       throws Exception
Get the most up to date data.
IMPORTANT NOTE: Avoid the usage of caches.

Throws:
Exception

filterDataSet

DataSet filterDataSet(DataFilter filter)
                      throws Exception
Same as getDataSet by the data set retrieved satisfy the specified filter criteria.

Throws:
Exception

save

boolean save()
             throws Exception
Throws:
Exception

delete

boolean delete()
               throws Exception
Throws:
Exception

isPersistent

boolean isPersistent()
                     throws Exception
Throws:
Exception

Dashboard Builder Data Provider API 6.2.0.CR2

Copyright © 2012-2014 JBoss by Red Hat. All Rights Reserved.