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.site.content
Class URLContent

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.URLContent
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Content>, ExtendedJDOMable, JDOMable, ILinkCorretable, INameable, INamed

@Entity
public class URLContent
extends AbstractBasicContent

An URLContent represents a Content which simply provides a URL, e.g. for providing an external link via the menu.

Version:
$Revision: 1398 $
Author:
Daniel Dietz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.torweg.pulse.site.content.AbstractBasicContent
DEFAULT_SUFFIX
 
Constructor Summary
protected URLContent()
          Default constructor.
  URLContent(java.util.Locale locale, Bundle bundle)
          Creates a URLContent with the given Locale and the given Bundle.
  URLContent(java.lang.String name, java.util.Locale locale, Bundle bundle)
          Creates a URLContent with the given Locale and the given Bundle.
 
Method Summary
 URLContent createCopy(java.util.Locale l, User u)
          Creates a copy of the URLContent with the given Locale.
 org.jdom.Element deserializeToJDOM()
          Deserialises the state of the URLContent as a JDOM Element.
 org.jdom.Element deserializeToJDOM(ServiceRequest request)
          Deserialises the state of the URLContent as a JDOM Element building access URLs based on the current request.
 java.lang.String getUrl()
          Returns the URL of the URLContent.
 boolean isGroup()
          Determines whether this Contentis a group.
 void onVirtualFileSystemChange(VirtualFile f)
          Is called by the VirtualFileSystem, if any associated VirtualFiles have been moved in the file system.
 void setUrl(java.lang.String urlString)
          Sets the URL of the URLContent.
 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.AbstractBasicContent
getFullTextValue, getKeywords, getLinkCorrectables, 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, 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
 

Constructor Detail

URLContent

protected URLContent()
Default constructor.


URLContent

public URLContent(java.util.Locale locale, Bundle bundle)
Creates a URLContent with the given Locale and the given Bundle.

Parameters:
locale - the Locale
bundle - the Bundle

URLContent

public URLContent(java.lang.String name,
                  java.util.Locale locale, Bundle bundle)
Creates a URLContent with the given Locale and the given Bundle.

Parameters:
name - the name
locale - the Locale
bundle - the Bundle
Method Detail

getUrl

public final java.lang.String getUrl()
Returns the URL of the URLContent.

Returns:
the URL of the URLContent

setUrl

public final void setUrl(java.lang.String urlString)
Sets the URL of the URLContent.

Parameters:
urlString - the URL to set

isGroup

public boolean isGroup()
Determines whether this Contentis a group.

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

createCopy

public URLContent createCopy(java.util.Locale l, User u)
Creates a copy of the URLContent with the given Locale.

Specified by:
createCopy in class AbstractBasicContent
Parameters:
l - the Locale
u - the User to be used as the creator/last modifier of the copied Content
Returns:
an URLContent, the created copy

updateAssociatedVirtualFiles

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

Specified by:
updateAssociatedVirtualFiles in class Content

onVirtualFileSystemChange

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

Specified by:
onVirtualFileSystemChange in class Content
Parameters:
f - the files that have been moved.
See Also:
Content.onVirtualFileSystemChange(VirtualFile)

deserializeToJDOM

public final org.jdom.Element deserializeToJDOM()
Deserialises the state of the URLContent as a JDOM Element.

Specified by:
deserializeToJDOM in interface JDOMable
Overrides:
deserializeToJDOM in class AbstractBasicContent
Returns:
the state of the URLContent as a JDOM Element

deserializeToJDOM

public final org.jdom.Element deserializeToJDOM(ServiceRequest request)
Deserialises the state of the URLContent as a JDOM Element building access URLs based on the current request.

Specified by:
deserializeToJDOM in interface ExtendedJDOMable
Overrides:
deserializeToJDOM in class AbstractBasicContent
Parameters:
request - the current ServiceRequest
Returns:
the state of the URLContent as a JDOM Element