django-forms-workflows 0.5.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. django_forms_workflows-0.5.7/CHANGELOG.md +311 -0
  2. django_forms_workflows-0.5.7/LICENSE +165 -0
  3. django_forms_workflows-0.5.7/PKG-INFO +347 -0
  4. django_forms_workflows-0.5.7/README.md +299 -0
  5. django_forms_workflows-0.5.7/django_forms_workflows/__init__.py +10 -0
  6. django_forms_workflows-0.5.7/django_forms_workflows/admin.py +1034 -0
  7. django_forms_workflows-0.5.7/django_forms_workflows/apps.py +20 -0
  8. django_forms_workflows-0.5.7/django_forms_workflows/data_sources/__init__.py +78 -0
  9. django_forms_workflows-0.5.7/django_forms_workflows/data_sources/base.py +118 -0
  10. django_forms_workflows-0.5.7/django_forms_workflows/data_sources/database_source.py +572 -0
  11. django_forms_workflows-0.5.7/django_forms_workflows/data_sources/ldap_source.py +154 -0
  12. django_forms_workflows-0.5.7/django_forms_workflows/data_sources/user_source.py +73 -0
  13. django_forms_workflows-0.5.7/django_forms_workflows/form_builder_urls.py +23 -0
  14. django_forms_workflows-0.5.7/django_forms_workflows/form_builder_views.py +577 -0
  15. django_forms_workflows-0.5.7/django_forms_workflows/forms.py +542 -0
  16. django_forms_workflows-0.5.7/django_forms_workflows/handlers/__init__.py +34 -0
  17. django_forms_workflows-0.5.7/django_forms_workflows/handlers/api_handler.py +199 -0
  18. django_forms_workflows-0.5.7/django_forms_workflows/handlers/base.py +98 -0
  19. django_forms_workflows-0.5.7/django_forms_workflows/handlers/database_handler.py +185 -0
  20. django_forms_workflows-0.5.7/django_forms_workflows/handlers/executor.py +271 -0
  21. django_forms_workflows-0.5.7/django_forms_workflows/handlers/file_handler.py +500 -0
  22. django_forms_workflows-0.5.7/django_forms_workflows/handlers/ldap_handler.py +244 -0
  23. django_forms_workflows-0.5.7/django_forms_workflows/ldap_backend.py +477 -0
  24. django_forms_workflows-0.5.7/django_forms_workflows/management/commands/create_default_templates.py +295 -0
  25. django_forms_workflows-0.5.7/django_forms_workflows/management/commands/seed_farm_demo.py +505 -0
  26. django_forms_workflows-0.5.7/django_forms_workflows/management/commands/seed_prefill_sources.py +155 -0
  27. django_forms_workflows-0.5.7/django_forms_workflows/management/commands/sync_ldap_profiles.py +124 -0
  28. django_forms_workflows-0.5.7/django_forms_workflows/management/commands/test_db_connection.py +136 -0
  29. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0001_initial.py +754 -0
  30. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0002_prefillsource_alter_formfield_prefill_source_and_more.py +184 -0
  31. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0003_postsubmissionaction.py +251 -0
  32. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0004_formtemplate.py +117 -0
  33. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0005_advanced_conditional_logic.py +90 -0
  34. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0006_workflowdefinition_visual_workflow_data_and_more.py +36 -0
  35. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0007_add_userprofile_ldap_enhancements.py +43 -0
  36. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0008_add_file_workflow_models.py +539 -0
  37. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0009_add_formfield_readonly.py +21 -0
  38. django_forms_workflows-0.5.7/django_forms_workflows/migrations/0010_add_prefillsource_template_fields.py +41 -0
  39. django_forms_workflows-0.5.7/django_forms_workflows/migrations/__init__.py +0 -0
  40. django_forms_workflows-0.5.7/django_forms_workflows/models.py +1647 -0
  41. django_forms_workflows-0.5.7/django_forms_workflows/signals.py +249 -0
  42. django_forms_workflows-0.5.7/django_forms_workflows/sso_backends.py +287 -0
  43. django_forms_workflows-0.5.7/django_forms_workflows/sso_urls.py +46 -0
  44. django_forms_workflows-0.5.7/django_forms_workflows/sso_views.py +261 -0
  45. django_forms_workflows-0.5.7/django_forms_workflows/static/django_forms_workflows/js/form-builder.js +1986 -0
  46. django_forms_workflows-0.5.7/django_forms_workflows/static/django_forms_workflows/js/form-enhancements.js +1088 -0
  47. django_forms_workflows-0.5.7/django_forms_workflows/static/django_forms_workflows/js/workflow-builder.js +1175 -0
  48. django_forms_workflows-0.5.7/django_forms_workflows/tasks.py +401 -0
  49. django_forms_workflows-0.5.7/django_forms_workflows/templates/admin/django_forms_workflows/form_builder.html +892 -0
  50. django_forms_workflows-0.5.7/django_forms_workflows/templates/admin/django_forms_workflows/formdef_change_form.html +31 -0
  51. django_forms_workflows-0.5.7/django_forms_workflows/templates/admin/django_forms_workflows/formdefinition/change_list.html +66 -0
  52. django_forms_workflows-0.5.7/django_forms_workflows/templates/admin/django_forms_workflows/workflow_builder.html +536 -0
  53. django_forms_workflows-0.5.7/django_forms_workflows/templates/django_forms_workflows/approval_inbox.html +52 -0
  54. django_forms_workflows-0.5.7/django_forms_workflows/templates/django_forms_workflows/approve.html +95 -0
  55. django_forms_workflows-0.5.7/django_forms_workflows/templates/django_forms_workflows/base.html +119 -0
  56. django_forms_workflows-0.5.7/django_forms_workflows/templates/django_forms_workflows/form_list.html +38 -0
  57. django_forms_workflows-0.5.7/django_forms_workflows/templates/django_forms_workflows/form_submit.html +54 -0
  58. django_forms_workflows-0.5.7/django_forms_workflows/templates/django_forms_workflows/my_submissions.html +82 -0
  59. django_forms_workflows-0.5.7/django_forms_workflows/templates/django_forms_workflows/sso/login.html +60 -0
  60. django_forms_workflows-0.5.7/django_forms_workflows/templates/django_forms_workflows/submission_detail.html +171 -0
  61. django_forms_workflows-0.5.7/django_forms_workflows/templates/django_forms_workflows/withdraw_confirm.html +38 -0
  62. django_forms_workflows-0.5.7/django_forms_workflows/templates/emails/approval_notification.html +29 -0
  63. django_forms_workflows-0.5.7/django_forms_workflows/templates/emails/approval_reminder.html +29 -0
  64. django_forms_workflows-0.5.7/django_forms_workflows/templates/emails/approval_request.html +42 -0
  65. django_forms_workflows-0.5.7/django_forms_workflows/templates/emails/email_styles.html +10 -0
  66. django_forms_workflows-0.5.7/django_forms_workflows/templates/emails/escalation_notification.html +28 -0
  67. django_forms_workflows-0.5.7/django_forms_workflows/templates/emails/rejection_notification.html +28 -0
  68. django_forms_workflows-0.5.7/django_forms_workflows/templates/emails/submission_notification.html +29 -0
  69. django_forms_workflows-0.5.7/django_forms_workflows/templates/registration/login.html +78 -0
  70. django_forms_workflows-0.5.7/django_forms_workflows/urls.py +38 -0
  71. django_forms_workflows-0.5.7/django_forms_workflows/utils.py +288 -0
  72. django_forms_workflows-0.5.7/django_forms_workflows/views.py +534 -0
  73. django_forms_workflows-0.5.7/django_forms_workflows/workflow_builder_views.py +609 -0
  74. django_forms_workflows-0.5.7/django_forms_workflows/workflow_engine.py +375 -0
  75. django_forms_workflows-0.5.7/pyproject.toml +84 -0
@@ -0,0 +1,311 @@
1
+ # Changelog
2
+
3
+ All notable changes to Django Forms Workflows will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Planned Features
11
+ - Form builder UI (drag-and-drop)
12
+ - REST API for form submission
13
+ - Webhook support
14
+ - Custom field types (signature, location, etc.)
15
+ - Advanced reporting and analytics
16
+ - Multi-tenancy support
17
+
18
+ ## [0.5.5] - 2026-01-18
19
+
20
+ ### Added
21
+ - **Multi-Column Database Prefill Templates**
22
+ - Added `db_columns` (JSONField) and `db_template` (CharField) to PrefillSource model
23
+ - Allows combining multiple database columns into a single prefill value
24
+ - Example: `db_columns=["FIRST_NAME", "LAST_NAME"]`, `db_template="{FIRST_NAME} {LAST_NAME}"` produces "John Smith"
25
+ - New `DatabaseDataSource.get_template_value()` method for template-based lookups
26
+ - Migration `0010_add_prefillsource_template_fields`
27
+
28
+ ## [0.5.4] - 2026-01-18
29
+
30
+ ### Fixed
31
+ - **Database Prefill User Field Lookup**
32
+ - Fixed `DatabaseDataSource._get_user_id()` to first check direct user attributes (e.g., `username`, `email`) before checking the user profile
33
+ - This allows database prefill to use `user.username` for lookup when `db_user_field` is set to `username`
34
+
35
+ ## [0.5.3] - 2026-01-18
36
+
37
+ ### Added
38
+ - **Readonly Form Fields**
39
+ - Added `readonly` boolean field to FormField model
40
+ - Readonly fields are rendered with disabled styling and cannot be modified by users
41
+ - Migration `0009_add_formfield_readonly` adds the new field
42
+
43
+ ## [0.4.1] - 2025-11-11
44
+
45
+ ### Added
46
+ - **Configurable LDAP TLS Certificate Verification**
47
+ - Added `configure_ldap_connection()` helper function in `ldap_backend.py`
48
+ - Support for `LDAP_TLS_REQUIRE_CERT` environment variable with options: `never`, `allow`, `try`, `demand` (default)
49
+ - Updated all LDAP connection initialization points to use configurable TLS settings
50
+ - Added `_configure_ldap_connection()` helper in `ldap_handler.py` with fallback implementation
51
+
52
+ ### Changed
53
+ - **LDAP Backend Improvements**
54
+ - All LDAP connections now respect the `LDAP_TLS_REQUIRE_CERT` environment variable
55
+ - Updated `get_user_manager()`, `search_ldap_users()`, and `get_ldap_user_attributes()` functions
56
+ - Updated `LDAPUpdateHandler` to use configurable TLS settings
57
+
58
+ ### Documentation
59
+ - Added `LDAP_TLS_CONFIGURATION.md` with comprehensive documentation on TLS configuration options
60
+ - Documented security considerations for different TLS verification levels
61
+ - Added deployment instructions for Kubernetes environments
62
+
63
+ ## [0.4.0] - 2025-11-06
64
+
65
+ ### Added - SJCME Migration Support
66
+ - **Enhanced UserProfile Model**
67
+ - Added `ldap_last_sync` timestamp field for tracking LDAP synchronization
68
+ - Added database indexes to `employee_id` and `external_id` fields for better performance
69
+ - Added `id_number` property as backward-compatible alias for `employee_id`
70
+ - Added `full_name` and `display_name` properties for convenient user display
71
+ - Enhanced help text for LDAP attribute fields
72
+
73
+ - **LDAP Integration Enhancements**
74
+ - New `signals.py` module with automatic LDAP attribute synchronization
75
+ - `sync_ldap_attributes()` function for syncing LDAP data to UserProfile
76
+ - `get_ldap_attribute()` helper function for retrieving LDAP attributes
77
+ - Auto-sync on user login (configurable via `FORMS_WORKFLOWS['LDAP_SYNC']`)
78
+ - Signal handlers for automatic UserProfile creation on user creation
79
+ - Configurable LDAP attribute mappings in settings
80
+
81
+ - **Database Introspection Utilities**
82
+ - `DatabaseDataSource.test_connection()` - Test external database connections
83
+ - `DatabaseDataSource.get_available_tables()` - List tables in a schema
84
+ - `DatabaseDataSource.get_table_columns()` - Get column information for a table
85
+ - Support for SQL Server, PostgreSQL, MySQL, and SQLite introspection
86
+
87
+ - **Utility Functions**
88
+ - `get_user_manager()` - Get user's manager from LDAP or UserProfile
89
+ - `user_can_view_form()` - Check if user can view a form
90
+ - `user_can_view_submission()` - Check if user can view a submission
91
+ - `check_escalation_needed()` - Check if submission needs escalation
92
+ - `sync_ldap_groups()` - Synchronize LDAP groups to Django groups
93
+
94
+ - **Management Commands**
95
+ - `sync_ldap_profiles` - Bulk sync LDAP attributes for all users
96
+ - Supports `--username` for single user sync
97
+ - Supports `--dry-run` for testing without changes
98
+ - Supports `--verbose` for detailed output
99
+ - `test_db_connection` - Test external database connections
100
+ - Supports `--database` to specify database alias
101
+ - Supports `--verbose` for detailed connection information
102
+ - Works with SQL Server, PostgreSQL, MySQL, and SQLite
103
+
104
+ - **Documentation**
105
+ - `PORTING_ANALYSIS.md` - Detailed analysis of SJCME to package migration
106
+ - `FEATURE_COMPARISON.md` - Comprehensive feature comparison matrix
107
+ - `SJCME_SIMPLIFICATION_PLAN.md` - Code reduction and migration strategy
108
+ - `EXECUTIVE_SUMMARY.md` - High-level overview for stakeholders
109
+ - `NEXT_STEPS.md` - Actionable implementation guide
110
+
111
+ ### Changed
112
+ - Updated version to 0.4.0 to reflect significant new features
113
+ - Enhanced UserProfile model with LDAP-specific fields and properties
114
+ - Improved database source with introspection capabilities
115
+ - Expanded utility functions for better LDAP and permission handling
116
+
117
+ ### Migration Notes
118
+ - Run `python manage.py migrate django_forms_workflows` to apply UserProfile enhancements
119
+ - Configure LDAP sync in settings:
120
+ ```python
121
+ FORMS_WORKFLOWS = {
122
+ 'LDAP_SYNC': {
123
+ 'enabled': True,
124
+ 'sync_on_login': True,
125
+ 'attributes': {
126
+ 'employee_id': 'extensionAttribute1',
127
+ 'department': 'department',
128
+ 'title': 'title',
129
+ 'phone': 'telephoneNumber',
130
+ 'manager_dn': 'manager',
131
+ }
132
+ }
133
+ }
134
+ ```
135
+ - Use `python manage.py sync_ldap_profiles` to bulk sync existing users
136
+
137
+ ## [0.2.2] - 2025-10-31
138
+
139
+ ### Changed
140
+ - **Code Quality Improvements**
141
+ - Migrated from Black to Ruff for code formatting and linting
142
+ - Fixed all import ordering and type annotation issues
143
+ - Added comprehensive ruff.toml configuration
144
+ - Updated CI workflow to use Ruff instead of Black/isort/flake8
145
+ - Improved LDAP availability checks using importlib.util.find_spec
146
+
147
+ ### Fixed
148
+ - Removed all references to "Campus Cafe" from codebase and documentation
149
+ - Updated example database references to use generic "hr_database" naming
150
+ - Cleaned up unused imports in LDAP handlers
151
+
152
+ ## [0.2.1] - 2025-10-31
153
+
154
+ ### Fixed
155
+ - Corrected author email in package metadata from `opensource@opensensor.ai` to `matt@opensensor.io`
156
+
157
+ ## [0.2.0] - 2025-10-31
158
+
159
+ ### Added - Configurable Prefill Sources
160
+ - **PrefillSource Model** - Database-driven prefill source configuration
161
+ - Support for User, LDAP, Database, API, System, and Custom source types
162
+ - Flexible database field mapping with configurable lookup fields
163
+ - Custom user field mapping (employee_id, email, external_id, etc.)
164
+ - Active/inactive toggle and display ordering
165
+ - Backward compatible with legacy text-based prefill_source field
166
+ - **Enhanced Database Prefill** - Generic database lookups with custom field mappings
167
+ - Configurable DB lookup field (ID_NUMBER, EMAIL, EMPLOYEE_ID, etc.)
168
+ - Configurable user profile field for matching
169
+ - Makes library truly generic and adaptable to different deployments
170
+ - **Admin Interface** - Comprehensive admin for managing prefill sources
171
+ - Dropdown selection of prefill sources in FormField admin
172
+ - Inline editing and filtering
173
+ - Helpful descriptions and examples
174
+ - **Demo Integration** - Farm-themed demo showcasing prefill functionality
175
+ - "Farmer Contact Update" form with multiple prefill sources
176
+ - Seed command for creating demo prefill sources
177
+ - Examples of User, System, and Database prefill types
178
+
179
+ ### Added - Post-Submission Actions
180
+ - **PostSubmissionAction Model** - Configurable actions to update external systems
181
+ - Support for Database, LDAP, API, and Custom handler action types
182
+ - Four trigger types: on_submit, on_approve, on_reject, on_complete
183
+ - Flexible field mapping for all action types
184
+ - Conditional execution based on form field values
185
+ - Robust error handling with retries and fail-silently options
186
+ - Execution ordering for dependent actions
187
+ - **Database Update Handler** - Update external databases after form submission/approval
188
+ - Custom field mappings from form fields to database columns
189
+ - Configurable lookup fields and user fields
190
+ - SQL injection protection with parameterized queries
191
+ - Identifier validation for table and column names
192
+ - **LDAP Update Handler** - Update Active Directory attributes
193
+ - DN template support with placeholders
194
+ - Field mapping from form fields to LDAP attributes
195
+ - Service account integration
196
+ - **API Call Handler** - Make HTTP API calls to external services
197
+ - Support for GET, POST, PUT, PATCH methods
198
+ - Template-based request bodies with field placeholders
199
+ - Custom headers support
200
+ - Response validation
201
+ - **Custom Handler Support** - Execute custom Python code for complex integrations
202
+ - Dynamic handler loading via import_module
203
+ - Configurable handler parameters
204
+ - Standardized return format
205
+ - **Action Executor** - Coordinates execution of multiple actions
206
+ - Filters actions by trigger type
207
+ - Implements retry logic with configurable max attempts
208
+ - Comprehensive error handling and logging
209
+ - Conditional execution based on form field values
210
+ - **Workflow Integration** - Integrated with all workflow trigger points
211
+ - on_submit trigger in create_workflow_tasks()
212
+ - on_approve trigger in execute_post_approval_updates()
213
+ - on_reject trigger in approve_submission view
214
+ - on_complete trigger in _finalize_submission()
215
+ - **Admin Interface** - Comprehensive admin for managing post-submission actions
216
+ - Collapsible fieldsets for each action type
217
+ - List view with filtering and inline editing
218
+ - Helpful descriptions and examples
219
+ - **Demo Integration** - Farm demo showcasing post-submission actions
220
+ - API call action logging to httpbin.org
221
+ - Database update action example
222
+ - Both disabled by default for safety
223
+
224
+ ### Enhanced
225
+ - **Documentation** - Comprehensive guides for new features
226
+ - `docs/PREFILL_SOURCES.md` - Complete prefill configuration guide
227
+ - `docs/POST_SUBMISSION_ACTIONS.md` - Complete post-submission actions guide
228
+ - `PREFILL_ENHANCEMENTS.md` - Technical summary of prefill enhancements
229
+ - `POST_SUBMISSION_ENHANCEMENTS.md` - Technical summary of post-submission enhancements
230
+ - Updated README.md with new features
231
+ - **Farm Demo** - Enhanced example application
232
+ - Showcases both prefill and post-submission actions
233
+ - Multiple demo forms with different workflow types
234
+ - Seed commands for easy setup
235
+ - Farm-themed design for better UX
236
+
237
+ ### Security
238
+ - **SQL Injection Protection** - Enhanced database security
239
+ - Parameterized queries for all database operations
240
+ - Identifier validation for table and column names
241
+ - Whitelist-based validation
242
+ - **LDAP Security** - Secure LDAP integration
243
+ - DN template validation
244
+ - Service account permissions
245
+ - Connection encryption support
246
+ - **API Security** - Secure external API calls
247
+ - HTTPS enforcement
248
+ - API key management
249
+ - Request timeout protection
250
+ - Response validation
251
+
252
+ ### Migration Notes
253
+ - Run `python manage.py migrate` to apply new migrations
254
+ - Existing forms with text-based `prefill_source` continue to work
255
+ - New `prefill_source_config` field takes precedence when set
256
+ - Post-submission actions are opt-in and disabled by default
257
+ - No breaking changes to existing deployments
258
+
259
+ ## [0.1.0] - 2025-10-31
260
+
261
+ ### Added
262
+ - Initial release
263
+ - Database-driven form definitions
264
+ - 15+ field types (text, select, date, file upload, etc.)
265
+ - Dynamic form rendering with Crispy Forms
266
+ - Approval workflows with flexible routing
267
+ - LDAP/Active Directory integration
268
+ - External database prefill support
269
+ - Pluggable data source architecture
270
+ - Complete audit trail
271
+ - Email notifications
272
+ - File upload support
273
+ - Conditional field visibility
274
+ - Form versioning
275
+ - Draft save functionality
276
+ - Withdrawal support
277
+ - Group-based permissions
278
+ - Manager approval from LDAP hierarchy
279
+ - Conditional escalation
280
+ - Post-approval database updates
281
+ - Comprehensive documentation
282
+ - Example project
283
+
284
+ ### Security
285
+ - CSRF protection
286
+ - SQL injection prevention
287
+ - File upload validation
288
+ - Parameterized database queries
289
+ - Identifier validation for SQL
290
+
291
+ ### Dependencies
292
+ - Django >= 5.1
293
+ - django-crispy-forms >= 2.0
294
+ - crispy-bootstrap5 >= 2.0
295
+ - celery >= 5.3
296
+ - python-decouple >= 3.8
297
+
298
+ ### Optional Dependencies
299
+ - django-auth-ldap >= 4.6 (for LDAP integration)
300
+ - python-ldap >= 3.4 (for LDAP integration)
301
+ - mssql-django >= 1.6 (for MS SQL Server)
302
+ - pyodbc >= 5.0 (for MS SQL Server)
303
+ - psycopg2-binary >= 2.9 (for PostgreSQL)
304
+ - mysqlclient >= 2.2 (for MySQL)
305
+
306
+ [Unreleased]: https://github.com/opensensor/django-forms-workflows/compare/v0.2.2...HEAD
307
+ [0.2.2]: https://github.com/opensensor/django-forms-workflows/compare/v0.2.1...v0.2.2
308
+ [0.2.1]: https://github.com/opensensor/django-forms-workflows/compare/v0.2.0...v0.2.1
309
+ [0.2.0]: https://github.com/opensensor/django-forms-workflows/compare/v0.1.0...v0.2.0
310
+ [0.1.0]: https://github.com/opensensor/django-forms-workflows/releases/tag/v0.1.0
311
+
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.