org.broadleafcommerce.cms.structure.domain
Class StructuredContentImpl

java.lang.Object
  extended by org.broadleafcommerce.cms.structure.domain.StructuredContentImpl
All Implemented Interfaces:
Serializable, StructuredContent

@Entity
public class StructuredContentImpl
extends Object
implements StructuredContent

Created by bpolster.

See Also:
Serialized Form

Field Summary
protected  Boolean archivedFlag
           
protected  AdminAuditable auditable
           
protected  String contentName
           
protected  Boolean deletedFlag
           
protected  Long id
           
protected  Locale locale
           
protected  Boolean lockedFlag
           
protected  Boolean offlineFlag
           
protected  Long originalItemId
           
protected  SandBox originalSandBox
           
protected  Integer priority
           
protected  Set<StructuredContentItemCriteria> qualifyingItemCriteria
           
protected  SandBox sandbox
           
protected  Map<String,StructuredContentField> structuredContentFields
           
protected  StructuredContentType structuredContentType
           
 
Constructor Summary
StructuredContentImpl()
           
 
Method Summary
 StructuredContent cloneEntity()
          Builds a copy of this content item.
 Boolean getArchivedFlag()
          Gets the archived indicator.
 AdminAuditable getAuditable()
          Returns audit information for this content item.
 String getContentName()
          Gets the name.
 Boolean getDeletedFlag()
          Gets the "deleted" indicator.
 Long getId()
          Gets the primary key.
 Locale getLocale()
          Gets the Locale associated with this content item.
 Boolean getLockedFlag()
          Returns the locked flag.
 Boolean getOfflineFlag()
          Returns the offlineFlag.
 Long getOriginalItemId()
          Gets the id of a related content item on which this item is based.
 SandBox getOriginalSandBox()
          Gets the SandBox which originally edited this item.
 Integer getPriority()
          Gets the integer priority of this content item.
 Set<StructuredContentItemCriteria> getQualifyingItemCriteria()
          Returns the item (or cart) based rules associated with this content item.
 SandBox getSandbox()
          Gets the Sandbox associated with the content item.
 Map<String,StructuredContentField> getStructuredContentFields()
          Gets a map with the custom fields associated with this content item.
The map keys are based on the field types.
 Map<String,StructuredContentRule> getStructuredContentMatchRules()
          Returns a map of the targeting rules associated with this content item.
 StructuredContentType getStructuredContentType()
          Gets the StructuredContentType associated with this content item.
 void setArchivedFlag(Boolean archivedFlag)
          Sets the archived flag for this item.
 void setAuditable(AdminAuditable auditable)
          Sets audit information for this content item.
 void setContentName(String contentName)
          Sets the name.
 void setDeletedFlag(Boolean deletedFlag)
          Sets the deleted flag for this item.
 void setId(Long id)
          Sets the primary key.
 void setLocale(Locale locale)
          Sets the locale associated with this content item.
 void setLockedFlag(Boolean lockedFlag)
          Sets the lockedFlag for this item.
 void setOfflineFlag(Boolean offlineFlag)
          Sets the offline flag.
 void setOriginalItemId(Long originalItemId)
          The id of the item on which this content item is based.
 void setOriginalSandBox(SandBox originalSandBox)
          Sets the originalSandBox for this item.
 void setPriority(Integer priority)
          Sets the display priority of this item.
 void setQualifyingItemCriteria(Set<StructuredContentItemCriteria> qualifyingItemCriteria)
          Sets the item (e.g.
 void setSandbox(SandBox sandbox)
          Sets the SandBox for this content item.
 void setStructuredContentFields(Map<String,StructuredContentField> structuredContentFields)
          Sets the structured content fields for this item.
 void setStructuredContentMatchRules(Map<String,StructuredContentRule> structuredContentMatchRules)
          Sets the targeting rules for this content item.
 void setStructuredContentType(StructuredContentType structuredContentType)
          Sets the StructuredContentType associated with this content item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected Long id

auditable

protected AdminAuditable auditable

contentName

protected String contentName

locale

protected Locale locale

priority

protected Integer priority

qualifyingItemCriteria

protected Set<StructuredContentItemCriteria> qualifyingItemCriteria

originalItemId

protected Long originalItemId

sandbox

protected SandBox sandbox

originalSandBox

protected SandBox originalSandBox

structuredContentType

protected StructuredContentType structuredContentType

structuredContentFields

protected Map<String,StructuredContentField> structuredContentFields

deletedFlag

protected Boolean deletedFlag

archivedFlag

protected Boolean archivedFlag

offlineFlag

protected Boolean offlineFlag

lockedFlag

protected Boolean lockedFlag
Constructor Detail

StructuredContentImpl

public StructuredContentImpl()
Method Detail

getId

public Long getId()
Description copied from interface: StructuredContent
Gets the primary key.

Specified by:
getId in interface StructuredContent
Returns:
the primary key

setId

public void setId(Long id)
Description copied from interface: StructuredContent
Sets the primary key.

Specified by:
setId in interface StructuredContent
Parameters:
id - the new primary key

getContentName

public String getContentName()
Description copied from interface: StructuredContent
Gets the name.

Specified by:
getContentName in interface StructuredContent
Returns:
the name

setContentName

public void setContentName(String contentName)
Description copied from interface: StructuredContent
Sets the name.

Specified by:
setContentName in interface StructuredContent

getLocale

public Locale getLocale()
Description copied from interface: StructuredContent
Gets the Locale associated with this content item.

Specified by:
getLocale in interface StructuredContent
Returns:

setLocale

public void setLocale(Locale locale)
Description copied from interface: StructuredContent
Sets the locale associated with this content item.

Specified by:
setLocale in interface StructuredContent

getSandbox

public SandBox getSandbox()
Description copied from interface: StructuredContent
Gets the Sandbox associated with the content item. SandBoxes allow for segmentation of data. A result of null indicates that this item is in "Production" in a single-site architecture.
The processing may differ depending on which type of SandBox is returned.

Specified by:
getSandbox in interface StructuredContent
Returns:

setSandbox

public void setSandbox(SandBox sandbox)
Description copied from interface: StructuredContent
Sets the SandBox for this content item. This method is typically only called by the BLC Content Management System during content-item lifecycle operations like New, Promote, Approve, Deploy.

Specified by:
setSandbox in interface StructuredContent

getStructuredContentType

public StructuredContentType getStructuredContentType()
Description copied from interface: StructuredContent
Gets the StructuredContentType associated with this content item.

Specified by:
getStructuredContentType in interface StructuredContent
Returns:

setStructuredContentType

public void setStructuredContentType(StructuredContentType structuredContentType)
Description copied from interface: StructuredContent
Sets the StructuredContentType associated with this content item.

Specified by:
setStructuredContentType in interface StructuredContent

getStructuredContentFields

public Map<String,StructuredContentField> getStructuredContentFields()
Description copied from interface: StructuredContent
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 a StructuredContentType of ad which defined a field named targetUrl. The field could be accessed with structuredContentItem.getStructuredContentFields().get("targetUrl")

Specified by:
getStructuredContentFields in interface StructuredContent
Returns:

setStructuredContentFields

public void setStructuredContentFields(Map<String,StructuredContentField> structuredContentFields)
Description copied from interface: StructuredContent
Sets the structured content fields for this item. Would not typically called outside of the ContentManagementSystem.

Specified by:
setStructuredContentFields in interface StructuredContent

getDeletedFlag

public Boolean getDeletedFlag()
Description copied from interface: StructuredContent
Gets the "deleted" indicator. Deleted means that the item has been marked for deletion. If this method returns true, the item will not be returned as part StructuredContentService.lookupStructuredContentItemsByType(org.broadleafcommerce.openadmin.server.domain.SandBox, StructuredContentType, org.broadleafcommerce.common.locale.domain.Locale, Integer, java.util.Map)'s}. In a "production sandbox", an item that returns true for getDeletedFlag should also return true for getArchivedFlag

Specified by:
getDeletedFlag in interface StructuredContent
Returns:
the deleted indicator or false if none found

setDeletedFlag

public void setDeletedFlag(Boolean deletedFlag)
Description copied from interface: StructuredContent
Sets the deleted flag for this item. Would not typically be called outside of the Content Administration system.

Specified by:
setDeletedFlag in interface StructuredContent

getOfflineFlag

public Boolean getOfflineFlag()
Description copied from interface: StructuredContent
Returns 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:
getOfflineFlag in interface StructuredContent
Returns:
true if this item is offline

setOfflineFlag

public void setOfflineFlag(Boolean offlineFlag)
Description copied from interface: StructuredContent
Sets the offline flag.

Specified by:
setOfflineFlag in interface StructuredContent

getPriority

public Integer getPriority()
Description copied from interface: StructuredContent
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 StructuredContent
Returns:
the priority as a numeric value

setPriority

public void setPriority(Integer priority)
Description copied from interface: StructuredContent
Sets the display priority of this item. Lower priorities should be displayed first.

Specified by:
setPriority in interface StructuredContent

getOriginalItemId

public Long getOriginalItemId()
Description copied from interface: StructuredContent
Gets the id of a related content item on which this item is based. This value is used internally by the content management system. Generally, when an item is promoted through a content workflow to production, the system will set mark the item associated with the originalItemId as archived.

Specified by:
getOriginalItemId in interface StructuredContent
Returns:
the id of the originalItemId

setOriginalItemId

public void setOriginalItemId(Long originalItemId)
Description copied from interface: StructuredContent
The id of the item on which this content item is based. This property gets set by the content management system when an item is edited.

Specified by:
setOriginalItemId in interface StructuredContent

getArchivedFlag

public Boolean getArchivedFlag()
Description copied from interface: StructuredContent
Gets the archived indicator. The archivedFlag indicates that the item is no longer of importance to the system. Items that have been archived may be removed by a data cleanup process.

Specified by:
getArchivedFlag in interface StructuredContent
Returns:
true if this item has been archived. Returns false if not set.

setArchivedFlag

public void setArchivedFlag(Boolean archivedFlag)
Description copied from interface: StructuredContent
Sets the archived flag for this item. Would not typically be called outside the Content Administration system. Content items with an archived flag of true will not be returned from most APIs and can be deleted from the system.

Specified by:
setArchivedFlag in interface StructuredContent

getAuditable

public AdminAuditable getAuditable()
Description copied from interface: StructuredContent
Returns audit information for this content item.

Specified by:
getAuditable in interface StructuredContent
Returns:

setAuditable

public void setAuditable(AdminAuditable auditable)
Description copied from interface: StructuredContent
Sets audit information for this content item. Default implementations automatically populate this data during persistence.

Specified by:
setAuditable in interface StructuredContent

getLockedFlag

public Boolean getLockedFlag()
Description copied from interface: StructuredContent
Returns the locked flag. If an item is locked, it is being edited by another user.

Specified by:
getLockedFlag in interface StructuredContent
Returns:
true if this item is locked for editing.

setLockedFlag

public void setLockedFlag(Boolean lockedFlag)
Description copied from interface: StructuredContent
Sets the lockedFlag for this item.

Specified by:
setLockedFlag in interface StructuredContent

getOriginalSandBox

public SandBox getOriginalSandBox()
Description copied from interface: StructuredContent
Gets the SandBox which originally edited this item. Used by the Content Management System to determine where to return an item that is being rejected.

Specified by:
getOriginalSandBox in interface StructuredContent
Returns:

setOriginalSandBox

public void setOriginalSandBox(SandBox originalSandBox)
Description copied from interface: StructuredContent
Sets the originalSandBox for this item. The Content Management System will set this value when an item is promoted from a user sandbox.

Specified by:
setOriginalSandBox in interface StructuredContent

getStructuredContentMatchRules

public Map<String,StructuredContentRule> getStructuredContentMatchRules()
Description copied from interface: StructuredContent
Returns a map of the targeting rules associated with this content item. Targeting rules are defined in the content mangagement system and used to enforce which items are returned to the client.

Specified by:
getStructuredContentMatchRules in interface StructuredContent
Returns:

setStructuredContentMatchRules

public void setStructuredContentMatchRules(Map<String,StructuredContentRule> structuredContentMatchRules)
Description copied from interface: StructuredContent
Sets the targeting rules for this content item.

Specified by:
setStructuredContentMatchRules in interface StructuredContent

getQualifyingItemCriteria

public Set<StructuredContentItemCriteria> getQualifyingItemCriteria()
Description copied from interface: StructuredContent
Returns the item (or cart) based rules associated with this content item.

Specified by:
getQualifyingItemCriteria in interface StructuredContent
Returns:

setQualifyingItemCriteria

public void setQualifyingItemCriteria(Set<StructuredContentItemCriteria> qualifyingItemCriteria)
Description copied from interface: StructuredContent
Sets the item (e.g. cart) based rules associated with this content item.

Specified by:
setQualifyingItemCriteria in interface StructuredContent

cloneEntity

public StructuredContent cloneEntity()
Description copied from interface: StructuredContent
Builds a copy of this content item. Used by the content management system when an item is edited.

Specified by:
cloneEntity in interface StructuredContent
Returns:
a copy of this item


Copyright © 2011. All Rights Reserved.