@ Override public void add ( IPermission perm ) throws AuthorizationException { Connection conn = null ; int rc = 0 ; try { conn = RDBMServices . getConnection ( ) ; String sQuery = getInsertPermissionSql ( ) ; PreparedStatement ps = conn . prepareStatement ( sQuery ) ; try { primAdd ( perm , ps ) ; if ( log . isDebugEnabled ( ) ) log . debug ( "RDBMPermissionImpl.add(): " + ps ) ; rc = ps . executeUpdate ( ) ; if ( rc != 1 ) { throw new AuthorizationException ( "Problem adding Permission " + perm ) ; } } finally { ps . close ( ) ; } } catch ( Exception ex ) { log . error ( "Exception adding permission [" + perm + "]" , ex ) ; throw new AuthorizationException ( "Problem adding Permission " + perm ) ; } finally { RDBMServices . releaseConnection ( conn ) ; } }
Add the IPermission to the store .