|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.gWork.PrivilegeRightsFactoryImpl
public class PrivilegeRightsFactoryImpl
This class is responsible for all the core algorithms about Privilege rights analysis. These rights are direct or inherited access rights for a PrivilegeSource (the access user) about a PrivilegeTarget (the access target). They are typed or linked privileges. The inherited rights are only linked privileges. Caution: this class works for the TYPED and the TYPED_CLASSED privileges, but not for the TYPED_FOR_SEED and the TYPED_CLASSED_SPECIFIC privileges. This class is stateless, and RightsMediatorImpl at its creation setups an instance for its ViewInBase. There is an indirect call to the method ACS.getEorL_TargetsForPrivilegeForType(). Upper-level methods begin by detect...(), middle-level methods begin by select...(), lower-level methods begin by add...().
PrivilegeAbst
,
PrivilegeForType
,
PrivilegeForLinks
Field Summary | |
---|---|
private UtilityImpl |
baseUtil_
|
private FactoryUtilities |
factoryUtil_
|
private static int |
INITIAL_CAPACITY
|
private AlgorithmInterpreter |
interpreter_
|
private java.util.Set<PrivilegeTarget> |
l_targets_
|
private DisplayableLinkUtilities |
linkUtil_
|
Constructor Summary | |
---|---|
protected |
PrivilegeRightsFactoryImpl(AlgorithmInterpreter _interpreter)
only one protected constructor |
Method Summary | |
---|---|
AccessControlLinkImpl |
addPrivilegeInAccessControlLink(ImmutablePrivilegeTarget _pt,
ImmutablePrivilegeSource _ps,
AccessControlLinkImpl _upd_acLink)
Adds the privilege rights to an AccessControlLinkImpl. |
DisplayableLinkImpl |
addPrivilegeRightsInSimpleDisplayableLink(ImmutablePrivilegeSource _ps,
ImmutablePrivilegeTarget _pt,
boolean _withExecute)
Creates the simple DisplayableLinkImpl associated to a view object pair, and updates the created AccessControlLink with typed or linked Privilege rights. |
protected java.util.Map |
detectPrivilegeRights(GraphicView _gview,
EPRViewInBase _viewInBase,
java.util.Map _m_l_DisplayableLinks,
BaseObject _center)
Defines the effective applicable rights of a PrivilegeSource for a PrivilegeTarget, if there are direct typed or linked privileges between them. |
void |
finalizeForProcess()
Finalizes the instance. |
java.util.List<PrivilegeForLinks> |
getL_linkedPrivilege(ImmutablePrivilegeSource _so,
ImmutablePrivilegeTarget _res)
Selects the non-inherited linked privileges which connect the target and the source. |
java.util.Set<PrivilegeTarget> |
getL_TargetsOfSourcePrivilege(ImmutablePrivilegeSource _ps)
Selects all the direct targets for a PrivilegeSource, through a typed or a linked privilege. |
java.util.List<PrivilegeForType> |
getL_typedPrivilege(ImmutablePrivilegeSource _so,
ImmutablePrivilegeTarget _pt)
Gets the typed privileges which connect the target and the source. |
java.util.Set<DisplayableLinkImpl> |
selectDirectHiddenPrivilegeLinksForEP(GraphicView _gview,
EPRViewInBase _viewInBase,
ImmutableEligibleParty _ep,
boolean _withExecute)
Detects all the Actors and the VirtualFolders that are not in _viewInBase, and are directly accessible from _ep through one privilege. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int INITIAL_CAPACITY
private AlgorithmInterpreter interpreter_
private UtilityImpl baseUtil_
private DisplayableLinkUtilities linkUtil_
private FactoryUtilities factoryUtil_
private java.util.Set<PrivilegeTarget> l_targets_
Constructor Detail |
---|
protected PrivilegeRightsFactoryImpl(AlgorithmInterpreter _interpreter)
_interpreter
- algorithm interpreterMethod Detail |
---|
protected final java.util.Map detectPrivilegeRights(GraphicView _gview, EPRViewInBase _viewInBase, java.util.Map _m_l_DisplayableLinks, BaseObject _center)
_gview
- is the graphic view to update. No use if _center is not null,
and not null otherwise._viewInBase
- 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.
public final java.util.List<PrivilegeForLinks> getL_linkedPrivilege(ImmutablePrivilegeSource _so, ImmutablePrivilegeTarget _res)
_so
- with some privileges to filter_res
- to analyze
public final java.util.List<PrivilegeForType> getL_typedPrivilege(ImmutablePrivilegeSource _so, ImmutablePrivilegeTarget _pt)
_so
- with some privileges to filter_pt
- to analyze
public java.util.Set<DisplayableLinkImpl> selectDirectHiddenPrivilegeLinksForEP(GraphicView _gview, EPRViewInBase _viewInBase, ImmutableEligibleParty _ep, boolean _withExecute)
_gview
- is the graphic view to update_viewInBase
- view on which _gview is based_ep
- is in _viewInBase or not_withExecute
- true for detecting only if there is an executing
right in the AccessControlLink. No use if the target is a virtual folder.
public final java.util.Set<PrivilegeTarget> getL_TargetsOfSourcePrivilege(ImmutablePrivilegeSource _ps)
_ps
- to analyze
public final DisplayableLinkImpl addPrivilegeRightsInSimpleDisplayableLink(ImmutablePrivilegeSource _ps, ImmutablePrivilegeTarget _pt, boolean _withExecute)
_ps
- is a right user_pt
- is a right target. Has to be known in the AlgorithmInterpreter._withExecute
- true for returning null if there is no effective executing
right in the link. No use when _pt is a virtual folder.
public final AccessControlLinkImpl addPrivilegeInAccessControlLink(ImmutablePrivilegeTarget _pt, ImmutablePrivilegeSource _ps, AccessControlLinkImpl _upd_acLink)
If the LPRI inheritance is managed and if NodeRights.withAccessThroughNodesTreeFromEP() returns true, the result is null if the inherited rights array is null. On the other hand, the inherited rights array may be empty, and then the result contains simply the direct rights. When direct rights and inherited rights are not empty, they are merged by NodeRights.mergeInheritedAclPriRightsAndComments(). This method allows also to add specific AcsAddon comments for the direct privileges.
Puts in comments the rights, and puts also in the GLOBAL comment, the Privilege names and all the Privilege ACS names if they are more than one.
Note: this method is sensible since it is used for both the 2-nodes methods, the 3-nodes methods and a multiple-links method. Called by detectPrivilegeRights(), addPrivilegeRightsInSimpleDisplayableLink(), and CompoundRightsFactoryImpl.detectHiddenCompoundEpRights(). Calls getL_privilegeRights() and getL_linkedPrivilege(), and the _pt NodeRights.detectL_linkedPrivilegeRights(), mergeInheritedAclPriRightsAndComments(), getL_accessRightsThroughNodesTree() and withAccessThroughNodesTreeFromEP().
_pt
- to analyze. Has to be known in the AlgorithmInterpreter._ps
- to analyze_upd_acLink
- is the AccessControlLink to update. May be null.
public void finalizeForProcess()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |