|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openswing.swing.table.permissions.java.GridPermissionsManager
org.openswing.swing.table.permissions.database.server.DbGridPermissionsManager
Title: OpenSwing Framework
Description: Grid permissions manager: it manages the fetching of grid permissions. This implementation is based on database tables: it stores and retrieves user roles from a table and after that the permissions from a second table filtered by user roles and grid identifier.
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 | |
DbGridPermissionsManager(DbConnectionSource dbConnectionSource,
DbDigestDescriptor dbDigestDescriptor,
DbPermissionsDescriptor dbPermissionsDescriptor)
|
Method Summary | |
void |
deleteAllGridPermissionsPerFunctionId(java.lang.String functionId)
Delete all grid permissions for the specified grid identifier, independently from the current user. |
java.lang.String |
getLastGridDigest(java.lang.String functionId)
|
GridPermissions |
getUserGridPermissions(java.lang.String functionId,
java.util.ArrayList userRoles,
java.lang.String[] columnAttributes,
boolean[] columnsVisibility,
boolean[] columnEditableInInsert,
boolean[] columnsEditableInEdit,
boolean[] columnsMandatory)
|
java.util.ArrayList |
getUserRoles()
|
void |
storeGridDigest(java.lang.String functionId,
java.lang.String gridDigest)
Store the "grid digest", i.e. a value that globally identify the current grid configuration. |
void |
storeGridPermissionsDefaults(java.lang.String functionId,
java.lang.String[] columnAttributes,
java.lang.String[] headerColumnNames,
boolean[] columnsVisibility,
boolean[] columnEditableInInsert,
boolean[] columnsEditableInEdit,
boolean[] columnsMandatory)
Store in grid permissions defaults table. |
Methods inherited from class org.openswing.swing.table.permissions.java.GridPermissionsManager |
getCurrentGridDigest, getUsername, setUsername |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DbGridPermissionsManager(DbConnectionSource dbConnectionSource, DbDigestDescriptor dbDigestDescriptor, DbPermissionsDescriptor dbPermissionsDescriptor)
Method Detail |
public final java.util.ArrayList getUserRoles() throws java.lang.Throwable
getUserRoles
in class GridPermissionsManager
java.lang.Throwable
- throwed if fetching operation does not correctly accomplishedpublic final GridPermissions getUserGridPermissions(java.lang.String functionId, java.util.ArrayList userRoles, java.lang.String[] columnAttributes, boolean[] columnsVisibility, boolean[] columnEditableInInsert, boolean[] columnsEditableInEdit, boolean[] columnsMandatory) throws java.lang.Throwable
getUserGridPermissions
in class GridPermissionsManager
functionId
- identifier (functionId) associated to the griduserRoles
- list of role identifiers associated to the specified usercolumnAttributes
- list of attribute names, that identify columnscolumnsVisibility
- define which columns are visiblecolumnEditableInInsert
- define which columns are editable on insert; used to correctly define GridPermissions content: a column will be marked as NOT editable if currently editable but NOT the inversecolumnsMandatory
- define which columns are required on insert/edit mode; used to correctly define GridPermissions content: a column will be marked as required if currently not required but NOT the inverse
java.lang.Throwable
- throwed if fetching operation does not correctly accomplishedpublic void storeGridPermissionsDefaults(java.lang.String functionId, java.lang.String[] columnAttributes, java.lang.String[] headerColumnNames, boolean[] columnsVisibility, boolean[] columnEditableInInsert, boolean[] columnsEditableInEdit, boolean[] columnsMandatory) throws java.lang.Throwable
storeGridPermissionsDefaults
in class GridPermissionsManager
functionId
- identifier (functionId) associated to the gridcolumnAttributes
- list of attribute names, that identify columnsheaderColumnNames
- list of keys for columns, that will be translatedcolumnsVisibility
- define which columns are visiblecolumnEditableInInsert
- define which columns are editable on insert; used to correctly define GridPermissions content: a column will be marked as NOT editable if currently editable but NOT the inversecolumnsMandatory
- define which columns are required on insert/edit mode; used to correctly define GridPermissions content: a column will be marked as required if currently not required but NOT the inverse
java.lang.Throwable
- throwed if storing operation does not correctly accomplishedpublic void deleteAllGridPermissionsPerFunctionId(java.lang.String functionId) throws java.lang.Throwable
deleteAllGridPermissionsPerFunctionId
in class GridPermissionsManager
functionId
- identifier (functionId) associated to the grid
java.lang.Throwable
- throwed if deleting operation does not correctly accomplishedpublic void storeGridDigest(java.lang.String functionId, java.lang.String gridDigest) throws java.lang.Throwable
storeGridDigest
in class GridPermissionsManager
java.lang.Throwable
- throwed if storing operation does not correctly accomplishedpublic java.lang.String getLastGridDigest(java.lang.String functionId) throws java.lang.Throwable
getLastGridDigest
in class GridPermissionsManager
java.lang.Throwable
- throwed if fetching operation does not correctly accomplished
Note: this method returns null if no digest has been yet stored (i.e. this is the first time the grid is being viewed)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |