Class PageImpl

java.lang.Object
org.broadleafcommerce.cms.page.domain.PageImpl
All Implemented Interfaces:
Serializable, Page, PageAdminPresentation, AdminMainEntity, MultiTenantCloneable<Page>, ProfileEntity, Locatable

@Entity public class PageImpl extends Object implements Page, AdminMainEntity, Locatable, ProfileEntity, PageAdminPresentation
Created by bpolster.
See Also:
  • Field Details

  • Constructor Details

    • PageImpl

      public PageImpl()
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface Page
    • setId

      public void setId(Long id)
      Specified by:
      setId in interface Page
    • getPageTemplate

      public PageTemplate getPageTemplate()
      Specified by:
      getPageTemplate in interface Page
    • setPageTemplate

      public void setPageTemplate(PageTemplate pageTemplate)
      Specified by:
      setPageTemplate in interface Page
    • getPageFields

      public Map<String,PageField> getPageFields()
      Specified by:
      getPageFields in interface Page
    • setPageFields

      public void setPageFields(Map<String,PageField> pageFields)
      Specified by:
      setPageFields in interface Page
    • getFullUrl

      public String getFullUrl()
      Specified by:
      getFullUrl in interface Page
    • setFullUrl

      public void setFullUrl(String fullUrl)
      Specified by:
      setFullUrl in interface Page
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface Page
    • setDescription

      public void setDescription(String description)
      Specified by:
      setDescription in interface Page
    • getOfflineFlag

      public Boolean getOfflineFlag()
      Description copied from interface: Page
      Returns the offlineFlag. True indicates that the page should no longer appear on the site. The item will still appear within the content administration program but no longer be returned as part of the client facing APIs.
      Specified by:
      getOfflineFlag in interface Page
      Returns:
      true if this item is offline
    • setOfflineFlag

      public void setOfflineFlag(Boolean offlineFlag)
      Description copied from interface: Page
      Sets the offline flag.
      Specified by:
      setOfflineFlag in interface Page
    • getPriority

      public Integer getPriority()
      Description copied from interface: Page
      Gets the integer priority of this content item. Items with a lower priority should be displayed before items with a higher priority.
      Specified by:
      getPriority in interface Page
      Returns:
      the priority as a numeric value
    • setPriority

      public void setPriority(Integer priority)
      Description copied from interface: Page
      Sets the display priority of this item. Lower priorities should be displayed first.
      Specified by:
      setPriority in interface Page
    • getPageMatchRules

      public Map<String,PageRule> getPageMatchRules()
      Description copied from interface: Page
      Returns a map of the targeting rules associated with this page.

      Targeting rules are defined in the content mangagement system and used to enforce which page is returned to the client.

      Specified by:
      getPageMatchRules in interface Page
      Returns:
    • setPageMatchRules

      public void setPageMatchRules(Map<String,PageRule> pageMatchRules)
      Description copied from interface: Page
      Sets the targeting rules for this content item.
      Specified by:
      setPageMatchRules in interface Page
    • getQualifyingItemCriteria

      public Set<PageItemCriteria> getQualifyingItemCriteria()
      Description copied from interface: Page
      Returns the item (or cart) based rules associated with this content item.
      Specified by:
      getQualifyingItemCriteria in interface Page
      Returns:
    • setQualifyingItemCriteria

      public void setQualifyingItemCriteria(Set<PageItemCriteria> qualifyingItemCriteria)
      Description copied from interface: Page
      Sets the item (e.g. cart) based rules associated with this content item.
      Specified by:
      setQualifyingItemCriteria in interface Page
    • getExcludeFromSiteMap

      public boolean getExcludeFromSiteMap()
      Description copied from interface: Page
      Returns the excludeFromSiteMap flag. True indicates that the page should be excluded from the site map.
      Specified by:
      getExcludeFromSiteMap in interface Page
      Returns:
      true if this page is excluded from the site map
    • setExcludeFromSiteMap

      public void setExcludeFromSiteMap(boolean excludeFromSiteMap)
      Description copied from interface: Page
      Sets the excludeFromSiteMap flag.
      Specified by:
      setExcludeFromSiteMap in interface Page
    • createOrRetrieveCopyInstance

      public <G extends Page> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
      Description copied from interface: MultiTenantCloneable
      Clone this entity for the purpose of multiple tenancy. Note, extending classes should follow this pattern:

      public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context); if (createResponse.isAlreadyPopulated()) { return createResponse; } MyClass myClone = createResponse.getClone();

      //copy extended field values on myClone here

      return createResponse; }

      Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:

      public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse createResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone();

      //copy extended field values on myClone here

      return createResponse; }

      Specified by:
      createOrRetrieveCopyInstance in interface MultiTenantCloneable<Page>
      Parameters:
      context - a context object providing persistence and library functionality for copying entities
      Returns:
      the resulting copy container, possibly already persisted
      Throws:
      CloneNotSupportedException - if there's a problem detected with the cloning configuration
    • getMainEntityName

      public String getMainEntityName()
      Specified by:
      getMainEntityName in interface AdminMainEntity
      Returns:
      the display name of this entity for the admin screen
    • getLocation

      public String getLocation()
      Description copied from interface: Locatable
      If this is returning something that is non-null, this MUST return a String that starts with a slash and does not end with a slash.
      Specified by:
      getLocation in interface Locatable
      Returns:
      the url of the locatable item
    • getAdditionalAttributes

      public Map<String,PageAttribute> getAdditionalAttributes()
      Specified by:
      getAdditionalAttributes in interface Page
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<String,PageAttribute> additionalAttributes)
      Specified by:
      setAdditionalAttributes in interface Page
    • getActiveStartDate

      public Date getActiveStartDate()
      Specified by:
      getActiveStartDate in interface Page
    • setActiveStartDate

      public void setActiveStartDate(Date activeStartDate)
      Specified by:
      setActiveStartDate in interface Page
    • getActiveEndDate

      public Date getActiveEndDate()
      Specified by:
      getActiveEndDate in interface Page
    • setActiveEndDate

      public void setActiveEndDate(Date activeEndDate)
      Specified by:
      setActiveEndDate in interface Page
    • getMetaTitle

      public String getMetaTitle()
      Specified by:
      getMetaTitle in interface Page
    • setMetaTitle

      public void setMetaTitle(String metaTitle)
      Specified by:
      setMetaTitle in interface Page
    • getMetaDescription

      public String getMetaDescription()
      Specified by:
      getMetaDescription in interface Page
    • setMetaDescription

      public void setMetaDescription(String metaDescription)
      Specified by:
      setMetaDescription in interface Page