public abstract class Portlet extends Object implements XmlContent
Modifier and Type | Field and Description |
---|---|
static int |
FLAG_DISPLAY_ON_LARGE_DEVICE |
static int |
FLAG_DISPLAY_ON_NORMAL_DEVICE |
static int |
FLAG_DISPLAY_ON_SMALL_DEVICE |
static int |
FLAG_DISPLAY_ON_XLARGE_DEVICE |
static int |
STATUS_PUBLISHED |
static int |
STATUS_UNPUBLISHED |
TAG_CHILD_PAGES_LIST, TAG_CURRENT_PAGE_ID, TAG_DISPLAY_ON_LARGE_DEVICE, TAG_DISPLAY_ON_NORMAL_DEVICE, TAG_DISPLAY_ON_SMALL_DEVICE, TAG_DISPLAY_ON_XLARGE_DEVICE, TAG_DISPLAY_PORTLET_TITLE, TAG_MENU, TAG_MENU_INDEX, TAG_MENU_LIST, TAG_MODE, TAG_PAGE, TAG_PAGE_DESCRIPTION, TAG_PAGE_ID, TAG_PAGE_IMAGE, TAG_PAGE_LEVEL, TAG_PAGE_NAME, TAG_PARENT_PAGE_ID, TAG_PLUGIN_NAME, TAG_PORTLET, TAG_PORTLET_ID, TAG_PORTLET_NAME, TAG_SUBLEVEL_INDEX, TAG_SUBLEVEL_MENU, TAG_SUBLEVEL_MENU_LIST
Constructor and Description |
---|
Portlet() |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeCachedForAnonymousUsers()
Check if the content of the portlet can be put in cache if the current user is not authenticated.
|
boolean |
canBeCachedForConnectedUsers()
Check if the content of the portlet can be put in cache if the current user is authenticated.
|
void |
copy(Portlet portlet)
This method copies the fields of the portlet specified in this portlet.
|
int |
getAcceptAlias()
Indicates if this portlet can be modified after its creation or not.
|
int |
getColumn()
Return the number of the column of this portlet in the page
|
Timestamp |
getDateUpdate()
Returns the date of update of this portlet
|
int |
getDeviceDisplayFlags()
Gets device display flags
|
int |
getDisplayPortletTitle()
Indicates if this portlet can be modified have a title or not.
|
String |
getHomeClassName()
Returns the name of the java class which manages this type of portlet.
|
String |
getHtmlContent(javax.servlet.http.HttpServletRequest request)
Get the HTML content of the portlet.
|
int |
getId()
Returns the identifier of this portlet.
|
String |
getName()
Returns the name of this portlet
|
int |
getOrder()
Returns the order of this portlet in the page which contains it.
|
int |
getPageId()
Returns the page identifier associated to this portlet
|
String |
getPluginName()
Get the plugin Name
|
String |
getPortletTypeId()
Returns the identifier of the portlet type of this portlet which caracterizes the portlet.
|
String |
getPortletTypeName()
Returns the portlet type name of this portlet
|
String |
getRole()
Gets the portlet's role
|
int |
getStatus()
Returns the identifier of this portlet.
|
int |
getStyleId()
Returns the style identifier of this portlet
|
String |
getUrlCreation()
Returns the url of the program which manages the creation of a portlet
|
String |
getUrlUpdate()
Returns the url of the program which manages the update of a portlet
|
String |
getXslFile(int nMode)
Recovers the stylesheet of the portlet according to the mode
|
Map<String,String> |
getXslParams()
Recovers the parameters to use with the stylesheet at the time of the transformation.
By default, portlets do not return any parameter |
byte[] |
getXslSource(int nMode)
Recovers the stylesheet of the portlet according to the mode
|
boolean |
hasDeviceDisplayFlag(int nFlag)
Check if a flag is setted
|
boolean |
isContentGeneratedByXmlAndXsl()
Check if the content of this portlet is generated by xml and xsl, or if it manage its own content generation
|
abstract void |
remove()
Remove the portlet.
|
void |
setAcceptAlias(int nAcceptAlias)
Sets the flag which indicates that this portlet can be updated or not.
|
void |
setColumn(int nColumn)
Sets the number of the column of this portlet in its page with the specified int.
|
void |
setDateUpdate(Timestamp dateUpdate)
Sets the date of update of this portlet with the specified date.
|
void |
setDeviceDisplayFlags(int nFlags)
Set device display flags
|
void |
setDisplayPortletTitle(int nDisplayPortletTitle)
Sets the flag which indicates that this portlet can be have a title or not.
|
void |
setHomeClassName(String strHomeClassName)
Sets the name of the java class which manages this type of portlet with the specified string.
|
void |
setId(int nId)
Sets the identifier of the portlet to the specified int.
|
void |
setName(String strName)
Sets the name of this portlet to the specified string.
|
void |
setOrder(int nType)
Sets the order of this portlet in its page with the specified int.
|
void |
setPageId(int nPageId)
Sets the identifier of the portlet style with the specified int.
|
void |
setPluginName(String strPluginName)
Sets the flag which indicates that this portlet can be updated or not.
|
void |
setPortletTypeId(String strPortletTypeId)
Sets the identifier of the portlet type to the specified int.
|
void |
setPortletTypeName(String strPortletTypeName)
Sets the name of this portlet type with the specified string.
|
void |
setRole(String strRole)
Sets the portlet's role
|
void |
setStatus(int nStatus)
Sets the identifier of the portlet to the specified int.
|
void |
setStyleId(int nStyleId)
Sets the identifier of the portlet style with the specified int.
|
void |
setUrlCreation(String strUrlCreation)
Sets the url of the program which creates this portlet
|
void |
setUrlUpdate(String strUrlUpdate)
Sets the url of the program which updates this portlet
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getXml, getXmlDocument
public static final int STATUS_PUBLISHED
public static final int STATUS_UNPUBLISHED
public static final int FLAG_DISPLAY_ON_SMALL_DEVICE
public static final int FLAG_DISPLAY_ON_NORMAL_DEVICE
public static final int FLAG_DISPLAY_ON_LARGE_DEVICE
public static final int FLAG_DISPLAY_ON_XLARGE_DEVICE
public int getId()
public void setId(int nId)
nId
- the new identifierpublic int getStyleId()
public void setStyleId(int nStyleId)
nStyleId
- the new style identifierpublic int getPageId()
public void setPageId(int nPageId)
nPageId
- The identifier of the pagepublic int getStatus()
public void setStatus(int nStatus)
nStatus
- the new statuspublic String getName()
public void setName(String strName)
strName
- the new namepublic String getPortletTypeId()
public void setPortletTypeId(String strPortletTypeId)
strPortletTypeId
- the portlet type identifierpublic String getPortletTypeName()
public void setPortletTypeName(String strPortletTypeName)
strPortletTypeName
- the new portlet type namepublic String getUrlCreation()
public void setUrlCreation(String strUrlCreation)
strUrlCreation
- The url of creationpublic String getUrlUpdate()
public void setUrlUpdate(String strUrlUpdate)
strUrlUpdate
- The url of updatepublic Timestamp getDateUpdate()
public void setDateUpdate(Timestamp dateUpdate)
dateUpdate
- the new datepublic int getColumn()
public void setColumn(int nColumn)
nColumn
- the new number of columnpublic int getOrder()
public void setOrder(int nType)
nType
- the new orderpublic int getDeviceDisplayFlags()
public boolean hasDeviceDisplayFlag(int nFlag)
nFlag
- The flag to checkpublic void setDeviceDisplayFlags(int nFlags)
nFlags
- Flagspublic String getHomeClassName()
public void setHomeClassName(String strHomeClassName)
strHomeClassName
- The Home Class namepublic int getAcceptAlias()
public void setDisplayPortletTitle(int nDisplayPortletTitle)
nDisplayPortletTitle
- The flagpublic int getDisplayPortletTitle()
public void setAcceptAlias(int nAcceptAlias)
nAcceptAlias
- The flagpublic String getPluginName()
public void setPluginName(String strPluginName)
strPluginName
- The flagpublic String getRole()
public void setRole(String strRole)
strRole
- The rolepublic void copy(Portlet portlet)
portlet
- the portlet to copypublic String getXslFile(int nMode)
nMode
- the selected mode.public byte[] getXslSource(int nMode)
nMode
- the selected mode.public Map<String,String> getXslParams()
public abstract void remove()
public boolean isContentGeneratedByXmlAndXsl()
getHtmlContent(HttpServletRequest request)
methodpublic String getHtmlContent(javax.servlet.http.HttpServletRequest request)
isContentGeneratedByXmlAndXsl()
returns truerequest
- The requestpublic boolean canBeCachedForAnonymousUsers()
{@link #canBeCachedForConnectedUsers()} for cache for authenticated users
public boolean canBeCachedForConnectedUsers()
{@link #canBeCachedForAnonymousUsers()} for cache for anonymous users
Copyright © 2020 City of Paris. All rights reserved.