Cisco Systems, Inc.

com.pcube.apps.console.quota.data
Class QuotaData

java.lang.Object
  extended by com.pcube.apps.console.quota.data.QuotaData
All Implemented Interfaces:
Formattable, ServiceChangeListener

public class QuotaData
extends java.lang.Object
implements Formattable, ServiceChangeListener

Data struct holding all Quota configurations per Policy.

Author:
rbaryana

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.pcube.apps.engage.policy.ServiceChangeListener
ServiceChangeListener.ActionType
 
Method Summary
 void copyData(QuotaData data)
           
static QuotaData createDefault(Policy p)
          Contains only defualt profile and all other parameters configured to thier default.
 QuotaData duplicate()
           
 void fromStream(java.io.BufferedReader in, Formatter f)
          Read Configuration from PQB.
 QuotaProfileData getDefaultProfile()
           
 QuotaGeneralSettingsData getGeneralSettingData()
           
 QuotaProfileData getProfile(java.lang.String name)
           
 QuotaProfileList getProfilesList()
           
 void serviceChanged(ServiceChangeListener.ActionType type, Service service)
          Notified when user changes services.
 void toStream(java.io.PrintStream out, Formatter f)
          Write Configuration to PQB.
static QuotaData upgradePolicy(Policy p)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGeneralSettingData

public QuotaGeneralSettingsData getGeneralSettingData()

getProfilesList

public QuotaProfileList getProfilesList()

duplicate

public QuotaData duplicate()
                    throws QuotaDataException
Throws:
QuotaDataException

copyData

public void copyData(QuotaData data)

getDefaultProfile

public QuotaProfileData getDefaultProfile()
Returns:
the default profile (no quota).

fromStream

public void fromStream(java.io.BufferedReader in,
                       Formatter f)
                throws ImportExportException
Read Configuration from PQB. (non-Javadoc)

Specified by:
fromStream in interface Formattable
Throws:
ImportExportException
See Also:
Formattable.fromStream(java.io.BufferedReader, com.pcube.apps.engage.common.Formatter)

toStream

public void toStream(java.io.PrintStream out,
                     Formatter f)
Write Configuration to PQB.

Specified by:
toStream in interface Formattable

getProfile

public QuotaProfileData getProfile(java.lang.String name)
Parameters:
name - - the profile name (profile have a unique name)
Returns:
the profile is exists or null if no such profile found

serviceChanged

public void serviceChanged(ServiceChangeListener.ActionType type,
                           Service service)
Notified when user changes services. This includes service add,remove and index change (rare).

Specified by:
serviceChanged in interface ServiceChangeListener

createDefault

public static QuotaData createDefault(Policy p)
Contains only defualt profile and all other parameters configured to thier default.

Parameters:
p -
Returns:
default QuotaData

upgradePolicy

public static QuotaData upgradePolicy(Policy p)

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.