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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJCRThread(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 threadlonggetUnreadPosts(UserIdentity user) Get the number of unread post in this thread for a userbooleanReturns true if this explorer node contains child explorer nodes.voidmarkAsRead(UserIdentity user) Mark the thread as read by a uservoidsetAuthor(UserIdentity author) Set the author of this thread.voidsetCreationDate(Date creationDate) Set the thread's creation date.voidsetDescription(String description) Set the description of the applicationvoidSet 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, removeDeniedUsersMethods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNodeMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChildMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
removeMethods 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:ExplorerNodeReturns the application id corresponding to this Node.- Specified by:
getApplicationIdin interfaceExplorerNode- Returns:
- the application id corresponding to this Node.
-
getTitle
Description copied from interface:ThreadGet the title of the thread -
setTitle
Description copied from interface:ModifiableThreadSet the title of this thread.- Specified by:
setTitlein interfaceModifiableThread- Parameters:
title- the thread's title
-
getDescription
Description copied from interface:ExplorerNodeGet the description of the application- Specified by:
getDescriptionin interfaceExplorerNode- Returns:
- the description
-
setDescription
Description copied from interface:ModifiableExplorerNodeSet the description of the application- Specified by:
setDescriptionin interfaceModifiableExplorerNode- Parameters:
description- the description
-
getAuthor
Description copied from interface:ThreadGet the author of the thread -
setAuthor
Description copied from interface:ModifiableThreadSet the author of this thread.- Specified by:
setAuthorin interfaceModifiableThread- Parameters:
author- the author
-
getCreationDate
Description copied from interface:ThreadGet the thread's creation date.- Specified by:
getCreationDatein interfaceThread- Returns:
- the thread's creation date.
-
setCreationDate
Description copied from interface:ModifiableThreadSet the thread's creation date.- Specified by:
setCreationDatein interfaceModifiableThread- Parameters:
creationDate- the thread's creation date.
-
getIconCls
Description copied from interface:ExplorerNodeReturns the icon css class for this Node.- Specified by:
getIconClsin interfaceExplorerNode- Returns:
- the icon css class for this Node for rendering in the tree.
-
getExplorerPath
Description copied from interface:ExplorerNodeReturns 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:
getExplorerPathin interfaceExplorerNode- Returns:
- the path of this node in its hierarchy.
-
hasChildExplorerNodes
Description copied from interface:ExplorerNodeReturns true if this explorer node contains child explorer nodes.- Specified by:
hasChildExplorerNodesin interfaceExplorerNode- Returns:
- true if this explorer node contains child explorer nodes.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getUnreadPosts
Description copied from interface:ThreadGet the number of unread post in this thread for a user- Specified by:
getUnreadPostsin interfaceThread- Parameters:
user- The user- Returns:
- The number of unread post
-
markAsRead
Description copied from interface:ModifiableThreadMark the thread as read by a user- Specified by:
markAsReadin interfaceModifiableThread- Parameters:
user- The user
-