ARoad0.gWork
Class CompoundRightsFactoryImpl

java.lang.Object
  extended by ARoad0.gWork.CompoundRightsFactoryImpl
All Implemented Interfaces:
CoreAlgorithm

public final class CompoundRightsFactoryImpl
extends java.lang.Object
implements CoreAlgorithm

This class is responsible for all the core algorithms about the long access paths, mixing the searches among all types of rights. This class contains the most complex algorithms of Access Road, in the method detectHiddenCompoundEpRights() responsible to find all the access paths having more than 3 nodes. It provides also some small methods for handling the ACS links, the Bridges, the Alias and the virtual members. This class is stateless, and RightsMediatorImpl at its creation setups an instance for its ViewInBase. The calls to ACS are only in the method detectAcsLinks().


Field Summary
private  AclRightsFactoryImpl acl_
           
private  AgoRightsFactoryImpl ago_
           
private  AlgorithmInterpreter interpreter_
           
private  java.util.Set<ImmutableActor> l_actorsToTest_
           
private  java.util.Set<DisplayableLinkImpl> l_allHiddenActorsLinks_
           
private  java.util.Set<DisplayableLinkImpl> l_allHiddenOwnersLinks_
           
private  java.util.Set<DisplayableLinkImpl> l_allHiddenVirtualFoldersLinks_
           
private  java.util.Set<DisplayableLinkImpl> l_currentActorsLinks_
           
private  java.util.Set<DisplayableLinkImpl> l_currentOwnersLinks_
           
private  java.util.Set<DisplayableLinkImpl> l_currentVirtualFoldersLinks_
           
private  java.util.Set<DisplayableLinkImpl> l_endOfLinks_
           
private  java.util.Set<DisplayableLinkImpl> l_endOfLinks2_
           
private  java.util.Set<DisplayableLinkImpl> l_hiddenActorsLinks_
           
private  java.util.Set<DisplayableLinkImpl> l_hiddenOwnersLinks_
           
private  java.util.Set<DisplayableLinkImpl> l_hiddenSourceLinks_
           
private  java.util.Set<ImmutableSource> l_hiddenSourceToTest_
           
private  java.util.Set<DisplayableLinkImpl> l_hiddenVirtualFoldersLinks_
           
private  java.util.Set<ImmutableGroupIDMember> l_ownersForOwnAndContainToTest_
           
private  java.util.Set<ImmutableGroupIDMember> l_ownersForXIDToTest_
           
private  java.util.Set<ImmutableVirtualFolder> l_virtualFoldersToTest_
           
private  DisplayableLinkUtilities linkUtil_
           
private  PrivilegeRightsFactoryImpl pri_
           
private  UtilityImpl utility_
           
 
Fields inherited from interface ARoad0.gWorkInterface.CoreAlgorithm
INITIAL_CAPACITY
 
Constructor Summary
protected CompoundRightsFactoryImpl(AlgorithmInterpreter _interpreter)
          only one protected constructor
 
Method Summary
 java.util.Map addPathFromNegativeRightsInOneACS(GraphicView _gview, EPRViewInBase _viewInBase, java.util.Map _m_l_DisplayableLinks)
          Creates or sets some new simple negative-rights links (or updates the current simple links), which may be first-rate ones, in various cases.
protected static java.util.Map detectAcsLinks(GraphicView _gview, ViewInBase _viewInBase, java.util.Map _upd_m_l_DisplayableLinks)
          Defines the BRIDGE and ACL relations between all the ACS which are in the view, that are Bridge links between actors, or AclEntries between eligible parties and resources.
 java.util.Map detectBridges(EPRViewInBase _viewInBase, java.util.Map _upd_m_l_DisplayableLinks, BaseObject _center)
          Defines the direct BRIDGE relations between the view objects.
protected  java.util.Map detectHardAliasesForReferences(EPRViewInBase _viewInBase, java.util.Map _m_l_DisplayableLinks, BaseObject _center)
          Defines the links from an ACSObject as reference for its hard alias, when the objects are in the view.
protected  java.util.Map detectHardReferencesForAliases(EPRViewInBase _viewInBase, java.util.Map _m_l_DisplayableLinks, BaseObject _center)
          Defines the links from an ACSObject as alias to its hard reference, when the objects are in the view.
 java.util.Map detectHiddenCompoundEpRights(GraphicView _gview, EPRViewInBase _viewInBase, java.util.Map _upd_m_l_DisplayableLinks)
          This is the most complex Access Road method, which defines the effective applicable rights through all the access paths containing more than 3 nodes.
 java.util.Map detectLastSimpleSoftRunUnderDisplayableLinks(GraphicView _gview, EPRViewInBase _viewInBase, java.util.Map _upd_m_l_DisplayableLinks)
          Adds a SOFT_RUN_UNDER relation between two view objects of the same ACS.
protected  java.util.Map detectReferencesForAliases(EPRViewInBase _viewInBase, java.util.Map _m_l_DisplayableLinks, BaseObject _center)
          Defines the simple links from an ACSObject as alias to its reference, when all the objects are in the view.
protected  java.util.Map detectVirtualMembers(EPRViewInBase _viewInBase, java.util.Map _m_l_DisplayableLinks, BaseObject _center)
          Defines the direct links from a VirtualFolder to its members, when all the objects are in the view, even if the member ACS does not manage the VirtualFolder rights propagation to members.
 void finalizeForProcess()
          Finalizes the instance.
protected  DisplayableLinkImpl selectDirectHardAliasInViewForReference(EPRViewInBase _viewInBase, ACSObject _ref)
          Defines the link from an ACSObject as hard reference to its alias when the alias is in the view.
protected  DisplayableLinkImpl selectDirectHardReferenceInViewForAlias(EPRViewInBase _viewInBase, ACSObject _alias)
          Defines the link from an ACSObject as hard alias to its reference when the reference is in the view.
 java.util.Set<DisplayableLinkImpl> selectDirectHiddenMembersForVirtualFolder(GraphicView _gview, EPRViewInBase _viewInBase, ImmutableVirtualFolder _vf)
          Detects the paths from a VirtualFolder to its members, considering the paths only if the member ACS manages the VirtualFolder rights propagation to the members.
 java.util.Set<DisplayableLinkImpl> selectDirectHiddenReferenceForAlias(GraphicView _gview, EPRViewInBase _viewInBase, ACSObject _ali)
          Detects the references of an alias that are not in _viewInBase.
protected  java.util.Set<DisplayableLinkImpl> selectDirectReferencesInViewForAlias(EPRViewInBase _viewInBase, ACSObject _alias)
          Defines the links from an ACSObject as alias to its references when the references are in the view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

l_hiddenSourceToTest_

private java.util.Set<ImmutableSource> l_hiddenSourceToTest_

l_hiddenSourceLinks_

private java.util.Set<DisplayableLinkImpl> l_hiddenSourceLinks_

l_ownersForOwnAndContainToTest_

private java.util.Set<ImmutableGroupIDMember> l_ownersForOwnAndContainToTest_

l_actorsToTest_

private java.util.Set<ImmutableActor> l_actorsToTest_

l_virtualFoldersToTest_

private java.util.Set<ImmutableVirtualFolder> l_virtualFoldersToTest_

l_ownersForXIDToTest_

private java.util.Set<ImmutableGroupIDMember> l_ownersForXIDToTest_

l_currentOwnersLinks_

private java.util.Set<DisplayableLinkImpl> l_currentOwnersLinks_

l_currentActorsLinks_

private java.util.Set<DisplayableLinkImpl> l_currentActorsLinks_

l_currentVirtualFoldersLinks_

private java.util.Set<DisplayableLinkImpl> l_currentVirtualFoldersLinks_

l_hiddenOwnersLinks_

private java.util.Set<DisplayableLinkImpl> l_hiddenOwnersLinks_

l_hiddenActorsLinks_

private java.util.Set<DisplayableLinkImpl> l_hiddenActorsLinks_

l_hiddenVirtualFoldersLinks_

private java.util.Set<DisplayableLinkImpl> l_hiddenVirtualFoldersLinks_

l_allHiddenOwnersLinks_

private java.util.Set<DisplayableLinkImpl> l_allHiddenOwnersLinks_

l_allHiddenActorsLinks_

private java.util.Set<DisplayableLinkImpl> l_allHiddenActorsLinks_

l_allHiddenVirtualFoldersLinks_

private java.util.Set<DisplayableLinkImpl> l_allHiddenVirtualFoldersLinks_

l_endOfLinks_

private java.util.Set<DisplayableLinkImpl> l_endOfLinks_

l_endOfLinks2_

private java.util.Set<DisplayableLinkImpl> l_endOfLinks2_

interpreter_

private AlgorithmInterpreter interpreter_

linkUtil_

private DisplayableLinkUtilities linkUtil_

acl_

private AclRightsFactoryImpl acl_

ago_

private AgoRightsFactoryImpl ago_

pri_

private PrivilegeRightsFactoryImpl pri_

utility_

private UtilityImpl utility_
Constructor Detail

CompoundRightsFactoryImpl

protected CompoundRightsFactoryImpl(AlgorithmInterpreter _interpreter)
only one protected constructor

Parameters:
_interpreter - algorithm interpreter
Method Detail

detectHiddenCompoundEpRights

public final java.util.Map detectHiddenCompoundEpRights(GraphicView _gview,
                                                        EPRViewInBase _viewInBase,
                                                        java.util.Map _upd_m_l_DisplayableLinks)
                                                 throws ProcessError,
                                                        java.lang.InterruptedException
This is the most complex Access Road method, which defines the effective applicable rights through all the access paths containing more than 3 nodes. This method contains more than 1000 logical lines of code.

All the work may be viewed as building up new CNot.DisplayableLinkImpls from the list of the current ones, as the result of the analysis of rights and structure. This is why the main parameter is the map of all the current DisplayableLinkImpls, named _upd_m_l_DisplayableLinks. This map is filled with new DisplayableLinkImpls by each method like this one. A good start to understand this method is to read the code of the ThreeNodesRightsFactoryImpl class.

The search deep is up to 40 iterations, and all the access paths are found. To be fast and maintenable, this method is based on very structured loops that could be seen as elementay blocks. There are 3 main steps in this method:

- the initializing search defines all the simple DisplayableLinkImpls from the view nodes that are sources; this implies 9 cases, including 3 hooks for the AcsAddons,

- the central search extends these simple DisplayableLinkImpls in a continuous loop that ends only when there is no new path to found; this implies the test of 19 cases, including 7 tests for Actors, 8 tests for GroupIDMembers, 4 tests for Virtualfolders, with 3 tests on hooks for the AcsAddons on Actors, GroupIDMembers and VirtualFolders,

- the final search defines the last AccessControlLinkImpls from the current DisplayableLinkImpls to the view nodes that are targets; this implies the test of 14 cases, with 4 hooks for the AcsAddons, including 3 final tests for filtering about the rules to reject some DisplayableLinkImpls.

This method fills the resulting map with new DisplayableLinkImpls. There are two cases where a link has to be removed from the map after its insertion.

The first case is about the filtering of access paths to apply some priority rules among the AGO, PRI, ACL, BDG rights. Some of these priority rules may be from an AcsAddon, through the call to a method LinkRights.detectAddonPriorityInXXX(). These methods have the property to detect a prioritary link which enforces to remove one or several longer links. The inverse is not true, since a long link cannot enforce, by its existence, the removing of a shorter link. Caution: due to the sequence of calls to the ACS addons, the longer link may be added in the resulting map before the shorter link which produces the removing of this longer link.

The second case is for applying a rule on the virtual folders. This rule is 'virtual folder: an indirect access to a Resource that is not a virtual member, is always through a virtual member'. To detect this second case, the method DisplayableLinkUtilitites.getContainVirtualFolderWithoutMember() is called.

Called by RightsFactory_Facade.detectRights(). Calls selectDirectHiddenMembersForVirtualFolder(), AclRightsFactoryImpl.selectDirectHiddenExternalAclBridgeLinksToActorForEP(), addAclBridgeRightsInDisplayableLink(), AgoRightsFactoryImpl.selectHiddenDirectGroupIDForGroupIDMember(), selectHiddenDirectOwnerContainForActor(), selectHiddenDirectOwnerContainForTarget(), addOwnerContainRightsToDisplayableLink(), PrivilegeRightsFactoryImpl.selectDirectHiddenPrivilegeLinksForEP(), addPrivilegeInAccessControlLink(), and FactoryUtilities.withExecuteRight(), FactoryUtilities.detectPriorityInAllLinksAllRights(), DisplayableLinkImpl.getAllEndsInDisplayableLinks(), mergoTwoLinksCollection(), selectDisplayableLinksForSecondEnd().

Parameters:
_gview - is the graphic view to update
_viewInBase - EPRViewInBase
_upd_m_l_DisplayableLinks - Map of DisplayableLinks lists (one per pair) associated to the view, and to update.
Returns:
updated _upd_m_l_DisplayableLinks, with hidden coumpond rights links associated to every pair.
Throws:
InterruptedException, - ProcessError if there is a loop in the rights search
ProcessError
java.lang.InterruptedException

detectBridges

public final java.util.Map detectBridges(EPRViewInBase _viewInBase,
                                         java.util.Map _upd_m_l_DisplayableLinks,
                                         BaseObject _center)
Defines the direct BRIDGE relations between the view objects. This is a simple method which may be studied to understand the gWork logic. For a sketch view, only the links from/to the _center are processed. Adds the metaright 'execute' to each AccessControlLink with the bridge type. Called by RightsFactory_Facade.detectRights(). Synchronized to _viewInBase.

Parameters:
_viewInBase - EPRViewInBase
_upd_m_l_DisplayableLinks - Map of DisplayableLinks lists (one per pair) associated to the view, and to update.
_center - is the central object of a sketch view. Null if it is not a sketch view.
Returns:
Map of DisplayableLinks lists, with BRIDGE links associated to every pair (Actor, Actor).

detectAcsLinks

protected static final java.util.Map detectAcsLinks(GraphicView _gview,
                                                    ViewInBase _viewInBase,
                                                    java.util.Map _upd_m_l_DisplayableLinks)
Defines the BRIDGE and ACL relations between all the ACS which are in the view, that are Bridge links between actors, or AclEntries between eligible parties and resources. Called by RightsFactory_Facade.detectRights(). Synchronized to _viewInBase.

Parameters:
_gview - is the graphic view associated to the view
_viewInBase - is the view
_upd_m_l_DisplayableLinks - Map of DisplayableLinks lists (one per pair) associated to the view, and to update.
Returns:
Map of DisplayableLinks lists, with BRIDGE and ACL links associated to some pair (ACS, ACS).

addPathFromNegativeRightsInOneACS

public final java.util.Map addPathFromNegativeRightsInOneACS(GraphicView _gview,
                                                             EPRViewInBase _viewInBase,
                                                             java.util.Map _m_l_DisplayableLinks)
                                                      throws java.lang.InterruptedException
Creates or sets some new simple negative-rights links (or updates the current simple links), which may be first-rate ones, in various cases. The aim is to prepare a set of DisplayableLinksImpls for the method RightsFactory_Facade.getEffectiveRightsForPair(), where the negative-right types are processed with the positive rights only if the negative-right types link is simple. The followed ACS generic rule is 'this-ACS denyings are superior to this-ACS grantings (there are + and – operations), for each right type'. The algorithm is described hereinafter, as a generic access path search:

- if there is a non-simple DisplayableLinkImpl (A to B) having negative right(s) in its last AccessControlLink, a new simple link (A to B) is created with a copy of these negative rights, or, if there is already a simple link, these negative rights are copied into it.

- if there is a simple negative-right DisplayableLinkImpl (A to B) while there are an indirect positive-rights or structural paths from A to B through one or several nodes of the view, the link (A to B) is set as 'first-rate' to say that the negative right is a prioritary one, and that A cannot access to B through the other view nodes.

If the negative rights of the non-simple DisplayableLinkImpl are from several types, all the negative rights are added. Thus, the resulting simple link has one of the applicable types: AccessControlLink.NEG_TPRI is the prioritary one, or AccessControlLink.NEG_LPRI, and AccessControlLink.NEG_ACL is the last one. This method uses the indicator 'AccessControlLink.C_COPIED_FROM_LINK' when a current simple DisplayableLinkimpl is updated with the negative rights of another DisplayableLinkImpl. This method uses a metaright '|transfer_all_rights|' to indicate a structural link.

The results of this method may be changed by an AcsAddon, through the call to the heavy method NodeRights.detectAddonFinalAllNodes() after this method.

Called by RightsFactory_Facade.detectEPRRights(). Calls RightsFactory_Facade.getFirstShapeEffectiveRights() and linkUtil_.containsIndirectPaths().

Parameters:
_gview - is the graphic view to update
_viewInBase - EPRViewInBase
_m_l_DisplayableLinks - Map of DisplayableLinks lists (one per pair) associated to the view, and to update.
Returns:
updated _m_l_DisplayableLinks
Throws:
java.lang.InterruptedException

detectVirtualMembers

protected final java.util.Map detectVirtualMembers(EPRViewInBase _viewInBase,
                                                   java.util.Map _m_l_DisplayableLinks,
                                                   BaseObject _center)
Defines the direct links from a VirtualFolder to its members, when all the objects are in the view, even if the member ACS does not manage the VirtualFolder rights propagation to members. Works also for a sketch view, where the argument _center is not null. Called by RightsFactory_Facade.detectEPRRights() and detectSketchRights(). Synchronized to _viewInBase from the GraphicView call.

Parameters:
_viewInBase - the EPRViewInBase to analyze
_m_l_DisplayableLinks - Map of DisplayableLinks lists (one per pair) associated to the view, and to update.
_center - the central object of a sketch view. Null if it is not a sketch view.
Returns:
Map of DisplayableLinks lists, with HAS_VIRTUAL_MEMBER links associated to every pair (VirtualFolder, member in the view).

detectReferencesForAliases

protected final java.util.Map detectReferencesForAliases(EPRViewInBase _viewInBase,
                                                         java.util.Map _m_l_DisplayableLinks,
                                                         BaseObject _center)
Defines the simple links from an ACSObject as alias to its reference, when all the objects are in the view. The alias is the source, and it may be an external soft alias or an internal hard alias. Unused for a sketch view, where the argument _center is not null, since a sketch view does not display the soft alias relations. _center is analyzed as alias, not as reference. Called by RightsFactory_Facade.detectEPRRights() and detectNoThanRights(). Synchronized to _viewInBase from the GraphicView call. Calls selectDirectReferencesInViewForAlias().

Parameters:
_viewInBase - the EPRViewInBase to analyze
_m_l_DisplayableLinks - Map of DisplayableLinks lists (one per pair) associated to the view, and to update.
_center - the central object of a sketch view. Null if it is not a sketch view.
Returns:
Map of DisplayableLinks lists, with IS_ALIAS links associated to every pair (ACSObject alias, reference in the view).

detectHardReferencesForAliases

protected final java.util.Map detectHardReferencesForAliases(EPRViewInBase _viewInBase,
                                                             java.util.Map _m_l_DisplayableLinks,
                                                             BaseObject _center)
Defines the links from an ACSObject as alias to its hard reference, when the objects are in the view. The alias is the source, and it is not considered as an external soft alias. Works only for a sketch view, where the argument _center is not null. _center is analyzed as alias, not as reference. Called by RightsFactory_Facade.detectSketchRights(). Synchronized to _viewInBase from the GraphicView call. Calls selectDirectHardReferenceInViewForAlias().

Parameters:
_viewInBase - the EPRViewInBase to analyze
_m_l_DisplayableLinks - Map of DisplayableLinks lists (one per pair) associated to the view, and to update.
_center - the central object of a sketch view. Null if it is not a sketch view.
Returns:
Map of DisplayableLinks lists, with IS_ALIAS links associated to every pair (ACSObject alias, reference in the view).

detectHardAliasesForReferences

protected final java.util.Map detectHardAliasesForReferences(EPRViewInBase _viewInBase,
                                                             java.util.Map _m_l_DisplayableLinks,
                                                             BaseObject _center)
Defines the links from an ACSObject as reference for its hard alias, when the objects are in the view. The alias is the source, and it is not considered as an external soft alias. Used only for a sketch view, where the argument _center is not null. _center is analyzed as reference, not as alias. Called by RightsFactory_Facade.detectSketchRights(). Synchronized to _viewInBase from the GraphicView call. Calls selectDirectHardReferenceInViewForAlias().

Parameters:
_viewInBase - the EPRViewInBase to analyze
_m_l_DisplayableLinks - Map of DisplayableLinks lists (one per pair) associated to the view, and to update.
_center - the central object of a sketch view. Null if it is not a sketch view.
Returns:
Map of DisplayableLinks lists, with IS_ALIAS links associated to every pair (ACSObject alias, reference in the view).

selectDirectReferencesInViewForAlias

protected final java.util.Set<DisplayableLinkImpl> selectDirectReferencesInViewForAlias(EPRViewInBase _viewInBase,
                                                                                        ACSObject _alias)
Defines the links from an ACSObject as alias to its references when the references are in the view. The alias is the source, and it may be an external or internal soft alias, or an internal hard alias. This method adds to the type comment AccessControlLink.ALIAS the text AccessControlLink.C_RECEIVE_ALIAS_RIGHTS.

Calls ACS.getReferenceOfSoftAlias() which may be a heavy processing load in some ACS. Called by detectHiddenCompoundEpRights(), detectReferencesForAliases() and ThreeNodesRightsFactoryImpl.endsPathsFromActorWithAclBridgePrivilege(), endsPathsFromVirtualFolderWithMemberAlias(), selectOneHiddenNodePathsForVirtualFolder(), selectOneHiddenNodePathsForFirstLinkPrivileges(). Synchronized to _viewInBase from the GraphicView call.

Parameters:
_viewInBase - the EPRViewInBase
_alias - may be an alias or not. Never null.
Returns:
Set of simple DisplayableLinkImpl for which the first end is _alias, the second end is an _alias reference in _viewInBase. May be null but not empty.

selectDirectHardReferenceInViewForAlias

protected final DisplayableLinkImpl selectDirectHardReferenceInViewForAlias(EPRViewInBase _viewInBase,
                                                                            ACSObject _alias)
Defines the link from an ACSObject as hard alias to its reference when the reference is in the view. The alias is the source, and it is not analyzed as a soft alias. Adds the comment AccessControlLink.C_RECEIVE_ALIAS_RIGHTS or, if the argument is an Actor running under a proper AG context, adds the user name of this context.

Called by selectDirectReferencesInViewForAlias() and detectHardReferencesForAliases(). Synchronized to _viewInBase from the GraphicView call.

Parameters:
_viewInBase - the EPRViewInBase
_alias - may be an alias or not. Never null.
Returns:
simple DisplayableLinkImpl for which the first end is _alias, the second end is the _alias hard reference in _viewInBase. May be null.

selectDirectHardAliasInViewForReference

protected final DisplayableLinkImpl selectDirectHardAliasInViewForReference(EPRViewInBase _viewInBase,
                                                                            ACSObject _ref)
Defines the link from an ACSObject as hard reference to its alias when the alias is in the view. The alias is the source, and it is not analyzed as an external soft alias.

Called by detectHardAliasesForReferences(). Synchronized to _viewInBase from the GraphicView call.

Parameters:
_viewInBase - the EPRViewInBase
_ref - may be an alias reference or not. Never null.
Returns:
simple DisplayableLinkImpl for which the first end is the alias, the second end is the _ref in _viewInBase. May be null.

selectDirectHiddenMembersForVirtualFolder

public final java.util.Set<DisplayableLinkImpl> selectDirectHiddenMembersForVirtualFolder(GraphicView _gview,
                                                                                          EPRViewInBase _viewInBase,
                                                                                          ImmutableVirtualFolder _vf)
Detects the paths from a VirtualFolder to its members, considering the paths only if the member ACS manages the VirtualFolder rights propagation to the members. In that case, the VirtualFolder transfers directly its rights as target to its members. Nonetheless, this is done in the caller of this method, while this method simply returns the good links. The link types are set. The members which are not EligibleParties may be returned. If only one member in the VirtualFolder has an ACS that manages the VirtualFolder rights propagation, then the result contains one link to this member.

Trees of virtual folders are possible. There is no privilege inheritance in the tree for the generic gBase classes, while an AcsAddon may override the hook methods.

Called by CompoundRightsFactoryImpl.detectHiddenCompoundEpRights() and ThreeNodesRightsFacoryImpl.selectOneHiddenNodePathsForVirtualFolder().

Parameters:
_gview - is the graphic view to update
_viewInBase - view on which _gview is based
_vf - is in _viewInBase or not
Returns:
Set of DisplayableLinkImpl for which the node before the second end is _vf, the second end is a _vf member or a GroupIDMember outside _viewInBase. May be null but not empty.

selectDirectHiddenReferenceForAlias

public final java.util.Set<DisplayableLinkImpl> selectDirectHiddenReferenceForAlias(GraphicView _gview,
                                                                                    EPRViewInBase _viewInBase,
                                                                                    ACSObject _ali)
Detects the references of an alias that are not in _viewInBase. The link types are set. Several references are possible, since there may be external or internal soft aliases, and one internal hard alias. This method searches the soft references of _ali by calling getReferenceOfSoftAlias() on each open ACS managing the soft aliasing for _ali, so it should be time-consuming.

Generally speaking, the hard alias transfers directly its rights as target to its reference, including its Account/Groups context. If the elements of the AG context are not yet in the path, this may define new links, from the reference to each account or group of the context. This is called the propagation of the indirect AG context, and the alias relation is alone to handle that in Access Road. There is no such a propagation in an AclEntry relation, even if it transfers the direct AG context. The case occurs when an Actor is an alias running as actor under an account, if, in the path, the nodes before this actor do not transmit their proper AG context. The responsability of this method is not to set the good AG context on the reference. It does not know the current paths having _ali as second end. But it is the responsibility of the caller of this method to handle properly the reference AG context (see the ARoad0.gBase.CAliasImpl documentation).

In this version, the visible space of the _ali ACS is not considered in the search for the external soft aliases. All the open ACS are considered. Called by CompoundRightsFactoryImpl.detectHiddenCompoundEpRights() and ThreeNodesRightsFacoryImpl.selectOneHiddenNodePathsForVirtualFolder(), addPathsFromActorStartsUnderGroupIDMember(), addPathsFromActorAliasReference() and addPathsFromGroupIDMemberAliasReference().

Parameters:
_gview - is the graphic view to update
_viewInBase - view on which _gview is based
_ali - is in _viewInBase or not
Returns:
Set of simple DisplayableLinkImpl for which the first end is _ali, the second end is an _ali reference outside _viewInBase. May be null but not empty.
See Also:
CAliasImpl

detectLastSimpleSoftRunUnderDisplayableLinks

public final java.util.Map detectLastSimpleSoftRunUnderDisplayableLinks(GraphicView _gview,
                                                                        EPRViewInBase _viewInBase,
                                                                        java.util.Map _upd_m_l_DisplayableLinks)
Adds a SOFT_RUN_UNDER relation between two view objects of the same ACS. If the second end of a link is a process (indeed, an Actor or a VirtualFolder) having an AG context so that its runs under a view GroupIDMember, this method adds a simple SOFT_RUN_UNDER link in the map of DisplayableLinks. Typically, the second end may be an internal hard alias. If its reference runs under a view account, there is a simple SOFT_RUN_UNDER link to create from the reference to the account. If the link delivers an executing right to the first end GroupIDMember on the second-end process, this method creates a new link from the process to the GroupIDMember.

This method has to be called at the end of the access paths search. If the two view objects are not from the same ACS, or if a simple link for the same ends does already exist, this method does not operate. Called only by RightsFactory_Facade.detectEPRRights().

Parameters:
_gview - is the graphic view to update
_viewInBase - EPRViewInBase
_upd_m_l_DisplayableLinks - Map of DisplayableLinks lists (one per pair). Never null. May be updated by new simple links.
Returns:
updated _upd_m_l_DisplayableLinks

finalizeForProcess

public void finalizeForProcess()
Finalizes the instance. Called by RightsMediatorImpl.finalizeForProcess().