Cisco Systems, Inc.

com.pcube.apps.engage.policy
Class SubscriberRedirectionArray

java.lang.Object
  extended by com.pcube.apps.engage.policy.SubNotificationArray
      extended by com.pcube.apps.engage.policy.SubscriberRedirectionArray
All Implemented Interfaces:
Formattable, java.io.Serializable

public class SubscriberRedirectionArray
extends SubNotificationArray
implements Formattable, java.io.Serializable

See Also:
Serialized Form

Field Summary
static int DEFAULT_NOTIFICATION_ID
           
static int DEFAULT_REDIRECT_ID
           
static int NETWORK_ATTACK_NOTIFICATION_ID
           
static int NUMBER_NOTIFICATIONS
           
 
Constructor Summary
SubscriberRedirectionArray(Policy policy)
           
 
Method Summary
 void add(SubNotification notification, boolean askUniqeId)
          Overriding the SubNotificationArray method
 void add(SubscriberRedirection notification, boolean askUniqeId)
          add notification to array.
 SubscriberRedirection addNewRedirectProfile()
           
 void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
          add a vetoable change listener: veto notification deletion
 SubscriberRedirection findById(int notificationId)
          finds a subscriber notification by Id
 void fromStream(java.io.BufferedReader in, Formatter f)
          will be called only for new pqbs - the network attack notification and default notification should already be in the pqb
 SubscriberRedirection getAt(int index)
           
 java.util.List getConditionalRedirectTypeNotification()
           
 int getDefaultNotificationId()
           
 int getDefaultRedirectId()
           
 java.util.List getNotificationTypeNotification()
           
 java.lang.String getToolTipAt(int index)
           
static java.lang.String getTooltipForNotif(SubscriberRedirection notif)
           
 java.beans.VetoableChangeSupport getVetoableRemoveNotification()
           
 boolean isFull()
           
 boolean isNetworkAttackNotification(SubscriberRedirection notif)
           
 java.util.ListIterator listIterator()
           
 void remove(SubNotification notification)
          Ovveride super class remove notification
 void remove(SubscriberRedirection notification)
          remove notification
 void removeById(int notificationId)
          remove notification by notification id
 void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
          remove a votable change listener: veto notification deletion
 int size()
           
 void toStream(java.io.PrintStream out, Formatter f)
          Method toStream
 
Methods inherited from class com.pcube.apps.engage.policy.SubNotificationArray
convertOldPqbToNewPqb, getAvialableIds, isDefaultNotification, isNetworkAttackNotification
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NETWORK_ATTACK_NOTIFICATION_ID

public static final int NETWORK_ATTACK_NOTIFICATION_ID
See Also:
Constant Field Values

DEFAULT_NOTIFICATION_ID

public static final int DEFAULT_NOTIFICATION_ID
See Also:
Constant Field Values

DEFAULT_REDIRECT_ID

public static final int DEFAULT_REDIRECT_ID
See Also:
Constant Field Values

NUMBER_NOTIFICATIONS

public static final int NUMBER_NOTIFICATIONS
See Also:
Constant Field Values
Constructor Detail

SubscriberRedirectionArray

public SubscriberRedirectionArray(Policy policy)
Method Detail

fromStream

public void fromStream(java.io.BufferedReader in,
                       Formatter f)
                throws ImportExportException
will be called only for new pqbs - the network attack notification and default notification should already be in the pqb

Specified by:
fromStream in interface Formattable
Overrides:
fromStream in class SubNotificationArray
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)
Description copied from interface: Formattable
Method toStream

Specified by:
toStream in interface Formattable
Overrides:
toStream in class SubNotificationArray
See Also:
Formattable.toStream(java.io.PrintStream, com.pcube.apps.engage.common.Formatter)

addVetoableChangeListener

public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
add a vetoable change listener: veto notification deletion

Overrides:
addVetoableChangeListener in class SubNotificationArray
Parameters:
listener -

findById

public SubscriberRedirection findById(int notificationId)
finds a subscriber notification by Id

Overrides:
findById in class SubNotificationArray
Parameters:
notificationId - notification id
Returns:
null if notification not found

getAt

public SubscriberRedirection getAt(int index)
Overrides:
getAt in class SubNotificationArray
Parameters:
index -
Returns:

remove

public void remove(SubNotification notification)
            throws java.beans.PropertyVetoException
Ovveride super class remove notification

Overrides:
remove in class SubNotificationArray
Parameters:
notification -
Throws:
java.beans.PropertyVetoException

remove

public void remove(SubscriberRedirection notification)
            throws java.beans.PropertyVetoException
remove notification

Parameters:
notification -
Throws:
java.beans.PropertyVetoException

removeById

public void removeById(int notificationId)
                throws java.beans.PropertyVetoException
remove notification by notification id

Overrides:
removeById in class SubNotificationArray
Parameters:
notificationId -
Throws:
java.beans.PropertyVetoException

removeVetoableChangeListener

public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
remove a votable change listener: veto notification deletion

Overrides:
removeVetoableChangeListener in class SubNotificationArray
Parameters:
listener -

size

public int size()
Overrides:
size in class SubNotificationArray

getDefaultNotificationId

public int getDefaultNotificationId()
Overrides:
getDefaultNotificationId in class SubNotificationArray
Returns:
default notification id

getDefaultRedirectId

public int getDefaultRedirectId()
Returns:
default redirect id

add

public void add(SubNotification notification,
                boolean askUniqeId)
         throws com.pcube.apps.engage.foundations.UniquenessViolationException,
                com.pcube.apps.engage.foundations.FullCollectionException
Overriding the SubNotificationArray method

Overrides:
add in class SubNotificationArray
askUniqeId - - true to set a unique id
Throws:
com.pcube.apps.engage.foundations.UniquenessViolationException
com.pcube.apps.engage.foundations.FullCollectionException

add

public void add(SubscriberRedirection notification,
                boolean askUniqeId)
         throws com.pcube.apps.engage.foundations.UniquenessViolationException,
                com.pcube.apps.engage.foundations.FullCollectionException
add notification to array.

Parameters:
notification -
askUniqeId - - true to set a unique id
Throws:
com.pcube.apps.engage.foundations.UniquenessViolationException
com.pcube.apps.engage.foundations.FullCollectionException

isFull

public boolean isFull()
Overrides:
isFull in class SubNotificationArray
Returns:
true if array is full hence no notification can be added.

listIterator

public java.util.ListIterator listIterator()
Overrides:
listIterator in class SubNotificationArray

isNetworkAttackNotification

public boolean isNetworkAttackNotification(SubscriberRedirection notif)

getToolTipAt

public java.lang.String getToolTipAt(int index)

getTooltipForNotif

public static java.lang.String getTooltipForNotif(SubscriberRedirection notif)

getConditionalRedirectTypeNotification

public java.util.List getConditionalRedirectTypeNotification()

getNotificationTypeNotification

public java.util.List getNotificationTypeNotification()

addNewRedirectProfile

public SubscriberRedirection addNewRedirectProfile()

getVetoableRemoveNotification

public java.beans.VetoableChangeSupport getVetoableRemoveNotification()

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.