|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.core.content.PersistentObject
org.liquidsite.core.content.Content
The base class for all content objects. This class should NOT be instantiated directly unless in a backup/restore scenario. Otherwise the proper subclass should ALWAYS be created.
| Field Summary | |
static int |
DOCUMENT_CATEGORY
The document content category. |
static int |
FILE_CATEGORY
The file content category. |
static int |
FOLDER_CATEGORY
The folder content category. |
static int |
FORUM_CATEGORY
The forum content category. |
static java.lang.String |
NAME_CHARS
The permitted content name characters. |
static int |
PAGE_CATEGORY
The page content category. |
static int |
POST_CATEGORY
The post content category. |
static int |
SECTION_CATEGORY
The section content category. |
static int |
SITE_CATEGORY
The site content category. |
static int |
TEMPLATE_CATEGORY
The template content category. |
static int |
TOPIC_CATEGORY
The topic content category. |
static int |
TRANSLATOR_CATEGORY
The translator content category. |
| Fields inherited from class org.liquidsite.core.content.PersistentObject |
BINDERS, LOWER_CASE, NUMBERS, UPPER_CASE |
| Constructor Summary | |
protected |
Content(ContentManager manager,
ContentData data,
DataSource src)
Creates a new content object. |
|
Content(ContentManager manager,
Domain domain,
int category)
Creates a new content object with default values. |
| Method Summary | |
void |
deleteRevision(User user)
Deletes this content revision from the database. |
protected void |
doDelete(DataSource src,
User user)
Deletes the object data from the database. |
protected void |
doInsert(DataSource src,
User user,
boolean restore)
Inserts the object data into the database. |
protected void |
doUpdate(DataSource src,
User user)
Updates the object data in the database. |
protected void |
doValidate()
Validates the object data before writing to the database. |
boolean |
equals(Content obj)
Checks if this content object equals another object. |
boolean |
equals(java.lang.Object obj)
Checks if this content object equals another object. |
Content[] |
getAllRevisions()
Returns an array of all content object revisions. |
java.lang.String |
getAttribute(java.lang.String name)
Returns a content attribute value (BACKUP ONLY). |
java.util.Iterator |
getAttributeNames()
Returns an iterator for all the attribute names (BACKUP ONLY). |
User |
getAuthor()
Returns the content last modification author. |
java.lang.String |
getAuthorName()
Returns the content last modification author. |
int |
getCategory()
Returns the content category. |
java.lang.String |
getComment()
Returns the content revision comment. |
Domain |
getDomain()
Returns the content domain. |
java.lang.String |
getDomainName()
Returns the content domain name. |
int |
getId()
Returns the content identifier. |
Lock |
getLock()
Returns the lock applicable to this content object. |
int |
getMaxRevisionNumber()
Returns the highest content object revision number available. |
java.util.Date |
getModifiedDate()
Returns the content last modification date. |
java.lang.String |
getName()
Returns the content name. |
java.util.Date |
getOfflineDate()
Returns the content publishing offline date. |
java.util.Date |
getOnlineDate()
Returns the content publishing online date. |
Content |
getParent()
Returns the content parent. |
Content |
getParent(ContentManager manager)
Returns the content parent. |
int |
getParentId()
Returns the content parent identifier. |
PermissionList |
getPermissions(boolean inherit)
Returns the permission list applicable to this content object. |
Content |
getRevision(int revision)
Returns the specified content object revision. |
int |
getRevisionNumber()
Returns the content revision number. |
boolean |
isLatestRevision()
Checks if this content object revision is the latest one. |
boolean |
isOnline()
Checks if this content object revision is online. |
boolean |
isPublishedRevision()
Checks if this content object revision is the published one. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets a content attribute value (RESTORE ONLY). |
void |
setAuthorName(java.lang.String author)
Sets the content last modification author (RESTORE ONLY). |
void |
setComment(java.lang.String comment)
Sets the content revision comment. |
void |
setId(int id)
Sets the content identifier (RESTORE ONLY). |
void |
setModifiedDate(java.util.Date modified)
Sets the content last modification date (RESTORE ONLY). |
void |
setName(java.lang.String name)
Sets the content name. |
void |
setOfflineDate(java.util.Date offline)
Sets the content publishing offline date. |
void |
setOnlineDate(java.util.Date online)
Sets the content publishing online date. |
void |
setParent(Content parent)
Sets the content parent. |
void |
setParentId(int parent)
Sets the content parent identifier. |
void |
setRevisionNumber(int revision)
Sets the content revision number. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class org.liquidsite.core.content.PersistentObject |
decodeMap, delete, delete, encodeMap, getContentManager, hasAdminAccess, hasPublishAccess, hasReadAccess, hasWriteAccess, isPersistent, restore, restore, save, save, validateChars, validateSize |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int SITE_CATEGORY
public static final int TRANSLATOR_CATEGORY
public static final int FOLDER_CATEGORY
public static final int PAGE_CATEGORY
public static final int FILE_CATEGORY
public static final int TEMPLATE_CATEGORY
public static final int SECTION_CATEGORY
public static final int DOCUMENT_CATEGORY
public static final int FORUM_CATEGORY
public static final int TOPIC_CATEGORY
public static final int POST_CATEGORY
public static final java.lang.String NAME_CHARS
| Constructor Detail |
public Content(ContentManager manager,
Domain domain,
int category)
This constructor should NOT BE CALLED directly unless you know what you are doing. It is supposed to be called by the constructors in the subclasses and is public only to simplify the backup and restore operations.
manager - the content manager to usedomain - the domaincategory - the category
protected Content(ContentManager manager,
ContentData data,
DataSource src)
throws ContentException
manager - the content manager to usedata - the content data objectsrc - the data source to use
ContentException - if the database couldn't be accessed
properly| Method Detail |
public boolean equals(java.lang.Object obj)
obj - the object to compare with
public boolean equals(Content obj)
obj - the object to compare with
public java.lang.String toString()
public boolean isOnline()
public boolean isLatestRevision()
public boolean isPublishedRevision()
public Domain getDomain()
throws ContentException
ContentException - if no content manager is availablepublic java.lang.String getDomainName()
public int getId()
public void setId(int id)
id - the new content identifierpublic int getRevisionNumber()
public void setRevisionNumber(int revision)
revision - the new content revision numberpublic int getCategory()
public java.lang.String getName()
public void setName(java.lang.String name)
name - the new name
public Content getParent()
throws ContentException
ContentException - if the database couldn't be accessed
properly
public Content getParent(ContentManager manager)
throws ContentException
manager - the content manager to use
ContentException - if the database couldn't be accessed
properlypublic void setParent(Content parent)
parent - the new parent, or null for nonepublic int getParentId()
public void setParentId(int parent)
parent - the new parent identifierpublic java.util.Date getOnlineDate()
public void setOnlineDate(java.util.Date online)
online - the new publishing online datepublic java.util.Date getOfflineDate()
public void setOfflineDate(java.util.Date offline)
offline - the new publishing offline datepublic java.util.Date getModifiedDate()
public void setModifiedDate(java.util.Date modified)
modified - the new last modification date
public User getAuthor()
throws ContentException
ContentException - if the database couldn't be accessed
properlypublic java.lang.String getAuthorName()
public void setAuthorName(java.lang.String author)
author - the content last modification authorpublic java.lang.String getComment()
public void setComment(java.lang.String comment)
comment - the content revision commentpublic java.util.Iterator getAttributeNames()
public java.lang.String getAttribute(java.lang.String name)
name - the content attribute name
public void setAttribute(java.lang.String name,
java.lang.String value)
name - the content attribute namevalue - the content attribute value
public int getMaxRevisionNumber()
throws ContentException
ContentException - if the database couldn't be accessed
properly
public Content getRevision(int revision)
throws ContentException
revision - the content revision
ContentException - if the database couldn't be accessed
properly
public Content[] getAllRevisions()
throws ContentException
ContentException - if the database couldn't be accessed
properly
public Lock getLock()
throws ContentException
ContentException - if the database couldn't be accessed
properly
public PermissionList getPermissions(boolean inherit)
throws ContentException
inherit - the search inherited permissions flag
ContentException - if the database couldn't be accessed
properly
public void deleteRevision(User user)
throws ContentException,
ContentSecurityException
user - the user performing the operation
ContentException - if the database couldn't be accessed
properly
ContentSecurityException - if the user specified didn't
have write permissions
protected void doValidate()
throws ContentException
doValidate in class PersistentObjectContentException - if the object data wasn't valid
protected void doInsert(DataSource src,
User user,
boolean restore)
throws ContentException
doInsert in class PersistentObjectsrc - the data source to useuser - the user performing the operationrestore - the restore flag
ContentException - if the database couldn't be accessed
properly
protected void doUpdate(DataSource src,
User user)
throws ContentException
doUpdate in class PersistentObjectsrc - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
protected void doDelete(DataSource src,
User user)
throws ContentException
doDelete in class PersistentObjectsrc - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||