public class StandardDisplayableModel extends ModelBase implements Displayable
Constructor and Description |
---|
StandardDisplayableModel() |
Modifier and Type | Method and Description |
---|---|
String |
formatPublishDate() |
String |
formatPublishDate(String pattern) |
String |
formattedDate(String format)
Get the publish date and format it with the passed in DateTimeFormatter
|
String |
getAuthor()
Get the author name of this page.
|
String |
getContent()
The actual page content that gets displayed in the body of the web page.
|
String |
getContentType() |
ZonedDateTime |
getDate() |
Boolean |
getDraft()
If true, the page will not be visible.
|
String |
getImage()
Get used for the og:image meta tag.
|
String |
getMetaDescription()
For the description meta tag, often used by Google and others to give a one sentence
explanation of the page in search results.
|
String |
getMetaKeywords()
Get a list of comma separated keywords for the keywords tag.
|
String |
getOgType()
OpenGraph page type, for the HTML meta section
|
List<String> |
getOldUrls()
If you change the URL of a page, add the old url here, Stallion will then 301 redirect
the old url to the new url.
|
String |
getOriginalContent() |
String |
getOverrideDomain()
Empty by default, but if secondary domains are found, and the page slug matches that of a secondary domain,
then this method will return the secondary domain.
|
String |
getPermalink()
Get the full URL to this page
|
String |
getPreviewKey()
Set this to some custom value, and then you can view an unpublished page via
/slug?stPreview=(your preview key)
|
ZonedDateTime |
getPublishDate()
Get the date at which the page should be live, if this is in the future, the page will
not be visible.
|
Boolean |
getPublished()
True if draft is false, and publishDate is before the current time.
|
String |
getRealHttpPath()
The path component of the URL at which this page can be accessed.
|
String |
getRelCanonical()
Used for the canonical tag in the HTML head section, set this manually if this page
is accessible at multiple URL's and you do not want to get duplicate content penalties
in Google.
|
String |
getSlug()
The user settable path component of the URL at which this page can be accessed, before
applying the override/secondary domain (if applicable)
|
String |
getSlugForCssId()
Creates a CSS id for the page <body> tag based on the slug.
|
String |
getSummary() |
String |
getTemplate()
The path of the template used to render the page.
|
String |
getTitle()
Used in the page <title> tag.
|
String |
getTitleTag() |
String |
getTruncatedSummary(int max) |
<D extends StandardDisplayableModel> |
setAuthor(String author) |
<D extends StandardDisplayableModel> |
setContent(String content) |
StandardDisplayableModel |
setContentType(String contentType) |
<D extends StandardDisplayableModel> |
setDraft(Boolean draft) |
<D extends StandardDisplayableModel> |
setImage(String image) |
<D extends StandardDisplayableModel> |
setMetaDescription(String metaDescription) |
<D extends StandardDisplayableModel> |
setMetaKeywords(String metaKeywords) |
<D extends StandardDisplayableModel> |
setOgType(String ogType) |
<D extends Displayable> |
setOldUrls(List<String> oldUrls) |
<D extends StandardDisplayableModel> |
setOriginalContent(String originalContent) |
<D extends StandardDisplayableModel> |
setPreviewKey(String previewKey) |
<D extends StandardDisplayableModel> |
setPublishDate(ZonedDateTime publishDate) |
<D extends StandardDisplayableModel> |
setRelCanonical(String relCanonical) |
<D extends StandardDisplayableModel> |
setSlug(String slug) |
<D extends StandardDisplayableModel> |
setTemplate(String template) |
StandardDisplayableModel |
setTitle(String title) |
<D extends StandardDisplayableModel> |
setTitleTag(String titleTag) |
equals, getBucket, getCompoundId, getController, getDeleted, getId, getIsNewInsert, getLastModifiedMillis, getMeta, hashCode, setBucket, setDeleted, setId, setIsNewInsert, setLastModifiedMillis
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getBucket, getCompoundId, getController, getDeleted, getId, getIsNewInsert, getLastModifiedMillis, setBucket, setDeleted, setId, setIsNewInsert, setLastModifiedMillis
public StandardDisplayableModel()
public String getTitle()
getTitle
in interface Displayable
public StandardDisplayableModel setTitle(String title)
public String getSlug()
getSlug
in interface Displayable
public String getRealHttpPath()
getRealHttpPath
in interface Displayable
public String getOverrideDomain()
getOverrideDomain
in interface Displayable
public String getSlugForCssId()
getSlugForCssId
in interface Displayable
public String getContent()
getContent
in interface Displayable
public <D extends StandardDisplayableModel> D setSlug(String slug)
public <D extends StandardDisplayableModel> D setContent(String content)
public String getTemplate()
getTemplate
in interface Displayable
public <D extends StandardDisplayableModel> D setTemplate(String template)
public ZonedDateTime getPublishDate()
getPublishDate
in interface Displayable
public <D extends StandardDisplayableModel> D setPublishDate(ZonedDateTime publishDate)
public Boolean getDraft()
getDraft
in interface Displayable
public <D extends StandardDisplayableModel> D setDraft(Boolean draft)
public Boolean getPublished()
getPublished
in interface Displayable
public ZonedDateTime getDate()
public String formattedDate(String format)
format
- public String getPermalink()
getPermalink
in interface Displayable
public <D extends StandardDisplayableModel> D setAuthor(String author)
public String getMetaDescription()
getMetaDescription
in interface Displayable
public <D extends StandardDisplayableModel> D setMetaDescription(String metaDescription)
public String getRelCanonical()
getRelCanonical
in interface Displayable
public <D extends StandardDisplayableModel> D setRelCanonical(String relCanonical)
public String getMetaKeywords()
getMetaKeywords
in interface Displayable
public <D extends StandardDisplayableModel> D setMetaKeywords(String metaKeywords)
public String getTitleTag()
getTitleTag
in interface Displayable
public <D extends StandardDisplayableModel> D setTitleTag(String titleTag)
public String getImage()
getImage
in interface Displayable
public <D extends StandardDisplayableModel> D setImage(String image)
public String getOgType()
getOgType
in interface Displayable
public <D extends StandardDisplayableModel> D setOgType(String ogType)
public String getPreviewKey()
getPreviewKey
in interface Displayable
public <D extends StandardDisplayableModel> D setPreviewKey(String previewKey)
public List<String> getOldUrls()
getOldUrls
in interface Displayable
public <D extends Displayable> D setOldUrls(List<String> oldUrls)
setOldUrls
in interface Displayable
public String getOriginalContent()
getOriginalContent
in interface Displayable
public <D extends StandardDisplayableModel> D setOriginalContent(String originalContent)
public String getSummary()
public String getTruncatedSummary(int max)
public String formatPublishDate()
public String formatPublishDate(String pattern)
public String getContentType()
getContentType
in interface Displayable
public StandardDisplayableModel setContentType(String contentType)
Copyright © 2016. All rights reserved.