Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.sitemap.bean
Class ContentSiteLocation  view ContentSiteLocation download ContentSiteLocation.java

java.lang.Object
  extended bycom.RuntimeCollective.permission.bean.SimplePermissible
      extended bycom.RuntimeCollective.sitemap.bean.SimplePublishable
          extended bycom.RuntimeCollective.sitemap.bean.SimpleSiteLocation
              extended bycom.RuntimeCollective.sitemap.bean.ContentSiteLocation
All Implemented Interfaces:
com.RuntimeCollective.content.bean.Content, com.RuntimeCollective.webapps.bean.Duplicable, com.RuntimeCollective.webapps.bean.EntityBean, com.RuntimeCollective.permission.bean.Permissible, com.RuntimeCollective.webapps.bean.PermissionBean, Publishable, com.RuntimeCollective.search.bean.Searchable, java.io.Serializable, SiteLocation, com.RuntimeCollective.webapps.bean.Versioned
Direct Known Subclasses:
SiteNode

public class ContentSiteLocation
extends SimpleSiteLocation
implements com.RuntimeCollective.content.bean.Content, com.RuntimeCollective.search.bean.Searchable, com.RuntimeCollective.webapps.bean.Versioned

A SiteLocation, which is itself a Content, and which holds other Contents in given roles and positions.

It implements Searchable, so will be available to the site-wide search. It is now also Versioned, so that each CSL can be accessible in different versions.

Version:
$Id: ContentSiteLocation.java,v 1.59 2003/10/15 13:25:39 miles Exp $

Field Summary
protected static int ArraySize
          The default size of the TextComponent, Image, File and Link arrays
protected  int Author_id
          The author
protected  java.util.Date CreationDate
          The creation date bean
static java.lang.String DATABASE_TABLE
          The name of the database table for this bean type.
static java.lang.String DOTDOTDOT
           
static java.lang.String EMPTY_STRING
           
protected  java.util.HashMap ExplanatoryTexts
          The Explanatory Texts: for each SubContent mapping, we can set a description text
protected  boolean HiddenFromSearch
          Whether the CSL should be hidden from the Search
protected  java.util.Date LastModifiedDate
          The last modified date
protected  int LastModifierUser_id
          The last modifier user
static java.lang.String searchCategory
          The category, or section name, to "file" this object under in the search index.
static java.lang.String SITEMAP_CONTENT_MAP
          The name of the database table containing the sitemap-content map.
protected  java.util.HashMap SubContentIds
          The SubContents
protected  java.lang.String Title
          The Title
protected  int TitleLength
          The length of the title.
static java.lang.String USE_NAME_FOR_SEARCH_PARAM
          The RuntimeParameter which says whether we should use Name rather than Title for the SearchTitle.
private static java.lang.Boolean useNameForSearchNotTitleBoolean
           
protected  int VersionReference
           
protected  java.util.HashMap Versions
          A HashMap of all version ids for this object, and their version tag.
protected  java.lang.String VersionTag
           
 
Fields inherited from class com.RuntimeCollective.sitemap.bean.SimpleSiteLocation
Name, OfInterest, TheTemplateId, WebURLStub
 
Fields inherited from class com.RuntimeCollective.sitemap.bean.SimplePublishable
AlwaysLive, AND_STATUS, ESC, GoDeadDate, GoLiveDate, IsNew, NeedApproval, ORDER_BY_LAST_MOD_DATE, SELECT_ID_FROM, Status, StatusLastModifiedDate, WHERE_ALWAYS_LIVE
 
Fields inherited from class com.RuntimeCollective.permission.bean.SimplePermissible
DATABASE_PRULEMAP_TABLE, id, PermissionRuleIds
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
INTERFACE_BEAN, NULL_ID
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.Versioned
ARCHIVED_TAG, LIVE_TAG, TRUNK_TAG
 
Fields inherited from interface com.RuntimeCollective.sitemap.bean.Publishable
STATUS_APPROVED, STATUS_ARCHIVED, STATUS_EDITED, STATUS_TO_BE_APPROVED
 
Fields inherited from interface com.RuntimeCollective.permission.bean.Permissible
EDIT_ACTION, VIEW_ACTION
 
Constructor Summary
ContentSiteLocation()
          Construct a new blank ContentSiteLocation, giving it a new unique ID.
ContentSiteLocation(int id)
          Get a current ContentSiteLocation from the RuntimeDataSource, given an id.
 
Method Summary
 int addSubContent(java.lang.String role, com.RuntimeCollective.content.bean.Content content)
          Add a SubContent to this CSL under a given role, at the current max position + 1
 com.RuntimeCollective.webapps.bean.Versioned createOrReplaceVersion(java.lang.String referenceVersionTag, java.lang.String newVersionTag)
          Create and save a new version of this object based on a existing one, and tag it with the specified tag.
 com.RuntimeCollective.webapps.bean.Duplicable customiseDuplicate(com.RuntimeCollective.webapps.bean.Duplicable duplicate)
          The ContentSiteLocation version of this method will duplicate all the SubContents of the original, and assign those copies (and their ExplanatoryText) to the duplicate.
 void delete()
          Delete this bean from the database.
 void deleteContent()
          Delete content data and do version update.
 java.lang.String getAllImageCaptions()
          Return all the image captions, concatenated together.
 java.lang.String getAllLinkText()
          Return all the link text and descriptions, concatenated together.
 java.lang.String getAllTextComponentText()
          Return all the text component text, concatenated together.
 com.RuntimeCollective.webapps.bean.User getAuthor()
          Get the author
 java.util.Date getCreationDate()
          Get the creation date
 java.lang.String getDescription()
          Get the description
 java.lang.String getExplanatoryText(java.lang.String role, int position)
          Get the ExplanatoryText for this ContentSiteLocation for a given role and position
 java.util.Collection getFields()
          Get a Collection of Strings, for every Field that can be searched for on this object.
 java.lang.String getFullLink(javax.servlet.http.HttpServletRequest request)
           This method replaces getLink 55 .
 boolean getHiddenFromSearch()
          Get whether the CSL should be hidden from the Search.
 java.util.Iterator getIndexedSubContents(java.lang.String role)
          Get all the SubContents from this ContentSiteLocation for this role
 java.util.Date getLastModifiedDate()
          Get the last modified date
 com.RuntimeCollective.webapps.bean.User getLastModifierUser()
          Get the last modifier user.
 java.lang.String getLink()
          Deprecated. This method returns an absolute URL, i.e. it does not add the web app's context. This means you have to add it yourself but it's easy to forget. Changing the behaviour of this method might break code that does manage the context (e.g. the search package).
static ContentSiteLocation getLocationForContent(com.RuntimeCollective.content.bean.Content content)
          Get the location that contains a given piece of content.
 java.util.Iterator getRoles()
          Get all Roles for which SubContents are defined at the moment.
 java.lang.String getSearchSummary()
          Get a short, one paragraph summary for this searchable object.
 java.lang.String getSearchText()
          Get all text for this object that will be searched on.
 java.lang.String getSearchTitle()
          Get a one-line title for this searchable object.
 com.RuntimeCollective.content.bean.Content getSubContent(java.lang.String role, int position)
          Get one SubContent from this ContentSiteLocation
 java.util.Iterator getSubContents()
          Get all the SubContents from this ContentSiteLocation
 java.util.Iterator getSubContents(java.lang.String role)
          Get all the SubContents from this ContentSiteLocation for a given role, and without their positions
 java.lang.String getTitle()
          Get the title
 int getTitleLength()
          Get the title length.
 com.RuntimeCollective.webapps.bean.Versioned getVersion(java.lang.String versionTag)
          Get an existing version of this object.
 java.util.List getVersionList()
          Get a list of all versions, including the current one.
 int getVersionReference()
          Get the Reference of this Version, that is, the id of the first object in the family of versions.
 java.lang.String getVersionTag()
          Get the Tag of this Version.
 java.util.List getVersionTagList()
          Get the List.
static void indexLiveToday()
          Add all content that goes live today, to the search index.
 boolean isHiddenFromSearch()
          Get whether the CSL should be hidden from the Search.
 boolean isLive()
          The CSL version of this method checks whether there is a Live version, hence calls isLive(false).
 boolean isLive(boolean thisVersion)
          Checks whether this object, or its Live version, is live.
 void loadContent(int id)
          Load Content data.
 void loadSubContents(int id)
          Load SubContent data, and version update
 com.RuntimeCollective.webapps.bean.Duplicable makeDuplicate()
          The method to call when you want to create (and save) the duplicate of an object.
 com.RuntimeCollective.webapps.bean.Duplicable makeDuplicate(int duplicateId)
          The method to call when you want to create (and save) the duplicate of an object, while expliciting the id you want for the duplicate.
 com.RuntimeCollective.search.bean.Searchable[] populateIndex()
          Return a Searchable[] of all ContentSiteLocations that need to be added to the search index.
protected  java.util.HashMap readVersionsMap()
          Read from the database the list of VersionTags.
protected  void refreshVersionsMap(boolean allVersions)
          Refresh the List of VersionTags, for this object and all its versions
 boolean removeSubContent(com.RuntimeCollective.content.bean.Content content)
          Remove a SubContent from this ContentSiteLocation for all roles and positions possible
 boolean removeSubContent(java.lang.String role, com.RuntimeCollective.content.bean.Content content)
          Remove a SubContent from this ContentSiteLocation under a given role, and in all its positions (if more than one)
 java.lang.Integer[] removeSubContentReturnPos(java.lang.String role, com.RuntimeCollective.content.bean.Content content)
          Remove a SubContent from this ContentSiteLocation under a given role, and in all its positions (if more than one)
 java.util.Iterator removeSubcontentReturnPosRole(com.RuntimeCollective.content.bean.Content content)
          Remove a SubContent from this ContentSiteLocation for all roles and positions possible.
 void save()
          Save this bean to the database.
 void saveArchivedData()
          Special save method which only saves the necessary data when archiving the publishable.
 void saveContent()
          Save the Content data.
 void saveSubContent()
          Save the SubContent data.
 void setAuthor(com.RuntimeCollective.webapps.bean.User author)
          Set the author
 void setCreationDate(java.util.Date date)
          Set the creation date
 void setDescription(java.lang.String description)
          Set the description.
 void setExplanatoryText(java.lang.String role, int position, java.lang.String text)
          Set the explanatory text in this ContentSiteLocation for a given role and position
 void setHiddenFromSearch(boolean hidden)
          Set whether the CSL should be hidden from the Search.
 void setLastModifiedDate(java.util.Date date)
          Set the last modified date bean
 void setLastModifierUser(com.RuntimeCollective.webapps.bean.User user)
          Set the last modifier user
 void setSubContent(java.lang.String role, int position, com.RuntimeCollective.content.bean.Content subContent)
          Set one SubContent in this ContentSiteLocation, under a given role and position
 void setSubContent(java.lang.String role, int position, int id)
          Set one SubContent id in this ContentSiteLocation, under a given role and position
 void setTitle(java.lang.String title)
          Set the Title
 void setVersionReference(int reference)
          Set the Reference of this Version, that is, the id of the first object in the family of versions.
 void setVersionsMap(java.util.HashMap map)
          Set the HashMap of version ids and tags.
 void setVersionTag(java.lang.String tag)
          Set the Tag of this Version.
static void unindexDeadToday()
          Remove all content that goes dead today, from the search index.
static boolean useNameForSearchNotTitle()
           
 java.lang.Object viewFormat(java.lang.String format)
          Get the bean in a certain format.
 
Methods inherited from class com.RuntimeCollective.sitemap.bean.SimpleSiteLocation
deleteLinks, getBreadcrumb, getLinkOpenTag, getName, getOfInterest, getTheTemplate, getURL, getWebURLStub, isOfInterest, markAsArchived, setName, setOfInterest, setTheTemplate, setWebURLStub
 
Methods inherited from class com.RuntimeCollective.sitemap.bean.SimplePublishable
checkStillApproved, getAlwaysLive, getGoDeadDate, getGoLiveDate, getIsNew, getNeedApproval, getStatus, getStatusLastModifiedDate, getToBeApprovedPublishables, isAlwaysLive, isApproved, isArchived, isEdited, isNew, isToBeApproved, markAsApproved, markAsEdited, markAsToBeApproved, needsApproval, publish, setAlwaysLive, setGoDeadDate, setGoLiveDate, setIsNew, setNeedApproval, setStatus, setStatusLastModifiedDate
 
Methods inherited from class com.RuntimeCollective.permission.bean.SimplePermissible
canEdit, canPerformAction, canView, getActionPermissionRule, getActions, getAuthorisationPathForAction, getAuthorisationPathForAction, getId, loadRules, removeActionPermissionRule, saveRules, setActionPermissionRule, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
getId, setId
 
Methods inherited from interface com.RuntimeCollective.sitemap.bean.Publishable
getAlwaysLive, getGoDeadDate, getGoLiveDate, getIsNew, getNeedApproval, getStatus, getStatusLastModifiedDate, isAlwaysLive, isApproved, isArchived, isEdited, isNew, isToBeApproved, markAsApproved, markAsEdited, markAsToBeApproved, needsApproval, publish, setAlwaysLive, setGoDeadDate, setGoLiveDate, setIsNew, setNeedApproval, setStatus, setStatusLastModifiedDate
 
Methods inherited from interface com.RuntimeCollective.permission.bean.Permissible
canEdit, canPerformAction, canView, getActionPermissionRule, getActions, getAuthorisationPathForAction, getAuthorisationPathForAction, getId, setActionPermissionRule, setId
 

Field Detail

DATABASE_TABLE

public static final java.lang.String DATABASE_TABLE
The name of the database table for this bean type.

See Also:
Constant Field Values

SITEMAP_CONTENT_MAP

public static final java.lang.String SITEMAP_CONTENT_MAP
The name of the database table containing the sitemap-content map.

See Also:
Constant Field Values

USE_NAME_FOR_SEARCH_PARAM

public static final java.lang.String USE_NAME_FOR_SEARCH_PARAM
The RuntimeParameter which says whether we should use Name rather than Title for the SearchTitle.

See Also:
Constant Field Values

Author_id

protected int Author_id
The author


CreationDate

protected java.util.Date CreationDate
The creation date bean


LastModifiedDate

protected java.util.Date LastModifiedDate
The last modified date


LastModifierUser_id

protected int LastModifierUser_id
The last modifier user


DOTDOTDOT

public static java.lang.String DOTDOTDOT

EMPTY_STRING

public static java.lang.String EMPTY_STRING

Title

protected java.lang.String Title
The Title


TitleLength

protected int TitleLength
The length of the title.


HiddenFromSearch

protected boolean HiddenFromSearch
Whether the CSL should be hidden from the Search


SubContentIds

protected java.util.HashMap SubContentIds
The SubContents


ExplanatoryTexts

protected java.util.HashMap ExplanatoryTexts
The Explanatory Texts: for each SubContent mapping, we can set a description text


ArraySize

protected static int ArraySize
The default size of the TextComponent, Image, File and Link arrays


useNameForSearchNotTitleBoolean

private static java.lang.Boolean useNameForSearchNotTitleBoolean

searchCategory

public static java.lang.String searchCategory
The category, or section name, to "file" this object under in the search index.


VersionReference

protected int VersionReference

VersionTag

protected java.lang.String VersionTag

Versions

protected java.util.HashMap Versions
A HashMap of all version ids for this object, and their version tag.

Constructor Detail

ContentSiteLocation

public ContentSiteLocation()
                    throws java.sql.SQLException
Construct a new blank ContentSiteLocation, giving it a new unique ID.


ContentSiteLocation

public ContentSiteLocation(int id)
                    throws java.sql.SQLException
Get a current ContentSiteLocation from the RuntimeDataSource, given an id.

Method Detail

save

public void save()
Save this bean to the database.

Specified by:
save in interface com.RuntimeCollective.webapps.bean.EntityBean
Overrides:
save in class SimpleSiteLocation

saveContent

public void saveContent()
                 throws java.sql.SQLException
Save the Content data.


saveSubContent

public void saveSubContent()
                    throws java.sql.SQLException
Save the SubContent data.


saveArchivedData

public void saveArchivedData()
Special save method which only saves the necessary data when archiving the publishable. This supposes the object has been already saved. The saved data is : Status, StatusLastModifiedDate, LastModifiedDate, LastModifierUser.

Specified by:
saveArchivedData in interface Publishable
Overrides:
saveArchivedData in class SimplePublishable

delete

public void delete()
Delete this bean from the database.

Specified by:
delete in interface com.RuntimeCollective.webapps.bean.EntityBean
Overrides:
delete in class SimpleSiteLocation

deleteContent

public void deleteContent()
                   throws java.sql.SQLException
Delete content data and do version update.


setAuthor

public void setAuthor(com.RuntimeCollective.webapps.bean.User author)
Set the author

Specified by:
setAuthor in interface com.RuntimeCollective.content.bean.Content

getAuthor

public com.RuntimeCollective.webapps.bean.User getAuthor()
Get the author

Specified by:
getAuthor in interface com.RuntimeCollective.content.bean.Content

setCreationDate

public void setCreationDate(java.util.Date date)
Set the creation date

Specified by:
setCreationDate in interface com.RuntimeCollective.content.bean.Content

getCreationDate

public java.util.Date getCreationDate()
Get the creation date

Specified by:
getCreationDate in interface com.RuntimeCollective.content.bean.Content

setLastModifiedDate

public void setLastModifiedDate(java.util.Date date)
Set the last modified date bean

Specified by:
setLastModifiedDate in interface com.RuntimeCollective.content.bean.Content

getLastModifiedDate

public java.util.Date getLastModifiedDate()
Get the last modified date

Specified by:
getLastModifiedDate in interface com.RuntimeCollective.content.bean.Content

setLastModifierUser

public void setLastModifierUser(com.RuntimeCollective.webapps.bean.User user)
Set the last modifier user

Specified by:
setLastModifierUser in interface com.RuntimeCollective.content.bean.Content

getLastModifierUser

public com.RuntimeCollective.webapps.bean.User getLastModifierUser()
Get the last modifier user.

Specified by:
getLastModifierUser in interface com.RuntimeCollective.content.bean.Content

getTitle

public java.lang.String getTitle()
Get the title

Specified by:
getTitle in interface com.RuntimeCollective.content.bean.Content
Overrides:
getTitle in class SimpleSiteLocation

getDescription

public java.lang.String getDescription()
Get the description

Specified by:
getDescription in interface com.RuntimeCollective.content.bean.Content
Overrides:
getDescription in class SimpleSiteLocation

setDescription

public void setDescription(java.lang.String description)
Set the description. NB: this does nothing.

Specified by:
setDescription in interface com.RuntimeCollective.content.bean.Content

viewFormat

public java.lang.Object viewFormat(java.lang.String format)
Get the bean in a certain format.

Specified by:
viewFormat in interface com.RuntimeCollective.content.bean.Content

setTitle

public void setTitle(java.lang.String title)
Set the Title

Specified by:
setTitle in interface com.RuntimeCollective.content.bean.Content

getTitleLength

public int getTitleLength()
Get the title length.


setHiddenFromSearch

public void setHiddenFromSearch(boolean hidden)
Set whether the CSL should be hidden from the Search.


getHiddenFromSearch

public boolean getHiddenFromSearch()
Get whether the CSL should be hidden from the Search.


isHiddenFromSearch

public boolean isHiddenFromSearch()
Get whether the CSL should be hidden from the Search.


getRoles

public java.util.Iterator getRoles()
Get all Roles for which SubContents are defined at the moment.


setSubContent

public void setSubContent(java.lang.String role,
                          int position,
                          com.RuntimeCollective.content.bean.Content subContent)
Set one SubContent in this ContentSiteLocation, under a given role and position


setSubContent

public void setSubContent(java.lang.String role,
                          int position,
                          int id)
Set one SubContent id in this ContentSiteLocation, under a given role and position


getSubContent

public com.RuntimeCollective.content.bean.Content getSubContent(java.lang.String role,
                                                                int position)
Get one SubContent from this ContentSiteLocation


getIndexedSubContents

public java.util.Iterator getIndexedSubContents(java.lang.String role)
Get all the SubContents from this ContentSiteLocation for this role


getSubContents

public java.util.Iterator getSubContents(java.lang.String role)
Get all the SubContents from this ContentSiteLocation for a given role, and without their positions


getSubContents

public java.util.Iterator getSubContents()
Get all the SubContents from this ContentSiteLocation


removeSubContent

public boolean removeSubContent(java.lang.String role,
                                com.RuntimeCollective.content.bean.Content content)
Remove a SubContent from this ContentSiteLocation under a given role, and in all its positions (if more than one)


removeSubContentReturnPos

public java.lang.Integer[] removeSubContentReturnPos(java.lang.String role,
                                                     com.RuntimeCollective.content.bean.Content content)
Remove a SubContent from this ContentSiteLocation under a given role, and in all its positions (if more than one)


removeSubContent

public boolean removeSubContent(com.RuntimeCollective.content.bean.Content content)
Remove a SubContent from this ContentSiteLocation for all roles and positions possible


removeSubcontentReturnPosRole

public java.util.Iterator removeSubcontentReturnPosRole(com.RuntimeCollective.content.bean.Content content)
Remove a SubContent from this ContentSiteLocation for all roles and positions possible. Does the same as removeSubContent(Content content), but returns which pieces of subcontent were deleted, and which position(s) they were in.


addSubContent

public int addSubContent(java.lang.String role,
                         com.RuntimeCollective.content.bean.Content content)
Add a SubContent to this CSL under a given role, at the current max position + 1


setExplanatoryText

public void setExplanatoryText(java.lang.String role,
                               int position,
                               java.lang.String text)
Set the explanatory text in this ContentSiteLocation for a given role and position


getExplanatoryText

public java.lang.String getExplanatoryText(java.lang.String role,
                                           int position)
Get the ExplanatoryText for this ContentSiteLocation for a given role and position


loadContent

public void loadContent(int id)
                 throws java.sql.SQLException
Load Content data.


loadSubContents

public void loadSubContents(int id)
                     throws java.sql.SQLException
Load SubContent data, and version update


useNameForSearchNotTitle

public static boolean useNameForSearchNotTitle()

getSearchTitle

public java.lang.String getSearchTitle()
Get a one-line title for this searchable object.

Specified by:
getSearchTitle in interface com.RuntimeCollective.search.bean.Searchable

getSearchSummary

public java.lang.String getSearchSummary()
Get a short, one paragraph summary for this searchable object.

Specified by:
getSearchSummary in interface com.RuntimeCollective.search.bean.Searchable

getSearchText

public java.lang.String getSearchText()
Get all text for this object that will be searched on.

Specified by:
getSearchText in interface com.RuntimeCollective.search.bean.Searchable

getFields

public java.util.Collection getFields()
Get a Collection of Strings, for every Field that can be searched for on this object. For ContentSiteLocation, these are:
  • Title
  • AllTextComponentText
  • AllLinkText
  • AllImageCaptions

Specified by:
getFields in interface com.RuntimeCollective.search.bean.Searchable

getLink

public java.lang.String getLink()
Deprecated. This method returns an absolute URL, i.e. it does not add the web app's context. This means you have to add it yourself but it's easy to forget. Changing the behaviour of this method might break code that does manage the context (e.g. the search package).

Get a link that will display this object.

(ok, so this is a bit of a hack - there must be a better way, possibly with forwards)

Specified by:
getLink in interface com.RuntimeCollective.search.bean.Searchable

getFullLink

public java.lang.String getFullLink(javax.servlet.http.HttpServletRequest request)

This method replaces getLink 55 . This method returns the link including the context. e.g.

getLink() returns /viewPage.jsp?id=xx.

getFullLink() returns /context/viewPage.jsp?id=xx.

N.B. the links does not include the protocol or host name.


populateIndex

public com.RuntimeCollective.search.bean.Searchable[] populateIndex()
                                                             throws com.RuntimeCollective.search.SearchException
Return a Searchable[] of all ContentSiteLocations that need to be added to the search index. Populate the search index with all instances of this class that should be searchable. Assumes an empty index. This will run through all ContentSiteLocations, adding each one that returns true for isLive().

Specified by:
populateIndex in interface com.RuntimeCollective.search.bean.Searchable

getAllTextComponentText

public java.lang.String getAllTextComponentText()
Return all the text component text, concatenated together. Only really useful for advanced search.


getAllLinkText

public java.lang.String getAllLinkText()
Return all the link text and descriptions, concatenated together. Only really useful for advanced search.


getAllImageCaptions

public java.lang.String getAllImageCaptions()
Return all the image captions, concatenated together. Only really useful for advanced search.


indexLiveToday

public static void indexLiveToday()
                           throws com.RuntimeCollective.search.SearchException
Add all content that goes live today, to the search index. This method is called once per day, ideally just after midnight, by UpdateIndex.


unindexDeadToday

public static void unindexDeadToday()
                             throws com.RuntimeCollective.search.SearchException
Remove all content that goes dead today, from the search index. This method is called once per day, ideally just after midnight, by UpdateIndex.


makeDuplicate

public com.RuntimeCollective.webapps.bean.Duplicable makeDuplicate()
The method to call when you want to create (and save) the duplicate of an object.

This will call makeDuplicate(int) with a fresh new id.

Specified by:
makeDuplicate in interface com.RuntimeCollective.webapps.bean.Duplicable

makeDuplicate

public com.RuntimeCollective.webapps.bean.Duplicable makeDuplicate(int duplicateId)
The method to call when you want to create (and save) the duplicate of an object, while expliciting the id you want for the duplicate.

To use with care, as obviously the bean using that id will be overwritten. It is "recommended" that the overwritten bean be of the same type as the object being duplicated.

Implementation-wise, this method will make a raw duplicate (ie clone itself by changing its own id), and then call the customiseDuplicate() method where class-specific code should reside.

Specified by:
makeDuplicate in interface com.RuntimeCollective.webapps.bean.Duplicable

customiseDuplicate

public com.RuntimeCollective.webapps.bean.Duplicable customiseDuplicate(com.RuntimeCollective.webapps.bean.Duplicable duplicate)
The ContentSiteLocation version of this method will duplicate all the SubContents of the original, and assign those copies (and their ExplanatoryText) to the duplicate.

Specified by:
customiseDuplicate in interface com.RuntimeCollective.webapps.bean.Duplicable

setVersionReference

public void setVersionReference(int reference)
Set the Reference of this Version, that is, the id of the first object in the family of versions. This should not really be called directly.

Specified by:
setVersionReference in interface com.RuntimeCollective.webapps.bean.Versioned

getVersionReference

public int getVersionReference()
Get the Reference of this Version, that is, the id of the first object in the family of versions.

Specified by:
getVersionReference in interface com.RuntimeCollective.webapps.bean.Versioned

setVersionTag

public void setVersionTag(java.lang.String tag)
Set the Tag of this Version. This should not really be called directly.

Specified by:
setVersionTag in interface com.RuntimeCollective.webapps.bean.Versioned

getVersionTag

public java.lang.String getVersionTag()
Get the Tag of this Version.

Specified by:
getVersionTag in interface com.RuntimeCollective.webapps.bean.Versioned

getVersionTagList

public java.util.List getVersionTagList()
Get the List.

Specified by:
getVersionTagList in interface com.RuntimeCollective.webapps.bean.Versioned

getVersionList

public java.util.List getVersionList()
Get a list of all versions, including the current one.


readVersionsMap

protected java.util.HashMap readVersionsMap()
Read from the database the list of VersionTags.


refreshVersionsMap

protected void refreshVersionsMap(boolean allVersions)
Refresh the List of VersionTags, for this object and all its versions


createOrReplaceVersion

public com.RuntimeCollective.webapps.bean.Versioned createOrReplaceVersion(java.lang.String referenceVersionTag,
                                                                           java.lang.String newVersionTag)
Create and save a new version of this object based on a existing one, and tag it with the specified tag. If a version with the newVersionTag already exists, it will be overwritten - ie its id will be reused.

The reference version should already exist, otherwise this method will do nothing and return "null".
A version with the newVersionTag may or may not exist: if it doesn't, it will be created - if it does, it will be overwritten.

Specified by:
createOrReplaceVersion in interface com.RuntimeCollective.webapps.bean.Versioned

setVersionsMap

public void setVersionsMap(java.util.HashMap map)
Set the HashMap of version ids and tags.


getVersion

public com.RuntimeCollective.webapps.bean.Versioned getVersion(java.lang.String versionTag)
Get an existing version of this object.

The version should already exist. It is doesn't, then this method will do nothing and return "null".

Specified by:
getVersion in interface com.RuntimeCollective.webapps.bean.Versioned

isLive

public boolean isLive()
The CSL version of this method checks whether there is a Live version, hence calls isLive(false).

Specified by:
isLive in interface Publishable
Overrides:
isLive in class SimplePublishable

isLive

public boolean isLive(boolean thisVersion)
Checks whether this object, or its Live version, is live.

If thisVersion is set to true, this method returns the isLive() of this object (by calling the super method).
Otherwise, *and* if a Live version of this object exists, it will return the isLive() of the Live version. If there is no Live version, it will return this object's isLive() (ie not necessarily the Trunk version!).


getLocationForContent

public static ContentSiteLocation getLocationForContent(com.RuntimeCollective.content.bean.Content content)
Get the location that contains a given piece of content.