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

Quick Search    Search Deep

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

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

public class SimpleSiteLocation
extends SimplePublishable
implements SiteLocation

A commodity class which implements all the basic functionality of SiteLocation, so we can spare duplicating lots of simple code.

It reuses SimplePublishable.

This class should be subclassed to add more functionality.

Version:
$Id: SimpleSiteLocation.java,v 1.19 2003/09/30 15:12:59 joe Exp $

Field Summary
static java.lang.String DATABASE_TABLE
          The name of the database table for this bean type.
protected  java.lang.String Name
          The name
protected  boolean OfInterest
          Is this SiteLocation is of interest, ie should we record hits on it ?
protected  int TheTemplateId
          The Template used by this SiteLocation
protected  java.lang.String WebURLStub
          The URL stub (e.g.
 
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.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
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
INTERFACE_BEAN, NULL_ID
 
Constructor Summary
SimpleSiteLocation()
          Construct a new blank SimpleSiteLocation, giving it a new unique ID.
SimpleSiteLocation(int id)
          Get a current SimpleSiteLocation from the RuntimeDataSource, given an id.
 
Method Summary
 void delete()
          Delete this bean from the database.
 void deleteLinks()
          Delete the Links to this SiteLocation
 java.lang.String getBreadcrumb()
          Get the whole breadcrumb to get to this SiteLocation (in plain text) This is very basic and while be overriden by subclasses.
 java.lang.String getDescription()
          Get the description
 java.lang.String getLinkOpenTag()
          Get the opening Tag to this SiteLocation, including href and target attributes
 java.lang.String getName()
          Get the name
 boolean getOfInterest()
          Get whether this SiteLocation is of interest
 Template getTheTemplate()
          Get the template
 java.lang.String getTitle()
          Get the title
 java.net.URL getURL()
          Get the whole URL to get to this SiteLocation This is very basic and while be overriden by subclasses.
 java.lang.String getWebURLStub()
          Get the URL stub
 boolean isOfInterest()
          Get whether this SiteLocation is of interest.
 void markAsArchived()
          Mark this SiteLocation as archived.
 void save()
          Save this bean to the database.
 void setName(java.lang.String name)
          Set the name
 void setOfInterest(boolean bool)
          Set whether this SiteLocation is of interest
 void setTheTemplate(Template template)
          Set the template
 void setWebURLStub(java.lang.String stub)
          Set the URL stub
 
Methods inherited from class com.RuntimeCollective.sitemap.bean.SimplePublishable
checkStillApproved, getAlwaysLive, getGoDeadDate, getGoLiveDate, getIsNew, getNeedApproval, getStatus, getStatusLastModifiedDate, getToBeApprovedPublishables, isAlwaysLive, isApproved, isArchived, isEdited, isLive, isNew, isToBeApproved, markAsApproved, markAsEdited, markAsToBeApproved, needsApproval, publish, saveArchivedData, 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.sitemap.bean.Publishable
getAlwaysLive, getGoDeadDate, getGoLiveDate, getIsNew, getNeedApproval, getStatus, getStatusLastModifiedDate, isAlwaysLive, isApproved, isArchived, isEdited, isLive, isNew, isToBeApproved, markAsApproved, markAsEdited, markAsToBeApproved, needsApproval, publish, saveArchivedData, 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

Name

protected java.lang.String Name
The name


WebURLStub

protected java.lang.String WebURLStub
The URL stub (e.g. "ecommerce" for the ecommerce node)


TheTemplateId

protected int TheTemplateId
The Template used by this SiteLocation


OfInterest

protected boolean OfInterest
Is this SiteLocation is of interest, ie should we record hits on it ?

Constructor Detail

SimpleSiteLocation

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


SimpleSiteLocation

public SimpleSiteLocation(int id)
                   throws java.sql.SQLException
Get a current SimpleSiteLocation 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.permission.bean.Permissible
Overrides:
save in class SimplePublishable

delete

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

Specified by:
delete in interface com.RuntimeCollective.permission.bean.Permissible
Overrides:
delete in class SimplePublishable

deleteLinks

public void deleteLinks()
                 throws java.sql.SQLException
Delete the Links to this SiteLocation


setName

public void setName(java.lang.String name)
Set the name

Specified by:
setName in interface SiteLocation

getName

public java.lang.String getName()
Get the name

Specified by:
getName in interface SiteLocation

setWebURLStub

public void setWebURLStub(java.lang.String stub)
Set the URL stub

Specified by:
setWebURLStub in interface SiteLocation

getWebURLStub

public java.lang.String getWebURLStub()
Get the URL stub

Specified by:
getWebURLStub in interface SiteLocation

setTheTemplate

public void setTheTemplate(Template template)
Set the template

Specified by:
setTheTemplate in interface SiteLocation

getTheTemplate

public Template getTheTemplate()
Get the template

Specified by:
getTheTemplate in interface SiteLocation

getURL

public java.net.URL getURL()
Get the whole URL to get to this SiteLocation This is very basic and while be overriden by subclasses.

Specified by:
getURL in interface SiteLocation

getLinkOpenTag

public java.lang.String getLinkOpenTag()
Get the opening Tag to this SiteLocation, including href and target attributes

Specified by:
getLinkOpenTag in interface SiteLocation

getBreadcrumb

public java.lang.String getBreadcrumb()
Get the whole breadcrumb to get to this SiteLocation (in plain text) This is very basic and while be overriden by subclasses.

Specified by:
getBreadcrumb in interface SiteLocation

getTitle

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

Specified by:
getTitle in interface SiteLocation

getDescription

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

Specified by:
getDescription in interface SiteLocation

setOfInterest

public void setOfInterest(boolean bool)
Set whether this SiteLocation is of interest

Specified by:
setOfInterest in interface SiteLocation

getOfInterest

public boolean getOfInterest()
Get whether this SiteLocation is of interest

Specified by:
getOfInterest in interface SiteLocation

isOfInterest

public boolean isOfInterest()
Get whether this SiteLocation is of interest. Redirects to getOfInterest(boolean).

Specified by:
isOfInterest in interface SiteLocation

markAsArchived

public void markAsArchived()
Mark this SiteLocation as archived. This is normal SimplePublishable behaviour, except we also delete the SiteLocationLink to this SiteLocation.

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