Cisco Systems, Inc.

com.cisco.scabb.servconf.mgmt
Class ServiceConfig

java.lang.Object
  extended by com.cisco.scabb.servconf.mgmt.ServiceConfig
All Implemented Interfaces:
Formattable, java.io.Serializable

public class ServiceConfig
extends java.lang.Object
implements java.io.Serializable, Formattable

ServiceConfig is the whole set of lists, protocols, services and packages that an ISP has defined. The ServiceConfig is applied to the ServiceConfig Domain's SCE boxes and sets their application's parameters to regulate the subscriber's flows.

See Also:
Serialized Form

Constructor Summary
ServiceConfig()
          ServiceConfig Constructor.
ServiceConfig(Policy policy)
          ServiceConfig Constructor.
ServiceConfig(java.lang.String descriptionText)
          Deprecated. use ServiceConfig()instead.
 
Method Summary
 void fromStream(java.io.BufferedReader in, Formatter f)
          Reading this object from a BufferedReader
 CalendarArray getCalendarList()
          Gets the calendar-list
 ClassificationConfiguration getClassificationCfg()
          Gets the classification configuration
 NotifyingProperties getCustomNonPersistentProperties()
          Gets the notification-properties of the domain
 DynamicSignaturesScript getDynamicSignatureScript()
          Gets the dynamic-signature configuration
 long getLastApplyTimestamp()
          Gets the timestamp of the time this Service-Configuration was successfully applied to any Service-Configuration Domain.
 com.pcube.apps.engage.management.PrimitiveList getListenersDataList()
          Gets the predifined-listeners' related configuration
 PackageArray getPackageList()
          Gets this Service-Configuration's Package list.
 PolicySettings getPolicySettings()
          Gets this Service-Configuration's settings.
 ProtocolFamiliesManager getProtocolFamiliesManager()
          Use the ProtocolFamiliesManager to manage the Service-Configuration's protocol families settings
 ProtocolList getProtocolList()
          Gets this Service-Configuration's Protocol list.
 ProtocolRedirectIndexNameArray getProtocolRedirectIndexNameArray()
          Gets the list of the Protocols' redirect index names.
 java.lang.String getProtocolRedirectString(java.lang.String protocolName)
          Gets the default redirect address for the Protocol.
 java.lang.String getProtocolRedirectString(java.lang.String protocolName, int redirectIndex)
          Gets the redirect address for the Protocol in a certain index in its redirect String array.
 java.lang.String getRealTimeFrameName(java.lang.String name)
          Gets the predefined API name for a certain TimeFrame.
 ServiceArray getServiceList()
          Gets this Service-Configuration's Service list.
 SubscriberRedirectionArray getSubNotifications()
          Gets the subscriber's notification as configured in the Service-Configuration
 java.lang.String[] getTimeFrameNames()
          Gets the time frame names this Service-Configuration has assigned the different TimeFrames.
 TimeSlotMatrix getTimeSlotMatrix()
          Deprecated. use CalendarArray.getDefaultTimeSlotMatrix()
 ZoneList getZoneList()
          Gets this Service-Configuration's IP, IP ranges and host lists array.
 boolean isProtocolRedirectable(java.lang.String protocolName)
          Deprecated.  
 void setAddOnGroupsList(AddOnGroupArray settings)
           
 void setLastApplyTimestamp(long newLastApplyTimestamp)
          Sets the "last-apply-timestamp"
 void setPackageList(PackageArray list)
          Sets a package-list
 void setProtocolRedirectString(java.lang.String protocolName, int redirectIndex, java.lang.String value)
          Sets the address to redirect a certain flow to.
 void setProtocolRedirectString(java.lang.String protocolName, java.lang.String value)
          Sets the default address to redirect a certain flow to.
 void setServConfSettings(PolicySettings settings)
          Sets Service-Configuration-settings
 void setServiceList(ServiceArray list)
          Sets a list of services
 void setSubNotifications(SubscriberRedirectionArray subNotifications)
           
 void setTimeFrameName(int index, java.lang.String newName)
          Sets an alias for the specific TimeFrame which has a certain index.
 void setTimeFrameName(TimeFrame frame, java.lang.String newName)
          Sets an alias for the specific TimeFrame.
 void setTimeFrameNames(java.lang.String[] newNames)
          Sets the names of all time frames.
 void setTimeSlotMatrix(TimeSlotMatrix newTimeSlotMatrix)
          Deprecated. use CalendarArray.getDefaultTimeSlotMatrix()
 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

ServiceConfig

public ServiceConfig()
ServiceConfig Constructor.


ServiceConfig

public ServiceConfig(Policy policy)
ServiceConfig Constructor.

Parameters:
policy - - the current policy

ServiceConfig

public ServiceConfig(java.lang.String descriptionText)
Deprecated. use ServiceConfig()instead.

Parameters:
descriptionText -
Method Detail

fromStream

public void fromStream(java.io.BufferedReader in,
                       Formatter f)
                throws ImportExportException
Reading this object from a BufferedReader

Specified by:
fromStream in interface Formattable
Parameters:
in - the BufferedReader
f - the formatter used to read this object from the BufferedReader
Throws:
ImportExportException

getCalendarList

public CalendarArray getCalendarList()
Gets the calendar-list

Returns:
the list of calendars of the service-configuration

getClassificationCfg

public ClassificationConfiguration getClassificationCfg()
Gets the classification configuration

Returns:
the classification-related configuration in the domain

getCustomNonPersistentProperties

public NotifyingProperties getCustomNonPersistentProperties()
Gets the notification-properties of the domain

Returns:
the notification-properties

getDynamicSignatureScript

public DynamicSignaturesScript getDynamicSignatureScript()
Gets the dynamic-signature configuration

Returns:
the dynamic-signature script

getLastApplyTimestamp

public long getLastApplyTimestamp()
Gets the timestamp of the time this Service-Configuration was successfully applied to any Service-Configuration Domain.

Returns:
the timestamp

getListenersDataList

public com.pcube.apps.engage.management.PrimitiveList getListenersDataList()
Gets the predifined-listeners' related configuration

Returns:
listeners data list

getPackageList

public PackageArray getPackageList()
Gets this Service-Configuration's Package list. These Packages are the groups the subscribers belong to, and whose rules and regulations restrict the subscriber.

Returns:
this Serv-Conf's Package list

getPolicySettings

public PolicySettings getPolicySettings()
Gets this Service-Configuration's settings. These settings are general system settings for the SCEs in this Service-Configuration's Domain.

Returns:
this Service-Configuration's settings

getProtocolFamiliesManager

public ProtocolFamiliesManager getProtocolFamiliesManager()
Use the ProtocolFamiliesManager to manage the Service-Configuration's protocol families settings

Returns:

getProtocolList

public ProtocolList getProtocolList()
Gets this Service-Configuration's Protocol list. The Protocols in this list are reffered to by the Service-Configuration's Services.

Returns:
this Service-Configuration's Protocols list

getProtocolRedirectIndexNameArray

public ProtocolRedirectIndexNameArray getProtocolRedirectIndexNameArray()
Gets the list of the Protocols' redirect index names.

Returns:
the list of the Protocols' redirect index names

getProtocolRedirectString

public java.lang.String getProtocolRedirectString(java.lang.String protocolName,
                                                  int redirectIndex)
                                           throws ItemNotFoundException
Gets the redirect address for the Protocol in a certain index in its redirect String array. Redirection is part of the Protocol's specification, thus exists only for a few predefined Protocols.

Parameters:
protocolName - the queried Protocol
redirectIndex - the index in the redirect String array
Returns:
the redirect address
Throws:
ItemNotFoundException - if there is no such predefined Protocol in this Policy's ProtocolArray, or if the redirect index is out of bound

getRealTimeFrameName

public java.lang.String getRealTimeFrameName(java.lang.String name)
                                      throws ItemNotFoundException
Gets the predefined API name for a certain TimeFrame.

Parameters:
name - this Service-Configuration's alias for the TimeFrame
Returns:
the TimeFrame's API name
Throws:
ItemNotFoundException - if there is no such alias in this Service-Configuration

getServiceList

public ServiceArray getServiceList()
Gets this Service-Configuration's Service list. These Services are referred to by this Service-Configuration's Package's Rules.

Returns:
this Service-Configuration's Service list

getSubNotifications

public SubscriberRedirectionArray getSubNotifications()
Gets the subscriber's notification as configured in the Service-Configuration

Returns:
the subNotifications.

getTimeFrameNames

public java.lang.String[] getTimeFrameNames()
Gets the time frame names this Service-Configuration has assigned the different TimeFrames. These aliases are solely for convenience of meaningful namings. The returned String array keeps in index X the alias of the TimeFrame index X.

Returns:
the String array of this Service-Configuration's time frame names

getTimeSlotMatrix

public TimeSlotMatrix getTimeSlotMatrix()
Deprecated. use CalendarArray.getDefaultTimeSlotMatrix()

Gets this Service-Configuration's division of the week into time frames.

Returns:
the weekly time slot matrix

getProtocolRedirectString

public java.lang.String getProtocolRedirectString(java.lang.String protocolName)
                                           throws ItemNotFoundException
Gets the default redirect address for the Protocol. Redirection is part of the Protocol's specification, thus exists only for a few predefined Protocols.

Parameters:
protocolName - the queried Protocol
Returns:
the redirect address
Throws:
ItemNotFoundException - if there is no such predefined Protocol in this Service-Configuration's ProtocolArray

getZoneList

public ZoneList getZoneList()
Gets this Service-Configuration's IP, IP ranges and host lists array. These lists are reffered to by this Service-Configuration's Services.

Returns:
this Service-Configuration's array of lists

isProtocolRedirectable

public boolean isProtocolRedirectable(java.lang.String protocolName)
                               throws ItemNotFoundException
Deprecated. 

Checks if a specific Protocol supports redirecting. Redirection is part of the Protocol's specification, thus exists only for a few predefined Protocols.

Parameters:
protocolName - the queried Protocol's name
Returns:
true if the Protocol support redirection, false otherwise
Throws:
ItemNotFoundException - if there is no such predefined Protocol in this Service-Configuration's ProtocolArray

setLastApplyTimestamp

public void setLastApplyTimestamp(long newLastApplyTimestamp)
Sets the "last-apply-timestamp"

Parameters:
newLastApplyTimestamp - the apply-timestamp to set

setPackageList

public void setPackageList(PackageArray list)
Sets a package-list

Parameters:
list - a package-list to set

setServConfSettings

public void setServConfSettings(PolicySettings settings)
Sets Service-Configuration-settings

Parameters:
settings -
See Also:
com.pcube.apps.engage.policy

setAddOnGroupsList

public void setAddOnGroupsList(AddOnGroupArray settings)

setProtocolRedirectString

public void setProtocolRedirectString(java.lang.String protocolName,
                                      int redirectIndex,
                                      java.lang.String value)
                               throws ItemNotFoundException,
                                      java.net.MalformedURLException
Sets the address to redirect a certain flow to. The redirect occurs when a Rule has a ACCESS_BLOCK_AND_REDIRECT access mode for a certain Service which uses the desired Protocol. The setting is done to a certain String in the redirect String array. The Rule chooses which redirect String to use from the redirect String array.

Parameters:
protocolName - the desired Protocol whose activity is to be redirected
redirectIndex - the redirect String index in the Protocol's redirect String array
value - the Protocol's new redirect address
Throws:
ItemNotFoundException - if there is no such predefined Protocol in this Service-Configuration's ProtocolArray, or if the redirect index is out of bound
java.net.MalformedURLException - if the string is an illegal URL name

setProtocolRedirectString

public void setProtocolRedirectString(java.lang.String protocolName,
                                      java.lang.String value)
                               throws ItemNotFoundException,
                                      java.net.MalformedURLException
Sets the default address to redirect a certain flow to. The redirect occurs when a Rule has a ACCESS_BLOCK_AND_REDIRECT access mode for a certain Service which uses the desired Protocol.

Parameters:
protocolName - the desired Protocol whose activity is to be redirected
value - the Protocol's new redirect address
Throws:
ItemNotFoundException - if there is no such predefined Protocol in this Service-Configuration's ProtocolArray
java.net.MalformedURLException - if the string is an illegal URL name

setServiceList

public void setServiceList(ServiceArray list)
Sets a list of services

Parameters:
list - a services list to set

setSubNotifications

public void setSubNotifications(SubscriberRedirectionArray subNotifications)
Parameters:
subNotifications - The subNotifications to set.

setTimeFrameName

public void setTimeFrameName(int index,
                             java.lang.String newName)
                      throws ItemNotFoundException,
                             DuplicateItemException
Sets an alias for the specific TimeFrame which has a certain index. The alias is solely for meaningful naming convenience.

Parameters:
index - the index of the TimeFrame to which the alias is given
newName - the alias
Throws:
ItemNotFoundException - if there is no such TimeFrame
DuplicateItemException

setTimeFrameName

public void setTimeFrameName(TimeFrame frame,
                             java.lang.String newName)
                      throws ItemNotFoundException,
                             DuplicateItemException
Sets an alias for the specific TimeFrame. The alias is solely for meaningful naming convenience.

Parameters:
frame - the TimeFrame to which the alias is given
newName - the alias
Throws:
ItemNotFoundException - if there is no such TimeFrame
DuplicateItemException

setTimeFrameNames

public void setTimeFrameNames(java.lang.String[] newNames)
Sets the names of all time frames.

Parameters:
newNames - the names to set

setTimeSlotMatrix

public void setTimeSlotMatrix(TimeSlotMatrix newTimeSlotMatrix)
Deprecated. use CalendarArray.getDefaultTimeSlotMatrix()

Sets this Service-Configuration's time slot matrix. This matrix divides the week into different time frames, for which the Packages can define specific behavior for each Service.

Parameters:
newTimeSlotMatrix - the matrix of time-slots to set

toStream

public void toStream(java.io.PrintStream out,
                     Formatter f)
Writing this object to a PrintStream

Specified by:
toStream in interface Formattable
Parameters:
out - the PrintStream
f - the formatter used to write this object

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.