|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.gBase.FolderAbst
ARoad0.gBase.VirtualFolderImpl
ARoad0.AcsAddon.Accbee.MySQL.gBase.VirtualFolderMySQLImpl
public class VirtualFolderMySQLImpl
This class is responsible to simulate a MySQL view, adding a view delegate under the database node in the resources tree. This class controls that the VirtuelFolder elements are only from the right database. The DEFINER mode is the default one for the MySQL views. It creates a VirtualFolder with a couple UserID/GroupID as parameter of the constructor. This UserID becomes the Account of the AG context for the view delegate. The GroupID is the host of the account. This feature implies the creation of a VirtualFolderMySQLImpl class in the AcsAddon gBase package, as subclass of VirtualFolderImpl in the generic gBase package.
The view definition is 'frozen' at creation time in MySQL, but it is not useful to extend this constraint to the view simulation in Access Road. As actor, the view delegate in the resources tree runs under the couple UserID/GroupID passed on to the VirtualFolder constructor of the view, if any. This is also the responsibility of the VirtualFolderMySQLImpl constructor.
It is a javabean with the bound properties of the superclass.
This class has no subclass in this package,and no variables. Note: no equals() nor clone() methods. See the Copyright.
Field Summary | |
---|---|
static VirtualFolderMySQLImpl |
EMPTY_INSTANCE
|
Fields inherited from class ARoad0.gBase.VirtualFolderImpl |
---|
aCS_, aliasHandler_, EP_VFOLDER, folderMember_, memberOneTimeInTree_, nodeHandler_, parent_, privHandler_, RES_VFOLDER, serialPersistentFields, VFType_ |
Fields inherited from class ARoad0.gBase.FolderAbst |
---|
baseError_, changeSupport_, comment_, connectedToSeveralACS_, INITIAL_CAPACITY, INITIAL_CAPACITY_5, l_connectedACSNames_, m_BaseObjects_, m_ObjectsNames_, name_, PRIME, type_ |
Constructor Summary | |
---|---|
VirtualFolderMySQLImpl()
Default constructor |
|
VirtualFolderMySQLImpl(ImmutableName _name,
ACS _acs,
VirtualFolderMySQL _parent,
java.lang.String _type,
UserID _definer,
GroupIDMySQL _host)
This is the main constructor. |
Method Summary | |
---|---|
void |
addEorBaseObject(BaseObject _obj)
Adds a member to this virtual folder. |
java.lang.Object |
copy(ImmutableName _name,
ACS _acs,
Node _parent,
java.lang.Boolean _toRegisterInManager)
This method provides a copy of the instance with another name, without children copying because the copy order will not be always correct. |
protected VirtualFolderImpl |
copyOwnVariables(VirtualFolderMySQLImpl _result)
UNUSED - This method provides a copy of the instance variables. |
void |
finalizeForBase()
Finalizes the view delegate if not null. |
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. |
ImmutableUserID |
getEorDefinerForDelegate()
In the MySQL DEFINER mode, the view delegate runs under an account. |
GroupIDMySQL |
getEorDefinerHostForDelegate()
In the MySQL DEFINER mode, the view delegate runs under an account and a current host. |
static VirtualFolderMySQL |
valueOf(ImmutableName _name,
ACS _acs,
VirtualFolderMySQL _parent,
java.lang.String _type,
UserID _definer,
GroupIDMySQL _host)
No use, since CollectionPropertyEditor calls BaseObjectHandler. |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ARoad0.gBaseInterface.VirtualFolder |
---|
resetInheritedPrivilegeRights, resetInheritedPrivilegeRightsOfChildren, selectInheritedPrivilege |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableVirtualFolder |
---|
equals, getEorL_Children, getMainVFType, getMemberOneTimeInTree, getPropertyChangeListeners |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableSource |
---|
getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getL_AcsOfSoftReferences, getL_SoftAlias, getType |
Methods inherited from interface ARoad0.gBaseInterface.Folder |
---|
addPropertyChangeListener, addPropertyChangeListener, propertyChange, removeEorBaseObject, removePropertyChangeListener, removePropertyChangeListener, setComment |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableFolder |
---|
containsBaseObject, getComment, getConnectedToSeveralACS, getEorL_ConnectedACSNames, getEorM_BaseObjects, getType, isEmpty |
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.ImmutableLeaf |
---|
compareTo, getEorParent |
Methods inherited from interface ARoad0.gBaseInterface.ACSObject |
---|
getAcsName, getEorACS |
Methods inherited from interface ARoad0.gBaseInterface.BaseObject |
---|
getFullName, getName, getNickName, hashCode |
Methods inherited from interface ARoad0.gBaseInterface.FinalizedObjectForUser |
---|
finalizeForUser |
Field Detail |
---|
public static final VirtualFolderMySQLImpl EMPTY_INSTANCE
Constructor Detail |
---|
public VirtualFolderMySQLImpl()
public VirtualFolderMySQLImpl(ImmutableName _name, ACS _acs, VirtualFolderMySQL _parent, java.lang.String _type, UserID _definer, GroupIDMySQL _host) throws CreateError
With a definer and a host, the user message errors are:
- The definer ACS is not the ACS of this virtual folder.
- The host cannot be null when the definer is not null.
- The host ACS is not the ACS of this virtual folder.
- The host is not a simple host.
- The Host is not the simple host of the definer.
_name
- name of the folder name. Its last component is added to the _acs name
to get the folder name. It is not added to the parent name, since this is
the job of valueOf(). Never null._acs
- is the main ACS of the folder to create. Never null._parent
- is the folder which contains this folder, and with the same type.
May be null or immutable. The last component has the form 'database_name views'
if the new VirtualFolder is a view._type
- is the folder type. Used like the Resource type. If null, the internal value
is "_definer
- not null to set the view delegate as running under this account.
May be null._host
- the host of _definer, from the same ACS. May be null.
Never null if _definer is not null.
CreateError
- if _m_BaseObjects contains a null,
no ACSObject, empty-name or not _acs object, or with double link in
the folders tree for a ACS, if _parent has not the same folder type,
if the name is the name of a known VirtualFolder, Resource or EligibleParty,
or if the object type is not managed by the ACS.Method Detail |
---|
public static VirtualFolderMySQL valueOf(ImmutableName _name, ACS _acs, VirtualFolderMySQL _parent, java.lang.String _type, UserID _definer, GroupIDMySQL _host) throws CreateError
_name
- of the view. It is copied._acs
- is the main ACS of the folder to create. Never null._parent
- is the folder which contains this folder, and with the same type;
may be null._type
- is the folder type. If null, the internal value is "_definer
- not null to set the view delegate as running under this account.
May be null._host
- the host of _definer. May be null. Never null if _definer is not null.
CreateError
- if _acs is null, or from the constructor.public ImmutableUserID getEorDefinerForDelegate()
getEorDefinerForDelegate
in interface VirtualFolderMySQL
public GroupIDMySQL getEorDefinerHostForDelegate()
getEorDefinerHostForDelegate
in interface VirtualFolderMySQL
public void addEorBaseObject(BaseObject _obj) throws CreateError
addEorBaseObject
in interface Folder
addEorBaseObject
in class VirtualFolderImpl
_obj
- non-null ACSObject to add in the folder
CreateError
- if the object is already known by the view,
if it is known in the tree when it is restricted to one instance,
or it is not a resource or an actor (following the main type),
or if its ACS is not the folder ACS, or the object type is not authorized,
or if it is not an object from the view database.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(). Overridden by the subclass DirectoryMySQLImpl.
getAddonInnerPropertiesToListen
in interface ACSObjectAddon
AcsAddon.getAddonParentPropertiesToListen()
public void finalizeForBase() throws UpDateError
finalizeForBase
in interface FinalizedObject
finalizeForBase
in class VirtualFolderImpl
UpDateError
- from Basic.removeInVFolderList()public java.lang.Object copy(ImmutableName _name, ACS _acs, Node _parent, java.lang.Boolean _toRegisterInManager) throws CreateError
copy
in class VirtualFolderImpl
_name
- is the copy name. Caution: it has to not be used
as a Resource name in the same ACS, because linked privileges have
resources and folders as targets._acs
- is the main ACS of the copy to create. May not be the ACS of this instance._parent
- is the VirtualFolderMySQL (not Node!) which belongs to _acs
and will have the copy. May be null._toRegisterInManager
- false if this method must not register
the instance in the ACS.
CreateError
- of the constructor with the same parameters,
or if _parent is not a virtual folder, or _parent ACS is not _acs.protected VirtualFolderImpl copyOwnVariables(VirtualFolderMySQLImpl _result) throws CreateError
_result
- to update with this instance variables copies
CreateError
- from
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |