Class PageTemplateImpl
java.lang.Object
org.broadleafcommerce.cms.page.domain.PageTemplateImpl
- All Implemented Interfaces:
Serializable
,PageTemplate
,AdminMainEntity
,MultiTenantCloneable<PageTemplate>
,ProfileEntity
@Entity
public class PageTemplateImpl
extends Object
implements PageTemplate, AdminMainEntity, ProfileEntity
Created by bpolster.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<PageTemplateFieldGroupXref>
protected Long
protected Locale
Deprecated.protected String
protected String
protected String
Fields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends PageTemplate>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.getId()
void
setFieldGroupXrefs
(List<PageTemplateFieldGroupXref> fieldGroups) void
void
void
setTemplateDescription
(String templateDescription) void
setTemplateName
(String templateName) void
setTemplatePath
(String templatePath)
-
Field Details
-
id
-
templateName
-
templateDescription
-
templatePath
-
locale
Deprecated. -
fieldGroups
-
-
Constructor Details
-
PageTemplateImpl
public PageTemplateImpl()
-
-
Method Details
-
getId
- Specified by:
getId
in interfacePageTemplate
-
setId
- Specified by:
setId
in interfacePageTemplate
-
getTemplateName
- Specified by:
getTemplateName
in interfacePageTemplate
-
setTemplateName
- Specified by:
setTemplateName
in interfacePageTemplate
-
getTemplateDescription
- Specified by:
getTemplateDescription
in interfacePageTemplate
-
setTemplateDescription
- Specified by:
setTemplateDescription
in interfacePageTemplate
-
getTemplatePath
- Specified by:
getTemplatePath
in interfacePageTemplate
-
setTemplatePath
- Specified by:
setTemplatePath
in interfacePageTemplate
-
getLocale
- Specified by:
getLocale
in interfacePageTemplate
- Returns:
-
setLocale
- Specified by:
setLocale
in interfacePageTemplate
-
getFieldGroupXrefs
- Specified by:
getFieldGroupXrefs
in interfacePageTemplate
-
setFieldGroupXrefs
- Specified by:
setFieldGroupXrefs
in interfacePageTemplate
-
getMainEntityName
- Specified by:
getMainEntityName
in interfaceAdminMainEntity
- Returns:
- the display name of this entity for the admin screen
-
createOrRetrieveCopyInstance
public <G extends PageTemplate> 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();
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity://copy extended field values on myClone here
return createResponse; }
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 interfaceMultiTenantCloneable<PageTemplate>
- 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
-