Cisco Systems, Inc.

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

java.lang.Object
  extended by com.pcube.apps.console.quota.data.QuotaServiceAttachmentList

public class QuotaServiceAttachmentList
extends java.lang.Object

Holds all policy services and their attachment to quota buckets information.

Author:
rbaryana

Constructor Summary
QuotaServiceAttachmentList(QuotaInterfaceType type)
           
 
Method Summary
 void addQuotaServiceAttachment(QuotaServiceAttachment quotaServiceAttahment)
           
 void attached(QuotaServiceAttachment quotaServiceAttahment)
           
 QuotaServiceAttachmentList duplicate()
          create a full duplication of the list.
 java.util.ArrayList<QuotaServiceAttachment> getAllServieAttahmnets(QuotaServieAttachmentFilter filter)
          get all attachment that are not filtered.
 QuotaServiceAttachment[] getAllUsedAttahments()
           
 QuotaServiceAttachment[] getAttachment(Service s)
           
 int getNumOfAttachments()
           
 int getNumOfUsedAttachments()
           
 boolean isDirty()
           
 void release(QuotaServiceAttachment quotaServiceAttahment)
          remove attachment from attached list.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuotaServiceAttachmentList

public QuotaServiceAttachmentList(QuotaInterfaceType type)
Method Detail

addQuotaServiceAttachment

public void addQuotaServiceAttachment(QuotaServiceAttachment quotaServiceAttahment)

attached

public void attached(QuotaServiceAttachment quotaServiceAttahment)

release

public void release(QuotaServiceAttachment quotaServiceAttahment)
remove attachment from attached list. must be called after the attachment were removed.

Parameters:
quotaServiceAttahment -

getNumOfAttachments

public int getNumOfAttachments()
Returns:
number of attachments in list (used or an used)

getAttachment

public QuotaServiceAttachment[] getAttachment(Service s)
Parameters:
s -
Returns:
all service attachment of service (the size of the array depened on the profile that contains the list).

duplicate

public QuotaServiceAttachmentList duplicate()
create a full duplication of the list. changing any data in the duplication will not effect this object.

Returns:
duplication object

getAllServieAttahmnets

public java.util.ArrayList<QuotaServiceAttachment> getAllServieAttahmnets(QuotaServieAttachmentFilter filter)
get all attachment that are not filtered.

Parameters:
filter - - filter to use, if null then will return all possible attachmnets
Returns:
arraylist of all attachments that were not filtered.

getAllUsedAttahments

public QuotaServiceAttachment[] getAllUsedAttahments()
Returns:
all used attachment is array

getNumOfUsedAttachments

public int getNumOfUsedAttachments()
Returns:
number of attachment associated with bucket.

isDirty

public boolean isDirty()
Returns:
true if list changed since last check. calling this method set isDitry to false.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.