Class StructuredContentImpl
java.lang.Object
org.broadleafcommerce.cms.structure.domain.StructuredContentImpl
- All Implemented Interfaces:
Serializable,StructuredContent,org.broadleafcommerce.common.admin.domain.AdminMainEntity,org.broadleafcommerce.common.copy.MultiTenantCloneable<StructuredContent>,org.broadleafcommerce.common.extensibility.jpa.copy.ProfileEntity
@Entity
public class StructuredContentImpl
extends Object
implements StructuredContent, org.broadleafcommerce.common.admin.domain.AdminMainEntity, org.broadleafcommerce.common.extensibility.jpa.copy.ProfileEntity
Created by bpolster.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Longprotected org.broadleafcommerce.common.locale.domain.Localeprotected Booleanprotected Integerprotected Set<StructuredContentItemCriteria>static final Stringprotected Map<String,StructuredContentFieldXref> protected StructuredContentTypeFields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends StructuredContent>
org.broadleafcommerce.common.copy.CreateResponse<G>createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) Gets the name.getFieldValue(String fieldName) Returns the value of the associatedStructuredContentFieldif the given fieldName exists in the map returned byStructuredContent.getStructuredContentFieldXrefs(), and null otherwise.getId()Gets the primary key.org.broadleafcommerce.common.locale.domain.LocaleGets theLocaleassociated with this content item.Returns the offlineFlag.Gets the integer priority of this content item.NOTE: This method is typically only used when wanting to persist newStructuredContentFields.Gets theStructuredContentTypeassociated with this content item.voidsetContentName(String contentName) Sets the name.voidsetFieldValues(Map<String, String> fieldValuesMap) Sets the transient fieldValues map on this StructuredContent.voidSets the primary key.voidsetLocale(org.broadleafcommerce.common.locale.domain.Locale locale) Sets the locale associated with this content item.voidsetOfflineFlag(Boolean offlineFlag) Sets the offline flag.voidsetPriority(Integer priority) Sets the display priority of this item.voidsetQualifyingItemCriteria(Set<StructuredContentItemCriteria> qualifyingItemCriteria) voidsetStructuredContentFieldXrefs(Map<String, StructuredContentFieldXref> structuredContentFields) Sets the structured content fields for this item.voidsetStructuredContentMatchRules(Map<String, StructuredContentRule> structuredContentMatchRules) voidsetStructuredContentType(StructuredContentType structuredContentType) Sets theStructuredContentTypeassociated with this content item.
-
Field Details
-
SC_DONT_DUPLICATE_SC_TYPE_HINT
- See Also:
-
id
-
contentName
-
locale
protected org.broadleafcommerce.common.locale.domain.Locale locale -
priority
-
qualifyingItemCriteria
-
structuredContentType
-
structuredContentFields
-
offlineFlag
-
fieldValuesMap
-
-
Constructor Details
-
StructuredContentImpl
public StructuredContentImpl()
-
-
Method Details
-
getId
Description copied from interface:StructuredContentGets the primary key.- Specified by:
getIdin interfaceStructuredContent- Returns:
- the primary key
-
setId
Description copied from interface:StructuredContentSets the primary key.- Specified by:
setIdin interfaceStructuredContent- Parameters:
id- the new primary key
-
getContentName
Description copied from interface:StructuredContentGets the name.- Specified by:
getContentNamein interfaceStructuredContent- Returns:
- the name
-
setContentName
Description copied from interface:StructuredContentSets the name.- Specified by:
setContentNamein interfaceStructuredContent
-
getLocale
public org.broadleafcommerce.common.locale.domain.Locale getLocale()Description copied from interface:StructuredContentGets theLocaleassociated with this content item.- Specified by:
getLocalein interfaceStructuredContent- Returns:
-
setLocale
public void setLocale(org.broadleafcommerce.common.locale.domain.Locale locale) Description copied from interface:StructuredContentSets the locale associated with this content item.- Specified by:
setLocalein interfaceStructuredContent
-
getStructuredContentType
Description copied from interface:StructuredContentGets theStructuredContentTypeassociated with this content item.- Specified by:
getStructuredContentTypein interfaceStructuredContent- Returns:
-
setStructuredContentType
Description copied from interface:StructuredContentSets theStructuredContentTypeassociated with this content item.- Specified by:
setStructuredContentTypein interfaceStructuredContent
-
getStructuredContentFieldXrefs
Description copied from interface:StructuredContentNOTE: This method is typically only used when wanting to persist newStructuredContentFields. Users trying to get a field to render should typically invokeStructuredContent.getFieldValues().Gets a map with the custom fields associated with this content item.
The map keys are based on the field types. For example, consider a content item with aStructuredContentTypeof ad which defined a field named targetUrl. The field could be accessed withstructuredContentItem.getStructuredContentFields().get("targetUrl")- Specified by:
getStructuredContentFieldXrefsin interfaceStructuredContent- Returns:
-
setStructuredContentFieldXrefs
public void setStructuredContentFieldXrefs(@Nullable Map<String, StructuredContentFieldXref> structuredContentFields) Description copied from interface:StructuredContentSets the structured content fields for this item. Would not typically be called outside of the ContentManagementSystem.- Specified by:
setStructuredContentFieldXrefsin interfaceStructuredContent
-
getFieldValue
Description copied from interface:StructuredContentReturns the value of the associatedStructuredContentFieldif the given fieldName exists in the map returned byStructuredContent.getStructuredContentFieldXrefs(), and null otherwise.- Specified by:
getFieldValuein interfaceStructuredContent- Returns:
- the value of the given field
-
getFieldValues
- Specified by:
getFieldValuesin interfaceStructuredContent- Returns:
- a map of
StructuredContentFieldfield key names to their associated values
-
setFieldValues
Description copied from interface:StructuredContentSets the transient fieldValues map on this StructuredContent.- Specified by:
setFieldValuesin interfaceStructuredContent
-
getOfflineFlag
Description copied from interface:StructuredContentReturns the offlineFlag. Indicates that the item 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:
getOfflineFlagin interfaceStructuredContent- Returns:
- true if this item is offline
-
setOfflineFlag
Description copied from interface:StructuredContentSets the offline flag.- Specified by:
setOfflineFlagin interfaceStructuredContent
-
getPriority
Description copied from interface:StructuredContentGets the integer priority of this content item. Items with a lower priority should be displayed before items with a higher priority.- Specified by:
getPriorityin interfaceStructuredContent- Returns:
- the priority as a numeric value
-
setPriority
Description copied from interface:StructuredContentSets the display priority of this item. Lower priorities should be displayed first.- Specified by:
setPriorityin interfaceStructuredContent
-
getStructuredContentMatchRules
- Specified by:
getStructuredContentMatchRulesin interfaceStructuredContent- Returns:
-
setStructuredContentMatchRules
public void setStructuredContentMatchRules(Map<String, StructuredContentRule> structuredContentMatchRules) - Specified by:
setStructuredContentMatchRulesin interfaceStructuredContent
-
getQualifyingItemCriteria
- Specified by:
getQualifyingItemCriteriain interfaceStructuredContent- Returns:
-
setQualifyingItemCriteria
- Specified by:
setQualifyingItemCriteriain interfaceStructuredContent
-
getMainEntityName
- Specified by:
getMainEntityNamein interfaceorg.broadleafcommerce.common.admin.domain.AdminMainEntity
-
createOrRetrieveCopyInstance
public <G extends StructuredContent> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceorg.broadleafcommerce.common.copy.MultiTenantCloneable<StructuredContent>- Throws:
CloneNotSupportedException
-