Get a list of topics
Your application retrieves a list of topics by using the
getTopicContexts
method, which returns a list of topic contexts
with the name and identifier of each topic.
Your application retrieves a list of topics by using the
getTopicContexts
method, which returns a list of topic contexts
with the name and identifier of each topic. This method can be used to populate a
drop-down or selection list of existing topics in the Save to
Topic dialog box.
The result is alphabetically sorted by name and includes the number of values
returned and the total number of values. Optionally, you can set a start
row
and a chunk size
in the
TopicsServiceContext
value object.
TopicContexts getTopicContexts(TopicsServiceContext serviceContext,
long findTopicId)
throws InvalidArgumentException, TopicsServiceException;
This method returns all topics available to this user. To also search for a
particular topic by ID, set the findTopicId
parameter to an ID that
is greater than or equal to 0.
To limit the results by name, set the
TopicsServiceContext.nameContainsFilter field to a string. In
this case, the method returns only TopicContexts with topic names that contain that
string with a case insensitive search. For example, when you set the
nameContainsFilter field to imp
, the
resulting topic contexts might have results Imp
ortant Results and
Topics imp
orted.
To get a list of topics:
- TopicsContext value object
ThegetTopicContexts
method returns TopicContexts, which has a list of topic IDs and names.
Parent topic: Methods