Cisco Systems, Inc.

com.pcube.apps.engage.apply
Class PackageAdaptor

java.lang.Object
  extended by com.pcube.apps.engage.apply.PackageAdaptor

public class PackageAdaptor
extends Object

Model package to tuneables adaptor

Author:
rafis

Constructor Summary
PackageAdaptor(Policy policy)
           
 
Method Summary
 com.pcube.apps.framework.newapply.IndexProvider getAccountUnitsIndexProvider()
          creates an index provider for quota accounting units .
 com.pcube.apps.framework.newapply.FormatAdaptor getActiveBucketFormatAdaptor()
          Given a package peer creats bit map that tells the SML which bucket is active (1) and which is idle (0).
 com.pcube.apps.framework.newapply.FormatAdaptor getAggPeriodTypeFormatAdaptor()
          Given a package peer decides the agg period num.
 com.pcube.apps.framework.newapply.IndexProvider getBucketsIndexProvider()
          creates an index provider for buckets.
 List<PackagePeer> getPackages()
           
 int[] getPkgIndexMapping()
          mapping of package index to package id.
 com.pcube.apps.framework.newapply.FormatAdaptor getPrimaryBWCsIdxFormatAdaptor(BWCSetAdaptor bwcAdaptor, int direction)
          instantiates and returns a format adaptor that for a given package peer returns the primary down or up BWC index
 com.pcube.apps.framework.newapply.FormatAdaptor getQuotaConsumptionTimeFormatAdaptor()
           
 com.pcube.apps.framework.newapply.FormatAdaptor getQuotaFinalUnitActionFormatAdaptor()
           
 com.pcube.apps.framework.newapply.FormatAdaptor getQuotaHoldingTimeFormatAdaptor()
           
 com.pcube.apps.framework.newapply.FormatAdaptor getQuotaTariffFormatAdaptor()
           
 com.pcube.apps.framework.newapply.FormatAdaptor getQuotaTunableArrayFormatAdaptor()
           
 com.pcube.apps.framework.newapply.FormatAdaptor getQuotaTypeFormatAdaptor()
          For a given package peer creates a bit mask that has a dual meaning: 1.
 com.pcube.apps.framework.newapply.FormatAdaptor getQuotaValidityTimeFormatAdaptor()
           
 com.pcube.apps.framework.newapply.FormatAdaptor getQuotaValueAccountUnitsFormatAdaptor()
           
 com.pcube.apps.framework.newapply.FormatAdaptor getQuotaValueFormatAdaptor()
          Format Quota Bucket Value.
 com.pcube.apps.framework.newapply.FormatAdaptor getreqQuotaUponLoginFormatAdaptor()
           
 com.pcube.apps.framework.newapply.IndexProvider getTarrifIndexProvider()
          creates an index provider for tariff (Gy quota model).
 com.pcube.apps.framework.newapply.IndexProvider getTunableArrayIndexProvider()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageAdaptor

public PackageAdaptor(Policy policy)
Method Detail

getQuotaTypeFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getQuotaTypeFormatAdaptor()
For a given package peer creates a bit mask that has a dual meaning: 1. quota buckets types. A session quota type is a set bit and unset is a bytes quota. The SML requires that the unlimited bucket is set to 0. 2. If bucket is not active (it is not associated with no rule) its corresponding bit will be set unless the previous bucket is the last active bucket. Thus the SML app knows to stop iterating the buckets array if the bucket is unused but its corresponding bit in the type bit mask is unset.

Returns:
See Also:
getActiveBucketFormatAdaptor

getQuotaValueAccountUnitsFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getQuotaValueAccountUnitsFormatAdaptor()

getActiveBucketFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getActiveBucketFormatAdaptor()
Given a package peer creats bit map that tells the SML which bucket is active (1) and which is idle (0).

Returns:

getAggPeriodTypeFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getAggPeriodTypeFormatAdaptor()
Given a package peer decides the agg period num.

Returns:

getreqQuotaUponLoginFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getreqQuotaUponLoginFormatAdaptor()

getQuotaValueFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getQuotaValueFormatAdaptor()
Format Quota Bucket Value.

Returns:

getQuotaConsumptionTimeFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getQuotaConsumptionTimeFormatAdaptor()

getQuotaTunableArrayFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getQuotaTunableArrayFormatAdaptor()

getQuotaHoldingTimeFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getQuotaHoldingTimeFormatAdaptor()

getQuotaValidityTimeFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getQuotaValidityTimeFormatAdaptor()

getQuotaFinalUnitActionFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getQuotaFinalUnitActionFormatAdaptor()

getQuotaTariffFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getQuotaTariffFormatAdaptor()
Returns:
Tariff adaptor

getBucketsIndexProvider

public com.pcube.apps.framework.newapply.IndexProvider getBucketsIndexProvider()
creates an index provider for buckets. expects an object array that has a package in the first location and a bucket in the second. The IndexProvider returns the package index as the row's index and the bucket index as the column's index.


getTunableArrayIndexProvider

public com.pcube.apps.framework.newapply.IndexProvider getTunableArrayIndexProvider()

getTarrifIndexProvider

public com.pcube.apps.framework.newapply.IndexProvider getTarrifIndexProvider()
creates an index provider for tariff (Gy quota model). expects an object array that has a package in the first location and a tariff Data in the second. The IndexProvider returns the package index as the row's index and the tariff index as the column's index.


getAccountUnitsIndexProvider

public com.pcube.apps.framework.newapply.IndexProvider getAccountUnitsIndexProvider()
creates an index provider for quota accounting units . expects an object array that has a package in the first location and a quota accoutning units Data in the second. The IndexProvider returns the package index as the row's index and the accounting units index as the column's index.


getPackages

public List<PackagePeer> getPackages()
Returns:
list of (used)packages

getPkgIndexMapping

public int[] getPkgIndexMapping()
mapping of package index to package id. for each location in the range 0:MAX_PACKAGES the value is the package index if the package exists or else the index of the default package. The goal of this mapping is to assign subscribers to the default package if their package index is not defined in the policy

Returns:

getPrimaryBWCsIdxFormatAdaptor

public com.pcube.apps.framework.newapply.FormatAdaptor getPrimaryBWCsIdxFormatAdaptor(BWCSetAdaptor bwcAdaptor,
                                                                                      int direction)
instantiates and returns a format adaptor that for a given package peer returns the primary down or up BWC index

Parameters:
bwcAdaptor -
direction -
Returns:

Cisco Systems, Inc.

Copyright © 2011 Cisco Systems, Inc. Confidential.