fr.paris.lutece.plugins.document.business.portlet
Interface IDocumentListPortletDAO

All Superinterfaces:
fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
All Known Implementing Classes:
DocumentListPortletDAO

public interface IDocumentListPortletDAO
extends fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO

Author:
LEVY

Method Summary
 boolean checkAssignIntoPortlet(int nDocumentId, int nPortletId)
          Tests before insert it, if an article is already assigned in a portlet
 boolean checkPublishingIntoPortlet(int nDocumentId, int nPortletId)
          Tests before insert it, if an document is already published in a portlet
 void delete(int nPortletId)
          Deletes records for a portlet identifier in the tables portlet_articles_list, published_article_portlet, auto_publishing
 void deleteFromPortlet(int nDocumentId, int nPortletId)
          Deletes an document assigned from a portlet
 void getModifyDocumentOrder(int nNewOrder, int nDocumentId, int nPortletId)
          Modify the order of a document
 void insert(fr.paris.lutece.portal.business.portlet.Portlet portlet)
          Insert a new record in the table portlet_articles_list
 void insertIntoPortlet(int nDocumentId, int nPortletId, int nStatus)
          Insert the documents whose identifier is specified in parameter in a portlet for assignes
 fr.paris.lutece.portal.business.portlet.Portlet load(int nPortletId)
          Loads the data of Document List Portlet whose identifier is specified in parameter
 int maxOrderDocumentList(int nPortletId)
          Calculate the new max order
 void publishedIntoPortlet(int nDocumentId, int nPortletId, int nStatus)
          Published the documents whose identifier is specified in parameter in a portlet for publishing : set status to 1
 java.util.Collection selectAssignedDocumentsList(int nPortletId)
          Load the list of documentTypes
 java.util.Collection<Document> selectByPortlet(int nPortletId)
          Returns all the documents of a portlet whose identifier is specified
 DocumentListPortlet selectDocument(int nDocumentId, int nPortletId)
          Load the data of DocumentListPortlet from the table
 java.util.Collection<Document> selectDocumentsByPortlet(int nPortletId)
          Returns all the documents of a portlet whose identifier is specified
 java.util.Collection selectDocumentTypeListByCode(int nDocumentId, java.lang.String strCodeDocumentType)
          Load the list of documentTypes
 int selectIdByOrder(int nDocumentOrder, int nPortletId)
          Returns a document identifier in a distinct order
 java.util.Collection selectPortletsListByDocumentId(java.lang.String strDocumentId)
          Loads the list of the portlets whose type is the same as the one specified in parameter
 java.util.Collection selectPublishedDocumentsList(int nPortletId)
          Loads the list of the documents whose type is the same as the one specified in parameter
 void store(fr.paris.lutece.portal.business.portlet.Portlet portlet)
          Update the record in the table
 void unPublishedIntoPortlet(int nDocumentId, int nPortletId, int nStatus)
          UnPublished the documents whose identifier is specified in parameter in a portlet for publishing : set status to 1 and order to -1
 

Method Detail

checkAssignIntoPortlet

boolean checkAssignIntoPortlet(int nDocumentId,
                               int nPortletId)
Tests before insert it, if an article is already assigned in a portlet

Parameters:
nDocumentId - The identifier of the document
nPortletId - The identifier of the portlet
Returns:
true if the article is already published, false otherwise

checkPublishingIntoPortlet

boolean checkPublishingIntoPortlet(int nDocumentId,
                                   int nPortletId)
Tests before insert it, if an document is already published in a portlet

Parameters:
nDocumentId - The identifier of the document
nPortletId - The identifier of the portlet
Returns:
true if the article is already published, false otherwise

delete

void delete(int nPortletId)
Deletes records for a portlet identifier in the tables portlet_articles_list, published_article_portlet, auto_publishing

Specified by:
delete in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
Parameters:
nPortletId - the portlet identifier

deleteFromPortlet

void deleteFromPortlet(int nDocumentId,
                       int nPortletId)
Deletes an document assigned from a portlet

Parameters:
nDocumentId - the identifier of the document to delete
nPortletId - the identifier of the portlet

getModifyDocumentOrder

void getModifyDocumentOrder(int nNewOrder,
                            int nDocumentId,
                            int nPortletId)
Modify the order of a document

Parameters:
nNewOrder - The order number
nDocumentId - The document identifier
nPortletId - the portlet identifier

insert

void insert(fr.paris.lutece.portal.business.portlet.Portlet portlet)
Insert a new record in the table portlet_articles_list

Specified by:
insert in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
Parameters:
portlet - the instance of the Portlet object to insert

insertIntoPortlet

void insertIntoPortlet(int nDocumentId,
                       int nPortletId,
                       int nStatus)
Insert the documents whose identifier is specified in parameter in a portlet for assignes

Parameters:
nDocumentId - the identifier of the document
nPortletId - the identifier of the portlet

load

fr.paris.lutece.portal.business.portlet.Portlet load(int nPortletId)
Loads the data of Document List Portlet whose identifier is specified in parameter

Specified by:
load in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
Parameters:
nPortletId - The Portlet identifier
Returns:
theDocumentListPortlet object

maxOrderDocumentList

int maxOrderDocumentList(int nPortletId)
Calculate the new max order

Parameters:
nPortletId - the portlet identifer
Returns:
the max order of document

publishedIntoPortlet

void publishedIntoPortlet(int nDocumentId,
                          int nPortletId,
                          int nStatus)
Published the documents whose identifier is specified in parameter in a portlet for publishing : set status to 1

Parameters:
document - the DocumentListPortlet object
nPortletId - the identifier of the portlet
nStatus - the publishing status : 1 for unpublished - 0 for published

selectAssignedDocumentsList

java.util.Collection selectAssignedDocumentsList(int nPortletId)
Load the list of documentTypes

Parameters:
nPortletId - The portlet identifier
Returns:
The Collection of the DocumentTypes

selectByPortlet

java.util.Collection<Document> selectByPortlet(int nPortletId)
Returns all the documents of a portlet whose identifier is specified

Parameters:
nPortletId - the identifier of the portlet
Returns:
the document list in form of a Collection object

selectDocumentsByPortlet

java.util.Collection<Document> selectDocumentsByPortlet(int nPortletId)
Returns all the documents of a portlet whose identifier is specified

Parameters:
nPortletId - the identifier of the portlet
Returns:
the document list in form of a Collection object

selectDocument

DocumentListPortlet selectDocument(int nDocumentId,
                                   int nPortletId)
Load the data of DocumentListPortlet from the table

Parameters:
nDocumentId - The identifier of DocumentListPortlet
nPortletId - the identifier of portlet
Returns:
the instance of the DocumentListPortlet

selectDocumentTypeListByCode

java.util.Collection selectDocumentTypeListByCode(int nDocumentId,
                                                  java.lang.String strCodeDocumentType)
Load the list of documentTypes

Parameters:
strCodeDocumentType - The code
Returns:
The Collection of the DocumentTypes

selectIdByOrder

int selectIdByOrder(int nDocumentOrder,
                    int nPortletId)
Returns a document identifier in a distinct order

Parameters:
nDocumentOrder - The order number
nPortletId - the portlet identifier
Returns:
The order of the Document

selectPortletsListByDocumentId

java.util.Collection selectPortletsListByDocumentId(java.lang.String strDocumentId)
Loads the list of the portlets whose type is the same as the one specified in parameter

Parameters:
strDocumentId - the document identifier
Returns:
the list of the portlets in form of a List

selectPublishedDocumentsList

java.util.Collection selectPublishedDocumentsList(int nPortletId)
Loads the list of the documents whose type is the same as the one specified in parameter

Parameters:
nPortletId - the portlet identifier
Returns:
the list of the documents in form of a List

store

void store(fr.paris.lutece.portal.business.portlet.Portlet portlet)
Update the record in the table

Specified by:
store in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
Parameters:
portlet - A portlet

unPublishedIntoPortlet

void unPublishedIntoPortlet(int nDocumentId,
                            int nPortletId,
                            int nStatus)
UnPublished the documents whose identifier is specified in parameter in a portlet for publishing : set status to 1 and order to -1

Parameters:
document - the DocumentListPortlet object
nPortletId - the identifier of the portlet
nStatus - the publishing status : 1 for unpublished - 0 for published


Copyright © 2007 Mairie de Paris. All Rights Reserved.