pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.store.model
Class StoreContent

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.util.entity.AbstractNamedEntity
          extended by org.torweg.pulse.util.entity.AbstractNamableEntity
              extended by org.torweg.pulse.site.content.Content
                  extended by org.torweg.pulse.site.content.AbstractBasicContent
                      extended by org.torweg.pulse.site.content.AbstractSummaryDescriptionContent
                          extended by org.torweg.pulse.component.store.model.StoreContent
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Content>, ExtendedJDOMable, JDOMable, StoreItem, IHasAlternativeImages, IHasMainImage, IHasVariants, ILinkCorretable, INameable, INamed
Direct Known Subclasses:
ShopContent

@Entity
public class StoreContent
extends AbstractSummaryDescriptionContent
implements StoreItem, IHasVariants

Represents an article in the store.

Version:
$Revision: 1969 $
Author:
Christian Schatt, Thomas Weber, Daniel Dietz
See Also:
Serialized Form

Field Summary
static org.slf4j.Logger LOGGER
          the logger.
 
Fields inherited from class org.torweg.pulse.site.content.AbstractBasicContent
DEFAULT_SUFFIX
 
Constructor Summary
StoreContent()
          Deprecated. 
StoreContent(java.util.Locale pLocale, Bundle pBundle)
          The constructor that sets the Locale and the Bundle of the StoreContent.
 
Method Summary
 StoreContent createCopy(java.util.Locale l, User u)
          Creates a non-persistent (therefore id = null) copy of the current StoreContent with the given Locale.
 org.jdom.Element deserializeToJDOM()
          Returns the state of the StoreContent as a JDOM Element.
 org.jdom.Element deserializeToJDOM(ServiceRequest pServiceRequest)
          Returns the state of the StoreContent as a JDOM Element.
 java.util.Set<StoreContentImageGroup> getAlternativeImages()
          Returns the alternative images of the StoreContent.
 java.lang.StringBuilder getFullTextValue()
          returns the StoreContent's textual information as it is supposed to be supplied for the index.
 java.util.Set<ILinkCorrectableElement> getLinkCorrectables()
          a set with the Elements to be corrected.
 StoreContentImageGroup getMainImage()
          Returns the main image of the StoreContent.
 java.lang.String getOrderCode()
          Returns the order code of the StoreContent.
 java.util.Set<? extends Variant<?>> getVariants()
          Returns the StoreVariants of the StoreContent.
 boolean isGroup()
          returns false.
 void onVirtualFileSystemChange(VirtualFile file)
          Is called by the VirtualFileSystem, if any associated VirtualFiles have been moved in the file system.
 void setAlternativeImages(java.util.Set<StoreContentImageGroup> pAlternativeImages)
          Sets the alternative images of the StoreContent.
 void setMainImage(StoreContentImageGroup pMainImage)
          Sets the main image of the StoreContent.
 void setOrderCode(java.lang.String pOrderCode)
          Sets the order code of the StoreContent.
 void setVariants(java.util.Set<? extends Variant<?>> pStoreVariants)
          Sets the StoreVariants of the StoreContent.
 void updateAssociatedVirtualFiles()
          Is called by the editors upon save actions to update the list of associated VirtualFiles.
 
Methods inherited from class org.torweg.pulse.site.content.AbstractSummaryDescriptionContent
getDescription, getDescriptionElement, setDescription
 
Methods inherited from class org.torweg.pulse.site.content.AbstractBasicContent
getKeywords, getMetaDescription, getMetaKeywords, getSuffix, getSummary, getSummaryElement, getTitle, setKeywords, setMetaDescription, setMetaKeywords, setSuffix, setSummary, setTitle
 
Methods inherited from class org.torweg.pulse.site.content.Content
compareTo, equals, getAssociatedViews, getAssociatedVirtualFiles, getAttachments, getBundle, getCreated, getCreatedMillis, getCreator, getLastModified, getLastModifier, getLocale, getLocalizationMap, getLocalizationMapJAXB, getReferenceDuration, getViewTypes, hashCode, hasReferenceDuration, initLazyFields, initLazyImageGroups, initLazyVariants, processHTML, removeReferenceDuration, setAssociatedVirtualFiles, setAttachments, setBundle, setCreator, setLastModifier, setLocale, setLocalizationMap, setReferenceDuration, toString, updateHTML, updateLocalizationMap
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractNamableEntity
setName
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractNamedEntity
getName
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, getFullQualifiedClassNameJAXB, getId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.torweg.pulse.component.store.model.StoreItem
equals, getAssociatedVirtualFiles, getAttachments, getDescription, getDescriptionElement, getId, getSummary, getSummaryElement, hashCode, setAssociatedVirtualFiles, setAttachments, setDescription, setSummary
 
Methods inherited from interface org.torweg.pulse.util.INameable
setName
 
Methods inherited from interface org.torweg.pulse.util.INamed
getName
 

Field Detail

LOGGER

public static final org.slf4j.Logger LOGGER
the logger.

Constructor Detail

StoreContent

@Deprecated
public StoreContent()
Deprecated. 

The default constructor used by HibernateTM.


StoreContent

public StoreContent(java.util.Locale pLocale, Bundle pBundle)
The constructor that sets the Locale and the Bundle of the StoreContent.

Parameters:
pLocale - the Locale to be set.
pBundle - the Bundle to be set.
Method Detail

getFullTextValue

public java.lang.StringBuilder getFullTextValue()
returns the StoreContent's textual information as it is supposed to be supplied for the index.

Specified by:
getFullTextValue in interface StoreItem
Overrides:
getFullTextValue in class AbstractSummaryDescriptionContent
Returns:
the StoreContent's textual information
See Also:
AbstractBasicContent.getFullTextValue()

getVariants

public java.util.Set<? extends Variant<?>> getVariants()
Returns the StoreVariants of the StoreContent.

Specified by:
getVariants in interface IHasVariants
Returns:
the StoreVariants of the StoreContent. (shallow copy)

setVariants

public void setVariants(java.util.Set<? extends Variant<?>> pStoreVariants)
Sets the StoreVariants of the StoreContent.

Parameters:
pStoreVariants - the StoreVariants to be set. (final)

getOrderCode

public final java.lang.String getOrderCode()
Returns the order code of the StoreContent.

Specified by:
getOrderCode in interface StoreItem
Returns:
the order code of the StoreContent.

setOrderCode

public final void setOrderCode(java.lang.String pOrderCode)
Sets the order code of the StoreContent.

Specified by:
setOrderCode in interface StoreItem
Parameters:
pOrderCode - the order code to be set.

getMainImage

public final StoreContentImageGroup getMainImage()
Returns the main image of the StoreContent.

Specified by:
getMainImage in interface StoreItem
Specified by:
getMainImage in interface IHasMainImage
Returns:
the main image of the StoreContent

setMainImage

public final void setMainImage(StoreContentImageGroup pMainImage)
Sets the main image of the StoreContent.

Specified by:
setMainImage in interface StoreItem
Parameters:
pMainImage - the main image to be set.

getAlternativeImages

public final java.util.Set<StoreContentImageGroup> getAlternativeImages()
Returns the alternative images of the StoreContent.

Specified by:
getAlternativeImages in interface StoreItem
Specified by:
getAlternativeImages in interface IHasAlternativeImages
Returns:
the alternative images of the StoreContent. (shallow copy)

setAlternativeImages

public final void setAlternativeImages(java.util.Set<StoreContentImageGroup> pAlternativeImages)
Sets the alternative images of the StoreContent.

Specified by:
setAlternativeImages in interface StoreItem
Parameters:
pAlternativeImages - the alternative images to be set. (final)

deserializeToJDOM

public org.jdom.Element deserializeToJDOM()
Returns the state of the StoreContent as a JDOM Element.

Specified by:
deserializeToJDOM in interface JDOMable
Overrides:
deserializeToJDOM in class AbstractSummaryDescriptionContent
Returns:
the state of the StoreContent as a JDOM Element.

deserializeToJDOM

public org.jdom.Element deserializeToJDOM(ServiceRequest pServiceRequest)
Returns the state of the StoreContent as a JDOM Element.

Specified by:
deserializeToJDOM in interface ExtendedJDOMable
Overrides:
deserializeToJDOM in class AbstractSummaryDescriptionContent
Parameters:
pServiceRequest - the current ServiceRequest or null.
Returns:
the state of the StoreContent as a JDOM Element.

onVirtualFileSystemChange

public void onVirtualFileSystemChange(VirtualFile file)
Is called by the VirtualFileSystem, if any associated VirtualFiles have been moved in the file system.

Specified by:
onVirtualFileSystemChange in interface StoreItem
Specified by:
onVirtualFileSystemChange in class Content
Parameters:
file - the files that have been moved.

updateAssociatedVirtualFiles

public void updateAssociatedVirtualFiles()
Is called by the editors upon save actions to update the list of associated VirtualFiles.

Specified by:
updateAssociatedVirtualFiles in class Content

isGroup

public final boolean isGroup()
returns false.

Specified by:
isGroup in class Content
Returns:
false.
See Also:
Content.isGroup()

getLinkCorrectables

public java.util.Set<ILinkCorrectableElement> getLinkCorrectables()
Description copied from interface: ILinkCorretable
a set with the Elements to be corrected.

Specified by:
getLinkCorrectables in interface ILinkCorretable
Overrides:
getLinkCorrectables in class AbstractSummaryDescriptionContent
Returns:
the set of ILinkCorrectableElements
See Also:
AbstractSummaryDescriptionContent.getLinkCorrectables()

createCopy

public StoreContent createCopy(java.util.Locale l, User u)
Creates a non-persistent (therefore id = null) copy of the current StoreContent with the given Locale.

Specified by:
createCopy in class AbstractBasicContent
Parameters:
l - the Locale to be used.
u - the User to be used as the creator/last modifier of the copied Content
Returns:
a copy of the StoreContent.