it.eng.spagobi.tools.distributionlist.dao
Interface IDistributionListDAO

All Superinterfaces:
ISpagoBIDao
All Known Implementing Classes:
DistributionListDaoImpl

public interface IDistributionListDAO
extends ISpagoBIDao

Defines the interfaces for all methods needed to insert, modify and delete a Distribution List


Method Summary
 void eraseAllRelatedDistributionListObjects(java.lang.String triggername)
          Implements the query to erase all distribution list objects with the related triggername.
 void eraseDistributionList(DistributionList aDistributionList)
          Implements the query to erase a distribution list.
 void eraseDistributionListObjects(DistributionList dl, int biobId, java.lang.String triggername)
          Implements the query to erase distribution list objects.
 java.util.List getXmlRelated(DistributionList dl, int objId)
          Returns a list of the Xmls related to the specified Distribution List and the specified Document.
 boolean hasBIObjAssociated(java.lang.String dsId)
          Tells if a distribution list is associated to any BI Object.
 void insertDistributionList(DistributionList aDistributionList)
          Implements the query to insert a distribution list.
 void insertDLforDocument(DistributionList dl, int objId, java.lang.String xml)
          Inserts the document with id objId in the list of documents for the DIstributionList dl with the xml of its schedulation.
 boolean isDocScheduleAlreadyLinkedToDL(DistributionList dl, int objId, java.lang.String xml)
          Verifies if the document with id objId is already in the list of documents for the DIstributionList dl with the xml of its schedulation.
 boolean isDocScheduledInOtherTime(DistributionList dl, int objId, java.lang.String xml)
          Verifies if the document with id objId is already in the list of documents for the DIstributionList dl with another xml of schedulation.
 java.util.List loadAllDistributionLists()
          Loads all distribution lists.
 DistributionList loadDistributionListById(java.lang.Integer Id)
          Loads all detail information for a distribution list identified by its id.
 DistributionList loadDistributionListByName(java.lang.String name)
          Loads all detail information for a distribution list identified by its name.
 void modifyDistributionList(DistributionList aDistributionList)
          Implements the query to modify a distributionlist.
 void subscribeToDistributionList(DistributionList aDistributionList, Email user)
          Subscribes user to the distribution list.
 void unsubscribeFromDistributionList(DistributionList aDistributionList, java.lang.String user)
          Unubscribes user from the distribution list.
 
Methods inherited from interface it.eng.spagobi.commons.dao.ISpagoBIDao
getUserProfile, setTenant, setUserID, setUserProfile
 

Method Detail

loadDistributionListById

DistributionList loadDistributionListById(java.lang.Integer Id)
                                          throws it.eng.spago.error.EMFUserError
Loads all detail information for a distribution list identified by its id. All these informations, achived by a query to the DB, are stored into a distributionlist object, which is returned.

Parameters:
Id - The id for the distributionlist to load
Returns:
A distributionlist object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadDistributionListByName

DistributionList loadDistributionListByName(java.lang.String name)
                                            throws it.eng.spago.error.EMFUserError
Loads all detail information for a distribution list identified by its name. All these informations, achived by a query to the DB, are stored into a distributionlist object, which is returned.

Parameters:
name - The name for the distributionlist to load
Returns:
A distributionlist object containing all loaded informations
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAllDistributionLists

java.util.List loadAllDistributionLists()
                                        throws it.eng.spago.error.EMFUserError
Loads all distribution lists. All these informations, achived by a query to the DB, are stored into a List object, which is returned.

Returns:
A List object containing all distribution Lists
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

modifyDistributionList

void modifyDistributionList(DistributionList aDistributionList)
                            throws it.eng.spago.error.EMFUserError
Implements the query to modify a distributionlist. All information needed is stored into the input distributionlist object.

Parameters:
aDistributionList - The object containing all modified informations
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

insertDistributionList

void insertDistributionList(DistributionList aDistributionList)
                            throws it.eng.spago.error.EMFUserError
Implements the query to insert a distribution list. All information needed is stored into the input distributionlist object.

Parameters:
aDistributionList - The object containing all insert information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

eraseDistributionList

void eraseDistributionList(DistributionList aDistributionList)
                           throws it.eng.spago.error.EMFUserError
Implements the query to erase a distribution list. All information needed is stored into the input distributionlist object.

Parameters:
aDistributionList - The object containing all informations to be deleted
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

eraseDistributionListObjects

void eraseDistributionListObjects(DistributionList dl,
                                  int biobId,
                                  java.lang.String triggername)
                                  throws it.eng.spago.error.EMFUserError
Implements the query to erase distribution list objects.

Parameters:
biobId - The id of the document
triggername - The triggername regarding the schedulation of the document
dl - the dl
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

eraseAllRelatedDistributionListObjects

void eraseAllRelatedDistributionListObjects(java.lang.String triggername)
                                            throws it.eng.spago.error.EMFUserError
Implements the query to erase all distribution list objects with the related triggername.

Parameters:
triggername - The triggername regarding the schedulation of the document
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

hasBIObjAssociated

boolean hasBIObjAssociated(java.lang.String dsId)
                           throws it.eng.spago.error.EMFUserError
Tells if a distribution list is associated to any BI Object. It is useful because the user needs to know if he's deleting an empty distribution list or not

Parameters:
dsId - The distribution list identifier
Returns:
True if the distribution list is used by one or more objects, else false
Throws:
it.eng.spago.error.EMFUserError - If any exception occurred

subscribeToDistributionList

void subscribeToDistributionList(DistributionList aDistributionList,
                                 Email user)
                                 throws it.eng.spago.error.EMFUserError
Subscribes user to the distribution list.

Parameters:
user - The user to be subscribed
aDistributionList - the a distribution list
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

unsubscribeFromDistributionList

void unsubscribeFromDistributionList(DistributionList aDistributionList,
                                     java.lang.String user)
                                     throws it.eng.spago.error.EMFUserError
Unubscribes user from the distribution list.

Parameters:
user - The user to be unsubscribed
aDistributionList - the a distribution list
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

insertDLforDocument

void insertDLforDocument(DistributionList dl,
                         int objId,
                         java.lang.String xml)
                         throws it.eng.spago.error.EMFUserError
Inserts the document with id objId in the list of documents for the DIstributionList dl with the xml of its schedulation.

Parameters:
objId - The id of the document
xml - The xml regarding the schedulation of the document
dl - the dl
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

isDocScheduleAlreadyLinkedToDL

boolean isDocScheduleAlreadyLinkedToDL(DistributionList dl,
                                       int objId,
                                       java.lang.String xml)
                                       throws it.eng.spago.error.EMFUserError
Verifies if the document with id objId is already in the list of documents for the DIstributionList dl with the xml of its schedulation.

Parameters:
objId - The id of the document
xml - The xml regarding the schedulation of the document
dl - the dl
Returns:
True if already exists, else false
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

isDocScheduledInOtherTime

boolean isDocScheduledInOtherTime(DistributionList dl,
                                  int objId,
                                  java.lang.String xml)
                                  throws it.eng.spago.error.EMFUserError
Verifies if the document with id objId is already in the list of documents for the DIstributionList dl with another xml of schedulation.

Parameters:
objId - The id of the document
xml - The xml regarding the schedulation of the document
dl - the dl
Returns:
True if already exists, else false
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

getXmlRelated

java.util.List getXmlRelated(DistributionList dl,
                             int objId)
                             throws it.eng.spago.error.EMFUserError
Returns a list of the Xmls related to the specified Distribution List and the specified Document.

Parameters:
objId - The id of the document
dl - the dl
Returns:
List of Xml related to the DL and the doc with id objId
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred