fr.paris.lutece.plugins.document.business.portlet
Class DocumentListPortletHome

java.lang.Object
  extended by fr.paris.lutece.portal.business.portlet.PortletHome
      extended by fr.paris.lutece.plugins.document.business.portlet.DocumentListPortletHome
All Implemented Interfaces:
fr.paris.lutece.portal.business.portlet.PortletHomeInterface

public class DocumentListPortletHome
extends fr.paris.lutece.portal.business.portlet.PortletHome

This class provides instances management methods for ArticlesListPortlet objects


Constructor Summary
DocumentListPortletHome()
           
 
Method Summary
static boolean checkAssignIntoPortlet(int nDocumentId, int nPortletId)
          Checks if the document is not yet assigned into the portlet
static boolean checkPublishingIntoPortlet(int nDocumentId, int nPortletId)
          Checks if the document is not yet published into the portlet
static void deleteFromPortlet(int nDocumentId, int nPortletId)
          Delete the relationship between an document and a portlet
static java.util.Collection findByCodeDocumentType(int nDocumentId, java.lang.String strCodeDocumentType)
          Returns a collection of documentTypes objects
static java.util.Collection<Document> findByPortlet(int nPortletId)
          Returns a Collection of Documents objects from a portlet identifier
static java.util.Collection<Document> findDocumentsByPortlet(int nPortletId)
          Returns a Collection of Documents objects from a portlet identifier
static java.util.Collection getAssignedDocumentsList(int nPortletId)
          Loads the list of the docuemnts whose type is the same as the one specified in parameter
 fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO getDAO()
          Returns the instance of the portlet DAO singleton
static DocumentListPortlet getDocument(int nDocumentId, int nPortletId)
          Returns an instance of a documentListPortlet whose identifier is specified in parameter
static int getIdByOrder(int nDocumentOrder, int nPortletId)
          Search the order number of documents
static fr.paris.lutece.portal.business.portlet.PortletHome getInstance()
          Returns the instance of DocumentPortletHome
static int getMaxOrderDocument(int nPortletId)
          Search the max order number of documents
static void getModifyDocumentOrder(int nNewOrder, int nDocumentId, int nPortletId)
          Update the number order of documents
static java.util.Collection getPortletsListbyDocumentId(java.lang.String strDocumentId)
          Loads the list of the portlets whose type is the same as the one specified in parameter
 java.lang.String getPortletTypeId()
          Returns the identifier of the portlet type
static java.util.Collection getPublishedDocumentsList(int nPortletId)
          Loads the list of the docuemnts whose type is the same as the one specified in parameter
static void insertIntoPortlet(int nDocumentId, int nPortletId, int nStatus)
          Insert the relationship between an document and a portlet for publishing
static void publishingDocument(int nDocumentId, int nPortletId, int nStatus)
          Publishing documents assigned to a portlet
static void unPublishingDocument(int nDocumentId, int nPortletId, int nStatus)
          UnPublishing documents assigned to a portlet
 
Methods inherited from class fr.paris.lutece.portal.business.portlet.PortletHome
create, findByPrimaryKey, findByType, getPortletListByStyle, getPortletsListbyName, getPortletType, getStylesList, hasAlias, invalidate, invalidate, remove, update, updateStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentListPortletHome

public DocumentListPortletHome()
Method Detail

getInstance

public static fr.paris.lutece.portal.business.portlet.PortletHome getInstance()
Returns the instance of DocumentPortletHome

Returns:
the DocumentPortletHome instance

getPortletTypeId

public java.lang.String getPortletTypeId()
Returns the identifier of the portlet type

Returns:
the portlet type identifier

getDAO

public fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO getDAO()
Returns the instance of the portlet DAO singleton

Returns:
the instance of the DAO singleton

getDocument

public static DocumentListPortlet getDocument(int nDocumentId,
                                              int nPortletId)
Returns an instance of a documentListPortlet whose identifier is specified in parameter

Parameters:
nDocumentId - The documenr identifier
nPortletId - the portlet identifier
Returns:
An instance of document

findByCodeDocumentType

public static java.util.Collection findByCodeDocumentType(int nDocumentId,
                                                          java.lang.String strCodeDocumentType)
Returns a collection of documentTypes objects

Parameters:
strCodeDocumentType - the code
Returns:
A collection of documentTypes

getPortletsListbyDocumentId

public static java.util.Collection getPortletsListbyDocumentId(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 ReferenceList

checkPublishingIntoPortlet

public static boolean checkPublishingIntoPortlet(int nDocumentId,
                                                 int nPortletId)
Checks if the document is not yet published into the portlet

Parameters:
nDocumentId - the article identifier
nPortletId - the portlet identifier
Returns:
the result of check

checkAssignIntoPortlet

public static boolean checkAssignIntoPortlet(int nDocumentId,
                                             int nPortletId)
Checks if the document is not yet assigned into the portlet

Parameters:
nDocumentId - the article identifier
nPortletId - the portlet identifier
Returns:
the result of check

insertIntoPortlet

public static void insertIntoPortlet(int nDocumentId,
                                     int nPortletId,
                                     int nStatus)
Insert the relationship between an document and a portlet for publishing

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

publishingDocument

public static void publishingDocument(int nDocumentId,
                                      int nPortletId,
                                      int nStatus)
Publishing documents assigned to a portlet

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

unPublishingDocument

public static void unPublishingDocument(int nDocumentId,
                                        int nPortletId,
                                        int nStatus)
UnPublishing documents assigned to a portlet

Parameters:
nDocumentId - the DocumentListPortlet identifier
nPortletId - the portlet identifier
nStatus - the publishong status : 0 for unpublished - 1 for published

deleteFromPortlet

public static void deleteFromPortlet(int nDocumentId,
                                     int nPortletId)
Delete the relationship between an document and a portlet

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

findByPortlet

public static java.util.Collection<Document> findByPortlet(int nPortletId)
Returns a Collection of Documents objects from a portlet identifier

Parameters:
nPortletId - the Portlet identifier
Returns:
a list of Articles objects

findDocumentsByPortlet

public static java.util.Collection<Document> findDocumentsByPortlet(int nPortletId)
Returns a Collection of Documents objects from a portlet identifier

Parameters:
nPortletId - the Portlet identifier
Returns:
a list of Articles objects

getPublishedDocumentsList

public static java.util.Collection getPublishedDocumentsList(int nPortletId)
Loads the list of the docuemnts whose type is the same as the one specified in parameter

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

getAssignedDocumentsList

public static java.util.Collection getAssignedDocumentsList(int nPortletId)
Loads the list of the docuemnts whose type is the same as the one specified in parameter

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

getMaxOrderDocument

public static int getMaxOrderDocument(int nPortletId)
Search the max order number of documents

Returns:
int the max order

getIdByOrder

public static int getIdByOrder(int nDocumentOrder,
                               int nPortletId)
Search the order number of documents

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

getModifyDocumentOrder

public static void getModifyDocumentOrder(int nNewOrder,
                                          int nDocumentId,
                                          int nPortletId)
Update the number order of documents

Parameters:
nNewOrder - the new number of order
nDocumentId - the Identifier of documents
nPortletId - the Identifier of portlet


Copyright © 2007 Mairie de Paris. All Rights Reserved.