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 StoreVariant

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.Variant<T>
                  extended by org.torweg.pulse.site.content.AbstractBasicVariant<T>
                      extended by org.torweg.pulse.site.content.AbstractSummaryDescriptionVariant<StoreVariant>
                          extended by org.torweg.pulse.component.store.model.StoreVariant
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<StoreVariant>, ExtendedJDOMable, JDOMable, StoreItem, IHasAlternativeImages, IHasMainImage, IHasVariants, ILinkCorretable, INameable, INamed
Direct Known Subclasses:
ShopVariant

@Entity
public class StoreVariant
extends AbstractSummaryDescriptionVariant<StoreVariant>
implements StoreItem

Represents an article variant in the store.

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

Field Summary
 
Fields inherited from class org.torweg.pulse.site.content.Variant
LOGGER
 
Constructor Summary
StoreVariant()
          Deprecated. 
StoreVariant(java.lang.String pOrderCode)
          The constructor that sets the order code of the StoreVariant .
 
Method Summary
 StoreVariant createCopy(Content content)
          Creates a non-persistent (therefore id = null) copy of the current StoreVariant.
 org.jdom.Element deserializeToJDOM()
          Returns the state of the StoreVariant as a JDOM Element.
 org.jdom.Element deserializeToJDOM(ServiceRequest pServiceRequest)
          Returns the state of the StoreVariant as a JDOM Element.
 java.util.Set<StoreContentImageGroup> getAlternativeImages()
          Returns the alternative images of the StoreVariant.
 java.lang.StringBuilder getFullTextValue()
          returns the StoreVariant's textual information as it is supposed to be supplied for the index.
 StoreContentImageGroup getMainImage()
          Returns the main image of the StoreVariant.
 java.lang.String getOrderCode()
          Returns the order code of the StoreVariant.
 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 StoreVariant.
 void setContent(Content pStoreContent)
          Sets the StoreContent of the StoreVariant.
 void setMainImage(StoreContentImageGroup pMainImage)
          Sets the main image of the StoreVariant.
 void setOrderCode(java.lang.String pOrderCode)
          Sets the order code of the StoreVariant.
 void updateAssociatedFiles()
          Is called by the editors upon save actions to update the list of associated VirtualFiles.
 
Methods inherited from class org.torweg.pulse.site.content.AbstractSummaryDescriptionVariant
getDescription, getDescriptionElement, getLinkCorrectables, setDescription
 
Methods inherited from class org.torweg.pulse.site.content.AbstractBasicVariant
getContent, getSummary, getSummaryElement, setSummary
 
Methods inherited from class org.torweg.pulse.site.content.Variant
addVariant, compareTo, equals, getAssociatedVirtualFiles, getAttachments, getParentVariant, getVariants, hashCode, processHTML, removeVariant, setAssociatedVirtualFiles, setAttachments, setVariants, updateHTML
 
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, finalize, getClass, hashCode, notify, notifyAll, toString, 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
 
Methods inherited from interface org.torweg.pulse.site.content.IHasVariants
getVariants
 

Constructor Detail

StoreVariant

@Deprecated
public StoreVariant()
Deprecated. 

The default constructor used by HibernateTM.


StoreVariant

public StoreVariant(java.lang.String pOrderCode)
The constructor that sets the order code of the StoreVariant .

Parameters:
pOrderCode - the order code to be set.
Method Detail

getFullTextValue

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

Specified by:
getFullTextValue in interface StoreItem
Overrides:
getFullTextValue in class AbstractSummaryDescriptionVariant<StoreVariant>
Returns:
the StoreVariant's textual information
See Also:
AbstractBasicContent.getFullTextValue()

setContent

public void setContent(Content pStoreContent)
Sets the StoreContent of the StoreVariant.

Overrides:
setContent in class AbstractBasicVariant<StoreVariant>
Parameters:
pStoreContent - the StoreContent to be set.

getOrderCode

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

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

setOrderCode

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

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 StoreVariant.

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

setMainImage

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

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 StoreVariant.

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

setAlternativeImages

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

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 StoreVariant as a JDOM Element.

Specified by:
deserializeToJDOM in interface JDOMable
Overrides:
deserializeToJDOM in class AbstractBasicVariant<StoreVariant>
Returns:
the state of the StoreVariant as a JDOM Element.

deserializeToJDOM

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

Specified by:
deserializeToJDOM in interface ExtendedJDOMable
Overrides:
deserializeToJDOM in class AbstractBasicVariant<StoreVariant>
Parameters:
pServiceRequest - the current ServiceRequest or null.
Returns:
the state of the StoreVariant 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 Variant<StoreVariant>
Parameters:
file - the files that have been moved.

updateAssociatedFiles

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


createCopy

public StoreVariant createCopy(Content content)
Creates a non-persistent (therefore id = null) copy of the current StoreVariant.

Specified by:
createCopy in class Variant<StoreVariant>
Parameters:
content - the parent Content
Returns:
a copy of the StoreVariant.