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
(package private)  class PolicyPartPool.DefaultPartFinder
           
static interface PolicyPartPool.PartFinder<P>
          A part finder finds parts.
 
Field Summary
private static org.slf4j.Logger LOGGER
          The logger object of this class.
private  PolicyPartPool.PartFinder<P> partFinder
           
private  org.jdesktop.observablecollections.ObservableList<P> poolList
           
private  Class<P> type
           
 
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
 

Field Detail

LOGGER

private static final org.slf4j.Logger LOGGER
The logger object of this class.

Since:
0.1.0

poolList

private final org.jdesktop.observablecollections.ObservableList<P extends org.openpermis.policy.bean.PartBean> poolList

type

private final Class<P extends org.openpermis.policy.bean.PartBean> type

partFinder

private PolicyPartPool.PartFinder<P extends org.openpermis.policy.bean.PartBean> partFinder
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.3.0 (Build 14)
2009/05/08 09:06:48
Copyright (c) 2002-2007 Ergon Informatik AG