public interface CommentManager
CommentManager
provides facilities to manage (create, get or remove) CommentCollection
s.
This manager is registered as an OSGi-service and can be obtained via this interface class from the service registry.
The manager produces typed collections. The type-specific collections are produced by CommentingProvider
s.
The manager binds available factories and uses them to instantiate collections based on the given collection type.Modifier and Type | Method and Description |
---|---|
<C extends CommentCollection> |
createCollection(Resource target,
java.lang.Class<C> collectionType)
Create a
CommentCollection for the given target . |
<C extends CommentCollection> |
getCollection(Resource target,
java.lang.Class<C> collectionType)
Retrieve a
CommentCollection for the given target . |
<C extends CommentCollection> |
getOrCreateCollection(Resource target,
java.lang.Class<C> collectionType)
Retrieve or - if none exists - create a
CommentCollection for the given target . |
<C extends CommentCollection> C getCollection(Resource target, java.lang.Class<C> collectionType)
CommentCollection
for the given target
. The collection is instantiated using the
given collectionType
, as provided by the type-specific CommentingProvider
.C
- A collection type, extending CommentCollection
.target
- The Resource
representing the target for which to retrieve the comment collection.collectionType
- The desired type of the collection.null
if no collection of the requested type is present.CommentException
- If no CommentingProvider
could be found for the given
collectionType
.java.lang.IllegalArgumentException
- If either target or collectionType is null.<C extends CommentCollection> C getOrCreateCollection(Resource target, java.lang.Class<C> collectionType)
CommentCollection
for the given target
. The
collection is instantiated using the given collectionType
, as provided by the type-specific CommentingProvider
.C
- A collection type, extending CommentCollection
.target
- The Resource
representing the target for which to create or retrieve the comment
collection.collectionType
- The desired type of the collection.CommentException
- Upon encountering an error during creation of a collection, or if the collection
already exists, or if no CommentingProvider
could be found for the given
collectionType
.java.lang.IllegalArgumentException
- If either target or collectionType is null.<C extends CommentCollection> C createCollection(Resource target, java.lang.Class<C> collectionType)
CommentCollection
for the given target
. The collection is instantiated using the
given collectionType
, as provided by the type-specific CommentingProvider
.C
- A collection type, extending CommentCollection
.target
- The Resource
representing the target for which to create the comment collection.collectionType
- The desired type of the collection.CommentException
- Upon encountering an error during creation of a collection, or if the collection
already exists, or if no CommentingProvider
could be found for the given
collectionType
.java.lang.IllegalArgumentException
- If either target or collectionType is null."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"