|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.gBase.PrivilegeAbst
ARoad0.gBase.PrivilegeForLinksImpl
public class PrivilegeForLinksImpl
This class is responsible for modeling the direct links which manages some access rights from a EligibleParty list (or only one GroupID) to a privilege targets list (or only one target). Targets are Resources or VirtualFolders. There are three types of PrivilegeForLinks: LINKED, LINKED_IF_ALL_SOURCES and LINKED_FOR_ONE_TO_ONE. This privilege is usable by any couple (all sources set, one of the target) from the privilege ACS, or from another ACS for an external LINKED_FOR_ONE_TO_ONE privilege. A privilege is external if its source or its target is from an ACS which is not the ACS of the privilege. It is not possible to have a third ACS for the other end. A linked privilege may be inherited from the (in)direct parents of the target, except the LINKED_IF_ALL_SOURCES privilege. Only one target is authorized if the first target is from an ACS that manages the PRI inheritance.
Eligible Party and Resource types and classes are never used, on the contrary of PrivilegeForTypes, and the linked sources and targets register and unregister themself dynamically in the Privilege. So, it is possible to modify a Privilege on the fly following a program dynamic rule. The rights of a Privilege are immutable after its creation, while the AclEntry has immutable source and target, but with editable rights after the creation.
This is a javabean with the following bound properties:
- 'OneLinkedPrivilegeSource'
- 'OneLinkedPrivilegeTarget'
- 'ExternalPrivilege'
There are three types of PrivilegeForLinks: LINKED, LINKED_IF_ALL_SOURCES and LINKED_FOR_ONE_TO_ONE. For the last one, when it is finalized, "TPrivileges" and "SPrivileges" are thrown by the source and the target after 'OneLinkedPrivilegeSource' and 'OneLinkedPrivilegeTarget'. CAUTION: the gWork package manages only the LINKED PrivilegeForLinks, in this version.
The LINKED type allows to define in one privilege, a generic set of rights, and each EligibleParty which is source have all the rights on all the targets. The LINKED privilege is defined by its rights, then in a large ACS, such a privilege may have numerous linked sources or targets. With LINKED_IF_ALL_SOURCES, the rights on the targets are used by any EligibleParty which belongs to ALL the source containers, which are GroupIDMembers or DirectoryEPs. For instance, if there are a GroupID and an UserID as privilege sources, any Actor which is a member of the GroupID AND belongs to the UserID, has the rights of the privilege. If an actor belongs to the GroupID but is not under the UserID, it has not the privilege. To have an OR relation between the GroupID and the UserID, rather than AND, let's use 2 LINKED_FOR_ONE_TO_ONE privileges or two AclEntries. The conditional AclEntry is an alternative to the LINKED_IF_ALL_SOURCES privilege, but it is focused to deliver rights to one source which has to be member of the condition groups, and the couple (source, target) is immutable for an AclEntry. The number of privilege sources is limited to 4.
With LINKED_FOR_ONE_TO_ONE, there is at most one source, and it is an EligibleParty, and at most one PrivilegeTarget. A LINKED_FOR_ONE_TO_ONE privilege is like an ACL from an EP to a resource or a virtual folder. This is the only linked privilege able to be external. A LINKED_FOR_ONE_TO_ONE PrivilegeForLinks is an alternative to an AclEntry. Both may have one external access source or target, where the target is immutable while only the privilege can change its source, it is deleted when its source or its target is deleted but an AclEntry may be conditional, it can change dynamically its rights, and there are other differences as following:
- on sources, the AclEntry is as powerful as a LINKED_FOR_ONE_TO_ONE PrivilegeForLinks.
- on targets, the AclEntry is less powerful since it cannot be applied to VirtualFolders. In a one-to-one privilege, the target cannot be removed after the first adding, while it is possible for the source. For an external LINKED_FOR_ONE_TO_ONE privilege, one end (the source or the target) must belong to the privilege ACS, while the other end does not. The rights belongs always to the ACS privilege, if they are ACS rights.
The format of the detailled name for an internal linked privilege is as following:
privilegeType || nickName || first right
For an external linked privilege, the format of the detailled name is as following:
- ACS: ACS_name | privilegeType || nickName || first right
This means the detailled name changes when an empty privilege becomes an external one during the setting of an end by the user. This change is visible in the explorer for instance. The method getPreviousDetailledName returns the old detailled name if it is different. An Eligible Party or PrivilegeTarget name is incomplete if it belongs to the Privilege ACS. Since the source and the target are unknown at the creation of the PrivilegeForLinks, the privilege may become external only after the setting of the first external end, the source or the target. Then, its detailled name changes in the GUI.
A specific use of PrivilegeForLinks is to extend the structural relations among the ACS objects, without any change in the types model of AccessControlLink. For example, for a given ACS, it is possible to create privileges linking some pattern-name Directories to each item which is member of them whithout being a child of these Directories. This pattern-name Directory is not a VirtualFolder and allows AclEntries as target. The main feature is then to avoid to code a new link in the ACS addon.
To process the inherited PrivilegeForLinks, it is mandatory to code in an AcsAddon how the Directory or VirtualFolder creates and removes the inherited PrivilegeForLinks in its direct children. This may include the choice of the objects that becomes inherited ones, and the definition of an order to select them in each target. The default behavior, in this generic class, is to inherit all the applicable PrivilegeForLinks, and to sum up all the rights. After the inherited object creation to code in an AcsAddon, the right updating of the inherited object is handled by this generic class, at every change on the sources. The target ACS cannot manage the PRI inheritance in a LINKED_IF_ALL_SOURCES privilege. For the other types, only one target is authorized if the first target is from an ACS that manages the PRI inheritance.
The privilege key is used by the ACS to find a privilege. The key is the couple (privilege type, nick name). The main privilege value is an unmodifiable list of rights. The privilege has positive or negative rights to grant or deny the access. The rights and the key CANNOT be updated after the privilege creation, nor the rights sens (grant or deny). There is a 'See Why' description to complement the comment.
This is a typical sequence of calls, in the inverse order, when the ACS of an external linked privilege is saved:
ARoad0.Gui1.CollectionPropertyEditor.propertyChange()
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:347)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
at ARoad0.gBase.ACSImpl.firePropertyChange(ACSImpl.java:5454)
at ARoad0.gBase.ACSImpl.removeAcsController(ACSImpl.java:7981)
at ARoad0.gBase.ACSImpl.removeEorResource(ACSImpl.java:4014)
at ARoad0.gBase.PrivilegeForLinksImpl.removeEorPrivilegeTargetLink(PrivilegeForLinksImpl.java:1447)
at ARoad0.gBase.CPrivilegeUserImpl.removeEorPrivilegeToTarget(CPrivilegeUserImpl.java:481)
at ARoad0.gBase.ResourceImpl.removeEorPrivilegeToTarget(ResourceImpl.java:1999)
at ARoad0.gBase.PrivilegeForLinksImpl.finalizeForBase(PrivilegeForLinksImpl.java:1829)
at ARoad0.gBase.PrivilegeAbst.finalizeForUser(PrivilegeAbst.java:1281)
at ARoad0.gBase.ACSImpl.closeExternalLinkedPrivileges(ACSImpl.java:6327)
at ARoad0.gBase.BaseManagerImpl.cutACSExternalLinks(BaseManagerImpl.java:2915)
at ARoad0.gBase.BaseManagerImpl.saveOpenACS(BaseManagerImpl.java:2393)
at ARoad0.gWork.ACS_Facade.saveACS(ACS_Facade.java:188)
at ARoad0.gDMak.ActionSave.save(ActionSave.java:210)
at ARoad0.gDMak.ActionSaveAll.saveAll(ActionSaveAll.java:302)
at ARoad0.gDMak.ActionSaveAll.actionPerformed(ActionSaveAll.java:87)
This class has subclasses in the AcsAddon packages. Most of the variables are protected. See the Copyright.
PrivilegeAbst
,
PrivilegeForTypeImpl
,
Serialized FormField Summary | |
---|---|
protected boolean |
changedDetailledName_
True to return the previous detailled name, after a change of the external source or target. |
static PrivilegeForLinksImpl |
EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of the constructor for temporary values. |
protected boolean |
ifAllSources_
if true, the instance has the LINKED_IF_ALL_SOURCES type, with only one internal or external GroupID as source, and only one internal or external target. |
protected java.util.List<java.lang.String> |
l_internalAllowedSourceTypes_
The source types that the ACS authorizes for this privilege |
protected java.util.List<java.lang.String> |
l_internalAllowedTargetTypes_
The target types that the ACS authorizes for this privilege |
protected java.util.ArrayList<PrivilegeSource> |
l_sources_
Access sources which are connected to this privilege. |
protected java.util.ArrayList<PrivilegeTarget> |
l_targets_
Access targets are Resources and VirtualFolders connected to this privilege. |
protected ImmutableName |
nameOfSourceAcs_
If LINKED_FOR_ONE_TO_ONE, the single target ACS name, if any. |
protected ImmutableName |
nameOfTargetAcs_
If LINKED_FOR_ONE_TO_ONE, the single target ACS name, if any. |
protected boolean |
oneRoleOneTarget_
if true, the instance has the LINKED_FOR_ONE_TO_ONE type, with only one internal or external EligibleParty as source, and only one internal or external target. |
static java.io.ObjectStreamField[] |
serialPersistentFields
variable for the JDK 2 serialization |
protected ImmutableName |
sourceName_
If LINKED_FOR_ONE_TO_ONE, the single source full name, if any. |
protected ImmutableName |
targetName_
If LINKED_FOR_ONE_TO_ONE, the single target full name, if any. |
Fields inherited from class ARoad0.gBase.PrivilegeAbst |
---|
aCS_, acsName_, changeSupport_, comment_, detailledName_, INCREMENT_CAPACITY, INITIAL_CAPACITY, l_rights_, L_TYPES, LINKED, LINKED_FOR_ONE_TO_ONE, LINKED_IF_ALL_SOURCES, mainType_, nickName_, positiveRight_, PRIME, secondType_, seeWhy_, TYPED, TYPED_CLASSED, TYPED_CLASSED_SPECIFIC, TYPED_FOR_SEED |
Constructor Summary | |
---|---|
PrivilegeForLinksImpl()
Constructor to use only as a transient value for initialization, or used from ARoad0.gBase.PrivilegeImplBeanInfo.getPropertyDescriptors() in ARoad0.Gui1.CollectionPropertyEditor.getValue(). |
|
PrivilegeForLinksImpl(ACS _aCS,
java.lang.String _nickName,
java.lang.String _mainType,
StringRight[] _l_rights,
java.lang.String _secondType)
This is the only way to create a linked privilege instance from the GUI. |
|
PrivilegeForLinksImpl(ACS _aCS,
java.lang.String _nickName,
java.lang.String _mainType,
StringRight[] _l_rights,
java.lang.String _secondType,
boolean _toRegisterInManager)
This is the only way to create a linked privilege instance. |
Method Summary | |
---|---|
void |
addEorPrivilegeSourceLink(PrivilegeSource _ep)
Links to a source which uses this PrivilegeForLinks. |
void |
addEorPrivilegeTargetLink(PrivilegeTarget _res)
Adds a connected target which has this PrivilegeForLinks. |
void |
addPropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Adds a listener to the bean for the events 'OneLinkedPrivilegeSource', 'OneLinkedPrivilegeTarget', 'ExternalPrivilege'. |
java.lang.Object |
clone()
Used to clone a privilege. |
java.lang.Object |
copy(ImmutableName _name,
ACS _acs,
Node _parent,
java.lang.Boolean _toRegisterInManager)
TO REVIEW This method provides a copy of the instance, in the same ACS or another one, on the contrary of PrivilegeForTypeImpl.copy(). |
protected PrivilegeForLinksImpl |
copyForExternal()
Called by ACSImpl.closeExternalLinkedPrivileges() only for the external privileges, thus for the LINKED_FOR_ONE_TO_ONE privileges, when the links to other ACS have to be cut and cloned. |
boolean |
equals(java.lang.Object _obj)
In this method, the current sources and targets are not compared. |
protected void |
finalizeClosedPrivilege()
This method is to use only for closed LINKED_FOR_ONE_TO_ONE privileges in the relevant ACS list. |
void |
finalizeForBase()
It sets to null almost all variables, so the instance is equals to a new empty PrivilegeForLinksImpl. |
protected void |
finalizeFromDeserialization()
This method finalizes all the sources and all the targets, since it is used after a deserialization. |
protected static java.lang.String |
getDetailledNameFromNameForLinks(ImmutableName _name,
int _typeIndex)
Gets the registered detailled name from the privilege name. |
Privilege |
getEmptyInstance()
|
java.util.List<PrivilegeSource> |
getEorLinkedSources()
Gets the sources set which have this privilege. |
java.util.List<PrivilegeTarget> |
getEorLinkedTargets()
Gets the targets which use this privilege. |
ImmutableName |
getFullName()
The full name is unique for the Access Road program. |
boolean |
getIfAllSources()
|
java.lang.Object[] |
getKeyReferencesFromName(ImmutableName _privName)
Gets the main components from the linked privilege name as a string, returned by getName(). |
java.util.List<java.lang.String> |
getL_InternalAllowedSourceTypes()
Caution: the list is from the privilege ACS, and an external privilege may accept types from another ACS. |
java.util.List<java.lang.String> |
getL_InternalAllowedTargetTypes()
Caution: the list is from the privilege ACS, and an external privilege may accept types from another ACS. |
ImmutableName |
getName()
Gets the BaseObject name of the privilege. |
ImmutableName |
getNameOfSingleSourceACS()
|
ImmutableName |
getNameOfSingleTargetACS()
|
boolean |
getOneRoleOneTarget()
|
java.lang.String |
getPreviousDetailledName()
This method returns the detailled name or the previous detailled name for the GUI, which gives the key components of the object. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String _propertyName)
Returns the change listeners for a property. |
ImmutableName |
getSingleSourceName()
|
ImmutableName |
getSingleTargetName()
|
java.lang.String |
getSource()
Gets the access sources set displayed in the beamer. |
boolean |
isEmpty()
|
boolean |
isExternalPrivilege()
Only the LINKED_FOR_ONE_TO_ONE privileges may be external ones, among the linked privileges. |
void |
removeEorPrivilegeSourceLink(PrivilegeSource _ep)
Removes a connected source using this PrivilegeForLinks. |
void |
removeEorPrivilegeTargetLink(PrivilegeTarget _res)
Removes a connected target using this PrivilegeForLinks. |
void |
removePropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Removes a listener to the bean for the events 'OneLinkedPrivilegeSource', 'OneLinkedPrivilegeTarget', 'ExternalPrivilege'. |
protected void |
resetRightsAsInheritedPrivilege()
If the target is in an ACS that manages the PRI inheritance, calls resetInheritedPrivilegeyRightsOfChildren() to reset the effective rights in the inherited Privilege map of each child. |
java.lang.String |
toString()
The form is ' Detailled name: KKKK + Source(s): FFFF + Target(s): NNNNNNNN + Right(s): jjjj| kkkk| mmmm| ', where the detailed name has the form: 'privilegeType || nickName || first right'. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ARoad0.gBaseInterface.Privilege |
---|
setComment, setSecondType, setSeeWhy |
Methods inherited from interface ARoad0.gBaseInterface.ImmutablePrivilege |
---|
getAcsFromName, getComment, getEorACS, getL_Rights, getMainType, getPositiveRight, getSecondType, getSeeWhy |
Methods inherited from interface ARoad0.gBaseInterface.ACSObject |
---|
getAcsName |
Methods inherited from interface ARoad0.gBaseInterface.BaseObject |
---|
getNickName, hashCode |
Methods inherited from interface ARoad0.gBaseInterface.BoundBean |
---|
addPropertyChangeListener, removePropertyChangeListener |
Methods inherited from interface ARoad0.gBaseInterface.DetailledName |
---|
getDetailledName, getDetailledNameFromName, getKeyPropertiesFromDetailledName, getNameFromDetailledName |
Methods inherited from interface ARoad0.gBaseInterface.FinalizedObjectForUser |
---|
finalizeForUser |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected boolean ifAllSources_
protected boolean oneRoleOneTarget_
protected java.util.ArrayList<PrivilegeSource> l_sources_
protected java.util.ArrayList<PrivilegeTarget> l_targets_
protected ImmutableName sourceName_
protected ImmutableName targetName_
protected ImmutableName nameOfSourceAcs_
protected ImmutableName nameOfTargetAcs_
protected java.util.List<java.lang.String> l_internalAllowedSourceTypes_
protected java.util.List<java.lang.String> l_internalAllowedTargetTypes_
protected transient boolean changedDetailledName_
public static final PrivilegeForLinksImpl EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
public PrivilegeForLinksImpl()
public PrivilegeForLinksImpl(ACS _aCS, java.lang.String _nickName, java.lang.String _mainType, StringRight[] _l_rights, java.lang.String _secondType) throws CreateError
_aCS
- is the ACS which owns this Privilege.
Non-null external object reference._nickName
- is the short privilege name. Cannot be null._mainType
- is equal to PrivilegeAbst.LINKED, LINKED_FOR_ONE_TO_ONE,
or to LINKED_IF_ALL_SOURCES_l_rights
- is a StringRight array of privilege rights.
May be null, but a null value is not allowed at the first position.
Creates an empty array with a length of 0 if the argument is null.
All rights have to be all positive or all negative._secondType
- second type which drives the rights and the immutability,
just like a Basic type. If null, the internal value is set to '<undefined>'.
CreateError
- if this privilege already exists
(_aCS.newEorPrivilege() throws it), if the rights or the
privilege type is not correct, if _nickName contains '::' or '>>',
or if a parameter is null.public PrivilegeForLinksImpl(ACS _aCS, java.lang.String _nickName, java.lang.String _mainType, StringRight[] _l_rights, java.lang.String _secondType, boolean _toRegisterInManager) throws CreateError
_aCS
- is the ACS which owns this Privilege.
Non-null external object reference._nickName
- is the short privilege name. Cannot be null._mainType
- is equal to PrivilegeAbst.LINKED, LINKED_FOR_ONE_TO_ONE,
or to LINKED_IF_ALL_SOURCES_l_rights
- is a StringRight array of privilege rights.
May be null, but a null value is not allowed at the first position.
Creates an empty array with a length of 0 if the argument is null.
All rights have to be all positive or all negative._secondType
- second type which drives the rights and the immutability,
just like a Basic type. If null, the internal value is set to '<undefined>'._toRegisterInManager
- false if this method must not register
the instance in its ACS.
CreateError
- if this privilege already exists,
if the rights or the privilege type is not correct,
or if the nick name contains '::' or '>>', contains a character that is not a letter,
if a null right or a right which is not authorized.
of if a parameter is null.Method Detail |
---|
public java.lang.String getPreviousDetailledName()
getPreviousDetailledName
in interface PreviousDetailledName
getPreviousDetailledName
in class PrivilegeAbst
protected static java.lang.String getDetailledNameFromNameForLinks(ImmutableName _name, int _typeIndex) throws BaseError
- privilegeType || nickName || first right, for an internal privilege,
- ACS: ACS_name | privilegeType || nickName || first right, for an external privilege.
Calls ACS.getOnePrivilegeFromDetailledName() twice to test if there is an ACS or not in the detailled name privilege the ACS knows. Calls PrivilegeAbst.buildUpDetailledName() and BaseManagerImpl.getInstance().getEorM_OpenACS(). Called by PrivilegeAbst.getDetailledNameFromName() and clone().
_name
- linked privilege name_typeIndex
- index of the component '|| PRIV_TYPE' in _name
BaseError
- if there is a wrong format for _namePrivilegeAbst.buildUpDetailledName(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public ImmutableName getFullName()
getFullName
in interface BaseObject
public ImmutableName getName()
ACS:: ACS name
:: || PRIV_TYPE:: main type
:: || NICK_NAME:: privilege name
:: || FIRST_RIGHT:: first right
here, ':: ' is added by gBase.NameImpl.toString(). The reverse function of getName() is getKeyReferencesFromName(). This name is used only outside gBase, following the BaseObject interface.
getName
in interface BaseObject
getName
in interface ImmutablePrivilege
public boolean getIfAllSources()
public boolean getOneRoleOneTarget()
getOneRoleOneTarget
in interface PrivilegeForLinks
public boolean isExternalPrivilege()
isExternalPrivilege
in interface ImmutablePrivilege
public java.util.List<PrivilegeSource> getEorLinkedSources()
getEorLinkedSources
in interface PrivilegeForLinks
public ImmutableName getSingleSourceName()
getSingleSourceName
in interface PrivilegeForLinks
public ImmutableName getSingleTargetName()
getSingleTargetName
in interface PrivilegeForLinks
public ImmutableName getNameOfSingleSourceACS()
getNameOfSingleSourceACS
in interface PrivilegeForLinks
public ImmutableName getNameOfSingleTargetACS()
getNameOfSingleTargetACS
in interface PrivilegeForLinks
public java.lang.String getSource()
public void addEorPrivilegeSourceLink(PrivilegeSource _ep) throws BaseError
privilegeType || nickName || first right
For an external linked privilege, the format of the detailled name is as following:
- ACS: ACS_name | privilegeType || nickName || first right
An Eligible Party or PrivilegeTarget name is incomplete if it belongs to the Privilege ACS. Since the source and the target are unknown at the creation of the PrivilegeForLinks, the privilege may become external only after the setting of the first source or target. Then, its detailled name changes. The ACS listeners and the privilege target reset the detailled name. Because the detailled name changes when the state of external is updated, this method calls removeEorPrivilegeToTarget() then addEorPrivilegeToTarget() on the target, if any, to handle the new detailled name.
Calls resetRightsAsInheritedPrivilege() and PrivilegeSource.addEorPrivilegeToSource(). Caution: contains a summary of addEorPrivilegeTargetLink(), and the two methods have to remain consistent. Fires the events 'OneLinkedPrivilegeSource', 'OneLinkedPrivilegeTarget', 'OneLinkedPrivilege' and 'ExternalPrivilege'.
_ep
- is a non-null source to connect
BaseError
- if the source type is not authorized, or
when the instance is a LINKED_FOR_ONE_TO_ONE privilege, if: - there is already a source
- the new detailled name of the external privilege is not unique in its ACS
or, when the instance is a LINKED_IF_ALL_SOURCES privilege, if:
- _ep is not a GroupIDMember
for all the privilege types:
- if the second type sets the privilege as immutable,
- if the number of sources will be superior to 4, or
- _ep is null or is immutable, or its name is null,
- _ep is empty,
- _ep name is already known by this instance.
for all the types excepted for LINKED_FOR_ONE_TO_ONE privilege:
- _ep belongs to another acs
public void addEorPrivilegeTargetLink(PrivilegeTarget _res) throws BaseError
_res
- is a non-null target to connect
BaseError
- when the instance is a LINKED_FOR_ONE_TO_ONE privilege, if: - there is already a target
- the new detailled name of the external privilege is not unique in its ACS
for all privilege types:
- if the privilege type is not authorized to the target,
- if the second type sets the privilege as immutable,
- if _res is null or immutable, or its name is null,
- _res is empty,
- _res name is already known by this instance.
for all types excepted for LINKED_FOR_ONE_TO_ONE privilege:
- _res belongs to another acs and, for the LINKED_IF_ALL_SOURCES privilege:
- the target ACS cannot manage the PRI inheritance in a LINKED_IF_ALL_SOURCES privilege. and, for all types excepted for LINKED_IF_ALL_SOURCES privilege:
- the first target ACS manages the PRI inheritance, then no target may be added
public void removeEorPrivilegeSourceLink(PrivilegeSource _ep) throws BaseError
_ep
- is a source to unset
BaseError
- if the name is null, or the source is null or immutable,
if the second type sets the privilege as immutable,
or if the source is not known.public void removeEorPrivilegeTargetLink(PrivilegeTarget _res) throws BaseError
_res
- target to remove
BaseError
- if the name is null, or the target is null or immutable,
if the second type sets the privilege as immutable,
or if the target is not known.public java.util.List<PrivilegeTarget> getEorLinkedTargets()
getEorLinkedTargets
in interface PrivilegeForLinks
public java.util.List<java.lang.String> getL_InternalAllowedSourceTypes()
getL_InternalAllowedSourceTypes
in interface PrivilegeForLinks
public java.util.List<java.lang.String> getL_InternalAllowedTargetTypes()
getL_InternalAllowedTargetTypes
in interface PrivilegeForLinks
protected void resetRightsAsInheritedPrivilege()
public void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
Used by Gui1.CommonPropertyEditor for the 'Comment' and 'SeeWhy' properties. Overiddes the super method.
addPropertyChangeListener
in interface BoundBean
addPropertyChangeListener
in class PrivilegeAbst
_propertyName
- String is the name of the property_l
- PropertyChangeListener to addpublic void removePropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
Overiddes the super method.
removePropertyChangeListener
in interface BoundBean
removePropertyChangeListener
in class PrivilegeAbst
_propertyName
- String is the name of the property_l
- PropertyChangeListener to removepublic java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String _propertyName)
getPropertyChangeListeners
in interface ImmutablePrivilege
getPropertyChangeListeners
in class PrivilegeAbst
_propertyName
- name of the listened property.
public java.lang.Object clone()
clone
in class PrivilegeAbst
public boolean equals(java.lang.Object _obj)
equals
in interface BaseObject
equals
in class PrivilegeAbst
_obj
- to compare.
public boolean isEmpty()
isEmpty
in interface ImmutablePrivilege
public java.lang.Object[] getKeyReferencesFromName(ImmutableName _privName) throws CreateError
getKeyReferencesFromName
in interface ImmutablePrivilege
_privName
- has been returned by getName()
- index 0: name of the ACS which manages this privilege (ImmutableName)
- index 1: privilege type (String)
- index 2: nick name (String)
- index 3: first right (String)
- index 4: null
- index 5: null
CreateError
- if the argument or a component is null or not correct,
not a privilege name string, or if a main component string
is not provided by NameImpl.toString()PrivilegeAbst.getAcsFromName(ARoad0.gBaseInterface.ImmutableName)
public java.lang.String toString()
toString
in class java.lang.Object
public void finalizeForBase() throws UpDateError
finalizeForBase
in interface FinalizedObject
finalizeForBase
in class PrivilegeAbst
UpDateError
- if the privilege is unknwon from the ACS, the sources
or the targets.protected void finalizeFromDeserialization()
protected void finalizeClosedPrivilege()
public java.lang.Object copy(ImmutableName _name, ACS _acs, Node _parent, java.lang.Boolean _toRegisterInManager) throws CreateError
_name
- is the copy name must be a one-component name,
and the component is the nick name
of the new privilege. May be equals to the nick name
of this privilege, but only for another ACS._acs
- is the ACS of the copy to create. May be different
to the ACS of this instance._parent
- must be null here._toRegisterInManager
- false if this method must not register
the instance in its ACS.
CreateError
- if _name or _acs is null, or _parent is not null,
or _name is not a one-component name.public Privilege getEmptyInstance()
getEmptyInstance
in interface ImmutablePrivilege
protected PrivilegeForLinksImpl copyForExternal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |