public interface IDiscussionManager extends IRepositoryService
IDiscussionManager
defines the central methods of the
discussion repository service. IDiscussionManager
can co-exist.
This enables the configuration of different storage
locations for IDiscussionItems
.
A discussion must always be linked to an IResource
.
This resource is called the primary resource.
All data belonging to the discussion is secondary data and is stored in a folder
of a special collaboration repository.
The location of the repository can be configured in the configuration framework.Modifier and Type | Field and Description |
---|---|
static String |
PROP_DISCUSSION_NAMESPACE |
static String |
PROP_DISCUSSION_NUMBER_OF_POSTS |
static String |
PROP_DISCUSSION_NUMBER_OF_THREADS |
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateDiscussion(IResource resource)
returns true if Security Management is available and if the current user has
'read' and 'write' Permission for the resource.
|
IDiscussion |
createDiscussion(IResource resource)
Creates a new discussion for a given primary resource.
|
void |
createSubscription(IDiscussion discussion,
IResourceContext context,
IResource resource)
Creates a subscription for an entire discussion or for a specific discussion item.
|
void |
deleteDiscussion(IDiscussion discussion)
Deletes an
IDiscussion instance and all discussion data related to the primary resource. |
void |
deleteDiscussion(IResource resource)
Deletes an
IDiscussion instance and all discussion data related to the specified primary resource. |
void |
deleteDiscussion(RID resourceRid,
IResourceContext context)
Deletes an
IDiscussion instance and all discussion data for an attached primary resource. |
IDiscussion |
getDiscussion(IResource resource)
Gets the
IDiscussion instance for the specified primary resource. |
IDiscussionEvent |
getDiscussionEventTemplate(int type)
Get a
IDiscussionEvent -template for the given
IDiscussionEvent -type. |
ICollection |
getDiscussionsCollection()
Gets
ICollection , the root folder where all discussions of this service
are stored. |
ISubscription |
getSubscription(IDiscussion discussion,
IResourceContext context,
IResource resource)
Gets the subscription for a specified secondary resource (discussion or discussion item).
|
IDiscussionItem |
getTopDiscussionItem(RID itemRid,
IResourceContext resourceContext)
Gets the discussion topic for a discussion item.
|
IDiscussionItem |
getTopic(RID itemRid,
IResourceContext resourceContext)
Gets the discussion topic for a discussion item.
|
boolean |
isOnlyCollectionsEnabled()
Checks if discussion service is only enabled for collections.
|
boolean |
isSecureDiscussion()
Checks if discussion service is set to be a secure discussion.
|
boolean |
isWithoutTopicLevel()
Checks if discussion service works with topics or directly on post level.
|
acceptServletCall, getDescription, getDescription, getID, getServiceType
static final String PROP_DISCUSSION_NUMBER_OF_THREADS
static final String PROP_DISCUSSION_NUMBER_OF_POSTS
static final String PROP_DISCUSSION_NAMESPACE
boolean isOnlyCollectionsEnabled()
boolean isSecureDiscussion()
boolean isWithoutTopicLevel()
IDiscussion createDiscussion(IResource resource) throws WcmException
resource
causes an exception.resource
- an IResource
that specifies the primary
resource to which the discussion is attachedIDiscussion
instance that holds all information on the discussionWcmException
- if it is not possible to initialize all necessary servicesvoid createSubscription(IDiscussion discussion, IResourceContext context, IResource resource) throws WcmException
discussion
or resource
causes an exception.
If context
is null
, the service context is used.discussion
- is the IDiscussion
instance for a discussion containing the resourcecontext
- is the context of the serviceresource
- an IResource
instance that specifies the secondary resourceWcmException
- if the creation of a subscription failsISubscription getSubscription(IDiscussion discussion, IResourceContext context, IResource resource) throws WcmException
discussion
or resource
causes an exception.
If context
is null
, the service context is used.discussion
- is the IDiscussion
instance for a discussion containing the resourcecontext
- is the context of the serviceresource
- an IResource
instance that specifies a secondary resource (discussion or discussion item)ISubscription
instance with the specified attributesWcmException
- if the request for subscription to the resource failsIDiscussion getDiscussion(IResource resource) throws WcmException
IDiscussion
instance for the specified primary resource.
A discussion can exist even if no discussion threads exist.
Passing null as an argument for resource
causes an exception.resource
- an IResource
that specifies the primary resource to which the discussion is attachedIDiscussion
instance that holds all information on the discussionWcmException
- if it is not possible to initialize all necessary servicesICollection getDiscussionsCollection()
ICollection
, the root folder where all discussions of this service
are stored.ICollection
instance for the discussion root folderboolean canCreateDiscussion(IResource resource)
IDiscussionItem getTopic(RID itemRid, IResourceContext resourceContext) throws WcmException
itemRid
causes an exception.
If resourceContext
is null
, the service context is used.itemRid
- is the RID of an IDiscussionItem
instanceresourceContext
- is the context of the serviceWcmException
- if it is not possible to identify the discussion item specified by itemRid
or if the topic item could not be foundIDiscussionItem getTopDiscussionItem(RID itemRid, IResourceContext resourceContext) throws WcmException
itemRid
causes an exception.
If resourceContext
is null
, the service context is used.itemRid
- is the RID of an IDiscussionItem
instanceresourceContext
- is the context of the serviceWcmException
- if it is not possible to identify the discussion item specified by itemRid
or if the topic item could not be foundvoid deleteDiscussion(IDiscussion discussion) throws WcmException
IDiscussion
instance and all discussion data related to the primary resource.
After deletion of the discussion, a DELETE_DISCUSSION
event is sent for the subscription service.
If no discussion exists, nothing happens.
Passing null as an argument for discussion
causes an exception.discussion
- the instance that has to be deletedWcmException
- if the deletion of the secondary discussion folder has failedvoid deleteDiscussion(IResource resource) throws WcmException
IDiscussion
instance and all discussion data related to the specified primary resource.
After deletion of the discussion, a DELETE_DISCUSSION
event is sent for the subscription service.
If no discussion exists, nothing happens.
Passing null as an argument for resource
causes an exception.resource
- the resource for discussion dataWcmException
- if the deletion of the secondary discussion folder has failedvoid deleteDiscussion(RID resourceRid, IResourceContext context) throws WcmException
IDiscussion
instance and all discussion data for an attached primary resource.
After deletion of the discussion, a DELETE_DISCUSSION
event is sent for the subscription service.
If no discussion exists, nothing happens.
Passing null as an argument for resourceRid
causes an exception.
If context
is null
, the service context is used.resourceRid
- is the RID of the secondary discussion resourcecontext
- is the context of the serviceWcmException
- if the deletion of the secondary discussion folder has failedIDiscussionEvent getDiscussionEventTemplate(int type)
IDiscussionEvent
-template for the given
IDiscussionEvent
-type.type
- the IDiscussionEvent
-type to get the template for.IDiscussionEvent
-template for the given type
or null
if the given type is not valid.Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice