|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectARoad0.gBase.FolderAbst
ARoad0.gBase.ViewInBaseImpl
ARoad0.gBase.EPRViewInBaseImpl
ARoad0.gBase.NoThanViewInBaseImpl
public class NoThanViewInBaseImpl
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.
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 |
|---|
protected java.util.Map<java.lang.String,StringRight[]> m_MoreCriteria_
protected java.util.Map<java.lang.String,StringRight[]> m_LessCriteria_
protected java.util.List<ImmutableName> l_excludedSourceNames_
protected transient java.util.List<ImmutableSource> l_excludedSources_
protected transient java.util.List<ImmutableSource> l_checkingPerimeter_
protected transient java.util.List<ImmutableSource> l_reducedSourcesInViewSources_
public static final NoThanViewInBase EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
| Constructor Detail |
|---|
public NoThanViewInBaseImpl()
public NoThanViewInBaseImpl(ImmutableName _name)
throws CreateError
_name - of the view. it is copied.
CreateError - if the view name is already known in BaseManagerImpl.
public NoThanViewInBaseImpl(ImmutableName _name,
java.util.Map _m_BaseObjects,
boolean _toRegisterInManager)
throws CreateError
_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.
CreateError - if the constructor of EPRViewInBaseImpl fires it, or
if _m_BaseObjects contains an object that is not a source.| Method Detail |
|---|
public java.lang.String getNickName()
getNickName in interface BaseObjectgetNickName in class ViewInBaseImplpublic ImmutableTarget getEorFirstAccessTarget()
getEorFirstAccessTarget in interface NoThanViewInBase
public void setEorFirstAccessTarget(ImmutableTarget _targ)
throws BaseError
setEorFirstAccessTarget in interface NoThanViewInBase_targ - the target to add. Never null, so a current target cannot be removed.
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.
public void addEorNoThanAccessTarget(ImmutableTarget _targ)
throws BaseError
addEorNoThanAccessTarget in interface NoThanViewInBase_targ - the target to add
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.
public void removeEorNoThanAccessTarget(ImmutableTarget _targ)
throws BaseError
removeEorNoThanAccessTarget in interface NoThanViewInBase_targ - the target to remove
BaseError - if the argument is not the current target,
if the argument is null, or the object name is null or empty.public StringRight getMoreCriterion()
getMoreCriterion in interface NoThanViewInBase
public void setMoreCriterion(StringRight _right)
throws BaseError
setMoreCriterion in interface NoThanViewInBase_right - is the 'more' criteria. May be null or have the same power than the less right.
BaseError - if the argument is empty, or the target is null, or
the argument is inferior to the less right.public StringRight getLessCriterion()
getLessCriterion in interface NoThanViewInBase
public void setLessCriterion(StringRight _right)
throws BaseError
setLessCriterion in interface NoThanViewInBase_right - is the 'less' criteria. May be null.
BaseError - if the argument is empty, the target is null, or
the argument is superior to the more right.public java.util.List<ImmutableSource> getExcludedSources()
getExcludedSources in interface NoThanViewInBasepublic boolean containsExcludedSource(ImmutableSource _sour)
containsExcludedSource in interface NoThanViewInBase_sour - to test
public void addEorExcludedSource(ImmutableSource _sour)
throws BaseError
addEorExcludedSource in interface NoThanViewInBase_sour - source to exclude
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.
public void removeEorExcludedSource(ImmutableSource _sour)
throws BaseError
removeEorExcludedSource in interface NoThanViewInBase_sour - non-null Source to remove as excluded Source
BaseError - if the Source is unknown as excluded, or
if the argument is null, if the object name is empty.public java.util.Set<ImmutableSource> getCheckingPerimeter()
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.
getCheckingPerimeter in interface NoThanViewInBasepublic java.util.Set<ImmutableSource> getReducedSourcesInViewSources()
getReducedSourcesInViewSources in interface NoThanViewInBase
public void addEorTarget(ImmutableTarget _targ)
throws CreateError
addEorTarget in interface EPRViewInBaseaddEorTarget in class EPRViewInBaseImpl_targ - new right user to analyze
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.
public void addEorSource(ImmutableSource _sour)
throws CreateError
addEorSource in interface EPRViewInBaseaddEorSource in class EPRViewInBaseImpl_sour - new right user to analyze
CreateError - if _sour name is null, the limit of 9 view objects
or 50 objects in the checking perimeter is get.
public void removeEorTarget(ImmutableTarget _targ)
throws CreateError
removeEorTarget in interface EPRViewInBaseremoveEorTarget in class EPRViewInBaseImpl_targ - right user to remove
CreateError - if the resource is not known by the view, or
if the object name is empty.
public void removeEorSource(ImmutableSource _sour)
throws CreateError
removeEorSource in interface EPRViewInBaseremoveEorSource in class EPRViewInBaseImpl_sour - right user to remove
CreateError - if the Source is unknown as excluded, or
if the argument is null, if the object name is empty.public void propertyChange(java.beans.PropertyChangeEvent _evt)
propertyChange in interface FolderpropertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class EPRViewInBaseImpl_evt - PropertyChangeEventaddOwnListeningOnTarget(),
addOwnListeningOnPerimeterEPs()
public void addPropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
addPropertyChangeListener in interface BoundBeanaddPropertyChangeListener in interface FolderaddPropertyChangeListener in class EPRViewInBaseImpl_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.
public void removePropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
removePropertyChangeListener in interface BoundBeanremovePropertyChangeListener in interface FolderremovePropertyChangeListener in class EPRViewInBaseImpl_propertyName - String is the name of the property_l - PropertyChangeListener to remove
public NoThanViewInBase copyAndSave(ImmutableName _name)
throws BaseError
copyAndSave in interface EPRViewInBasecopyAndSave in interface NoThanViewInBasecopyAndSave in class EPRViewInBaseImpl_name - of the copy. It is copied without test.
BaseError - if _name is null or already known in BaseManagerImpl,
or if _view is null or not known.
protected static ViewInBase copy(ImmutableName _name,
NoThanViewInBase _view,
boolean _toRegisterInManager)
throws BaseError
_name - of the view. It is copied._view - to copy._toRegisterInManager - false if this method must not register
the instance in BaseManagerImpl.
BaseError - if _name is null or already known in BaseManagerImpl,
or if _view is null or not known.
protected void addOwnListening(boolean _callSuper,
boolean _listenACSs)
_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.
protected void removeOwnListening(boolean _callSuper,
boolean _listenACSs)
_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.protected void addOwnListeningOnTarget()
protected void removeOwnListeningOnTarget()
protected void addOwnListeningOnPerimeterEPs()
protected void removeOwnListeningOnPerimeterEPs()
protected void addEorHardAlias(ACSObject _obj)
throws CreateError
_obj - with an alias relation to process
CreateError - if the name is null, or the object name is null or empty.
protected void removeEorHardAlias(ACSObject _obj)
throws CreateError
_obj - with an alias relation to process
CreateError - if the name is null, or the object name is null or empty.
public void finalizeForBase()
throws UpDateError
finalizeForBase in class EPRViewInBaseImplUpDateErrorprotected void finalizeFromDeserialization()
finalizeFromDeserialization in class EPRViewInBaseImplpublic void finalizeForCopy()
finalizeForCopy in class EPRViewInBaseImplprotected void prepareBeforeSaving()
prepareBeforeSaving in class FolderAbst
protected java.lang.String prepareAfterRestoring()
throws DialogError
prepareAfterRestoring in class EPRViewInBaseImplDialogError - 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.protected void setUpContextLists()
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||