|
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.ServiceArray
public class ServiceArray
An array of Services. The ServiceArray belongs to a Policy. It holds
Policy.MAX_SERVICESServices, but not all of them are used.
An unused Service in the array is considered as non existing. You can set the
Service index if that index does not hold a valid Service.
| Constructor Summary | |
|---|---|
ServiceArray(Policy policy)
ServiceArray Constructor. |
|
| Method Summary | |
|---|---|
boolean |
add(Service newService)
Adds the Service to this ServiceArray. |
java.lang.Object |
clone()
|
boolean |
contains(Service service)
Checks if the specified Service is in this ServiceArray. |
boolean |
contains(java.lang.String serviceName)
Checks if the specified Service is in this ServiceArray. |
void |
fromStream(java.io.BufferedReader in,
Formatter f)
Method fromStream |
Service |
getAt(int serviceIndex)
Gets the Service in this ServiceArray in the specific index. |
java.util.List |
getAvailableCounterIndices(AccountingScope scope)
|
java.lang.String[] |
getCounterNames(AccountingScope scope)
|
Service |
getDefaultService()
|
int |
getIndexOfItem(java.lang.String serviceName)
Gets the index of the Service bearing the specific name in this ServiceArray. |
com.pcube.apps.engage.management.PrimitiveList |
getInternalServiceArray()
|
int |
getNextFreeCounterId(AccountingScope scope)
|
java.lang.String[] |
getNonDescendentServiceNames(Service service)
|
int |
getNumOfUsedServices()
Gets the number of valid Services in this ServiceArray. |
Service |
getService(java.lang.String serviceName)
Gets the Service from this ServiceArray by the Service's name. |
int |
getServiceIndex(java.lang.String serviceName)
Gets the service index of the Service bearing the specific name. |
java.lang.String[] |
getServiceNames()
Gets the names of the Services in this ServiceArray. |
boolean |
isServiceIndexUsed(int serviceIndex)
Checks if the specified index is used in this ServiceArray. |
java.util.Iterator |
iterator()
|
java.util.ListIterator |
listIterator()
|
boolean |
remove(int serviceIndex)
Removes the Service that is in a certain index in this ServiceArray. |
boolean |
remove(java.lang.String serviceName)
Removes the specified Service from this ServiceArray. |
void |
setServiceIndex(java.lang.String serviceName,
int newServiceIndex)
Sets the index for the Service bearing the specific name in this ServiceArray. |
void |
toStream(java.io.PrintStream out,
Formatter f)
Method toStream |
java.lang.String |
toString()
|
void |
vetoableChange(java.beans.PropertyChangeEvent arg0)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceArray(Policy policy)
policy - the policy this ServiceArray belongs to| Method Detail |
|---|
public boolean add(Service newService)
throws DuplicateItemException
newService - the Service to add
DuplicateItemException - if a Service with duplicate parameters is already in this
ServiceArray
java.lang.IndexOutOfBoundsException - if this ServiceArray is full with Policy.MAX_SERVICES
Servicespublic java.lang.Object clone()
clone in class java.lang.ObjectObject.clone()public boolean contains(Service service)
service - Service whose presence in this ServiceArray is to be tested.
public boolean contains(java.lang.String serviceName)
serviceName - Service whose presence in this ServiceArray is to be tested.
public void fromStream(java.io.BufferedReader in,
Formatter f)
throws ImportExportException
Formattable
fromStream in interface FormattableImportExportExceptionFormattable.fromStream(java.io.BufferedReader,
com.pcube.apps.engage.common.Formatter)
public Service getAt(int serviceIndex)
throws ItemNotFoundException
serviceIndex - the index of the Service in this ServiceArray
ItemNotFoundException - if the index is out of bound or the Service in the index is
not usedpublic java.util.List getAvailableCounterIndices(AccountingScope scope)
scope -
public java.lang.String[] getCounterNames(AccountingScope scope)
global -
public Service getDefaultService()
public int getIndexOfItem(java.lang.String serviceName)
serviceName - the desired Service name
public com.pcube.apps.engage.management.PrimitiveList getInternalServiceArray()
public int getNextFreeCounterId(AccountingScope scope)
scope -
public java.lang.String[] getNonDescendentServiceNames(Service service)
service -
public int getNumOfUsedServices()
public Service getService(java.lang.String serviceName)
throws ItemNotFoundException
serviceName - the desired Service's name
ItemNotFoundException - if the Service is not found in this ServiceArray
public int getServiceIndex(java.lang.String serviceName)
throws ItemNotFoundException
serviceName - the desired Service's name
ItemNotFoundException - if no such Service exists in this ServiceArraypublic java.lang.String[] getServiceNames()
Policy.MAX_SERVICESlong.
public boolean isServiceIndexUsed(int serviceIndex)
serviceIndex - the index to test
public java.util.Iterator iterator()
public java.util.ListIterator listIterator()
public boolean remove(int serviceIndex)
throws ItemNotFoundException
serviceIndex - the removed Service's index in this ServiceArray
ItemNotFoundException
public boolean remove(java.lang.String serviceName)
throws ItemNotFoundException
serviceName - the removed Service's name
ItemNotFoundException - if a Service bearing such a name does not exist in this
ServiceArray
public void setServiceIndex(java.lang.String serviceName,
int newServiceIndex)
throws ItemNotFoundException
serviceName - the Service's namenewServiceIndex - the new Service's index
ItemNotFoundException - if a Service bearing such a name does not exist in this
ServiceArray
public void toStream(java.io.PrintStream out,
Formatter f)
Formattable
toStream in interface FormattableFormattable.toStream(java.io.PrintStream,
com.pcube.apps.engage.common.Formatter)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
public void vetoableChange(java.beans.PropertyChangeEvent arg0)
throws java.beans.PropertyVetoException
vetoableChange in interface java.beans.VetoableChangeListenerjava.beans.PropertyVetoException
|
Cisco Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||