org.gcube.portlets.user.homelibrary.home.data.application
Interface ApplicationDataArea


public interface ApplicationDataArea

Author:
Federico De Faveri defaveri@isti.cnr.it

Method Summary
<E> ApplicationList<E>
createList(String dataName)
          Create a new list.
<K,V> ApplicationMap<K,V>
createMap(String dataName)
          Create a new map.
 ApplicationData deleteData(String dataName)
          Delete the specified application data.
 boolean existsData(String dataName)
          Check if a specified application data exists.
 String getApplicationName()
          The application name.
 ApplicationData getData(String dataName)
          Return the application data requested.
 List<String> getDataNames()
          The list of data names.
<E> ApplicationList<E>
getList(String dataName)
          If the ApplicationList with the specified name already exists this one is returned, otherwise a new one is created.
<K,V> ApplicationMap<K,V>
getMap(String dataName)
          If an ApplicationMap with the specified name already exists this one is returnes, otherwise a new one is created.
 

Method Detail

getApplicationName

String getApplicationName()
The application name.

Returns:
the name.

getDataNames

List<String> getDataNames()
The list of data names.

Returns:
the data names list.

getData

ApplicationData getData(String dataName)
                        throws ApplicationDataNotFoundException,
                               InternalErrorException
Return the application data requested.

Parameters:
dataName - the application data name.
Returns:
the application data.
Throws:
InternalErrorException - if an error occurs.
ApplicationDataNotFoundException - if the ApplicationData specified don't exist.

existsData

boolean existsData(String dataName)
Check if a specified application data exists.

Parameters:
dataName - the application data name.
Returns:
true if the application data exist, false otherwise.

createList

<E> ApplicationList<E> createList(String dataName)
                              throws InternalErrorException
Create a new list. If an ApplicationList with the specified name already exists the old one is removed.

Type Parameters:
E - the list item type.
Parameters:
dataName - the list name.
Returns:
the new application list.
Throws:
InternalErrorException - if an error occurs.

getList

<E> ApplicationList<E> getList(String dataName)
                           throws InternalErrorException
If the ApplicationList with the specified name already exists this one is returned, otherwise a new one is created.

Type Parameters:
E - the list item type.
Parameters:
dataName - the list name.
Returns:
the application list.
Throws:
InternalErrorException - if an error occurs.

createMap

<K,V> ApplicationMap<K,V> createMap(String dataName)
                              throws InternalErrorException
Create a new map. If an ApplicationMap with the specified name already exists the old one is removed.

Type Parameters:
K - the map key type.
V - the map value type.
Parameters:
dataName - the map name.
Returns:
the new application map.
Throws:
InternalErrorException - if an error occurs.

getMap

<K,V> ApplicationMap<K,V> getMap(String dataName)
                           throws InternalErrorException
If an ApplicationMap with the specified name already exists this one is returnes, otherwise a new one is created.

Type Parameters:
K - the map key type.
V - the map value type.
Parameters:
dataName - the map name.
Returns:
the application map.
Throws:
InternalErrorException - if an error occurs.

deleteData

ApplicationData deleteData(String dataName)
                           throws InternalErrorException
Delete the specified application data.

Parameters:
dataName - the data name.
Returns:
the removed application data.
Throws:
InternalErrorException - if an error occurs.


Copyright © 2013. All Rights Reserved.