DefaultDbPermissionsDescriptor

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openswing.swing.table.permissions.database.server
Class DefaultDbPermissionsDescriptor

    java.lang.Object
      org.openswing.swing.table.permissions.database.server.DefaultDbPermissionsDescriptor

All Implemented Interfaces:
  DbPermissionsDescriptor

public class DefaultDbPermissionsDescriptor
extends java.lang.Object
implements DbPermissionsDescriptor

Title: OpenSwing Framework

Description: Default descriptor of the table related to grid permissions storing, where the primary key is based on "functionId",role identifier attributes of the GridPermissions. The "id" can represent more than one database field.

it is based on a table having the following structure: CREATE TABLE GRID_PERMISSIONS(FUNCTION_ID VARCHAR,ROLE_ID VARCHAR,COLS_POS VARCHAR,EDIT_COLS_IN_INS VARCHAR,EDIT_COLS_IN_EDIT VARCHAR,REQUIRED_COLS VARCHAR,COLS_VIS VARCHAR,PRIMARY KEY(FUNCTION_ID,ROLE_ID)) Morever, a second table is needed, to map username with its roles: CREATE TABLE USER_ROLES(USERNAME VARCHAR,ROLE_ID VARCHAR,PRIMARY KEY(USERNAME,ROLE_ID)) Finally, a third table is needed, to store default settings for grid, in order to externally define roles in GRID_PERMISSIONS table: CREATE TABLE GRID_PERMISSIONS_DEFS(FUNCTION_ID VARCHAR,COLS_POS VARCHAR,EDIT_COLS_IN_INS VARCHAR,EDIT_COLS_IN_EDIT VARCHAR,REQUIRED_COLS VARCHAR,COLS_VIS VARCHAR,PRIMARY KEY(FUNCTION_ID))

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it

Constructor Summary
`DefaultDbPermissionsDescriptor()`

Method Summary
`java.util.Hashtable` | `deleteAllGridPermissions(java.lang.String functionId)` Callback method used to fill in the WHERE part of the delete SQL instruction with the specified collection of pairs , when executing the "deleteAllGridPermissions" method.
`java.lang.String` | `getColumnsAttributeFieldNameInDefaultsTableName()`
`java.lang.String` | `getColumnsAttributeFieldNameInGridPermissionsTable()`
`java.lang.String` | `getColumnsMandatoryFieldNameInDefaultsTableName()`
`java.lang.String` | `getColumnsMandatoryFieldNameInGridPermissionsTable()`
`java.lang.String` | `getColumnsVisibilityFieldNameInDefaultsTableName()`
`java.lang.String` | `getColumnsVisibilityFieldNameInGridPermissionsTable()`
`java.lang.String` | `getEditableColumnsInEditFieldNameInDefaultsTableName()`
`java.lang.String` | `getEditableColumnsInEditFieldNameInGridPermissionsTable()`
`java.lang.String` | `getEditableColumnsInInsertFieldNameInDefaultsTableName()`
`java.lang.String` | `getEditableColumnsInInsertFieldNameInGridPermissionsTable()`
`java.lang.String` | `getFunctionIdFieldNameInDefaultsTableName()`
`java.lang.String` | `getFunctionIdFieldNameInGridPermissionsTable()`
`java.lang.String` | `getGridPermissionsDefaultsTableName()`
`java.lang.String` | `getGridPermissionsTableName()`
`java.lang.String[]` | `getOtherFieldNamesInDefaultsTableName()`
`java.lang.Object[]` | `getOtherFieldValuesInDefaultsTableName()`
`java.lang.String[]` | `getRoleIdFieldNamesInGridPermissionsTable()`
`java.lang.String[]` | `getRoleIdFieldNamesInUserRolesTable()`
`java.lang.String[]` | `getRolesWhereFieldNames()`
`java.lang.Object[]` | `getRolesWhereValues()`
`java.lang.String` | `getUsernameFieldNameInUserRolesTable()`
`java.lang.String` | `getUserRolesTableName()`

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

Constructor Detail

### DefaultDbPermissionsDescriptor

    public DefaultDbPermissionsDescriptor()

Method Detail

### getGridPermissionsTableName

    public java.lang.String getGridPermissionsTableName()

  Specified by:
    `getGridPermissionsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    name of the grid permissions table.

### getRoleIdFieldNamesInGridPermissionsTable

    public java.lang.String[] getRoleIdFieldNamesInGridPermissionsTable()

  Specified by:
    `getRoleIdFieldNamesInGridPermissionsTable` in interface `DbPermissionsDescriptor`
  Returns:
    database field names related to the role identifier attribute

### getFunctionIdFieldNameInGridPermissionsTable

    public java.lang.String getFunctionIdFieldNameInGridPermissionsTable()

  Specified by:
    `getFunctionIdFieldNameInGridPermissionsTable` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "functionId" attribute of GridPermissions

### getColumnsAttributeFieldNameInGridPermissionsTable

    public java.lang.String getColumnsAttributeFieldNameInGridPermissionsTable()

  Specified by:
    `getColumnsAttributeFieldNameInGridPermissionsTable` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "columnsAttribute" attribute of GridProfile

### getEditableColumnsInEditFieldNameInGridPermissionsTable

    public java.lang.String getEditableColumnsInEditFieldNameInGridPermissionsTable()

  Specified by:
    `getEditableColumnsInEditFieldNameInGridPermissionsTable` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "currentSortedColumns" attribute of GridPermissions

### getEditableColumnsInInsertFieldNameInGridPermissionsTable

    public java.lang.String getEditableColumnsInInsertFieldNameInGridPermissionsTable()

  Specified by:
    `getEditableColumnsInInsertFieldNameInGridPermissionsTable` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "currentSortedVersusColumns" attribute of GridPermissions

### getColumnsMandatoryFieldNameInGridPermissionsTable

    public java.lang.String getColumnsMandatoryFieldNameInGridPermissionsTable()

  Specified by:
    `getColumnsMandatoryFieldNameInGridPermissionsTable` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "quickFilterValues" attribute of GridPermissions

### getColumnsVisibilityFieldNameInGridPermissionsTable

    public java.lang.String getColumnsVisibilityFieldNameInGridPermissionsTable()

  Specified by:
    `getColumnsVisibilityFieldNameInGridPermissionsTable` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "columnsVisibility" attribute of GridPermissions

### deleteAllGridPermissions

    public java.util.Hashtable deleteAllGridPermissions(java.lang.String functionId)

  Callback method used to fill in the WHERE part of the delete SQL instruction with the specified collection of pairs , when executing the "deleteAllGridPermissions" method.

  Specified by:
    `deleteAllGridPermissions` in interface `DbPermissionsDescriptor`

### getUserRolesTableName

    public java.lang.String getUserRolesTableName()

  Specified by:
    `getUserRolesTableName` in interface `DbPermissionsDescriptor`
  Returns:
    name of the user roles table.

### getUsernameFieldNameInUserRolesTable

    public java.lang.String getUsernameFieldNameInUserRolesTable()

  Specified by:
    `getUsernameFieldNameInUserRolesTable` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the username

### getRoleIdFieldNamesInUserRolesTable

    public java.lang.String[] getRoleIdFieldNamesInUserRolesTable()

  Specified by:
    `getRoleIdFieldNamesInUserRolesTable` in interface `DbPermissionsDescriptor`
  Returns:
    database field names related to the role identifier attribute

### getRolesWhereFieldNames

    public java.lang.String[] getRolesWhereFieldNames()

  Specified by:
    `getRolesWhereFieldNames` in interface `DbPermissionsDescriptor`
  Returns:
    database field names in user roles table to add in where clause, when fetching user roles

### getRolesWhereValues

    public java.lang.Object[] getRolesWhereValues()

  Specified by:
    `getRolesWhereValues` in interface `DbPermissionsDescriptor`
  Returns:
    values to set in where clause, when fetching user roles

### getGridPermissionsDefaultsTableName

    public java.lang.String getGridPermissionsDefaultsTableName()

  Specified by:
    `getGridPermissionsDefaultsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    name of the grid permissions table that stores default settings for a grid.

### getFunctionIdFieldNameInDefaultsTableName

    public java.lang.String getFunctionIdFieldNameInDefaultsTableName()

  Specified by:
    `getFunctionIdFieldNameInDefaultsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "functionId" attribute of GridPermissions

### getOtherFieldNamesInDefaultsTableName

    public java.lang.String[] getOtherFieldNamesInDefaultsTableName()

  Specified by:
    `getOtherFieldNamesInDefaultsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    database pther field names in primary key of grid permissions defaults table

### getOtherFieldValuesInDefaultsTableName

    public java.lang.Object[] getOtherFieldValuesInDefaultsTableName()

  Specified by:
    `getOtherFieldValuesInDefaultsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    database other field values in primary key related to grid permissions defaults table

### getColumnsAttributeFieldNameInDefaultsTableName

    public java.lang.String getColumnsAttributeFieldNameInDefaultsTableName()

  Specified by:
    `getColumnsAttributeFieldNameInDefaultsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "columnsAttribute" attribute of GridProfile

### getEditableColumnsInEditFieldNameInDefaultsTableName

    public java.lang.String getEditableColumnsInEditFieldNameInDefaultsTableName()

  Specified by:
    `getEditableColumnsInEditFieldNameInDefaultsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "currentSortedColumns" attribute of GridPermissions

### getEditableColumnsInInsertFieldNameInDefaultsTableName

    public java.lang.String getEditableColumnsInInsertFieldNameInDefaultsTableName()

  Specified by:
    `getEditableColumnsInInsertFieldNameInDefaultsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "currentSortedVersusColumns" attribute of GridPermissions

### getColumnsMandatoryFieldNameInDefaultsTableName

    public java.lang.String getColumnsMandatoryFieldNameInDefaultsTableName()

  Specified by:
    `getColumnsMandatoryFieldNameInDefaultsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "quickFilterValues" attribute of GridPermissions

### getColumnsVisibilityFieldNameInDefaultsTableName

    public java.lang.String getColumnsVisibilityFieldNameInDefaultsTableName()

  Specified by:
    `getColumnsVisibilityFieldNameInDefaultsTableName` in interface `DbPermissionsDescriptor`
  Returns:
    database field name related to the "columnsVisibility" attribute of GridPermissions

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD