@RestController
@RequestMapping(value="/rest",
produces={"application/xml","application/json"})
public class TagRestController
extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
TAGS_URI_PREFIX |
| Constructor and Description |
|---|
TagRestController() |
| Modifier and Type | Method and Description |
|---|---|
Tag |
createTag(TagCreateRequest tagCreateRequest)
Creates a new tag.
|
Tag |
deleteTag(String tagTypeCode,
String tagCode)
Deletes an existing tag.
|
Tag |
getTag(String tagTypeCode,
String tagCode)
Gets an existing tag.
|
TagListResponse |
getTags(String tagTypeCode,
String tagCode)
Retrieves all associated tags for the specified tag type code.
|
TagSearchResponse |
searchTags(TagSearchRequest request,
Set<String> fields)
Retrieves all tags existing in the system per specified search filters and keys.
|
Tag |
updateTag(String tagTypeCode,
String tagCode,
TagUpdateRequest tagUpdateRequest)
Updates an existing tag.
|
public static final String TAGS_URI_PREFIX
@RequestMapping(value="/tags",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_TAGS_POST")
public Tag createTag(@RequestBody
TagCreateRequest tagCreateRequest)
tagCreateRequest - the information needed to create the tag@RequestMapping(value="/tags/tagTypes/{tagTypeCode}/tagCodes/{tagCode}",
method=DELETE)
@Secured(value="FN_TAGS_DELETE")
public Tag deleteTag(@PathVariable(value="tagTypeCode")
String tagTypeCode,
@PathVariable(value="tagCode")
String tagCode)
tagTypeCode - the tag type codetagCode - the tag code@RequestMapping(value="/tags/tagTypes/{tagTypeCode}/tagCodes/{tagCode}",
method=GET)
@Secured(value="FN_TAGS_GET")
public Tag getTag(@PathVariable(value="tagTypeCode")
String tagTypeCode,
@PathVariable(value="tagCode")
String tagCode)
tagTypeCode - the tag type codetagCode - the tag code@RequestMapping(value="/tags/tagTypes/{tagTypeCode}",
method=GET)
@Secured(value="FN_TAGS_ALL_GET")
public TagListResponse getTags(@PathVariable(value="tagTypeCode")
String tagTypeCode,
@RequestParam(value="tagCode",required=false)
String tagCode)
tagTypeCode - the tag type's code.tagCode - the parent tag code.@RequestMapping(value="/tags/search",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_TAGS_SEARCH_POST")
public TagSearchResponse searchTags(@RequestBody
TagSearchRequest request,
@RequestParam(value="fields",required=false,defaultValue="")
Set<String> fields)
request - the tag search request. The request can only accept a single search filter and a single search keyfields - the field options for the tag type search response. The valid field options are: displayName, description, parentTagKey, hasChildren@RequestMapping(value="/tags/tagTypes/{tagTypeCode}/tagCodes/{tagCode}",
method=PUT,
consumes={"application/xml","application/json"})
@Secured(value="FN_TAGS_PUT")
public Tag updateTag(@PathVariable(value="tagTypeCode")
String tagTypeCode,
@PathVariable(value="tagCode")
String tagCode,
@RequestBody
TagUpdateRequest tagUpdateRequest)
tagTypeCode - the tag type codetagCode - the tag codetagUpdateRequest - the information needed to update the tagCopyright © 2021. All rights reserved.