Package org.killbill.billing.util.api
Interface TagUserApi
-
- All Superinterfaces:
KillbillApi
public interface TagUserApi extends KillbillApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTag(UUID objectId, ObjectType objectType, UUID tagDefinitionId, CallContext context)voidaddTags(UUID objectId, ObjectType objectType, Collection<UUID> tagDefinitionIds, CallContext context)TagDefinitioncreateTagDefinition(String definitionName, String description, Set<ObjectType> applicableObjectTypes, CallContext context)voiddeleteTagDefinition(UUID tagDefinitionId, CallContext context)List<AuditLogWithHistory>getTagAuditLogsWithHistoryForId(UUID tagId, AuditLevel auditLevel, TenantContext context)Get all the audit entries with history for a given tag.TagDefinitiongetTagDefinition(UUID tagDefinitionId, TenantContext context)List<AuditLogWithHistory>getTagDefinitionAuditLogsWithHistoryForId(UUID tagDefinitionId, AuditLevel auditLevel, TenantContext context)Get all the audit entries with history for a given tag definition.TagDefinitiongetTagDefinitionForName(String tageDefinitionName, TenantContext context)List<TagDefinition>getTagDefinitions(Collection<UUID> tagDefinitionIds, TenantContext context)List<TagDefinition>getTagDefinitions(TenantContext context)Pagination<Tag>getTags(Long offset, Long limit, TenantContext context)List<Tag>getTagsForAccount(UUID accountId, boolean includedDeleted, TenantContext context)List<Tag>getTagsForAccountType(UUID accountId, ObjectType objectType, boolean includedDeleted, TenantContext context)List<Tag>getTagsForObject(UUID objectId, ObjectType objectType, boolean includedDeleted, TenantContext context)voidremoveTag(UUID objectId, ObjectType objectType, UUID tagDefinitionId, CallContext context)voidremoveTags(UUID objectId, ObjectType objectType, Collection<UUID> tagDefinitions, CallContext context)Pagination<Tag>searchTags(String searchKey, Long offset, Long limit, TenantContext context)Find all tags having their object type, associated tag definition name or description matching the search key
-
-
-
Method Detail
-
getTagDefinitions
List<TagDefinition> getTagDefinitions(TenantContext context)
- Parameters:
context- The tenant context- Returns:
- the list of all available tag definitions
-
createTagDefinition
TagDefinition createTagDefinition(String definitionName, String description, Set<ObjectType> applicableObjectTypes, CallContext context) throws TagDefinitionApiException
- Parameters:
definitionName- Identifies the definition.description- Describes the use of the definition.context- The call context, for auditing purposes- Returns:
- the newly created tag definition
- Throws:
TagDefinitionApiException
-
deleteTagDefinition
void deleteTagDefinition(UUID tagDefinitionId, CallContext context) throws TagDefinitionApiException
- Parameters:
tagDefinitionId- The UUID for that tagDefinitioncontext- The call context, for auditing purposes- Throws:
TagDefinitionApiException
-
getTagDefinition
TagDefinition getTagDefinition(UUID tagDefinitionId, TenantContext context) throws TagDefinitionApiException
- Parameters:
tagDefinitionId- The tag definition idcontext- The call context, for auditing purposes- Returns:
- The Tag definition
- Throws:
TagDefinitionApiException
-
getTagDefinitionForName
TagDefinition getTagDefinitionForName(String tageDefinitionName, TenantContext context) throws TagDefinitionApiException
- Parameters:
tageDefinitionName- The tag definition namecontext- The call context, for auditing purposes- Returns:
- the tag definition
- Throws:
TagDefinitionApiException
-
getTagDefinitions
List<TagDefinition> getTagDefinitions(Collection<UUID> tagDefinitionIds, TenantContext context) throws TagDefinitionApiException
- Parameters:
tagDefinitionIds- The collection of the defintion idscontext- The call context, for auditing purposes- Returns:
- the tag definition
- Throws:
TagDefinitionApiException
-
addTags
void addTags(UUID objectId, ObjectType objectType, Collection<UUID> tagDefinitionIds, CallContext context) throws TagApiException
- Parameters:
objectId- The id for the object on which to add tagsobjectType- The object typetagDefinitionIds- The collection of tag definition idscontext- The call context, for auditing purposes- Throws:
TagApiException
-
addTag
void addTag(UUID objectId, ObjectType objectType, UUID tagDefinitionId, CallContext context) throws TagApiException
- Parameters:
objectId- The id for the object on which to add tagsobjectType- The object typetagDefinitionId- The tag definition idcontext- The call context, for auditing purposes- Throws:
TagApiException
-
removeTags
void removeTags(UUID objectId, ObjectType objectType, Collection<UUID> tagDefinitions, CallContext context) throws TagApiException
- Parameters:
objectId- The id for the object on which to add tagsobjectType- The object typetagDefinitions- The collection of tag definition idscontext- The call context, for auditing purposes- Throws:
TagApiException
-
removeTag
void removeTag(UUID objectId, ObjectType objectType, UUID tagDefinitionId, CallContext context) throws TagApiException
- Parameters:
objectId- The id for the object on which to add tagsobjectType- The object typetagDefinitionId- The tage definition idcontext- The call context, for auditing purposes- Throws:
TagApiException
-
searchTags
Pagination<Tag> searchTags(String searchKey, Long offset, Long limit, TenantContext context)
Find all tags having their object type, associated tag definition name or description matching the search key- Parameters:
searchKey- the search keyoffset- the offset of the first resultlimit- the maximum number of results to retrievecontext- the user context- Returns:
- the list of tags matching this search key for that tenant
-
getTags
Pagination<Tag> getTags(Long offset, Long limit, TenantContext context)
- Parameters:
context- the user contextoffset- the offset of the first resultlimit- the maximum number of results to retrieve- Returns:
- the list of tags for that tenant
-
getTagsForObject
List<Tag> getTagsForObject(UUID objectId, ObjectType objectType, boolean includedDeleted, TenantContext context)
- Parameters:
objectId- UUID of the object on which to retrieve the tagsobjectType- The type of objectincludedDeleted- Whether to include deleted tagscontext- The tenant context- Returns:
- A map of tag, key being the tagId, and value the tag
-
getTagsForAccountType
List<Tag> getTagsForAccountType(UUID accountId, ObjectType objectType, boolean includedDeleted, TenantContext context)
- Parameters:
accountId- The account idobjectType- The type of object on which to retrieve the tagsincludedDeleted- Whether to include deleted tagscontext- The tenant context- Returns:
- A list of tags for that object type and that given account
-
getTagsForAccount
List<Tag> getTagsForAccount(UUID accountId, boolean includedDeleted, TenantContext context)
- Parameters:
accountId- The account idincludedDeleted- Whether to include deleted tagscontext- The tenant context- Returns:
- A list of tags for that given account
-
getTagAuditLogsWithHistoryForId
List<AuditLogWithHistory> getTagAuditLogsWithHistoryForId(UUID tagId, AuditLevel auditLevel, TenantContext context)
Get all the audit entries with history for a given tag.- Parameters:
tagId- the custom field idauditLevel- audit level (verbosity)context- the tenant context- Returns:
- all audit entries with history for a tag
-
getTagDefinitionAuditLogsWithHistoryForId
List<AuditLogWithHistory> getTagDefinitionAuditLogsWithHistoryForId(UUID tagDefinitionId, AuditLevel auditLevel, TenantContext context)
Get all the audit entries with history for a given tag definition.- Parameters:
tagDefinitionId- the custom field idauditLevel- audit level (verbosity)context- the tenant context- Returns:
- all audit entries with history for a tag definition
-
-