Class PortletDAO
java.lang.Object
fr.paris.lutece.portal.business.portlet.PortletDAO
- All Implemented Interfaces:
IPortletDAO
This class provides Data Access methods for Portlet objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nPortletId) Delete a record from the table and its aliasgetUsedOrdersForColumns(int pageId, int columnId) Get list of used orders for a columnbooleanhasAlias(int nPortletId) Indicates if the portlet has alias in the database or not.voidInsert a new record in the table.load(int nPortletId) Load the data of a portlet from the databaseLoad the last modified portletselectAliasesForPortlet(int nPortletId) Returns the list of the alias portlets associated to the original portletselectColumnPositions(int nPageId, int nColumnId) The portlets of a column, in their order, with only their identifier, name, page, column and order loadedselectPagePositions(int nPageId) The portlets of a page, by column and in their order, with only their identifier, type, name, page, column and order loadedselectPortletListByStyle(int nStyleId) Returns the list of the portlets associated to the styleselectPortletsByRole(String strRole) Gets a collection of portlets associated to a given roleselectPortletsByType(String strPortletTypeId) Returns a list of portlets according to the selected typeselectPortletsListbyName(String strPortletName) Returns the list of portlets in a distinct nameselectPortletType(String strPortletTypeId) Returns the instance of the PortletType whose identifier is specified in parametervoidUpdate the record in the tablevoidupdatePosition(Portlet portlet, int nColumn, int nOrder) Update the portlet status : 0 for activated - 1 for suspendedvoidupdateStatus(Portlet portlet, int nStatus) Update the portlet status : 0 for activated - 1 for suspended
-
Constructor Details
-
PortletDAO
public PortletDAO()
-
-
Method Details
-
insert
Insert a new record in the table. NB : The portlet identifier will already been obtained by the portlet girl- Specified by:
insertin interfaceIPortletDAO- Parameters:
portlet- the portlet to insert in the database
-
delete
public void delete(int nPortletId) Delete a record from the table and its alias- Specified by:
deletein interfaceIPortletDAO- Parameters:
nPortletId- the identifier of the portlet to be deleted
-
load
Load the data of a portlet from the database- Specified by:
loadin interfaceIPortletDAO- Parameters:
nPortletId- the portlet identifier- Returns:
- the object Portlet initialized with the data of the database
-
store
Update the record in the table- Specified by:
storein interfaceIPortletDAO- Parameters:
portlet- the portlet reference
-
updateStatus
Update the portlet status : 0 for activated - 1 for suspended- Specified by:
updateStatusin interfaceIPortletDAO- Parameters:
portlet- the portlet to upadte in the databasenStatus- the status to update
-
updatePosition
Update the portlet status : 0 for activated - 1 for suspended- Specified by:
updatePositionin interfaceIPortletDAO- Parameters:
portlet- the portlet to upadte in the databasenColumn- the column to updatenOrder- the order to update
-
selectPortletsListbyName
Returns the list of portlets in a distinct name- Specified by:
selectPortletsListbyNamein interfaceIPortletDAO- Parameters:
strPortletName- the name of portlet- Returns:
- the list in form of Collection
-
selectAliasesForPortlet
Returns the list of the alias portlets associated to the original portlet- Specified by:
selectAliasesForPortletin interfaceIPortletDAO- Parameters:
nPortletId- the original portlet id- Returns:
- the list of alais portlets.
-
selectPortletsByType
Returns a list of portlets according to the selected type- Specified by:
selectPortletsByTypein interfaceIPortletDAO- Parameters:
strPortletTypeId- the portlet type- Returns:
- the portlets in form of Collection
-
hasAlias
public boolean hasAlias(int nPortletId) Indicates if the portlet has alias in the database or not.- Specified by:
hasAliasin interfaceIPortletDAO- Parameters:
nPortletId- the identifier of the portlet- Returns:
- true if the portlet has some alias, false if not.
-
selectPortletType
Returns the instance of the PortletType whose identifier is specified in parameter- Specified by:
selectPortletTypein interfaceIPortletDAO- Parameters:
strPortletTypeId- the identifier of the portlet type- Returns:
- the instance of the portlet type
-
selectPortletListByStyle
Returns the list of the portlets associated to the style- Specified by:
selectPortletListByStylein interfaceIPortletDAO- Parameters:
nStyleId- the identifier of the style- Returns:
- the list of the portlets in form of a Collection of Portlets objects
-
selectPortletsByRole
Gets a collection of portlets associated to a given role- Specified by:
selectPortletsByRolein interfaceIPortletDAO- Parameters:
strRole- The role- Returns:
- The collection
-
loadLastModifiedPortlet
Load the last modified portlet- Specified by:
loadLastModifiedPortletin interfaceIPortletDAO- Returns:
- the last modified
Portlet
-
getUsedOrdersForColumns
Get list of used orders for a column- Specified by:
getUsedOrdersForColumnsin interfaceIPortletDAO- Parameters:
pageId- the page idcolumnId- the column id- Returns:
- list of orders used for this column
-
selectColumnPositions
The portlets of a column, in their order, with only their identifier, name, page, column and order loaded- Specified by:
selectColumnPositionsin interfaceIPortletDAO- Parameters:
nPageId- the page idnColumnId- the column id- Returns:
- the portlets of the column
-
selectPagePositions
The portlets of a page, by column and in their order, with only their identifier, type, name, page, column and order loaded- Specified by:
selectPagePositionsin interfaceIPortletDAO- Parameters:
nPageId- the page id- Returns:
- the portlets of the page
-