com.atlassian.confluence.labels.LabelManager |
Known Indirect Subclasses |
The label manager provides all that is necessary for interacting with labels.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DEFAULT_LABEL_COUNT | ||||||||||
String | FAVOURITE_LABEL | ||||||||||
String | FAVOURITE_LABEL_YANKEE | ||||||||||
int | LABEL_ADDED | Indicates that a label was added. | |||||||||
int | LABEL_CREATED | Indicates that a label was created. | |||||||||
int | LABEL_DELETED | Indicates that a label was deleted. | |||||||||
int | LABEL_REMOVED | Indicates that a label was removed. | |||||||||
int | NO_CHANGE | Indicates no change. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CONTENT_TYPES | Content Types that can have a label applied. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a label to the specified content.
| |||||||||||
This method is deprecated.
4.2
| |||||||||||
Delete the specified label.
| |||||||||||
Delete the label with the specified id.
| |||||||||||
Retrieve all ContentEntityObjects which are labelled with ALL provided labels.
| |||||||||||
Get all content associated with a label
Get all versions of content associated with a label and any space.
| |||||||||||
Get all content associated with a label and space
Get all current content associated with a label and any space.
| |||||||||||
Get all current content associated with a label and space.
| |||||||||||
Get all current content labelled by a user
| |||||||||||
Retrieve the label with the specified id.
| |||||||||||
Convenience method to fetch a label without having to create a Label object
| |||||||||||
Retrieve the label by name.
| |||||||||||
convenience method to fetch a label without having to call the label parser
| |||||||||||
Retrieve the persistent instance of the label with the exact same details as the specified label.
| |||||||||||
convenience method to fetch labels without having to call the label parser
| |||||||||||
Retrieves the labels matching the given labelName, namespace or owner
| |||||||||||
Retrieve all of the labels that label content within the specified space.
| |||||||||||
Retrieve the most popular labels within the system.
| |||||||||||
Retrieve the list of the DEFAULT_LABEL_COUNT most popular labels within the system.
| |||||||||||
Retrieve the list of the DEFAULT_LABEL_COUNT most used labels in the specific space, ordered from most
popular to least popular.
| |||||||||||
Retrieve a list of the 'n' most used labels in the specified space, ordered from most popular to least
popular.
| |||||||||||
Retrieve a set of the DEFAULT_LABEL_COUNT most popular labels within the system, including their ranks and
ordered using the compartor provided.
| |||||||||||
Retrieve the most popular labels within the system, including their ranks and ordered using the comparator
provided.
| |||||||||||
Retrieve a set of the 'n' most used labels in the specified space, ordered using the compartor given.
| |||||||||||
Retrieve the x most recently used labels.
| |||||||||||
Retrieve the DEFAULT_LABEL_COUNT most recently used labels within the system.
| |||||||||||
Retrieve the DEFAULT_LABEL_COUNT most recently used labels within the specified space.
| |||||||||||
Retrieve the most recently used labels within the specified spae.
| |||||||||||
Retrieve the labels that were recently used by currently authenticated user.
| |||||||||||
Retrieve the labels that were recently used by currently authenticated user.
| |||||||||||
Retrieve the labels that are 'related' to the specified label.
| |||||||||||
Retrieve the DEFAULT_LABEL_COUNT labels that are 'related' to the specified label.
| |||||||||||
Retrieve the labels that are 'related' to the labels in the list.
| |||||||||||
Retrieve the DEFAULT_LABEL_COUNT labels that are 'related' to the specified label and that are used to label
content within the specified space.
| |||||||||||
Retrieve the labels that are 'related' to the specified label and that are used to to label content within
the specified space.
| |||||||||||
Look up the spaces that have been labelled by the specific label.
| |||||||||||
Spaces cannot be directly labelled.
| |||||||||||
Retrieve the DEFAULT_LABEL_COUNT suggested labels for the specified content.
| |||||||||||
Retrieve the suggested labels for the specified content.
| |||||||||||
This method is deprecated.
4.2
| |||||||||||
This method is deprecated.
4.2
| |||||||||||
This method is deprecated.
4.2
| |||||||||||
This method is deprecated.
4.2
| |||||||||||
Retrieve the DEFAULT_LABEL_COUNT suggested labels for the specified content bound to the specified space.
| |||||||||||
Retrieve the suggested labels for the specified content bound to the specified space.
| |||||||||||
Retrieve all of the team labels in the system.
| |||||||||||
Retrieve all of the team labels used to label content in the specified space.
| |||||||||||
Retrieve all of the team labels used to label content in the specified spaces.
| |||||||||||
Retrieve the personal labels that belong to the specified user.
| |||||||||||
Remove all of the labels from the specified content.
| |||||||||||
This method is deprecated.
4.2
| |||||||||||
Remove a label from the specified content.
| |||||||||||
This method is deprecated.
4.2
| |||||||||||
removes a list of labels from the labelable object
| |||||||||||
This method is deprecated.
4.2
|
Indicates that a label was added.
Indicates that a label was created.
Indicates that a label was deleted.
Indicates that a label was removed.
Indicates no change.
Add a label to the specified content.
Note: the specified label does not need to be persistent. A persistent instance of the label will be created if necessary. eg: you can write code like:labelManager.addLabel(page, new Label("name", "namespace", "owner"));
This method is deprecated.
4.2
Delete the specified label.
NOTE: The specified label does note need to be the persistent instance of the label, it simply needs to uniquely identify the label.Delete the label with the specified id.
Retrieve all ContentEntityObjects which are labelled with ALL provided labels.
labels | labels which must appear on ContentEntityObjects |
---|---|
maxResults | the maximum number of results to return |
offset | the offset into the results |
Get all content associated with a label Get all versions of content associated with a label and any space. Content in the trash will not be returned.
Get all content associated with a label and space Get all current content associated with a label and any space. Content in the trash will not be returned.
Get all current content associated with a label and space. Content in the trash will not be returned.
Get all current content labelled by a user
Retrieve the label with the specified id.
Convenience method to fetch a label without having to create a Label object
labelName | The label name |
---|---|
namespace | The namespace of the label |
Retrieve the label by name.
convenience method to fetch a label without having to call the label parser
unparsedLabelName | - example - my:foo |
---|
Retrieve the persistent instance of the label with the exact same details as the specified label. Note, the specified label does not need to contain an id.
convenience method to fetch labels without having to call the label parser
unparsedLabelNames | - example - my:foo, bar |
---|
Retrieves the labels matching the given labelName, namespace or owner
labelName | The name of the label (null to ignore) |
---|---|
namespace | The namespace of the labels (null to ignore) |
spaceKey | The spaceKey to restrict by (null to ignore) |
owner | The owner of the labels (null to ignore) |
Retrieve all of the labels that label content within the specified space.
key | identifying the space to be queried. |
---|
Retrieve the most popular labels within the system. The number of labels returned can be specified through the count parameter. If the count value is greater than the number of labels, then all labels will be returned.
This function does not return the labels itself, but wrapped into a search result with a count!
maxResults | is the maximum number of labels to be returned. |
---|
Retrieve the list of the DEFAULT_LABEL_COUNT most popular labels within the system.
Retrieve the list of the DEFAULT_LABEL_COUNT most used labels in the specific space, ordered from most popular to least popular.
This function does not return the labels itself, but wrapped into a search result with a count!
key | the space key |
---|
Retrieve a list of the 'n' most used labels in the specified space, ordered from most popular to least popular.
This function does not return the labels itself, but wrapped into a search result with a count!
key | is the space key |
---|---|
maxResults | is the maximum number of labels to be returned. |
Retrieve a set of the DEFAULT_LABEL_COUNT most popular labels within the system, including their ranks and ordered using the compartor provided.
Retrieve the most popular labels within the system, including their ranks and ordered using the comparator provided. The number of labels returned can be specified through the count parameter. If the count value is greater than the number of labels, then all labels will be returned.
This function does not return the labels itself, but wrapped into a search result with a count!
maxResults | is the maximum number of labels to be returned. |
---|
Retrieve a set of the 'n' most used labels in the specified space, ordered using the compartor given.
This function does not return the labels itself, but wrapped into a search result with a count!
key | is the space key |
---|---|
maxResults | is the maximum number of labels to be returned. |
Retrieve the x most recently used labels.
maxResults | is the maximum number of labels to be returned. |
---|
Retrieve the DEFAULT_LABEL_COUNT most recently used labels within the system.
Retrieve the DEFAULT_LABEL_COUNT most recently used labels within the specified space.
spaceKey | identifies the space to which the results are restricted. |
---|
Retrieve the most recently used labels within the specified spae.
maxResults | is the maximum number of labels to be returned. |
---|
Retrieve the labels that were recently used by currently authenticated user. 'Recently Used' includes labels that the user recently added, created, removed and deleted.
Note: labels in this list may or may not exist. The UserHistory can be retrieved from the session via the ActionContext (if using an action) or the Execution Context (DWR)username | the user history from the session |
---|
Retrieve the labels that were recently used by currently authenticated user. 'Recently Used' includes labels that the user recently added, created, removed and deleted.
Note: labels in this list may or may not exist. The UserHistory can be retrieved from the session via the ActionContext (if using an action) or the Execution Context (DWR)username | the user history from the session |
---|---|
maxResults | the maximum number of results to return to the user |
Retrieve the labels that are 'related' to the specified label. The process used to identify 'related' labels may change and therefore is not defined here.
maxResults | is the maximum number of labels to be returned. |
---|
Retrieve the DEFAULT_LABEL_COUNT labels that are 'related' to the specified label. The process used to identify 'related' labels may change and therefore is not define here.
Retrieve the labels that are 'related' to the labels in the list. The process used to identify 'related' labels may change and therefore is not defined here.
spaceKey | - may be null to search globally |
---|---|
maxResultsPerLabel | is the maximum number of labels to be returned for each label. |
Retrieve the DEFAULT_LABEL_COUNT labels that are 'related' to the specified label and that are used to label content within the specified space.
Retrieve the labels that are 'related' to the specified label and that are used to to label content within the specified space.
Look up the spaces that have been labelled by the specific label.
Spaces cannot be directly labelled. Howevever, their space descriptions can. This method searches for all space descriptions with the label passed in
Retrieve the DEFAULT_LABEL_COUNT suggested labels for the specified content. The process used to identify 'suggested' labels may change and therefore is not defined here.
Retrieve the suggested labels for the specified content. The process used to identify 'suggested' labels may change and therefore is not defined here.
maxResults | is the maximum number of labels to be returned. |
---|
This method is deprecated.
4.2
This method is deprecated.
4.2
This method is deprecated.
4.2
This method is deprecated.
4.2
Retrieve the DEFAULT_LABEL_COUNT suggested labels for the specified content bound to the specified space.
Retrieve the suggested labels for the specified content bound to the specified space.
maxResults | is the maximum number of labels to be returned. |
---|
Retrieve all of the team labels in the system.
Retrieve all of the team labels used to label content in the specified space.
Retrieve all of the team labels used to label content in the specified spaces.
spaces | collection of spaces whose labels to get |
---|
Retrieve the personal labels that belong to the specified user.
Remove all of the labels from the specified content. Any labels that then no longer label content will be deleted.
Remove a label from the specified content.
This method is deprecated.
4.2
removes a list of labels from the labelable object
This method is deprecated.
4.2