public class JCRThread extends DefaultTraversableAmetysObject<JCRThreadFactory> implements ModifiableThread
Thread
, backed by a JCR node.Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_ID
application id for resources collections.
|
private static String |
METADATA_AUTHOR |
private static String |
METADATA_CREATIONDATE |
private static String |
METADATA_DESCRIPTION |
private static String |
METADATA_TITLE |
Constructor and Description |
---|
JCRThread(Node node,
String parentPath,
JCRThreadFactory factory)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getApplicationId()
Returns the application id corresponding to this Node.
|
UserIdentity |
getAuthor()
Get the author of the thread
|
Date |
getCreationDate()
Get the thread's creation date.
|
String |
getDescription()
Get the description of the application
|
String |
getExplorerPath()
Returns the path of this explorer node in the explorer hierarchy (which is a subset of the whole repository).
If this collection is the root explorer node, "" is returned. |
String |
getIconCls()
Returns the icon css class for this Node.
|
String |
getTitle()
Get the title of the thread
|
long |
getUnreadPosts(UserIdentity user)
Get the number of unread post in this thread for a user
|
boolean |
hasChildExplorerNodes()
Returns true if this explorer node contains child explorer nodes.
|
void |
markAsRead(UserIdentity user)
Mark the thread as read by a user
|
void |
setAuthor(UserIdentity author)
Set the author of this thread.
|
void |
setCreationDate(Date creationDate)
Set the thread's creation date.
|
void |
setDescription(String description)
Set the description of the application
|
void |
setTitle(String title)
Set the title of this thread.
|
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getAllowedUsers, getChild, getChildren, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, hasChild, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createChild
getChild, getChildAt, getChildPosition, getChildren, hasChild
remove
needsSave, rename, revertChanges, saveChanges
equals, getId, getName, getParent, getParentPath, getPath, hashCode
getNode
getMetadataHolder
public static final String APPLICATION_ID
private static final String METADATA_TITLE
private static final String METADATA_DESCRIPTION
private static final String METADATA_AUTHOR
private static final String METADATA_CREATIONDATE
public JCRThread(Node node, String parentPath, JCRThreadFactory factory)
node
- The jcr nodeparentPath
- The parent pathfactory
- The factorypublic String getApplicationId()
ExplorerNode
getApplicationId
in interface ExplorerNode
public String getTitle()
Thread
public void setTitle(String title)
ModifiableThread
setTitle
in interface ModifiableThread
title
- the thread's titlepublic String getDescription()
ExplorerNode
getDescription
in interface ExplorerNode
public void setDescription(String description)
ModifiableExplorerNode
setDescription
in interface ModifiableExplorerNode
description
- the descriptionpublic UserIdentity getAuthor()
Thread
public void setAuthor(UserIdentity author)
ModifiableThread
setAuthor
in interface ModifiableThread
author
- the authorpublic Date getCreationDate()
Thread
getCreationDate
in interface Thread
public void setCreationDate(Date creationDate)
ModifiableThread
setCreationDate
in interface ModifiableThread
creationDate
- the thread's creation date.public String getIconCls()
ExplorerNode
getIconCls
in interface ExplorerNode
public String getExplorerPath()
ExplorerNode
getExplorerPath
in interface ExplorerNode
public boolean hasChildExplorerNodes() throws AmetysRepositoryException
ExplorerNode
hasChildExplorerNodes
in interface ExplorerNode
AmetysRepositoryException
- if an error occurs.public long getUnreadPosts(UserIdentity user)
Thread
getUnreadPosts
in interface Thread
user
- The userpublic void markAsRead(UserIdentity user)
ModifiableThread
markAsRead
in interface ModifiableThread
user
- The user