|
Cisco Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.pcube.apps.engage.policy.PackageArray
public class PackageArray
An array of packages. this PackageArray belongs to a Policy. It holds MAX_PACKAGES Packages, but not all of them are used. An unused Package in the array is considered as non existing. You can set the Package index if that index does not hold a valid Package.
| Constructor Summary | |
|---|---|
PackageArray(Policy policy)
PackageArray Constructor. |
|
| Method Summary | |
|---|---|
boolean |
add(Package item)
Adds the Package to this PackageArray. |
java.lang.Object |
clone()
Producing an identical object to this object. |
boolean |
contains(Package item)
Checks if the Package is in this PackageArray. |
boolean |
contains(java.lang.String item)
Checks if a Package bearing the specific name is in this PackageArray. |
static Package |
findNearestAncestorWithExclusiveCounter(Policy policy,
Package pkg,
java.lang.String parentPkgName,
boolean exclusiveCounter)
|
void |
fromStream(java.io.BufferedReader in,
Formatter f)
Reading this object from a BufferedReader |
static java.lang.String |
generatetHypotheticalCounterName(Policy policy,
Package pkg,
java.lang.String parentPkgName,
boolean exclusiveCounter)
|
static java.lang.String |
generatetHypotheticalCounterName(Policy policy,
Package pkg,
java.lang.String parentPkgName,
boolean exclusiveCounter,
java.lang.String nameSuffix)
|
java.lang.String[] |
getAppliedPackagesNames()
|
Package |
getAt(int index)
Gets the Package in this PackageArray in the specific index. |
java.lang.Integer[] |
getAvailableCounterIndices()
|
java.lang.String[] |
getCounterNames()
|
int |
getDefaultPackageIndex()
Gets the index of the default Package - the Package that all of the subscribers belong to prior to being associated explicitly to another Package. |
int |
getGlobalRulePackageIndex()
|
int |
getIndexOfItem(java.lang.String pkgName)
Gets the index of the Package bearing the specific name in this PackageArray. |
com.pcube.apps.engage.management.PrimitiveList |
getInternalList()
|
static int |
getMaxUsageCounters()
|
int |
getNextFreeCounterIndex()
|
java.lang.String[] |
getNonDecendentPackages(Package pkg)
|
int |
getNumOfUsedPackages()
|
Package |
getPackage(java.lang.String packageName)
Gets the Package from this PackageArray by the Package's name. |
java.lang.String[] |
getPackagesNames()
Gets the names of the Packages in this PackageArray. |
int |
getSize()
Gets the number of valid Packages in this PackageArray. |
int |
getUnknownSubscriberPackageIndex()
Gets the index of the Unknown Subscriber Package. |
boolean |
isIndexAllowedFor8k()
|
boolean |
isPackageIndexUsed(int index)
Checks if a certain index is occupied in this PackageArray. |
java.util.Iterator |
iterator()
|
java.util.Iterator |
iterator(boolean includeUnknownSubs)
|
boolean |
remove(int index)
Removes the Package that is in a certain index in this PackageArray. |
boolean |
remove(java.lang.String item)
Removes the Package bearing a specific name from this PackageArray. |
void |
removeDefaultPackage()
Removes the default Package. |
void |
removeUnknownSubscriberPackage()
Removes the unknown subscriber Package. |
void |
setPackageIndex(java.lang.String packageName,
int newIndex)
Sets the index for the Package bearing the specific name in this PackageArray. |
void |
toStream(java.io.PrintStream out,
Formatter f)
Writing this object to a PrintStream |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PackageArray(Policy policy)
policy - the policy this PackageArray belongs to| Method Detail |
|---|
public static Package findNearestAncestorWithExclusiveCounter(Policy policy,
Package pkg,
java.lang.String parentPkgName,
boolean exclusiveCounter)
public static java.lang.String generatetHypotheticalCounterName(Policy policy,
Package pkg,
java.lang.String parentPkgName,
boolean exclusiveCounter)
public static java.lang.String generatetHypotheticalCounterName(Policy policy,
Package pkg,
java.lang.String parentPkgName,
boolean exclusiveCounter,
java.lang.String nameSuffix)
public static int getMaxUsageCounters()
public boolean add(Package item)
throws DuplicateItemException
item - the Package to add
DuplicateItemException - if a Package with duplicate parameters is already in this
PackageArray
java.lang.IndexOutOfBoundsException - if this PackageArray is full with MAX_PACKAGES Packagespublic int getNextFreeCounterIndex()
public java.lang.Object clone()
clone in class java.lang.Objectpublic boolean contains(Package item)
item - the queried Package
public boolean contains(java.lang.String item)
item - the desired Package name
public void fromStream(java.io.BufferedReader in,
Formatter f)
throws ImportExportException
fromStream in interface Formattablein - the BufferedReaderf - the formatter used to read this object from the BufferedReader
ImportExportException
public Package getAt(int index)
throws ItemNotFoundException
index - the index of the Package in this PackageArray
ItemNotFoundException - if the index is out of bound or the Package in the index is
not usedpublic java.lang.Integer[] getAvailableCounterIndices()
pkg - public java.lang.String[] getCounterNames()
public int getDefaultPackageIndex()
public int getIndexOfItem(java.lang.String pkgName)
pkgName - the desired Package name
public boolean isIndexAllowedFor8k()
public java.lang.String[] getNonDecendentPackages(Package pkg)
pkg -
public int getNumOfUsedPackages()
public Package getPackage(java.lang.String packageName)
throws ItemNotFoundException
packageName - the desired Package's name
ItemNotFoundException - if the Package is not found in this PackageArraypublic java.lang.String[] getPackagesNames()
public java.lang.String[] getAppliedPackagesNames()
public int getSize()
isPackageIndexUsed(int)public int getUnknownSubscriberPackageIndex()
public int getGlobalRulePackageIndex()
public boolean isPackageIndexUsed(int index)
index - the index in this PackageArray
public java.util.Iterator iterator()
public java.util.Iterator iterator(boolean includeUnknownSubs)
public boolean remove(int index)
throws ItemNotFoundException
index - the removed Package's index in this PackageArray
ItemNotFoundException
public boolean remove(java.lang.String item)
throws ItemNotFoundException
item - the removed Package's name
ItemNotFoundException - if a Package bearing such a name does not exist in this
PackageArraypublic void removeDefaultPackage()
public void removeUnknownSubscriberPackage()
public void setPackageIndex(java.lang.String packageName,
int newIndex)
throws ItemNotFoundException
packageName - the Package's namenewIndex - the new Package's index
ItemNotFoundException - if a Package bearing such a name does not exist in this
PackageArray
public void toStream(java.io.PrintStream out,
Formatter f)
toStream in interface Formattableout - the PrintStreamf - the formatter used to write this objectpublic com.pcube.apps.engage.management.PrimitiveList getInternalList()
|
Cisco Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||