Class JCRThread
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<JCRThreadFactory>
org.ametys.plugins.explorer.threads.jcr.JCRThread
- All Implemented Interfaces:
ExplorerNode
,ModifiableExplorerNode
,ModifiableThread
,Thread
,ACLAmetysObject
,AmetysObject
,JCRAmetysObject
,JCRTraversableAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,ModifiableTraversableAmetysObject
,RemovableAmetysObject
,TraversableAmetysObject
public class JCRThread
extends DefaultTraversableAmetysObject<JCRThreadFactory>
implements ModifiableThread
Default implementation of an
Thread
, backed by a JCR node.-
Field Summary
-
Constructor Summary
ConstructorDescriptionJCRThread
(javax.jcr.Node node, String parentPath, JCRThreadFactory factory) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns the application id corresponding to this Node.Get the author of the threadGet the thread's creation date.Get the description of the applicationReturns 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.Returns the icon css class for this Node.getTitle()
Get the title of the threadlong
getUnreadPosts
(UserIdentity user) Get the number of unread post in this thread for a userboolean
Returns true if this explorer node contains child explorer nodes.void
markAsRead
(UserIdentity user) Mark the thread as read by a uservoid
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 applicationvoid
Set the title of this thread.Methods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, disallowInheritance, getChild, getChildren, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasChild, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
Methods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChild
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, getChildren, hasChild
-
Field Details
-
APPLICATION_ID
application id for resources collections.- See Also:
-
-
Constructor Details
-
JCRThread
Constructor- Parameters:
node
- The jcr nodeparentPath
- The parent pathfactory
- The factory
-
-
Method Details
-
getApplicationId
Description copied from interface:ExplorerNode
Returns the application id corresponding to this Node.- Specified by:
getApplicationId
in interfaceExplorerNode
- Returns:
- the application id corresponding to this Node.
-
getTitle
Description copied from interface:Thread
Get the title of the thread -
setTitle
Description copied from interface:ModifiableThread
Set the title of this thread.- Specified by:
setTitle
in interfaceModifiableThread
- Parameters:
title
- the thread's title
-
getDescription
Description copied from interface:ExplorerNode
Get the description of the application- Specified by:
getDescription
in interfaceExplorerNode
- Returns:
- the description
-
setDescription
Description copied from interface:ModifiableExplorerNode
Set the description of the application- Specified by:
setDescription
in interfaceModifiableExplorerNode
- Parameters:
description
- the description
-
getAuthor
Description copied from interface:Thread
Get the author of the thread -
setAuthor
Description copied from interface:ModifiableThread
Set the author of this thread.- Specified by:
setAuthor
in interfaceModifiableThread
- Parameters:
author
- the author
-
getCreationDate
Description copied from interface:Thread
Get the thread's creation date.- Specified by:
getCreationDate
in interfaceThread
- Returns:
- the thread's creation date.
-
setCreationDate
Description copied from interface:ModifiableThread
Set the thread's creation date.- Specified by:
setCreationDate
in interfaceModifiableThread
- Parameters:
creationDate
- the thread's creation date.
-
getIconCls
Description copied from interface:ExplorerNode
Returns the icon css class for this Node.- Specified by:
getIconCls
in interfaceExplorerNode
- Returns:
- the icon css class for this Node for rendering in the tree.
-
getExplorerPath
Description copied from interface:ExplorerNode
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.- Specified by:
getExplorerPath
in interfaceExplorerNode
- Returns:
- the path of this node in its hierarchy.
-
hasChildExplorerNodes
Description copied from interface:ExplorerNode
Returns true if this explorer node contains child explorer nodes.- Specified by:
hasChildExplorerNodes
in interfaceExplorerNode
- Returns:
- true if this explorer node contains child explorer nodes.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getUnreadPosts
Description copied from interface:Thread
Get the number of unread post in this thread for a user- Specified by:
getUnreadPosts
in interfaceThread
- Parameters:
user
- The user- Returns:
- The number of unread post
-
markAsRead
Description copied from interface:ModifiableThread
Mark the thread as read by a user- Specified by:
markAsRead
in interfaceModifiableThread
- Parameters:
user
- The user
-