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 com.ning.billing.entitlement.api;
 
 import java.util.List;
 import java.util.UUID;
 
API to manage the retrieval of Subscription information.
 
 public interface SubscriptionApi {

    
Retrieves a Subscription For the entitlementId

Parameters:
entitlementId the id of the entitlement associated with the subscription
context the context
Returns:
the subscription
Throws:
SubscriptionApiException if it odes not exist
 
     Subscription getSubscriptionForEntitlementId(UUID entitlementIdTenantContext contextthrows SubscriptionApiException;

    
Retrieves all the Subscription attached to the base entitlement.

Parameters:
bundleId the id of the bundle
context the context
Returns:
a list of subscriptions
Throws:
SubscriptionApiException if the baseEntitlementId does not exist.
 
     public SubscriptionBundle getSubscriptionBundle(UUID bundleIdTenantContext contextthrows SubscriptionApiException;


    
Update the externalKey for a given bundle

Parameters:
bundleId ; bundle id
newExternalKey : the new value for the externalKey
context : the call context
 
     public void updateExternalKey(UUID bundleIdString newExternalKeyCallContext context);


    
Retrieves all the SubscriptionBundle for a given account and matching an external key.

Parameters:
accountId the account id
externalKey the external key
context the context
Returns:
a SubscriptionBundle
Throws:
SubscriptionApiException if there is n o such object matching the account and external key
 
     public List<SubscriptionBundlegetSubscriptionBundlesForAccountIdAndExternalKey(UUID accountIdString externalKeyTenantContext contextthrows SubscriptionApiException;


    
Retrieves all the SubscriptionBundle for the given external key. It is possible to have multiple SubscriptionBundle for a given external key in the system but only one will be active -- i.e. will contain Subscription in the active state.

Parameters:
externalKey the external key
context the context
Returns:
a SubscriptionBundle
Throws:
SubscriptionApiException if there is no such object
 
Returns an ordered list of all SubscriptionBundle for a given external key.

Returns:
 
Retrieves all the SubscriptionBundle for a given account.

Parameters:
accountId the account id
context the context
Returns:
list of SubscriptionBundle
Throws:
SubscriptionApiException if the account does not exist

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

    
Find all SubscriptionBundle having their id, account id or external key 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 SubscriptionBundle matching this search key for that tenant
    public Pagination<SubscriptionBundlesearchSubscriptionBundles(String searchKeyLong offsetLong limitTenantContext context);
New to GrepCode? Check out our FAQ X