org.openpermis.editor.policy.presenter
Class PolicyPartPool<P extends org.openpermis.policy.bean.PartBean>

java.lang.Object
  extended by org.openpermis.editor.policy.presenter.PolicyPartPool<P>
Type Parameters:
P - type of PartBean

public class PolicyPartPool<P extends org.openpermis.policy.bean.PartBean>
extends Object

Pool-Collections for a Policy.

Since:
0.1.0

Nested Class Summary
static interface PolicyPartPool.PartFinder<P>
          A part finder finds parts.
 
Constructor Summary
PolicyPartPool(org.openpermis.policy.bean.PolicyBean policy, Class<P> type)
          Creates a new pool.
PolicyPartPool(org.openpermis.policy.bean.PolicyBean policy, PolicyPartPool.PartFinder<P> partFinder)
          Creates a new pool.
 
Method Summary
protected  int getIndexBySerialNumber(List<? extends org.openpermis.policy.bean.PartBean> list, org.openpermis.policy.bean.SerialNumber serial)
          Finds a part by its serial number in a list.
 org.jdesktop.observablecollections.ObservableList<P> getPoolList()
           
 void mergePool(List<P> addList, boolean expunge)
          Merges the specified list of parts with the rules supplied.
 void mergePool(org.openpermis.policy.bean.PolicyBean policy, boolean expunge)
          Merges the specified list of parts with the rules supplied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyPartPool

public PolicyPartPool(org.openpermis.policy.bean.PolicyBean policy,
                      Class<P> type)
Creates a new pool.

Since:
0.1.0

PolicyPartPool

public PolicyPartPool(org.openpermis.policy.bean.PolicyBean policy,
                      PolicyPartPool.PartFinder<P> partFinder)
Creates a new pool.

Since:
0.3.0
Method Detail

getIndexBySerialNumber

protected int getIndexBySerialNumber(List<? extends org.openpermis.policy.bean.PartBean> list,
                                     org.openpermis.policy.bean.SerialNumber serial)
Finds a part by its serial number in a list.

Parameters:
list - the list to search.
serial - the serial to search for.
Returns:
the part index or -1 if it is not contained.
Since:
0.1.0

mergePool

public void mergePool(org.openpermis.policy.bean.PolicyBean policy,
                      boolean expunge)
Merges the specified list of parts with the rules supplied.

Parameters:
policy - the policy.
expunge - indicates if unused parts are removed from the list.
Since:
0.1.0

mergePool

public void mergePool(List<P> addList,
                      boolean expunge)
Merges the specified list of parts with the rules supplied.

Parameters:
addList - elements to add/update in the pool.
expunge - indicates if unused parts are removed from the list.
Since:
0.1.0

getPoolList

public org.jdesktop.observablecollections.ObservableList<P> getPoolList()
Since:
0.1.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:11
Copyright (c) 2002-2007 Ergon Informatik AG