|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.util.entity.AbstractNamedEntity
org.torweg.pulse.util.entity.AbstractNamableEntity
org.torweg.pulse.site.content.Content
@Entity public abstract class Content
An abstract base class for Contents referenced by a View in
the Sitemap.
| Constructor Summary | |
|---|---|
Content()
|
|
| Method Summary | |
|---|---|
int |
compareTo(Content pContent)
Compares two Contents
lexicographically. |
abstract Content |
createCopy(java.util.Locale l, User u)
creates and returns a non-persistent (therefore id = null) copy of the current Content with a given Locale. |
boolean |
equals(java.lang.Object pObject)
Determines whether the given Object is equal to the Content. |
java.util.Set<View> |
getAssociatedViews()
Returns the Views of the Content. |
java.util.Set<VirtualFile> |
getAssociatedVirtualFiles()
Returns the VirtualFiles of the Content. |
java.util.Set<Attachment> |
getAttachments()
Returns the Attachments of the Content. |
Bundle |
getBundle()
Returns the Bundle of the Content. |
java.util.Date |
getCreated()
Returns the Date of the creation of the content. |
java.lang.Long |
getCreatedMillis()
Returns the Date-millis of the creation of the content. |
User |
getCreator()
Returns the User which has created the Content. |
abstract java.lang.StringBuilder |
getFullTextValue()
Returns the StringBuilder to be indexed for site full text
searches. |
java.util.Date |
getLastModified()
Returns the Date of the last modification. |
User |
getLastModifier()
Returns the User which has last modified the Content. |
java.util.Locale |
getLocale()
Returns the Locale of the Content. |
ContentLocalizationMap |
getLocalizationMap()
Returns the ContentLocalizationMap of the Content. |
protected ContentLocalizationMap |
getLocalizationMapJAXB()
Deprecated. |
Duration |
getReferenceDuration()
returns the reference duration of the Content or null, if
no Duration has been set. |
ViewTypes |
getViewTypes()
Deprecated. |
int |
hashCode()
Returns a hash code for the Content. |
boolean |
hasReferenceDuration()
returns whether the Content has a reference duration. |
void |
initLazyFields()
initialises the content for display. |
static void |
initLazyImageGroups(IHasMainImage hasMainImage)
initialises lazy image groups for contents implementing IHasMainImage and/or IHasAlternativeImages. |
static void |
initLazyVariants(IHasVariants hasVariants)
initialises lazy variants for contents implementing IHasVariants. |
abstract boolean |
isGroup()
Determines whether the Content is a group. |
abstract void |
onVirtualFileSystemChange(VirtualFile file)
Is called by the VirtualFileSystem, if any associated VirtualFiles have been moved in the file system. |
protected static void |
processHTML(org.jdom.Element html,
java.util.Set<VirtualFile> files, VirtualFileSystem vfs)
Searches the given Element for VirtualFiles, adds them to
the given Set of VirtualFiles and adds a vfs-id
attribute to the corresponding Element. |
Duration |
removeReferenceDuration()
removes the current reference Duration and returns the previous
value. |
void |
setAssociatedVirtualFiles(java.util.Set<VirtualFile> pVirtualFiles)
Sets the VirtualFiles of the Content. |
void |
setAttachments(java.util.Set<Attachment> pAttachments)
Sets the Attachments of the Content. |
void |
setBundle(Bundle pBundle)
Sets the Bundle of the Content. |
void |
setCreator(User user)
Sets the User which has created the Content. |
void |
setLastModifier(User user)
Sets the User which has last modified the Content. |
void |
setLocale(java.util.Locale pLocale)
Sets the Locale of the Content. |
void |
setLocalizationMap(ContentLocalizationMap pLocalizationMap)
Sets the ContentLocalizationMap of the Content. |
void |
setReferenceDuration(Duration rd)
sets the reference duration of the Content. |
java.lang.String |
toString()
returns the Content's name and id. |
abstract void |
updateAssociatedVirtualFiles()
is called by the editors upon save actions to update the list of associated VirtualFiles. |
protected static org.jdom.Element |
updateHTML(org.jdom.Element html, VirtualFile file)
Updates the src and href attributes in the given Element, referencing VirtualFiles by a vfs-id attribute. |
protected void |
updateLocalizationMap(ContentLocalizationMap pLocalizationMap)
Is called by ContentLocalizationMap to update the ContentLocalizationMap of the Content. |
| 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, notify, notifyAll, wait, wait, wait |
| 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.util.ILinkCorretable |
|---|
getLinkCorrectables |
| Methods inherited from interface org.torweg.pulse.bundle.JDOMable |
|---|
deserializeToJDOM |
| Constructor Detail |
|---|
public Content()
| Method Detail |
|---|
public final User getCreator()
User which has created the Content.
public final void setCreator(User user)
User which has created the Content.
Does set the Date for created.
user - the creator to setpublic final java.util.Date getCreated()
Date of the creation of the content.
public final java.lang.Long getCreatedMillis()
Date-millis of the creation of the content.
Usage: for JAXB
public final User getLastModifier()
User which has last modified the Content.
public final void setLastModifier(User user)
User which has last modified the Content.
Does set the Date for lastModified.
user - the User to setpublic final java.util.Date getLastModified()
Date of the last modification.
public final java.util.Locale getLocale()
Locale of the Content.
Locale of the Content.public final void setLocale(java.util.Locale pLocale)
Locale of the Content.
pLocale - the Locale to be set.public final Bundle getBundle()
Bundle of the Content.
Bundle of the Content.public final void setBundle(Bundle pBundle)
Bundle of the Content.
pBundle - the Bundle to be set.public final ContentLocalizationMap getLocalizationMap()
ContentLocalizationMap of the Content.
ContentLocalizationMap of the Content.@Deprecated protected final ContentLocalizationMap getLocalizationMapJAXB()
public final void setLocalizationMap(ContentLocalizationMap pLocalizationMap)
ContentLocalizationMap of the Content.
pLocalizationMap - the ContentLocalizationMap to be set.protected final void updateLocalizationMap(ContentLocalizationMap pLocalizationMap)
ContentLocalizationMap to update the ContentLocalizationMap of the Content.
pLocalizationMap - the ContentLocalizationMap to be set.public final java.util.Set<View> getAssociatedViews()
Views of the Content.
Views of the Content. (shallow copy)public final void setAssociatedVirtualFiles(java.util.Set<VirtualFile> pVirtualFiles)
VirtualFiles of the Content.
pVirtualFiles - the VirtualFiles to be set. (overwrite matching)public final java.util.Set<VirtualFile> getAssociatedVirtualFiles()
VirtualFiles of the Content.
VirtualFiles of the Content. (reference)public final void setAttachments(java.util.Set<Attachment> pAttachments)
Attachments of the Content.
pAttachments - the Attachments to be set. (overwrite matching)public final java.util.Set<Attachment> getAttachments()
Attachments of the Content.
Attachments of the Content. (reference)public final boolean hasReferenceDuration()
Content has a reference duration.
true, if and only if a reference duration has been set.
Otherwise false.public final Duration getReferenceDuration()
Content or null, if
no Duration has been set.
Content or nullpublic final void setReferenceDuration(Duration rd)
Content.
rd - the reference durationpublic final Duration removeReferenceDuration()
Duration and returns the previous
value.
public final boolean equals(java.lang.Object pObject)
Object is equal to the Content.
equals in class AbstractBasicEntitypObject - the Object to be checked for equality with the Content.
true, if the given Object is equal to the Content. Returns false, otherwise.public final int hashCode()
Content.
hashCode in class AbstractBasicEntityContentAbstractBasicEntity.hashCode()public java.lang.String toString()
Content's name and id.
toString in class java.lang.ObjectgetName() + " [" + getId() + "]"Object.toString()public final int compareTo(Content pContent)
Contents
lexicographically. Note: See the details below for
a full explanation.
First, the names are compared lexicographically, using the Content's Locale. If the Content's Locale is
null, the Locale of the given Content is used. If
both Contents' Locales are null, the result of
getName().compareTo(pContent.getName()) is used instead.
If the Contents' names are lexicographically equal, their ids are compared afterwards. If any of the two ids is null, the comparison scheme of BasicObject is used.
compareTo in interface java.lang.Comparable<Content>pContent - the Content used for the comparison.
Content is less than, equal to, or
greater than the given Content.@Deprecated public final ViewTypes getViewTypes()
ViewTypes containing all Views that may be
combined with the Content.
ViewTypes containing all Views that may be
combined with the Content.public void initLazyFields()
public static final void initLazyVariants(IHasVariants hasVariants)
IHasVariants.
hasVariants - the IHasVariants to be initialisedpublic static final void initLazyImageGroups(IHasMainImage hasMainImage)
IHasMainImage and/or IHasAlternativeImages.
hasMainImage - the IHasMainImage to be initialisedpublic abstract boolean isGroup()
Content is a group.
A group is a Content generating its contents from its children in
the Sitemap.
true, if the Content is a group. Return false, otherwise.public abstract java.lang.StringBuilder getFullTextValue()
StringBuilder to be indexed for site full text
searches.
StringBuilder to be indexed for site full text
searches.public abstract void onVirtualFileSystemChange(VirtualFile file)
VirtualFileSystem, if any associated VirtualFiles have been moved in the file system.
file - the file that has been moved.public abstract void updateAssociatedVirtualFiles()
VirtualFiles.
public abstract Content createCopy(java.util.Locale l, User u)
throws java.lang.UnsupportedOperationException
Content with a given Locale.
l - the Locale to use for the the copyu - the User to be used as the creator/last modifier of
the copied Content
Content
java.lang.UnsupportedOperationException - where method is not supported (FilterContent, InstructionsContent)
protected static final void processHTML(org.jdom.Element html,
java.util.Set<VirtualFile> files, VirtualFileSystem vfs)
Element for VirtualFiles, adds them to
the given Set of VirtualFiles and adds a vfs-id
attribute to the corresponding Element.
html - the Element to be searched.files - the Set of VirtualFiles.vfs - an instance of the VirtualFileSystem.protected static final org.jdom.Element updateHTML(org.jdom.Element html, VirtualFile file)
src and href attributes in the given Element, referencing VirtualFiles by a vfs-id attribute.
html - the Element to be updated.file - the VirtualFiles that have been changed.
Element.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||