## org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.commonui.privilege
Class PrivilegesDetailPage

    java.lang.Object
      org.eclipse.ui.forms.AbstractFormPart
          org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.commonui.privilege.PrivilegesDetailPage

All Implemented Interfaces:
  org.eclipse.ui.forms.IDetailsPage, org.eclipse.ui.forms.IFormPart, org.eclipse.ui.forms.IPartSelectionListener

Direct Known Subclasses:
  ASAColumnPrivilegesDetailPage, ASATablePrivilegesDetailPage, RoutinePrivilegesDetailPage

    public abstract class PrivilegesDetailPage

extends org.eclipse.ui.forms.AbstractFormPart
implements org.eclipse.ui.forms.IDetailsPage

The privileges detail page on privileges block.
The user can grant/revoke privileges by change the state of the privilege, that is, select a new state from the combo box.

Subclass should extend this class to modify the model based on the user's input.
WARN: DONT cache any database object here unless it's a must

Author:
  Idull

Constructor Summary
`PrivilegesDetailPage(org.eclipse.ui.forms.widgets.FormToolkit toolkit, ISchemaObjectEditModel model, SQLObject sqlObj, PrivilegesDetailTableMetaData meta, IPrivilegesTreeViewerInput input, IPrivilegeStateLookup stateLookup)` Constructs a permission detail page without create the controls
`PrivilegesDetailPage(org.eclipse.ui.forms.widgets.FormToolkit toolkit, ISchemaObjectEditModel model, SQLObject sqlObj, PrivilegesDetailTableMetaData meta, IPrivilegesTreeViewerInput input, IPrivilegeStateLookup stateLookup, PrivilegesDetailLabelProvider labelProvider)`

Method Summary
`void` `createContents(org.eclipse.swt.widgets.Composite parent)` Creates controls
`void` `dispose()`
`IPrivilegesTreeViewerInput` `getInput()`
`SQLObject` `getOriginalSqlObj()`
`org.eclipse.jface.viewers.TreeViewer` `getTableTreeViewer()`
`abstract void` `modify(AuthorizationIdentifier authid, SQLObject sqlObj, java.lang.String action, Privilege p, java.lang.String selectString, org.eclipse.jface.viewers.CellEditor currentEditor, java.lang.Object value)` Modify the model based on the user's selection
`void` `refresh()`
`void` `reInit(ISchemaObjectEditModel model, SQLObject sqlObj, IPrivilegesTreeViewerInput input)`
`void` `selectionChanged(org.eclipse.ui.forms.IFormPart part, org.eclipse.jface.viewers.ISelection selection)`
`void` `setSqlObj(SQLObject obj)`

Methods inherited from class org.eclipse.ui.forms.AbstractFormPart
`commit, getManagedForm, initialize, isDirty, isStale, markDirty, markStale, setFocus, setFormInput`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.ui.forms.IFormPart
`commit, initialize, isDirty, isStale, setFocus, setFormInput`

Constructor Detail

### PrivilegesDetailPage

    public PrivilegesDetailPage(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                                ISchemaObjectEditModel model,
                                SQLObject sqlObj,
                                PrivilegesDetailTableMetaData meta,
                                IPrivilegesTreeViewerInput input,
                                IPrivilegeStateLookup stateLookup)

  Constructs a permission detail page without create the controls

  Parameters:
    `toolkit` - the form toolkit, will be used to create the controls
    `model` - the edit model, some objects will be obtained from it
    `sqlObj` - the SQL object for which the permissions are displayed
    `meta` - the meta data for the detail page
    `input` - the input for the detail page
    `stateLookup` - the lookup for privilege state

### PrivilegesDetailPage

    public PrivilegesDetailPage(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                                ISchemaObjectEditModel model,
                                SQLObject sqlObj,
                                PrivilegesDetailTableMetaData meta,
                                IPrivilegesTreeViewerInput input,
                                IPrivilegeStateLookup stateLookup,
                                PrivilegesDetailLabelProvider labelProvider)

Method Detail

### createContents

    public void createContents(org.eclipse.swt.widgets.Composite parent)

  Creates controls

  Specified by:
    `createContents` in interface `org.eclipse.ui.forms.IDetailsPage`
  Parameters:
    `parent` -

### selectionChanged

    public void selectionChanged(org.eclipse.ui.forms.IFormPart part,
                                 org.eclipse.jface.viewers.ISelection selection)

  Specified by:
    `selectionChanged` in interface `org.eclipse.ui.forms.IPartSelectionListener`

### modify

    public abstract void modify(AuthorizationIdentifier authid,
                                SQLObject sqlObj,
                                java.lang.String action,
                                Privilege p,
                                java.lang.String selectString,
                                org.eclipse.jface.viewers.CellEditor currentEditor,
                                java.lang.Object value)

  Modify the model based on the user's selection

  Parameters:
    `authid` - the authorization identifier
    `sqlObj` - the SQL object
    `action` - the action
    `p` - the privilge which is edited
    `selectString` - the user's selection

### getTableTreeViewer

    public org.eclipse.jface.viewers.TreeViewer getTableTreeViewer()

### getInput

    public IPrivilegesTreeViewerInput getInput()

### setSqlObj

    public void setSqlObj(SQLObject obj)

### getOriginalSqlObj

    public SQLObject getOriginalSqlObj()

### reInit

    public void reInit(ISchemaObjectEditModel model,
                       SQLObject sqlObj,
                       IPrivilegesTreeViewerInput input)

### dispose

    public void dispose()

  Specified by:
    `dispose` in interface `org.eclipse.ui.forms.IFormPart`
  Overrides:
    `dispose` in class `org.eclipse.ui.forms.AbstractFormPart`

### refresh

    public void refresh()

  Specified by:
    `refresh` in interface `org.eclipse.ui.forms.IFormPart`
  Overrides:
    `refresh` in class `org.eclipse.ui.forms.AbstractFormPart`