org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.routineeditor.utils
Class HandlePrivilegeUtil
java.lang.Object
org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.routineeditor.utils.HandlePrivilegeUtil
public class HandlePrivilegeUtil
- extends java.lang.Object
This util is only to handle some special cases in privilege related execution
- Author:
- Hao-yue
Method Summary |
static void |
handlePrivilegeDeltaDdl(java.lang.StringBuffer sb,
SQLObject clonedObj,
SQLObject oriObj,
java.util.List authids,
java.util.List oriAuthids,
IDDLGeneratorWrapper dGeneratorWrapper)
some group grant/revoke operation may impact the privilege of the members in this group,
so sometimes the UI may be not consistent with the result after execution,
in this case we have to add some extra scripts to make the result as expectation |
static void |
handleRevokedPrivilege(Group authid,
ISchemaObjectEditor editor,
SQLObject sqlObj,
java.lang.String action)
when revoking the privilege of a group, we will check if any user in this group have been revoked 'RI' privilege
if so, there is no need to remove that 'RI' privilege from model, we will add it to the edit model,
otherwise, the result after execution may be out of expectation |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HandlePrivilegeUtil
public HandlePrivilegeUtil()
handlePrivilegeDeltaDdl
public static void handlePrivilegeDeltaDdl(java.lang.StringBuffer sb,
SQLObject clonedObj,
SQLObject oriObj,
java.util.List authids,
java.util.List oriAuthids,
IDDLGeneratorWrapper dGeneratorWrapper)
- some group grant/revoke operation may impact the privilege of the members in this group,
so sometimes the UI may be not consistent with the result after execution,
in this case we have to add some extra scripts to make the result as expectation
- Parameters:
sb
- deltaddl to be handledclonedObj
- cloned sql objectoriObj
- original sql objectauthids
- cloned authorized idsoriAuthids
- original authorized idsdGeneratorWrapper
- DDLGeneratorWrapper to get the extra scripts
handleRevokedPrivilege
public static void handleRevokedPrivilege(Group authid,
ISchemaObjectEditor editor,
SQLObject sqlObj,
java.lang.String action)
- when revoking the privilege of a group, we will check if any user in this group have been revoked 'RI' privilege
if so, there is no need to remove that 'RI' privilege from model, we will add it to the edit model,
otherwise, the result after execution may be out of expectation
- Parameters:
authid
- the group to be checkededitor
- the editor for the sql objectsqlObj
- cloned sql objectaction
- the action of the privilege