Package ARoad0.AcsAddon.Accbee.MySQL.gWork

Provides the gWork classes for creating and analyzing a MySQL 5 database management system, as an extension of the generic ARoad0.gWork package, in the AcsAddon MySQL.

See:
          Description

Class Summary
AcsFactoryMySQL This class is an utility class for the creation of the MySQL 5 ACS on any parent ACS.
LinkRightsMySQLImpl This class provides utilities about DisplayableLinkImpls on the MySQL server.
NodeRightsMySQLImpl This complex class is responsible for getting the rights for an MySQL node in a view, for the AcsAddon MySQL.
 

Package ARoad0.AcsAddon.Accbee.MySQL.gWork Description

Provides the gWork classes for creating and analyzing a MySQL 5 database management system, as an extension of the generic ARoad0.gWork package, in the AcsAddon MySQL. It is responsible for processing the rights at the request of the ARoad0.gWork package. The MySQL ACS are built up by AcsFactoryMySQL in this package.

To simulate the MySQL server, the features are provided first by a configuration of the Access Road core functions, in the generic gBase package. This is the responsibility of the class ACSFactoryMySQLImpl, after its configuration by the class MySQL.gWork.AcsFactoryMySQL that provides:

The simulation of the MySQL server is then completed by the way of the MySQL AcsAddon, delivering the following features:

These features are presented mainly in the documentation page of the package MySQL.gBase.

All the classes in this package are subclasses of the generic gWork package, except for AcsFactoryMySQL which simply implements ARoad0.Pattern.AcsFactoryForAcsAddon. The two classes NodeRightsMySQLImpl and LinkRightsMySQLImpl look for the original MySQL access paths. They add, remove or update the DisplayableLinkImpls of each Access Road view. NodeRightsMySQLImpl is quite complex to handle, because the calling sequence of its methods from the generic gWork classes has to be well understood.

The class NodeRightsMySQLImpl has the responsability to set the properties of the access paths, and most of its methods come from its super class in the generic gWork package. The main specific methods of this class are presented now. This class overrides the method detectAddonFinalAllNodes() to add the properties AccessControlLink.C_FIST_RATE, AccessControlLink.C_WEAK_LINK and AccessControlLink.C_CONDITIONAL_ACL to some DisplayableLinkImpls. The aim is to precise the effective rights in an Access Road view having MySQL nodes.

The class NodeRightsMySQLImpl overrides the method detectL_aclEntryRights() to get all the rights of the relevant direct AclEntries managed by the ResourceMySQL object for a given EligibleParty, following the ACL sorting and the selection of the first matched ACL. This class overrides also the method getL_accessRightsThroughNodesTree() to return in an AccessControlLink the inherited rights that are given by the directory tree, as inherited rights on a ResourceMySQL. The result sets only the type AccessControlLink.ACL.

This class overrides the method selectAddonNewHiddenNodeForGroupIDMember() to detect the hidden actors that are linked to a GroupIDMember as access source. The aim is to extend the current DisplayableLinkImpls this GroupIDMember ends. This method covers two cases:

The class NodeRightsMySQLImpl contains also a new method getConnectionPair(). It returns the first current user of an account, that is the pair (account, simple host or accounts-for-hosts group) under which the connection of an account is done on the MySQL server.

The class LinkRightsMySQLImpl provides utilities about DisplayableLinkImpls. It operates on DisplayableLinkImpls and on the inherited rights. An important service is the adding of a DisplayableLinkImpl to the view map for these objects, and its filtering to follow the MySQL rules. This is the responsibility of the method addDisplayableLink() to reject 5 patterns of DisplayableLinkImpls.

The proper Actor AG context is required in the MySQL ACS, for any type of Actor as intermediate node in an access path, each time there is a non-null current UserID and there is an executing right on the Actor. This is the responsability of the method setNextNodeAGrunningContext().

Each node in a view and each intermediate node has one LinkRights instance for each view it belongs to. The implementation classes of this interface have properties that depend only on the class of the node ACS, then 2 nodes of the same view should use the same LinkRights instance, even if it is not the actual behavior in all cases. But there is an exception for the methods that detects the Account and AcsAddon priorities over all the links. They use RightsMediatorImpl.getAllLinkRights() which returns only one LinkRights instance per implied gWork package, and not one instance per view node.

Like any AcsAddon, this package offers classes which may be used by an ACS from another AcsAddon. Nonetheless, the classes in this package are designed to work together. A single class may be reused after a careful study of its code.

The limitations of the MySQL server simulation are described into the documentation of the MySQL.gBase package.

Ease-of-use: medium. There are simple algorithms in the rights processing, but the calling sequence from the generic gWork classes has to be well understood.

Reliability: high. There are no known bugs.