|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.gBase.BasicImpl
ARoad0.gBase.ResourceImpl
ARoad0.gBase.DirectoryImpl
ARoad0.AcsAddon.Accbee.MySQL.gBase.BasesSetMySQLImpl
public class BasesSetMySQLImpl
This class is responsible for modeling a BasesSetMySQL which is a set of databases having a wildcard in its name, like 'BASE O%', as child of the Directory '|pattern-name_bases sets|'. It has to be a Directory to be called by the AclEntry when there is a rights changing (through resetInheritedAclEntryRightsOfChildren()), but it is not a ResourceMySQL with primary rights. The documentation of DirectoryMySQLImpl describes in details the ACL management. The direct AclEntries and the inherited AclEntries of the parent '|pattern-name_bases sets|' are not copied into the inherited ACL list of a bases set. The direct AclEntries of this class are copied into the inherited AclEntries list of each database that the databases set owns. For instance, the databases set 'BASE O%' copies its ACL into the lists of the two databases 'BASE One' and 'BASE OFF'.
A bases set is a child of the '|pattern-name_bases sets|' directory. A bases set name must start with 'BASES', and contains one wildcard character '%' or '_'. The type of a BasesSetMySQL is always 'pattern-name_bases set'. A database does not know the bases sets where it is registered. This class has no getAddonInnerPropertiesToListen() method because the 'ConnectedDatabases' events do not change the views. The error messages to the Access Road user are the followings:
- A bases set must have '|pattern-name_bases sets|' as parent.
- A bases set must have the type 'bases set'.
- A bases set name must contain one wildcard '%' or '_'.
- MySQL allows conditional ACL only to accounts.
- MySQL allows a conditional ACL only with a simple host as conditional group. To set 'tom@%' for instance, creates the accounts-for-groups group 'tom§@%' and sets on it a non-conditional ACL.
- MySQL allows conditional ACL only with the account first host as condition group.
- A MySQL bases set allows non-conditional ACL only to accounts, accounts-for-hosts groups, hosts and hosts groups.
It is a javabean with the following bound properties: 'ConnectedDatabases'. This class has no subclass in this package. This class is declared in the ACS vocabulory by the key ACSFactoryUtilityImpl.ACSADDON_EXTENSION_CLASSES.
Field Summary | |
---|---|
static BasesSetMySQLImpl |
EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for temporary values. |
(package private) java.util.List<DirectoryMySQL> |
l_ConnectedDatabases_
|
static java.io.ObjectStreamField[] |
serialPersistentFields
variable for the JDK 2 serialization |
private static long |
serialVersionUID__
|
Fields inherited from class ARoad0.gBase.DirectoryImpl |
---|
EnforceChildGID_, nodeHandler_ |
Fields inherited from class ARoad0.gBase.ResourceImpl |
---|
actorActivated_, groupID_, l_aclEntry_, l_groupRights_, l_inheritedT_AclEntries_, l_OpenAcsControllerNames_, l_ownerRights_, l_parentTreeAGRightsAllowToGoAcross_, l_rootRights_, m_inheritedT_ACLRights_, parent_, userID_ |
Fields inherited from class ARoad0.gBase.BasicImpl |
---|
aCS_, aCS_Name_, aliasHandler_, changeSupport_, comment_, folderMember_, INCREMENT_CAPACITY, INITIAL_CAPACITY, INITIAL_CAPACITY_2, iS_Name_, m_ConstrainedChildACS_, name_, PRIME, privHandler_, type_ |
Constructor Summary | |
---|---|
BasesSetMySQLImpl()
The basic constructor |
|
BasesSetMySQLImpl(ImmutableName _name,
ACS _acs,
Directory _parent,
UserID _owner,
java.lang.String _resourceType)
This constructor is set by the beamer editor for the ACS resources list, from the 'New' button, or from the gWork.AcsFactoryUbuntu. |
|
BasesSetMySQLImpl(ImmutableName _name,
ACS _acs,
Directory _parent,
UserID _owner,
java.lang.String _resourceType,
boolean _toRegisterInManager)
This constructor is called by the other constructor. |
Method Summary | |
---|---|
AclEntry |
addAclEntry(ImmutableACS _aclAcs,
ImmutableEligibleParty _ep,
StringRight[] _l_right,
java.lang.Boolean _positiveRight,
ImmutableGroupID _conditionGroup)
Adds the AclEntry as direct AclEntry on this bases set and as inherited AclEntry in the connected databases, and sorts the new direct AclEntry list. |
protected void |
addConnectedDatabase(DirectoryMySQL _base)
Registers the database in this BasesSetMySQL. |
void |
addInheritedAclEntry(AclEntry _acl)
Adds the inherited AclEntry. |
java.lang.Object |
clone()
Clones without registering of the new object in the ACSs. |
protected BasesSetMySQLImpl |
copyOwnVariables(BasesSetMySQLImpl _result,
boolean _withoutInternalAcl)
This method provides a copy of the instance variables. |
void |
finalizeForBase()
This method sets to null the primary inherited rights map. |
protected void |
finalizeFromDeserialization()
NO USE. |
java.util.Map<java.lang.String,java.lang.String> |
getAddonInnerPropertiesToListen()
Gets the specific events to listen from an ACSObject, because these events should change the rights of an ACSObject in an ACS Addon. |
java.util.List<DirectoryMySQL> |
getEorConnectedDatabases()
Get the databases which are defined by the name of this BasesSetMySQL. |
java.util.Map<java.lang.String,StringRight[]> |
getM_TargetInheritedACLRights()
Overridden and forbidden method. |
void |
removeAclEntry(ImmutableACS _aclAcs,
ImmutableEligibleParty _ep,
boolean _positiveRight,
ImmutableGroupID _conditionGroup)
Removes the AclEntry as direct AclEntry on this bases set and as inherited AclEntry in the connected databases. |
void |
removeAclEntryWithoutFiring(ImmutableACS _aclAcs,
ImmutableEligibleParty _ep,
boolean _positiveRight,
ImmutableGroupID _conditionGroup)
Removes the direct AclEntry but without event firing. |
protected void |
removeConnectedDatabase(DirectoryMySQL _base)
Registers the database in this BasesSetMySQL. |
void |
removeInheritedAclEntry(AclEntry _acl)
Removes the inherited AclEntries in the children. |
void |
resetInheritedAclEntryRights(AclEntry _acl)
Resets the inherited AclEntry rights after an user edition. |
void |
resetInheritedAclEntryRightsOfChildren(AclEntry _acl)
At each rights changing into a direct ACL, resets the inherited AclEntries of the connected databases (which are not indeed children). |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ARoad0.gBaseInterface.Directory |
---|
resetInheritedPrivilegeRightsOfChildren, setEnforceChildGID |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableDirectory |
---|
getEnforceChildGID, getEorL_Children |
Methods inherited from interface ARoad0.gBaseInterface.Resource |
---|
copyWithoutInternalAcl, resetInheritedPrivilegeRights, selectInheritedPrivilege, setEorGroupID, setEorUserID, setL_groupRights, setL_ownerRights, setL_rootRights, setResourceType |
Methods inherited from interface ARoad0.gBaseInterface.Basic |
---|
finalizeForUser, setComment |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableBasic |
---|
getComment, getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getImpliedViews, getIS_Name, getL_AcsOfSoftReferences, getL_SoftAlias, getPropertyChangeListeners, getSerialVersionUID, getVirtualFolders |
Methods inherited from interface ARoad0.gBaseInterface.Copyable |
---|
copy |
Methods inherited from interface ARoad0.gBaseInterface.PrivilegeTarget |
---|
addEorPrivilegeForTypeToTarget, removeEorPrivilegeToTarget |
Methods inherited from interface ARoad0.gBaseInterface.ImmutablePrivilegeTarget |
---|
getEorImmutableL_TargetInheritedLinkedPrivileges, getEorL_TargetPrivilegeForLinks, getEorL_TargetPrivilegeForTypes, getEorL_TargetPrivileges, getM_TargetInheritedLinkedPRIRights, getType |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableTarget |
---|
getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getL_AcsOfSoftReferences, getL_SoftAlias |
Methods inherited from interface ARoad0.gBaseInterface.ACSObject |
---|
getAcsName, getEorACS |
Methods inherited from interface ARoad0.gBaseInterface.BaseObject |
---|
equals, getFullName, getName, getNickName, hashCode |
Field Detail |
---|
private static final long serialVersionUID__
java.util.List<DirectoryMySQL> l_ConnectedDatabases_
public static final BasesSetMySQLImpl EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
public BasesSetMySQLImpl()
public BasesSetMySQLImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType) throws CreateError
_name
- of the directory_acs
- is the main ACS of the directory_parent
- of the directory; may be null._resourceType
- is the type, and may be null if the ACS allows it._owner
- owns the resource; may be null. Never used.
CreateError
- if ACSImpl.newEorResource() throws it -
the instance must then be deleted !public BasesSetMySQLImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType, boolean _toRegisterInManager) throws CreateError
_name
- of the directory_acs
- is the main ACS of the directory_parent
- of the directory; may be null._resourceType
- is the type, and may be null if the ACS allows it._owner
- owns the resource. May be null. Never used._toRegisterInManager
- false if this method must not register
the instance in the ACS.
CreateError
- if ACSImpl.newEorResource() throws it, or error on the name,
the type, the parent - the instance must then be deleted !Method Detail |
---|
public java.util.Map<java.lang.String,java.lang.String> getAddonInnerPropertiesToListen()
- 'THIS' to say that the single object to listen is the ACSObject,
- 'ACS.method_name' to say that the list of objects to listen is returned by the method 'method_name' in the Addon ACS class.
For each map key, the values have the following format:
'AAA.method_name IF BBB'
where:
- AAA: THIS (mandatory),
- method_name: 'get' method name of the ACSObject that is associated, in the relevant BeanInfo class, to the event to listen (mandatory)
- IF BBB: where BBB is TRUE, or FALSE, or NULL, or NOT-NULL, to say that the event must be listened if and only if the returned value of the method_name is respectively a boolean TRUE, or FALSE, or an object NULL, or NOT-NULL (option).
When the map value starts with 'ACS', the ACS method to call has the ACSObject has one argument. Otherwise, the ACS or the ACSObject method has no argument. Called by ARoad0.UtilityImpl.removeAddonParentPropertyChangeListener().
getAddonInnerPropertiesToListen
in interface ACSObjectAddon
AcsAddon.getAddonParentPropertiesToListen()
public void addInheritedAclEntry(AclEntry _acl)
addInheritedAclEntry
in interface ResourceMySQL
_acl
- inherited AclEntry to put in the list at the right orderpublic void removeInheritedAclEntry(AclEntry _acl) throws UpDateError
removeInheritedAclEntry
in interface ResourceMySQL
_acl
- inherited AclEntry
UpDateError
- if _acl is null or unknownpublic void resetInheritedAclEntryRights(AclEntry _acl)
resetInheritedAclEntryRights
in interface ResourceMySQL
resetInheritedAclEntryRights
in interface Resource
resetInheritedAclEntryRights
in class DirectoryImpl
_acl
- inherited AclEntry with updated rightspublic java.util.Map<java.lang.String,StringRight[]> getM_TargetInheritedACLRights()
getM_TargetInheritedACLRights
in interface ResourceMySQL
getM_TargetInheritedACLRights
in interface ImmutableResource
getM_TargetInheritedACLRights
in class ResourceImpl
public AclEntry addAclEntry(ImmutableACS _aclAcs, ImmutableEligibleParty _ep, StringRight[] _l_right, java.lang.Boolean _positiveRight, ImmutableGroupID _conditionGroup) throws CreateError
addAclEntry
in interface Resource
addAclEntry
in class ResourceImpl
_aclAcs
- ImmutableACS which owns the new AclEntry, and to be recorded
as an ACS controller of this resource if it is not its main ACS._ep
- eligible party connected to the resource through a new aclEntry._l_right
- is an array of positive or negative rights of _ep on this resource
(that is, if READ is a right, _ep can read on the resource). May be null._positiveRight
- is true if the rights are set to authorize (grant),
and false if they are set to forbid (deny)._conditionGroup
- first condition group. May be null.
CreateError
- if _ep or _aclAcs is null, or if _ep is already recorded
in this resource with the same ACS, or thrown by the ACS.newEorAclEntry(),
or without a condition group not for an account, a host or a host group,
or with condition group while the source is not an account.public void removeAclEntry(ImmutableACS _aclAcs, ImmutableEligibleParty _ep, boolean _positiveRight, ImmutableGroupID _conditionGroup) throws UpDateError
removeAclEntry
in interface Resource
removeAclEntry
in class ResourceImpl
_aclAcs
- ImmutableACS which owns the AclEntry, and is recorded
as an ACS controller of this resource._ep
- eligible party connected to the resource through an AclEntry.
This method unrecords the relevant aclEntry in _ep, in this resource,
and in the relevant ACS. The ACS of the aclEntry may be unrecorded in this
resource if there are no other aclEntry owned by this ACS in this resource._positiveRight
- is true if the rights are oriented to authorize,
and false if they are oriented to forbid._conditionGroup
- first condition group. May be null.
UpDateError
- if _ep is null, unknown, if _aclAcs is closed or unknown,
or if the type does not allow this operation.DirectoryMySQLImpl.addAclEntry(ARoad0.gBaseInterface.ImmutableACS, ARoad0.gBaseInterface.ImmutableEligibleParty, ARoad0.gBaseInterface.StringRight[], java.lang.Boolean, ARoad0.gBaseInterface.ImmutableGroupID)
public void resetInheritedAclEntryRightsOfChildren(AclEntry _acl)
Not described in the BeanInfo since the user does not call it. Does not fire property change for this instance, but fires the 'InheritedTargetAclEntries' change from each database, to reset their inherited and primary rights. Called by AclEntryImpl.resetRightsAsInheritedAclEntry(). Calls DirectoryMySQLImpl.setEorL_TargetInheritedAclEntries().
resetInheritedAclEntryRightsOfChildren
in interface Directory
resetInheritedAclEntryRightsOfChildren
in class DirectoryImpl
_acl
- own AclEntry with updated rightspublic java.util.List<DirectoryMySQL> getEorConnectedDatabases()
getEorConnectedDatabases
in interface BasesSetMySQL
public void removeAclEntryWithoutFiring(ImmutableACS _aclAcs, ImmutableEligibleParty _ep, boolean _positiveRight, ImmutableGroupID _conditionGroup) throws UpDateError
removeAclEntryWithoutFiring
in interface ResourceMySQL
_aclAcs
- ImmutableACS which owns the AclEntry, and is recorded
as an ACS controller of this resource._ep
- eligible party connected to the resource through an AclEntry.
This method unrecords the relevant aclEntry in _ep, in this resource,
and in the relevant ACS. The ACS of the aclEntry may be unrecorded in this
resource if there are no other aclEntry owned by this ACS in this resource._positiveRight
- is true if the rights are oriented to authorize,
and false if they are oriented to forbid._conditionGroup
- first condition group. May be null.
UpDateError
- if _ep is null, unknown, if _aclAcs is closed or unknown,
or if the type does not allow this operation.DirectoryMySQLImpl.addAclEntry(ARoad0.gBaseInterface.ImmutableACS, ARoad0.gBaseInterface.ImmutableEligibleParty, ARoad0.gBaseInterface.StringRight[], java.lang.Boolean, ARoad0.gBaseInterface.ImmutableGroupID)
public java.lang.Object clone()
clone
in class DirectoryImpl
java.lang.CloneNotSupportedException
public void finalizeForBase() throws UpDateError
finalizeForBase
in interface FinalizedObject
finalizeForBase
in class DirectoryImpl
UpDateError
- if the main ACS do not known the resource (if
it is a clone without setName(), typically)protected void addConnectedDatabase(DirectoryMySQL _base)
_base
- the database to add. Never null.protected void removeConnectedDatabase(DirectoryMySQL _base)
_base
- the database to add. Never null.protected BasesSetMySQLImpl copyOwnVariables(BasesSetMySQLImpl _result, boolean _withoutInternalAcl) throws CreateError
_result
- to update with this instance variables copies._withoutInternalAcl
- true if the internal aclEntries
- that is with a resource having the same ACS - must not be copied
if
- super throws it
CreateError
protected void finalizeFromDeserialization()
finalizeFromDeserialization
in class DirectoryImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |