Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2013 Ning, Inc.
   *
   * Ning licenses this file to you under the Apache License, version 2.0
   * (the "License"); you may not use this file except in compliance with the
   * License.  You may obtain a copy of the License at:
   *
   *    http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
  * License for the specific language governing permissions and limitations
  * under the License.
  */
 
 package org.killbill.billing.util.api;
 
 import java.util.List;
 import java.util.UUID;
 
 
 import static org.killbill.billing.security.Permission.TAG_CAN_ADD;
 import static org.killbill.billing.security.Permission.TAG_CAN_CREATE_TAG_DEFINITION;
 import static org.killbill.billing.security.Permission.TAG_CAN_DELETE_TAG_DEFINITION;
 import static org.killbill.billing.security.Permission.TAG_CAN_REMOVE;
 
 public interface TagUserApi extends KillbillApi {

    

Parameters:
context The tenant context
Returns:
the list of all available tag definitions
 
     public List<TagDefinitiongetTagDefinitions(TenantContext context);

    

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
 
     public TagDefinition createTagDefinition(String definitionNameString descriptionCallContext contextthrows TagDefinitionApiException;

    

Parameters:
tagDefinitionId The UUID for that tagDefinition
context The call context, for auditing purposes
Throws:
TagDefinitionApiException
 
     public void deleteTagDefinition(UUID tagDefinitionIdCallContext contextthrows TagDefinitionApiException;

    

Parameters:
tagDefinitionId The tag definition id
context The call context, for auditing purposes
Returns:
The Tag definition
Throws:
TagDefinitionApiException
 
     public TagDefinition getTagDefinition(UUID tagDefinitionIdTenantContext contextthrows TagDefinitionApiException;

    

Parameters:
tageDefinitionName The tag definition name
context The call context, for auditing purposes
Returns:
the tag definition
Throws:
TagDefinitionApiException
 
     public TagDefinition getTagDefinitionForName(String tageDefinitionNameTenantContext contextthrows TagDefinitionApiException;

    

Parameters:
tagDefinitionIds The collection of the defintion ids
context The call context, for auditing purposes
Returns:
the tag definition
Throws:
TagDefinitionApiException
 
     public List<TagDefinitiongetTagDefinitions(Collection<UUIDtagDefinitionIdsTenantContext contextthrows TagDefinitionApiException;

    

Parameters:
objectId The id for the object on which to add tags
objectType The object type
tagDefinitionIds The collection of tag definition ids
context The call context, for auditing purposes
Throws:
TagApiException
 
     public void addTags(UUID objectIdObjectType objectTypeCollection<UUIDtagDefinitionIdsCallContext contextthrows TagApiException;

    

Parameters:
objectId The id for the object on which to add tags
objectType The object type
tagDefinitionId The tag definition id
context The call context, for auditing purposes
Throws:
TagApiException
    public void addTag(UUID objectIdObjectType objectTypeUUID tagDefinitionIdCallContext contextthrows TagApiException;

    

Parameters:
objectId The id for the object on which to add tags
objectType The object type
tagDefinitions The collection of tag definition ids
context The call context, for auditing purposes
Throws:
TagApiException
    public void removeTags(UUID objectIdObjectType objectTypeCollection<UUIDtagDefinitionsCallContext contextthrows TagApiException;

    

Parameters:
objectId The id for the object on which to add tags
objectType The object type
tagDefinitionId The tage definition id
context The call context, for auditing purposes
Throws:
TagApiException
    public void removeTag(UUID objectIdObjectType objectTypeUUID tagDefinitionIdCallContext contextthrows TagApiException;

    
Find all tags having their object type, associated tag definition name or description matching the search key

Parameters:
searchKey the search key
offset the offset of the first result
limit the maximum number of results to retrieve
context the user context
Returns:
the list of tags matching this search key for that tenant
    public Pagination<TagsearchTags(String searchKeyLong offsetLong limitTenantContext context);

    

Parameters:
context the user context
offset the offset of the first result
limit the maximum number of results to retrieve
Returns:
the list of tags for that tenant
    public Pagination<TaggetTags(Long offsetLong limitTenantContext context);

    

Parameters:
objectId UUID of the object on which to retrieve the tags
objectType The type of object
includedDeleted Whether to include deleted tags
context The tenant context
Returns:
A map of tag, key being the tagId, and value the tag
    public List<TaggetTagsForObject(UUID objectIdObjectType objectTypeboolean includedDeletedTenantContext context);

    

Parameters:
accountId The account id
objectType The type of object on which to retrieve the tags
includedDeleted Whether to include deleted tags
context The tenant context
Returns:
A list of tags for that object type and that given account
    public List<TaggetTagsForAccountType(UUID accountIdObjectType objectTypeboolean includedDeletedTenantContext context);

    

Parameters:
accountId The account id
includedDeleted Whether to include deleted tags
context The tenant context
Returns:
A list of tags for that given account
    public List<TaggetTagsForAccount(UUID accountIdboolean includedDeletedTenantContext context);
New to GrepCode? Check out our FAQ X