├── .gitattributes
├── .github
├── FUNDING.yml
└── workflows
│ └── build-deploy.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── COPYING
├── Dockerfile
├── README.md
├── docker-compose.yml
├── docs-android
├── .gitignore
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── libs
│ │ └── tokenautocomplete-1.2.1.jar
│ ├── proguard-rules.txt
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── sismics
│ │ │ └── docs
│ │ │ ├── MainApplication.java
│ │ │ ├── activity
│ │ │ ├── AuditLogActivity.java
│ │ │ ├── DocumentEditActivity.java
│ │ │ ├── DocumentViewActivity.java
│ │ │ ├── GroupProfileActivity.java
│ │ │ ├── LoginActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── SettingsActivity.java
│ │ │ └── UserProfileActivity.java
│ │ │ ├── adapter
│ │ │ ├── AclListAdapter.java
│ │ │ ├── AuditLogListAdapter.java
│ │ │ ├── CommentListAdapter.java
│ │ │ ├── DocListAdapter.java
│ │ │ ├── FilePagerAdapter.java
│ │ │ ├── LanguageAdapter.java
│ │ │ ├── ShareListAdapter.java
│ │ │ ├── TagAutoCompleteAdapter.java
│ │ │ └── TagListAdapter.java
│ │ │ ├── event
│ │ │ ├── AdvancedSearchEvent.java
│ │ │ ├── CommentAddEvent.java
│ │ │ ├── CommentDeleteEvent.java
│ │ │ ├── DocumentAddEvent.java
│ │ │ ├── DocumentDeleteEvent.java
│ │ │ ├── DocumentEditEvent.java
│ │ │ ├── DocumentFullscreenEvent.java
│ │ │ ├── FileAddEvent.java
│ │ │ ├── FileDeleteEvent.java
│ │ │ ├── SearchEvent.java
│ │ │ ├── ShareDeleteEvent.java
│ │ │ └── ShareSendEvent.java
│ │ │ ├── fragment
│ │ │ ├── DocExportPdfFragment.java
│ │ │ ├── DocListFragment.java
│ │ │ ├── DocShareFragment.java
│ │ │ ├── SearchFragment.java
│ │ │ └── SettingsFragment.java
│ │ │ ├── listener
│ │ │ ├── CallbackListener.java
│ │ │ ├── HttpCallback.java
│ │ │ └── RecyclerItemClickListener.java
│ │ │ ├── model
│ │ │ └── application
│ │ │ │ └── ApplicationContext.java
│ │ │ ├── provider
│ │ │ └── RecentSuggestionsProvider.java
│ │ │ ├── resource
│ │ │ ├── AuditLogResource.java
│ │ │ ├── BaseResource.java
│ │ │ ├── CommentResource.java
│ │ │ ├── DocumentResource.java
│ │ │ ├── FileResource.java
│ │ │ ├── ShareResource.java
│ │ │ ├── TagResource.java
│ │ │ ├── UserResource.java
│ │ │ └── cookie
│ │ │ │ ├── PersistentCookieStore.java
│ │ │ │ └── SerializableHttpCookie.java
│ │ │ ├── service
│ │ │ └── FileUploadService.java
│ │ │ ├── ui
│ │ │ ├── ScrollingFABBehavior.java
│ │ │ ├── form
│ │ │ │ ├── Validable.java
│ │ │ │ ├── Validator.java
│ │ │ │ └── validator
│ │ │ │ │ ├── Alphanumeric.java
│ │ │ │ │ ├── Email.java
│ │ │ │ │ ├── Length.java
│ │ │ │ │ ├── Required.java
│ │ │ │ │ └── ValidatorType.java
│ │ │ └── view
│ │ │ │ ├── DatePickerView.java
│ │ │ │ ├── DividerItemDecoration.java
│ │ │ │ ├── EmptyRecyclerView.java
│ │ │ │ ├── FileViewPager.java
│ │ │ │ ├── NonScrollListView.java
│ │ │ │ └── TagsCompleteTextView.java
│ │ │ └── util
│ │ │ ├── ApplicationUtil.java
│ │ │ ├── DialogUtil.java
│ │ │ ├── NetworkUtil.java
│ │ │ ├── OkHttpUtil.java
│ │ │ ├── PreferenceUtil.java
│ │ │ ├── SearchQueryBuilder.java
│ │ │ └── SpannableUtil.java
│ │ └── res
│ │ ├── drawable-xhdpi
│ │ ├── deu.png
│ │ ├── eng.png
│ │ ├── fra.png
│ │ ├── ic_add_white_24dp.png
│ │ ├── ic_assignment_grey600_24dp.png
│ │ ├── ic_assignment_grey600_48dp.png
│ │ ├── ic_comment_grey600_24dp.png
│ │ ├── ic_create_grey600_24dp.png
│ │ ├── ic_delete_grey600_24dp.png
│ │ ├── ic_description_grey600_24dp.png
│ │ ├── ic_done_white_24dp.png
│ │ ├── ic_file_download_grey600_24dp.png
│ │ ├── ic_file_upload_grey600_24dp.png
│ │ ├── ic_file_upload_white_24dp.png
│ │ ├── ic_folder_open_grey600_48dp.png
│ │ ├── ic_folder_shared_grey600_24dp.png
│ │ ├── ic_info_white_24dp.png
│ │ ├── ic_label_white_24dp.png
│ │ ├── ic_link_grey600_24dp.png
│ │ ├── ic_people_grey600_24dp.png
│ │ ├── ic_send_grey600_24dp.png
│ │ ├── ic_share_grey600_24dp.png
│ │ ├── ic_work_grey600_24dp.png
│ │ └── pol.png
│ │ ├── drawable-xxhdpi
│ │ ├── deu.png
│ │ ├── eng.png
│ │ ├── fra.png
│ │ ├── ic_add_white_24dp.png
│ │ ├── ic_assignment_grey600_24dp.png
│ │ ├── ic_assignment_grey600_48dp.png
│ │ ├── ic_comment_grey600_24dp.png
│ │ ├── ic_create_grey600_24dp.png
│ │ ├── ic_delete_grey600_24dp.png
│ │ ├── ic_description_grey600_24dp.png
│ │ ├── ic_done_white_24dp.png
│ │ ├── ic_file_download_grey600_24dp.png
│ │ ├── ic_file_upload_grey600_24dp.png
│ │ ├── ic_file_upload_white_24dp.png
│ │ ├── ic_folder_open_grey600_48dp.png
│ │ ├── ic_folder_shared_grey600_24dp.png
│ │ ├── ic_info_white_24dp.png
│ │ ├── ic_label_white_24dp.png
│ │ ├── ic_link_grey600_24dp.png
│ │ ├── ic_people_grey600_24dp.png
│ │ ├── ic_send_grey600_24dp.png
│ │ ├── ic_share_grey600_24dp.png
│ │ └── ic_work_grey600_24dp.png
│ │ ├── drawable
│ │ └── tag_autocomplete_token_bg.xml
│ │ ├── layout
│ │ ├── acl_list_item.xml
│ │ ├── auditlog_activity.xml
│ │ ├── auditlog_list_item.xml
│ │ ├── comment_list_item.xml
│ │ ├── doc_list_fragment.xml
│ │ ├── doc_list_item.xml
│ │ ├── document_edit_activity.xml
│ │ ├── document_export_pdf_dialog.xml
│ │ ├── document_share_dialog.xml
│ │ ├── document_view_activity.xml
│ │ ├── file_viewpager_item.xml
│ │ ├── groupprofile_activity.xml
│ │ ├── language_list_item.xml
│ │ ├── login_activity.xml
│ │ ├── main_activity.xml
│ │ ├── search_dialog.xml
│ │ ├── share_list_item.xml
│ │ ├── tag_autocomplete_item.xml
│ │ ├── tag_autocomplete_token.xml
│ │ ├── tag_list_item.xml
│ │ └── userprofile_activity.xml
│ │ ├── menu
│ │ ├── document_edit_activity.xml
│ │ ├── document_view_activity.xml
│ │ └── main_activity.xml
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-de
│ │ └── strings.xml
│ │ ├── values-fr
│ │ └── strings.xml
│ │ ├── values-pl
│ │ └── strings.xml
│ │ ├── values
│ │ ├── arrays.xml
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ ├── preferences.xml
│ │ └── searchable.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── docs-core
├── pom.xml
└── src
│ ├── dev
│ └── resources
│ │ └── db
│ │ └── update
│ │ └── dbupdate-000-1.sql
│ ├── main
│ ├── java
│ │ ├── com
│ │ │ └── sismics
│ │ │ │ ├── docs
│ │ │ │ └── core
│ │ │ │ │ ├── constant
│ │ │ │ │ ├── AclTargetType.java
│ │ │ │ │ ├── AclType.java
│ │ │ │ │ ├── ActionType.java
│ │ │ │ │ ├── AuditLogType.java
│ │ │ │ │ ├── ConfigType.java
│ │ │ │ │ ├── Constants.java
│ │ │ │ │ ├── MetadataType.java
│ │ │ │ │ ├── PermType.java
│ │ │ │ │ ├── RouteStepTransition.java
│ │ │ │ │ ├── RouteStepType.java
│ │ │ │ │ └── WebhookEvent.java
│ │ │ │ │ ├── dao
│ │ │ │ │ ├── AclDao.java
│ │ │ │ │ ├── AuditLogDao.java
│ │ │ │ │ ├── AuthenticationTokenDao.java
│ │ │ │ │ ├── CommentDao.java
│ │ │ │ │ ├── ConfigDao.java
│ │ │ │ │ ├── ContributorDao.java
│ │ │ │ │ ├── DocumentDao.java
│ │ │ │ │ ├── DocumentMetadataDao.java
│ │ │ │ │ ├── FileDao.java
│ │ │ │ │ ├── GroupDao.java
│ │ │ │ │ ├── MetadataDao.java
│ │ │ │ │ ├── PasswordRecoveryDao.java
│ │ │ │ │ ├── RelationDao.java
│ │ │ │ │ ├── RoleBaseFunctionDao.java
│ │ │ │ │ ├── RouteDao.java
│ │ │ │ │ ├── RouteModelDao.java
│ │ │ │ │ ├── RouteStepDao.java
│ │ │ │ │ ├── ShareDao.java
│ │ │ │ │ ├── TagDao.java
│ │ │ │ │ ├── UserDao.java
│ │ │ │ │ ├── VocabularyDao.java
│ │ │ │ │ ├── WebhookDao.java
│ │ │ │ │ ├── criteria
│ │ │ │ │ │ ├── AuditLogCriteria.java
│ │ │ │ │ │ ├── DocumentCriteria.java
│ │ │ │ │ │ ├── GroupCriteria.java
│ │ │ │ │ │ ├── MetadataCriteria.java
│ │ │ │ │ │ ├── RouteCriteria.java
│ │ │ │ │ │ ├── RouteModelCriteria.java
│ │ │ │ │ │ ├── RouteStepCriteria.java
│ │ │ │ │ │ ├── TagCriteria.java
│ │ │ │ │ │ ├── UserCriteria.java
│ │ │ │ │ │ └── WebhookCriteria.java
│ │ │ │ │ └── dto
│ │ │ │ │ │ ├── AclDto.java
│ │ │ │ │ │ ├── AuditLogDto.java
│ │ │ │ │ │ ├── CommentDto.java
│ │ │ │ │ │ ├── ContributorDto.java
│ │ │ │ │ │ ├── DocumentDto.java
│ │ │ │ │ │ ├── DocumentMetadataDto.java
│ │ │ │ │ │ ├── GroupDto.java
│ │ │ │ │ │ ├── MetadataDto.java
│ │ │ │ │ │ ├── RelationDto.java
│ │ │ │ │ │ ├── RouteDto.java
│ │ │ │ │ │ ├── RouteModelDto.java
│ │ │ │ │ │ ├── RouteStepDto.java
│ │ │ │ │ │ ├── TagDto.java
│ │ │ │ │ │ ├── UserDto.java
│ │ │ │ │ │ └── WebhookDto.java
│ │ │ │ │ ├── event
│ │ │ │ │ ├── AclCreatedAsyncEvent.java
│ │ │ │ │ ├── AclDeletedAsyncEvent.java
│ │ │ │ │ ├── AclEvent.java
│ │ │ │ │ ├── DocumentCreatedAsyncEvent.java
│ │ │ │ │ ├── DocumentDeletedAsyncEvent.java
│ │ │ │ │ ├── DocumentUpdatedAsyncEvent.java
│ │ │ │ │ ├── FileCreatedAsyncEvent.java
│ │ │ │ │ ├── FileDeletedAsyncEvent.java
│ │ │ │ │ ├── FileEvent.java
│ │ │ │ │ ├── FileUpdatedAsyncEvent.java
│ │ │ │ │ ├── PasswordLostEvent.java
│ │ │ │ │ ├── RebuildIndexAsyncEvent.java
│ │ │ │ │ ├── RouteStepValidateEvent.java
│ │ │ │ │ └── UserEvent.java
│ │ │ │ │ ├── listener
│ │ │ │ │ └── async
│ │ │ │ │ │ ├── AclCreatedAsyncListener.java
│ │ │ │ │ │ ├── AclDeletedAsyncListener.java
│ │ │ │ │ │ ├── DocumentCreatedAsyncListener.java
│ │ │ │ │ │ ├── DocumentDeletedAsyncListener.java
│ │ │ │ │ │ ├── DocumentUpdatedAsyncListener.java
│ │ │ │ │ │ ├── FileDeletedAsyncListener.java
│ │ │ │ │ │ ├── FileProcessingAsyncListener.java
│ │ │ │ │ │ ├── PasswordLostAsyncListener.java
│ │ │ │ │ │ ├── RebuildIndexAsyncListener.java
│ │ │ │ │ │ ├── RouteStepValidateAsyncListener.java
│ │ │ │ │ │ └── WebhookAsyncListener.java
│ │ │ │ │ ├── model
│ │ │ │ │ ├── context
│ │ │ │ │ │ └── AppContext.java
│ │ │ │ │ └── jpa
│ │ │ │ │ │ ├── Acl.java
│ │ │ │ │ │ ├── AuditLog.java
│ │ │ │ │ │ ├── AuthenticationToken.java
│ │ │ │ │ │ ├── BaseFunction.java
│ │ │ │ │ │ ├── Comment.java
│ │ │ │ │ │ ├── Config.java
│ │ │ │ │ │ ├── Contributor.java
│ │ │ │ │ │ ├── Document.java
│ │ │ │ │ │ ├── DocumentMetadata.java
│ │ │ │ │ │ ├── DocumentTag.java
│ │ │ │ │ │ ├── File.java
│ │ │ │ │ │ ├── Group.java
│ │ │ │ │ │ ├── Loggable.java
│ │ │ │ │ │ ├── Metadata.java
│ │ │ │ │ │ ├── PasswordRecovery.java
│ │ │ │ │ │ ├── Relation.java
│ │ │ │ │ │ ├── Role.java
│ │ │ │ │ │ ├── RoleBaseFunction.java
│ │ │ │ │ │ ├── Route.java
│ │ │ │ │ │ ├── RouteModel.java
│ │ │ │ │ │ ├── RouteStep.java
│ │ │ │ │ │ ├── Share.java
│ │ │ │ │ │ ├── Tag.java
│ │ │ │ │ │ ├── User.java
│ │ │ │ │ │ ├── UserGroup.java
│ │ │ │ │ │ ├── Vocabulary.java
│ │ │ │ │ │ └── Webhook.java
│ │ │ │ │ ├── service
│ │ │ │ │ ├── FileService.java
│ │ │ │ │ ├── FileSizeService.java
│ │ │ │ │ └── InboxService.java
│ │ │ │ │ └── util
│ │ │ │ │ ├── ActionUtil.java
│ │ │ │ │ ├── AuditLogUtil.java
│ │ │ │ │ ├── ConfigUtil.java
│ │ │ │ │ ├── DirectoryUtil.java
│ │ │ │ │ ├── DocumentUtil.java
│ │ │ │ │ ├── EncryptionUtil.java
│ │ │ │ │ ├── FileUtil.java
│ │ │ │ │ ├── MetadataUtil.java
│ │ │ │ │ ├── PdfUtil.java
│ │ │ │ │ ├── RoutingUtil.java
│ │ │ │ │ ├── SecurityUtil.java
│ │ │ │ │ ├── TransactionUtil.java
│ │ │ │ │ ├── action
│ │ │ │ │ ├── Action.java
│ │ │ │ │ ├── AddTagAction.java
│ │ │ │ │ ├── ProcessFilesAction.java
│ │ │ │ │ ├── RemoveTagAction.java
│ │ │ │ │ └── TagAction.java
│ │ │ │ │ ├── authentication
│ │ │ │ │ ├── AuthenticationHandler.java
│ │ │ │ │ ├── AuthenticationUtil.java
│ │ │ │ │ ├── InternalAuthenticationHandler.java
│ │ │ │ │ └── LdapAuthenticationHandler.java
│ │ │ │ │ ├── format
│ │ │ │ │ ├── DocxFormatHandler.java
│ │ │ │ │ ├── FormatHandler.java
│ │ │ │ │ ├── FormatHandlerUtil.java
│ │ │ │ │ ├── ImageFormatHandler.java
│ │ │ │ │ ├── OdtFormatHandler.java
│ │ │ │ │ ├── PdfFormatHandler.java
│ │ │ │ │ ├── PptxFormatHandler.java
│ │ │ │ │ ├── TextPlainFormatHandler.java
│ │ │ │ │ └── VideoFormatHandler.java
│ │ │ │ │ ├── indexing
│ │ │ │ │ ├── IndexingHandler.java
│ │ │ │ │ └── LuceneIndexingHandler.java
│ │ │ │ │ ├── jpa
│ │ │ │ │ ├── PaginatedList.java
│ │ │ │ │ ├── PaginatedLists.java
│ │ │ │ │ ├── QueryParam.java
│ │ │ │ │ ├── QueryUtil.java
│ │ │ │ │ └── SortCriteria.java
│ │ │ │ │ └── pdf
│ │ │ │ │ └── PdfPage.java
│ │ │ │ └── util
│ │ │ │ ├── ClasspathScanner.java
│ │ │ │ ├── EmailUtil.java
│ │ │ │ ├── EnvironmentUtil.java
│ │ │ │ ├── HtmlToPlainText.java
│ │ │ │ ├── HttpUtil.java
│ │ │ │ ├── ImageDeskew.java
│ │ │ │ ├── ImageUtil.java
│ │ │ │ ├── JsonUtil.java
│ │ │ │ ├── LocaleUtil.java
│ │ │ │ ├── MessageUtil.java
│ │ │ │ ├── ResourceBundleModel.java
│ │ │ │ ├── ResourceUtil.java
│ │ │ │ ├── Scalr.java
│ │ │ │ ├── context
│ │ │ │ └── ThreadLocalContext.java
│ │ │ │ ├── css
│ │ │ │ ├── Rule.java
│ │ │ │ └── Selector.java
│ │ │ │ ├── io
│ │ │ │ └── InputStreamReaderThread.java
│ │ │ │ ├── jpa
│ │ │ │ ├── DbOpenHelper.java
│ │ │ │ ├── DialectUtil.java
│ │ │ │ └── EMF.java
│ │ │ │ ├── log4j
│ │ │ │ ├── LogCriteria.java
│ │ │ │ ├── LogEntry.java
│ │ │ │ └── MemoryAppender.java
│ │ │ │ ├── mime
│ │ │ │ ├── MimeType.java
│ │ │ │ └── MimeTypeUtil.java
│ │ │ │ └── totp
│ │ │ │ ├── GoogleAuthenticator.java
│ │ │ │ ├── GoogleAuthenticatorConfig.java
│ │ │ │ ├── GoogleAuthenticatorException.java
│ │ │ │ ├── GoogleAuthenticatorKey.java
│ │ │ │ ├── KeyRepresentation.java
│ │ │ │ └── ReseedingSecureRandom.java
│ │ └── org
│ │ │ └── apache
│ │ │ └── pdfbox
│ │ │ └── pdmodel
│ │ │ └── font
│ │ │ └── DocsPDType1Font.java
│ └── resources
│ │ ├── META-INF
│ │ └── persistence.xml
│ │ ├── config.properties
│ │ ├── db
│ │ └── update
│ │ │ ├── dbupdate-000-0.sql
│ │ │ ├── dbupdate-001-0.sql
│ │ │ ├── dbupdate-002-0.sql
│ │ │ ├── dbupdate-003-0.sql
│ │ │ ├── dbupdate-004-0.sql
│ │ │ ├── dbupdate-005-0.sql
│ │ │ ├── dbupdate-006-0.sql
│ │ │ ├── dbupdate-007-0.sql
│ │ │ ├── dbupdate-008-0.sql
│ │ │ ├── dbupdate-009-0.sql
│ │ │ ├── dbupdate-010-0.sql
│ │ │ ├── dbupdate-011-0.sql
│ │ │ ├── dbupdate-012-0.sql
│ │ │ ├── dbupdate-013-0.sql
│ │ │ ├── dbupdate-014-0.sql
│ │ │ ├── dbupdate-015-0.sql
│ │ │ ├── dbupdate-016-0.sql
│ │ │ ├── dbupdate-017-0.sql
│ │ │ ├── dbupdate-018-0.sql
│ │ │ ├── dbupdate-019-0.sql
│ │ │ ├── dbupdate-020-0.sql
│ │ │ ├── dbupdate-021-0.sql
│ │ │ ├── dbupdate-022-0.sql
│ │ │ ├── dbupdate-023-0.sql
│ │ │ ├── dbupdate-024-0.sql
│ │ │ ├── dbupdate-025-0.sql
│ │ │ ├── dbupdate-026-0.sql
│ │ │ ├── dbupdate-027-0.sql
│ │ │ ├── dbupdate-028-0.sql
│ │ │ ├── dbupdate-029-0.sql
│ │ │ ├── dbupdate-030-0.sql
│ │ │ └── dbupdate-031-0.sql
│ │ ├── email_template
│ │ ├── layout.ftl
│ │ ├── password_recovery
│ │ │ └── template.ftl
│ │ └── route_step_validate
│ │ │ └── template.ftl
│ │ ├── fonts
│ │ └── LiberationMono-Regular.ttf
│ │ ├── messages.properties
│ │ ├── messages_de.properties
│ │ ├── messages_fr.properties
│ │ ├── messages_pl.properties
│ │ ├── messages_ru.properties
│ │ ├── messages_zh_CN.properties
│ │ └── messages_zh_TW.properties
│ └── test
│ ├── java
│ └── com
│ │ └── sismics
│ │ ├── BaseTest.java
│ │ ├── docs
│ │ ├── BaseTransactionalTest.java
│ │ └── core
│ │ │ ├── dao
│ │ │ └── jpa
│ │ │ │ └── TestJpa.java
│ │ │ ├── listener
│ │ │ └── async
│ │ │ │ └── FileDeletedAsyncListenerTest.java
│ │ │ ├── service
│ │ │ └── TestFileSizeService.java
│ │ │ └── util
│ │ │ ├── TestEncryptUtil.java
│ │ │ └── TestFileUtil.java
│ │ └── util
│ │ ├── TestCss.java
│ │ ├── TestGoogleAuthenticator.java
│ │ ├── TestImageUtil.java
│ │ ├── TestMimeTypeUtil.java
│ │ ├── TestResourceUtil.java
│ │ └── format
│ │ └── TestPdfFormatHandler.java
│ └── resources
│ ├── file
│ ├── apache.pptx
│ ├── apollo_landscape.jpg
│ ├── apollo_portrait.jpg
│ ├── document.csv
│ ├── document.docx
│ ├── document.odt
│ ├── document.txt
│ ├── document.xlsx
│ ├── document.zip
│ ├── image.gif
│ ├── image.png
│ ├── issue373.pdf
│ ├── scanned.pdf
│ ├── udhr.pdf
│ ├── udhr_encrypted.pdf
│ ├── video.mp4
│ └── video.webm
│ ├── hibernate.properties
│ └── log4j.properties
├── docs-importer
├── Dockerfile
├── README.md
├── SismicsDocs.ico
├── env.sh
├── main.js
├── package-lock.json
├── package.json
└── pref
├── docs-web-common
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── sismics
│ │ ├── rest
│ │ ├── exception
│ │ │ ├── ClientException.java
│ │ │ ├── ForbiddenClientException.java
│ │ │ └── ServerException.java
│ │ └── util
│ │ │ ├── AclUtil.java
│ │ │ ├── RestUtil.java
│ │ │ └── ValidationUtil.java
│ │ ├── security
│ │ ├── AnonymousPrincipal.java
│ │ ├── IPrincipal.java
│ │ └── UserPrincipal.java
│ │ └── util
│ │ ├── filter
│ │ ├── CorsFilter.java
│ │ ├── HeaderBasedSecurityFilter.java
│ │ ├── JwtBasedSecurityFilter.java
│ │ ├── RequestContextFilter.java
│ │ ├── SecurityFilter.java
│ │ └── TokenBasedSecurityFilter.java
│ │ └── listener
│ │ └── IIOProviderContextListener.java
│ └── test
│ └── java
│ └── com
│ └── sismics
│ └── docs
│ └── rest
│ ├── BaseJerseyTest.java
│ └── util
│ ├── ClientUtil.java
│ └── TestValidationUtil.java
├── docs-web
├── pom.xml
└── src
│ ├── dev
│ ├── main
│ │ └── webapp
│ │ │ └── web-override.xml
│ └── resources
│ │ ├── config.properties
│ │ ├── hibernate.properties
│ │ └── log4j.properties
│ ├── main
│ ├── java
│ │ └── com
│ │ │ └── sismics
│ │ │ └── docs
│ │ │ └── rest
│ │ │ ├── constant
│ │ │ └── BaseFunction.java
│ │ │ ├── resource
│ │ │ ├── AclResource.java
│ │ │ ├── AppResource.java
│ │ │ ├── AuditLogResource.java
│ │ │ ├── BaseResource.java
│ │ │ ├── CommentResource.java
│ │ │ ├── DocsMessageBodyWriter.java
│ │ │ ├── DocumentResource.java
│ │ │ ├── FileResource.java
│ │ │ ├── GroupResource.java
│ │ │ ├── MetadataResource.java
│ │ │ ├── RouteModelResource.java
│ │ │ ├── RouteResource.java
│ │ │ ├── ShareResource.java
│ │ │ ├── TagResource.java
│ │ │ ├── ThemeResource.java
│ │ │ ├── UserResource.java
│ │ │ ├── VocabularyResource.java
│ │ │ └── WebhookResource.java
│ │ │ └── util
│ │ │ ├── DocumentSearchCriteriaUtil.java
│ │ │ └── TagUtil.java
│ ├── resources
│ │ └── image
│ │ │ ├── background.jpg
│ │ │ ├── file-thumb.png
│ │ │ ├── file-web.png
│ │ │ └── logo.png
│ └── webapp
│ │ ├── .gitignore
│ │ ├── Gruntfile.js
│ │ ├── WEB-INF
│ │ └── web.xml
│ │ ├── header.md
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ └── src
│ │ ├── app
│ │ ├── docs
│ │ │ ├── app.js
│ │ │ ├── controller
│ │ │ │ ├── Footer.js
│ │ │ │ ├── Login.js
│ │ │ │ ├── Main.js
│ │ │ │ ├── ModalFeedback.js
│ │ │ │ ├── ModalImport.js
│ │ │ │ ├── ModalPasswordLost.js
│ │ │ │ ├── Navigation.js
│ │ │ │ ├── PasswordReset.js
│ │ │ │ ├── document
│ │ │ │ │ ├── Document.js
│ │ │ │ │ ├── DocumentDefault.js
│ │ │ │ │ ├── DocumentEdit.js
│ │ │ │ │ ├── DocumentModalAddTag.js
│ │ │ │ │ ├── DocumentModalPdf.js
│ │ │ │ │ ├── DocumentModalShare.js
│ │ │ │ │ ├── DocumentView.js
│ │ │ │ │ ├── DocumentViewActivity.js
│ │ │ │ │ ├── DocumentViewContent.js
│ │ │ │ │ ├── DocumentViewPermissions.js
│ │ │ │ │ ├── DocumentViewWorkflow.js
│ │ │ │ │ ├── FileModalView.js
│ │ │ │ │ ├── FileRename.js
│ │ │ │ │ ├── FileView.js
│ │ │ │ │ └── ModalFileVersions.js
│ │ │ │ ├── settings
│ │ │ │ │ ├── Settings.js
│ │ │ │ │ ├── SettingsAccount.js
│ │ │ │ │ ├── SettingsConfig.js
│ │ │ │ │ ├── SettingsDefault.js
│ │ │ │ │ ├── SettingsGroup.js
│ │ │ │ │ ├── SettingsGroupEdit.js
│ │ │ │ │ ├── SettingsInbox.js
│ │ │ │ │ ├── SettingsLdap.js
│ │ │ │ │ ├── SettingsMetadata.js
│ │ │ │ │ ├── SettingsMonitoring.js
│ │ │ │ │ ├── SettingsSecurity.js
│ │ │ │ │ ├── SettingsSecurityModalDisableTotp.js
│ │ │ │ │ ├── SettingsSession.js
│ │ │ │ │ ├── SettingsUser.js
│ │ │ │ │ ├── SettingsUserEdit.js
│ │ │ │ │ ├── SettingsVocabulary.js
│ │ │ │ │ ├── SettingsWorkflow.js
│ │ │ │ │ └── SettingsWorkflowEdit.js
│ │ │ │ ├── tag
│ │ │ │ │ ├── Tag.js
│ │ │ │ │ └── TagEdit.js
│ │ │ │ └── usergroup
│ │ │ │ │ ├── GroupProfile.js
│ │ │ │ │ ├── UserGroup.js
│ │ │ │ │ └── UserProfile.js
│ │ │ ├── directive
│ │ │ │ ├── Acl.js
│ │ │ │ ├── AclEdit.js
│ │ │ │ ├── AddSpaceBetween.js
│ │ │ │ ├── AuditLog.js
│ │ │ │ ├── ImgError.js
│ │ │ │ ├── InvertTextColor.js
│ │ │ │ ├── Pell.js
│ │ │ │ ├── SelectRelation.js
│ │ │ │ └── SelectTag.js
│ │ │ ├── filter
│ │ │ │ └── Filesize.js
│ │ │ └── service
│ │ │ │ └── User.js
│ │ └── share
│ │ │ ├── app.js
│ │ │ ├── controller
│ │ │ ├── FileModalView.js
│ │ │ ├── FileView.js
│ │ │ ├── Footer.js
│ │ │ ├── Main.js
│ │ │ ├── Share.js
│ │ │ └── ShareModalPdf.js
│ │ │ └── filter
│ │ │ └── Filesize.js
│ │ ├── fonts
│ │ ├── fa-brands-400.eot
│ │ ├── fa-brands-400.svg
│ │ ├── fa-brands-400.ttf
│ │ ├── fa-brands-400.woff
│ │ ├── fa-brands-400.woff2
│ │ ├── fa-regular-400.eot
│ │ ├── fa-regular-400.svg
│ │ ├── fa-regular-400.ttf
│ │ ├── fa-regular-400.woff
│ │ ├── fa-regular-400.woff2
│ │ ├── fa-solid-900.eot
│ │ ├── fa-solid-900.svg
│ │ ├── fa-solid-900.ttf
│ │ ├── fa-solid-900.woff
│ │ └── fa-solid-900.woff2
│ │ ├── img
│ │ ├── alpha.png
│ │ ├── glyphicons-halflings-white.png
│ │ ├── glyphicons-halflings.png
│ │ ├── hue.png
│ │ ├── icons
│ │ │ ├── icon-128x128.png
│ │ │ ├── icon-144x144.png
│ │ │ ├── icon-152x152.png
│ │ │ ├── icon-192x192.png
│ │ │ ├── icon-384x384.png
│ │ │ ├── icon-512x512.png
│ │ │ ├── icon-72x72.png
│ │ │ └── icon-96x96.png
│ │ ├── saturation.png
│ │ └── title.png
│ │ ├── index.html
│ │ ├── lib
│ │ ├── angular.colorpicker.js
│ │ ├── angular.file-upload.js
│ │ ├── angular.js
│ │ ├── angular.ng-onboarding.js
│ │ ├── angular.ngprogress.js
│ │ ├── angular.qrcode.js
│ │ ├── angular.restangular.js
│ │ ├── angular.sanitize.js
│ │ ├── angular.timeago.js
│ │ ├── angular.tmhDynamicLocale.js
│ │ ├── angular.touch.js
│ │ ├── angular.translate.js
│ │ ├── angular.ui-bootstrap.js
│ │ ├── angular.ui-router.js
│ │ ├── angular.ui-sortable.js
│ │ ├── angular.ui-validate.js
│ │ ├── colorpicker.js
│ │ ├── jquery.js
│ │ ├── jquery.ui.js
│ │ ├── less.js
│ │ ├── pell.js
│ │ └── underscore.js
│ │ ├── locale
│ │ ├── angular-locale_de.js
│ │ ├── angular-locale_el.js
│ │ ├── angular-locale_en.js
│ │ ├── angular-locale_es.js
│ │ ├── angular-locale_fr.js
│ │ ├── angular-locale_it.js
│ │ ├── angular-locale_pl.js
│ │ ├── angular-locale_pt.js
│ │ ├── angular-locale_ru.js
│ │ ├── angular-locale_sq_AL.js
│ │ ├── angular-locale_zh_CN.js
│ │ ├── angular-locale_zh_TW.js
│ │ ├── de.json
│ │ ├── el.json
│ │ ├── en.json
│ │ ├── es.json
│ │ ├── fr.json
│ │ ├── it.json
│ │ ├── pl.json
│ │ ├── pt.json
│ │ ├── ru.json
│ │ ├── sq_AL.json
│ │ ├── zh_CN.json
│ │ └── zh_TW.json
│ │ ├── manifest.json
│ │ ├── partial
│ │ ├── docs
│ │ │ ├── directive.acledit.html
│ │ │ ├── directive.auditlog.html
│ │ │ ├── directive.selectionrelation.typeahead.html
│ │ │ ├── directive.selectrelation.html
│ │ │ ├── directive.selecttag.html
│ │ │ ├── directive.typeahead.acl.html
│ │ │ ├── document.add.tag.html
│ │ │ ├── document.default.html
│ │ │ ├── document.edit.html
│ │ │ ├── document.html
│ │ │ ├── document.pdf.html
│ │ │ ├── document.share.html
│ │ │ ├── document.view.activity.html
│ │ │ ├── document.view.content.html
│ │ │ ├── document.view.html
│ │ │ ├── document.view.permissions.html
│ │ │ ├── document.view.workflow.html
│ │ │ ├── feedback.html
│ │ │ ├── file.rename.html
│ │ │ ├── file.versions.html
│ │ │ ├── file.view.html
│ │ │ ├── group.profile.html
│ │ │ ├── import.html
│ │ │ ├── login.html
│ │ │ ├── main.html
│ │ │ ├── passwordlost.html
│ │ │ ├── passwordreset.html
│ │ │ ├── settings.account.html
│ │ │ ├── settings.config.html
│ │ │ ├── settings.default.html
│ │ │ ├── settings.fileimporter.html
│ │ │ ├── settings.group.edit.html
│ │ │ ├── settings.group.html
│ │ │ ├── settings.html
│ │ │ ├── settings.inbox.html
│ │ │ ├── settings.ldap.html
│ │ │ ├── settings.metadata.html
│ │ │ ├── settings.monitoring.html
│ │ │ ├── settings.security.disabletotp.html
│ │ │ ├── settings.security.html
│ │ │ ├── settings.session.html
│ │ │ ├── settings.user.edit.html
│ │ │ ├── settings.user.html
│ │ │ ├── settings.vocabulary.html
│ │ │ ├── settings.workflow.edit.html
│ │ │ ├── settings.workflow.html
│ │ │ ├── tag.default.html
│ │ │ ├── tag.edit.html
│ │ │ ├── tag.html
│ │ │ ├── user.profile.html
│ │ │ ├── usergroup.default.html
│ │ │ └── usergroup.html
│ │ └── share
│ │ │ ├── 403.html
│ │ │ ├── file.view.html
│ │ │ ├── main.html
│ │ │ ├── share.html
│ │ │ └── share.pdf.html
│ │ ├── share.html
│ │ └── style
│ │ ├── bootstrap.css
│ │ ├── colorpicker.css
│ │ ├── fontawesome.css
│ │ ├── main.less
│ │ ├── ng-onboarding.css
│ │ └── pell.css
│ ├── prod
│ └── resources
│ │ ├── config.properties
│ │ └── log4j.properties
│ └── test
│ ├── java
│ └── com
│ │ └── sismics
│ │ └── docs
│ │ └── rest
│ │ ├── BaseTransactionalTest.java
│ │ ├── TestAclResource.java
│ │ ├── TestAppResource.java
│ │ ├── TestAuditLogResource.java
│ │ ├── TestCommentResource.java
│ │ ├── TestDocumentResource.java
│ │ ├── TestFileResource.java
│ │ ├── TestGroupResource.java
│ │ ├── TestMetadataResource.java
│ │ ├── TestRouteModelResource.java
│ │ ├── TestRouteResource.java
│ │ ├── TestSecurity.java
│ │ ├── TestShareResource.java
│ │ ├── TestTagResource.java
│ │ ├── TestThemeResource.java
│ │ ├── TestUserResource.java
│ │ ├── TestVocabularyResource.java
│ │ ├── TestWebhookResource.java
│ │ ├── resource
│ │ └── ThirdPartyWebhookResource.java
│ │ └── util
│ │ └── TestDocumentSearchCriteriaUtil.java
│ └── resources
│ ├── file
│ ├── Einstein-Roosevelt-letter.png
│ ├── PIA00452.jpg
│ ├── apache.pptx
│ ├── document.docx
│ ├── document.odt
│ ├── document.txt
│ ├── test_mail.eml
│ ├── video.webm
│ ├── wikipedia.pdf
│ └── wikipedia.zip
│ ├── hibernate.properties
│ ├── log4j.properties
│ └── test.ldif
├── docs.xml
├── docs
└── .gitkeep
├── pom.xml
└── scripts
└── dev_setup.sh
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Set default behaviour, in case users don't have core.autocrlf set.
2 | * text=auto
3 |
4 | # Explicitly declare text files we want to always be normalized and converted
5 | # to native line endings on checkout.
6 | *.c text
7 | *.h text
8 |
9 | # Declare files that will always have CRLF line endings on checkout.
10 | *.sln text eol=crlf
11 |
12 | # Denote all files that are truly binary and should not be modified.
13 | *.png binary
14 | *.jpg binary
15 |
16 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [jendib]
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /*/.classpath
2 | /*/.project
3 | /*/.settings
4 | /*/bin
5 | /*/gen
6 | /*/target
7 | /*/build
8 | /out
9 | /.idea
10 | /.project
11 | *.iml
12 | node_modules
13 | import_test
14 | teedy-importer-linux
15 | teedy-importer-macos
16 | teedy-importer-win.exe
17 | docs/*
18 | !docs/.gitkeep
19 |
20 | #macos
21 | .DS_Store
22 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 | # Teedy Application
4 | teedy-server:
5 | image: sismics/docs:v1.10
6 | restart: unless-stopped
7 | ports:
8 | # Map internal port to host
9 | - 8080:8080
10 | environment:
11 | # Base url to be used
12 | DOCS_BASE_URL: "https://docs.example.com"
13 | # Set the admin email
14 | DOCS_ADMIN_EMAIL_INIT: "admin@example.com"
15 | # Set the admin password (in this example: "superSecure")
16 | DOCS_ADMIN_PASSWORD_INIT: "$$2a$$05$$PcMNUbJvsk7QHFSfEIDaIOjk1VI9/E7IPjTKx.jkjPxkx2EOKSoPS"
17 | volumes:
18 | - ./docs/data:/data
19 |
--------------------------------------------------------------------------------
/docs-android/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea
4 | .DS_Store
5 |
--------------------------------------------------------------------------------
/docs-android/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/docs-android/app/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | jcenter()
4 | google()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:3.4.0'
8 | }
9 | }
10 | apply plugin: 'com.android.application'
11 |
12 | repositories {
13 | jcenter()
14 | google()
15 | }
16 |
17 | android {
18 | compileSdkVersion 28
19 |
20 | defaultConfig {
21 | minSdkVersion 14
22 | targetSdkVersion 28
23 | versionCode 1
24 | versionName '1.0'
25 | }
26 |
27 | lintOptions {
28 | abortOnError false
29 | }
30 | }
31 |
32 | dependencies {
33 | implementation fileTree(dir: 'libs', include: '*.jar')
34 | implementation 'com.android.support:appcompat-v7:28.0.0'
35 | implementation 'com.android.support:recyclerview-v7:28.0.0'
36 | implementation 'com.android.support:design:28.0.0'
37 | implementation 'it.sephiroth.android.library.imagezoom:imagezoom:1.0.5'
38 | implementation 'org.greenrobot:eventbus:3.1.1'
39 | implementation 'com.squareup.picasso:picasso:2.5.2'
40 | implementation 'com.squareup.okhttp3:okhttp:3.10.0'
41 | implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0'
42 | implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
43 | }
44 |
--------------------------------------------------------------------------------
/docs-android/app/libs/tokenautocomplete-1.2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/libs/tokenautocomplete-1.2.1.jar
--------------------------------------------------------------------------------
/docs-android/app/proguard-rules.txt:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /opt/android-studio/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the ProGuard
5 | # include property in project.properties.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs;
2 |
3 | import android.app.Application;
4 | import android.support.v7.app.AppCompatDelegate;
5 |
6 | import com.sismics.docs.model.application.ApplicationContext;
7 | import com.sismics.docs.util.PreferenceUtil;
8 |
9 | import org.json.JSONObject;
10 |
11 | /**
12 | * Main application.
13 | *
14 | * @author bgamard
15 | */
16 | public class MainApplication extends Application {
17 | @Override
18 | public void onCreate() {
19 | // Fetching GET /user from cache
20 | JSONObject json = PreferenceUtil.getCachedJson(getApplicationContext(), PreferenceUtil.PREF_CACHED_USER_INFO_JSON);
21 | ApplicationContext.getInstance().setUserInfo(getApplicationContext(), json);
22 |
23 | // TODO Provide documents to intent action get content
24 |
25 | super.onCreate();
26 |
27 | AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/activity/SettingsActivity.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.activity;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.view.MenuItem;
6 |
7 | import com.sismics.docs.fragment.SettingsFragment;
8 |
9 | /**
10 | * Settings activity.
11 | *
12 | * @author bgamard.
13 | */
14 | public class SettingsActivity extends AppCompatActivity {
15 | @Override
16 | protected void onCreate(Bundle savedInstanceState) {
17 | super.onCreate(savedInstanceState);
18 |
19 | if (getSupportActionBar() != null) {
20 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
21 | getSupportActionBar().setHomeButtonEnabled(true);
22 | }
23 |
24 | // Display the fragment as the main content.
25 | getFragmentManager().beginTransaction()
26 | .replace(android.R.id.content, new SettingsFragment())
27 | .commit();
28 | }
29 |
30 | @Override
31 | public boolean onOptionsItemSelected(MenuItem item) {
32 | switch (item.getItemId()) {
33 | case android.R.id.home:
34 | finish();
35 | return true;
36 | }
37 |
38 | return super.onOptionsItemSelected(item);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/AdvancedSearchEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | /**
4 | * Advanced search event.
5 | *
6 | * @author bgamard.
7 | */
8 | public class AdvancedSearchEvent {
9 | /**
10 | * Search query.
11 | */
12 | private String query;
13 |
14 | /**
15 | * Create an advanced search event.
16 | *
17 | * @param query Query
18 | */
19 | public AdvancedSearchEvent(String query) {
20 | this.query = query;
21 | }
22 |
23 | /**
24 | * Getter of query.
25 | *
26 | * @return query
27 | */
28 | public String getQuery() {
29 | return query;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/CommentAddEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | import org.json.JSONObject;
4 |
5 | /**
6 | * Comment add event.
7 | *
8 | * @author bgamard.
9 | */
10 | public class CommentAddEvent {
11 | /**
12 | * Comment.
13 | */
14 | private JSONObject comment;
15 |
16 | /**
17 | * Create a comment add event.
18 | *
19 | * @param comment Comment
20 | */
21 | public CommentAddEvent(JSONObject comment) {
22 | this.comment = comment;
23 | }
24 |
25 | /**
26 | * Getter of comment.
27 | *
28 | * @return comment
29 | */
30 | public JSONObject getComment() {
31 | return comment;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/CommentDeleteEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | /**
4 | * Comment delete event.
5 | *
6 | * @author bgamard.
7 | */
8 | public class CommentDeleteEvent {
9 | /**
10 | * Comment ID.
11 | */
12 | private String commentId;
13 |
14 | /**
15 | * Create a comment add event.
16 | *
17 | * @param commentId Comment ID
18 | */
19 | public CommentDeleteEvent(String commentId) {
20 | this.commentId = commentId;
21 | }
22 |
23 | /**
24 | * Getter of commentId.
25 | *
26 | * @return commentId
27 | */
28 | public String getCommentId() {
29 | return commentId;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/DocumentAddEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | import org.json.JSONObject;
4 |
5 | /**
6 | * Document add event.
7 | *
8 | * @author bgamard.
9 | */
10 | public class DocumentAddEvent {
11 | /**
12 | * Document.
13 | */
14 | private JSONObject document;
15 |
16 | /**
17 | * Create a document add event.
18 | *
19 | * @param document Document
20 | */
21 | public DocumentAddEvent(JSONObject document) {
22 | this.document = document;
23 | }
24 |
25 | /**
26 | * Getter of document.
27 | *
28 | * @return document
29 | */
30 | public JSONObject getDocument() {
31 | return document;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/DocumentDeleteEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | /**
4 | * Document delete event.
5 | *
6 | * @author bgamard.
7 | */
8 | public class DocumentDeleteEvent {
9 | /**
10 | * Document ID.
11 | */
12 | private String documentId;
13 |
14 | /**
15 | * Create a document delete event.
16 | *
17 | * @param documentId Document ID
18 | */
19 | public DocumentDeleteEvent(String documentId) {
20 | this.documentId = documentId;
21 | }
22 |
23 | /**
24 | * Getter of documentId.
25 | *
26 | * @return documentId
27 | */
28 | public String getDocumentId() {
29 | return documentId;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/DocumentEditEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | import org.json.JSONObject;
4 |
5 | /**
6 | * Document edit event.
7 | *
8 | * @author bgamard.
9 | */
10 | public class DocumentEditEvent {
11 | /**
12 | * Document.
13 | */
14 | private JSONObject document;
15 |
16 | /**
17 | * Create a document edit event.
18 | *
19 | * @param document Document
20 | */
21 | public DocumentEditEvent(JSONObject document) {
22 | this.document = document;
23 | }
24 |
25 | /**
26 | * Getter of document.
27 | *
28 | * @return document
29 | */
30 | public JSONObject getDocument() {
31 | return document;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/DocumentFullscreenEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | /**
4 | * @author bgamard.
5 | */
6 | public class DocumentFullscreenEvent {
7 |
8 | private boolean fullscreen;
9 |
10 | public DocumentFullscreenEvent(boolean fullscreen) {
11 | this.fullscreen = fullscreen;
12 | }
13 |
14 | public boolean isFullscreen() {
15 | return fullscreen;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/FileAddEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | /**
4 | * File add event.
5 | *
6 | * @author bgamard.
7 | */
8 | public class FileAddEvent {
9 | /**
10 | * Document ID.
11 | */
12 | private String documentId;
13 | /**
14 | * File ID.
15 | */
16 | private String fileId;
17 |
18 | /**
19 | * Create a file add event.
20 | *
21 | * @param fileId File ID
22 | */
23 | public FileAddEvent(String documentId, String fileId) {
24 | this.documentId = documentId;
25 | this.fileId = fileId;
26 | }
27 |
28 | /**
29 | * Getter of fileId.
30 | *
31 | * @return fileId
32 | */
33 | public String getFileId() {
34 | return fileId;
35 | }
36 |
37 | /**
38 | * Getter of documentId.
39 | *
40 | * @return documentId
41 | */
42 | public String getDocumentId() {
43 | return documentId;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/FileDeleteEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | /**
4 | * File delete event.
5 | *
6 | * @author bgamard.
7 | */
8 | public class FileDeleteEvent {
9 | /**
10 | * File ID.
11 | */
12 | private String fileId;
13 |
14 | /**
15 | * Create a document delete event.
16 | *
17 | * @param fileId File ID
18 | */
19 | public FileDeleteEvent(String fileId) {
20 | this.fileId = fileId;
21 | }
22 |
23 | /**
24 | * Getter of fileId.
25 | *
26 | * @return fileId
27 | */
28 | public String getFileId() {
29 | return fileId;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/SearchEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | /**
4 | * Search event.
5 | *
6 | * @author bgamard.
7 | */
8 | public class SearchEvent {
9 | /**
10 | * Search query.
11 | */
12 | private String query;
13 |
14 | /**
15 | * Create a search event.
16 | *
17 | * @param query Query
18 | */
19 | public SearchEvent(String query) {
20 | this.query = query;
21 | }
22 |
23 | /**
24 | * Getter of query.
25 | *
26 | * @return query
27 | */
28 | public String getQuery() {
29 | return query;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/ShareDeleteEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | /**
4 | * Share delete event.
5 | *
6 | * @author bgamard.
7 | */
8 | public class ShareDeleteEvent {
9 | /**
10 | * Share ID
11 | */
12 | private String id;
13 |
14 | /**
15 | * Create a share delete event.
16 | *
17 | * @param id Share ID
18 | */
19 | public ShareDeleteEvent(String id) {
20 | this.id = id;
21 | }
22 |
23 | public String getId() {
24 | return id;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/event/ShareSendEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.event;
2 |
3 | import org.json.JSONObject;
4 |
5 | /**
6 | * Share send event.
7 | *
8 | * @author bgamard.
9 | */
10 | public class ShareSendEvent {
11 | /**
12 | * ACL data.
13 | */
14 | private JSONObject acl;
15 |
16 | /**
17 | * Create a share send event.
18 | *
19 | * @param acl ACL data
20 | */
21 | public ShareSendEvent(JSONObject acl) {
22 | this.acl = acl;
23 | }
24 |
25 | public JSONObject getAcl() {
26 | return acl;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/listener/CallbackListener.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.listener;
2 |
3 | /**
4 | * Simple listener.
5 | *
6 | * @author bgamard
7 | */
8 | public interface CallbackListener {
9 | public void onComplete();
10 | }
11 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/provider/RecentSuggestionsProvider.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.provider;
2 |
3 | import android.content.SearchRecentSuggestionsProvider;
4 |
5 | /**
6 | * Search recent suggestions provider.
7 | *
8 | * @author bgamard.
9 | */
10 | public class RecentSuggestionsProvider extends SearchRecentSuggestionsProvider {
11 | public final static String AUTHORITY = "com.sismics.docs.provider.RecentSuggestionsProvider";
12 | public final static int MODE = DATABASE_MODE_QUERIES;
13 |
14 | public RecentSuggestionsProvider() {
15 | setupSuggestions(AUTHORITY, MODE);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/resource/AuditLogResource.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.resource;
2 |
3 | import android.content.Context;
4 |
5 | import com.sismics.docs.listener.HttpCallback;
6 | import com.sismics.docs.util.OkHttpUtil;
7 |
8 | import okhttp3.HttpUrl;
9 | import okhttp3.Request;
10 |
11 | /**
12 | * Access to /auditlog API.
13 | *
14 | * @author bgamard
15 | */
16 | public class AuditLogResource extends BaseResource {
17 | /**
18 | * GET /auditlog.
19 | *
20 | * @param context Context
21 | * @param documentId Document ID
22 | * @param callback Callback
23 | */
24 | public static void list(Context context, String documentId, HttpCallback callback) {
25 | HttpUrl.Builder httpUrlBuilder = HttpUrl.parse(getApiUrl(context) + "/auditlog")
26 | .newBuilder();
27 | if (documentId != null) {
28 | httpUrlBuilder.addQueryParameter("document", documentId);
29 | }
30 | Request request = new Request.Builder()
31 | .url(httpUrlBuilder.build())
32 | .get()
33 | .build();
34 | OkHttpUtil.buildClient(context)
35 | .newCall(request)
36 | .enqueue(HttpCallback.buildOkHttpCallback(callback));
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/resource/BaseResource.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.resource;
2 |
3 | import android.content.Context;
4 |
5 | import com.sismics.docs.util.PreferenceUtil;
6 |
7 | /**
8 | * Base class for API access.
9 | *
10 | * @author bgamard
11 | */
12 | public class BaseResource {
13 | /**
14 | * Returns cleaned API URL.
15 | *
16 | * @param context Context
17 | * @return Cleaned API URL
18 | */
19 | protected static String getApiUrl(Context context) {
20 | String serverUrl = PreferenceUtil.getServerUrl(context);
21 |
22 | if (serverUrl == null) {
23 | return null;
24 | }
25 |
26 | return serverUrl + "/api";
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/resource/TagResource.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.resource;
2 |
3 | import android.content.Context;
4 |
5 | import com.sismics.docs.listener.HttpCallback;
6 | import com.sismics.docs.util.OkHttpUtil;
7 |
8 | import okhttp3.HttpUrl;
9 | import okhttp3.Request;
10 |
11 |
12 | /**
13 | * Access to /tag API.
14 | *
15 | * @author bgamard
16 | */
17 | public class TagResource extends BaseResource {
18 | /**
19 | * GET /tag/list.
20 | *
21 | * @param context Context
22 | * @param callback Callback
23 | */
24 | public static void list(Context context, HttpCallback callback) {
25 | Request request = new Request.Builder()
26 | .url(HttpUrl.parse(getApiUrl(context) + "/tag/list"))
27 | .get()
28 | .build();
29 | OkHttpUtil.buildClient(context)
30 | .newCall(request)
31 | .enqueue(HttpCallback.buildOkHttpCallback(callback));
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/ui/form/validator/Alphanumeric.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.ui.form.validator;
2 |
3 | import android.content.Context;
4 |
5 | import com.sismics.docs.R;
6 |
7 | import java.util.regex.Pattern;
8 |
9 | /**
10 | * Alphanumeric validator.
11 | *
12 | * @author bgamard
13 | */
14 | public class Alphanumeric implements ValidatorType {
15 |
16 | private static Pattern ALPHANUMERIC_PATTERN = Pattern.compile("[a-zA-Z0-9_]+");
17 |
18 | @Override
19 | public boolean validate(String text) {
20 | return ALPHANUMERIC_PATTERN.matcher(text).matches();
21 | }
22 |
23 | @Override
24 | public String getErrorMessage(Context context) {
25 | return context.getString(R.string.validate_error_alphanumeric);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/ui/form/validator/Email.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.ui.form.validator;
2 |
3 | import android.content.Context;
4 |
5 | import com.sismics.docs.R;
6 |
7 | import java.util.regex.Pattern;
8 |
9 | /**
10 | * Email validator.
11 | *
12 | * @author bgamard
13 | */
14 | public class Email implements ValidatorType {
15 |
16 | /**
17 | * Pattern de validation.
18 | */
19 | private static Pattern EMAIL_PATTERN = Pattern.compile(".+@.+\\..+");
20 |
21 | @Override
22 | public boolean validate(String text) {
23 | return EMAIL_PATTERN.matcher(text).matches();
24 | }
25 |
26 | @Override
27 | public String getErrorMessage(Context context) {
28 | return context.getResources().getString(R.string.validate_error_email);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/ui/form/validator/Required.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.ui.form.validator;
2 |
3 | import android.content.Context;
4 |
5 | import com.sismics.docs.R;
6 |
7 | /**
8 | * Text presence validator.
9 | *
10 | * @author bgamard
11 | */
12 | public class Required implements ValidatorType {
13 |
14 | @Override
15 | public boolean validate(String text) {
16 | return text.trim().length() != 0;
17 | }
18 |
19 | @Override
20 | public String getErrorMessage(Context context) {
21 | return context.getString(R.string.validate_error_required);
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/ui/form/validator/ValidatorType.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.ui.form.validator;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | * Interface for validation types.
7 | *
8 | * @author bgamard
9 | */
10 | public interface ValidatorType {
11 |
12 | /**
13 | * Returns true if the validator is validated.
14 | * @param text
15 | * @return
16 | */
17 | public boolean validate(String text);
18 |
19 | /**
20 | * Returns an error message.
21 | * @param context
22 | * @return
23 | */
24 | public String getErrorMessage(Context context);
25 | }
26 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/ui/view/FileViewPager.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.ui.view;
2 |
3 | import android.content.Context;
4 | import android.support.v4.view.ViewPager;
5 | import android.util.AttributeSet;
6 | import android.view.View;
7 |
8 | import it.sephiroth.android.library.imagezoom.ImageViewTouch;
9 |
10 | /**
11 | * ViewPager for files.
12 | *
13 | * @author bgamard.
14 | */
15 | public class FileViewPager extends ViewPager {
16 |
17 | public FileViewPager(Context context) {
18 | super(context);
19 | }
20 |
21 | public FileViewPager(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | }
24 |
25 | @Override
26 | protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) {
27 | if (v instanceof ImageViewTouch) {
28 | return ((ImageViewTouch) v).canScroll(dx);
29 | } else {
30 | return super.canScroll(v, checkV, dx, x, y);
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/ui/view/NonScrollListView.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.ui.view;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.ViewGroup;
6 | import android.widget.ListView;
7 |
8 | /**
9 | * Non-scrollable ListView.
10 | * All items are visible from the start.
11 | *
12 | * @author http://stackoverflow.com/questions/18813296/non-scrollable-listview-inside-scrollview/24629341#24629341
13 | */
14 | public class NonScrollListView extends ListView {
15 |
16 | public NonScrollListView(Context context) {
17 | super(context);
18 | }
19 | public NonScrollListView(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | }
22 | public NonScrollListView(Context context, AttributeSet attrs, int defStyle) {
23 | super(context, attrs, defStyle);
24 | }
25 | @Override
26 | public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
27 | int heightMeasureSpec_custom = MeasureSpec.makeMeasureSpec(
28 | Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
29 | super.onMeasure(widthMeasureSpec, heightMeasureSpec_custom);
30 | ViewGroup.LayoutParams params = getLayoutParams();
31 | params.height = getMeasuredHeight();
32 | }
33 | }
--------------------------------------------------------------------------------
/docs-android/app/src/main/java/com/sismics/docs/util/DialogUtil.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.util;
2 |
3 | import android.app.Activity;
4 | import android.app.AlertDialog;
5 | import android.content.DialogInterface;
6 |
7 | import com.sismics.docs.R;
8 |
9 | /**
10 | * Utility class for dialogs.
11 | *
12 | * @author bgamard
13 | */
14 | public class DialogUtil {
15 | /**
16 | * Create a dialog with an OK button.
17 | *
18 | * @param activity Context activity
19 | * @param title Dialog title
20 | * @param message Dialog message
21 | */
22 | public static void showOkDialog(Activity activity, int title, int message) {
23 | if (activity == null || activity.isFinishing()) {
24 | return;
25 | }
26 |
27 | AlertDialog.Builder builder = new AlertDialog.Builder(activity);
28 |
29 | builder.setTitle(title)
30 | .setMessage(message)
31 | .setCancelable(true)
32 | .setNeutralButton(R.string.ok, new DialogInterface.OnClickListener() {
33 | @Override
34 | public void onClick(DialogInterface dialog, int id) {
35 | dialog.dismiss();
36 | }
37 | }).create().show();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/deu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/deu.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/eng.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/eng.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/fra.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/fra.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_assignment_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_assignment_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_assignment_grey600_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_assignment_grey600_48dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_comment_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_comment_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_create_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_create_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_delete_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_delete_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_description_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_description_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_done_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_done_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_file_download_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_file_download_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_file_upload_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_file_upload_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_file_upload_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_file_upload_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_folder_open_grey600_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_folder_open_grey600_48dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_folder_shared_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_folder_shared_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_info_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_info_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_label_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_label_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_link_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_link_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_people_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_people_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_send_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_send_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_share_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_share_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/ic_work_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/ic_work_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xhdpi/pol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xhdpi/pol.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/deu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/deu.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/eng.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/eng.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/fra.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/fra.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_assignment_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_assignment_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_assignment_grey600_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_assignment_grey600_48dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_comment_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_comment_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_create_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_create_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_delete_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_delete_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_description_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_description_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_done_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_done_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_file_download_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_file_download_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_file_upload_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_file_upload_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_file_upload_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_file_upload_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_folder_open_grey600_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_folder_open_grey600_48dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_folder_shared_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_folder_shared_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_info_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_info_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_label_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_label_white_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_link_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_link_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_people_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_people_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_send_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_send_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_share_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_share_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable-xxhdpi/ic_work_grey600_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/drawable-xxhdpi/ic_work_grey600_24dp.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/drawable/tag_autocomplete_token_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/layout/auditlog_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
18 |
19 |
20 |
21 |
29 |
30 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/layout/file_viewpager_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/layout/groupprofile_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
18 |
19 |
20 |
21 |
29 |
30 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/layout/language_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/layout/tag_autocomplete_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/layout/tag_autocomplete_token.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
20 |
21 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/layout/tag_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
20 |
31 |
32 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/menu/document_edit_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/menu/document_view_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/menu/main_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | - 5MB
6 | - 10MB
7 | - 30MB
8 | - 100MB
9 |
10 |
11 |
12 | - 5
13 | - 10
14 | - 30
15 | - 100
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #263238
4 | #21272b
5 | #009688
6 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
16 |
17 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/docs-android/app/src/main/res/xml/searchable.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/docs-android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
--------------------------------------------------------------------------------
/docs-android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Settings specified in this file will override any Gradle settings
5 | # configured through the IDE.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | org.gradle.jvmargs=-Xmx3072m
16 |
17 | # When configured, Gradle will run in incubating parallel mode.
18 | # This option should only be used with decoupled projects. More details, visit
19 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
20 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/docs-android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/docs-android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue May 07 11:49:13 CEST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/docs-android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/docs-core/src/dev/resources/db/update/dbupdate-000-1.sql:
--------------------------------------------------------------------------------
1 | update T_CONFIG set CFG_VALUE_C = 'RAM' where CFG_ID_C = 'LUCENE_DIRECTORY_STORAGE';
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/constant/AclTargetType.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.constant;
2 |
3 | /**
4 | * ACL target types.
5 | *
6 | * @author bgamard
7 | */
8 | public enum AclTargetType {
9 | /**
10 | * An user.
11 | */
12 | USER,
13 |
14 | /**
15 | * A group.
16 | */
17 | GROUP,
18 |
19 | /**
20 | * A share.
21 | */
22 | SHARE
23 | }
24 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/constant/AclType.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.constant;
2 |
3 | /**
4 | * ACL type.
5 | *
6 | * @author bgamard
7 | */
8 | public enum AclType {
9 | /**
10 | * User created ACL.
11 | */
12 | USER,
13 |
14 | /**
15 | * ACL created by the routing module.
16 | */
17 | ROUTING
18 | }
19 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/constant/ActionType.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.constant;
2 |
3 | /**
4 | * Action types.
5 | *
6 | * @author bgamard
7 | */
8 | public enum ActionType {
9 | /**
10 | * Add a tag.
11 | */
12 | ADD_TAG,
13 |
14 | /**
15 | * Remove a tag.
16 | */
17 | REMOVE_TAG,
18 |
19 | /**
20 | * Process files.
21 | */
22 | PROCESS_FILES
23 | }
24 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/constant/AuditLogType.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.constant;
2 |
3 | /**
4 | * Audit log types.
5 | *
6 | * @author bgamard
7 | */
8 | public enum AuditLogType {
9 | /**
10 | * Create.
11 | */
12 | CREATE,
13 |
14 | /**
15 | * Update.
16 | */
17 | UPDATE,
18 |
19 | /**
20 | * Delete.
21 | */
22 | DELETE
23 | }
24 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/constant/MetadataType.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.constant;
2 |
3 | /**
4 | * Metadata type.
5 | *
6 | * @author bgamard
7 | */
8 | public enum MetadataType {
9 | STRING,
10 | INTEGER,
11 | FLOAT,
12 | DATE,
13 | BOOLEAN
14 | }
15 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/constant/PermType.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.constant;
2 |
3 | /**
4 | * Permissions.
5 | *
6 | * @author bgamard
7 | */
8 | public enum PermType {
9 | /**
10 | * Read document.
11 | */
12 | READ,
13 |
14 | /**
15 | * Write document.
16 | */
17 | WRITE
18 | }
19 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/constant/RouteStepTransition.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.constant;
2 |
3 | /**
4 | * Route step transitions.
5 | *
6 | * @author bgamard
7 | */
8 | public enum RouteStepTransition {
9 | /**
10 | * Route step approved.
11 | */
12 | APPROVED,
13 |
14 | /**
15 | * Route step rejected.
16 | */
17 | REJECTED,
18 |
19 | /**
20 | * Route step validated.
21 | */
22 | VALIDATED
23 | }
24 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/constant/RouteStepType.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.constant;
2 |
3 | /**
4 | * Route step types.
5 | *
6 | * @author bgamard
7 | */
8 | public enum RouteStepType {
9 | /**
10 | * Approval step with 2 choices.
11 | */
12 | APPROVE,
13 |
14 | /**
15 | * Simple validation step, no possible choice.
16 | */
17 | VALIDATE
18 | }
19 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/constant/WebhookEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.constant;
2 |
3 | /**
4 | * Webhook events.
5 | *
6 | * @author bgamard
7 | */
8 | public enum WebhookEvent {
9 | DOCUMENT_CREATED,
10 | DOCUMENT_UPDATED,
11 | DOCUMENT_DELETED,
12 | FILE_CREATED,
13 | FILE_UPDATED,
14 | FILE_DELETED
15 | }
16 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/RoleBaseFunctionDao.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao;
2 |
3 | import com.google.common.collect.Sets;
4 | import com.sismics.util.context.ThreadLocalContext;
5 |
6 | import jakarta.persistence.EntityManager;
7 | import jakarta.persistence.Query;
8 | import java.util.Set;
9 |
10 | /**
11 | * Role base functions DAO.
12 | *
13 | * @author jtremeaux
14 | */
15 | public class RoleBaseFunctionDao {
16 | /**
17 | * Find the set of base functions of a role.
18 | *
19 | * @param roleIdSet Set of role ID
20 | * @return Set of base functions
21 | */
22 | @SuppressWarnings("unchecked")
23 | public Set findByRoleId(Set roleIdSet) {
24 | EntityManager em = ThreadLocalContext.get().getEntityManager();
25 | StringBuilder sb = new StringBuilder("select rbf.RBF_IDBASEFUNCTION_C from T_ROLE_BASE_FUNCTION rbf, T_ROLE r");
26 | sb.append(" where rbf.RBF_IDROLE_C in (:roleIdSet) and rbf.RBF_DELETEDATE_D is null");
27 | sb.append(" and r.ROL_ID_C = rbf.RBF_IDROLE_C and r.ROL_DELETEDATE_D is null");
28 | Query q = em.createNativeQuery(sb.toString());
29 | q.setParameter("roleIdSet", roleIdSet);
30 | return Sets.newHashSet(q.getResultList());
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/criteria/AuditLogCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.criteria;
2 |
3 |
4 | /**
5 | * Audit log criteria.
6 | *
7 | * @author bgamard
8 | */
9 | public class AuditLogCriteria {
10 | /**
11 | * Document ID.
12 | */
13 | private String documentId;
14 |
15 | /**
16 | * User ID.
17 | */
18 | private String userId;
19 |
20 | /**
21 | * The search is done for an admin user.
22 | */
23 | private boolean isAdmin = false;
24 |
25 | public String getDocumentId() {
26 | return documentId;
27 | }
28 |
29 | public void setDocumentId(String documentId) {
30 | this.documentId = documentId;
31 | }
32 |
33 | public String getUserId() {
34 | return userId;
35 | }
36 |
37 | public void setUserId(String userId) {
38 | this.userId = userId;
39 | }
40 |
41 | public boolean isAdmin() {
42 | return isAdmin;
43 | }
44 |
45 | public AuditLogCriteria setAdmin(boolean admin) {
46 | isAdmin = admin;
47 | return this;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/criteria/GroupCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.criteria;
2 |
3 | /**
4 | * Group criteria.
5 | *
6 | * @author bgamard
7 | */
8 | public class GroupCriteria {
9 | /**
10 | * Search query.
11 | */
12 | private String search;
13 |
14 | /**
15 | * User ID.
16 | */
17 | private String userId;
18 |
19 | /**
20 | * Retrieve user groups recursively.
21 | */
22 | private boolean recursive = false;
23 |
24 | public String getSearch() {
25 | return search;
26 | }
27 |
28 | public GroupCriteria setSearch(String search) {
29 | this.search = search;
30 | return this;
31 | }
32 |
33 | public String getUserId() {
34 | return userId;
35 | }
36 |
37 | public GroupCriteria setUserId(String userId) {
38 | this.userId = userId;
39 | return this;
40 | }
41 |
42 | public boolean isRecursive() {
43 | return recursive;
44 | }
45 |
46 | public GroupCriteria setRecursive(boolean recursive) {
47 | this.recursive = recursive;
48 | return this;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/criteria/MetadataCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.criteria;
2 |
3 | /**
4 | * Metadata criteria.
5 | *
6 | * @author bgamard
7 | */
8 | public class MetadataCriteria {
9 | }
10 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/criteria/RouteCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.criteria;
2 |
3 |
4 | /**
5 | * Route criteria.
6 | *
7 | * @author bgamard
8 | */
9 | public class RouteCriteria {
10 | /**
11 | * Document ID.
12 | */
13 | private String documentId;
14 |
15 | public String getDocumentId() {
16 | return documentId;
17 | }
18 |
19 | public RouteCriteria setDocumentId(String documentId) {
20 | this.documentId = documentId;
21 | return this;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/criteria/RouteModelCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.criteria;
2 |
3 |
4 | import java.util.List;
5 |
6 | /**
7 | * Route model criteria.
8 | *
9 | * @author bgamard
10 | */
11 | public class RouteModelCriteria {
12 | /**
13 | * ACL target ID list.
14 | */
15 | private List targetIdList;
16 |
17 | public List getTargetIdList() {
18 | return targetIdList;
19 | }
20 |
21 | public RouteModelCriteria setTargetIdList(List targetIdList) {
22 | this.targetIdList = targetIdList;
23 | return this;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/criteria/RouteStepCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.criteria;
2 |
3 |
4 | /**
5 | * Route step criteria.
6 | *
7 | * @author bgamard
8 | */
9 | public class RouteStepCriteria {
10 | /**
11 | * Document ID.
12 | */
13 | private String documentId;
14 |
15 | /**
16 | * Route ID.
17 | */
18 | private String routeId;
19 |
20 | /**
21 | * End date is null.
22 | */
23 | private Boolean endDateIsNull;
24 |
25 | public String getDocumentId() {
26 | return documentId;
27 | }
28 |
29 | public RouteStepCriteria setDocumentId(String documentId) {
30 | this.documentId = documentId;
31 | return this;
32 | }
33 |
34 | public String getRouteId() {
35 | return routeId;
36 | }
37 |
38 | public RouteStepCriteria setRouteId(String routeId) {
39 | this.routeId = routeId;
40 | return this;
41 | }
42 |
43 | public Boolean getEndDateIsNull() {
44 | return endDateIsNull;
45 | }
46 |
47 | public RouteStepCriteria setEndDateIsNull(Boolean endDateIsNull) {
48 | this.endDateIsNull = endDateIsNull;
49 | return this;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/criteria/TagCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.criteria;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Tag criteria.
7 | *
8 | * @author bgamard
9 | */
10 | public class TagCriteria {
11 | /**
12 | * Tag ID.
13 | */
14 | private String id;
15 |
16 | /**
17 | * ACL target ID list.
18 | */
19 | private List targetIdList;
20 |
21 | /**
22 | * Document ID.
23 | */
24 | private String documentId;
25 |
26 | public String getId() {
27 | return id;
28 | }
29 |
30 | public TagCriteria setId(String id) {
31 | this.id = id;
32 | return this;
33 | }
34 |
35 | public List getTargetIdList() {
36 | return targetIdList;
37 | }
38 |
39 | public TagCriteria setTargetIdList(List targetIdList) {
40 | this.targetIdList = targetIdList;
41 | return this;
42 | }
43 |
44 | public String getDocumentId() {
45 | return documentId;
46 | }
47 |
48 | public TagCriteria setDocumentId(String documentId) {
49 | this.documentId = documentId;
50 | return this;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/criteria/WebhookCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.criteria;
2 |
3 | import com.sismics.docs.core.constant.WebhookEvent;
4 |
5 | /**
6 | * Webhook criteria.
7 | *
8 | * @author bgamard
9 | */
10 | public class WebhookCriteria {
11 | /**
12 | * Webhook event.
13 | */
14 | private WebhookEvent event;
15 |
16 | public WebhookEvent getEvent() {
17 | return event;
18 | }
19 |
20 | public WebhookCriteria setEvent(WebhookEvent event) {
21 | this.event = event;
22 | return this;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/dto/ContributorDto.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.dto;
2 |
3 | /**
4 | * Contributor DTO.
5 | *
6 | * @author bgamard
7 | */
8 | public class ContributorDto {
9 | /**
10 | * Username.
11 | */
12 | private String username;
13 |
14 | /**
15 | * Email.
16 | */
17 | private String email;
18 |
19 | public String getUsername() {
20 | return username;
21 | }
22 |
23 | public void setUsername(String username) {
24 | this.username = username;
25 | }
26 |
27 | public String getEmail() {
28 | return email;
29 | }
30 |
31 | public void setEmail(String email) {
32 | this.email = email;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/dto/MetadataDto.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.dto;
2 |
3 | import com.sismics.docs.core.constant.MetadataType;
4 |
5 | /**
6 | * Metadata DTO.
7 | *
8 | * @author bgamard
9 | */
10 | public class MetadataDto {
11 | /**
12 | * Metadata ID.
13 | */
14 | private String id;
15 |
16 | /**
17 | * Name.
18 | */
19 | private String name;
20 |
21 | /**
22 | * Type.
23 | */
24 | private MetadataType type;
25 |
26 | public String getId() {
27 | return id;
28 | }
29 |
30 | public MetadataDto setId(String id) {
31 | this.id = id;
32 | return this;
33 | }
34 |
35 | public String getName() {
36 | return name;
37 | }
38 |
39 | public MetadataDto setName(String name) {
40 | this.name = name;
41 | return this;
42 | }
43 |
44 | public MetadataType getType() {
45 | return type;
46 | }
47 |
48 | public MetadataDto setType(MetadataType type) {
49 | this.type = type;
50 | return this;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/dto/RelationDto.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.dto;
2 |
3 | /**
4 | * Tag DTO.
5 | *
6 | * @author bgamard
7 | */
8 | public class RelationDto {
9 | /**
10 | * Document ID.
11 | */
12 | private String id;
13 |
14 | /**
15 | * Document title.
16 | */
17 | private String title;
18 |
19 | /**
20 | * True if the document is the source of the relation.
21 | */
22 | private boolean source;
23 |
24 | public String getId() {
25 | return id;
26 | }
27 |
28 | public void setId(String id) {
29 | this.id = id;
30 | }
31 |
32 | public String getTitle() {
33 | return title;
34 | }
35 |
36 | public void setTitle(String title) {
37 | this.title = title;
38 | }
39 |
40 | public boolean isSource() {
41 | return source;
42 | }
43 |
44 | public void setSource(boolean source) {
45 | this.source = source;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/dto/RouteDto.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.dto;
2 |
3 | /**
4 | * Route DTO.
5 | *
6 | * @author bgamard
7 | */
8 | public class RouteDto {
9 | /**
10 | * Route ID.
11 | */
12 | private String id;
13 |
14 | /**
15 | * Name.
16 | */
17 | private String name;
18 |
19 | /**
20 | * Creation date.
21 | */
22 | private Long createTimestamp;
23 |
24 | public String getId() {
25 | return id;
26 | }
27 |
28 | public RouteDto setId(String id) {
29 | this.id = id;
30 | return this;
31 | }
32 |
33 | public String getName() {
34 | return name;
35 | }
36 |
37 | public RouteDto setName(String name) {
38 | this.name = name;
39 | return this;
40 | }
41 |
42 | public Long getCreateTimestamp() {
43 | return createTimestamp;
44 | }
45 |
46 | public RouteDto setCreateTimestamp(Long createTimestamp) {
47 | this.createTimestamp = createTimestamp;
48 | return this;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/dao/dto/RouteModelDto.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.dto;
2 |
3 | /**
4 | * Route model DTO.
5 | *
6 | * @author bgamard
7 | */
8 | public class RouteModelDto {
9 | /**
10 | * Route model ID.
11 | */
12 | private String id;
13 |
14 | /**
15 | * Name.
16 | */
17 | private String name;
18 |
19 | /**
20 | * Creation date.
21 | */
22 | private Long createTimestamp;
23 |
24 | public String getId() {
25 | return id;
26 | }
27 |
28 | public RouteModelDto setId(String id) {
29 | this.id = id;
30 | return this;
31 | }
32 |
33 | public String getName() {
34 | return name;
35 | }
36 |
37 | public RouteModelDto setName(String name) {
38 | this.name = name;
39 | return this;
40 | }
41 |
42 | public Long getCreateTimestamp() {
43 | return createTimestamp;
44 | }
45 |
46 | public RouteModelDto setCreateTimestamp(Long createTimestamp) {
47 | this.createTimestamp = createTimestamp;
48 | return this;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/AclCreatedAsyncEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | /**
4 | * ACL created event.
5 | *
6 | * @author bgamard
7 | */
8 | public class AclCreatedAsyncEvent extends AclEvent {
9 | }
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/AclDeletedAsyncEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | /**
4 | * ACL deleted event.
5 | *
6 | * @author bgamard
7 | */
8 | public class AclDeletedAsyncEvent extends AclEvent {
9 | }
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/DocumentCreatedAsyncEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | import com.google.common.base.MoreObjects;
4 |
5 | /**
6 | * Document created event.
7 | *
8 | * @author bgamard
9 | */
10 | public class DocumentCreatedAsyncEvent extends UserEvent {
11 | /**
12 | * Document ID.
13 | */
14 | private String documentId;
15 |
16 | public String getDocumentId() {
17 | return documentId;
18 | }
19 |
20 | public void setDocumentId(String documentId) {
21 | this.documentId = documentId;
22 | }
23 |
24 | @Override
25 | public String toString() {
26 | return MoreObjects.toStringHelper(this)
27 | .add("documentId", documentId)
28 | .toString();
29 | }
30 | }
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/DocumentDeletedAsyncEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | import com.google.common.base.MoreObjects;
4 |
5 | /**
6 | * Document deleted event.
7 | *
8 | * @author bgamard
9 | */
10 | public class DocumentDeletedAsyncEvent extends UserEvent {
11 | /**
12 | * Document ID.
13 | */
14 | private String documentId;
15 |
16 | public String getDocumentId() {
17 | return documentId;
18 | }
19 |
20 | public void setDocumentId(String documentId) {
21 | this.documentId = documentId;
22 | }
23 |
24 | @Override
25 | public String toString() {
26 | return MoreObjects.toStringHelper(this)
27 | .add("documentId", documentId)
28 | .toString();
29 | }
30 | }
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/DocumentUpdatedAsyncEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | import com.google.common.base.MoreObjects;
4 |
5 | /**
6 | * Document updated event.
7 | *
8 | * @author bgamard
9 | */
10 | public class DocumentUpdatedAsyncEvent extends UserEvent {
11 | /**
12 | * Document ID.
13 | */
14 | private String documentId;
15 |
16 | public String getDocumentId() {
17 | return documentId;
18 | }
19 |
20 | public void setDocumentId(String documentId) {
21 | this.documentId = documentId;
22 | }
23 |
24 | @Override
25 | public String toString() {
26 | return MoreObjects.toStringHelper(this)
27 | .add("documentId", documentId)
28 | .toString();
29 | }
30 | }
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/FileCreatedAsyncEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | /**
4 | * New file created event.
5 | *
6 | * @author bgamard
7 | */
8 | public class FileCreatedAsyncEvent extends FileEvent {
9 | }
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/FileDeletedAsyncEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | import com.google.common.base.MoreObjects;
4 |
5 | /**
6 | * File deleted event.
7 | *
8 | * @author bgamard
9 | */
10 | public class FileDeletedAsyncEvent extends UserEvent {
11 | /**
12 | * File ID.
13 | */
14 | private String fileId;
15 |
16 | private Long fileSize;
17 |
18 | public String getFileId() {
19 | return fileId;
20 | }
21 |
22 | public void setFileId(String fileId) {
23 | this.fileId = fileId;
24 | }
25 |
26 | public Long getFileSize() {
27 | return fileSize;
28 | }
29 |
30 | public void setFileSize(Long fileSize) {
31 | this.fileSize = fileSize;
32 | }
33 |
34 | @Override
35 | public String toString() {
36 | return MoreObjects.toStringHelper(this)
37 | .add("fileId", fileId)
38 | .add("fileSize", fileSize)
39 | .toString();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/FileUpdatedAsyncEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | /**
4 | * New file created event.
5 | *
6 | * @author bgamard
7 | */
8 | public class FileUpdatedAsyncEvent extends FileEvent {
9 | }
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/PasswordLostEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | import com.google.common.base.MoreObjects;
4 | import com.sismics.docs.core.dao.dto.UserDto;
5 | import com.sismics.docs.core.model.jpa.PasswordRecovery;
6 |
7 | /**
8 | * Event fired on user's password lost event.
9 | *
10 | * @author jtremeaux
11 | */
12 | public class PasswordLostEvent {
13 | /**
14 | * User.
15 | */
16 | private UserDto user;
17 |
18 | /**
19 | * Password recovery request.
20 | */
21 | private PasswordRecovery passwordRecovery;
22 |
23 | public UserDto getUser() {
24 | return user;
25 | }
26 |
27 | public void setUser(UserDto user) {
28 | this.user = user;
29 | }
30 |
31 | public PasswordRecovery getPasswordRecovery() {
32 | return passwordRecovery;
33 | }
34 |
35 | public void setPasswordRecovery(PasswordRecovery passwordRecovery) {
36 | this.passwordRecovery = passwordRecovery;
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | return MoreObjects.toStringHelper(this)
42 | .add("user", user)
43 | .add("passwordRecovery", "**hidden**")
44 | .toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/RebuildIndexAsyncEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | import com.google.common.base.MoreObjects;
4 |
5 | /**
6 | * Rebuild index event.
7 | *
8 | * @author bgamard
9 | */
10 | public class RebuildIndexAsyncEvent {
11 | @Override
12 | public String toString() {
13 | return MoreObjects.toStringHelper(this)
14 | .toString();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/RouteStepValidateEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | import com.google.common.base.MoreObjects;
4 | import com.sismics.docs.core.dao.dto.UserDto;
5 | import com.sismics.docs.core.model.jpa.Document;
6 |
7 | /**
8 | * Event fired on route step validation event.
9 | *
10 | * @author bgamard
11 | */
12 | public class RouteStepValidateEvent {
13 | /**
14 | * User.
15 | */
16 | private UserDto user;
17 |
18 | /**
19 | * Document linked to the route.
20 | */
21 | private Document document;
22 |
23 | public UserDto getUser() {
24 | return user;
25 | }
26 |
27 | public void setUser(UserDto user) {
28 | this.user = user;
29 | }
30 |
31 | public Document getDocument() {
32 | return document;
33 | }
34 |
35 | public RouteStepValidateEvent setDocument(Document document) {
36 | this.document = document;
37 | return this;
38 | }
39 |
40 | @Override
41 | public String toString() {
42 | return MoreObjects.toStringHelper(this)
43 | .add("user", user)
44 | .add("document", document)
45 | .toString();
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/event/UserEvent.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.event;
2 |
3 | /**
4 | * Event fired by a user.
5 | *
6 | * @author bgamard
7 | */
8 | public abstract class UserEvent {
9 | /**
10 | * User ID who fired the event.
11 | */
12 | private String userId;
13 |
14 | public String getUserId() {
15 | return userId;
16 | }
17 |
18 | public void setUserId(String userId) {
19 | this.userId = userId;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/listener/async/AclCreatedAsyncListener.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.listener.async;
2 |
3 | import com.google.common.eventbus.AllowConcurrentEvents;
4 | import com.google.common.eventbus.Subscribe;
5 | import com.sismics.docs.core.event.AclCreatedAsyncEvent;
6 | import com.sismics.docs.core.model.context.AppContext;
7 | import com.sismics.docs.core.util.TransactionUtil;
8 | import org.slf4j.Logger;
9 | import org.slf4j.LoggerFactory;
10 |
11 | /**
12 | * Listener on ACL created.
13 | *
14 | * @author bgamard
15 | */
16 | public class AclCreatedAsyncListener {
17 | /**
18 | * Logger.
19 | */
20 | private static final Logger log = LoggerFactory.getLogger(AclCreatedAsyncListener.class);
21 |
22 | /**
23 | * ACL created.
24 | *
25 | * @param event ACL created event
26 | */
27 | @Subscribe
28 | @AllowConcurrentEvents
29 | public void on(final AclCreatedAsyncEvent event) {
30 | if (log.isInfoEnabled()) {
31 | log.info("ACL created event: " + event.toString());
32 | }
33 |
34 | TransactionUtil.handle(() -> AppContext.getInstance().getIndexingHandler()
35 | .createAcl(event.getSourceId(), event.getPerm(), event.getTargetId()));
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/listener/async/AclDeletedAsyncListener.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.listener.async;
2 |
3 | import com.google.common.eventbus.AllowConcurrentEvents;
4 | import com.google.common.eventbus.Subscribe;
5 | import com.sismics.docs.core.event.AclDeletedAsyncEvent;
6 | import com.sismics.docs.core.model.context.AppContext;
7 | import com.sismics.docs.core.util.TransactionUtil;
8 | import org.slf4j.Logger;
9 | import org.slf4j.LoggerFactory;
10 |
11 | /**
12 | * Listener on ACL deleted.
13 | *
14 | * @author bgamard
15 | */
16 | public class AclDeletedAsyncListener {
17 | /**
18 | * Logger.
19 | */
20 | private static final Logger log = LoggerFactory.getLogger(AclDeletedAsyncListener.class);
21 |
22 | /**
23 | * ACL deleted.
24 | *
25 | * @param event ACL deleted event
26 | */
27 | @Subscribe
28 | @AllowConcurrentEvents
29 | public void on(final AclDeletedAsyncEvent event) {
30 | if (log.isInfoEnabled()) {
31 | log.info("ACL deleted event: " + event.toString());
32 | }
33 |
34 | TransactionUtil.handle(() -> AppContext.getInstance().getIndexingHandler()
35 | .deleteAcl(event.getSourceId(), event.getPerm(), event.getTargetId()));
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/model/jpa/BaseFunction.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.model.jpa;
2 |
3 | import jakarta.persistence.Column;
4 | import jakarta.persistence.Entity;
5 | import jakarta.persistence.Id;
6 | import jakarta.persistence.Table;
7 |
8 | import com.google.common.base.MoreObjects;
9 |
10 | /**
11 | * Base function entity.
12 | *
13 | * @author jtremeaux
14 | */
15 | @Entity
16 | @Table(name = "T_BASE_FUNCTION")
17 | public class BaseFunction {
18 | /**
19 | * Base function ID (ex: "ADMIN").
20 | */
21 | @Id
22 | @Column(name = "BAF_ID_C", length = 10)
23 | private String id;
24 |
25 | public String getId() {
26 | return id;
27 | }
28 |
29 | public void setId(String id) {
30 | this.id = id;
31 | }
32 |
33 | @Override
34 | public String toString() {
35 | return MoreObjects.toStringHelper(this)
36 | .add("id", id)
37 | .toString();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/model/jpa/Loggable.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.model.jpa;
2 |
3 | import java.util.Date;
4 |
5 | /**
6 | * An entity which can be logged.
7 | *
8 | * @author bgamard
9 | */
10 | public interface Loggable {
11 | /**
12 | * Get a string representation of this entity for logging purpose.
13 | * Avoid returning sensitive data like passwords.
14 | *
15 | * @return Entity message
16 | */
17 | String toMessage();
18 |
19 | /**
20 | * Loggable are soft deletable.
21 | *
22 | * @return deleteDate
23 | */
24 | Date getDeleteDate();
25 | }
26 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/util/action/Action.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.util.action;
2 |
3 | import com.sismics.docs.core.dao.dto.DocumentDto;
4 |
5 | import jakarta.json.JsonObject;
6 |
7 | /**
8 | * Base action interface.
9 | *
10 | * @author bgamard
11 | */
12 | public interface Action {
13 | /**
14 | * Execute the action.
15 | *
16 | * @param documentDto Document DTO
17 | * @param action Action data
18 | */
19 | void execute(DocumentDto documentDto, JsonObject action);
20 |
21 | /**
22 | * Validate the action.
23 | *
24 | * @param action Action data
25 | * @throws Exception Validation error
26 | */
27 | void validate(JsonObject action) throws Exception;
28 | }
29 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/util/action/RemoveTagAction.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.util.action;
2 |
3 | import com.google.common.collect.Sets;
4 | import com.sismics.docs.core.dao.TagDao;
5 | import com.sismics.docs.core.dao.criteria.TagCriteria;
6 | import com.sismics.docs.core.dao.dto.DocumentDto;
7 | import com.sismics.docs.core.dao.dto.TagDto;
8 |
9 | import jakarta.json.JsonObject;
10 | import java.util.List;
11 | import java.util.Set;
12 |
13 | /**
14 | * Action to remove a tag.
15 | *
16 | * @author bgamard
17 | */
18 | public class RemoveTagAction extends TagAction {
19 | @Override
20 | public void execute(DocumentDto documentDto, JsonObject action) {
21 | if (action.getString("tag") == null) {
22 | return;
23 | }
24 |
25 |
26 | String tagId = action.getString("tag");
27 | TagDao tagDao = new TagDao();
28 | List tagDtoList = tagDao.findByCriteria(new TagCriteria().setDocumentId(documentDto.getId()), null);
29 | Set tagIdSet = Sets.newHashSet();
30 | for (TagDto tagDto : tagDtoList) {
31 | tagIdSet.add(tagDto.getId());
32 | }
33 | tagIdSet.remove(tagId);
34 |
35 | tagDao.updateTagList(documentDto.getId(), tagIdSet);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/util/action/TagAction.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.util.action;
2 |
3 | import com.sismics.docs.core.dao.TagDao;
4 | import com.sismics.docs.core.dao.criteria.TagCriteria;
5 | import com.sismics.docs.core.dao.dto.TagDto;
6 |
7 | import jakarta.json.JsonObject;
8 | import java.util.List;
9 |
10 | /**
11 | * Abstract class for tag actions.
12 | *
13 | * @author bgamard
14 | */
15 | public abstract class TagAction implements Action {
16 | @Override
17 | public void validate(JsonObject action) throws Exception {
18 | TagDao tagDao = new TagDao();
19 | String tagId = action.getString("tag");
20 | if (tagId == null) {
21 | throw new Exception("step.transitions.actions.tag is required");
22 | }
23 | List tagDtoList = tagDao.findByCriteria(new TagCriteria().setId(tagId), null);
24 | if (tagDtoList.size() != 1) {
25 | throw new Exception(tagId + " is not a valid tag");
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/util/authentication/AuthenticationHandler.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.util.authentication;
2 |
3 | import com.sismics.docs.core.model.jpa.User;
4 |
5 | /**
6 | * An authentication handler.
7 | *
8 | * @author bgamard
9 | */
10 | public interface AuthenticationHandler {
11 | /**
12 | * Authenticate a user.
13 | *
14 | * @param username Username
15 | * @param password Password
16 | * @return Authenticated user
17 | */
18 | User authenticate(String username, String password);
19 | }
20 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/util/authentication/InternalAuthenticationHandler.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.util.authentication;
2 |
3 | import com.sismics.docs.core.dao.UserDao;
4 | import com.sismics.docs.core.model.jpa.User;
5 | import com.sismics.util.ClasspathScanner;
6 |
7 | /**
8 | * Authenticate using the internal database.
9 | *
10 | * @author bgamard
11 | */
12 | @ClasspathScanner.Priority(100) // We can add handlers before this one
13 | public class InternalAuthenticationHandler implements AuthenticationHandler {
14 | @Override
15 | public User authenticate(String username, String password) {
16 | UserDao userDao = new UserDao();
17 | return userDao.authenticate(username, password);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/util/jpa/QueryParam.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.util.jpa;
2 |
3 | import java.util.Map;
4 |
5 | /**
6 | * Query parameters.
7 | *
8 | * @author jtremeaux
9 | */
10 | public class QueryParam {
11 |
12 | /**
13 | * Query string.
14 | */
15 | private String queryString;
16 |
17 | /**
18 | * Query parameters.
19 | */
20 | private Map parameterMap;
21 |
22 | /**
23 | * Constructor of QueryParam.
24 | *
25 | * @param queryString Query string
26 | * @param parameterMap Query parameters
27 | */
28 | public QueryParam(String queryString, Map parameterMap) {
29 | this.queryString = queryString;
30 | this.parameterMap = parameterMap;
31 | }
32 |
33 | /**
34 | * Getter of queryString.
35 | *
36 | * @return queryString
37 | */
38 | public String getQueryString() {
39 | return queryString;
40 | }
41 |
42 | /**
43 | * Getter of parameterMap.
44 | *
45 | * @return parameterMap
46 | */
47 | public Map getParameterMap() {
48 | return parameterMap;
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/docs/core/util/jpa/SortCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.util.jpa;
2 |
3 | /**
4 | * Sort criteria of a query.
5 | *
6 | * @author jtremeaux
7 | */
8 | public class SortCriteria {
9 | /**
10 | * Index of the column to sort (first is 0).
11 | */
12 | private int column;
13 |
14 | /**
15 | * Sort in increasing order (or else decreasing).
16 | */
17 | private boolean asc = true;
18 |
19 | /**
20 | * Constructor of sortCriteria.
21 | */
22 | public SortCriteria(Integer column, Boolean asc) {
23 | if (column != null) {
24 | this.column = column;
25 | }
26 | if (asc != null) {
27 | this.asc = asc;
28 | }
29 | }
30 |
31 | /**
32 | * Getter of column.
33 | *
34 | * @return column
35 | */
36 | public int getColumn() {
37 | return column;
38 | }
39 |
40 | /**
41 | * Getter of asc.
42 | *
43 | * @return asc
44 | */
45 | public boolean isAsc() {
46 | return asc;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/util/HttpUtil.java:
--------------------------------------------------------------------------------
1 | package com.sismics.util;
2 |
3 | import java.text.SimpleDateFormat;
4 | import java.util.Date;
5 | import java.util.Locale;
6 |
7 | /**
8 | * HTTP request utilities.
9 | *
10 | * @author jtremeaux
11 | */
12 | public class HttpUtil {
13 | /**
14 | * Format of the expires header.
15 | */
16 | private static final SimpleDateFormat EXPIRES_FORMAT = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.ENGLISH);
17 |
18 | /**
19 | * Build an Expires HTTP header.
20 | *
21 | * @param futureTime Expire interval
22 | * @return Formatted header value
23 | */
24 | public static String buildExpiresHeader(long futureTime) {
25 | return EXPIRES_FORMAT.format(new Date().getTime() + futureTime);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/util/LocaleUtil.java:
--------------------------------------------------------------------------------
1 | package com.sismics.util;
2 |
3 | import com.google.common.base.Strings;
4 |
5 | import java.util.Locale;
6 |
7 | /**
8 | * Locale utilities.
9 | *
10 | * @author jtremeaux
11 | */
12 | public class LocaleUtil {
13 | /**
14 | * Returns a locale from the language / country / variation code (ex: fr_FR).
15 | *
16 | * @param localeCode Locale code
17 | * @return Locale instance
18 | */
19 | public static Locale getLocale(String localeCode) {
20 | if (Strings.isNullOrEmpty(localeCode)) {
21 | return Locale.ENGLISH;
22 | }
23 |
24 | String[] localeCodeArray = localeCode.split("_");
25 | String language = localeCodeArray[0];
26 | String country = "";
27 | String variant = "";
28 | if (localeCodeArray.length >= 2) {
29 | country = localeCodeArray[1];
30 | }
31 | if (localeCodeArray.length >= 3) {
32 | variant = localeCodeArray[2];
33 | }
34 | return new Locale(language, country, variant);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/util/css/Rule.java:
--------------------------------------------------------------------------------
1 | package com.sismics.util.css;
2 |
3 | /**
4 | * A CSS rule.
5 | *
6 | * @author bgamard
7 | */
8 | public class Rule {
9 | /**
10 | * Rule separator.
11 | */
12 | private static String SEPARATOR = ": ";
13 |
14 | /**
15 | * CSS rule property name.
16 | */
17 | private String property;
18 |
19 | /**
20 | * CSS rule value.
21 | */
22 | private String value;
23 |
24 | /**
25 | * Create a new CSS rule.
26 | *
27 | * @param property Property name
28 | * @param value Value
29 | */
30 | public Rule(String property, String value) {
31 | this.property = property;
32 | this.value = value;
33 | }
34 |
35 | @Override
36 | public String toString() {
37 | return property + SEPARATOR + value;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/docs-core/src/main/java/com/sismics/util/log4j/LogCriteria.java:
--------------------------------------------------------------------------------
1 | package com.sismics.util.log4j;
2 |
3 | import org.apache.commons.lang3.StringUtils;
4 | import org.apache.log4j.Level;
5 |
6 | /**
7 | * Log search criteria.
8 | *
9 | * @author jtremeaux
10 | */
11 | public class LogCriteria {
12 |
13 | /**
14 | * Minimum logging level (DEBUG, WARN)...
15 | */
16 | private Level minLevel;
17 |
18 | /**
19 | * Logger name / tag.
20 | */
21 | private String tag;
22 |
23 | /**
24 | * Message logged.
25 | */
26 | private String message;
27 |
28 | public Level getMinLevel() {
29 | return minLevel;
30 | }
31 |
32 | public LogCriteria setMinLevel(Level level) {
33 | this.minLevel = level;
34 | return this;
35 | }
36 |
37 | public String getTag() {
38 | return tag;
39 | }
40 |
41 | public LogCriteria setTag(String tag) {
42 | this.tag = StringUtils.lowerCase(tag);
43 | return this;
44 | }
45 |
46 | public String getMessage() {
47 | return message;
48 | }
49 |
50 | public LogCriteria setMessage(String message) {
51 | this.message = StringUtils.lowerCase(message);
52 | return this;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/META-INF/persistence.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | org.hibernate.jpa.HibernatePersistenceProvider
8 |
9 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/config.properties:
--------------------------------------------------------------------------------
1 | db.version=31
2 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-001-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_USER drop column USE_IDLOCALE_C;
2 | alter table T_USER drop column USE_THEME_C;
3 | alter table T_USER drop column USE_FIRSTCONNECTION_B;
4 | drop table T_LOCALE;
5 | update T_CONFIG set CFG_VALUE_C = '1' where CFG_ID_C = 'DB_VERSION';
6 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-002-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_TAG add column TAG_IDPARENT_C varchar(36);
2 | update T_CONFIG set CFG_VALUE_C = '2' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-003-0.sql:
--------------------------------------------------------------------------------
1 | create cached table T_COMMENT ( COM_ID_C varchar(36) not null, COM_IDDOC_C varchar(36) not null, COM_IDUSER_C varchar(36) not null, COM_CONTENT_C varchar(4000) not null, COM_CREATEDATE_D datetime, COM_DELETEDATE_D datetime, primary key (COM_ID_C) );
2 | alter table T_COMMENT add constraint FK_COM_IDDOC_C foreign key (COM_IDDOC_C) references T_DOCUMENT (DOC_ID_C) on delete restrict on update restrict;
3 | alter table T_COMMENT add constraint FK_COM_IDUSER_C foreign key (COM_IDUSER_C) references T_USER (USE_ID_C) on delete restrict on update restrict;
4 | update T_CONFIG set CFG_VALUE_C = '3' where CFG_ID_C = 'DB_VERSION';
5 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-004-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_USER add column USE_STORAGEQUOTA_N bigint not null default 10000000000;
2 | alter table T_USER add column USE_STORAGECURRENT_N bigint not null default 0;
3 | update T_CONFIG set CFG_VALUE_C = '4' where CFG_ID_C = 'DB_VERSION';
4 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-005-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_FILE alter column FIL_IDUSER_C set not null;
2 | update T_CONFIG set CFG_VALUE_C = '5' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-007-0.sql:
--------------------------------------------------------------------------------
1 | create cached table T_RELATION ( REL_ID_C varchar(36) not null, REL_IDDOCFROM_C varchar(36) not null, REL_IDDOCTO_C varchar(36) not null, REL_DELETEDATE_D datetime, primary key (REL_ID_C) );
2 |
3 | update T_CONFIG set CFG_VALUE_C = '7' where CFG_ID_C = 'DB_VERSION';
4 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-008-0.sql:
--------------------------------------------------------------------------------
1 | create memory table T_GROUP ( GRP_ID_C varchar(36) not null, GRP_IDPARENT_C varchar(36), GRP_NAME_C varchar(50) not null, GRP_IDROLE_C varchar(36), GRP_DELETEDATE_D datetime, primary key (GRP_ID_C) );
2 | create memory table T_USER_GROUP ( UGP_ID_C varchar(36) not null, UGP_IDUSER_C varchar(36) not null, UGP_IDGROUP_C varchar(36) not null, UGP_DELETEDATE_D datetime, primary key (UGP_ID_C) );
3 |
4 | insert into T_GROUP(GRP_ID_C, GRP_NAME_C, GRP_IDROLE_C) values('administrators', 'administrators', 'admin');
5 | insert into T_USER_GROUP(UGP_ID_C, UGP_IDUSER_C, UGP_IDGROUP_C) values('admin-administrators', 'admin', 'administrators');
6 |
7 | update T_CONFIG set CFG_VALUE_C = '8' where CFG_ID_C = 'DB_VERSION';
8 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-009-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_USER add column USE_TOTPKEY_C varchar(100);
2 | update T_CONFIG set CFG_VALUE_C = '9' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-010-0.sql:
--------------------------------------------------------------------------------
1 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('GUEST_LOGIN', 'false');
2 | insert into T_USER(USE_ID_C, USE_IDROLE_C, USE_USERNAME_C, USE_PASSWORD_C, USE_EMAIL_C, USE_CREATEDATE_D, USE_PRIVATEKEY_C) values('guest', 'user', 'guest', '', 'guest@localhost', NOW(), 'GuestPk');
3 | update T_CONFIG set CFG_VALUE_C = '10' where CFG_ID_C = 'DB_VERSION';
4 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-011-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_FILE add column FIL_NAME_C varchar(200);
2 | update T_CONFIG set CFG_VALUE_C = '11' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-012-0.sql:
--------------------------------------------------------------------------------
1 | !H2!alter table T_DOCUMENT alter column DOC_LANGUAGE_C varchar(7) default 'eng' not null;
2 | !PGSQL!alter table T_DOCUMENT alter column DOC_LANGUAGE_C type varchar(7);
3 | !PGSQL!alter table T_DOCUMENT alter column DOC_LANGUAGE_C set default 'eng';
4 | !PGSQL!alter table T_DOCUMENT alter column DOC_LANGUAGE_C set not null;
5 | update T_CONFIG set CFG_VALUE_C = '12' where CFG_ID_C = 'DB_VERSION';
6 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-013-0.sql:
--------------------------------------------------------------------------------
1 | create cached table T_PASSWORD_RECOVERY ( PWR_ID_C varchar(36) not null, PWR_USERNAME_C varchar(50) not null, PWR_CREATEDATE_D datetime, PWR_DELETEDATE_D datetime, primary key (PWR_ID_C) );
2 | update T_CONFIG set CFG_VALUE_C = '13' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-014-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_USER add column USE_DISABLEDATE_D datetime;
2 | update T_CONFIG set CFG_VALUE_C = '14' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-016-0.sql:
--------------------------------------------------------------------------------
1 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('DEFAULT_LANGUAGE', 'eng');
2 | update T_CONFIG set CFG_VALUE_C = '16' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-017-0.sql:
--------------------------------------------------------------------------------
1 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_ENABLED', 'false');
2 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_HOSTNAME', '');
3 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_PORT', '993');
4 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_USERNAME', '');
5 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_PASSWORD', '');
6 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_TAG', '');
7 | update T_CONFIG set CFG_VALUE_C = '17' where CFG_ID_C = 'DB_VERSION';
8 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-018-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_DOCUMENT add column DOC_UPDATEDATE_D datetime;
2 | update T_DOCUMENT set DOC_UPDATEDATE_D = DOC_CREATEDATE_D;
3 | !H2!alter table T_DOCUMENT alter column DOC_UPDATEDATE_D datetime not null;
4 | !PGSQL!alter table T_DOCUMENT alter column DOC_UPDATEDATE_D type timestamp;
5 | !PGSQL!alter table T_DOCUMENT alter column DOC_UPDATEDATE_D set not null;
6 | alter table T_ROUTE_STEP add column RTP_TRANSITIONS_C varchar(2000);
7 | update T_CONFIG set CFG_VALUE_C = '18' where CFG_ID_C = 'DB_VERSION';
8 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-019-0.sql:
--------------------------------------------------------------------------------
1 | create index IDX_DOT_COMPOSITE on T_DOCUMENT_TAG (DOT_IDDOCUMENT_C, DOT_IDTAG_C, DOT_DELETEDATE_D);
2 | update T_CONFIG set CFG_VALUE_C = '19' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-020-0.sql:
--------------------------------------------------------------------------------
1 | create table T_WEBHOOK ( WHK_ID_C varchar(36) not null, WHK_EVENT_C varchar(50) not null, WHK_URL_C varchar(1024) not null, WHK_CREATEDATE_D datetime not null, WHK_DELETEDATE_D datetime, primary key (WHK_ID_C) );
2 |
3 | update T_CONFIG set CFG_VALUE_C = '20' where CFG_ID_C = 'DB_VERSION';
4 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-021-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_DOCUMENT add column DOC_IDFILE_C varchar(36);
2 | alter table T_DOCUMENT add constraint FK_DOC_IDFILE_C foreign key (DOC_IDFILE_C) references T_FILE (FIL_ID_C) on delete restrict on update restrict;
3 |
4 | update T_CONFIG set CFG_VALUE_C = '21' where CFG_ID_C = 'DB_VERSION';
5 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-022-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_FILE add column FIL_VERSION_N int not null default 0;
2 | alter table T_FILE add column FIL_LATESTVERSION_B bit not null default 1;
3 | alter table T_FILE add column FIL_IDVERSION_C varchar(36);
4 |
5 | update T_CONFIG set CFG_VALUE_C = '22' where CFG_ID_C = 'DB_VERSION';
6 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-023-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_USER add column USE_ONBOARDING_B bit not null default 1;
2 | update T_CONFIG set CFG_VALUE_C = '23' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-024-0.sql:
--------------------------------------------------------------------------------
1 | create cached table T_METADATA ( MET_ID_C varchar(36) not null, MET_NAME_C varchar(50) not null, MET_TYPE_C varchar(20) not null, MET_DELETEDATE_D datetime, primary key (MET_ID_C) );
2 | create cached table T_DOCUMENT_METADATA ( DME_ID_C varchar(36) not null, DME_IDDOCUMENT_C varchar(36) not null, DME_IDMETADATA_C varchar(36) not null, DME_VALUE_C varchar(4000) null, primary key (DME_ID_C) );
3 | alter table T_DOCUMENT_METADATA add constraint FK_DME_IDDOCUMENT_C foreign key (DME_IDDOCUMENT_C) references T_DOCUMENT (DOC_ID_C) on delete restrict on update restrict;
4 | alter table T_DOCUMENT_METADATA add constraint FK_DME_IDMETADATA_C foreign key (DME_IDMETADATA_C) references T_METADATA (MET_ID_C) on delete restrict on update restrict;
5 | update T_CONFIG set CFG_VALUE_C = '24' where CFG_ID_C = 'DB_VERSION';
6 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-025-0.sql:
--------------------------------------------------------------------------------
1 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_AUTOMATIC_TAGS', 'false');
2 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_DELETE_IMPORTED', 'false');
3 | update T_CONFIG set CFG_VALUE_C = '25' where CFG_ID_C = 'DB_VERSION';
4 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-026-0.sql:
--------------------------------------------------------------------------------
1 | !PGSQL!UPDATE t_file SET fil_content_c = convert_from(loread(lo_open(fil_content_c::int, CAST( x'20000' AS integer)), 999999999), 'UNICODE')::TEXT WHERE fil_content_c IS NOT NULL;
2 | update T_CONFIG set CFG_VALUE_C = '26' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-027-0.sql:
--------------------------------------------------------------------------------
1 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_FOLDER', 'INBOX');
2 | update T_CONFIG set CFG_VALUE_C = '27' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-028-0.sql:
--------------------------------------------------------------------------------
1 | insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_STARTTLS', 'false');
2 | update T_CONFIG set CFG_VALUE_C = '28' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-029-0.sql:
--------------------------------------------------------------------------------
1 | alter table T_FILE add column FIL_SIZE_N bigint not null default -1;
2 | update T_CONFIG set CFG_VALUE_C = '29' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-030-0.sql:
--------------------------------------------------------------------------------
1 | create index IDX_FIL_IDDOC_C ON T_FILE (FIL_IDDOC_C ASC);
2 | update T_CONFIG set CFG_VALUE_C = '30' where CFG_ID_C = 'DB_VERSION';
3 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/db/update/dbupdate-031-0.sql:
--------------------------------------------------------------------------------
1 | -- DBUPDATE-031-0.SQL
2 |
3 | -- Insert a new setting for OCR recognition
4 | insert into T_CONFIG (CFG_ID_C, CFG_VALUE_C) values ('OCR_ENABLED', 'true');
5 |
6 | -- Update the database version
7 | update T_CONFIG set CFG_VALUE_C = '31' where CFG_ID_C = 'DB_VERSION';
8 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/email_template/layout.ftl:
--------------------------------------------------------------------------------
1 | <#macro email>
2 |
3 |
4 |
5 | ${app_name}
6 | |
7 |
8 |
9 |
10 |
11 | <#nested>
12 |
13 | |
14 |
15 |
16 | #macro>
--------------------------------------------------------------------------------
/docs-core/src/main/resources/email_template/password_recovery/template.ftl:
--------------------------------------------------------------------------------
1 | <#import "../layout.ftl" as layout>
2 | <@layout.email>
3 | ${app_name} - ${messages['email.template.password_recovery.subject']}
4 | ${messages('email.template.password_recovery.hello', user_name)}
5 | ${messages['email.template.password_recovery.instruction1']}
6 | ${messages['email.template.password_recovery.instruction2']}
7 | ${messages['email.template.password_recovery.click_here']}
8 | @layout.email>
--------------------------------------------------------------------------------
/docs-core/src/main/resources/email_template/route_step_validate/template.ftl:
--------------------------------------------------------------------------------
1 | <#import "../layout.ftl" as layout>
2 | <@layout.email>
3 | ${app_name} - ${messages['email.template.route_step_validate.subject']}
4 | ${messages('email.template.route_step_validate.hello', user_name)}
5 | ${messages['email.template.route_step_validate.instruction1']}
6 | ${messages['email.template.route_step_validate.instruction2']}
7 | ${document_title}
8 | @layout.email>
--------------------------------------------------------------------------------
/docs-core/src/main/resources/fonts/LiberationMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/main/resources/fonts/LiberationMono-Regular.ttf
--------------------------------------------------------------------------------
/docs-core/src/main/resources/messages.properties:
--------------------------------------------------------------------------------
1 | email.template.password_recovery.subject=Please reset your password
2 | email.template.password_recovery.hello=Hello {0}.
3 | email.template.password_recovery.instruction1=We have received a request to reset your password.
If you did not request help, then feel free to ignore this email.
4 | email.template.password_recovery.instruction2=To reset your password, please visit the link below:
5 | email.template.password_recovery.click_here=Click here to reset your password
6 | email.template.route_step_validate.subject=A document needs your attention
7 | email.template.route_step_validate.hello=Hello {0}.
8 | email.template.route_step_validate.instruction1=A workflow step has been assigned to you and needs your attention.
9 | email.template.route_step_validate.instruction2=To view the document and validate the workflow, please visit the link below:
10 | email.no_html.error=Your email client does not support HTML messages
--------------------------------------------------------------------------------
/docs-core/src/main/resources/messages_de.properties:
--------------------------------------------------------------------------------
1 | email.template.password_recovery.subject=Bitte setzen Sie ihr Passwort zur\u00FCck
2 | email.template.password_recovery.hello=Hallo {0}.
3 | email.template.password_recovery.instruction1=Wir haben eine Anfrage zum Zur\u00FCcksetzen Ihres Passworts erhalten.
Wenn Sie keine Hilfe angefordert haben, können Sie diese E-Mail einfach ignorieren.
4 | email.template.password_recovery.instruction2=Um Ihr Passwort zur\u00FCckzusetzen, besuchen Sie bitte den folgenden Link:
5 | email.template.password_recovery.click_here=Klicken Sie hier, um Ihr Passwort zur\u00FCckzusetzen
6 | email.template.route_step_validate.subject=Ein Dokument braucht Ihre Aufmerksamkeit
7 | email.template.route_step_validate.hello=Hallo {0}.
8 | email.template.route_step_validate.instruction1=Ihnen wurde ein Workflow-Schritt zugewiesen, der Ihre Aufmerksamkeit erfordert.
9 | email.template.route_step_validate.instruction2=Um das Dokument anzuzeigen und den Workflow zu \u00FCberpr\u00FCfen, besuchen Sie bitte den folgenden Link:
10 | email.no_html.error=Ihr E-Mail-Client unterst\u00FCtzt keine HTML-Nachrichten
--------------------------------------------------------------------------------
/docs-core/src/main/resources/messages_fr.properties:
--------------------------------------------------------------------------------
1 | email.template.password_recovery.subject=R\u00E9initialiser votre mot de passe
2 | email.template.password_recovery.hello=Bonjour {0}.
3 | email.template.password_recovery.instruction1=Nous avons re\u00E7u une demande de r\u00E9initialisation de mot de passe.
Si vous n'avez rien demand\u00E9, vous pouvez ignorer cet mail.
4 | email.template.password_recovery.instruction2=Pour r\u00E9initialiser votre mot de passe, cliquez sur le lien ci-dessous :
5 | email.template.password_recovery.click_here=Cliquez ici pour r\u00E9initialiser votre mot de passe.
6 | email.template.route_step_validate.subject=Un document n\u00E9cessite votre attention
7 | email.template.route_step_validate.hello=Bonjour {0}.
8 | email.template.route_step_validate.instruction1=Une \u00E9tape de workflow vous a \u00E9t\u00E9 attribu\u00E9e et n\u00E9cessite votre attention.
9 | email.template.route_step_validate.instruction2=Pour voir le document et valider le workflow, veuillez visiter le lien ci-dessous :
10 | email.no_html.error=Votre client mail ne supporte pas les messages HTML
11 |
--------------------------------------------------------------------------------
/docs-core/src/main/resources/messages_pl.properties:
--------------------------------------------------------------------------------
1 | email.template.password_recovery.subject=Proszę zresetować swoje hasło
2 | email.template.password_recovery.hello=Witaj {0}.
3 | email.template.password_recovery.instruction1=Otrzymaliśmy żądanie zresetowania twojego hasła.
Jeśli to nie ty potrzebujesz pomocy, moóżesz zignorować ten email.
4 | email.template.password_recovery.instruction2=Aby zresetować swoje hasło, proszę naciśnij link poniżej:
5 | email.template.password_recovery.click_here=Naciśnij, aby zresetować swoje hasło
6 | email.template.route_step_validate.subject=Dokument potrzebuje twojej uwagi
7 | email.template.route_step_validate.hello=Witaj {0}.
8 | email.template.route_step_validate.instruction1=Został Ci przypisany etap przepływu i wymaga Twojej uwagi.
9 | email.template.route_step_validate.instruction2=Aby wyświetlić dokument i zweryfikować przepływ pracy, kliknij poniższy link:
10 | email.no_html.error=Twój klient poczty e-mail nie obsługuje wiadomości HTML
--------------------------------------------------------------------------------
/docs-core/src/test/java/com/sismics/docs/core/dao/jpa/TestJpa.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.dao.jpa;
2 |
3 | import com.sismics.docs.BaseTransactionalTest;
4 | import com.sismics.docs.core.dao.UserDao;
5 | import com.sismics.docs.core.model.jpa.User;
6 | import com.sismics.docs.core.util.TransactionUtil;
7 | import com.sismics.docs.core.util.authentication.InternalAuthenticationHandler;
8 | import org.junit.Assert;
9 | import org.junit.Test;
10 |
11 | /**
12 | * Tests the persistance layer.
13 | *
14 | * @author jtremeaux
15 | */
16 | public class TestJpa extends BaseTransactionalTest {
17 | @Test
18 | public void testJpa() throws Exception {
19 | // Create a user
20 | UserDao userDao = new UserDao();
21 | User user = createUser("testJpa");
22 |
23 | TransactionUtil.commit();
24 |
25 | // Search a user by his ID
26 | user = userDao.getById(user.getId());
27 | Assert.assertNotNull(user);
28 | Assert.assertEquals("toto@docs.com", user.getEmail());
29 |
30 | // Authenticate using the database
31 | Assert.assertNotNull(new InternalAuthenticationHandler().authenticate("testJpa", "12345678"));
32 |
33 | // Delete the created user
34 | userDao.delete("testJpa", user.getId());
35 | TransactionUtil.commit();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/docs-core/src/test/java/com/sismics/docs/core/service/TestFileSizeService.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.core.service;
2 |
3 | import com.sismics.docs.BaseTransactionalTest;
4 | import com.sismics.docs.core.dao.FileDao;
5 | import com.sismics.docs.core.model.jpa.File;
6 | import com.sismics.docs.core.model.jpa.User;
7 | import org.junit.Assert;
8 | import org.junit.Test;
9 |
10 | public class TestFileSizeService extends BaseTransactionalTest {
11 |
12 | @Test
13 | public void processFileTest() throws Exception {
14 | User user = createUser("processFileTest");
15 |
16 | FileDao fileDao = new FileDao();
17 | File file = createFile(user, File.UNKNOWN_SIZE);
18 | FileSizeService fileSizeService = new FileSizeService();
19 | fileSizeService.processFile(file);
20 | Assert.assertEquals(fileDao.getFile(file.getId()).getSize(), Long.valueOf(FILE_JPG_SIZE));
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/docs-core/src/test/java/com/sismics/util/TestCss.java:
--------------------------------------------------------------------------------
1 | package com.sismics.util;
2 |
3 | import org.junit.Test;
4 |
5 | import com.sismics.util.css.Selector;
6 |
7 | /**
8 | * Test of CSS utilities.
9 | *
10 | * @author bgamard
11 | */
12 | public class TestCss {
13 | @Test
14 | public void testBuildCss() {
15 | Selector selector = new Selector(".test")
16 | .rule("background-color", "yellow")
17 | .rule("font-family", "Comic Sans");
18 | System.out.println(selector);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/docs-core/src/test/java/com/sismics/util/TestGoogleAuthenticator.java:
--------------------------------------------------------------------------------
1 | package com.sismics.util;
2 |
3 | import java.util.Date;
4 |
5 | import org.junit.Assert;
6 | import org.junit.Test;
7 |
8 | import com.sismics.util.totp.GoogleAuthenticator;
9 | import com.sismics.util.totp.GoogleAuthenticatorKey;
10 |
11 | /**
12 | * Test of {@link GoogleAuthenticator}
13 | *
14 | * @author bgamard
15 | */
16 | public class TestGoogleAuthenticator {
17 | @Test
18 | public void testGoogleAuthenticator() {
19 | GoogleAuthenticator gAuth = new GoogleAuthenticator();
20 | GoogleAuthenticatorKey key = gAuth.createCredentials();
21 | Assert.assertNotNull(key.getVerificationCode());
22 | Assert.assertEquals(5, key.getScratchCodes().size());
23 | int validationCode = gAuth.calculateCode(key.getKey(), new Date().getTime() / 30000);
24 | Assert.assertTrue(gAuth.authorize(key.getKey(), validationCode));
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/docs-core/src/test/java/com/sismics/util/TestImageUtil.java:
--------------------------------------------------------------------------------
1 | package com.sismics.util;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 |
6 | /**
7 | * Test of the image utilities.
8 | *
9 | * @author bgamard
10 | */
11 | public class TestImageUtil {
12 |
13 | @Test
14 | public void computeGravatarTest() {
15 | Assert.assertEquals("0bc83cb571cd1c50ba6f3e8a78ef1346", ImageUtil.computeGravatar("MyEmailAddress@example.com "));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/docs-core/src/test/java/com/sismics/util/TestResourceUtil.java:
--------------------------------------------------------------------------------
1 | package com.sismics.util;
2 |
3 | import org.junit.Assert;
4 | import org.junit.Test;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | * Test of the resource utils.
10 | *
11 | * @author jtremeaux
12 | */
13 | public class TestResourceUtil {
14 |
15 | @Test
16 | public void listFilesTest() throws Exception {
17 | List fileList = ResourceUtil.list(Test.class, "/junit/framework");
18 | Assert.assertTrue(fileList.contains("Test.class"));
19 |
20 | fileList = ResourceUtil.list(Test.class, "/junit/framework/");
21 | Assert.assertTrue(fileList.contains("Test.class"));
22 |
23 | fileList = ResourceUtil.list(Test.class, "junit/framework/");
24 | Assert.assertTrue(fileList.contains("Test.class"));
25 |
26 | fileList = ResourceUtil.list(Test.class, "junit/framework/");
27 | Assert.assertTrue(fileList.contains("Test.class"));
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/docs-core/src/test/java/com/sismics/util/format/TestPdfFormatHandler.java:
--------------------------------------------------------------------------------
1 | package com.sismics.util.format;
2 |
3 | import com.sismics.BaseTest;
4 | import com.sismics.docs.core.util.format.PdfFormatHandler;
5 | import org.junit.Assert;
6 | import org.junit.Test;
7 |
8 | import java.nio.file.Paths;
9 |
10 | /**
11 | * Test of {@link PdfFormatHandler}
12 | *
13 | * @author bgamard
14 | */
15 | public class TestPdfFormatHandler extends BaseTest {
16 | /**
17 | * Test related to https://github.com/sismics/docs/issues/373.
18 | */
19 | @Test
20 | public void testIssue373() throws Exception {
21 | PdfFormatHandler formatHandler = new PdfFormatHandler();
22 | String content = formatHandler.extractContent("deu", Paths.get(getResource("issue373.pdf").toURI()));
23 | Assert.assertTrue(content.contains("Aufrechterhaltung"));
24 | Assert.assertTrue(content.contains("Außentemperatur"));
25 | Assert.assertTrue(content.contains("Grundumsatzmessungen"));
26 | Assert.assertTrue(content.contains("ermitteln"));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/apache.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/apache.pptx
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/apollo_landscape.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/apollo_landscape.jpg
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/apollo_portrait.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/apollo_portrait.jpg
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/document.csv:
--------------------------------------------------------------------------------
1 | col1,col2
2 | test,me
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/document.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/document.docx
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/document.odt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/document.odt
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/document.txt:
--------------------------------------------------------------------------------
1 | test me.
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/document.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/document.xlsx
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/document.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/document.zip
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/image.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/image.gif
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/image.png
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/issue373.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/issue373.pdf
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/scanned.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/scanned.pdf
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/udhr.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/udhr.pdf
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/udhr_encrypted.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/udhr_encrypted.pdf
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/video.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/video.mp4
--------------------------------------------------------------------------------
/docs-core/src/test/resources/file/video.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-core/src/test/resources/file/video.webm
--------------------------------------------------------------------------------
/docs-core/src/test/resources/hibernate.properties:
--------------------------------------------------------------------------------
1 | hibernate.connection.driver_class=org.h2.Driver
2 | hibernate.connection.url=jdbc:h2:mem:docs
3 | hibernate.connection.username=sa
4 | hibernate.connection.password=
5 | hibernate.hbm2ddl.auto=
6 | hibernate.dialect=org.hibernate.dialect.HSQLDialect
7 | hibernate.show_sql=true
8 | hibernate.format_sql=false
9 | hibernate.max_fetch_depth=5
10 | hibernate.cache.use_second_level_cache=false
11 | hibernate.connection.initial_pool_size=1
12 | hibernate.connection.pool_size=10
13 | hibernate.connection.pool_validation_interval=5
--------------------------------------------------------------------------------
/docs-core/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootCategory=DEBUG, CONSOLE, MEMORY
2 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
3 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
4 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{DATE} %p %l %m %n
5 | log4j.appender.MEMORY=com.sismics.util.log4j.MemoryAppender
6 | log4j.appender.MEMORY.size=1000
7 |
8 | log4j.logger.com.sismics=INFO
9 | log4j.logger.org.hibernate=ERROR
10 | log4j.logger.org.apache.directory=ERROR
--------------------------------------------------------------------------------
/docs-importer/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:14.2-alpine AS builder
2 | WORKDIR /build
3 | COPY main.js package-lock.json package.json ./
4 | RUN npm install && npm install -g pkg
5 | RUN pkg -t node14-alpine-x64 .
6 |
7 | FROM alpine
8 | ENV TEEDY_TAG= TEEDY_ADDTAGS=false TEEDY_LANG=eng TEEDY_URL='http://localhost:8080' TEEDY_USERNAME=username TEEDY_PASSWORD=password TEEDY_COPYFOLDER= TEEDY_FILEFILTER=*
9 | RUN apk add --no-cache \
10 | libc6-compat \
11 | libstdc++
12 | ADD pref /root/.config/preferences/com.sismics.docs.importer.pref
13 | ADD env.sh /
14 | COPY --from=builder /build/teedy-importer ./
15 |
16 | CMD ["/bin/ash","-c","/env.sh && /teedy-importer -d"]
17 |
--------------------------------------------------------------------------------
/docs-importer/SismicsDocs.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-importer/SismicsDocs.ico
--------------------------------------------------------------------------------
/docs-importer/env.sh:
--------------------------------------------------------------------------------
1 | #!/bin/ash
2 | file=/root/.config/preferences/com.sismics.docs.importer.pref
3 | sed -i "s/env1/$TEEDY_TAG/g" $file
4 | sed -i "s/env2/$TEEDY_ADDTAGS/g" $file
5 | sed -i "s/env3/$TEEDY_LANG/g" $file
6 | sed -i "s,env4,$TEEDY_URL,g" $file
7 | sed -i "s/env5/$TEEDY_USERNAME/g" $file
8 | sed -i "s/env6/$TEEDY_PASSWORD/g" $file
9 | sed -i "s,env7,$TEEDY_COPYFOLDER,g" $file
10 | sed -i "s,env8,$TEEDY_FILEFILTER,g" $file
11 | echo "Environment variables replaced"
--------------------------------------------------------------------------------
/docs-importer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "teedy-importer",
3 | "version": "1.9.0",
4 | "description": "Import files to Teedy",
5 | "bin": "main.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/sismics/docs.git"
12 | },
13 | "author": "Benjamin Gamard",
14 | "contributors": [
15 | "Cornelius Hoffmann "
16 | ],
17 | "license": "GPL-2.0",
18 | "bugs": {
19 | "url": "https://github.com/sismics/docs/issues"
20 | },
21 | "homepage": "https://github.com/sismics/docs#readme",
22 | "dependencies": {
23 | "inquirer": "^5.1.0",
24 | "minimist": "^1.2.5",
25 | "ora": "^2.0.0",
26 | "preferences": "^1.0.2",
27 | "qs": "^6.9.4",
28 | "recursive-readdir": "^2.2.2",
29 | "minimatch": "^3.0.4",
30 | "request": "^2.83.0",
31 | "underscore": "^1.8.3"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/docs-importer/pref:
--------------------------------------------------------------------------------
1 | importer:
2 | daemon: true
3 | path: import
4 | tag: 'env1'
5 | addtags: 'env2'
6 | lang: 'env3'
7 | baseUrl: 'env4'
8 | username: 'env5'
9 | password: 'env6'
10 | copyFolder: 'env7'
11 | fileFilter: 'env8'
--------------------------------------------------------------------------------
/docs-web-common/src/main/java/com/sismics/rest/exception/ForbiddenClientException.java:
--------------------------------------------------------------------------------
1 | package com.sismics.rest.exception;
2 |
3 | import jakarta.json.Json;
4 | import jakarta.ws.rs.WebApplicationException;
5 | import jakarta.ws.rs.core.Response;
6 | import jakarta.ws.rs.core.Response.Status;
7 |
8 | /**
9 | * Unauthorized access to the resource exception.
10 | *
11 | * @author jtremeaux
12 | */
13 | public class ForbiddenClientException extends WebApplicationException {
14 | /**
15 | * Serial UID.
16 | */
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * Constructor of ForbiddenClientException.
21 | */
22 | public ForbiddenClientException() {
23 | super(Response.status(Status.FORBIDDEN).entity(Json.createObjectBuilder()
24 | .add("type", "ForbiddenError")
25 | .add("message", "You don't have access to this resource").build()).build());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/docs-web-common/src/test/java/com/sismics/docs/rest/util/TestValidationUtil.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.rest.util;
2 |
3 | import com.sismics.rest.exception.ClientException;
4 | import com.sismics.rest.util.ValidationUtil;
5 | import org.junit.Assert;
6 | import org.junit.Test;
7 |
8 | /**
9 | * Test the validations.
10 | *
11 | * @author jtremeaux
12 | */
13 | public class TestValidationUtil {
14 | @Test
15 | public void testValidateHttpUrlFail() throws Exception {
16 | ValidationUtil.validateHttpUrl("http://www.google.com", "url");
17 | ValidationUtil.validateHttpUrl("https://www.google.com", "url");
18 | ValidationUtil.validateHttpUrl(" https://www.google.com ", "url");
19 | try {
20 | ValidationUtil.validateHttpUrl("ftp://www.google.com", "url");
21 | Assert.fail();
22 | } catch (ClientException e) {
23 | // NOP
24 | }
25 | try {
26 | ValidationUtil.validateHttpUrl("http://", "url");
27 | Assert.fail();
28 | } catch (ClientException e) {
29 | // NOP
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/docs-web/src/dev/main/webapp/web-override.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 | default
11 |
12 | useFileMappedBuffer
13 | false
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/docs-web/src/dev/resources/config.properties:
--------------------------------------------------------------------------------
1 | api.current_version=${project.version}
2 | api.min_version=1.0
3 | db.version=31
4 |
--------------------------------------------------------------------------------
/docs-web/src/dev/resources/hibernate.properties:
--------------------------------------------------------------------------------
1 | hibernate.connection.driver_class=org.h2.Driver
2 | hibernate.connection.url=jdbc:h2:mem:docs
3 | hibernate.connection.username=sa
4 | hibernate.connection.password=
5 | hibernate.hbm2ddl.auto=
6 | hibernate.dialect=org.hibernate.dialect.HSQLDialect
7 | hibernate.show_sql=false
8 | hibernate.format_sql=false
9 | hibernate.max_fetch_depth=5
10 | hibernate.cache.use_second_level_cache=false
11 | hibernate.connection.initial_pool_size=1
12 | hibernate.connection.pool_size=10
13 | hibernate.connection.pool_validation_interval=5
14 |
--------------------------------------------------------------------------------
/docs-web/src/dev/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootCategory=WARN, CONSOLE, MEMORY
2 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
3 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
4 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{DATE} %p %l %m %n
5 | log4j.appender.MEMORY=com.sismics.util.log4j.MemoryAppender
6 | log4j.appender.MEMORY.size=1000
7 |
8 | log4j.logger.com.sismics=DEBUG
9 | log4j.logger.org.apache.pdfbox=ERROR
10 | log4j.logger.org.glassfish.jersey.servlet.WebComponent=ERROR
11 | log4j.logger.org.apache.directory=ERROR
--------------------------------------------------------------------------------
/docs-web/src/main/java/com/sismics/docs/rest/constant/BaseFunction.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.rest.constant;
2 |
3 | /**
4 | * Base functions.
5 | *
6 | * @author jtremeaux
7 | */
8 | public enum BaseFunction {
9 |
10 | /**
11 | * Allows the user to use the admin fonctions.
12 | */
13 | ADMIN
14 | }
15 |
--------------------------------------------------------------------------------
/docs-web/src/main/resources/image/background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/resources/image/background.jpg
--------------------------------------------------------------------------------
/docs-web/src/main/resources/image/file-thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/resources/image/file-thumb.png
--------------------------------------------------------------------------------
/docs-web/src/main/resources/image/file-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/resources/image/file-web.png
--------------------------------------------------------------------------------
/docs-web/src/main/resources/image/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/resources/image/logo.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/.gitignore:
--------------------------------------------------------------------------------
1 | sismicsdocs
2 | node_modules
3 | dist
4 | .idea
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/Footer.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Footer controller.
5 | */
6 | angular.module('docs').controller('Footer', function($scope, $rootScope, Restangular, $translate, timeAgoSettings, tmhDynamicLocale, $locale) {
7 | // Load app data
8 | Restangular.one('app').get().then(function(data) {
9 | $rootScope.app = data;
10 | });
11 |
12 | // Save the current language to local storage
13 | $rootScope.$on('$translateChangeSuccess', function() {
14 | $scope.currentLang = $translate.use();
15 | timeAgoSettings.overrideLang = $scope.currentLang;
16 | localStorage.overrideLang = $scope.currentLang;
17 | tmhDynamicLocale.set($scope.currentLang).then(function () {
18 | $rootScope.dateFormat = $locale.DATETIME_FORMATS.shortDate;
19 | $rootScope.dateTimeFormat = $locale.DATETIME_FORMATS.short;
20 | });
21 | });
22 |
23 | // Change the current language
24 | $scope.changeLanguage = function(lang) {
25 | $translate.use(lang);
26 | };
27 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/Main.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Main controller.
5 | */
6 | angular.module('docs').controller('Main', function($scope, $rootScope, $state, User) {
7 | User.userInfo().then(function(data) {
8 | if (data.anonymous) {
9 | $state.go('login', {}, {
10 | location: 'replace'
11 | });
12 | } else {
13 | $state.go('document.default', {}, {
14 | location: 'replace'
15 | });
16 | }
17 | });
18 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/ModalFeedback.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Modal feedback controller.
5 | */
6 | angular.module('docs').controller('ModalFeedback', function ($scope, $uibModalInstance) {
7 | $scope.content = '';
8 | $scope.close = function(content) {
9 | $uibModalInstance.close(content);
10 | }
11 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/ModalPasswordLost.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Modal password lost controller.
5 | */
6 | angular.module('docs').controller('ModalPasswordLost', function ($scope, $uibModalInstance) {
7 | $scope.username = '';
8 | $scope.close = function(username) {
9 | $uibModalInstance.close(username);
10 | }
11 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/Navigation.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Navigation controller.
5 | */
6 | angular.module('docs').controller('Navigation', function($scope, $state, $stateParams, $rootScope, User) {
7 | User.userInfo().then(function(data) {
8 | $rootScope.userInfo = data;
9 | if (data.anonymous) {
10 | if($state.current.name !== 'login') {
11 | $state.go('login', {
12 | redirectState: $state.current.name,
13 | redirectParams: JSON.stringify($stateParams),
14 | }, {
15 | location: 'replace'
16 | });
17 | }
18 | }
19 | });
20 |
21 | /**
22 | * User logout.
23 | */
24 | $scope.logout = function($event) {
25 | User.logout().then(function() {
26 | User.userInfo(true).then(function(data) {
27 | $rootScope.userInfo = data;
28 | });
29 | $state.go('main');
30 | });
31 | $event.preventDefault();
32 | };
33 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/PasswordReset.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Password reset controller.
5 | */
6 | angular.module('docs').controller('PasswordReset', function($scope, Restangular, $state, $stateParams, $translate, $dialog) {
7 | $scope.submit = function () {
8 | Restangular.one('user').post('password_reset', {
9 | key: $stateParams.key,
10 | password: $scope.password
11 | }).then(function () {
12 | $state.go('login');
13 | }, function () {
14 | var title = $translate.instant('passwordreset.error_title');
15 | var msg = $translate.instant('passwordreset.error_message');
16 | var btns = [{result: 'ok', label: $translate.instant('ok'), cssClass: 'btn-primary'}];
17 | $dialog.messageBox(title, msg, btns);
18 | });
19 | };
20 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentModalAddTag.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Document modal add tag controller.
5 | */
6 | angular.module('docs').controller('DocumentModalAddTag', function ($scope, $uibModalInstance) {
7 | $scope.tag = { name: '', color: '#3a87ad' };
8 | $scope.close = function(tag) {
9 | $uibModalInstance.close(tag);
10 | }
11 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentModalPdf.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Document modal PDF controller.
5 | */
6 | angular.module('docs').controller('DocumentModalPdf', function ($scope, $window, $stateParams, $uibModalInstance) {
7 | $scope.export = {
8 | metadata: false,
9 | comments: false,
10 | fitimagetopage: true,
11 | margin: 10
12 | };
13 |
14 | // Export to PDF
15 | $scope.exportPdf = function() {
16 | $window.open('../api/document/' + $stateParams.id
17 | + '/pdf?metadata=' + $scope.export.metadata
18 | + '&comments=' + $scope.export.comments
19 | + '&fitimagetopage=' + $scope.export.fitimagetopage
20 | + '&margin=' + $scope.export.margin);
21 |
22 | $uibModalInstance.close();
23 | };
24 |
25 | // Close the modal
26 | $scope.close = function () {
27 | $uibModalInstance.close();
28 | }
29 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentModalShare.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Document modal share controller.
5 | */
6 | angular.module('docs').controller('DocumentModalShare', function ($scope, $uibModalInstance) {
7 | $scope.name = '';
8 | $scope.close = function(name) {
9 | $uibModalInstance.close(name);
10 | }
11 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewActivity.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Document view activity controller.
5 | */
6 | angular.module('docs').controller('DocumentViewActivity', function ($scope, $stateParams, Restangular) {
7 | // Load audit log data from server
8 | Restangular.one('auditlog').get({
9 | document: $stateParams.id
10 | }).then(function(data) {
11 | $scope.logs = data.logs;
12 | });
13 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewPermissions.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Document view permissions controller.
5 | */
6 | angular.module('docs').controller('DocumentViewPermissions', function($scope) {
7 | // Watch for ACLs change and group them for easy displaying
8 | $scope.$watch('document.inherited_acls', function(acls) {
9 | $scope.inheritedAcls = _.groupBy(acls, function(acl) {
10 | return acl.source_id + acl.id;
11 | });
12 | });
13 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/document/FileRename.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * File rename controller.
5 | */
6 | angular.module('docs').controller('FileRename', function ($scope, file, $uibModalInstance) {
7 | $scope.file = file;
8 | $scope.close = function(file) {
9 | $uibModalInstance.close(file);
10 | }
11 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/document/FileView.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * File view controller.
5 | */
6 | angular.module('docs').controller('FileView', function($uibModal, $state, $stateParams, $timeout) {
7 | var modal = $uibModal.open({
8 | windowClass: 'modal modal-fileview',
9 | templateUrl: 'partial/docs/file.view.html',
10 | controller: 'FileModalView',
11 | size: 'lg'
12 | });
13 |
14 | // Returns to document view on file close
15 | modal.closed = false;
16 | modal.result.then(function() {
17 | modal.closed = true;
18 | }, function() {
19 | modal.closed = true;
20 | $timeout(function () {
21 | // After all router transitions are passed,
22 | // if we are still on the file route, go back to the document
23 | if ($state.current.name === 'document.view.content.file' || $state.current.name === 'document.default.file') {
24 | $state.go('^', {id: $stateParams.id});
25 | }
26 | });
27 | });
28 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/document/ModalFileVersions.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Modal file versions controller.
5 | */
6 | angular.module('docs').controller('ModalFileVersions', function ($scope, $state, $stateParams, $uibModalInstance, Restangular, file) {
7 | Restangular.one('file/' + file.id + '/versions').get().then(function (data) {
8 | $scope.files = data.files;
9 | });
10 |
11 | $scope.openFile = function (file) {
12 | $state.go('document.view.content.file', { id: $stateParams.id, fileId: file.id })
13 | };
14 |
15 | $scope.close = function() {
16 | $uibModalInstance.close();
17 | };
18 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/Settings.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings controller.
5 | */
6 | angular.module('docs').controller('Settings', function($scope, User) {
7 | // Flag if the user is admin
8 | User.userInfo().then(function(data) {
9 | $scope.isAdmin = data.base_functions.indexOf('ADMIN') !== -1;
10 | })
11 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsAccount.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings account controller.
5 | */
6 | angular.module('docs').controller('SettingsAccount', function($scope, Restangular, $translate) {
7 | $scope.editUserAlert = false;
8 |
9 | // Alerts
10 | $scope.alerts = [];
11 |
12 | /**
13 | * Close an alert.
14 | */
15 | $scope.closeAlert = function(index) {
16 | $scope.alerts.splice(index, 1);
17 | };
18 |
19 | /**
20 | * Edit user.
21 | */
22 | $scope.editUser = function() {
23 | Restangular.one('user').post('', $scope.user).then(function() {
24 | $scope.user = {};
25 | $scope.alerts.push({ type: 'success', msg: $translate.instant('settings.account.updated') });
26 | });
27 | };
28 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsDefault.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings default page controller.
5 | */
6 | angular.module('docs').controller('SettingsDefault', function($scope, Restangular) {
7 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsGroup.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings group page controller.
5 | */
6 | angular.module('docs').controller('SettingsGroup', function($scope, $state, Restangular) {
7 | /**
8 | * Load groups from server.
9 | */
10 | $scope.loadGroups = function() {
11 | Restangular.one('group').get().then(function(data) {
12 | $scope.groups = data.groups;
13 | });
14 | };
15 |
16 | $scope.loadGroups();
17 |
18 | /**
19 | * Edit a group.
20 | */
21 | $scope.editGroup = function(group) {
22 | $state.go('settings.group.edit', { name: group.name });
23 | };
24 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsLdap.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings LDAP page controller.
5 | */
6 | angular.module('docs').controller('SettingsLdap', function($scope, Restangular, $translate, $timeout) {
7 | $scope.ldap = {
8 | enabled: false
9 | };
10 |
11 | // Get the LDAP configuration
12 | Restangular.one('app/config_ldap').get().then(function (data) {
13 | $scope.ldap = data;
14 | if ($scope.ldap.default_storage) {
15 | $scope.ldap.default_storage /= 1000000;
16 | }
17 | });
18 |
19 | // Edit SMTP config
20 | $scope.saveResult = undefined;
21 | $scope.save = function () {
22 | var ldap = angular.copy($scope.ldap);
23 | if (ldap.default_storage) {
24 | ldap.default_storage *= 1000000;
25 | }
26 | Restangular.one('app').post('config_ldap', ldap).then(function () {
27 | $scope.saveResult = $translate.instant('settings.ldap.saved');
28 | $timeout(function() {
29 | $scope.saveResult = undefined;
30 | }, 5000);
31 | });
32 | };
33 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsMetadata.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings metadata page controller.
5 | */
6 | angular.module('docs').controller('SettingsMetadata', function($scope, Restangular) {
7 | // Load metadata
8 | Restangular.one('metadata').get({
9 | sort_column: 1,
10 | asc: true
11 | }).then(function(data) {
12 | $scope.metadata = data.metadata;
13 | });
14 |
15 | // Add a metadata
16 | $scope.addMetadata = function() {
17 | Restangular.one('metadata').put($scope.newmetadata).then(function(data) {
18 | $scope.metadata.push(data);
19 | $scope.newmetadata = {};
20 | });
21 | };
22 |
23 | // Delete a metadata
24 | $scope.deleteMetadata = function(meta) {
25 | Restangular.one('metadata', meta.id).remove().then(function() {
26 | $scope.metadata.splice($scope.metadata.indexOf(meta), 1);
27 | });
28 | };
29 |
30 | // Update a metadata
31 | $scope.updateMetadata = function(meta) {
32 | Restangular.one('metadata', meta.id).post('', meta);
33 | };
34 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsMonitoring.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings monitoring controller.
5 | */
6 | angular.module('docs').controller('SettingsMonitoring', function($scope, Restangular) {
7 | Restangular.one('app').get().then(function(data) {
8 | $scope.app = data;
9 | });
10 |
11 | Restangular.one('app/log').get({
12 | limit: 100
13 | }).then(function(data) {
14 | $scope.logs = data.logs;
15 | });
16 |
17 | $scope.reindexingStarted = false;
18 | $scope.startReindexing = function() {
19 | Restangular.one('app').post('batch/reindex').then(function () {
20 | $scope.reindexingStarted = true;
21 | });
22 | };
23 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsSecurityModalDisableTotp.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings modal disable TOTP controller.
5 | */
6 | angular.module('docs').controller('SettingsSecurityModalDisableTotp', function ($scope, $uibModalInstance) {
7 | $scope.password = '';
8 | $scope.close = function(password) {
9 | $uibModalInstance.close(password);
10 | }
11 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsSession.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings session controller.
5 | */
6 | angular.module('docs').controller('SettingsSession', function($scope, Restangular) {
7 | /**
8 | * Load sessions.
9 | */
10 | $scope.loadSession = function() {
11 | Restangular.one('user/session').get().then(function(data) {
12 | $scope.sessions = data.sessions;
13 | });
14 | };
15 |
16 | /**
17 | * Clear all active sessions.
18 | */
19 | $scope.deleteSession = function() {
20 | Restangular.one('user/session').remove().then(function() {
21 | $scope.loadSession();
22 | })
23 | };
24 |
25 | $scope.loadSession();
26 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsUser.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings user page controller.
5 | */
6 | angular.module('docs').controller('SettingsUser', function($scope, $state, Restangular) {
7 | /**
8 | * Load users from server.
9 | */
10 | $scope.loadUsers = function() {
11 | Restangular.one('user/list').get({
12 | sort_column: 1,
13 | asc: true
14 | }).then(function(data) {
15 | $scope.users = data.users;
16 | });
17 | };
18 |
19 | $scope.loadUsers();
20 |
21 | /**
22 | * Edit a user.
23 | */
24 | $scope.editUser = function(user) {
25 | $state.go('settings.user.edit', { username: user.username });
26 | };
27 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsVocabulary.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings vocabulary page controller.
5 | */
6 | angular.module('docs').controller('SettingsVocabulary', function($scope, Restangular) {
7 | $scope.entries = [];
8 |
9 | // Watch for vocabulary selection change
10 | $scope.$watch('vocabulary', function(name) {
11 | if (_.isUndefined(name) || name == '') {
12 | $scope.entries = [];
13 | return;
14 | }
15 |
16 | // Load entries
17 | Restangular.one('vocabulary', name).get().then(function(result) {
18 | $scope.entries = result.entries;
19 | });
20 | });
21 |
22 | // Delete an entry
23 | $scope.deleteEntry = function(entry) {
24 | Restangular.one('vocabulary', entry.id).remove().then(function() {
25 | $scope.entries.splice($scope.entries.indexOf(entry), 1);
26 | });
27 | };
28 |
29 | // Update an entry
30 | $scope.updateEntry = function(entry) {
31 | Restangular.one('vocabulary', entry.id).post('', entry);
32 | };
33 |
34 | // Add an entry
35 | $scope.addEntry = function(entry) {
36 | entry.name = $scope.vocabulary;
37 | Restangular.one('vocabulary').put(entry).then(function(data) {
38 | $scope.entries.push(data);
39 | $scope.entry = {};
40 | });
41 | };
42 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsWorkflow.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Settings workflow page controller.
5 | */
6 | angular.module('docs').controller('SettingsWorkflow', function($scope, $state, Restangular) {
7 | /**
8 | * Load workflows from server.
9 | */
10 | $scope.loadWorkflows = function() {
11 | Restangular.one('routemodel').get({
12 | sort_column: 1,
13 | asc: true
14 | }).then(function(data) {
15 | $scope.workflows = data.routemodels;
16 | });
17 | };
18 |
19 | $scope.loadWorkflows();
20 |
21 | /**
22 | * Edit a user.
23 | */
24 | $scope.editWorkflow = function(user) {
25 | $state.go('settings.workflow.edit', { id: user.id });
26 | };
27 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/tag/Tag.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Tag controller.
5 | */
6 | angular.module('docs').controller('Tag', function($scope, Restangular) {
7 | $scope.tag = { name: '', color: '#3a87ad' };
8 |
9 | // Retrieve tags
10 | $scope.tags = [];
11 | $scope.loadTags = function() {
12 | Restangular.one('tag/list').get().then(function(data) {
13 | $scope.tags = data.tags;
14 | });
15 | };
16 | $scope.loadTags();
17 |
18 | /**
19 | * Add a tag.
20 | */
21 | $scope.addTag = function() {
22 | Restangular.one('tag').put($scope.tag).then(function(data) {
23 | $scope.tags.push({ id: data.id, name: $scope.tag.name, color: $scope.tag.color });
24 | $scope.tag = { name: '', color: '#3a87ad' };
25 | });
26 | };
27 |
28 | /**
29 | * Find children tags.
30 | */
31 | $scope.getChildrenTags = function(parent) {
32 | return _.filter($scope.tags, function(tag) {
33 | return tag.parent === parent || !tag.parent && !parent;
34 | });
35 | };
36 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/usergroup/GroupProfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Group profile controller.
5 | */
6 | angular.module('docs').controller('GroupProfile', function($stateParams, Restangular, $scope) {
7 | // Load user
8 | Restangular.one('group', $stateParams.name).get().then(function(data) {
9 | $scope.group = data;
10 | });
11 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/usergroup/UserGroup.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * User/group controller.
5 | */
6 | angular.module('docs').controller('UserGroup', function(Restangular, $scope, $state) {
7 | // Load users
8 | Restangular.one('user/list').get({
9 | sort_column: 1,
10 | asc: true
11 | }).then(function(data) {
12 | $scope.users = data.users;
13 | });
14 |
15 | // Load groups
16 | Restangular.one('group').get({
17 | sort_column: 1,
18 | asc: true
19 | }).then(function(data) {
20 | $scope.groups = data.groups;
21 | });
22 |
23 | // Open a user
24 | $scope.openUser = function(user) {
25 | $state.go('user.profile', { username: user.username });
26 | };
27 |
28 | // Open a group
29 | $scope.openGroup = function(group) {
30 | $state.go('group.profile', { name: group.name });
31 | };
32 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/controller/usergroup/UserProfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * User profile controller.
5 | */
6 | angular.module('docs').controller('UserProfile', function($stateParams, Restangular, $scope) {
7 | // Load user
8 | Restangular.one('user', $stateParams.username).get().then(function(data) {
9 | $scope.user = data;
10 | });
11 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/directive/Acl.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * ACL directive.
5 | */
6 | angular.module('docs').directive('acl', function() {
7 | return {
8 | restrict: 'E',
9 | template: '{{ \'acl.\' + data.type | translate }} {{ data.name }}',
10 | replace: true,
11 | scope: {
12 | data: '='
13 | }
14 | }
15 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/directive/AddSpaceBetween.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Add space between element directive.
5 | */
6 | angular.module('docs').directive('addSpaceBetween', function () {
7 | return function (scope, element) {
8 | if(!scope.$last) {
9 | element.after(' ');
10 | }
11 | }
12 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/directive/AuditLog.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Audit log directive.
5 | */
6 | angular.module('docs').directive('auditLog', function() {
7 | return {
8 | restrict: 'E',
9 | templateUrl: 'partial/docs/directive.auditlog.html',
10 | replace: true,
11 | scope: {
12 | logs: '='
13 | }
14 | }
15 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/directive/ImgError.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Image error event directive.
5 | */
6 | angular.module('docs').directive('imgError', function() {
7 | return {
8 | restrict: 'A',
9 | link: function(scope, element, attrs) {
10 | element.bind('error', function() {
11 | // call the function that was passed
12 | scope.$apply(attrs.imgError);
13 | });
14 | }
15 | };
16 | })
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/directive/InvertTextColor.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Invert text color for more legibility directive.
5 | */
6 | angular.module('docs').directive('invertTextColor', function () {
7 | return {
8 | restrict: 'A',
9 | link: function(scope, element, attrs) {
10 | attrs.$observe('invertTextColor', function(hex) {
11 | if (!hex || hex.length !== 7) {
12 | return;
13 | }
14 |
15 | hex = hex.slice(1);
16 | var r = parseInt(hex.slice(0, 2), 16),
17 | g = parseInt(hex.slice(2, 4), 16),
18 | b = parseInt(hex.slice(4, 6), 16);
19 | element.css('color', (r * 0.299 + g * 0.587 + b * 0.114) > 186
20 | ? '#000000'
21 | : '#FFFFFF');
22 | });
23 | }
24 | }
25 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/directive/Pell.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Pell directive.
5 | */
6 | angular.module('docs').directive('pellEditor', function ($timeout) {
7 | return {
8 | restrict: 'E',
9 | template: '',
10 | require: 'ngModel',
11 | replace: true,
12 | link: function (scope, element, attrs, ngModelCtrl) {
13 | var editor = pell.init({
14 | element: element[0],
15 | defaultParagraphSeparator: 'p',
16 | onChange: function (html) {
17 | $timeout(function () {
18 | ngModelCtrl.$setViewValue(html);
19 | });
20 | }
21 | });
22 |
23 | ngModelCtrl.$render = function() {
24 | editor.content.innerHTML = ngModelCtrl.$viewValue || '';
25 | };
26 | }
27 | };
28 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/filter/Filesize.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Format file sizes.
5 | */
6 | angular.module('docs').filter('filesize', function($translate) {
7 | return function(text) {
8 | if (!text) {
9 | return '';
10 | }
11 |
12 | var size = parseInt(text);
13 | if (size > 1000000) { // 1MB
14 | return Math.round(size / 1000000) + $translate.instant('filter.filesize.mb');
15 | }
16 | return Math.round(size / 1000) + $translate.instant('filter.filesize.kb');
17 | }
18 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/docs/service/User.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * User service.
5 | */
6 | angular.module('docs').factory('User', function(Restangular) {
7 | var userInfo = null;
8 |
9 | return {
10 | /**
11 | * Returns user info.
12 | * @param force If true, force reloading data
13 | */
14 | userInfo: function(force) {
15 | if (userInfo === null || force) {
16 | userInfo = Restangular.one('user').get();
17 | }
18 | return userInfo;
19 | },
20 |
21 | /**
22 | * Login an user.
23 | */
24 | login: function(user) {
25 | return Restangular.one('user').post('login', user);
26 | },
27 |
28 | /**
29 | * Logout the current user.
30 | */
31 | logout: function() {
32 | return Restangular.one('user').post('logout', {});
33 | }
34 | }
35 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/share/controller/FileView.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * File view controller.
5 | */
6 | angular.module('share').controller('FileView', function($uibModal, $state, $stateParams, $timeout) {
7 | var modal = $uibModal.open({
8 | windowClass: 'modal modal-fileview',
9 | templateUrl: 'partial/share/file.view.html',
10 | controller: 'FileModalView',
11 | size: 'lg'
12 | });
13 |
14 | // Returns to share view on file close
15 | modal.closed = false;
16 | modal.result.then(function() {
17 | modal.closed = true;
18 | }, function() {
19 | modal.closed = true;
20 | $timeout(function () {
21 | // After all router transitions are passed,
22 | // if we are still on the file route, go back to the share
23 | if ($state.current.name === 'share.file') {
24 | $state.go('share', { documentId: $stateParams.documentId, shareId: $stateParams.shareId });
25 | }
26 | });
27 | });
28 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/share/controller/Footer.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Footer controller.
5 | */
6 | angular.module('share').controller('Footer', function($scope, $rootScope, Restangular, $translate, tmhDynamicLocale, $locale) {
7 | // Load app data
8 | Restangular.one('app').get().then(function(data) {
9 | $scope.app = data;
10 | });
11 |
12 | // Save the current language to local storage
13 | $rootScope.$on('$translateChangeSuccess', function() {
14 | $scope.currentLang = $translate.use();
15 | localStorage.overrideLang = $scope.currentLang;
16 | tmhDynamicLocale.set($scope.currentLang).then(function () {
17 | $rootScope.dateFormat = $locale.DATETIME_FORMATS.shortDate;
18 | $rootScope.dateTimeFormat = $locale.DATETIME_FORMATS.short;
19 | });
20 | });
21 |
22 | // Change the current language
23 | $scope.changeLanguage = function(lang) {
24 | $translate.use(lang);
25 | };
26 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/share/controller/Main.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Main controller.
5 | */
6 | angular.module('share').controller('Main', function() {
7 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/share/controller/ShareModalPdf.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Document modal PDF controller.
5 | */
6 | angular.module('share').controller('ShareModalPdf', function ($scope, $window, $stateParams, $uibModalInstance) {
7 | $scope.export = {
8 | metadata: false,
9 | comments: false,
10 | fitimagetopage: true,
11 | margin: 10
12 | };
13 |
14 | // Export to PDF
15 | $scope.exportPdf = function() {
16 | $window.open('../api/document/' + $stateParams.documentId
17 | + '/pdf?metadata=' + $scope.export.metadata
18 | + '&comments=' + $scope.export.comments
19 | + '&fitimagetopage=' + $scope.export.fitimagetopage
20 | + '&margin=' + $scope.export.margin
21 | + '&share=' + $stateParams.shareId);
22 |
23 | $uibModalInstance.close();
24 | };
25 |
26 | // Close the modal
27 | $scope.close = function () {
28 | $uibModalInstance.close();
29 | }
30 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/app/share/filter/Filesize.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * Format file sizes.
5 | */
6 | angular.module('share').filter('filesize', function() {
7 | return function(text) {
8 | if (!text) {
9 | return '';
10 | }
11 |
12 | var size = parseInt(text);
13 | if (size > 1000000) { // 1MB
14 | return Math.round(size / 1000000) + 'MB';
15 | }
16 | return Math.round(size / 1000) + 'kB';
17 | }
18 | });
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-brands-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-brands-400.eot
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-regular-400.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-regular-400.eot
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-solid-900.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-solid-900.eot
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/alpha.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/hue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/hue.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/icons/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/icons/icon-128x128.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/icons/icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/icons/icon-144x144.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/icons/icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/icons/icon-152x152.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/icons/icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/icons/icon-192x192.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/icons/icon-384x384.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/icons/icon-384x384.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/icons/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/icons/icon-512x512.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/icons/icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/icons/icon-72x72.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/icons/icon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/icons/icon-96x96.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/saturation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/saturation.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/img/title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/img/title.png
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Teedy",
3 | "short_name": "Teedy",
4 | "theme_color": "#2ab2dc",
5 | "background_color": "#ffffff",
6 | "display": "standalone",
7 | "Scope": "/",
8 | "start_url": "/",
9 | "icons": [
10 | {
11 | "src": "img/icons/icon-72x72.png",
12 | "sizes": "72x72",
13 | "type": "image/png"
14 | },
15 | {
16 | "src": "img/icons/icon-96x96.png",
17 | "sizes": "96x96",
18 | "type": "image/png"
19 | },
20 | {
21 | "src": "img/icons/icon-128x128.png",
22 | "sizes": "128x128",
23 | "type": "image/png"
24 | },
25 | {
26 | "src": "img/icons/icon-144x144.png",
27 | "sizes": "144x144",
28 | "type": "image/png"
29 | },
30 | {
31 | "src": "img/icons/icon-152x152.png",
32 | "sizes": "152x152",
33 | "type": "image/png"
34 | },
35 | {
36 | "src": "img/icons/icon-192x192.png",
37 | "sizes": "192x192",
38 | "type": "image/png"
39 | },
40 | {
41 | "src": "img/icons/icon-384x384.png",
42 | "sizes": "384x384",
43 | "type": "image/png"
44 | },
45 | {
46 | "src": "img/icons/icon-512x512.png",
47 | "sizes": "512x512",
48 | "type": "image/png"
49 | }
50 | ]
51 | }
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/directive.selectionrelation.typeahead.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ match.label.create_date | date: $root.dateFormat }}
4 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/directive.selectrelation.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 | {{ relation.title }}
5 |
6 |
7 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/directive.selecttag.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 | {{ tag.name }}
5 |
6 |
7 |
8 |
9 |
11 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/directive.typeahead.acl.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/document.share.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/document.view.activity.html:
--------------------------------------------------------------------------------
1 | {{ 'document.view.activity.message' | translate }}
2 |
3 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/feedback.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/file.rename.html:
--------------------------------------------------------------------------------
1 |
4 |
17 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/file.versions.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 | {{ 'file.versions.filename' | translate }} |
9 | {{ 'file.versions.mimetype' | translate }} |
10 | {{ 'file.versions.create_date' | translate }} |
11 | {{ 'file.versions.version' | translate }} |
12 | |
13 |
14 |
15 |
16 |
17 | {{ file.name }} |
18 | {{ file.mimetype }} |
19 | {{ file.create_date | timeAgo: dateFormat }} |
20 | v{{ file.version +1 }}.0 |
21 |
22 |
23 | |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/group.profile.html:
--------------------------------------------------------------------------------
1 |
4 |
5 | {{ 'group.profile.members' | translate }}
6 |
7 | -
8 | {{ member }}
9 |
10 | - {{ 'group.profile.no_members' | translate }}
11 |
12 |
13 |
14 |
{{ 'group.profile.related_links' | translate }}
15 |
23 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/import.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/main.html:
--------------------------------------------------------------------------------
1 |
2 |
{{ 'loading' | translate }}
3 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/passwordlost.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/settings.default.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/main/webapp/src/partial/docs/settings.default.html
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/settings.fileimporter.html:
--------------------------------------------------------------------------------
1 |
2 | {{ 'settings.fileimporter.advanced_users' | translate }}
3 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{ 'settings.fileimporter.download' | translate }}
15 |
16 |
17 | {{ 'settings.fileimporter.instructions' | translate }}
18 |
19 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/settings.group.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{ 'settings.group.name' | translate }} |
12 |
13 |
14 |
15 |
17 | {{ group.name }} |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/settings.security.disabletotp.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 | {{ 'settings.security.disable_totp.message' | translate }}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/settings.session.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ 'settings.session.created_date' | translate }} |
6 | {{ 'settings.session.last_connection_date' | translate }} |
7 | {{ 'settings.session.user_agent' | translate }} |
8 | {{ 'settings.session.current' | translate }} |
9 |
10 |
11 |
12 |
13 | {{ session.create_date | date: dateTimeFormat }} |
14 | {{ session.last_connection_date | date: dateTimeFormat }} |
15 | {{ session.ip }} |
16 |
17 |
19 | |
20 |
21 |
22 |
23 |
24 |
27 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/settings.user.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{ 'settings.user.username' | translate }} |
12 | {{ 'settings.user.create_date' | translate }} |
13 |
14 |
15 |
16 |
18 |
19 | {{ user.username }}
20 | {{ user.username }}
21 |
22 | |
23 | {{ user.create_date | date: dateFormat }} |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/settings.workflow.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{ 'settings.workflow.name' | translate }} |
12 | {{ 'settings.workflow.create_date' | translate }} |
13 |
14 |
15 |
16 |
18 | {{ workflow.name }} |
19 | {{ workflow.create_date | date: dateFormat }} |
20 |
21 |
22 |
23 |
24 |
25 |
28 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/tag.default.html:
--------------------------------------------------------------------------------
1 | {{ 'tag.default.title' | translate }}
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/docs/usergroup.default.html:
--------------------------------------------------------------------------------
1 | {{ 'usergroup.default.title' | translate }}
2 | {{ 'usergroup.default.message' | translate }}
3 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/share/403.html:
--------------------------------------------------------------------------------
1 |
2 |
{{ 'app_share.403.title' | translate }}
3 |
{{ 'app_share.403.message' | translate }}
4 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/share/file.view.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
![]()
26 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/partial/share/main.html:
--------------------------------------------------------------------------------
1 |
2 |
{{ appName }}
3 |
{{ 'app_share.main' | translate }}
4 |
--------------------------------------------------------------------------------
/docs-web/src/main/webapp/src/style/pell.css:
--------------------------------------------------------------------------------
1 | .pell {
2 | border: 1px solid rgba(10, 10, 10, 0.1);
3 | box-sizing: border-box; }
4 |
5 | .pell-content {
6 | box-sizing: border-box;
7 | height: 300px;
8 | outline: 0;
9 | overflow-y: auto;
10 | padding: 10px; }
11 |
12 | .pell-actionbar {
13 | background-color: #FFF;
14 | border-bottom: 1px solid rgba(10, 10, 10, 0.1); }
15 |
16 | .pell-button {
17 | background-color: transparent;
18 | border: none;
19 | cursor: pointer;
20 | height: 30px;
21 | outline: 0;
22 | width: 30px;
23 | vertical-align: bottom; }
24 |
25 | .pell-button-selected {
26 | background-color: #F0F0F0; }
27 |
--------------------------------------------------------------------------------
/docs-web/src/prod/resources/config.properties:
--------------------------------------------------------------------------------
1 | api.current_version=${project.version}
2 | api.min_version=1.0
3 | db.version=31
4 |
--------------------------------------------------------------------------------
/docs-web/src/prod/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootCategory=WARN, CONSOLE, MEMORY
2 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
3 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
4 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{DATE} %p %l %m %n
5 | log4j.appender.MEMORY=com.sismics.util.log4j.MemoryAppender
6 | log4j.appender.MEMORY.size=1000
7 |
8 | log4j.logger.com.sismics=INFO
9 | log4j.logger.org.apache.pdfbox=ERROR
10 | log4j.logger.org.glassfish.jersey.servlet.WebComponent=ERROR
11 | log4j.logger.org.apache.directory=ERROR
12 | log4j.logger.org.odftoolkit=ERROR
--------------------------------------------------------------------------------
/docs-web/src/test/java/com/sismics/docs/rest/resource/ThirdPartyWebhookResource.java:
--------------------------------------------------------------------------------
1 | package com.sismics.docs.rest.resource;
2 |
3 | import jakarta.json.JsonObject;
4 | import jakarta.ws.rs.Consumes;
5 | import jakarta.ws.rs.POST;
6 | import jakarta.ws.rs.Path;
7 | import jakarta.ws.rs.core.MediaType;
8 | import jakarta.ws.rs.core.Response;
9 |
10 | /**
11 | * Webhook REST resources.
12 | *
13 | * @author bgamard
14 | */
15 | @Path("/thirdpartywebhook")
16 | public class ThirdPartyWebhookResource extends BaseResource {
17 | /**
18 | * Last payload received.
19 | */
20 | private static JsonObject lastPayload;
21 |
22 | /**
23 | * Add a webhook.
24 | *
25 | * @return Response
26 | */
27 | @POST
28 | @Consumes(MediaType.APPLICATION_JSON)
29 | public Response webhook(JsonObject request) {
30 | lastPayload = request;
31 | return Response.ok().build();
32 | }
33 |
34 | public static JsonObject getLastPayload() {
35 | return lastPayload;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/docs-web/src/test/resources/file/Einstein-Roosevelt-letter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/test/resources/file/Einstein-Roosevelt-letter.png
--------------------------------------------------------------------------------
/docs-web/src/test/resources/file/PIA00452.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/test/resources/file/PIA00452.jpg
--------------------------------------------------------------------------------
/docs-web/src/test/resources/file/apache.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/test/resources/file/apache.pptx
--------------------------------------------------------------------------------
/docs-web/src/test/resources/file/document.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/test/resources/file/document.docx
--------------------------------------------------------------------------------
/docs-web/src/test/resources/file/document.odt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/test/resources/file/document.odt
--------------------------------------------------------------------------------
/docs-web/src/test/resources/file/document.txt:
--------------------------------------------------------------------------------
1 | This is a test document
2 | Please love me
3 | &é"'(-è_çà)=$^ù*
4 | 조선글
--------------------------------------------------------------------------------
/docs-web/src/test/resources/file/video.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/test/resources/file/video.webm
--------------------------------------------------------------------------------
/docs-web/src/test/resources/file/wikipedia.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/test/resources/file/wikipedia.pdf
--------------------------------------------------------------------------------
/docs-web/src/test/resources/file/wikipedia.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs-web/src/test/resources/file/wikipedia.zip
--------------------------------------------------------------------------------
/docs-web/src/test/resources/hibernate.properties:
--------------------------------------------------------------------------------
1 | hibernate.connection.driver_class=org.h2.Driver
2 | hibernate.connection.url=jdbc:h2:mem:docs
3 | hibernate.connection.username=sa
4 | hibernate.connection.password=
5 | hibernate.hbm2ddl.auto=
6 | hibernate.dialect=org.hibernate.dialect.HSQLDialect
7 | hibernate.show_sql=false
8 | hibernate.format_sql=false
9 | hibernate.max_fetch_depth=5
10 | hibernate.cache.use_second_level_cache=false
11 | hibernate.connection.initial_pool_size=1
12 | hibernate.connection.pool_size=10
13 | hibernate.connection.pool_validation_interval=5
--------------------------------------------------------------------------------
/docs-web/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootCategory=INFO, CONSOLE, MEMORY
2 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
3 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
4 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{DATE} %p %l %m %n
5 | log4j.appender.MEMORY=com.sismics.util.log4j.MemoryAppender
6 | log4j.appender.MEMORY.size=1000
7 |
8 | log4j.logger.com.sismics=INFO
9 | log4j.logger.com.sismics.util.jpa=ERROR
10 | log4j.logger.org.hibernate=ERROR
11 | log4j.logger.org.apache.pdfbox=INFO
12 | log4j.logger.com.mchange=ERROR
13 | log4j.logger.org.apache.directory=ERROR
14 | log4j.logger.org.glassfish.grizzly=ERROR
15 | log4j.logger.org.odftoolkit=ERROR
--------------------------------------------------------------------------------
/docs-web/src/test/resources/test.ldif:
--------------------------------------------------------------------------------
1 | version: 1
2 |
3 | dn: o=TEST
4 | objectclass: domain
5 | objectclass: top
6 | objectclass: extensibleObject
7 | dc: TEST
8 | o: TEST
9 |
10 | dn: uid=ldap1,o=TEST
11 | objectClass: top
12 | objectClass: inetOrgPerson
13 | objectClass: person
14 | objectClass: organizationalPerson
15 | cn: ldap1
16 | sn: LDAP 1
17 | uid: ldap1
18 | userPassword: secret
19 | mail: ldap1@teedy.io
--------------------------------------------------------------------------------
/docs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | /
5 | /webapps/docs.war
6 |
7 |
8 | docs.home
9 | /data
10 |
11 |
12 |
--------------------------------------------------------------------------------
/docs/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sismics/docs/c2d7f3ebc6368a15aabed3d747ec970751961d46/docs/.gitkeep
--------------------------------------------------------------------------------
/scripts/dev_setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | install_macos_dependencies() {
4 | brew install openjdk@11
5 | export JAVA_HOME=/usr/local/opt/openjdk@11
6 | brew install maven
7 | brew install node
8 | npm install -g grunt-cli
9 | brew install tesseract
10 | brew install ffmpeg
11 | brew install mediainfo
12 | }
13 |
14 | install_ubuntu_debian_dependencies() {
15 | sudo apt update
16 | sudo apt install -y openjdk-11-jdk maven nodejs npm tesseract-ocr ffmpeg mediainfo
17 | sudo npm install -g grunt-cli
18 | }
19 |
20 | install_fedora_dependencies() {
21 | sudo dnf install -y java-11-openjdk-devel maven nodejs npm tesseract ffmpeg mediainfo
22 | sudo npm install -g grunt-cli
23 | }
24 |
25 | echo "📥 Installing dependencies"
26 | if [[ "$OSTYPE" == "darwin"* ]]; then
27 | install_macos_dependencies
28 | elif [[ -f /etc/debian_version ]]; then
29 | install_ubuntu_debian_dependencies
30 | elif [[ -f /etc/fedora-release ]]; then
31 | install_fedora_dependencies
32 | else
33 | echo "❔ Unsupported OS. Feel free to contribute!"
34 | exit 1
35 | fi
36 |
37 | echo "✅ Dependencies installed."
38 |
39 | mvn clean -DskipTests install
40 |
41 | echo "You can start the server with 'mvn jetty:run' and then access it at http://localhost:8080/docs-web/src/"
42 |
--------------------------------------------------------------------------------