|
||||||||||
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
public class EPRViewInBaseImpl
This class is responsible for modeling in the base, a view about access control issues between eligible parties (EP of EPRViewInBase) or virtual folders as access sources, and resources (R of EPRViewInBase) or virtual folders as access targets. It is used by the full views in the GUI to display all the rights between any couple of view objects, since an access source may also be an access target in some precise cases. It registers its sources and its targets from one or several open ACS. It is closed when any of its objects belongs to a closing ACS. It is not closed when one of its objects is referenced in the AclEntry of a closing ACS, or when the object is deleted from its ACS. The EPRViewInBase adds automatically in the view the reference of an alias and the alias of a reference. This is not done in its two subclasses. It is a javabean with the following bound properties (see also the super class): 'OnePropertyInView'. Caution: no equals() nor clone() methods.
GraphicEPRView
,
Serialized FormField Summary | |
---|---|
static EPRViewInBase |
EMPTY_INSTANCE
|
protected java.beans.PropertyChangeEvent |
lastEvent_
|
protected java.util.SortedMap<ImmutableName,ImmutableTarget> |
m_NoSourceTargets_
|
protected java.util.SortedMap<ImmutableName,ImmutableSource> |
m_Sources_
|
protected java.util.SortedMap<ImmutableName,ImmutableTarget> |
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, serialPersistentFields, type_ |
Constructor Summary | |
---|---|
EPRViewInBaseImpl()
Default constructor |
|
EPRViewInBaseImpl(ImmutableName _name)
|
|
EPRViewInBaseImpl(ImmutableName _name,
java.util.Map _m_BaseObjects,
boolean _toRegisterInManager)
This constructor is used by BaseManagerImpl.openView() to create every instance. |
Method Summary | |
---|---|
void |
addEorBaseObject(BaseObject _obj)
Adds a baseObject to the base. |
protected void |
addEorHardAliasOrReference(ACSObject _obj)
If an added ACSObject in the view is an alias or an alias reference, adds to the view its associated object. |
void |
addEorSource(ImmutableSource _sour)
Updates all the internal maps after a test of the parameter type. |
void |
addEorTarget(ImmutableTarget _targ)
Updates all the internal maps after a test of the parameter type. |
protected void |
addOwnListening(boolean _callSuper)
Registers the instance as a property event listener on the EligibleParties, and on the no-Actor Resources and their parents, to follow the AG/PRI/ACL inherited rights. |
void |
addPropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Adds a listener to the bean for the property 'OnePropertyInView', or for any superclass property. |
boolean |
containsSource(ImmutableSource _sour)
|
boolean |
containsTarget(ImmutableTarget _targ)
|
protected static ViewInBase |
copy(ImmutableName _name,
EPRViewInBase _view,
boolean _toRegisterInManager)
Creates a copy with another name, and may register it. |
EPRViewInBase |
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 |
finalizeForGUI()
This method is reserved to the sketch view. |
protected void |
finalizeFromDeserialization()
This method does not clear all the view objects maps, since they are transient. |
protected void |
firePropertyChange(java.beans.PropertyChangeEvent _evt)
Fires an event to every registered listener, in any order, for a view object bound property. |
java.util.SortedMap<ImmutableName,ImmutableTarget> |
getEorM_NoSourceTargets()
Gets the targets in this view which are not eligible parties (actors, accounts, groups) nor virtual folders. |
java.util.SortedMap<ImmutableName,ImmutableSource> |
getEorM_Sources()
Gets all the sources in this view, and this covers the actors, accounts, groups and virtual folders. |
java.util.SortedMap<ImmutableName,ImmutableTarget> |
getEorM_Targets()
Gets all the access targets in this view, and this covers simple resources, actors, directories, executables, accounts, groups and virtual folders. |
protected java.lang.String |
prepareAfterRestoring()
This method must be called by BaseManagerImpl after the opening of the view, to update the transient maps, and to check the open ACS and their objects which are in the restored view. |
void |
propertyChange(java.beans.PropertyChangeEvent _evt)
Observer of the changes on the objects set in addOwnListening(). |
void |
removeEorBaseObject(BaseObject _obj)
Overrides ViewInBaseImpl.removeEorBaseObject() to update sources and targets maps. |
protected void |
removeEorHardAliasOrReference(ACSObject _obj)
If a removed ACSObject in the view is an alias or an alias reference, removes from the view its associated object. |
void |
removeEorSource(ImmutableSource _sour)
Updates all the internal maps after a test of the parameter type. |
void |
removeEorTarget(ImmutableTarget _targ)
Updates all the internal maps after a test of the parameter type. |
protected void |
removeOwnListening(boolean _callSuper)
Unregisters the instance as a property event listener on BaseManagerImpl. |
void |
removePropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Removes a listener to the bean for the property 'OnePropertyInView', or for any superclass property. |
Methods inherited from class ARoad0.gBase.ViewInBaseImpl |
---|
addOwnListening, copy, getCompleteResults, getNickName, 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, prepareBeforeSaving, 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.ViewInBase |
---|
getCompleteResults |
Methods inherited from interface ARoad0.gBaseInterface.Folder |
---|
addPropertyChangeListener, 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, getNickName, hashCode |
Field Detail |
---|
protected transient java.util.SortedMap<ImmutableName,ImmutableSource> m_Sources_
protected transient java.util.SortedMap<ImmutableName,ImmutableTarget> m_Targets_
protected transient java.util.SortedMap<ImmutableName,ImmutableTarget> m_NoSourceTargets_
protected transient java.beans.PropertyChangeEvent lastEvent_
public static final EPRViewInBase EMPTY_INSTANCE
Constructor Detail |
---|
public EPRViewInBaseImpl()
public EPRViewInBaseImpl(ImmutableName _name) throws CreateError
_name
- of the view. it is copied.
CreateError
- if the view name is already known in BaseManagerImpl.public EPRViewInBaseImpl(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.
It is copied. May be null._toRegisterInManager
- false if this constructor must not register
the instance in BaseManagerImpl and in its view objects.
BaseError
- if the constructor of ViewInBaseImpl fires it, or
if _m_BaseObjects contains an object that is not an eligible party,
nor a resource.
CreateError
Method Detail |
---|
public EPRViewInBase copyAndSave(ImmutableName _name) throws BaseError
copyAndSave
in interface EPRViewInBase
_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.public boolean containsTarget(ImmutableTarget _targ)
containsTarget
in interface EPRViewInBase
_targ
- to test
public boolean containsSource(ImmutableSource _sour)
containsSource
in interface EPRViewInBase
_sour
- to test
public java.util.SortedMap<ImmutableName,ImmutableTarget> getEorM_Targets()
getEorM_Targets
in interface EPRViewInBase
public java.util.SortedMap<ImmutableName,ImmutableTarget> getEorM_NoSourceTargets()
getEorM_NoSourceTargets
in interface EPRViewInBase
public java.util.SortedMap<ImmutableName,ImmutableSource> getEorM_Sources()
getEorM_Sources
in interface EPRViewInBase
public void addEorBaseObject(BaseObject _obj) throws CreateError
addEorBaseObject
in interface Folder
addEorBaseObject
in class FolderAbst
_obj
- non-null BaseObject to add in the view
CreateError
- if the object is already known by the view,
or is not a source nor an target.public void removeEorBaseObject(BaseObject _obj) throws CreateError
removeEorBaseObject
in interface Folder
removeEorBaseObject
in class FolderAbst
_obj
- non-null BaseObject to remove in the view
CreateError
- if the object is null or not known by the view,
or if the object is not a source nor a target, or
if the object name is empty.public void addEorTarget(ImmutableTarget _targ) throws CreateError
addEorTarget
in interface EPRViewInBase
_targ
- to add to the view
CreateError
- if the target is already known by the view,
if the name is null, or the object name is null or empty.public void removeEorTarget(ImmutableTarget _targ) throws CreateError
removeEorTarget
in interface EPRViewInBase
_targ
- to remove in the view
CreateError
- if the target is not known by the view, or
if the object name is empty.public void addEorSource(ImmutableSource _sour) throws CreateError
addEorSource
in interface EPRViewInBase
_sour
- to add to the view. No operation if null or already known.
CreateError
- if the source is already known by the view,
if the name is null, or the object name is null or empty.public void removeEorSource(ImmutableSource _sour) throws CreateError
removeEorSource
in interface EPRViewInBase
_sour
- to remove in the view
CreateError
- if the source is null or not known by the view, or
if the object name is empty.public void propertyChange(java.beans.PropertyChangeEvent _evt)
propertyChange
in interface Folder
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class ViewInBaseImpl
_evt
- PropertyChangeEventpublic void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
addPropertyChangeListener
in interface BoundBean
addPropertyChangeListener
in interface Folder
addPropertyChangeListener
in class FolderAbst
_propertyName
- is the name of the property_l
- 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 BoundBean
removePropertyChangeListener
in interface Folder
removePropertyChangeListener
in class FolderAbst
_propertyName
- String is the name of the property_l
- to removeprotected static ViewInBase copy(ImmutableName _name, EPRViewInBase _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)
_callSuper
- false if this instance must not listen
the open ACS events in BaseManagerImpl and the objects events in ACSImpl;
if true, calls super.addOwnListening().protected void removeOwnListening(boolean _callSuper)
_callSuper
- false if this method must not unregister
the open ACS events in BaseManagerImpl and the objects events in ACSImpl;
if true, call super.removeOwnListening().protected void firePropertyChange(java.beans.PropertyChangeEvent _evt)
_evt
- is fired by a view objectprotected void addEorHardAliasOrReference(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 removeEorHardAliasOrReference(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 FolderAbst
UpDateError
- from the super classprotected void finalizeFromDeserialization()
finalizeFromDeserialization
in class FolderAbst
public void finalizeForCopy()
finalizeForCopy
in class FolderAbst
protected void finalizeForGUI()
protected java.lang.String prepareAfterRestoring() throws DialogError
prepareAfterRestoring
in class FolderAbst
DialogError
- by the super class 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
java.lang.InternalError
- if an object is not a Resource nor an EligibleParty.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |