Package nl.gx.webmanager.cms.core
Interface PageVersion
-
- All Superinterfaces:
ContentItemVersion<Page>
,ElementHolder
,Presentable
,PublicationStatusEnabled
,WorkflowEnabled
,Wrapper
@Indexable(extension=nl.gx.webmanager.services.contentindex.extension.content.PageVersionExtension.class, languageGetter=ContentItemVersionLanguageGetter.class) public interface PageVersion extends ElementHolder, ContentItemVersion<Page>
Representation of version of a page. A page always has at least one version (the current version) and 0 or more other versions. These 'other' versions may be older public versions, newer non public versions or versions with a different language.
-
-
Field Summary
-
Fields inherited from interface nl.gx.webmanager.cms.core.ContentItemVersion
LABELCATEGORY_NOCATEGORY, LABELCATEGORY_NOLABEL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addPageLabel(PageLabel pageLabel)
Appends a page label to this page version.int
copyLanguageVersion(String webid, String languageid, String l_id)
Deprecated.String
getAlternativeURLPath()
Returns the alternative URL path.int
getBlockConfigId()
Returns id of the page's page section config.Page[]
getBlocks()
Deprecated.Page[]
getBlocks(BlockLabel[] labels)
Deprecated.String
getExcludeScriptsTag()
Returns exclude scripts tag for use in frames.int
getExpire()
Returns the page expire.String
getFriendlyURLTitle()
Returns friendly URL title.boolean
getHasRedirect()
Returns if this page has a redirect.String
getHtmlTitle()
Returns the HTML title.int
getId()
Returns the ID of the wrapped object.boolean
getIncludeInSearchEngine()
Returns if this page version is included to be found by a search engine.String
getInlineModeTag()
Returns the inline mode tag.String[]
getLabels()
Deprecated.This method is deprecated, use getPageLabels() instead.Language
getLanguage()
Returns the language of this page version.String
getLastModifiedUsername()
Returns last modified user name of the page version.MediaItemPageVersion
getMediaItemPageVersion()
Returns the media item page version associated with this page version.String
getMetaDescription()
Returns the meta description.String
getMetaKeywords()
Gets the meta keywords for this page version.MetaTag[]
getMetaTags()
Return the meta tags for this page version.String
getNavigationTitle()
Returns the navigation title.String
getNoReadAccessText()
Returns text for a user indicating he has no read access for this page version.Page
getPage()
Deprecated.useContentItemVersion.getContentItem()
instead.PageLabel[]
getPageLabels()
Returns the page labels.PageMetaData[]
getPageMetaData()
Returns the meta data objects assigned to this page version.Map<String,PageMetaData>
getPageMetaDataFBOMap()
Constructs and returns an FBO map for page meta data.PersonalizationItem
getPersonalizationItem()
Returns the personalization assigned to this page version ornull
if none is assigned.String
getPreviewForms(boolean containsContentElements)
Returns the forms necessary for WebManager to function properly in the preview mode.String
getPreviewJavascript(boolean containsContentElements)
Used to generate javascript for previewing this page (WebManager needs this to function properly).String
getPreviewTopBody(boolean containsContentElements)
Return the top of the body necessary for WebManager to function properly in the layout mode.Redirect
getRedirect()
Returns the redirect.ResourceEntity
getResourceEntity()
Returns database page or null if it is not a database page.ResourceInstance
getResourceInstance()
Return database id (if this is a database id) or 0.String
getSeeEvent()
Deprecated.SEOPriority
getSEOPriority()
Returns the SEO priority used for generating the Google sitemaps xml.SEOUpdateFrequency
getSEOUpdateFrequency()
Returns the SEO update frequency used for generating the Google sitemaps xml.String
getShortTitle()
Returns the short title.StyleSheet[]
getStyleSheets()
Returns stylesheets for this page.Page[]
getSubPages()
Returns the sub pages of this version.Page[]
getSubPagesWithCurrent()
Returns array of sub pages, which have a current version.String
getUrlTitle()
Returns page url title; this is used to override the default friendly URL for this page version.String
getXslFoUrl()
Returns URL to the page xsl.String
getXslUrl()
Returns the URL to the page xsl.boolean
isAuthorized(String permission)
Return true if the user is authorized to preview this page.boolean
isAuthorizedToPreview()
Returns true if the current user is authorizaed to preview this PageVersion object.boolean
isSecure()
Returns whether this page version is accessed over a secure connection.void
processHttpServletRequest(List<NameValuePair> dynamicAttributes)
Processes the HttpServletRequest of the page submission for this page version.void
removePageLabel(PageLabel pageLabel)
Removes the specified page label from this page version.void
setAlternativeUrlPath(String alternativeUrlPath)
Sets the alternative url pathvoid
setAttachedLeadImage(org.springframework.web.multipart.MultipartFile imageMultiPartFile)
Sets the lead image of this page version as an upload file associated with this particular page version.void
setElementsVolatile(ElementHolder elementHolder)
Sets the elements, but does not save to the JCR.void
setHtmlTitle(String value)
Sets the page html title.void
setIncludeInSearchEngine(boolean value)
Sets if this page version is included to be found by a search engine.void
setLastModifiedDate(Date value)
Sets the last modified date of the page version.void
setLastModifiedUser(User user)
Sets the last modified user of the page version.void
setMetaDescription(String value)
Sets the meta description.void
setMetaKeywords(String keywords)
Sets the meta keywords for this page version.void
setNavigationTitle(String value)
Deprecated.usesetShortTitle(java.lang.String)
instead.void
setPageLabels(PageLabel[] pageLabels)
Sets the page labels for this page version.void
setRedirect(int statusCode, RelatedLink relatedLink)
Sets a redirect for this page version.void
setSEOPriority(SEOPriority priority)
Sets the SEO priority used for generating the Google sitemaps xml.void
setSEOUpdateFrequency(SEOUpdateFrequency frequency)
Sets the SEO update frequency used for generating the Google sitemaps xml.void
setShortTitle(String value)
Sets the short title.void
setTitle(String value)
Sets the page title.void
setTitleVolatile(String title)
Sets the title, but does not save to the JCR.void
setUrlTitle(String value)
Sets the page url title to override the default friendly URL for this page version.void
synchronizeMediaItemPageVersion()
Checks if a media item page version is connected to the page version and if so it synchronizes it with the page version.void
synchronizePageMetaData()
Makes sure each page has exactly one object for each available page meta data component.-
Methods inherited from interface nl.gx.webmanager.cms.core.ContentItemVersion
createNewRevision, deleteRevisions, getAttachedLeadImage, getContentItem, getContentLabelCategories, getContentLabels, getCreationDate, getCreationUser, getHasLead, getIdentifier, getLastModifiedDate, getLastModifiedUser, getLead, getLeadImage, getLeadImageMediaItem, getLeadImageThumbnail, getPreviousRevisions, getRemark, getRevisionCount, getTitle, isCurrent, isEditable, isInContextCurrent, removeAttachedLeadImage, setAttachedLeadImage, setAttachedLeadImageFocusPoint, setEditable, setLead, setLeadImageMediaItem, setRemark
-
Methods inherited from interface nl.gx.webmanager.cms.core.ElementHolder
addRelatedLink, createRichTextElements, getElementHolderElements, getElements, getElementsFBOMap, getFBOMap, getHeadings, getLastElement, getModelElements, getModelElementsFBOMap, getRelatedLink, getRelatedLinks, getWebsite, insertLastElementAtCursor, isAdditionalElementsAllowed, removeRelatedLinks, setElementHolderElements, setElements, setModelElements, setWebsite
-
Methods inherited from interface nl.gx.webmanager.cms.core.Presentable
getPresentation, getPresentationVariant, render, render, setPresentation, setPresentationVariant
-
Methods inherited from interface nl.gx.webmanager.cms.core.PublicationStatusEnabled
getExpirationDate, getPublicationDate, getPublicationStatus, getPublicationStatus, setExpirationDate, setPublicationDate
-
Methods inherited from interface nl.gx.webmanager.cms.workflow.WorkflowEnabled
getWorkflowModel, getWorkflowModelInstance, isPublic
-
-
-
-
Method Detail
-
getId
@ReferField int getId()
Description copied from interface:Wrapper
Returns the ID of the wrapped object.
-
setTitle
void setTitle(String value)
Sets the page title.- Parameters:
value
- the page title
-
getNavigationTitle
@Field(boost=1.0) @ReferField(body=true) String getNavigationTitle()
Returns the navigation title.- Returns:
- navigation title.
-
getShortTitle
String getShortTitle()
Returns the short title.- Returns:
- short title.
-
setShortTitle
void setShortTitle(String value)
Sets the short title.- Parameters:
value
- the short title
-
setNavigationTitle
@Deprecated void setNavigationTitle(String value)
Deprecated.usesetShortTitle(java.lang.String)
instead.Sets the page navigation title.- Parameters:
value
- the page navigation title
-
getHtmlTitle
String getHtmlTitle()
Returns the HTML title. This is a title string which is suitable for use in the HTML TITLE tag. If no HTML title has been explicietly specified for the page then an empty string is returned.- Returns:
- HTML title, or "" if none has been specified.
-
getFriendlyURLTitle
String getFriendlyURLTitle()
Returns friendly URL title.- Returns:
- friendly URL title.
-
getAlternativeURLPath
String getAlternativeURLPath()
Returns the alternative URL path. Links only uses this alternative URL path if friendly URL functionality is turned on.- Returns:
- alternative URL path.
-
setAlternativeUrlPath
void setAlternativeUrlPath(String alternativeUrlPath)
Sets the alternative url path- Parameters:
alternativeUrlPath
-
-
setHtmlTitle
void setHtmlTitle(String value)
Sets the page html title.- Parameters:
value
- the page html title
-
setUrlTitle
void setUrlTitle(String value)
Sets the page url title to override the default friendly URL for this page version.- Parameters:
value
- the page url title
-
getUrlTitle
@Field String getUrlTitle()
Returns page url title; this is used to override the default friendly URL for this page version.- Returns:
- value the page url title
-
getIncludeInSearchEngine
boolean getIncludeInSearchEngine()
Returns if this page version is included to be found by a search engine.- Returns:
- is included in search engine
-
setIncludeInSearchEngine
void setIncludeInSearchEngine(boolean value)
Sets if this page version is included to be found by a search engine.- Parameters:
value
- set included in search engine
-
getResourceInstance
ResourceInstance getResourceInstance()
Return database id (if this is a database id) or 0.- Returns:
- database id (if this is a database id) or 0.
-
getResourceEntity
@Document ResourceEntity getResourceEntity()
Returns database page or null if it is not a database page.- Returns:
- database page or null if it is not a database page.
-
getPage
@Deprecated Page getPage()
Deprecated.useContentItemVersion.getContentItem()
instead.Returns Page object of which this object is a version.- Returns:
- Page object of which this object is a version.
-
getSubPages
Page[] getSubPages()
Returns the sub pages of this version. The order in which these sub pages are returned reflects the order configured in WebManager. Only these sub pages are returned which are not marked invisible for navigation in WebManager.- Returns:
- sub pages.
- See Also:
getSubPagesWithCurrent()
,Page.getSubPages()
-
getSubPagesWithCurrent
Page[] getSubPagesWithCurrent()
Returns array of sub pages, which have a current version.- Returns:
- array of sub pages, which have a current version.
- See Also:
getSubPages()
,Page.getSubPages()
-
getLanguage
Language getLanguage()
Description copied from interface:ContentItemVersion
Returns the language of this page version.- Specified by:
getLanguage
in interfaceContentItemVersion<Page>
- Returns:
- language of this page version.
-
setMetaKeywords
void setMetaKeywords(String keywords)
Sets the meta keywords for this page version.- Parameters:
keywords
- the meta keywords value
-
getMetaKeywords
String getMetaKeywords()
Gets the meta keywords for this page version.- Returns:
- The meta keywords
-
getMetaTags
MetaTag[] getMetaTags()
Return the meta tags for this page version.- Returns:
- array of MetaTag.
-
getPreviewJavascript
String getPreviewJavascript(boolean containsContentElements)
Used to generate javascript for previewing this page (WebManager needs this to function properly).- Parameters:
containsContentElements
- if true, the page/frame contains the WebManager content.- Returns:
- javascript
-
getPreviewForms
String getPreviewForms(boolean containsContentElements)
Returns the forms necessary for WebManager to function properly in the preview mode.- Parameters:
containsContentElements
- if true, the page/frame contains the WebManager content.- Returns:
- the forms necessary for WebManager to function properly in the preview mode.
-
getPreviewTopBody
String getPreviewTopBody(boolean containsContentElements)
Return the top of the body necessary for WebManager to function properly in the layout mode.- Parameters:
containsContentElements
- if true, the page/frame contains the WebManager content.- Returns:
- the top of the body necessary for WebManager to function properly in the layout mode.
-
isAuthorized
boolean isAuthorized(String permission)
Return true if the user is authorized to preview this page.- Returns:
- true if the user is authorized for this page.
-
isAuthorizedToPreview
boolean isAuthorizedToPreview()
Returns true if the current user is authorizaed to preview this PageVersion object.- Returns:
- true if the current user is authorizaed to preview this PageVersion object
-
getMetaDescription
@Field(boost=0.6) String getMetaDescription()
Returns the meta description.- Returns:
- meta description
- Since:
- 10.13
-
setMetaDescription
void setMetaDescription(String value)
Sets the meta description.- Parameters:
value
- the meta description- Since:
- 10.13
-
getHasRedirect
boolean getHasRedirect()
Returns if this page has a redirect.- Returns:
true
if the page has a redirect,false
otherwise
-
getSeeEvent
@Deprecated String getSeeEvent()
Deprecated.Returns the see event.- Returns:
- see event.
-
getRedirect
@Field(stored=false, indexed=true, identifiers="relatedlinks", adapter=ContentReferenceFieldAdapter.class) Redirect getRedirect()
Returns the redirect.- Returns:
- Redirect or
null
.
-
setRedirect
void setRedirect(int statusCode, RelatedLink relatedLink)
Sets a redirect for this page version. Any redirect already assigned is removed.- Parameters:
statusCode
- Redirect status code to set. Must be301
or302
, or else anIllegalArgumentException
is thrown.relatedLink
- The related link to point the redirect to
-
getInlineModeTag
String getInlineModeTag()
Returns the inline mode tag.- Returns:
- constant inline mode tag: "<!-- Content -->".
-
getExcludeScriptsTag
String getExcludeScriptsTag()
Returns exclude scripts tag for use in frames.- Returns:
- constant exclude script tag: "<!-- ExcludeScripts -->".
-
getBlocks
@Deprecated Page[] getBlocks(BlockLabel[] labels)
Deprecated.Returns the page objects for the given page section labels. Deprecated, use getBlocks(BlockLabel[] labels) from Page object- Parameters:
labels
- Array of page section labels- Returns:
- Page objects
-
getBlocks
@Deprecated @Field(stored=false, indexed=true, adapter=ContentReferenceFieldAdapter.class) Page[] getBlocks()
Deprecated.Returns the page sections for this page version. Deprecated, use getBlocks() from Page object- Returns:
- all page sections for this page version.
-
getPersonalizationItem
PersonalizationItem getPersonalizationItem()
Returns the personalization assigned to this page version ornull
if none is assigned.- Returns:
- the personalization assigned to this page version or
null
if none is assigned
-
getStyleSheets
StyleSheet[] getStyleSheets()
Returns stylesheets for this page.- Returns:
- stylesheets for this page.
-
setLastModifiedDate
void setLastModifiedDate(Date value)
Sets the last modified date of the page version.- Parameters:
value
- last modified date of the page version.
-
getLastModifiedUsername
String getLastModifiedUsername()
Returns last modified user name of the page version.- Returns:
- last modified user name of the page version.
-
setLastModifiedUser
void setLastModifiedUser(User user)
Sets the last modified user of the page version.- Parameters:
user
- last modified user of the page version.
-
isSecure
boolean isSecure()
Returns whether this page version is accessed over a secure connection.- Returns:
true
if the page is accessed over a secure connection,false
otherwise.
-
getXslUrl
String getXslUrl()
Returns the URL to the page xsl.- Returns:
- URL to the page xsl.
-
getXslFoUrl
String getXslFoUrl()
Returns URL to the page xsl.- Returns:
- URL to the page xsl.
-
getLabels
@Deprecated String[] getLabels()
Deprecated.This method is deprecated, use getPageLabels() instead.Returns the page labels.- Returns:
- page labels.
-
getPageLabels
PageLabel[] getPageLabels()
Returns the page labels.- Returns:
- page labels.
-
setPageLabels
void setPageLabels(PageLabel[] pageLabels)
Sets the page labels for this page version. The provides array of page labels will overrule all page labels currently set on this page version.- Parameters:
pageLabels
- The page labels to set.
-
addPageLabel
void addPageLabel(PageLabel pageLabel)
Appends a page label to this page version. If the page label is already assigned to this page version, this method does nothing.- Parameters:
pageLabel
- The page label to append to this page version.
-
removePageLabel
void removePageLabel(PageLabel pageLabel)
Removes the specified page label from this page version. This method does nothing if this page label is not assigned to this page version.- Parameters:
pageLabel
- The page label to remove from this page version.
-
getMediaItemPageVersion
MediaItemPageVersion getMediaItemPageVersion()
Returns the media item page version associated with this page version.- Returns:
- the media item page version associated with this page version
- Since:
- 10.32.0
-
getExpire
int getExpire()
Returns the page expire.- Returns:
- page expire.
-
getBlockConfigId
int getBlockConfigId()
Returns id of the page's page section config. Note that the names "block" and "page section" both refer to the same concept.- Returns:
- id of the page's page section config.
-
synchronizeMediaItemPageVersion
void synchronizeMediaItemPageVersion()
Checks if a media item page version is connected to the page version and if so it synchronizes it with the page version.
-
copyLanguageVersion
@Deprecated int copyLanguageVersion(String webid, String languageid, String l_id)
Deprecated.Creates a copy of the section for a particular language and returns its id.- Parameters:
webid
- Id of the web initiativelanguageid
- Id of the language to copy the version to
-
processHttpServletRequest
void processHttpServletRequest(List<NameValuePair> dynamicAttributes)
Processes the HttpServletRequest of the page submission for this page version.- Parameters:
dynamicAttributes
- List of NameValuePair objects based on the qs parameter
-
getNoReadAccessText
String getNoReadAccessText()
Returns text for a user indicating he has no read access for this page version.- Returns:
- text for a user indicating he has no read access for this page version
-
getPageMetaData
@Document(inheritLanguage=true) PageMetaData[] getPageMetaData()
Returns the meta data objects assigned to this page version.- Returns:
- the meta data objects assigned to this page version
-
synchronizePageMetaData
void synchronizePageMetaData()
Makes sure each page has exactly one object for each available page meta data component.
-
getPageMetaDataFBOMap
Map<String,PageMetaData> getPageMetaDataFBOMap()
Constructs and returns an FBO map for page meta data.- Returns:
- map of PageMetaData form backing objects, cataloged by their UUID.
-
getSEOPriority
SEOPriority getSEOPriority()
Returns the SEO priority used for generating the Google sitemaps xml. This property determines the value of the 'priority' attribute in the URL section for this article. For more information, see https://www.sitemaps.org/protocol.html#prioritydef- Returns:
- the SEO priority used for generating the Google sitemaps xml
-
setSEOPriority
void setSEOPriority(SEOPriority priority)
Sets the SEO priority used for generating the Google sitemaps xml. This property determines the value of the 'priority' attribute in the URL section for this article. For more information, see https://www.sitemaps.org/protocol.html#prioritydef- Parameters:
priority
- the SEO priority to use for generating the Google sitemaps xml
-
getSEOUpdateFrequency
SEOUpdateFrequency getSEOUpdateFrequency()
Returns the SEO update frequency used for generating the Google sitemaps xml. This property determines the value of the 'changefreq' attribute in the URL section for this article. For more information, see https://www.sitemaps.org/protocol.html#changefreqdef- Returns:
- The SEO update frequency used for generating the Google sitemaps xml
-
setSEOUpdateFrequency
void setSEOUpdateFrequency(SEOUpdateFrequency frequency)
Sets the SEO update frequency used for generating the Google sitemaps xml. This property determines the value of the 'changefreq' attribute in the URL section for this article. For more information, see https://www.sitemaps.org/protocol.html#changefreqdef- Parameters:
frequency
- The SEO update frequency to use for generating the Google sitemaps xml
-
setTitleVolatile
void setTitleVolatile(String title)
Sets the title, but does not save to the JCR.- Parameters:
title
- the title to set
-
setElementsVolatile
void setElementsVolatile(ElementHolder elementHolder)
Sets the elements, but does not save to the JCR.- Parameters:
elementHolder
- the element holder to set
-
setAttachedLeadImage
void setAttachedLeadImage(org.springframework.web.multipart.MultipartFile imageMultiPartFile)
Sets the lead image of this page version as an upload file associated with this particular page version. The image cannot be reused by other page versions. To reuse lead images, assign it from the content repository and useContentItemVersion.setLeadImageMediaItem(nl.gx.webmanager.cms.mediarepository.MediaItem)
instead. If null is passed, any existing upload lead image will be removed.- Parameters:
imageMultiPartFile
- The multipart file holding the image to assign as lead image to this page version- Since:
- 10.32.0
-
-