ARoad0.gBase
Class NoThanViewInBaseImpl

java.lang.Object
  extended by ARoad0.gBase.FolderAbst
      extended by ARoad0.gBase.ViewInBaseImpl
          extended by ARoad0.gBase.EPRViewInBaseImpl
              extended by ARoad0.gBase.NoThanViewInBaseImpl
All Implemented Interfaces:
BaseObject, BoundBean, EPRViewInBase, Folder, ImmutableFolder, NoThanViewInBase, ViewInBase, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener

public class NoThanViewInBaseImpl
extends EPRViewInBaseImpl
implements NoThanViewInBase

This class is responsible for managing the No-More-Than and No-Less-Than views. The aim is to check if some Eligible Parties (or Sources) has rights on the access target above a given 'no-more' right and below a given 'no-less' right. As any view, the result depends on all the opened ACSs.

The 'no-less' right criterion is generally used to check the compliance to the access needs. The 'no-more' right criterion is generally used to check the compliance to the access security policy. This view handles one target, a set of basic rights users as standard EPRViewInBase objects, another set of excluded Sources which belong or run under one of the basic right user, a StringRight 'no-more' criterion and a StringRight 'no-less' criterion.

The checking perimeter includes the view sources and the listening perimeter. The associates of a source are defined as their direct/indirect members and their direct/indirect running-under Actors. This listening perimeter is get by the subtraction of excluded sources and their associates from the view Sources list (also called 'basic rights users') and their associates. For instance, if the group A is a view Source, and has only group B and group C has direct members, and if the group C is a view excluded Source, the listening perimeter contains only the group B and its associates.

The number of basic right users is limited to 9, like the reduced users, and the number of sources to check in the checking perimeter is limited to 50. Caution: every Source is indeed a Target, since a GroupDMember for example is the target of the RUN_UNDER relation. The two right criteria have to be positive. It is not possible to have a less criterion greater than the more criterion, but they may be equal or equivallent. The comparison between a criterion and the effective rights of the checking perimeter uses the comparison of the respective metarights, even if they are ACS rights. It is possible to have as criterion an administrative right and a non-administrative right, or criteria mixing a metaright and an acsright, or two ACS rights from different ACS.

This is a javabean with the following bound properties:

- 'OneExcludedEP' when an excluded Source is added or removed,

- 'FirstAccessTarget' when an access target is added or removed

- 'OneLessCriterion' when a less criterion is added or removed,

- 'OneMoreCriterion',

- 'CheckingPerimeter',

- 'ReducedEPsInViewEPs',

- 'ObjectChangesInListeningPerimeter',

- 'OnePropertyInAListeningPerimeterObject'.

The updating of the Target resets the two criteria, since they have a strong relation with the Target. The adding and the removing of the Target and the excluded sources is processed by Gui2.GraphicViewBaseListenerImpl almost like the adding or removing of an EPRViewInBase object, to refresh the draw of the view nodes and to analyze the new rights. The only difference is the alias relation handling, since the EPRViewInBase adds automatically in the view the reference of an alias and the alias of a reference, while this is not done in a NoThanViewInBase. The bound properties of the target are listened and processed like EPRViewInBase does for its standard objects. The bound properties of the excluded Sources have not to be listened. When a source is a GroupID containing GroupIDs, the bound property 'l_Members' of each group in the members tree has to be listened, and also the properties for the actors 'l_GroupIDCurrentActors' and 'l_GroupIDCurrentActorsAsSecondaryGroup' in each of these indirect members, if these objects are not excluded sources.

See Also:
GraphicNoThanView, Serialized Form

Field Summary
static NoThanViewInBase EMPTY_INSTANCE
           
protected  java.util.List<ImmutableSource> l_checkingPerimeter_
           
protected  java.util.List<ImmutableName> l_excludedSourceNames_
           
protected  java.util.List<ImmutableSource> l_excludedSources_
           
protected  java.util.List<ImmutableSource> l_reducedSourcesInViewSources_
           
protected  java.util.Map<java.lang.String,StringRight[]> m_LessCriteria_
           
protected  java.util.Map<java.lang.String,StringRight[]> m_MoreCriteria_
           
static java.io.ObjectStreamField[] serialPersistentFields
           
 
Fields inherited from class ARoad0.gBase.EPRViewInBaseImpl
lastEvent_, m_NoSourceTargets_, m_Sources_, m_Targets_
 
Fields inherited from class ARoad0.gBase.ViewInBaseImpl
ARCHI_VIEW_NAME, ARCHI_VIEW_STRING
 
Fields inherited from class ARoad0.gBase.FolderAbst
baseError_, changeSupport_, comment_, connectedToSeveralACS_, INITIAL_CAPACITY, INITIAL_CAPACITY_5, l_connectedACSNames_, m_BaseObjects_, m_ObjectsNames_, name_, PRIME, type_
 
Constructor Summary
NoThanViewInBaseImpl()
          Default constructor
NoThanViewInBaseImpl(ImmutableName _name)
           
NoThanViewInBaseImpl(ImmutableName _name, java.util.Map _m_BaseObjects, boolean _toRegisterInManager)
          This constructor is used by BaseManagerImpl.openView() to create every instance.
 
Method Summary
 void addEorExcludedSource(ImmutableSource _sour)
          Adds an excluded Source, which is is in the perimeter of checking, but has not to be checked.
protected  void addEorHardAlias(ACSObject _obj)
          Empty method since the NoThanView does not handle the alias relation as the EPRView.
 void addEorNoThanAccessTarget(ImmutableTarget _targ)
          NO USE SO FAR.
 void addEorSource(ImmutableSource _sour)
          Adds a view Source which is not a Target, and this does not exist.
 void addEorTarget(ImmutableTarget _targ)
          Checks if there is not more that 8 elements, and forbids it otherwise.
protected  void addOwnListening(boolean _callSuper, boolean _listenACSs)
          Registers the instance as a property event listener for any change on the access target or the checking perimeter, since they are not handled as a view object in the super classes.
protected  void addOwnListeningOnPerimeterEPs()
          This method registers the instance as a property event listener for any change on the listening perimeter.
protected  void addOwnListeningOnTarget()
          This method registers the instance as a property event listener for any change on the access target, since it is not handled as a view object in the super classes.
 void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
          Adds a listener to the bean for the properties 'FirstAccessTarget', 'OneExcludedEP', 'OneLessCriterion', 'OneMoreCriterion', 'CheckingPerimeter', 'ReducedEPsInViewEPs', 'ObjectChangesInListeningPerimeter', 'OnePropertyInAListeningPerimeterObject', or for any superclass property.
 boolean containsExcludedSource(ImmutableSource _sour)
          An excluded Source is connected to a view basic Source, but it has not to be checked since it is explicitly put away by the user.
protected static ViewInBase copy(ImmutableName _name, NoThanViewInBase _view, boolean _toRegisterInManager)
          Creates a copy with another name, and may register it.
 NoThanViewInBase copyAndSave(ImmutableName _name)
          Creates, registers in the base and saves a view copy with another name.
 void finalizeForBase()
          The view is removed as a listener and the internal maps are set to null.
 void finalizeForCopy()
          The internal maps are set to null.
protected  void finalizeFromDeserialization()
          This method clears l_excludedSourceNames_, m_MoreCriteria_ and m_LessCriteria_.
 java.util.Set<ImmutableSource> getCheckingPerimeter()
          List of Sources which are in the perimeter of checking, and that includes the view BaseObjects and the listening perimeter.
 ImmutableTarget getEorFirstAccessTarget()
          This view handles exactly one access target.
 java.util.List<ImmutableSource> getExcludedSources()
          An excluded Source is connected to a view basic Source, but it has not to be checked since it is explicitly put away by the user.
 StringRight getLessCriterion()
          The aim is to check if an Eligible Party has rights on the target, which are lesser than the 'less' criteria.
 StringRight getMoreCriterion()
          The aim is to check if an Eligible Party has rights on the target which are greater than the 'more' criteria.
 java.lang.String getNickName()
          This short name is NOT unique for the Access Road program nor the ACS if it is an ACS object.
 java.util.Set<ImmutableSource> getReducedSourcesInViewSources()
          List of Sources from the view Sources list which have at most a connected member or a running-under actor being an excluded Source.
protected  java.lang.String prepareAfterRestoring()
          This method must be called by BaseManagerImpl after the opening of the view, to update the transient properties, and to check up the open ACS and their objects which are in the restored view.
protected  void prepareBeforeSaving()
          This method must be called by BaseManagerImpl before the saving of the view, to update l_excludedSourceNames_ from l_excludedSources_ which is not saved.
 void propertyChange(java.beans.PropertyChangeEvent _evt)
          Observer of the property changes and adding/removing of the accesss target, the adding/removing of excluded EPs, the adding/removing of the listener perimeter, the property changes of every EP in the checking perimeter, the right changes on any implied ACL.
 void removeEorExcludedSource(ImmutableSource _sour)
          Removes an excluded Source, which is in the perimeter of checking, but has not to be checked.
protected  void removeEorHardAlias(ACSObject _obj)
          Empty method since the NoThanView does not handle the alias relation as the EPRView.
 void removeEorNoThanAccessTarget(ImmutableTarget _targ)
          This method handles exactly one target.
 void removeEorSource(ImmutableSource _sour)
          Removes a view Source which is not a Target, and this does not exist.
 void removeEorTarget(ImmutableTarget _targ)
          Removes a view node.
protected  void removeOwnListening(boolean _callSuper, boolean _listenACSs)
          This method unregister the instance as a property event listener for any change on the access target or the checking perimeter, since it is not handled as a view object in the super classes.
protected  void removeOwnListeningOnPerimeterEPs()
          This method unregisters the instance as a property event listener for any change on the listening perimeter.
protected  void removeOwnListeningOnTarget()
          This method unregisters the instance as a property event listener for any change on the access target, since it is not handled as a view object in the super classes.
 void removePropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
          Removes a listener to the bean for the properties 'FirstAccessTarget', 'OneExcludedEP', 'OneLessCriterion', 'OneMoreCriterion', 'CheckingPerimeter', 'ReducedEPsInViewEPs', 'ObjectChangesInListeningPerimeter', 'OnePropertyInAListeningPerimeterObject', or for any superclass property.
 void setEorFirstAccessTarget(ImmutableTarget _targ)
          This view handles exactly one access target.
 void setLessCriterion(StringRight _right)
          The aim is to check if an Eligible Party has rights on the target, which are lesser than the 'less' criteria.
 void setMoreCriterion(StringRight _right)
          The aim is to check if an Eligible Party has rights on the target which are greater than the 'more' criteria.
protected  void setUpContextLists()
          This method updates l_checkingPerimeter_ and l_reducedSourcesInViewSources_, which are transient lists.
 
Methods inherited from class ARoad0.gBase.EPRViewInBaseImpl
addEorBaseObject, addEorHardAliasOrReference, addOwnListening, containsSource, containsTarget, copy, finalizeForGUI, firePropertyChange, getEorM_NoSourceTargets, getEorM_Sources, getEorM_Targets, removeEorBaseObject, removeEorHardAliasOrReference, removeOwnListening
 
Methods inherited from class ARoad0.gBase.ViewInBaseImpl
addOwnListening, copy, getCompleteResults, getSerialVersionUID, removeOwnListening
 
Methods inherited from class ARoad0.gBase.FolderAbst
addPropertyChangeListener, containsBaseObject, finalize, firePropertyChange, getComment, getConnectedToSeveralACS, getEorBaseError, getEorL_ConnectedACSNames, getEorM_BaseObjects, getFullName, getName, getType, hashCode, isEmpty, prepareDataAfterRestoring, removePropertyChangeListener, setComment, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ARoad0.gBaseInterface.EPRViewInBase
containsSource, containsTarget, getEorM_NoSourceTargets, getEorM_Sources, getEorM_Targets
 
Methods inherited from interface ARoad0.gBaseInterface.ViewInBase
getCompleteResults
 
Methods inherited from interface ARoad0.gBaseInterface.Folder
addEorBaseObject, addPropertyChangeListener, removeEorBaseObject, removePropertyChangeListener, setComment
 
Methods inherited from interface ARoad0.gBaseInterface.ImmutableFolder
containsBaseObject, getComment, getConnectedToSeveralACS, getEorL_ConnectedACSNames, getEorM_BaseObjects, getType, isEmpty
 
Methods inherited from interface ARoad0.gBaseInterface.BaseObject
equals, getFullName, getName, hashCode
 

Field Detail

m_MoreCriteria_

protected java.util.Map<java.lang.String,StringRight[]> m_MoreCriteria_

m_LessCriteria_

protected java.util.Map<java.lang.String,StringRight[]> m_LessCriteria_

l_excludedSourceNames_

protected java.util.List<ImmutableName> l_excludedSourceNames_

l_excludedSources_

protected transient java.util.List<ImmutableSource> l_excludedSources_

l_checkingPerimeter_

protected transient java.util.List<ImmutableSource> l_checkingPerimeter_

l_reducedSourcesInViewSources_

protected transient java.util.List<ImmutableSource> l_reducedSourcesInViewSources_

EMPTY_INSTANCE

public static final NoThanViewInBase EMPTY_INSTANCE

serialPersistentFields

public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail

NoThanViewInBaseImpl

public NoThanViewInBaseImpl()
Default constructor


NoThanViewInBaseImpl

public NoThanViewInBaseImpl(ImmutableName _name)
                     throws CreateError
Parameters:
_name - of the view. it is copied.
Throws:
CreateError - if the view name is already known in BaseManagerImpl.

NoThanViewInBaseImpl

public NoThanViewInBaseImpl(ImmutableName _name,
                            java.util.Map _m_BaseObjects,
                            boolean _toRegisterInManager)
                     throws CreateError
This constructor is used by BaseManagerImpl.openView() to create every instance. So, all the objects to listen (ACS...) do receive a registration from this instance, and that would not be the case in a simple deserialization. Calls the super constructor with the same arguments, and calls addOwnListening(true, true).

Parameters:
_name - of the view. It is copied.
_m_BaseObjects - is the map (name, object) of the view objects, without no-Actor Resource(s). It is copied. The maximal size is 9. May be null.
_toRegisterInManager - false if this constructor must not register the instance in BaseManagerImpl and in its view objects.
Throws:
CreateError - if the constructor of EPRViewInBaseImpl fires it, or if _m_BaseObjects contains an object that is not a source.
Method Detail

getNickName

public java.lang.String getNickName()
This short name is NOT unique for the Access Road program nor the ACS if it is an ACS object. It is often the last component name, but not for a NoThanViewInBase where it is the first and the last components, with ':: ' as separator. Overrides ViewInBaseImpl.

Specified by:
getNickName in interface BaseObject
Overrides:
getNickName in class ViewInBaseImpl
Returns:
the nick name. May be null.

getEorFirstAccessTarget

public ImmutableTarget getEorFirstAccessTarget()
This view handles exactly one access target.

Specified by:
getEorFirstAccessTarget in interface NoThanViewInBase
Returns:
the target. May be null only before the first updating

setEorFirstAccessTarget

public void setEorFirstAccessTarget(ImmutableTarget _targ)
                             throws BaseError
This view handles exactly one access target. The More and Less criteria are set to null. Calls addOwnListeningOnTarget(). Fires the 'FirstAccessTarget' property change.

Specified by:
setEorFirstAccessTarget in interface NoThanViewInBase
Parameters:
_targ - the target to add. Never null, so a current target cannot be removed.
Throws:
BaseError - if the target is also a registered source in this view, if the number of targets is too large, if the argument is null, or the object name is null or empty.

addEorNoThanAccessTarget

public void addEorNoThanAccessTarget(ImmutableTarget _targ)
                              throws BaseError
NO USE SO FAR. This method handles exactly one target. If there is already a target, the More and Less criteria are set to null. Overrides the superclass method, and do not call BasicImpl.addInViewList() or VirtualFolderImpl.addInViewList(), nor FolderAbst.addEorBaseObject(), like the superclass does it. Calls addOwnListeningOnTarget(). Fires the 'FirstAccessTarget' property change.

Specified by:
addEorNoThanAccessTarget in interface NoThanViewInBase
Parameters:
_targ - the target to add
Throws:
BaseError - if the resource is also a registered source in this view, if the number of targets is too large, if the argument is null, or the object name is null or empty.

removeEorNoThanAccessTarget

public void removeEorNoThanAccessTarget(ImmutableTarget _targ)
                                 throws BaseError
This method handles exactly one target. The More and Less criteria are set to null. Called by propertyChange(). Fires the 'FirstAccessTarget' property change.

Specified by:
removeEorNoThanAccessTarget in interface NoThanViewInBase
Parameters:
_targ - the target to remove
Throws:
BaseError - if the argument is not the current target, if the argument is null, or the object name is null or empty.

getMoreCriterion

public StringRight getMoreCriterion()
The aim is to check if an Eligible Party has rights on the target which are greater than the 'more' criteria.

Specified by:
getMoreCriterion in interface NoThanViewInBase
Returns:
the 'more' criteria. May be null.

setMoreCriterion

public void setMoreCriterion(StringRight _right)
                      throws BaseError
The aim is to check if an Eligible Party has rights on the target which are greater than the 'more' criteria. Fires the 'OneMoreCriterion' property change with the old and the new values.

Specified by:
setMoreCriterion in interface NoThanViewInBase
Parameters:
_right - is the 'more' criteria. May be null or have the same power than the less right.
Throws:
BaseError - if the argument is empty, or the target is null, or the argument is inferior to the less right.

getLessCriterion

public StringRight getLessCriterion()
The aim is to check if an Eligible Party has rights on the target, which are lesser than the 'less' criteria.

Specified by:
getLessCriterion in interface NoThanViewInBase
Returns:
the 'less' criteria. May be null.

setLessCriterion

public void setLessCriterion(StringRight _right)
                      throws BaseError
The aim is to check if an Eligible Party has rights on the target, which are lesser than the 'less' criteria. Fire the 'OneLessCriterion' property change with the old and the new values.

Specified by:
setLessCriterion in interface NoThanViewInBase
Parameters:
_right - is the 'less' criteria. May be null.
Throws:
BaseError - if the argument is empty, the target is null, or the argument is superior to the more right.

getExcludedSources

public java.util.List<ImmutableSource> getExcludedSources()
An excluded Source is connected to a view basic Source, but it has not to be checked since it is explicitly put away by the user. So its compliance to the more and to the less criteria will stay unknown.

Specified by:
getExcludedSources in interface NoThanViewInBase
Returns:
list of the excluded sources. Never null.

containsExcludedSource

public boolean containsExcludedSource(ImmutableSource _sour)
An excluded Source is connected to a view basic Source, but it has not to be checked since it is explicitly put away by the user. So its compliance to the more and to the less criteria will stay unknown.

Specified by:
containsExcludedSource in interface NoThanViewInBase
Parameters:
_sour - to test
Returns:
true if the view references this Source as excluded

addEorExcludedSource

public void addEorExcludedSource(ImmutableSource _sour)
                          throws BaseError
Adds an excluded Source, which is is in the perimeter of checking, but has not to be checked. So its compliance to the more and to the less criteria will stay unknown. The perimeter of checking is defined as the set of the Sources which are registered in the view (but such Source may not be excluded), and the Source which are direct or indirect member of, or run under, a registered Source of the view. Fires 'OneExcludedEP' event.

Specified by:
addEorExcludedSource in interface NoThanViewInBase
Parameters:
_sour - source to exclude
Throws:
BaseError - if the argument is a registered Source, is not in the perimeter of checking, if the argument is null, or the object name is null or empty.

removeEorExcludedSource

public void removeEorExcludedSource(ImmutableSource _sour)
                             throws BaseError
Removes an excluded Source, which is in the perimeter of checking, but has not to be checked. So its compliance to the more and to the less criteria will stay unknown. The perimeter of checking is defined as the set of the Source which are registered in the view (but such Source may not be excluded), and the Source which are direct or indirect member of, or run under, a registered Source of the view. Fires 'OneExcludedEP' event.

Specified by:
removeEorExcludedSource in interface NoThanViewInBase
Parameters:
_sour - non-null Source to remove as excluded Source
Throws:
BaseError - if the Source is unknown as excluded, or if the argument is null, if the object name is empty.

getCheckingPerimeter

public java.util.Set<ImmutableSource> getCheckingPerimeter()
List of Sources which are in the perimeter of checking, and that includes the view BaseObjects and the listening perimeter. Gets the checking perimeter which includes the view BaseObjects and the listening perimeter. The associates of an Source are defined as their direct/indirect members and their direct/indirect running-under actors. This listening perimeter is get by the subtraction of the excluded Sources and their associates from the view Sources list (also called 'basic rights users') and their associates.

For instance, if the group A is a view Source, and has only group B and group C has direct members, and if the group C is a view excluded Source, the listening perimeter contains only the group B and its associates.

The Sources in the listening perimeter do not registered this NoThanViewInBase has an implied view. The size is limited to 50.

Specified by:
getCheckingPerimeter in interface NoThanViewInBase
Returns:
the Sources in the checking perimeter. Never null.

getReducedSourcesInViewSources

public java.util.Set<ImmutableSource> getReducedSourcesInViewSources()
List of Sources from the view Sources list which have at most a connected member or a running-under actor being an excluded Source. Do not contain the reduced Sources in the checking perimeter which are not view Sources, that is when they are members or running-under Actors of a view Source.

Specified by:
getReducedSourcesInViewSources in interface NoThanViewInBase
Returns:
the Sources. Never null.

addEorTarget

public void addEorTarget(ImmutableTarget _targ)
                  throws CreateError
Checks if there is not more that 8 elements, and forbids it otherwise. Overrides the super method and calls it. Called by the constructor through the super constructor and addEorHardAliasOrReference().

Specified by:
addEorTarget in interface EPRViewInBase
Overrides:
addEorTarget in class EPRViewInBaseImpl
Parameters:
_targ - new right user to analyze
Throws:
CreateError - if the argument is not an Actor, if the limit of 9 view objects is get, if the target is already known by the view, if the argument is null, or the object name is null or empty, or if the name is already known by the view.

addEorSource

public void addEorSource(ImmutableSource _sour)
                  throws CreateError
Adds a view Source which is not a Target, and this does not exist. Checks if there is not more that 8 elements, and forbid it otherwise. Overrides the super method and calls it. Called by the constructor through the super constructor and addEorHardAliasOrReference().

Specified by:
addEorSource in interface EPRViewInBase
Overrides:
addEorSource in class EPRViewInBaseImpl
Parameters:
_sour - new right user to analyze
Throws:
CreateError - if _sour name is null, the limit of 9 view objects or 50 objects in the checking perimeter is get.

removeEorTarget

public void removeEorTarget(ImmutableTarget _targ)
                     throws CreateError
Removes a view node. Overrides the super method and calls it.

Specified by:
removeEorTarget in interface EPRViewInBase
Overrides:
removeEorTarget in class EPRViewInBaseImpl
Parameters:
_targ - right user to remove
Throws:
CreateError - if the resource is not known by the view, or if the object name is empty.

removeEorSource

public void removeEorSource(ImmutableSource _sour)
                     throws CreateError
Removes a view Source which is not a Target, and this does not exist. Overrides the super method and calls it.

Specified by:
removeEorSource in interface EPRViewInBase
Overrides:
removeEorSource in class EPRViewInBaseImpl
Parameters:
_sour - right user to remove
Throws:
CreateError - if the Source is unknown as excluded, or if the argument is null, if the object name is empty.

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent _evt)
Observer of the property changes and adding/removing of the accesss target, the adding/removing of excluded EPs, the adding/removing of the listener perimeter, the property changes of every EP in the checking perimeter, the right changes on any implied ACL. Overrides the super method, and calls it at the last line if necessary. Listens 'OneBaseObject' on the ACS of the excluded EP, to remove them when they are deleting. Does not listen 'ResourceType', 'EPType', 'VirtualFolderType', 'Comment', 'ImpliedOpenViews' from the listened objects. Does not fire a 'InheritedOwnerRights' event after a 'FromTheParentAccount' event from the target or an actor of the perimeter, and so on for the group similar events. Does not fire a 'InheritedTargetPrivileges' or a 'InheritedTargetAclEntries' event if the last event is from the parent.

Specified by:
propertyChange in interface Folder
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class EPRViewInBaseImpl
Parameters:
_evt - PropertyChangeEvent
See Also:
addOwnListeningOnTarget(), addOwnListeningOnPerimeterEPs()

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String _propertyName,
                                      java.beans.PropertyChangeListener _l)
Adds a listener to the bean for the properties 'FirstAccessTarget', 'OneExcludedEP', 'OneLessCriterion', 'OneMoreCriterion', 'CheckingPerimeter', 'ReducedEPsInViewEPs', 'ObjectChangesInListeningPerimeter', 'OnePropertyInAListeningPerimeterObject', or for any superclass property. Calls the super method.

Specified by:
addPropertyChangeListener in interface BoundBean
Specified by:
addPropertyChangeListener in interface Folder
Overrides:
addPropertyChangeListener in class EPRViewInBaseImpl
Parameters:
_propertyName - is the name of the property
_l - PropertyChangeListener to add. Caution: the listener must NOT have specific hashCode() and equals() methods, to work with HashSet in the removing operations.

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String _propertyName,
                                         java.beans.PropertyChangeListener _l)
Removes a listener to the bean for the properties 'FirstAccessTarget', 'OneExcludedEP', 'OneLessCriterion', 'OneMoreCriterion', 'CheckingPerimeter', 'ReducedEPsInViewEPs', 'ObjectChangesInListeningPerimeter', 'OnePropertyInAListeningPerimeterObject', or for any superclass property. Call the super method.

Specified by:
removePropertyChangeListener in interface BoundBean
Specified by:
removePropertyChangeListener in interface Folder
Overrides:
removePropertyChangeListener in class EPRViewInBaseImpl
Parameters:
_propertyName - String is the name of the property
_l - PropertyChangeListener to remove

copyAndSave

public NoThanViewInBase copyAndSave(ImmutableName _name)
                             throws BaseError
Creates, registers in the base and saves a view copy with another name. Calls copy().

Specified by:
copyAndSave in interface EPRViewInBase
Specified by:
copyAndSave in interface NoThanViewInBase
Overrides:
copyAndSave in class EPRViewInBaseImpl
Parameters:
_name - of the copy. It is copied without test.
Returns:
the copied view
Throws:
BaseError - if _name is null or already known in BaseManagerImpl, or if _view is null or not known.

copy

protected static ViewInBase copy(ImmutableName _name,
                                 NoThanViewInBase _view,
                                 boolean _toRegisterInManager)
                          throws BaseError
Creates a copy with another name, and may register it. Each internal variable that is an external object reference have a shallow copy (no deep copy): baseError_, m_BaseObjects_, m_NoActorResources_, m_Sources_. Called by copyAndSave().

Parameters:
_name - of the view. It is copied.
_view - to copy.
_toRegisterInManager - false if this method must not register the instance in BaseManagerImpl.
Returns:
a copy
Throws:
BaseError - if _name is null or already known in BaseManagerImpl, or if _view is null or not known.

addOwnListening

protected void addOwnListening(boolean _callSuper,
                               boolean _listenACSs)
Registers the instance as a property event listener for any change on the access target or the checking perimeter, since they are not handled as a view object in the super classes. Called by the constructor, copy(), addEorAccessTarget() and the prepareAfterRestoring() methods. Calls addOwnListeningOnTarget(), addOwnListeningOnPerimeterEPs() and super.addOwnListening(_listenACSs).

Parameters:
_callSuper - false if this instance must not call the method super class EPRViewInBaseImpl.addOwnListening(), to listen the open ACS events in BaseManagerImpl and the objects events in ACSImpl, nor the changes in the no-actor resources rights
_listenACSs - false if this instance must not listen the open ACS events in BaseManagerImpl and the objects events in ACSImpl, through the indirect call to ViewInBaseImpl.addOwnListening(). If true, _callSuper has to be true. Else, an InternalError is thrown.

removeOwnListening

protected void removeOwnListening(boolean _callSuper,
                                  boolean _listenACSs)
This method unregister the instance as a property event listener for any change on the access target or the checking perimeter, since it is not handled as a view object in the super classes. Called by finalizeForBase(). Calls removeOwnListeningOnTarget() and super.removeOwnListening(_listenACSs).

Parameters:
_callSuper - false if this instance must not be unregistered for the listening of the open ACS events in BaseManagerImpl and the objects events in ACSImpl, nor the changes in the no-actor resources rights
_listenACSs - false if this instance must not listen the open ACS events in BaseManagerImpl and the objects events in ACSImpl, through the indirect call to ViewInBaseImpl.addOwnListening(). If true, _callSuper has to be true. Else, an InternalError is thrown.

addOwnListeningOnTarget

protected void addOwnListeningOnTarget()
This method registers the instance as a property event listener for any change on the access target, since it is not handled as a view object in the super classes. Adds the listening of the specific events from any AcsAddon ACS or any of its objects, and BaseUtilityImpl.addAddonParentPropertyChangeListener() is called for that. Called by addOwnListening() and setEorFirstAccessTarget().


removeOwnListeningOnTarget

protected void removeOwnListeningOnTarget()
This method unregisters the instance as a property event listener for any change on the access target, since it is not handled as a view object in the super classes. Removes the listening of the specific events from any AcsAddon ACS or any of its objects, and BaseUtilityImpl.removeAddonParentPropertyChangeListener() is called for that. Called by removeOwnListening(), removeEorNoThanAccessTarget() and setEorFirstAccessTarget().


addOwnListeningOnPerimeterEPs

protected void addOwnListeningOnPerimeterEPs()
This method registers the instance as a property event listener for any change on the listening perimeter. Caution: to call only after a l_checkingPerimeter_ updating by setUpContextLists(). Called by addOwnListening(), add/removeEorExcludedEligibleParty(), add/removeEorRemove/EligibleParty(). Listens the property changes of every EP in the listening perimeter, and the right changes on any implied ACL where the EP is the rights user. If the EP is an actor, does not listen the AGO inherited rights since only the actor rights on the target are searched.


removeOwnListeningOnPerimeterEPs

protected void removeOwnListeningOnPerimeterEPs()
This method unregisters the instance as a property event listener for any change on the listening perimeter. Caution: to call after a l_checkingPerimeter_ updating by setUpContextLists(). Called by removeOwnListening(), add/removeEorExcludedEligibleParty(), add/removeEorRemove/EligibleParty(), add/removeEorTarget().


addEorHardAlias

protected void addEorHardAlias(ACSObject _obj)
                        throws CreateError
Empty method since the NoThanView does not handle the alias relation as the EPRView. Overriddes the superclass method.

Parameters:
_obj - with an alias relation to process
Throws:
CreateError - if the name is null, or the object name is null or empty.

removeEorHardAlias

protected void removeEorHardAlias(ACSObject _obj)
                           throws CreateError
Empty method since the NoThanView does not handle the alias relation as the EPRView. Overriddes the superclass method.

Parameters:
_obj - with an alias relation to process
Throws:
CreateError - if the name is null, or the object name is null or empty.

finalizeForBase

public void finalizeForBase()
                     throws UpDateError
The view is removed as a listener and the internal maps are set to null. The view is NOT still closed in BaseManager. Called by BaseManagerImpl.closeOpenView() and, indirectly, by propertyChange().

Overrides:
finalizeForBase in class EPRViewInBaseImpl
Throws:
UpDateError

finalizeFromDeserialization

protected void finalizeFromDeserialization()
This method clears l_excludedSourceNames_, m_MoreCriteria_ and m_LessCriteria_. The view is NOT removed as a listener, since there is no listener. The internal maps are set to null. Calls the super method. Called by BaseManager.openView() when prepareAfterRestoring() throws an exception.

Overrides:
finalizeFromDeserialization in class EPRViewInBaseImpl

finalizeForCopy

public void finalizeForCopy()
The internal maps are set to null. The view is NOT open in BaseManager. Called by copy() and BaseManagerImpl.getElementsOfOneView().

Overrides:
finalizeForCopy in class EPRViewInBaseImpl

prepareBeforeSaving

protected void prepareBeforeSaving()
This method must be called by BaseManagerImpl before the saving of the view, to update l_excludedSourceNames_ from l_excludedSources_ which is not saved. It is not necessary to clear l_excludedSources_ since it is transient. According to the same principle, it is not necessary to clear the lists which are derived from l_excludedSources_ since they are transient. Override the ViewInBase method.

Overrides:
prepareBeforeSaving in class FolderAbst

prepareAfterRestoring

protected java.lang.String prepareAfterRestoring()
                                          throws DialogError
This method must be called by BaseManagerImpl after the opening of the view, to update the transient properties, and to check up the open ACS and their objects which are in the restored view. The deleting of ACS rights as criteria is not handled. Noop if the folder objects has been restored, having a non-empty BaseObjects map. Calls the super method at the first line.

Overrides:
prepareAfterRestoring in class EPRViewInBaseImpl
Returns:
a non-null message if some objects has been removed from the view, or null.
Throws:
DialogError - if the view contains an object from a closed ACS, before the registering of the view as listener; the exception message should be shown to the user, and this instance finalized.
java.lang.InternalError - if an object is not a Resource nor an EligibleParty.

setUpContextLists

protected void setUpContextLists()
This method updates l_checkingPerimeter_ and l_reducedSourcesInViewSources_, which are transient lists. The checking perimeter includes the view EPs and the listening perimeter. The associates of an Eligible Party are defined as their direct/indirect members and their direct/indirect running-under actors. This listening perimeter is get by the subtraction of l_excludedSources_ and their associates from the view EPs list (also called 'basic rights users') and their associates. For instance, if the group A is a view EP, and has only group B and group C has direct members, and if the group C is a view excluded EP, the listening perimeter contains only the group B and its associates, but not an associate which is also a C associate.

Called by prepareAfterRestoring(), add/removeEorExcludedEligibleParty(), add/removeEorRemove/EligibleParty(). Call BaseUtilityImpl.getAllIndirectGroupMembersAndRunningUnderActors(). Fire the events 'CheckingPerimeter' and 'ReducedEPsInViewEPs' for the beamer, and 'ObjectChangesInListeningPerimeter' which sends only the deprecated objects and the new objects to listen, and this last event is listened by Gui2.GraphicViewBaseListenerImpl.