├── .github └── workflows │ └── build.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── build.sbt ├── distribution └── src │ └── universal │ ├── LICENSE │ ├── README.md │ └── conf │ ├── convergence-server.conf │ └── log4j2.xml ├── docs ├── OrientDB-Convergence-Queries.md ├── OrientDB-Domain-Queries.md ├── Release.md ├── StringSplice.md ├── Toxiproxy.md └── rest-testing-commands.md ├── project ├── Dependencies.scala ├── OrientDBPlugin.scala ├── build.properties └── plugins.sbt ├── publish.sbt ├── src ├── dev-server │ ├── convergence-server.conf │ ├── log4j2.xml │ └── orientdb-server-config.xml ├── main │ ├── resources │ │ ├── com │ │ │ └── convergencelabs │ │ │ │ └── convergence │ │ │ │ └── server │ │ │ │ └── db │ │ │ │ └── schema │ │ │ │ ├── .gitattributes │ │ │ │ ├── convergence │ │ │ │ ├── deltas │ │ │ │ │ ├── 2020_07_12_migrate_version_schema.yaml │ │ │ │ │ ├── 2021_05_31_domain_availability_and_schema_version.yaml │ │ │ │ │ ├── 2021_06_02_user_role_indices.yaml │ │ │ │ │ └── 2021_06_26_domain_schema_delta_log_tag_not_mandatory.yaml │ │ │ │ ├── index.yaml │ │ │ │ ├── schemas │ │ │ │ │ ├── 1.0.yaml │ │ │ │ │ └── 2.0.yaml │ │ │ │ └── versions │ │ │ │ │ ├── 1.0.yaml │ │ │ │ │ └── 2.0.yaml │ │ │ │ └── domain │ │ │ │ ├── deltas │ │ │ │ ├── 2021_06_01_data_value_model_index.yaml │ │ │ │ ├── 2021_06_26_create_activity_class.yaml │ │ │ │ ├── 2021_06_26_create_permissions_target_class.yaml │ │ │ │ ├── 2021_06_26_domain_config_key_value_refactor.yaml │ │ │ │ ├── 2021_06_26_rename_permissions_fields.yaml │ │ │ │ ├── 2021_06_26_set_chat_class_superclass.yaml │ │ │ │ └── 2021_07_12_string_splice_model_operation_migration.yaml │ │ │ │ ├── index.yaml │ │ │ │ ├── schemas │ │ │ │ ├── 1.0.yaml │ │ │ │ ├── 2.0.yaml │ │ │ │ └── 3.0.yaml │ │ │ │ └── versions │ │ │ │ ├── 1.0.yaml │ │ │ │ ├── 2.0.yaml │ │ │ │ └── 3.0.yaml │ │ ├── log4j2.xml │ │ └── reference.conf │ └── scala │ │ └── com │ │ └── convergencelabs │ │ └── convergence │ │ ├── common │ │ ├── ConvergenceJwtUtil.scala │ │ ├── Ok.scala │ │ └── PagedData.scala │ │ └── server │ │ ├── AkkaClusterDebugListener.scala │ │ ├── ConvergenceServer.scala │ │ ├── ConvergenceServerActor.scala │ │ ├── ConvergenceServerCLIConf.scala │ │ ├── ConvergenceServerConstants.scala │ │ ├── api │ │ ├── realtime │ │ │ ├── ActivityClientActor.scala │ │ │ ├── ChatClientActor.scala │ │ │ ├── ClientActor.scala │ │ │ ├── ClientActorCreator.scala │ │ │ ├── ConvergenceRealtimeApi.scala │ │ │ ├── ErrorCodes.scala │ │ │ ├── ErrorMessages.scala │ │ │ ├── ExpectedError.scala │ │ │ ├── HeartbeatHelper.scala │ │ │ ├── HistoricModelClientActor.scala │ │ │ ├── IdentityCacheManagerActor.scala │ │ │ ├── IdentityClientActor.scala │ │ │ ├── ModelClientActor.scala │ │ │ ├── PresenceClientActor.scala │ │ │ ├── ProtocolConfiguration.scala │ │ │ ├── ProtocolConnection.scala │ │ │ ├── ResourceManager.scala │ │ │ ├── WebSocketService.scala │ │ │ └── protocol │ │ │ │ ├── ActivityProtoConverters.scala │ │ │ │ ├── ChatProtoConverters.scala │ │ │ │ ├── CommonProtoConverters.scala │ │ │ │ ├── ConvergenceMessageBodyUtils.scala │ │ │ │ ├── DataValueProtoConverters.scala │ │ │ │ ├── IdentityProtoConverters.scala │ │ │ │ ├── JsonProtoConverters.scala │ │ │ │ ├── ModelOperationConverters.scala │ │ │ │ ├── ModelPermissionConverters.scala │ │ │ │ ├── OperationConverters.scala │ │ │ │ ├── PermissionProtoConverters.scala │ │ │ │ └── PresenceProtoConverters.scala │ │ └── rest │ │ │ ├── AuthService.scala │ │ │ ├── Authenticator.scala │ │ │ ├── ConfigService.scala │ │ │ ├── ConvergenceRestApi.scala │ │ │ ├── CurrentUserApiKeyService.scala │ │ │ ├── CurrentUserService.scala │ │ │ ├── DatabaseManagerRestService.scala │ │ │ ├── DomainRestData.scala │ │ │ ├── InfoService.scala │ │ │ ├── JsonSupport.scala │ │ │ ├── KeyGenService.scala │ │ │ ├── NamespaceService.scala │ │ │ ├── PagedRestResponse.scala │ │ │ ├── PermissionChecks.scala │ │ │ ├── RestResponse.scala │ │ │ ├── RestResponseEntity.scala │ │ │ ├── ServerStatusService.scala │ │ │ ├── UserRoleService.scala │ │ │ ├── UserService.scala │ │ │ └── domain │ │ │ ├── AbstractDomainRestService.scala │ │ │ ├── DomainActivityService.scala │ │ │ ├── DomainAdminTokenService.scala │ │ │ ├── DomainChatService.scala │ │ │ ├── DomainCollectionService.scala │ │ │ ├── DomainConfigService.scala │ │ │ ├── DomainKeyService.scala │ │ │ ├── DomainMembersService.scala │ │ │ ├── DomainModelService.scala │ │ │ ├── DomainService.scala │ │ │ ├── DomainSessionService.scala │ │ │ ├── DomainStatsService.scala │ │ │ ├── DomainUserGroupService.scala │ │ │ ├── DomainUserIdSerializer.scala │ │ │ └── DomainUserService.scala │ │ ├── backend │ │ ├── BackendServices.scala │ │ ├── datastore │ │ │ ├── AbstractDatabasePersistence.scala │ │ │ ├── AbstractPersistenceProvider.scala │ │ │ ├── DataStoreException.scala │ │ │ ├── ODocumentMapper.scala │ │ │ ├── OrientDBUtil.scala │ │ │ ├── SortOrder.scala │ │ │ ├── convergence │ │ │ │ ├── ConfigKeys.scala │ │ │ │ ├── ConfigNotFoundException.scala │ │ │ │ ├── ConfigStore.scala │ │ │ │ ├── ConvergencePersistenceProvider.scala │ │ │ │ ├── ConvergenceSchemaDeltaLogEntry.scala │ │ │ │ ├── ConvergenceSchemaDeltaLogStore.scala │ │ │ │ ├── ConvergenceSchemaVersionLogEntry.scala │ │ │ │ ├── ConvergenceSchemaVersionLogStore.scala │ │ │ │ ├── DomainSchemaDeltaLogEntry.scala │ │ │ │ ├── DomainSchemaDeltaLogStore.scala │ │ │ │ ├── DomainSchemaVersionLogEntry.scala │ │ │ │ ├── DomainSchemaVersionLogStore.scala │ │ │ │ ├── DomainStore.scala │ │ │ │ ├── NamespaceNotFoundException.scala │ │ │ │ ├── NamespaceStore.scala │ │ │ │ ├── RoleStore.scala │ │ │ │ ├── SchemaDeltaStatus.scala │ │ │ │ ├── UserApiKeyStore.scala │ │ │ │ ├── UserFavoriteDomainStore.scala │ │ │ │ ├── UserSessionTokenStore.scala │ │ │ │ ├── UserStore.scala │ │ │ │ └── schema │ │ │ │ │ ├── ConfigClass.scala │ │ │ │ │ ├── ConvergenceSchema.scala │ │ │ │ │ ├── ConvergenceSchemaDeltaLogClass.scala │ │ │ │ │ ├── ConvergenceSchemaVersionLogClass.scala │ │ │ │ │ ├── DomainClass.scala │ │ │ │ │ ├── DomainSchemaDeltaLogClass.scala │ │ │ │ │ ├── DomainSchemaVersionLogClass.scala │ │ │ │ │ ├── NamespaceClass.scala │ │ │ │ │ ├── PermissionClass.scala │ │ │ │ │ ├── RoleClass.scala │ │ │ │ │ ├── UserApiKeyClass.scala │ │ │ │ │ ├── UserClass.scala │ │ │ │ │ ├── UserFavoriteDomainClass.scala │ │ │ │ │ ├── UserRoleClass.scala │ │ │ │ │ └── UserSessionTokenClass.scala │ │ │ └── domain │ │ │ │ ├── DomainPersistenceProvider.scala │ │ │ │ ├── DomainStateProvider.scala │ │ │ │ ├── activity │ │ │ │ └── ActivityStore.scala │ │ │ │ ├── chat │ │ │ │ ├── ChatNotFoundException.scala │ │ │ │ ├── ChatStore.scala │ │ │ │ └── CreateChat.scala │ │ │ │ ├── collection │ │ │ │ ├── CollectionPermissionsStore.scala │ │ │ │ └── CollectionStore.scala │ │ │ │ ├── config │ │ │ │ └── DomainConfigStore.scala │ │ │ │ ├── group │ │ │ │ └── UserGroupStore.scala │ │ │ │ ├── jwt │ │ │ │ ├── CreateOrUpdateJwtAuthKey.scala │ │ │ │ └── JwtAuthKeyStore.scala │ │ │ │ ├── model │ │ │ │ ├── ModelDataGenerator.scala │ │ │ │ ├── ModelOperationProcessor.scala │ │ │ │ ├── ModelOperationStore.scala │ │ │ │ ├── ModelPermissionCalculator.scala │ │ │ │ ├── ModelPermissionsStore.scala │ │ │ │ ├── ModelSnapshotStore.scala │ │ │ │ ├── ModelStore.scala │ │ │ │ ├── OrientDataValueBuilder.scala │ │ │ │ ├── OrientPathUtil.scala │ │ │ │ ├── QueryParsingException.scala │ │ │ │ ├── mapper │ │ │ │ │ ├── ArrayInsertOperationMapper.scala │ │ │ │ │ ├── ArrayMoveOperationMapper.scala │ │ │ │ │ ├── ArrayRemoveOperationMapper.scala │ │ │ │ │ ├── ArrayReplaceOperationMapper.scala │ │ │ │ │ ├── ArraySetOperationMapper.scala │ │ │ │ │ ├── ArrayValueMapper.scala │ │ │ │ │ ├── BooleanSetOperationMapper.scala │ │ │ │ │ ├── BooleanValueMapper.scala │ │ │ │ │ ├── CompoundOperationMapper.scala │ │ │ │ │ ├── DataValueMapper.scala │ │ │ │ │ ├── DateSetOperationMapper.scala │ │ │ │ │ ├── DateValueMapper.scala │ │ │ │ │ ├── DoubleValueMapper.scala │ │ │ │ │ ├── ModelSnapshotConfigMapper.scala │ │ │ │ │ ├── NullValueMapper.scala │ │ │ │ │ ├── NumberAddOperationMapper.scala │ │ │ │ │ ├── NumberSetOperationMapper.scala │ │ │ │ │ ├── ObjectAddPropertyOperationMapper.scala │ │ │ │ │ ├── ObjectRemovePropertyOperationMapper.scala │ │ │ │ │ ├── ObjectSetOperationMapper.scala │ │ │ │ │ ├── ObjectSetPropertyOperationMapper.scala │ │ │ │ │ ├── ObjectValueMapper.scala │ │ │ │ │ ├── OrientDBOperationMapper.scala │ │ │ │ │ ├── StringSetOperationMapper.scala │ │ │ │ │ ├── StringSpliceOperationMapper.scala │ │ │ │ │ └── StringValueMapper.scala │ │ │ │ └── query │ │ │ │ │ ├── Ast.scala │ │ │ │ │ ├── ModelQueryBuilder.scala │ │ │ │ │ └── QueryParser.scala │ │ │ │ ├── permissions │ │ │ │ ├── GroupPermission.scala │ │ │ │ ├── PermissionGrantee.scala │ │ │ │ ├── PermissionTarget.scala │ │ │ │ ├── PermissionsStore.scala │ │ │ │ └── UserPermission.scala │ │ │ │ ├── schema │ │ │ │ ├── ActivityClass.scala │ │ │ │ ├── ChatClass.scala │ │ │ │ ├── ChatCreatedEventClass.scala │ │ │ │ ├── ChatEventClass.scala │ │ │ │ ├── ChatMemberClass.scala │ │ │ │ ├── ChatMessageEventClass.scala │ │ │ │ ├── ChatNameChangedEventClass.scala │ │ │ │ ├── ChatTopicChangedEventClass.scala │ │ │ │ ├── ChatUserAddedEventClass.scala │ │ │ │ ├── ChatUserJoinedEventClass.scala │ │ │ │ ├── ChatUserLeftEventClass.scala │ │ │ │ ├── ChatUserRemovedEventClass.scala │ │ │ │ ├── CollectionClass.scala │ │ │ │ ├── CollectionPermissionsClass.scala │ │ │ │ ├── CollectionUserPermissionsClass.scala │ │ │ │ ├── DomainConfigClass.scala │ │ │ │ ├── DomainSchema.scala │ │ │ │ ├── DomainSessionClass.scala │ │ │ │ ├── JwtAuthKeyClass.scala │ │ │ │ ├── ModelClass.scala │ │ │ │ ├── ModelOperationClass.scala │ │ │ │ ├── ModelPermissionsClass.scala │ │ │ │ ├── ModelSnapshotClass.scala │ │ │ │ ├── ModelUserPermissionsClass.scala │ │ │ │ ├── OrientDbClass.scala │ │ │ │ ├── PermissionClass.scala │ │ │ │ ├── UserClass.scala │ │ │ │ ├── UserCredentialClass.scala │ │ │ │ ├── UserGroupClass.scala │ │ │ │ └── UserReconnectTokenClass.scala │ │ │ │ ├── session │ │ │ │ ├── SessionQueryType.scala │ │ │ │ └── SessionStore.scala │ │ │ │ └── user │ │ │ │ ├── CreateNormalDomainUser.scala │ │ │ │ ├── DomainUserDeletionOrchestrator.scala │ │ │ │ ├── DomainUserField.scala │ │ │ │ ├── DomainUserStore.scala │ │ │ │ └── UpdateDomainUser.scala │ │ ├── db │ │ │ ├── ConnectedSingleDatabaseProvider.scala │ │ │ ├── ConvergenceDatabaseInitializer.scala │ │ │ ├── DatabaseProvider.scala │ │ │ ├── DomainDatabaseFactory.scala │ │ │ ├── DomainDatabaseManager.scala │ │ │ ├── PooledDatabaseProvider.scala │ │ │ ├── SingleDatabaseProvider.scala │ │ │ └── schema │ │ │ │ ├── ConvergenceSchemaManager.scala │ │ │ │ ├── ConvergenceSchemaStatePersistence.scala │ │ │ │ ├── DatabaseManager.scala │ │ │ │ ├── DatabaseSchemaStatus.scala │ │ │ │ ├── DatabaseSchemaVersionStatus.scala │ │ │ │ ├── DeltaApplicator.scala │ │ │ │ ├── DeltaProcessor.scala │ │ │ │ ├── DomainSchemaManager.scala │ │ │ │ ├── DomainSchemaStatePersistence.scala │ │ │ │ ├── InstallDeltaAndScript.scala │ │ │ │ ├── OrientDBDeltaApplicator.scala │ │ │ │ ├── SchemaManager.scala │ │ │ │ ├── SchemaMetaDataRepository.scala │ │ │ │ ├── SchemaStatePersistence.scala │ │ │ │ ├── SchemaVersion.scala │ │ │ │ ├── SchemaVersionIndex.scala │ │ │ │ ├── SchemaVersionManifest.scala │ │ │ │ ├── SchemaVersionUtil.scala │ │ │ │ ├── UpgradeDeltaAndScript.scala │ │ │ │ ├── UpgradeDeltaEntry.scala │ │ │ │ ├── UpgradeDeltaId.scala │ │ │ │ └── delta │ │ │ │ ├── CustomProperty.scala │ │ │ │ ├── Delta.scala │ │ │ │ ├── DeltaAction.scala │ │ │ │ ├── IndexType.scala │ │ │ │ ├── OrientType.scala │ │ │ │ ├── Property.scala │ │ │ │ ├── PropertyConstraints.scala │ │ │ │ ├── PropertyOptions.scala │ │ │ │ └── SequenceType.scala │ │ └── services │ │ │ ├── domain │ │ │ ├── AuthenticationCredentials.scala │ │ │ ├── AuthenticationHandler.scala │ │ │ ├── BaseDomainShardedActor.scala │ │ │ ├── DomainIdBasedActorSharding.scala │ │ │ ├── DomainPersistenceManager.scala │ │ │ ├── DomainPersistenceManagerActor.scala │ │ │ ├── DomainSessionActor.scala │ │ │ ├── DomainSessionActorSharding.scala │ │ │ ├── JwtUtil.scala │ │ │ ├── UnauthorizedException.scala │ │ │ ├── activity │ │ │ │ ├── ActivityActor.scala │ │ │ │ ├── ActivityActorSharding.scala │ │ │ │ ├── ActivityAutoCreationOptions.scala │ │ │ │ ├── ActivityEntityIdSerializer.scala │ │ │ │ ├── ActivityPermissions.scala │ │ │ │ ├── ActivityServiceActor.scala │ │ │ │ ├── ActivityServiceActorSharding.scala │ │ │ │ └── ActivityStateMap.scala │ │ │ ├── chat │ │ │ │ ├── ChatActor.scala │ │ │ │ ├── ChatActorSharding.scala │ │ │ │ ├── ChatDeliveryActor.scala │ │ │ │ ├── ChatDeliveryActorSharding.scala │ │ │ │ ├── ChatPermissionResolver.scala │ │ │ │ ├── ChatPermissions.scala │ │ │ │ ├── ChatServiceActor.scala │ │ │ │ ├── ChatServiceActorSharding.scala │ │ │ │ └── processors │ │ │ │ │ ├── ChatMessageProcessor.scala │ │ │ │ │ ├── ChatRoomClientManager.scala │ │ │ │ │ ├── ChatRoomMessageProcessor.scala │ │ │ │ │ ├── DirectChatMessageProcessor.scala │ │ │ │ │ ├── MembershipChatMessageProcessor.scala │ │ │ │ │ ├── MessageReplyTask.scala │ │ │ │ │ ├── PrivateChannelMessageProcessor.scala │ │ │ │ │ ├── PublicChannelMessageProcessor.scala │ │ │ │ │ ├── ReplyAndBroadcastTask.scala │ │ │ │ │ ├── event │ │ │ │ │ ├── AddUserEventProcessor.scala │ │ │ │ │ ├── ChatEventMessageProcessor.scala │ │ │ │ │ ├── ChatEventMessageProcessorResult.scala │ │ │ │ │ ├── JoinEventProcessor.scala │ │ │ │ │ ├── LeaveEventProcessor.scala │ │ │ │ │ ├── MarkSeenEventProcessor.scala │ │ │ │ │ ├── PublishMessageEventProcessor.scala │ │ │ │ │ ├── RemoveUserEventProcessor.scala │ │ │ │ │ ├── SetNameEventProcessor.scala │ │ │ │ │ └── SetTopicEventProcessor.scala │ │ │ │ │ ├── general │ │ │ │ │ ├── GetHistoryMessageProcessor.scala │ │ │ │ │ └── RemoveChatMessageProcessor.scala │ │ │ │ │ └── permissions │ │ │ │ │ ├── AddChatPermissionsProcessor.scala │ │ │ │ │ ├── GetClientChatPermissionsProcessor.scala │ │ │ │ │ ├── GetPermissionsProcessor.scala │ │ │ │ │ ├── PermissionsMessageProcessor.scala │ │ │ │ │ ├── RemoveChatPermissionsProcessor.scala │ │ │ │ │ └── SetChatPermissionsProcessor.scala │ │ │ ├── collection │ │ │ │ └── CollectionStoreActor.scala │ │ │ ├── config │ │ │ │ └── ConfigStoreActor.scala │ │ │ ├── group │ │ │ │ └── UserGroupStoreActor.scala │ │ │ ├── identity │ │ │ │ ├── IdentityServiceActor.scala │ │ │ │ └── IdentityServiceActorSharding.scala │ │ │ ├── jwt │ │ │ │ └── JwtAuthKeyStoreActor.scala │ │ │ ├── model │ │ │ │ ├── ClientDataRequestFailure.scala │ │ │ │ ├── ModelCreator.scala │ │ │ │ ├── ModelNotFoundException.scala │ │ │ │ ├── ModelOperation.scala │ │ │ │ ├── ModelOperationReplayHelper.scala │ │ │ │ ├── ModelOperationServiceActor.scala │ │ │ │ ├── ModelOperationServiceActorSharding.scala │ │ │ │ ├── ModelPermissionResolver.scala │ │ │ │ ├── ModelPermissionsStoreActor.scala │ │ │ │ ├── ModelQueryResult.scala │ │ │ │ ├── ModelServiceActor.scala │ │ │ │ ├── ModelServiceActorSharding.scala │ │ │ │ ├── ModelSnapshotCalculator.scala │ │ │ │ ├── RealtimeModel.scala │ │ │ │ ├── RealtimeModelActor.scala │ │ │ │ ├── RealtimeModelManager.scala │ │ │ │ ├── RealtimeModelPermissions.scala │ │ │ │ ├── RealtimeModelPersistenceStream.scala │ │ │ │ ├── RealtimeModelSharding.scala │ │ │ │ ├── ResolvedModelPermission.scala │ │ │ │ ├── ot │ │ │ │ │ ├── AppliedOperation.scala │ │ │ │ │ ├── Operation.scala │ │ │ │ │ ├── PathComparator.scala │ │ │ │ │ ├── ProcessedOperationEvent.scala │ │ │ │ │ ├── RangeRangeRelationship.scala │ │ │ │ │ ├── RangeRelationshipUtil.scala │ │ │ │ │ ├── ReferenceValue.scala │ │ │ │ │ ├── ServerConcurrencyControl.scala │ │ │ │ │ ├── UnprocessedOperationEvent.scala │ │ │ │ │ └── xform │ │ │ │ │ │ ├── OperationTransformationFunction.scala │ │ │ │ │ │ ├── OperationTransformer.scala │ │ │ │ │ │ ├── ReferenceTransformationFunction.scala │ │ │ │ │ │ ├── ReferenceTransformer.scala │ │ │ │ │ │ ├── TransformationFunctionRegistry.scala │ │ │ │ │ │ ├── array │ │ │ │ │ │ ├── ArrayInsertInsertTF.scala │ │ │ │ │ │ ├── ArrayInsertMoveTF.scala │ │ │ │ │ │ ├── ArrayInsertRemoveTF.scala │ │ │ │ │ │ ├── ArrayInsertReplaceTF.scala │ │ │ │ │ │ ├── ArrayInsertSetTF.scala │ │ │ │ │ │ ├── ArrayMoveHelper.scala │ │ │ │ │ │ ├── ArrayMoveInsertTF.scala │ │ │ │ │ │ ├── ArrayMoveMoveTF.scala │ │ │ │ │ │ ├── ArrayMoveRemoveTF.scala │ │ │ │ │ │ ├── ArrayMoveReplaceTF.scala │ │ │ │ │ │ ├── ArrayMoveSetTF.scala │ │ │ │ │ │ ├── ArrayRemoveInsertTF.scala │ │ │ │ │ │ ├── ArrayRemoveMoveTF.scala │ │ │ │ │ │ ├── ArrayRemoveRemoveTF.scala │ │ │ │ │ │ ├── ArrayRemoveReplaceTF.scala │ │ │ │ │ │ ├── ArrayRemoveSetTF.scala │ │ │ │ │ │ ├── ArrayReplaceInsertTF.scala │ │ │ │ │ │ ├── ArrayReplaceMoveTF.scala │ │ │ │ │ │ ├── ArrayReplaceRemoveTF.scala │ │ │ │ │ │ ├── ArrayReplaceReplaceTF.scala │ │ │ │ │ │ ├── ArrayReplaceSetTF.scala │ │ │ │ │ │ ├── ArraySetInsertTF.scala │ │ │ │ │ │ ├── ArraySetMoveTF.scala │ │ │ │ │ │ ├── ArraySetRemoveTF.scala │ │ │ │ │ │ ├── ArraySetReplaceTF.scala │ │ │ │ │ │ └── ArraySetSetTF.scala │ │ │ │ │ │ ├── bool │ │ │ │ │ │ └── BooleanSetSetTF.scala │ │ │ │ │ │ ├── date │ │ │ │ │ │ └── DateSetSetTF.scala │ │ │ │ │ │ ├── number │ │ │ │ │ │ ├── NumberAddAddTF.scala │ │ │ │ │ │ ├── NumberAddSetTF.scala │ │ │ │ │ │ ├── NumberSetAddTF.scala │ │ │ │ │ │ └── NumberSetSetTF.scala │ │ │ │ │ │ ├── obj │ │ │ │ │ │ ├── ObjectAddPropertyAddPropertyTF.scala │ │ │ │ │ │ ├── ObjectAddPropertyRemovePropertyTF.scala │ │ │ │ │ │ ├── ObjectAddPropertySetPropertyTF.scala │ │ │ │ │ │ ├── ObjectAddPropertySetTF.scala │ │ │ │ │ │ ├── ObjectRemovePropertyAddPropertyTF.scala │ │ │ │ │ │ ├── ObjectRemovePropertyRemovePropertyTF.scala │ │ │ │ │ │ ├── ObjectRemovePropertySetPropertyTF.scala │ │ │ │ │ │ ├── ObjectRemovePropertySetTF.scala │ │ │ │ │ │ ├── ObjectSetAddPropertyTF.scala │ │ │ │ │ │ ├── ObjectSetPropertyAddPropertyTF.scala │ │ │ │ │ │ ├── ObjectSetPropertyRemovePropertyTF.scala │ │ │ │ │ │ ├── ObjectSetPropertySetPropertyTF.scala │ │ │ │ │ │ ├── ObjectSetPropertySetTF.scala │ │ │ │ │ │ ├── ObjectSetRemovePropertyTF.scala │ │ │ │ │ │ ├── ObjectSetSetPropertyTF.scala │ │ │ │ │ │ └── ObjectSetSetTF.scala │ │ │ │ │ │ ├── reference │ │ │ │ │ │ ├── IndexTransformer.scala │ │ │ │ │ │ ├── StringSetIndexTF.scala │ │ │ │ │ │ ├── StringSetRangeTF.scala │ │ │ │ │ │ ├── StringSpliceIndexTF.scala │ │ │ │ │ │ └── StringSpliceRangeTF.scala │ │ │ │ │ │ └── string │ │ │ │ │ │ ├── RemovalRangeUtil.scala │ │ │ │ │ │ ├── StringSetSetTF.scala │ │ │ │ │ │ ├── StringSetSpliceTF.scala │ │ │ │ │ │ ├── StringSpliceSetTF.scala │ │ │ │ │ │ └── StringSpliceSpliceTF.scala │ │ │ │ ├── reference │ │ │ │ │ ├── AbstractReferenceManager.scala │ │ │ │ │ ├── ElementReference.scala │ │ │ │ │ ├── IndexReference.scala │ │ │ │ │ ├── ModelReference.scala │ │ │ │ │ ├── ModelReferenceManager.scala │ │ │ │ │ ├── PropertyReference.scala │ │ │ │ │ ├── RangeReference.scala │ │ │ │ │ ├── ReferenceMap.scala │ │ │ │ │ ├── ValueReferenceManager.scala │ │ │ │ │ └── referenceTraits.scala │ │ │ │ └── value │ │ │ │ │ ├── RealtimeArray.scala │ │ │ │ │ ├── RealtimeBoolean.scala │ │ │ │ │ ├── RealtimeContainerValue.scala │ │ │ │ │ ├── RealtimeDate.scala │ │ │ │ │ ├── RealtimeDouble.scala │ │ │ │ │ ├── RealtimeNull.scala │ │ │ │ │ ├── RealtimeObject.scala │ │ │ │ │ ├── RealtimeString.scala │ │ │ │ │ ├── RealtimeValue.scala │ │ │ │ │ └── RealtimeValueFactory.scala │ │ │ ├── permissions │ │ │ │ ├── AddPermissions.scala │ │ │ │ ├── AllPermissions.scala │ │ │ │ ├── PermissionsCache.scala │ │ │ │ ├── RemovePermissions.scala │ │ │ │ └── SetPermissions.scala │ │ │ ├── presence │ │ │ │ ├── PresenceServiceActor.scala │ │ │ │ ├── PresenceServiceActorSharding.scala │ │ │ │ ├── PresenceSubscriptionUtil.scala │ │ │ │ └── UserPresence.scala │ │ │ ├── rest │ │ │ │ ├── DomainRestActor.scala │ │ │ │ ├── DomainRestActorSharding.scala │ │ │ │ └── DomainRestMessageBody.scala │ │ │ ├── session │ │ │ │ └── SessionStoreActor.scala │ │ │ ├── stats │ │ │ │ └── DomainStatsActor.scala │ │ │ └── user │ │ │ │ └── DomainUserStoreActor.scala │ │ │ └── server │ │ │ ├── ActorBasedDomainCreator.scala │ │ │ ├── AuthenticationActor.scala │ │ │ ├── ConfigStoreActor.scala │ │ │ ├── ConvergenceDatabaseInitializerActor.scala │ │ │ ├── DatabaseManagerActor.scala │ │ │ ├── DomainCreator.scala │ │ │ ├── DomainDatabaseManagerActor.scala │ │ │ ├── DomainLifecycleTopic.scala │ │ │ ├── DomainStoreActor.scala │ │ │ ├── NamespaceStoreActor.scala │ │ │ ├── RoleStoreActor.scala │ │ │ ├── ServerStatusActor.scala │ │ │ ├── UserApiKeyStoreActor.scala │ │ │ ├── UserCreator.scala │ │ │ ├── UserFavoriteDomainStoreActor.scala │ │ │ ├── UserSessionTokenReaperActor.scala │ │ │ └── UserStoreActor.scala │ │ ├── dev │ │ ├── ConvergenceDevServer.scala │ │ └── EmbeddedOrientDB.scala │ │ ├── model │ │ ├── DomainId.scala │ │ ├── domain │ │ │ ├── CollectionConfig.scala │ │ │ ├── ModelSnapshotConfig.scala │ │ │ ├── activity │ │ │ │ ├── Activity.scala │ │ │ │ └── ActivityId.scala │ │ │ ├── chat │ │ │ │ ├── ChatEvent.scala │ │ │ │ ├── ChatMember.scala │ │ │ │ ├── ChatMembership.scala │ │ │ │ ├── ChatState.scala │ │ │ │ └── ChatType.scala │ │ │ ├── collection │ │ │ │ ├── Collection.scala │ │ │ │ ├── CollectionAndUserPermissions.scala │ │ │ │ ├── CollectionPermissions.scala │ │ │ │ ├── CollectionSummary.scala │ │ │ │ └── CollectionWorldAndUserPermissions.scala │ │ │ ├── group │ │ │ │ ├── UserGroup.scala │ │ │ │ ├── UserGroupInfo.scala │ │ │ │ └── UserGroupSummary.scala │ │ │ ├── jwt │ │ │ │ ├── JwtAuthKey.scala │ │ │ │ ├── JwtClaimConstants.scala │ │ │ │ └── JwtKeyPair.scala │ │ │ ├── model │ │ │ │ ├── DataValue.scala │ │ │ │ ├── Model.scala │ │ │ │ ├── ModelId.scala │ │ │ │ ├── ModelMetaData.scala │ │ │ │ ├── ModelPermissions.scala │ │ │ │ ├── ModelPermissionsData.scala │ │ │ │ ├── ModelReferenceValues.scala │ │ │ │ ├── ModelSnapshot.scala │ │ │ │ ├── ModelSnapshotMetaData.scala │ │ │ │ ├── ModelUserPermissions.scala │ │ │ │ └── ReferenceState.scala │ │ │ ├── session │ │ │ │ ├── DomainSession.scala │ │ │ │ └── DomainSessionAndUserId.scala │ │ │ └── user │ │ │ │ ├── DomainUser.scala │ │ │ │ ├── DomainUserId.scala │ │ │ │ └── DomainUserType.scala │ │ └── server │ │ │ ├── apikey │ │ │ └── UserApiKey.scala │ │ │ ├── domain │ │ │ ├── Domain.scala │ │ │ ├── DomainAvailability.scala │ │ │ ├── DomainDatabase.scala │ │ │ ├── DomainDatabaseState.scala │ │ │ ├── DomainState.scala │ │ │ ├── DomainStatus.scala │ │ │ ├── Namespace.scala │ │ │ └── NamespaceAndDomains.scala │ │ │ ├── role │ │ │ ├── RoleProfile.scala │ │ │ ├── RoleTarget.scala │ │ │ └── RoleTargetType.scala │ │ │ └── user │ │ │ └── User.scala │ │ ├── security │ │ ├── AuthorizationProfile.scala │ │ ├── AuthorizationProfileData.scala │ │ ├── PasswordUtil.scala │ │ ├── Permissions.scala │ │ └── Roles.scala │ │ └── util │ │ ├── DataValueToJValue.scala │ │ ├── DomainIdAndStringEntityIdSerializer.scala │ │ ├── DomainIdEntityIdSerializer.scala │ │ ├── EitherUtils.scala │ │ ├── EntityIdSerializer.scala │ │ ├── EventLoop.scala │ │ ├── ExceptionUtils.scala │ │ ├── LoggingConfigManager.scala │ │ ├── QueryLimit.scala │ │ ├── QueryOffset.scala │ │ ├── RandomStringGenerator.scala │ │ ├── SafeTry.scala │ │ ├── Sha256HashValidator.scala │ │ ├── SubscriptionMap.scala │ │ ├── SystemOutRedirector.scala │ │ ├── TryUtils.scala │ │ ├── TryWithResource.scala │ │ ├── UnexpectedErrorException.scala │ │ ├── actor │ │ ├── ActorSharding.scala │ │ ├── AskUtils.scala │ │ ├── NoPropsActorSharding.scala │ │ ├── NonWrappedMessageExtractor.scala │ │ ├── ShardedActor.scala │ │ └── ShardedActorStatUpPlan.scala │ │ ├── concurrent │ │ ├── FutureUtils.scala │ │ └── package.scala │ │ └── serialization │ │ ├── MappedTypeHints.scala │ │ ├── PolymorphicSerializer.scala │ │ └── akka │ │ ├── CborSerializable.scala │ │ ├── ConvergenceJacksonModule.scala │ │ ├── DomainStatusSerialization.scala │ │ ├── DomainUserIdSerialization.scala │ │ └── DomainUserTypeSerialization.scala ├── orientdb │ ├── config │ │ ├── automatic-backup.json │ │ ├── custom-sql-functions.json │ │ ├── default-distributed-db-config.json │ │ ├── hazelcast.xml │ │ ├── jdbc-drivers.json │ │ ├── orientdb-client-log.properties │ │ ├── orientdb-etl-log.properties │ │ ├── orientdb-server-config.xml │ │ ├── orientdb-server-log.properties │ │ └── security.json │ └── www │ │ ├── clientaccesspolicy.xml │ │ ├── crossdomain.xml │ │ ├── favicon.ico │ │ ├── index.htm │ │ └── robots.txt ├── test-ot │ └── scala │ │ └── com │ │ └── convergencelabs │ │ └── convergence │ │ └── server │ │ ├── backend │ │ └── services │ │ │ └── domain │ │ │ └── model │ │ │ └── ot │ │ │ └── xform │ │ │ ├── MockModel.scala │ │ │ ├── OperationPairExhaustiveSpec.scala │ │ │ ├── TransformationCase.scala │ │ │ ├── array │ │ │ ├── ArrayInsertInsertExhaustiveSpec.scala │ │ │ ├── ArrayInsertMoveExhaustiveSpec.scala │ │ │ ├── ArrayInsertRemoveExhaustiveSpec.scala │ │ │ ├── ArrayInsertReplaceExhaustiveSpec.scala │ │ │ ├── ArrayInsertSetExhaustiveSpec.scala │ │ │ ├── ArrayMoveInsertExhaustiveSpec.scala │ │ │ ├── ArrayMoveMoveExhaustiveSpec.scala │ │ │ ├── ArrayMoveRemoveExhaustiveSpec.scala │ │ │ ├── ArrayMoveReplaceExhaustiveSpec.scala │ │ │ ├── ArrayMoveSetExhaustiveSpec.scala │ │ │ ├── ArrayOperationExhaustiveSpec.scala │ │ │ ├── ArrayRemoveInsertExhaustiveSpec.scala │ │ │ ├── ArrayRemoveMoveExhaustiveSpec.scala │ │ │ ├── ArrayRemoveRemoveExhaustiveSpec.scala │ │ │ ├── ArrayRemoveReplaceExhaustiveSpec.scala │ │ │ ├── ArrayRemoveSetExhaustiveSpec.scala │ │ │ ├── ArrayReplaceInsertExhaustiveSpec.scala │ │ │ ├── ArrayReplaceMoveExhaustiveSpec.scala │ │ │ ├── ArrayReplaceRemoveExhaustiveSpec.scala │ │ │ ├── ArrayReplaceReplaceExhaustiveSpec.scala │ │ │ ├── ArrayReplaceSetExhaustiveSpec.scala │ │ │ ├── ArraySetInsertExhaustiveSpec.scala │ │ │ ├── ArraySetMoveExhaustiveSpec.scala │ │ │ ├── ArraySetRemoveExhaustiveSpec.scala │ │ │ ├── ArraySetReplaceExhaustiveSpec.scala │ │ │ ├── ArraySetSetExhaustiveSpec.scala │ │ │ ├── MockArrayModel.scala │ │ │ └── MoveRangeGenerator.scala │ │ │ ├── obj │ │ │ ├── MockObjectModel.scala │ │ │ ├── ObjectAddPropertyAddPropertyExhaustiveSpec.scala │ │ │ ├── ObjectAddPropertyRemovePropertyExhaustiveSpec.scala │ │ │ ├── ObjectAddPropertySetExhaustiveSpec.scala │ │ │ ├── ObjectAddPropertySetPropertyExhaustiveSpec.scala │ │ │ ├── ObjectOperationExhaustiveSpec.scala │ │ │ ├── ObjectRemovePropertyAddPropertyExhaustiveSpec.scala │ │ │ ├── ObjectRemovePropertyRemovePropertyExhaustiveSpec.scala │ │ │ ├── ObjectRemovePropertySetExhaustiveSpec.scala │ │ │ ├── ObjectRemovePropertySetPropertyExhaustiveSpec.scala │ │ │ ├── ObjectSetAddPropertyExhaustiveSpec.scala │ │ │ ├── ObjectSetPropertyAddPropertyExhaustiveSpec.scala │ │ │ ├── ObjectSetPropertyRemovePropertyExhaustiveSpec.scala │ │ │ ├── ObjectSetPropertySetExhaustiveSpec.scala │ │ │ ├── ObjectSetPropertySetPropertyExhaustiveSpec.scala │ │ │ ├── ObjectSetRemovePropertyExhaustiveSpec.scala │ │ │ ├── ObjectSetSetExhaustiveSpec.scala │ │ │ └── ObjectSetSetPropertyExhaustiveSpec.scala │ │ │ └── string │ │ │ ├── MockStringModel.scala │ │ │ ├── StringOperationExhaustiveSpec.scala │ │ │ ├── StringSetSetExhaustiveSpec.scala │ │ │ ├── StringSetSpliceExhaustiveSpec.scala │ │ │ ├── StringSpliceRangeGenerator.scala │ │ │ ├── StringSpliceSetExhaustiveSpec.scala │ │ │ └── StringSpliceSpliceExhaustiveSpec.scala │ │ └── test │ │ └── tags.scala └── test │ ├── otfspec │ ├── otf-array-insert-inesrt-spec.json │ ├── otf-array-insert-move-spec.json │ ├── otf-array-insert-remove-spec.json │ ├── otf-array-insert-repalce-spec.json │ ├── otf-array-insert-set-spec.json │ ├── otf-array-move-insert-spec.json │ ├── otf-array-move-move-spec.json │ ├── otf-array-move-remove-spec.json │ ├── otf-array-move-replace-spec.json │ ├── otf-array-move-set-spec.json │ ├── otf-array-remove-insert-spec.json │ ├── otf-array-remove-move-spec.json │ ├── otf-array-remove-remove-spec.json │ ├── otf-array-remove-replace-spec.json │ ├── otf-array-remove-set-spec.json │ ├── otf-array-repalce-insert-spec.json │ ├── otf-array-replace-move-spec.json │ ├── otf-array-replace-remove-spec.json │ ├── otf-array-replace-replace-spec.json │ ├── otf-array-replace-set-spec.json │ ├── otf-array-set-insert-spec.json │ ├── otf-array-set-move-spec.json │ ├── otf-array-set-remove-spec.json │ ├── otf-array-set-replace-spec.json │ ├── otf-array-set-set-spec.json │ ├── otf-boolean-set-set-spec.json │ ├── otf-date-set-set-spec.json │ ├── otf-number-add-add-spec.json │ ├── otf-number-add-set-spec.json │ ├── otf-number-set-add-spec.json │ ├── otf-number-set-set-spec.json │ ├── otf-object-addprop-addprop-spec.json │ ├── otf-object-addprop-removeprop-spec.json │ ├── otf-object-addprop-set-spec.json │ ├── otf-object-addprop-setprop-spec.json │ ├── otf-object-removeprop-addprop-spec.json │ ├── otf-object-removeprop-removeprop-spec.json │ ├── otf-object-removeprop-set-spec.json │ ├── otf-object-removeprop-setprop-spec.json │ ├── otf-object-set-addprop-spec.json │ ├── otf-object-set-removeprop-spec.json │ ├── otf-object-set-set-spec.json │ ├── otf-object-set-setprop-spec.json │ ├── otf-object-setprop-addprop-spec.json │ ├── otf-object-setprop-removeprop-spec.json │ ├── otf-object-setprop-set-spec.json │ ├── otf-object-setprop-setprop-spec.json │ ├── otf-string-set-set-spec.json │ ├── otf-string-set-splice-spec.json │ ├── otf-string-splice-insert-splice-insert-spec.json │ ├── otf-string-splice-insert-splice-remove-spec.json │ ├── otf-string-splice-insert-splice-replace-spec.json │ ├── otf-string-splice-remove-splice-insert-spec.json │ ├── otf-string-splice-remove-splice-remove-spec.json │ ├── otf-string-splice-replace-splice-insert-spec.json │ └── otf-string-splice-replace-splice-replace-spec.json │ ├── resources │ ├── application.conf │ ├── cluster-application.conf │ ├── log4j2.xml │ ├── orientdb-server-config.xml │ └── schema │ │ ├── bad-index │ │ └── index.yaml │ │ └── test-index │ │ ├── deltas │ │ ├── 2020_03_01_add-class-3.yaml │ │ ├── 2020_04_12_add-class-1-prop3.yaml │ │ ├── 2020_05_10_rename-class-2-prop1.yaml │ │ ├── 2020_06_27_make-class-2-prop1a-nullable.yaml │ │ └── 2020_06_27_make-class-2-prop1a-nullable@2.0.yaml │ │ ├── index.yaml │ │ ├── schemas │ │ ├── 1.0.yaml │ │ ├── 2.0.yaml │ │ ├── 2.1.yaml │ │ ├── 3.0.yaml │ │ ├── 3.1.yaml │ │ ├── 4.0.yaml │ │ └── 5.0.yaml │ │ └── versions │ │ ├── 1.0.yaml │ │ ├── 2.0.yaml │ │ ├── 2.1.yaml │ │ ├── 3.0.yaml │ │ ├── 3.1.yaml │ │ ├── 4.0.yaml │ │ └── 5.0.yaml │ └── scala │ └── com │ └── convergencelabs │ └── convergence │ └── server │ ├── InducedTestingException.scala │ ├── api │ ├── realtime │ │ ├── ClientActorSpec.scala │ │ ├── HeartbeatHelperSpec.scala │ │ ├── MockConvergenceClient.scala │ │ ├── ProtocolConnectionSpec.scala │ │ ├── ResourceManagerSpec.scala │ │ ├── TestReplyCallback.scala │ │ └── protocol │ │ │ ├── ChatProtoConvertersSpec.scala │ │ │ ├── DataValueProtoConvertersSpec.scala │ │ │ ├── OperationConvertersSpec.scala │ │ │ └── PermissionsProtoConvertersSpec.scala │ └── rest │ │ └── AuthenticatorSpec.scala │ ├── backend │ ├── datastore │ │ ├── AbstractPersistenceProviderSpec.scala │ │ ├── OrientDBUtilSpec.scala │ │ ├── PersistenceStoreSpec.scala │ │ ├── convergence │ │ │ ├── ConvergencePersistenceStoreSpec.scala │ │ │ ├── DomainSchemaVersionLogStoreSpec.scala │ │ │ ├── DomainStoreSpec.scala │ │ │ ├── NamespaceStoreSpec.scala │ │ │ ├── RoleStoreSpec.scala │ │ │ └── UserStoreSpec.scala │ │ ├── domain │ │ │ ├── ActivityStoreSpec.scala │ │ │ ├── ChatStoreSpec.scala │ │ │ ├── CollectionPermissionsStoreSpec.scala │ │ │ ├── CollectionStoreSpec.scala │ │ │ ├── DomainConfigStoreSpec.scala │ │ │ ├── DomainPersistenceStoreSpec.scala │ │ │ ├── JwtAuthKeyStoreSpec.scala │ │ │ ├── ModelOperationProcessorSpec.scala │ │ │ ├── ModelOperationStoreSpec.scala │ │ │ ├── ModelPermissionsStoreSpec.scala │ │ │ ├── ModelSnapshotStoreSpec.scala │ │ │ ├── ModelStoreQuerySpec.scala │ │ │ ├── ModelStoreSpec.scala │ │ │ ├── OrientPathUtilSpec.scala │ │ │ ├── PermissionsStoreSpec.scala │ │ │ ├── SessionStoreSpec.scala │ │ │ ├── UserGroupStoreSpec.scala │ │ │ ├── model │ │ │ │ ├── mapper │ │ │ │ │ ├── ArrayInsertOperationMapperSpec.scala │ │ │ │ │ ├── ArrayRemoveOperationMapperSpec.scala │ │ │ │ │ ├── ArrayReplaceOperationMapperSpec.scala │ │ │ │ │ ├── ArraySetOperationMapperSpec.scala │ │ │ │ │ ├── BooleanSetOperationMapperSpec.scala │ │ │ │ │ ├── CompoundOperationMapperSpec.scala │ │ │ │ │ ├── DateSetOperationMapperSpec.scala │ │ │ │ │ ├── ModelSnapshotConfigMapperSpec.scala │ │ │ │ │ ├── NumberAddOperationMapperSpec.scala │ │ │ │ │ ├── NumberSetOperationMapperSpec.scala │ │ │ │ │ ├── ObjectAddPropertyOperationMapperSpec.scala │ │ │ │ │ ├── ObjectRemovePropertyOperationMapperSpec.scala │ │ │ │ │ ├── ObjectSetOperationMapperSpec.scala │ │ │ │ │ ├── ObjectSetPropertyOperationMapperSpec.scala │ │ │ │ │ ├── OrientDBOperationMapperSpec.scala │ │ │ │ │ ├── StringSetOperationMapperSpec.scala │ │ │ │ │ └── StringSpliceOperationMapperSpec.scala │ │ │ │ └── query │ │ │ │ │ ├── ModelQueryBuilderSpec.scala │ │ │ │ │ └── SelectStatementSpec.scala │ │ │ └── user │ │ │ │ └── DomainUserStoreSpec.scala │ │ └── mapper │ │ │ └── ODocumentMapperSpec.scala │ ├── db │ │ └── schema │ │ │ ├── DeltaProcessorSpec.scala │ │ │ ├── NonRecordingSchemaManager.scala │ │ │ ├── SchemaEqualitySpec.scala │ │ │ ├── SchemaEqualityTester.scala │ │ │ ├── SchemaEqualityTesterSpec.scala │ │ │ ├── SchemaManagerSpec.scala │ │ │ ├── SchemaMetaDataRepositorySpec.scala │ │ │ └── SchemaVersionSpec.scala │ └── services │ │ ├── domain │ │ ├── AuthenticationHandlerSpec.scala │ │ ├── DomainSessionActorSpec.scala │ │ ├── JwtUtilSpec.scala │ │ ├── activity │ │ │ └── ActivityActorSpec.scala │ │ ├── chat │ │ │ └── processors │ │ │ │ ├── MessageReplyTaskSpec.scala │ │ │ │ └── event │ │ │ │ ├── AddUserEventProcessorSpec.scala │ │ │ │ ├── ChatEventMessageProcessorSpec.scala │ │ │ │ ├── JoinEventProcessorSpec.scala │ │ │ │ ├── LeaveEventProcessorSpec.scala │ │ │ │ ├── MarkSeenEventProcessorSpec.scala │ │ │ │ ├── PublishMessageEventProcessorSpec.scala │ │ │ │ ├── RemoveUserEventProcessorSpec.scala │ │ │ │ ├── SetNameEventProcessorSpec.scala │ │ │ │ ├── SetTopicEventProcessorSpec.scala │ │ │ │ └── TestConstants.scala │ │ ├── model │ │ │ ├── DomainAvailabilitySpec.scala │ │ │ ├── DomainStatusSpec.scala │ │ │ ├── ModelSnapshotConfigSpec.scala │ │ │ ├── RealtimeModelActorSpec.scala │ │ │ ├── ot │ │ │ │ ├── OTFTestHarnessSpec.scala │ │ │ │ ├── OperationsSpec.scala │ │ │ │ ├── PathComparatorSpec.scala │ │ │ │ ├── ServerConcurrencyControlSpec.scala │ │ │ │ └── xform │ │ │ │ │ ├── OperationTransformerSpec.scala │ │ │ │ │ ├── ReferenceTransformerSpec.scala │ │ │ │ │ ├── TransformationFunctionRegistrySpec.scala │ │ │ │ │ └── reference │ │ │ │ │ └── IndexTransformerSpec.scala │ │ │ ├── reference │ │ │ │ └── RangeReferenceSpec.scala │ │ │ └── value │ │ │ │ ├── RealTimeArraySpec.scala │ │ │ │ └── RealTimeObjectSpec.scala │ │ └── permissions │ │ │ └── PermissionsCacheSpec.scala │ │ └── server │ │ └── DomainDatabaseManagerActorSpec.scala │ └── util │ ├── DomainIdEntitySerializerSpec.scala │ ├── MockDomainPersistenceManager.scala │ ├── PolymorphicSerializerSpec.scala │ ├── Sha256HashValidatorSpec.scala │ └── TryWithResourceSpec.scala └── version.sbt /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | env: 15 | SCALACTIC_FILL_FILE_PATHNAMES: true 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Set up JDK 11 20 | uses: actions/setup-java@v2 21 | with: 22 | java-version: '11' 23 | distribution: 'adopt' 24 | 25 | - name: Compile 26 | run: sbt -J-Xmx3G -J-Xss5M compile 27 | 28 | - name: Test 29 | run: sbt -J-Xmx3G -J-Xss5M test 30 | 31 | - name: Package 32 | run: sbt dist/stage 33 | 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | project/project 2 | project/target 3 | target 4 | /bin/ 5 | .worksheet 6 | .cache-main 7 | .cache-tests 8 | .history 9 | *.mdb 10 | .idea 11 | .bsp 12 | .vscode 13 | 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /distribution/src/universal/conf/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/OrientDB-Domain-Queries.md: -------------------------------------------------------------------------------- 1 | # Orient DB Domain Queries 2 | This document contains useful OrientDB Queries for the Domain Schema. 3 | 4 | ## Get Model As JSON 5 | ```SQL 6 | SELECT @this.toJson('fetchPlan:*:-1') FROM Model WHERE id = ''; 7 | ``` 8 | 9 | ## Find Model Permissions Where User is Gone 10 | ```SQL 11 | SELECT * FROM `ModelUserPermissions` WHERE user.username IS NULL; 12 | ``` 13 | 14 | ## Delete Models that are Orphaned 15 | ```SQL 16 | DELETE FROM ModelUserPermissions WHERE user.username IS NULL; 17 | DELETE FROM DataValue WHERE model IN (SELECT * FROM Model WHERE userPermissions = [NULL]); 18 | DELETE FROM ModelSnapshot WHERE model IN (SELECT * FROM Model WHERE userPermissions = [NULL]); 19 | DELETE FROM ModelOperation WHERE model IN (SELECT * FROM Model WHERE userPermissions = [NULL]); 20 | DELETE FROM Model WHERE userPermissions = [NULL]; 21 | ``` 22 | -------------------------------------------------------------------------------- /docs/Release.md: -------------------------------------------------------------------------------- 1 | To release the Convergence Server, follow these steps: 2 | 3 | ```shell script 4 | sbt clean; dist/clean 5 | sbt compile 6 | sbt test 7 | 8 | sbt publishSigned 9 | 10 | sbt dist/stage 11 | sbt dist/publishSigned 12 | ``` 13 | -------------------------------------------------------------------------------- /docs/StringSplice.md: -------------------------------------------------------------------------------- 1 | ## Server Overlaps Client 2 | ### Transformation Case 3 | ``` 4 | ServerOp(index: 2, delete: 5, insert: "XYZ") 5 | ClientOp(index: 4, delete: 4, insert: "QRS") 6 | 7 | Value: ABCDEFGHIJ 8 | Indices: 0123456789 9 | 10 | ServerOp: ^---^ 11 | XYZ 12 | 13 | Client Op: ^--^ 14 | QRS 15 | 16 | ServerOp'(index: 2, delete: 5, insert: "XYZ") 17 | ClientOp'(index: 5, delete: 1, insert: "") 18 | ``` 19 | 20 | ### Server State Path 21 | ``` 22 | Value: ABCDEFGHIJ 23 | Indices: 0123456789 24 | 25 | ServerOp: ^---^ 26 | XYZ 27 | 28 | Value: ABXYZHIJ 29 | Indices: 01234567 30 | 31 | ClientOp': ^ 32 | 33 | Value: ABXYZIJ 34 | Indices: 0123456 35 | ``` 36 | 37 | 38 | ### Client State Path 39 | ``` 40 | Value: ABCDEFGHIJ 41 | Indices: 0123456789 42 | 43 | ClientOp: ^--^ 44 | QRS 45 | 46 | Value: ABCDQRSIJ 47 | Indices: 012345678 48 | 49 | ServerOp': ^---^ 50 | XYZ 51 | 52 | Value: ABXYZIJ 53 | Indices: 0123456 54 | ``` -------------------------------------------------------------------------------- /docs/Toxiproxy.md: -------------------------------------------------------------------------------- 1 | # Toxiproxy 2 | [Toxiproxy](http://toxiproxy.io) is a handy tool for throttling / disabling network resources. It can be used to test out Convergence in a constrained network environment. 3 | 4 | # Installation 5 | See documentation here: 6 | 7 | https://github.com/Shopify/toxiproxy 8 | 9 | For OSX 10 | 11 | ``` 12 | $ brew tap shopify/shopify 13 | $ brew install toxiproxy 14 | ``` 15 | 16 | # Start Server 17 | 18 | ``` 19 | toxiproxy-server 20 | ``` 21 | 22 | 23 | # Create Proxies 24 | ``` 25 | toxiproxy-cli create convergence_ws -l localhost:9080 -u localhost:8080 26 | toxiproxy-cli create convergence_rest -l localhost:9081 -u localhost:8081 27 | ``` 28 | 29 | # Add a toxic 30 | ``` 31 | toxiproxy-cli toxic add convergence_ws -t latency -a latency=3000 32 | ``` 33 | 34 | # Remove a toxic 35 | ``` 36 | toxiproxy-cli toxic remove convergence_ws -n latency_downstream 37 | ``` 38 | -------------------------------------------------------------------------------- /docs/rest-testing-commands.md: -------------------------------------------------------------------------------- 1 | # REST API Testing with CURL 2 | 3 | ## Authenticate 4 | ```shell script 5 | curl -H "Origin: http://example.com" \ 6 | -d '{"username": "admin", "password": "password"}' -H 'Content-Type: application/json' \ 7 | --verbose \ 8 | -X POST \ 9 | http://localhost:8081/auth/login 10 | ``` 11 | 12 | ## Validate the session token. 13 | ```shell script 14 | curl -H "Origin: http://example.com" \ 15 | -d '{"token": "4Uoh3SpHcpZOW4iTazzZWp5KmKTz332H"}' -H 'Content-Type: application/json' \ 16 | --verbose \ 17 | -X POST \ 18 | http://localhost:8081/auth/validate 19 | ``` 20 | 21 | ## A Simple GET request with the session token header 22 | ```shell script 23 | curl -H "Origin: http://example.com" \ 24 | -H "Authorization: SessionToken 4Uoh3SpHcpZOW4iTazzZWp5KmKTz332H" \ 25 | --verbose \ 26 | -X GET \ 27 | http://localhost:8081/user/apiKeys 28 | ``` 29 | 30 | 31 | # Make a CORS Pre-Flight Reques 32 | ```shell script 33 | curl -H "Origin: http://example.com" \ 34 | -H "Access-Control-Request-Method: POST" \ 35 | -H "Access-Control-Request-Headers: X-Requested-With" \ 36 | -X OPTIONS \ 37 | --verbose \ 38 | http://localhost:8081/auth/login 39 | ``` -------------------------------------------------------------------------------- /project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.6.1 2 | -------------------------------------------------------------------------------- /project/plugins.sbt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "1.7.0") 13 | addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") 14 | addSbtPlugin("org.scoverage" %% "sbt-scoverage" % "1.5.1") 15 | addSbtPlugin("com.timushev.sbt" %% "sbt-updates" % "0.3.1") 16 | addSbtPlugin("com.github.gseitz" %% "sbt-release" % "1.0.8") 17 | addSbtPlugin("net.virtual-void" %% "sbt-dependency-graph" % "0.9.0") 18 | addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") 19 | addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") 20 | -------------------------------------------------------------------------------- /src/dev-server/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/.gitattributes: -------------------------------------------------------------------------------- 1 | *.yaml text eol=lf 2 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/convergence/deltas/2021_06_02_user_role_indices.yaml: -------------------------------------------------------------------------------- 1 | description: |- 2 | Updates the indices for the UserRole table. The code assumes that a given 3 | user can only have one role per target. However, the existing index is 4 | unique on only user, target AND, role. This does not prevent a user from 5 | having more than one role for a target, which is not desireable. This delta 6 | removes the existing with all three attributes, and replaces it with on 7 | that is unique only on user and target. 8 | 9 | actions: 10 | 11 | ## 12 | ## 1. Add the index. 13 | ## 14 | 15 | - action: CreateIndex 16 | className: UserRole 17 | name: UserRole.user_target 18 | type: UniqueHashIndex 19 | properties: [ user, target ] 20 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/convergence/deltas/2021_06_26_domain_schema_delta_log_tag_not_mandatory.yaml: -------------------------------------------------------------------------------- 1 | description: |- 2 | Removes the mandatory flag from the DomainSchemaDeltaLog.tag property 3 | 4 | actions: 5 | 6 | ## 7 | ## 1. Alter the property to make it not mandatory 8 | ## 9 | - action: AlterProperty 10 | className: DomainSchemaDeltaLog 11 | name: tag 12 | alterations: { constraints: {mandatory: false} } 13 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/convergence/index.yaml: -------------------------------------------------------------------------------- 1 | currentVersion: 2.0 2 | versions: 3 | - 1.0 4 | - 2.0 5 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/convergence/versions/1.0.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 2020-07-12 3 | schemaSha256: a5afa28568745a674f0fb6f9c33471f6646885c73554319bee437db0b906873e 4 | deltas: 5 | - id: 2020_07_12_migrate_version_schema 6 | sha256: 7f4bad07313382850e12561ca750e678e331ceabf94a49ab9dc70d55862751cb 7 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/convergence/versions/2.0.yaml: -------------------------------------------------------------------------------- 1 | released: yes 2 | releaseDate: 2021-06-30 3 | schemaSha256: c4212e7b96c885398b84d900c5872daf3c3887dc7aa0be6d650f59bd9b78e2ae 4 | deltas: 5 | ## Version 1.0 6 | - id: 2020_07_12_migrate_version_schema 7 | sha256: 7f4bad07313382850e12561ca750e678e331ceabf94a49ab9dc70d55862751cb 8 | 9 | ## Version 2.0 10 | - id: 2021_06_26_domain_schema_delta_log_tag_not_mandatory 11 | sha256: 9091863c34f589def94386735b9d5e4274a609b7365fdac3fe955ea9d64c0c29 12 | - id: 2021_05_31_domain_availability_and_schema_version 13 | sha256: 0cd3ed571ee2e3cf8a7257505ace71e7a55f733555e4cdc20d4aa2796c786136 14 | - id: 2021_06_02_user_role_indices 15 | sha256: 5fc2ba93cebe85fd9df980cf1838630ae4df51364179993716c249b1e3b82127 -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/domain/deltas/2021_06_01_data_value_model_index.yaml: -------------------------------------------------------------------------------- 1 | description: |- 2 | Adds an index for DataValues by model so that deleting all operations 3 | for a model is faster. 4 | 5 | actions: 6 | 7 | ## 8 | ## 1. Add the index. 9 | ## 10 | 11 | - action: CreateIndex 12 | className: DataValue 13 | name: DataValue.model 14 | type: NotUniqueHashIndex 15 | properties: [model] -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/domain/deltas/2021_06_26_create_activity_class.yaml: -------------------------------------------------------------------------------- 1 | description: |- 2 | Creates the new Activity class. 3 | 4 | actions: 5 | 6 | ## 7 | ## 1. Create the activity class. 8 | ## 9 | 10 | - action: CreateClass 11 | name: Activity 12 | superclass: PermissionTarget 13 | properties: 14 | - { name: id, type: String, constraints: { mandatory: true, notNull: true, readOnly: true } } 15 | - { name: type, type: String, constraints: { mandatory: true, notNull: true, readOnly: true } } 16 | - { name: created, type: DateTime, constraints: { mandatory: true, notNull: true, readOnly: true } } 17 | 18 | - action: CreateIndex 19 | className: Activity 20 | name: Activity.type_id 21 | type: UniqueHashIndex 22 | properties: [ type, id ] -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/domain/deltas/2021_06_26_create_permissions_target_class.yaml: -------------------------------------------------------------------------------- 1 | description: |- 2 | Creates the new PermissionTarget abstract class that will be the super class 3 | of the Activity and Chat class. 4 | 5 | actions: 6 | 7 | ## 8 | ## 1. Create the abstract permission target class. 9 | ## 10 | 11 | - action: CreateClass 12 | name: PermissionTarget 13 | abstract: true 14 | properties: 15 | - { name: permissions, type: LinkSet, linkedClass: Permission, constraints: { mandatory: false, notNull: true } } 16 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/domain/deltas/2021_06_26_rename_permissions_fields.yaml: -------------------------------------------------------------------------------- 1 | description: |- 2 | Two fields in the Permisison class have been renamed. The "assignedTo" field 3 | has been renamed to "grantee" and the "forRecord" field has been renamed 4 | "grantee". 5 | 6 | actions: 7 | 8 | ## 9 | ## 1. Drop the index that references the old properties. 10 | ## 11 | - action: DropIndex 12 | name: Permission.assignedTo_forRecord_permission 13 | 14 | ## 15 | ## 2. Rename the properties 16 | ## 17 | - {action: AlterProperty, className: Permission, name: assignedTo, alterations: { name: grantee}} 18 | - {action: AlterProperty, className: Permission, name: forRecord, alterations: { name: target }} 19 | 20 | ## 21 | ## 3. Create the new index. 22 | ## 23 | - action: CreateIndex 24 | className: Permission 25 | name: Permission.grantee_target_permission 26 | type: UniqueHashIndex 27 | properties: [ grantee, target, permission ] 28 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/domain/deltas/2021_06_26_set_chat_class_superclass.yaml: -------------------------------------------------------------------------------- 1 | description: |- 2 | Sets the super class of the Chat class to the PermissionTarget class. 3 | 4 | actions: 5 | 6 | ## 7 | ## 1. Set the superclass of the Chat class. 8 | ## 9 | 10 | - action: AlterClass 11 | name: Chat 12 | superclass: PermissionTarget 13 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/domain/index.yaml: -------------------------------------------------------------------------------- 1 | currentVersion: 3.0 2 | versions: 3 | - 1.0 4 | - 2.0 5 | - 3.0 6 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/domain/versions/1.0.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 2020-07-11 3 | schemaSha256: 56b03b24917d45f0ee89d3c1b07bba3c24282e07d878ff7540406a546bf3f270 4 | deltas: [] 5 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/domain/versions/2.0.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 2021-06-26 3 | schemaSha256: a5083792465aa41894e28d39f86fec6c7187b5dde809d8df494a666df45ace75 4 | deltas: 5 | ## Version 2.0 6 | - id: 2021_06_01_data_value_model_index 7 | sha256: 7d8c9b02697339548aa2afe7ee08a5e0f3878a8d3228f8d928557f36664eed5b 8 | 9 | - id: 2021_06_26_domain_config_key_value_refactor 10 | sha256: fb5caa6ea744472b28b4a46e56fa5789e08e2683e5decea75ee08dff083124e4 11 | 12 | - id: 2021_06_26_create_permissions_target_class 13 | sha256: ea75a8435673a5383c68b05c65674e9d075dc94fc300807f1497a4cbd16eeba0 14 | 15 | - id: 2021_06_26_create_activity_class 16 | sha256: 02154b894ed15034fec703c4394b63ab4cfda61ef6c1bbb0d2719f3c4a0cc9f6 17 | 18 | - id: 2021_06_26_set_chat_class_superclass 19 | sha256: 3532a2f3775af5ccc85dc9693ae431a21bed4ecd64f000a320e4b3d75f965715 20 | 21 | - id: 2021_06_26_rename_permissions_fields 22 | sha256: d9d6da019c06a4fa23ddbc60b26a3a4b0951186fa50807bb76c440ae3b915e4e 23 | 24 | -------------------------------------------------------------------------------- /src/main/resources/com/convergencelabs/convergence/server/db/schema/domain/versions/3.0.yaml: -------------------------------------------------------------------------------- 1 | released: false 2 | releaseDate: 2021-07-12 3 | schemaSha256: 34e2b32038fbbe3c43770af146c62632c4594eb54e55133f3a95891b2c4d1884 4 | deltas: 5 | ## Version 2.0 6 | - id: 2021_06_01_data_value_model_index 7 | sha256: 7d8c9b02697339548aa2afe7ee08a5e0f3878a8d3228f8d928557f36664eed5b 8 | 9 | - id: 2021_06_26_domain_config_key_value_refactor 10 | sha256: fb5caa6ea744472b28b4a46e56fa5789e08e2683e5decea75ee08dff083124e4 11 | 12 | - id: 2021_06_26_create_permissions_target_class 13 | sha256: ea75a8435673a5383c68b05c65674e9d075dc94fc300807f1497a4cbd16eeba0 14 | 15 | - id: 2021_06_26_create_activity_class 16 | sha256: 02154b894ed15034fec703c4394b63ab4cfda61ef6c1bbb0d2719f3c4a0cc9f6 17 | 18 | - id: 2021_06_26_set_chat_class_superclass 19 | sha256: 3532a2f3775af5ccc85dc9693ae431a21bed4ecd64f000a320e4b3d75f965715 20 | 21 | - id: 2021_06_26_rename_permissions_fields 22 | sha256: d9d6da019c06a4fa23ddbc60b26a3a4b0951186fa50807bb76c440ae3b915e4e 23 | 24 | ## Version 3.0 25 | - id: 2021_07_12_string_splice_model_operation_migration 26 | sha256: f7ed4b957a7258b463e81e6e8436c8072fe1962bef6c6dfb84824db37e761b3b 27 | -------------------------------------------------------------------------------- /src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/common/Ok.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.common 13 | 14 | final case class Ok() 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/common/PagedData.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.common 13 | 14 | trait PagedDataResult[T] { 15 | val data: List[T] 16 | 17 | val offset: Long 18 | 19 | val count: Long 20 | } 21 | 22 | final case class PagedData[T](data: List[T], offset: Long, count: Long) extends PagedDataResult[T] 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/api/realtime/ErrorMessages.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.api.realtime 13 | 14 | import com.convergencelabs.convergence.proto.core._ 15 | 16 | object ErrorMessages { 17 | def Unauthorized(message: String): ErrorMessage = { 18 | ErrorMessage("unauthorized", message, Map()) 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/api/realtime/ExpectedError.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.api.realtime 13 | 14 | import org.json4s.JsonAST.JValue 15 | 16 | final case class ExpectedError(code: String, message: String, details: Map[String, JValue] = Map()) 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/api/realtime/protocol/CommonProtoConverters.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.api.realtime.protocol 13 | 14 | import java.time.Instant 15 | 16 | import com.google.protobuf.timestamp.Timestamp 17 | 18 | private[realtime] object CommonProtoConverters { 19 | def instantToTimestamp(instant: Instant): Timestamp = Timestamp(instant.getEpochSecond, instant.getNano) 20 | 21 | def timestampToInstant(timestamp: Timestamp): Instant = Instant.ofEpochSecond(timestamp.seconds, timestamp.nanos) 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/api/rest/DomainRestData.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.api.rest 13 | 14 | final case class DomainRestData(displayName: String, 15 | namespace: String, 16 | domainId: String, 17 | availability: String, 18 | status: String, 19 | statusMessage: String, 20 | schemaVersion: Option[String]) 21 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/api/rest/PagedRestResponse.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.api.rest 13 | 14 | final case class PagedRestResponse(data: List[Any], startIndex: Long, totalResults: Long) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/AbstractPersistenceProvider.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore 13 | 14 | import com.convergencelabs.convergence.server.backend.db.DatabaseProvider 15 | 16 | import scala.util.Try 17 | 18 | abstract class AbstractPersistenceProvider(dbProvider: DatabaseProvider) { 19 | def validateConnection(): Try[Unit] = { 20 | dbProvider.validateConnection() 21 | } 22 | 23 | def shutdown(): Unit = { 24 | dbProvider.shutdown() 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/SortOrder.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore 13 | 14 | import com.fasterxml.jackson.core.`type`.TypeReference 15 | 16 | object SortOrder extends Enumeration { 17 | type SortOder = Value 18 | val Ascending: SortOder = Value("ASC") 19 | val Descending: SortOder = Value("DESC") 20 | } 21 | 22 | final class SortOrderTypeReference extends TypeReference[SortOrder.Value] {} 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/ConfigNotFoundException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence 13 | 14 | final case class ConfigNotFoundException(key: String) extends Exception(s"The required config '$key' does not exist") 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/ConvergenceSchemaVersionLogEntry.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence 13 | 14 | import java.time.Instant 15 | 16 | final case class ConvergenceSchemaVersionLogEntry(version: String, date: Instant) 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/DomainSchemaVersionLogEntry.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence 13 | 14 | import java.time.Instant 15 | 16 | import com.convergencelabs.convergence.server.model.DomainId 17 | 18 | final case class DomainSchemaVersionLogEntry(domainId: DomainId, version: String, date: Instant) 19 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/NamespaceNotFoundException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence 13 | 14 | 15 | final case class NamespaceNotFoundException(namespace: String) extends Exception(s"A namespace with the id '$namespace' does not exists.") 16 | 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/SchemaDeltaStatus.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence 13 | 14 | object SchemaDeltaStatus { 15 | val Error = "error" 16 | val Success = "success" 17 | } 18 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/ConfigClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object ConfigClass extends OrientDbClass { 17 | val ClassName = "Config" 18 | 19 | object Fields { 20 | val Key = "key" 21 | val Value = "value" 22 | } 23 | 24 | object Indices { 25 | val Key = "Config.key" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/ConvergenceSchemaVersionLogClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object ConvergenceSchemaVersionLogClass extends OrientDbClass { 17 | val ClassName = "ConvergenceSchemaVersionLog" 18 | 19 | object Fields { 20 | val Version = "version" 21 | val Date = "date" 22 | } 23 | 24 | object Indices { 25 | val Version = "ConvergenceSchemaVersionsLog.version" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/DomainSchemaVersionLogClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object DomainSchemaVersionLogClass extends OrientDbClass { 17 | val ClassName = "DomainSchemaVersionLog" 18 | 19 | object Fields { 20 | val Domain = "domain" 21 | val Version = "version" 22 | val Date = "date" 23 | } 24 | 25 | object Indices { 26 | val Version = "DomainSchemaVersionsLog.version" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/NamespaceClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object NamespaceClass extends OrientDbClass { 17 | val ClassName = "Namespace" 18 | 19 | object Fields { 20 | val Id = "id" 21 | val DisplayName = "displayName" 22 | val UserNamespace = "userNamespace" 23 | } 24 | 25 | object Indices { 26 | val Id = "Namespace.id" 27 | val DisplayName = "Namespace.displayName" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/PermissionClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object PermissionClass extends OrientDbClass { 17 | val ClassName = "Permission" 18 | 19 | object Fields { 20 | val Id = "id" 21 | } 22 | 23 | object Indices { 24 | val Id = "Permission.id" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/RoleClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object RoleClass extends OrientDbClass { 17 | val ClassName = "Role" 18 | 19 | object Fields { 20 | val Name = "name" 21 | val TargetClass = "targetClass" 22 | val Permissions = "permissions" 23 | } 24 | 25 | object Indices { 26 | val NameTargetClass = "Role.name_targetClass" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/UserApiKeyClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object UserApiKeyClass extends OrientDbClass { 17 | val ClassName = "UserApiKey" 18 | 19 | object Fields { 20 | val User = "user" 21 | val Name = "name" 22 | val Key = "key" 23 | val Enabled = "enabled" 24 | val LastUsed = "lastUsed" 25 | } 26 | 27 | object Indices { 28 | val Key = "UserApiKey.key" 29 | val UserName = "UserApiKey.user_name" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/UserFavoriteDomainClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object UserFavoriteDomainClass extends OrientDbClass { 17 | val ClassName = "UserFavoriteDomain" 18 | 19 | object Fields { 20 | val User = "user" 21 | val Domain = "token" 22 | } 23 | 24 | object Indices { 25 | val UserDomain = "UserFavoriteDomain.user_domain" 26 | val User = "UserFavoriteDomain.user" 27 | val Domain = "UserFavoriteDomain.domain" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/UserRoleClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object UserRoleClass extends OrientDbClass { 17 | val ClassName = "UserRole" 18 | 19 | object Fields { 20 | val User = "user" 21 | val Role = "role" 22 | val Target = "target" 23 | } 24 | 25 | object Indices { 26 | val UserRoleTarget = "UserRole.user_role_target" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/convergence/schema/UserSessionTokenClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.convergence.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.domain.schema.OrientDbClass 15 | 16 | object UserSessionTokenClass extends OrientDbClass { 17 | val ClassName = "UserSessionToken" 18 | 19 | object Fields { 20 | val User = "user" 21 | val Token = "token" 22 | val ExpiresAt = "expiresAt" 23 | } 24 | 25 | object Indices { 26 | val Token = "UserSessionToken.token" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/DomainStateProvider.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.backend.datastore.domain 2 | 3 | import com.convergencelabs.convergence.server.backend.datastore.convergence.DomainStore 4 | import com.convergencelabs.convergence.server.model.DomainId 5 | import com.convergencelabs.convergence.server.model.server.domain.DomainState 6 | 7 | import scala.util.Try 8 | 9 | class DomainStateProvider(domainStore: DomainStore, domainId: DomainId) { 10 | 11 | def getDomainState(): Try[Option[DomainState]] = { 12 | domainStore.findDomain(domainId).map(_.map{ d => 13 | DomainState(d.domainId, d.availability, d.status) 14 | }) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/chat/ChatNotFoundException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.chat 13 | 14 | final case class ChatNotFoundException(chatId: String) extends RuntimeException() 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/chat/CreateChat.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.chat 13 | 14 | import java.time.Instant 15 | 16 | import com.convergencelabs.convergence.server.model.domain.chat.{ChatMembership, ChatType} 17 | 18 | private[chat] final case class CreateChat(id: String, 19 | chatType: ChatType.Value, 20 | created: Instant, 21 | membership: ChatMembership.Value, 22 | name: String, 23 | topic: String) -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/jwt/CreateOrUpdateJwtAuthKey.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.jwt 13 | 14 | final case class CreateOrUpdateJwtAuthKey(id: String, description: String, key: String, enabled: Boolean) -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/model/QueryParsingException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.model 13 | 14 | final case class QueryParsingException(message: String, query: String, index: Option[Int]) extends Exception(message) -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/permissions/GroupPermission.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.permissions 13 | 14 | /** 15 | * Represents a permission granted to a group. 16 | * 17 | * @param groupId The group the permission is granted too. 18 | * @param permission The permission granted to the user. 19 | */ 20 | final case class GroupPermission(groupId: String, permission: String) 21 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/permissions/UserPermission.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.permissions 13 | 14 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 15 | 16 | /** 17 | * Represents a permission granted to a user. 18 | * 19 | * @param userId The user the permission is granted too. 20 | * @param permission The permission granted to the user. 21 | */ 22 | final case class UserPermission(userId: DomainUserId, permission: String) 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ActivityClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ActivityClass extends OrientDbClass { 15 | val ClassName = "Activity" 16 | 17 | object Fields { 18 | val Id = "id" 19 | val Type = "type" 20 | val Created = "created" 21 | val Ephemeral = "ephemeral" 22 | val Permissions = "permissions" 23 | } 24 | 25 | object Indices { 26 | val Type_Id = "Activity.type_id" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatClass extends OrientDbClass { 15 | val ClassName = "Chat" 16 | 17 | object Fields { 18 | val Id = "id" 19 | val Type = "type" 20 | val Created = "created" 21 | val Private = "private" 22 | val Name = "name" 23 | val Topic = "topic" 24 | val Members = "members" 25 | val Permissions = "permissions" 26 | } 27 | 28 | object Indices { 29 | val Id = "Chat.id" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatCreatedEventClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatCreatedEventClass extends OrientDbClass { 15 | val ClassName = "ChatCreatedEvent" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val EventNo = "eventNo" 20 | val User = "user" 21 | val Timestamp = "timestamp" 22 | 23 | val Name = "name" 24 | val Topic = "topic" 25 | val Members = "members" 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatEventClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatEventClass extends OrientDbClass { 15 | val ClassName = "ChatEvent" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val EventNo = "eventNo" 20 | val User = "user" 21 | val Timestamp = "timestamp" 22 | } 23 | 24 | object Indices { 25 | val ChatEventNo = "ChatEvent.chat_eventNo" 26 | val Chat = "ChatEvent.chat" 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatMemberClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatMemberClass extends OrientDbClass { 15 | val ClassName = "ChatMember" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val User = "user" 20 | val Seen = "seen" 21 | } 22 | 23 | object Indices { 24 | val Chat_User = "ChatMember.chat_user" 25 | val Chat = "ChatMember.chat" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatMessageEventClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatMessageEventClass extends OrientDbClass { 15 | val ClassName = "ChatMessageEvent" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val EventNo = "eventNo" 20 | val User = "user" 21 | val Timestamp = "timestamp" 22 | val Message = "message" 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatNameChangedEventClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatNameChangedEventClass extends OrientDbClass { 15 | val ClassName = "ChatNameChangedEvent" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val EventNo = "eventNo" 20 | val User = "user" 21 | val Timestamp = "timestamp" 22 | 23 | val Name = "name" 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatTopicChangedEventClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatTopicChangedEventClass extends OrientDbClass { 15 | val ClassName = "ChatTopicChangedEvent" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val EventNo = "eventNo" 20 | val User = "user" 21 | val Timestamp = "timestamp" 22 | 23 | val Topic = "topic" 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatUserAddedEventClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatUserAddedEventClass extends OrientDbClass { 15 | val ClassName = "ChatUserAddedEvent" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val EventNo = "eventNo" 20 | val User = "user" 21 | val Timestamp = "timestamp" 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatUserJoinedEventClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatUserJoinedEventClass extends OrientDbClass { 15 | val ClassName = "ChatUserJoinedEvent" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val EventNo = "eventNo" 20 | val User = "user" 21 | val Timestamp = "timestamp" 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatUserLeftEventClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatUserLeftEventClass extends OrientDbClass { 15 | val ClassName = "ChatUserLeftEvent" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val EventNo = "eventNo" 20 | val User = "user" 21 | val Timestamp = "timestamp" 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ChatUserRemovedEventClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ChatUserRemovedEventClass extends OrientDbClass { 15 | val ClassName = "ChatUserRemovedEvent" 16 | 17 | object Fields { 18 | val Chat = "chat" 19 | val EventNo = "eventNo" 20 | val User = "user" 21 | val Timestamp = "timestamp" 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/CollectionClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object CollectionClass extends OrientDbClass { 15 | val ClassName = "Collection" 16 | 17 | object Indices { 18 | val Id = "Collection.id" 19 | } 20 | 21 | object Fields { 22 | val Id = "id" 23 | val Description = "description" 24 | val OverrideSnapshotConfig = "overrideSnapshotConfig" 25 | val SnapshotConfig = "snapshotConfig" 26 | val WorldPermissions = "worldPermissions" 27 | val UserPermissions = "userPermissions" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/CollectionPermissionsClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object CollectionPermissionsClass extends OrientDbClass { 15 | val ClassName = "CollectionPermissions" 16 | 17 | object Fields { 18 | val Read = "read" 19 | val Write = "write" 20 | val Create = "create" 21 | val Remove = "remove" 22 | val Manage = "manage" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/CollectionUserPermissionsClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object CollectionUserPermissionsClass extends OrientDbClass { 15 | val ClassName = "CollectionUserPermissions" 16 | 17 | object Fields { 18 | val Collection = "collection" 19 | val User = "user" 20 | val Permissions = "permissions" 21 | } 22 | 23 | object Indices { 24 | val User_Collection = "CollectionUserPermissions.user_collection" 25 | val User = "CollectionUserPermissions.user" 26 | val Collection = "CollectionUserPermissions.collection" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/DomainConfigClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object DomainConfigClass extends OrientDbClass { 15 | val ClassName = "DomainConfig" 16 | 17 | object Fields { 18 | val ModelSnapshotConfig = "modelSnapshotConfig" 19 | val CollectionConfig = "collectionConfig" 20 | val AdminPublicKey = "adminPublicKey" 21 | val AdminPrivateKey = "adminPrivateKey" 22 | val AnonymousAuth = "anonymousAuth" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/DomainSessionClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object DomainSessionClass extends OrientDbClass { 15 | val ClassName = "DomainSession" 16 | 17 | object Indices { 18 | val Id = "DomainSession.id" 19 | } 20 | 21 | object Fields { 22 | val Id = "id" 23 | val User = "user" 24 | val Connected = "connected" 25 | val Disconnected = "disconnected" 26 | val AuthMethod = "authMethod" 27 | val Client = "client" 28 | val ClientVersion = "clientVersion" 29 | val ClientMetaData = "clientMetaData" 30 | val RemoteHost = "remoteHost" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/JwtAuthKeyClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object JwtAuthKeyClass extends OrientDbClass { 15 | val ClassName = "JwtAuthKey" 16 | 17 | object Indices { 18 | val Id = "JwtAuthKey.id" 19 | } 20 | 21 | object Fields { 22 | val Id = "id" 23 | val Name = "name" 24 | val Description = "description" 25 | val Updated = "updated" 26 | val Key = "key" 27 | val Enabled = "enabled" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ModelOperationClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ModelOperationClass extends OrientDbClass { 15 | val ClassName = "ModelOperation" 16 | 17 | object Indices { 18 | val Model = "ModelOperation.model" 19 | val Model_Version = "ModelOperation.model_version" 20 | } 21 | 22 | object Fields { 23 | val Model = "model" 24 | val Version = "version" 25 | val Timestamp = "timestamp" 26 | val User = "user" 27 | val Session = "session" 28 | val Operation = "operation" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ModelPermissionsClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ModelPermissionsClass extends OrientDbClass { 15 | val ClassName = "ModelPermissions" 16 | 17 | object Fields { 18 | val Read = "read" 19 | val Write = "write" 20 | val Remove = "remove" 21 | val Manage = "manage" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ModelSnapshotClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ModelSnapshotClass extends OrientDbClass { 15 | val ClassName = "ModelSnapshot" 16 | 17 | object Indices { 18 | val Id = "Model.id" 19 | } 20 | 21 | object Fields { 22 | val Model = "model" 23 | val Version = "version" 24 | val Timestamp = "timestamp" 25 | val Data = "data" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/ModelUserPermissionsClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object ModelUserPermissionsClass extends OrientDbClass { 15 | val ClassName = "ModelUserPermissions" 16 | 17 | object Fields { 18 | val Model = "model" 19 | val User = "user" 20 | val Permissions = "permissions" 21 | } 22 | 23 | object Indices { 24 | val User_Model = "ModelUserPermissions.user_model" 25 | val User = "ModelUserPermissions.user" 26 | val Model = "ModelUserPermissions.model" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/OrientDbClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | trait OrientDbClass { 15 | def ClassName: String 16 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/PermissionClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object PermissionClass extends OrientDbClass { 15 | val ClassName = "Permission" 16 | 17 | object Fields { 18 | val Grantee = "grantee" 19 | val Target = "target" 20 | val Permission = "permission" 21 | val Permissions = "permissions" 22 | } 23 | 24 | object Indices { 25 | val Grantee_Target_Permission = "Permission.grantee_target_permission" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/UserCredentialClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object UserCredentialClass extends OrientDbClass { 15 | val ClassName = "UserCredential" 16 | 17 | object Indices { 18 | val User = "UserCredential.user" 19 | } 20 | 21 | object Fields { 22 | val User = "user" 23 | val Password = "password" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/UserGroupClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object UserGroupClass extends OrientDbClass { 15 | val ClassName = "UserGroup" 16 | 17 | object Indices { 18 | val Id = "UserGroup.id" 19 | } 20 | 21 | object Fields { 22 | val Id = "id" 23 | val Description = "description" 24 | val Members = "members" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/schema/UserReconnectTokenClass.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.schema 13 | 14 | object UserReconnectTokenClass extends OrientDbClass { 15 | val ClassName = "UserReconnectToken" 16 | 17 | object Indices { 18 | val Token = "UserReconnectToken.token" 19 | } 20 | 21 | object Fields { 22 | val Token = "token" 23 | val User = "user" 24 | val ExpireTime = "expireTime" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/session/SessionQueryType.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.session 13 | 14 | object SessionQueryType extends Enumeration { 15 | val Normal, Anonymous, Convergence, All, ExcludeConvergence = Value 16 | 17 | def withNameOpt(s: String): Option[Value] = values.find(_.toString.toLowerCase() == s.toLowerCase()) 18 | } 19 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/user/CreateNormalDomainUser.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.user 13 | 14 | final case class CreateNormalDomainUser(username: String, 15 | firstName: Option[String], 16 | lastName: Option[String], 17 | displayName: Option[String], 18 | email: Option[String]) -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/user/DomainUserField.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.user 13 | 14 | object DomainUserField extends Enumeration { 15 | type Field = Value 16 | val Username: Field = Value("username") 17 | val FirstName: Field = Value("firstName") 18 | val LastName: Field = Value("lastName") 19 | val DisplayName: Field = Value("displayName") 20 | val Email: Field = Value("email") 21 | } 22 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/datastore/domain/user/UpdateDomainUser.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.datastore.domain.user 13 | 14 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 15 | 16 | final case class UpdateDomainUser(userId: DomainUserId, 17 | firstName: Option[String], 18 | lastName: Option[String], 19 | displayName: Option[String], 20 | email: Option[String], 21 | disabled: Option[Boolean]) -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/db/schema/DatabaseSchemaStatus.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.db.schema 13 | 14 | final case class DatabaseSchemaStatus(version: String, 15 | versionStatus: DatabaseSchemaVersionStatus, 16 | healthy: Boolean, 17 | message: Option[String]) 18 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/db/schema/InstallDeltaAndScript.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.db.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.db.schema.delta.Delta 15 | 16 | /** 17 | * A deserialized installation delta along with the raw script it was parsed from. 18 | * 19 | * @param version The version of the schema the detla installs 20 | * @param delta The parsed delta as an ADT. 21 | * @param script The raw delta script. 22 | */ 23 | private[schema] final case class InstallDeltaAndScript(version: String, delta: Delta, script: String) 24 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/db/schema/SchemaVersionIndex.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.db.schema 13 | 14 | /** 15 | * The version index which indicates what versions are available. 16 | * 17 | * @param currentVersion The current version that this software version will 18 | * install to. 19 | * @param versions A listing of all of the available versions. 20 | */ 21 | private[schema] final case class SchemaVersionIndex(currentVersion: String, versions: List[String]) 22 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/db/schema/UpgradeDeltaAndScript.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.db.schema 13 | 14 | import com.convergencelabs.convergence.server.backend.db.schema.delta.Delta 15 | 16 | /** 17 | * A deserialized delta along with the raw script it was parsed from. 18 | * 19 | * @param id The id of the delta. 20 | * @param delta The parsed delta as an ADT. 21 | * @param script The raw delta script. 22 | */ 23 | private[schema] final case class UpgradeDeltaAndScript(id: UpgradeDeltaId, delta: Delta, script: String) 24 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/db/schema/UpgradeDeltaId.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.db.schema 13 | 14 | private[schema] object UpgradeDeltaId { 15 | def apply(id: String): UpgradeDeltaId = new UpgradeDeltaId(id, None) 16 | } 17 | 18 | private[schema] final case class UpgradeDeltaId(id: String, tag: Option[String]) { 19 | def withTag(tag: String): UpgradeDeltaId = { 20 | new UpgradeDeltaId(id, Some(tag)) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/db/schema/delta/CustomProperty.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.db.schema.delta 13 | 14 | private[schema] final case class CustomProperty(name: String, value: String) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/db/schema/delta/Delta.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.db.schema.delta 13 | 14 | /** 15 | * Represents a database delta. The delta represents a set of actions to apply 16 | * to a database. 17 | * 18 | * @param actions The set of actions to apply to the database to effect 19 | * change. 20 | * @param description An option description describing the purpose of the 21 | * delta. 22 | */ 23 | private[schema] final case class Delta(actions: List[DeltaAction], description: Option[String]) 24 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/db/schema/delta/IndexType.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.db.schema.delta 13 | 14 | import com.fasterxml.jackson.core.`type`.TypeReference 15 | 16 | /** 17 | * An enumeration that references the type of index to 18 | * create in an Orient Database. 19 | */ 20 | private[schema] object IndexType extends Enumeration { 21 | val Unique, 22 | NotUnique, 23 | FullText, 24 | Dictionary, 25 | Proxy, 26 | UniqueHashIndex, 27 | NotUniqueHashIndex, 28 | FullTextHashIndex, 29 | DictionaryHashIndex, 30 | Spatial = Value 31 | } 32 | 33 | private[schema] final class IndexTypeTypeReference extends TypeReference[IndexType.type] {} 34 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/db/schema/delta/SequenceType.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.db.schema.delta 13 | 14 | import com.fasterxml.jackson.core.`type`.TypeReference 15 | 16 | /** 17 | * The valid sequence types for OrientDB. 18 | */ 19 | private[schema] object SequenceType extends Enumeration { 20 | val Cached, Ordered = Value 21 | } 22 | 23 | private[schema] final class SequenceTypeTypeReference extends TypeReference[SequenceType.type] {} 24 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/UnauthorizedException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain 13 | 14 | final case class UnauthorizedException(message: String = "") extends Exception(message) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/activity/ActivityAutoCreationOptions.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.activity 13 | 14 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 15 | 16 | case class ActivityAutoCreationOptions(ephemeral: Boolean, 17 | worldPermissions: Set[String], 18 | userPermissions: Map[DomainUserId, Set[String]], 19 | groupPermission: Map[String, Set[String]]) 20 | 21 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/activity/ActivityEntityIdSerializer.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.backend.services.domain.activity 2 | 3 | import com.convergencelabs.convergence.server.model.DomainId 4 | import com.convergencelabs.convergence.server.model.domain.activity.ActivityId 5 | import com.convergencelabs.convergence.server.util.EntityIdSerializer 6 | 7 | /** 8 | * A help class to serialize a DomainId and an activity id 9 | * within the domain to an entity id in the Akka Cluster Sharding system. 10 | */ 11 | class ActivityEntityIdSerializer extends EntityIdSerializer[(DomainId, ActivityId)] { 12 | 13 | override protected def entityIdToParts(entityId: (DomainId, ActivityId)): List[String] = List( 14 | entityId._1.namespace, entityId._1.domainId, entityId._2.activityType, entityId._2.id 15 | ) 16 | 17 | override protected def partsToEntityId(parts: List[String]): (DomainId, ActivityId) = 18 | (DomainId(parts.head, parts(1)), ActivityId(parts(2), parts(3))) 19 | } 20 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/activity/ActivityPermissions.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.activity 13 | 14 | 15 | object ActivityPermissions { 16 | val Join: String = "join" 17 | val Lurk: String = "lurk" 18 | val Manage: String = "manage" 19 | val Remove: String = "remove" 20 | val SetState: String = "set_state" 21 | val ViewState: String = "view_state" 22 | 23 | val AllActivityPermissions = Set(Join, Lurk, Manage, Remove, SetState, ViewState) 24 | 25 | val DefaultWorldPermissions = Set(Join, SetState, ViewState) 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/chat/processors/ReplyAndBroadcastTask.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.chat.processors 13 | 14 | import com.convergencelabs.convergence.server.api.realtime.ChatClientActor 15 | 16 | final case class ReplyAndBroadcastTask[T](reply: MessageReplyTask[T], broadcast: Option[ChatClientActor.OutgoingMessage]) 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ClientDataRequestFailure.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model 13 | 14 | final case class ClientDataRequestFailure(message: String) extends RuntimeException(message) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ModelNotFoundException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model 13 | 14 | final case class ModelNotFoundException(modelId: String) extends Exception(s"A model with id '$modelId' does not exist.") 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ModelQueryResult.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model 13 | 14 | import com.convergencelabs.convergence.server.model.domain.model.ModelMetaData 15 | import org.json4s.JsonAST.JObject 16 | 17 | final case class ModelQueryResult(metaData: ModelMetaData, data: JObject) -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ResolvedModelPermission.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model 13 | 14 | import com.convergencelabs.convergence.server.model.domain.model.ModelPermissions 15 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 16 | 17 | private[model] final case class ResolvedModelPermission(overrideCollection: Boolean, 18 | modelWorld: ModelPermissions, 19 | modelUsers: Map[DomainUserId, ModelPermissions]) 20 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/RangeRangeRelationship.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot 13 | 14 | object RangeRangeRelationship extends Enumeration { 15 | val Precedes, PrecededBy, Meets, MetBy, Overlaps, OverlappedBy, Starts, StartedBy, Contains, ContainedBy, Finishes, FinishedBy, EqualTo = Value 16 | } 17 | 18 | object RangeIndexRelationship extends Enumeration { 19 | val Before, Start, Within, End, After = Value 20 | } 21 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/ReferenceValue.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot 13 | 14 | import com.convergencelabs.convergence.server.model.domain.model.ModelReferenceValues 15 | 16 | final case class ReferenceValue[V <: ModelReferenceValues](referenceValues: V, contextVersion: Long) 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/OperationTransformationFunction.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.DiscreteOperation 15 | 16 | private[ot] trait OperationTransformationFunction[S <: DiscreteOperation, C <: DiscreteOperation] { 17 | def transform(s: S, c: C): (DiscreteOperation, DiscreteOperation) 18 | } 19 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/ReferenceTransformationFunction.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.DiscreteOperation 15 | import com.convergencelabs.convergence.server.model.domain.model.ModelReferenceValues 16 | 17 | private[ot] trait ReferenceTransformationFunction[O <: DiscreteOperation, V <: ModelReferenceValues] { 18 | def transform(serverOp: O, values: V): Option[V] 19 | } 20 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/array/ArrayMoveSetTF.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.array 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot._ 15 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.OperationTransformationFunction 16 | 17 | private[ot] object ArrayMoveSetTF extends OperationTransformationFunction[ArrayMoveOperation, ArraySetOperation] { 18 | def transform(s: ArrayMoveOperation, c: ArraySetOperation): (ArrayMoveOperation, ArraySetOperation) = { 19 | // A-MS-1 20 | (s.copy(noOp = true), c) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/array/ArrayRemoveSetTF.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.array 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot._ 15 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.OperationTransformationFunction 16 | 17 | private[ot] object ArrayRemoveSetTF extends OperationTransformationFunction[ArrayRemoveOperation, ArraySetOperation] { 18 | def transform(s: ArrayRemoveOperation, c: ArraySetOperation): (ArrayRemoveOperation, ArraySetOperation) = { 19 | // A-RS-1 20 | (s.copy(noOp = true), c) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/array/ArraySetInsertTF.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.array 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot._ 15 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.OperationTransformationFunction 16 | 17 | private[ot] object ArraySetInsertTF extends OperationTransformationFunction[ArraySetOperation, ArrayInsertOperation] { 18 | def transform(s: ArraySetOperation, c: ArrayInsertOperation): (ArraySetOperation, ArrayInsertOperation) = { 19 | // A-SI-1 20 | (s, c.copy(noOp = true)) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/array/ArraySetMoveTF.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.array 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot._ 15 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.OperationTransformationFunction 16 | 17 | private[ot] object ArraySetMoveTF extends OperationTransformationFunction[ArraySetOperation, ArrayMoveOperation] { 18 | def transform(s: ArraySetOperation, c: ArrayMoveOperation): (ArraySetOperation, ArrayMoveOperation) = { 19 | // A-SM-1 20 | (s, c.copy(noOp = true)) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/number/NumberAddAddTF.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.number 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot._ 15 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.OperationTransformationFunction 16 | 17 | private[ot] object NumberAddAddTF extends OperationTransformationFunction[NumberAddOperation, NumberAddOperation] { 18 | def transform(s: NumberAddOperation, c: NumberAddOperation): (NumberAddOperation, NumberAddOperation) = { 19 | // N-AA-1 20 | (s, c) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/number/NumberAddSetTF.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.number 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot._ 15 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.OperationTransformationFunction 16 | 17 | private[ot] object NumberAddSetTF extends OperationTransformationFunction[NumberAddOperation, NumberSetOperation] { 18 | def transform(s: NumberAddOperation, c: NumberSetOperation): (NumberAddOperation, NumberSetOperation) = { 19 | // N-AS-1 20 | (s.copy(noOp = true), c) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/number/NumberSetAddTF.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.number 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot._ 15 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform.OperationTransformationFunction 16 | 17 | private[ot] object NumberSetAddTF extends OperationTransformationFunction[NumberSetOperation, NumberAddOperation] { 18 | def transform(s: NumberSetOperation, c: NumberAddOperation): (NumberSetOperation, NumberAddOperation) = { 19 | // N-SA-1 20 | (s, c.copy(noOp = true)) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/permissions/AddPermissions.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.backend.services.domain.permissions 2 | 3 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 4 | 5 | case class AddPermissions(world: Set[String], 6 | user: Map[DomainUserId, Set[String]], 7 | group: Map[String, Set[String]]) 8 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/permissions/AllPermissions.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.backend.services.domain.permissions 2 | 3 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 4 | 5 | case class AllPermissions(world: Set[String], 6 | user: Map[DomainUserId, Set[String]], 7 | group: Map[String, Set[String]]) 8 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/permissions/RemovePermissions.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.backend.services.domain.permissions 2 | 3 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 4 | 5 | case class RemovePermissions(world: Set[String], 6 | user: Map[DomainUserId, Set[String]], 7 | group: Map[String, Set[String]]) 8 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/permissions/SetPermissions.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.backend.services.domain.permissions 2 | 3 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 4 | 5 | final case class SetPermissions(world: Option[Set[String]], 6 | user: Option[SetUserPermissions], 7 | group: Option[SetGroupPermissions]) 8 | 9 | final case class SetUserPermissions(permissions: Map[DomainUserId, Set[String]], replace: Boolean) 10 | 11 | final case class SetGroupPermissions(permissions: Map[String, Set[String]], replace: Boolean) -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/presence/PresenceSubscriptionUtil.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.presence 13 | 14 | object PresenceSubscriptionUtil { 15 | def userPresencePubSubTopic(username: String): String = { 16 | s"presence::${username}" 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/backend/services/domain/presence/UserPresence.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.presence 13 | 14 | import akka.actor.typed.ActorRef 15 | import com.convergencelabs.convergence.server.api.realtime.PresenceClientActor 16 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 17 | import org.json4s.JsonAST.JValue 18 | 19 | final case class UserPresence(userId: DomainUserId, 20 | available: Boolean, 21 | state: Map[String, JValue], 22 | clients: Set[ActorRef[PresenceClientActor.OutgoingMessage]]) 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/DomainId.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model 13 | 14 | final case class DomainId(namespace: String, domainId: String) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/CollectionConfig.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain 13 | 14 | final case class CollectionConfig(autoCreate: Boolean) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/ModelSnapshotConfig.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain 13 | 14 | import java.time.Duration 15 | 16 | final case class ModelSnapshotConfig( 17 | snapshotsEnabled: Boolean, 18 | triggerByVersion: Boolean, 19 | limitedByVersion: Boolean, 20 | minimumVersionInterval: Long, 21 | maximumVersionInterval: Long, 22 | triggerByTime: Boolean, 23 | limitedByTime: Boolean, 24 | minimumTimeInterval: Duration, 25 | maximumTimeInterval: Duration) 26 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/activity/Activity.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | package com.convergencelabs.convergence.server.model.domain.activity 12 | 13 | import java.time.Instant 14 | 15 | case class Activity(id: ActivityId, 16 | ephemeral: Boolean, 17 | created: Instant) 18 | 19 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/activity/ActivityId.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | package com.convergencelabs.convergence.server.model.domain.activity 12 | 13 | case class ActivityId(activityType: String, id: String) 14 | 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/chat/ChatMember.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.chat 13 | 14 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 15 | 16 | /** 17 | * Represents the state of a user within a chat. 18 | * 19 | * @param chatId The id of the chat this member is a part of. 20 | * @param userId The id of the user that is in the chat. 21 | * @param maxSeenEvent The maximum event this user has seen. 22 | */ 23 | final case class ChatMember(chatId: String, userId: DomainUserId, maxSeenEvent: Long) 24 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/collection/CollectionAndUserPermissions.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.collection 13 | 14 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 15 | 16 | 17 | final case class CollectionAndUserPermissions(collection: Collection, 18 | userPermissions: Map[DomainUserId, CollectionPermissions]) 19 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/collection/CollectionPermissions.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.collection 13 | 14 | object CollectionPermissions { 15 | val None: CollectionPermissions = 16 | CollectionPermissions(create = false, read = false, write = false, remove = false, manage = false) 17 | } 18 | 19 | final case class CollectionPermissions(create: Boolean, 20 | read: Boolean, 21 | write: Boolean, 22 | remove: Boolean, 23 | manage: Boolean) 24 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/collection/CollectionSummary.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.collection 13 | 14 | final case class CollectionSummary(id: String, description: String, modelCount: Long) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/collection/CollectionWorldAndUserPermissions.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.collection 13 | 14 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 15 | 16 | final case class CollectionWorldAndUserPermissions(worldPermissions: CollectionPermissions, 17 | userPermissions: Map[DomainUserId, CollectionPermissions]) 18 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/group/UserGroup.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.group 13 | 14 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 15 | 16 | final case class UserGroup(id: String, description: String, members: Set[DomainUserId]) 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/group/UserGroupInfo.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.group 13 | 14 | final case class UserGroupInfo(id: String, description: String) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/group/UserGroupSummary.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.group 13 | 14 | final case class UserGroupSummary(id: String, description: String, memberCount: Int) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/jwt/JwtAuthKey.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.jwt 13 | 14 | import java.time.Instant 15 | 16 | final case class JwtAuthKey(id: String, 17 | description: String, 18 | updated: Instant, 19 | key: String, 20 | enabled: Boolean) 21 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/jwt/JwtClaimConstants.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.jwt 13 | 14 | object JwtClaimConstants { 15 | val FirstName = "firstName"; 16 | val LastName = "lastName"; 17 | val DisplayName = "displayName"; 18 | val Email = "email"; 19 | val Groups = "groups"; 20 | } 21 | 22 | object JwtConstants { 23 | val Audience = "Convergence" 24 | } 25 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/jwt/JwtKeyPair.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.jwt 13 | 14 | final case class JwtKeyPair(publicKey: String, privateKey: String) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/model/Model.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.model 13 | 14 | final case class Model(metaData: ModelMetaData, data: ObjectValue) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/model/ModelId.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.model 13 | 14 | import com.convergencelabs.convergence.server.model.DomainId 15 | 16 | final case class ModelId(domainId: DomainId, modelId: String) 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/model/ModelMetaData.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.model 13 | 14 | import java.time.Instant 15 | 16 | final case class ModelMetaData( 17 | id: String, 18 | collection: String, 19 | version: Long, 20 | createdTime: Instant, 21 | modifiedTime: Instant, 22 | overridePermissions: Boolean, 23 | worldPermissions: ModelPermissions, 24 | valuePrefix: Long) 25 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/model/ModelPermissions.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.model 13 | 14 | final case class ModelPermissions(read: Boolean, write: Boolean, remove: Boolean, manage: Boolean) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/model/ModelPermissionsData.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.model 13 | 14 | 15 | final case class ModelPermissionsData(overrideWorld: Boolean, worldPermissions: ModelPermissions, userPermissions: List[ModelUserPermissions]) 16 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/model/ModelSnapshot.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.model 13 | 14 | final case class ModelSnapshot(metaData: ModelSnapshotMetaData, data: ObjectValue) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/model/ModelSnapshotMetaData.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.model 13 | 14 | import java.time.Instant 15 | 16 | final case class ModelSnapshotMetaData(modelId: String, 17 | version: Long, 18 | timestamp: Instant) 19 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/model/ModelUserPermissions.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.model 13 | 14 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 15 | 16 | final case class ModelUserPermissions(userId: DomainUserId, permissions: ModelPermissions) -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/model/ReferenceState.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.model 13 | 14 | import com.convergencelabs.convergence.server.model.domain.session.DomainSessionAndUserId 15 | 16 | final case class ReferenceState(session: DomainSessionAndUserId, 17 | valueId: Option[String], 18 | key: String, 19 | values: ModelReferenceValues) 20 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/session/DomainSessionAndUserId.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.session 13 | 14 | import com.convergencelabs.convergence.server.model.domain.user.DomainUserId 15 | 16 | final case class DomainSessionAndUserId(sessionId: String, userId: DomainUserId) 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/domain/user/DomainUserType.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.domain.user 13 | 14 | import com.fasterxml.jackson.core.`type`.TypeReference 15 | 16 | object DomainUserType extends Enumeration { 17 | type DomainUserType = Value 18 | val Normal: DomainUserType = Value("normal") 19 | val Anonymous: DomainUserType = Value("anonymous") 20 | val Convergence: DomainUserType = Value("convergence") 21 | 22 | def withNameOpt(s: String): Option[Value] = values.find(_.toString.toLowerCase() == s.toLowerCase()) 23 | } 24 | 25 | final class DomainUserTypeReference extends TypeReference[DomainUserType.type] -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/server/apikey/UserApiKey.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.server.apikey 13 | 14 | import java.time.Instant 15 | 16 | final case class UserApiKey(username: String, 17 | name: String, 18 | key: String, 19 | enabled: Boolean, 20 | lastUsed: Option[Instant]) 21 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/server/domain/DomainDatabase.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.server.domain 13 | 14 | final case class DomainDatabase(database: String, 15 | schemaVersion: String, 16 | username: String, 17 | password: String, 18 | adminUsername: String, 19 | adminPassword: String) 20 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/server/domain/DomainDatabaseState.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.server.domain 13 | 14 | import com.convergencelabs.convergence.server.backend.db.schema.SchemaVersion 15 | import com.convergencelabs.convergence.server.model.DomainId 16 | 17 | final case class DomainDatabaseState(domainId: DomainId, 18 | database: String, 19 | schemaVersion: SchemaVersion, 20 | status: DomainStatus.Value) 21 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/server/domain/DomainState.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.server.domain 13 | 14 | import com.convergencelabs.convergence.server.model.DomainId 15 | 16 | final case class DomainState(domainId: DomainId, 17 | availability: DomainAvailability.Value, 18 | status: DomainStatus.Value) 19 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/server/domain/NamespaceAndDomains.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.server.domain 13 | 14 | final case class NamespaceAndDomains(id: String, displayName: String, domains: Set[Domain]) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/server/role/RoleProfile.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.server.role 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.convergence.RoleStore.Role 15 | 16 | final class RoleProfile(private[this] val roles: Set[Role]) { 17 | 18 | private[this] val permissions: Set[String] = roles.flatMap(_.permissions) 19 | 20 | def hasRole(role: String): Boolean = { 21 | roles.exists { _.name == role } 22 | } 23 | 24 | def hasPermission(permission: String): Boolean = { 25 | permissions.contains(permission) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/server/role/RoleTargetType.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.server.role 13 | 14 | object RoleTargetType extends Enumeration { 15 | val Namespace, Domain = Value 16 | } 17 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/model/server/user/User.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.model.server.user 13 | 14 | import java.time.Instant 15 | 16 | final case class User(username: String, 17 | email: String, 18 | firstName: String, 19 | lastName: String, 20 | displayName: String, 21 | lastLogin: Option[Instant]) 22 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/security/AuthorizationProfileData.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.security 13 | 14 | import com.convergencelabs.convergence.server.backend.datastore.convergence.RoleStore.UserRoles 15 | import com.convergencelabs.convergence.server.util.serialization.akka.CborSerializable 16 | 17 | final case class AuthorizationProfileData(username: String, userRoles: UserRoles) extends CborSerializable -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/security/PasswordUtil.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.security 13 | 14 | import com.lambdaworks.crypto.SCryptUtil 15 | 16 | object PasswordUtil { 17 | 18 | private val CpuCost = 16384 19 | private val MemoryCost = 8 20 | private val Parallelization = 1 21 | 22 | def hashPassword(password: String): String = { 23 | SCryptUtil.scrypt(password, CpuCost, MemoryCost, Parallelization) 24 | } 25 | 26 | def checkPassword(password: String, hash: String): Boolean = { 27 | SCryptUtil.check(password, hash) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/DomainIdAndStringEntityIdSerializer.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.util 2 | 3 | import com.convergencelabs.convergence.server.model.DomainId 4 | 5 | /** 6 | * A help class to serialize a DomainId plus a unique string identifier 7 | * within the domain to an entity id in the Akka Cluster Sharding system. 8 | */ 9 | class DomainIdAndStringEntityIdSerializer extends EntityIdSerializer[(DomainId, String)] { 10 | 11 | override protected def entityIdToParts(entityId: (DomainId, String)): List[String] = List( 12 | entityId._1.namespace, entityId._1.domainId, entityId._2 13 | ) 14 | 15 | override protected def partsToEntityId(parts: List[String]): (DomainId, String) = 16 | (DomainId(parts.head, parts(1)), parts(2)) 17 | } 18 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/DomainIdEntityIdSerializer.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.util 2 | 3 | import com.convergencelabs.convergence.server.model.DomainId 4 | 5 | /** 6 | * A help class to serialize a domain id to an entity id in the Akka 7 | * Cluster Sharding system. 8 | */ 9 | class DomainIdEntityIdSerializer extends EntityIdSerializer[DomainId] { 10 | 11 | override protected def entityIdToParts(domainId: DomainId): List[String] = List( 12 | domainId.namespace, domainId.domainId 13 | ) 14 | 15 | override protected def partsToEntityId(parts: List[String]): DomainId = 16 | DomainId(parts.head, parts(1)) 17 | } 18 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/EitherUtils.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.util 2 | 3 | import scala.util.{Failure, Success, Try} 4 | 5 | object EitherUtils { 6 | def tryToEither[T](t: Try[T]): Either[Throwable, T] = { 7 | t match { 8 | case Failure(exception) => Left(exception) 9 | case Success(value) =>Right(value) 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/EventLoop.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.util 13 | 14 | import akka.actor.typed.ActorRef 15 | import com.convergencelabs.convergence.server.util.ActorBackedEventLoop.TaskScheduled 16 | 17 | 18 | trait EventLoop { 19 | def schedule(task: => Unit): Unit 20 | } 21 | 22 | object ActorBackedEventLoop { 23 | case class TaskScheduled(task: () => Unit) 24 | } 25 | 26 | final class ActorBackedEventLoop(actor: ActorRef[TaskScheduled]) extends EventLoop { 27 | import ActorBackedEventLoop._ 28 | 29 | def schedule(task: => Unit): Unit = { 30 | actor ! TaskScheduled(() => task) 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/ExceptionUtils.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.util 13 | 14 | import java.io.{PrintWriter, StringWriter} 15 | 16 | object ExceptionUtils { 17 | def stackTraceToString(e: Throwable): String = { 18 | val sr = new StringWriter() 19 | val w = new PrintWriter(sr) 20 | e.printStackTrace(w) 21 | val result = sr.getBuffer.toString 22 | sr.close() 23 | w.close() 24 | result 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/SafeTry.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.util 13 | 14 | import scala.util.{Failure, Success, Try} 15 | 16 | object SafeTry { 17 | def apply[T](r: => T): Try[T] = 18 | try Success(r) catch { 19 | case e: Throwable => Failure(e) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/TryUtils.scala: -------------------------------------------------------------------------------- 1 | package com.convergencelabs.convergence.server.util 2 | 3 | import scala.util.{Success, Try} 4 | 5 | object TryUtils { 6 | def toTry[T, U](o: Option[T])(f: T => Try[Unit]): Try[Unit] = { 7 | o.map(f).getOrElse(Success(())) 8 | } 9 | 10 | def unsafeToTry[T, U](o: Option[T])(f: T => Unit): Try[Unit] = { 11 | o.map(v => Try(f(v))).getOrElse(Success(())) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/UnexpectedErrorException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.util 13 | 14 | final case class UnexpectedErrorException(message: String = "An unknown error occurred") extends Exception(message) 15 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/actor/NonWrappedMessageExtractor.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.util.actor 13 | 14 | import akka.cluster.sharding.typed.{HashCodeNoEnvelopeMessageExtractor, ShardingMessageExtractor} 15 | 16 | object NonWrappedMessageExtractor { 17 | def create[T](numberOfShards: Int)( 18 | extractEntityId: T => String): ShardingMessageExtractor[T, T] = 19 | new HashCodeNoEnvelopeMessageExtractor[T](numberOfShards) { 20 | def entityId(message: T) = extractEntityId(message) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/actor/ShardedActorStatUpPlan.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.util.actor 13 | 14 | sealed trait ShardedActorStatUpPlan 15 | 16 | final case object StartUpRequired extends ShardedActorStatUpPlan 17 | 18 | final case object StartUpNotRequired extends ShardedActorStatUpPlan 19 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/serialization/MappedTypeHints.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.util.serialization 13 | 14 | import org.json4s.TypeHints 15 | 16 | final case class MappedTypeHints(private val hintMap: Map[String, Class[_]]) extends TypeHints { 17 | private val reverseHintMap = hintMap map (_.swap) 18 | 19 | val hints: List[Class[_]] = hintMap.values.toList 20 | 21 | def hintFor(clazz: Class[_]): String = reverseHintMap(clazz) 22 | def classFor(hint: String): Option[Class[_]] = hintMap.get(hint) 23 | } 24 | -------------------------------------------------------------------------------- /src/main/scala/com/convergencelabs/convergence/server/util/serialization/akka/CborSerializable.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.util.serialization.akka 13 | 14 | /** 15 | * The CborSerializable is simply a marker interface used to instruct Akka that 16 | * subclasses of this interface should be serialized by the Jackson CBOR 17 | * serializer: 18 | * 19 | * https://cbor.io/ 20 | * https://github.com/FasterXML/jackson-dataformats-binary 21 | * https://doc.akka.io/docs/akka/current/serialization-jackson.html 22 | */ 23 | trait CborSerializable 24 | -------------------------------------------------------------------------------- /src/orientdb/config/automatic-backup.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": true, 3 | "mode": "FULL_BACKUP", 4 | "exportOptions": "", 5 | "delay": "4h", 6 | "firstTime": "23:00:00", 7 | "targetDirectory": "backup", 8 | "targetFileName": "${DBNAME}-${DATE:yyyyMMddHHmmss}.zip", 9 | "compressionLevel": 9, 10 | "bufferSize": 1048576 11 | } -------------------------------------------------------------------------------- /src/orientdb/config/custom-sql-functions.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": true, 3 | "functions": [ 4 | // { 5 | // "prefix": "the_function_prefix here", 6 | // "class": "your.class.with.static.methods.Here" 7 | // } 8 | ] 9 | } -------------------------------------------------------------------------------- /src/orientdb/config/default-distributed-db-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoDeploy": true, 3 | "readQuorum": 1, 4 | "writeQuorum": "majority", 5 | "executionMode": "undefined", 6 | "readYourWrites": true, 7 | "newNodeStrategy": "static", 8 | "servers": { 9 | "*": "master" 10 | }, 11 | "clusters": { 12 | "internal": { 13 | }, 14 | "*": { 15 | "servers": [""] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/orientdb/config/security.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": true, 3 | "debug": false, 4 | "server": { 5 | "createDefaultUsers": true 6 | }, 7 | "authentication": { 8 | "enabled": true, 9 | "allowDefault": true, 10 | "authenticators": [ 11 | { 12 | "name": "Password", 13 | "class": "com.orientechnologies.orient.server.security.authenticator.ODefaultPasswordAuthenticator", 14 | "enabled": true, 15 | "users": [ 16 | { 17 | "username": "guest", 18 | "resources": "server.listDatabases,server.dblist" 19 | } 20 | ] 21 | }, 22 | { 23 | "name": "ServerConfig", 24 | "class": "com.orientechnologies.orient.server.security.authenticator.OServerConfigAuthenticator", 25 | "enabled": true 26 | }, 27 | { 28 | "name": "SystemAuthenticator", 29 | "class": "com.orientechnologies.orient.server.security.authenticator.OSystemUserAuthenticator", 30 | "enabled": true 31 | } 32 | ] 33 | }, 34 | "auditing": { 35 | "class": "com.orientechnologies.security.auditing.ODefaultAuditing", 36 | "enabled": false 37 | } 38 | } -------------------------------------------------------------------------------- /src/orientdb/www/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/orientdb/www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/convergencelabs/convergence-server/803a3c4490ae617f6fecd1f2d28b78797c12ac84/src/orientdb/www/favicon.ico -------------------------------------------------------------------------------- /src/orientdb/www/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /src/test-ot/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/MockModel.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.DiscreteOperation 15 | 16 | trait MockModel { 17 | def processOperation(op: DiscreteOperation): Unit = { 18 | op.noOp match { 19 | case true => 20 | case false => updateModel(op) 21 | } 22 | } 23 | 24 | protected def updateModel(op: DiscreteOperation): Unit 25 | 26 | def getData(): Any 27 | } 28 | -------------------------------------------------------------------------------- /src/test-ot/scala/com/convergencelabs/convergence/server/backend/services/domain/model/ot/xform/TransformationCase.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.backend.services.domain.model.ot.xform 13 | 14 | import com.convergencelabs.convergence.server.backend.services.domain.model.ot.DiscreteOperation 15 | 16 | object TransformationCase { 17 | def apply[S <: DiscreteOperation, C <: DiscreteOperation](serverOp: S, clientOp: C): TransformationCase[S, C] = new TransformationCase(serverOp, clientOp) 18 | } 19 | 20 | class TransformationCase[S <: DiscreteOperation, C <: DiscreteOperation](val serverOp: S, val clientOp: C) 21 | -------------------------------------------------------------------------------- /src/test-ot/scala/com/convergencelabs/convergence/server/test/tags.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server.test 13 | 14 | import org.scalatest.Tag 15 | 16 | object tags { 17 | object ExhaustiveOTTest extends Tag("ExhaustiveOTTest") 18 | } 19 | -------------------------------------------------------------------------------- /src/test/otfspec/otf-array-insert-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ArrayInsert", 3 | "clientOpType": "ArraySet", 4 | "cases": [ 5 | { 6 | "id": "A-IS-1", 7 | "input": { 8 | "serverOp": {"type": "ArrayInsert", "noOp": false, "index": 4, "value": "X"}, 9 | "clientOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ArrayInsert", "noOp": true, "index": 4, "value": "X"}, 13 | "clientOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-array-move-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ArrayMove", 3 | "clientOpType": "ArraySet", 4 | "cases": [ 5 | { 6 | "id": "A-MS-1", 7 | "input": { 8 | "serverOp": {"type": "ArrayMove", "noOp": false, "fromIndex": 3, "toIndex": 5}, 9 | "clientOp": {"type": "ArraySet", "noOp": false, "value": ["X"]} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ArrayMove", "noOp": true, "fromIndex": 3, "toIndex": 5}, 13 | "clientOp": {"type": "ArraySet", "noOp": false, "value": ["X"]} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-array-remove-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ArrayRemove", 3 | "clientOpType": "ArraySet", 4 | "cases": [ 5 | { 6 | "id": "A-RS-1", 7 | "input": { 8 | "serverOp": {"type": "ArrayRemove", "noOp": false, "index": 4}, 9 | "clientOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ArrayRemove", "noOp": true, "index": 4}, 13 | "clientOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-array-replace-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ArrayReplace", 3 | "clientOpType": "ArraySet", 4 | "cases": [ 5 | { 6 | "id": "A-PS-1", 7 | "input": { 8 | "serverOp": {"type": "ArrayReplace", "noOp": false, "index": 4, "value": "X"}, 9 | "clientOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ArrayReplace", "noOp": true, "index": 4, "value": "X"}, 13 | "clientOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-array-set-insert-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ArraySet", 3 | "clientOpType": "ArrayInsert", 4 | "cases": [ 5 | { 6 | "id": "A-SI-1", 7 | "input": { 8 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]}, 9 | "clientOp": {"type": "ArrayInsert", "noOp": false, "index": 4, "value": "X"} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]}, 13 | "clientOp": {"type": "ArrayInsert", "noOp": true, "index": 4, "value": "X"} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-array-set-move-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ArraySet", 3 | "clientOpType": "ArrayMove", 4 | "cases": [ 5 | { 6 | "id": "A-SM-1", 7 | "input": { 8 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["X"]}, 9 | "clientOp": {"type": "ArrayMove", "noOp": false, "fromIndex": 3, "toIndex": 5} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["X"]}, 13 | "clientOp": {"type": "ArrayMove", "noOp": true, "fromIndex": 3, "toIndex": 5} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-array-set-remove-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ArraySet", 3 | "clientOpType": "ArrayRemove", 4 | "cases": [ 5 | { 6 | "id": "A-SR-1", 7 | "input": { 8 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]}, 9 | "clientOp": {"type": "ArrayRemove", "noOp": false, "index": 4} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]}, 13 | "clientOp": {"type": "ArrayRemove", "noOp": true, "index": 4} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-array-set-replace-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ArraySet", 3 | "clientOpType": "ArrayReplace", 4 | "cases": [ 5 | { 6 | "id": "A-SP-1", 7 | "input": { 8 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]}, 9 | "clientOp": {"type": "ArrayReplace", "noOp": false, "index": 4, "value": "X"} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]}, 13 | "clientOp": {"type": "ArrayReplace", "noOp": true, "index": 4, "value": "X"} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-array-set-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ArraySet", 3 | "clientOpType": "ArraySet", 4 | "cases": [ 5 | { 6 | "id": "A-SS-1", 7 | "input": { 8 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["X"]}, 9 | "clientOp": {"type": "ArraySet", "noOp": false, "value": ["Y"]} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ArraySet", "noOp": false, "value": ["X"]}, 13 | "clientOp": {"type": "ArraySet", "noOp": true, "value": ["Y"]} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-boolean-set-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "BooleanSet", 3 | "clientOpType": "BooleanSet", 4 | "cases": [ 5 | { 6 | "id": "B-SS-1", 7 | "input": { 8 | "serverOp": {"type": "BooleanSet", "noOp": false, "value": true}, 9 | "clientOp": {"type": "BooleanSet", "noOp": false, "value": false} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "BooleanSet", "noOp": false, "value": true}, 13 | "clientOp": {"type": "BooleanSet", "noOp": true, "value": false} 14 | } 15 | }, 16 | { 17 | "id": "B-SS-2", 18 | "input": { 19 | "serverOp": {"type": "BooleanSet", "noOp": false, "value": true}, 20 | "clientOp": {"type": "BooleanSet", "noOp": false, "value": true} 21 | }, 22 | "output": { 23 | "serverOp": {"type": "BooleanSet", "noOp": true, "value": true}, 24 | "clientOp": {"type": "BooleanSet", "noOp": true, "value": true} 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-date-set-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "DateSet", 3 | "clientOpType": "DateSet", 4 | "cases": [ 5 | { 6 | "id": "D-SS-1", 7 | "input": { 8 | "serverOp": {"type": "DateSet", "noOp": false, "value": 1484179423611}, 9 | "clientOp": {"type": "DateSet", "noOp": false, "value": 1584179425611} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "DateSet", "noOp": false, "value": 1484179423611}, 13 | "clientOp": {"type": "DateSet", "noOp": true, "value": 1584179425611} 14 | } 15 | }, 16 | { 17 | "id": "D-SS-2", 18 | "input": { 19 | "serverOp": {"type": "DateSet", "noOp": false, "value": 1484179423611}, 20 | "clientOp": {"type": "DateSet", "noOp": false, "value": 1484179423611} 21 | }, 22 | "output": { 23 | "serverOp": {"type": "DateSet", "noOp": true, "value": 1484179423611}, 24 | "clientOp": {"type": "DateSet", "noOp": true, "value": 1484179423611} 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-number-add-add-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "NumberAdd", 3 | "clientOpType": "NumberAdd", 4 | "cases": [ 5 | { 6 | "id": "N-AA-1", 7 | "input": { 8 | "serverOp": {"type": "NumberAdd", "noOp": false, "value": 1}, 9 | "clientOp": {"type": "NumberAdd", "noOp": false, "value": 2} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "NumberAdd", "noOp": false, "value": 1}, 13 | "clientOp": {"type": "NumberAdd", "noOp": false, "value": 2} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-number-add-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "NumberAdd", 3 | "clientOpType": "NumberSet", 4 | "cases": [ 5 | { 6 | "id": "N-AS-1", 7 | "input": { 8 | "serverOp": {"type": "NumberAdd", "noOp": false, "value": 1}, 9 | "clientOp": {"type": "NumberSet", "noOp": false, "value": 2} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "NumberAdd", "noOp": true, "value": 1}, 13 | "clientOp": {"type": "NumberSet", "noOp": false, "value": 2} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-number-set-add-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "NumberSet", 3 | "clientOpType": "NumberAdd", 4 | "cases": [ 5 | { 6 | "id": "N-SA-1", 7 | "input": { 8 | "serverOp": {"type": "NumberSet", "noOp": false, "value": 2}, 9 | "clientOp": {"type": "NumberAdd", "noOp": false, "value": 1} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "NumberSet", "noOp": false, "value": 2}, 13 | "clientOp": {"type": "NumberAdd", "noOp": true, "value": 1} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-number-set-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "NumberSet", 3 | "clientOpType": "NumberSet", 4 | "cases": [ 5 | { 6 | "id": "N-SS-1", 7 | "input": { 8 | "serverOp": {"type": "NumberSet", "noOp": false, "value": 1}, 9 | "clientOp": {"type": "NumberSet", "noOp": false, "value": 2} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "NumberSet", "noOp": false, "value": 1}, 13 | "clientOp": {"type": "NumberSet", "noOp": true, "value": 2} 14 | } 15 | }, 16 | { 17 | "id": "N-SS-2", 18 | "input": { 19 | "serverOp": {"type": "NumberSet", "noOp": false, "value": 1}, 20 | "clientOp": {"type": "NumberSet", "noOp": false, "value": 1} 21 | }, 22 | "output": { 23 | "serverOp": {"type": "NumberSet", "noOp": true, "value": 1}, 24 | "clientOp": {"type": "NumberSet", "noOp": true, "value": 1} 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-addprop-removeprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectAddProperty", 3 | "clientOpType": "ObjectRemoveProperty", 4 | "cases": [ 5 | { 6 | "id": "O-AR-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3}, 9 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3}, 13 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"} 14 | } 15 | }, 16 | { 17 | "id": "O-AR-2", 18 | "input": { 19 | "serverOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3}, 20 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "X"} 21 | }, 22 | "error": true 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-addprop-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectAddProperty", 3 | "clientOpType": "ObjectSet", 4 | "cases": [ 5 | { 6 | "id": "O-AS-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3}, 9 | "clientOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectAddProperty", "noOp": true, "prop": "X", "value": 3}, 13 | "clientOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-addprop-setprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectAddProperty", 3 | "clientOpType": "ObjectSetProperty", 4 | "cases": [ 5 | { 6 | "id": "O-AT-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3}, 9 | "clientOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "B", "value": 4} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3}, 13 | "clientOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "B", "value": 4} 14 | } 15 | }, 16 | { 17 | "id": "O-AT-2", 18 | "input": { 19 | "serverOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3}, 20 | "clientOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "X", "value": 4} 21 | }, 22 | "error": true 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-removeprop-addprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectRemoveProperty", 3 | "clientOpType": "ObjectAddProperty", 4 | "cases": [ 5 | { 6 | "id": "O-RA-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"}, 9 | "clientOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"}, 13 | "clientOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3} 14 | } 15 | }, 16 | { 17 | "id": "O-RA-2", 18 | "input": { 19 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "X"}, 20 | "clientOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3} 21 | }, 22 | "error": true 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-removeprop-removeprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectRemoveProperty", 3 | "clientOpType": "ObjectRemoveProperty", 4 | "cases": [ 5 | { 6 | "id": "O-RR-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "A"}, 9 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "A"}, 13 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"} 14 | } 15 | }, 16 | { 17 | "id": "O-RR-2", 18 | "input": { 19 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "A"}, 20 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "A"} 21 | }, 22 | "output": { 23 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": true, "prop": "A"}, 24 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": true, "prop": "A"} 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-removeprop-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectRemoveProperty", 3 | "clientOpType": "ObjectSet", 4 | "cases": [ 5 | { 6 | "id": "O-RS-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "A"}, 9 | "clientOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": true, "prop": "A"}, 13 | "clientOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-removeprop-setprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectRemoveProperty", 3 | "clientOpType": "ObjectSetProperty", 4 | "cases": [ 5 | { 6 | "id": "O-RT-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"}, 9 | "clientOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "A", "value": 4} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"}, 13 | "clientOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "A", "value": 4} 14 | } 15 | }, 16 | { 17 | "id": "O-TR-2", 18 | "input": { 19 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"}, 20 | "clientOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "B", "value": 4} 21 | }, 22 | "output": { 23 | "serverOp": {"type": "ObjectRemoveProperty", "noOp": true, "prop": "B"}, 24 | "clientOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "B", "value": 4} 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-set-addprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectSet", 3 | "clientOpType": "ObjectAddProperty", 4 | "cases": [ 5 | { 6 | "id": "O-SA-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}}, 9 | "clientOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}}, 13 | "clientOp": {"type": "ObjectAddProperty", "noOp": true, "prop": "X", "value": 3} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-set-removeprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectSet", 3 | "clientOpType": "ObjectRemoveProperty", 4 | "cases": [ 5 | { 6 | "id": "O-SR-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}}, 9 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "A"} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}}, 13 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": true, "prop": "A"} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-set-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectSet", 3 | "clientOpType": "ObjectSet", 4 | "cases": [ 5 | { 6 | "id": "O-SS-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectSet", "noOp": false, "value": {"X": 3}}, 9 | "clientOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectSet", "noOp": false, "value": {"X": 3}}, 13 | "clientOp": {"type": "ObjectSet", "noOp": true, "value": {"Y": 4}} 14 | } 15 | }, 16 | { 17 | "id": "O-SS-2", 18 | "input": { 19 | "serverOp": {"type": "ObjectSet", "noOp": false, "value": {"X": 3}}, 20 | "clientOp": {"type": "ObjectSet", "noOp": false, "value": {"X": 3}} 21 | }, 22 | "output": { 23 | "serverOp": {"type": "ObjectSet", "noOp": true, "value": {"X": 3}}, 24 | "clientOp": {"type": "ObjectSet", "noOp": true, "value": {"X": 3}} 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-set-setprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectSet", 3 | "clientOpType": "ObjectSetProperty", 4 | "cases": [ 5 | { 6 | "id": "O-ST-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}}, 9 | "clientOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "A", "value": 3} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}}, 13 | "clientOp": {"type": "ObjectSetProperty", "noOp": true, "prop": "A", "value": 3} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-setprop-addprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectSetProperty", 3 | "clientOpType": "ObjectAddProperty", 4 | "cases": [ 5 | { 6 | "id": "O-TA-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "B", "value": 4}, 9 | "clientOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "B", "value": 4}, 13 | "clientOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3} 14 | } 15 | }, 16 | { 17 | "id": "O-TA-2", 18 | "input": { 19 | "serverOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "X", "value": 4}, 20 | "clientOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "X", "value": 3} 21 | }, 22 | "error": true 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-setprop-removeprop-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectSetProperty", 3 | "clientOpType": "ObjectRemoveProperty", 4 | "cases": [ 5 | { 6 | "id": "O-TR-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "A", "value": 4}, 9 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "A", "value": 4}, 13 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"} 14 | } 15 | }, 16 | { 17 | "id": "O-TR-2", 18 | "input": { 19 | "serverOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "B", "value": 4}, 20 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": false, "prop": "B"} 21 | }, 22 | "output": { 23 | "serverOp": {"type": "ObjectAddProperty", "noOp": false, "prop": "B", "value": 4}, 24 | "clientOp": {"type": "ObjectRemoveProperty", "noOp": true, "prop": "B"} 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-object-setprop-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "ObjectSetProperty", 3 | "clientOpType": "ObjectSet", 4 | "cases": [ 5 | { 6 | "id": "O-TS-1", 7 | "input": { 8 | "serverOp": {"type": "ObjectSetProperty", "noOp": false, "prop": "A", "value": 3}, 9 | "clientOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "ObjectSetProperty", "noOp": true, "prop": "A", "value": 3}, 13 | "clientOp": {"type": "ObjectSet", "noOp": false, "value": {"Y": 4}} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-string-set-set-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "StringSet", 3 | "clientOpType": "StringSet", 4 | "cases": [ 5 | { 6 | "id": "S-SS-1", 7 | "input": { 8 | "serverOp": {"type": "StringSet", "noOp": false, "value": "VALUE"}, 9 | "clientOp": {"type": "StringSet", "noOp": false, "value": "VALUE"} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "StringSet", "noOp": true, "value": "VALUE"}, 13 | "clientOp": {"type": "StringSet", "noOp": true, "value": "VALUE"} 14 | } 15 | }, 16 | { 17 | "id": "S-SS-1", 18 | "input": { 19 | "serverOp": {"type": "StringSet", "noOp": false, "value": "SERVER"}, 20 | "clientOp": {"type": "StringSet", "noOp": false, "value": "CLIENT"} 21 | }, 22 | "output": { 23 | "serverOp": {"type": "StringSet", "noOp": false, "value": "SERVER"}, 24 | "clientOp": {"type": "StringSet", "noOp": true, "value": "CLIENT"} 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/test/otfspec/otf-string-set-splice-spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "serverOpType": "StringSet", 3 | "clientOpType": "StringSplice", 4 | "cases": [ 5 | { 6 | "id": "S-SI-1", 7 | "input": { 8 | "serverOp": {"type": "StringSet", "noOp": false, "value": "VALUE"}, 9 | "clientOp": {"type": "StringSplice", "noOp": false, "index": 5, "deleteCount": 3, "insertValue": "WX"} 10 | }, 11 | "output": { 12 | "serverOp": {"type": "StringSet", "noOp": false, "value": "VALUE"}, 13 | "clientOp": {"type": "StringSplice", "noOp": true, "index": 5, "deleteCount": 3, "insertValue": "WX"} 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/test/resources/application.conf: -------------------------------------------------------------------------------- 1 | akka { 2 | remote { 3 | log-remote-lifecycle-events = off 4 | 5 | maximum-payload-bytes = 2 megabytes 6 | artery { 7 | transport = tcp 8 | canonical.hostname = "127.0.0.1" 9 | canonical.port = 0 10 | 11 | advanced { 12 | maximum-frame-size = 2 megabytes 13 | } 14 | } 15 | } 16 | 17 | cluster { 18 | jmx.multi-mbeans-in-same-jvm = on 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/cluster-application.conf: -------------------------------------------------------------------------------- 1 | akka { 2 | actor { 3 | provider = "akka.cluster.ClusterActorRefProvider" 4 | } 5 | remote { 6 | maximum-payload-bytes = 2 megabytes 7 | artery { 8 | transport = tcp 9 | canonical.hostname = "127.0.0.1" 10 | canonical.port = 0 11 | 12 | advanced { 13 | maximum-frame-size = 2 megabytes 14 | } 15 | } 16 | } 17 | cluster { 18 | sharding.distributed-data.durable.keys = [] 19 | 20 | seed-nodes = [ 21 | "akka://Convergence@127.0.0.1:2551" 22 | ] 23 | 24 | auto-down-unreachable-after = 10s 25 | 26 | jmx.multi-mbeans-in-same-jvm = on 27 | } 28 | } 29 | 30 | convergence { 31 | 32 | } -------------------------------------------------------------------------------- /src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/test/resources/orientdb-server-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/resources/schema/bad-index/index.yaml: -------------------------------------------------------------------------------- 1 | not yaml 2 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/deltas/2020_03_01_add-class-3.yaml: -------------------------------------------------------------------------------- 1 | description: Adds Class3 2 | actions: 3 | 4 | - action: CreateClass 5 | name: Class3 6 | properties: 7 | - {name: prop1, type: String, constraints: {mandatory: true, notNull: true}} 8 | - {name: prop2, type: Link, linkedClass: Class1, constraints: {mandatory: true, notNull: true}} 9 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/deltas/2020_04_12_add-class-1-prop3.yaml: -------------------------------------------------------------------------------- 1 | description: Adds a prop3 to Class1 2 | actions: 3 | 4 | - action: AddProperty 5 | className: Class1 6 | property: {name: prop3, type: String, constraints: {mandatory: false, notNull: true}} 7 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/deltas/2020_05_10_rename-class-2-prop1.yaml: -------------------------------------------------------------------------------- 1 | description: Rename Class2.prop1 to Class2.prop1a 2 | actions: 3 | 4 | - action: AlterProperty 5 | className: Class2 6 | name: prop1 7 | property: {name: prop1a} 8 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/deltas/2020_06_27_make-class-2-prop1a-nullable.yaml: -------------------------------------------------------------------------------- 1 | description: Makes Class2.prop1a nullable 2 | actions: 3 | 4 | - action: AddProperty 5 | className: Class2 6 | property: {name: prop1a, type: String, constraints: {mandatory: true, notNull: false}} 7 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/deltas/2020_06_27_make-class-2-prop1a-nullable@2.0.yaml: -------------------------------------------------------------------------------- 1 | description: Makes Class2.prop1 nullable 2 | actions: 3 | 4 | - action: AddProperty 5 | className: Class2 6 | property: {name: prop1, type: String, constraints: {mandatory: true, notNull: false}} 7 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/index.yaml: -------------------------------------------------------------------------------- 1 | currentVersion: 5.0 2 | versions: 3 | - 1.0 4 | - 2.0 5 | - 2.1 6 | - 3.0 7 | - 3.1 8 | - 4.0 9 | - 5.0 10 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/schemas/1.0.yaml: -------------------------------------------------------------------------------- 1 | actions: 2 | 3 | ## 4 | ## Class: Class1 5 | ## 6 | - action: CreateClass 7 | name: Class1 8 | properties: 9 | - {name: prop1, type: String, constraints: {mandatory: true, notNull: true}} 10 | - {name: prop2, type: Link, linkedClass: Class2, constraints: {mandatory: true, notNull: true}} 11 | 12 | - action: CreateIndex 13 | className: Class1 14 | name: Class1.prop1 15 | type: Unique 16 | properties: [prop1] 17 | 18 | ## 19 | ## Class: Class2 20 | ## 21 | - action: CreateClass 22 | name: Class2 23 | properties: 24 | - {name: prop1, type: String, constraints: {mandatory: true, notNull: true}} 25 | 26 | ## 27 | ## Sequence: Seq1 28 | ## 29 | - action: CreateSequence 30 | name: Seq1 31 | sequenceType: Ordered 32 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/schemas/2.0.yaml: -------------------------------------------------------------------------------- 1 | actions: 2 | 3 | ## 4 | ## Class: Class1 5 | ## 6 | - action: CreateClass 7 | name: Class1 8 | properties: 9 | - {name: prop1, type: String, constraints: {mandatory: true, notNull: true}} 10 | - {name: prop2, type: Link, linkedClass: Class2, constraints: {mandatory: true, notNull: true}} 11 | 12 | - action: CreateIndex 13 | className: Class1 14 | name: Class1.prop1 15 | type: Unique 16 | properties: [prop1] 17 | 18 | ## 19 | ## Class: Class2 20 | ## 21 | - action: CreateClass 22 | name: Class2 23 | properties: 24 | - {name: prop1, type: String, constraints: {mandatory: true, notNull: true}} 25 | 26 | ## 27 | ## Class: Class3 28 | ## 29 | - action: CreateClass 30 | name: Class3 31 | properties: 32 | - {name: prop1, type: String, constraints: {mandatory: true, notNull: true}} 33 | - {name: prop2, type: Link, linkedClass: Class1, constraints: {mandatory: true, notNull: true}} 34 | 35 | ## 36 | ## Sequence: Seq1 37 | ## 38 | - action: CreateSequence 39 | name: Seq1 40 | sequenceType: Ordered 41 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/schemas/2.1.yaml: -------------------------------------------------------------------------------- 1 | actions: 2 | 3 | ## 4 | ## Class: Class1 5 | ## 6 | - action: CreateClass 7 | name: Class1 8 | properties: 9 | - {name: prop1, type: String, constraints: {mandatory: true, notNull: true}} 10 | - {name: prop2, type: Link, linkedClass: Class2, constraints: {mandatory: true, notNull: true}} 11 | 12 | - action: CreateIndex 13 | className: Class1 14 | name: Class1.prop1 15 | type: Unique 16 | properties: [prop1] 17 | 18 | ## 19 | ## Class: Class2 20 | ## 21 | - action: CreateClass 22 | name: Class2 23 | properties: 24 | - {name: prop1, type: String, constraints: {mandatory: true, notNull: false}} 25 | 26 | ## 27 | ## Class: Class3 28 | ## 29 | - action: CreateClass 30 | name: Class3 31 | properties: 32 | - {name: prop1, type: String, constraints: {mandatory: true, notNull: true}} 33 | - {name: prop2, type: Link, linkedClass: Class1, constraints: {mandatory: true, notNull: true}} 34 | 35 | ## 36 | ## Sequence: Seq1 37 | ## 38 | - action: CreateSequence 39 | name: Seq1 40 | sequenceType: Ordered 41 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/versions/1.0.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 3 | schemaSha256: 2fd497bc2179fe183dbdce0c3babf1e0e9a3f2097ff8df30ee9c98a8528b41a1 4 | deltas: [] 5 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/versions/2.0.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 3 | schemaSha256: d215a873b835982100b813c0e83e8ce6ecd184e7af1aba56787ede7adc5d98dd 4 | deltas: 5 | - id: 2020_03_01_add-class-3 6 | sha256: 0793f85cf3a783110337e77e31809369c1525535e54b5236b698b936de37479f 7 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/versions/2.1.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 2020-06-28 3 | schemaSha256: 1b2a5970d2f10979efbb73afb3ec4e2b74892883e2247e7a9270e031a82e4ba4 4 | deltas: 5 | - id: 2020_03_01_add-class-3 6 | sha256: 0793f85cf3a783110337e77e31809369c1525535e54b5236b698b936de37479f 7 | - id: 2020_06_27_make-class-2-prop1-nullable 8 | tag: 2.0 9 | sha256: 8b8c64e34fc11af6eb424ccf4ac95b8a5cc596772f71e840516ea5e7dcabdb3a 10 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/versions/3.0.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 3 | schemaSha256: 599e47c65662b1204c88bf082346b03b615b0540f468ea9b1859d69c7e727a96 4 | deltas: 5 | - id: 2020_03_01_add-class-3 6 | sha256: "0793f85cf3a783110337e77e31809369c1525535e54b5236b698b936de37479f" 7 | - id: 2020_04_12_add-class-1-prop3 8 | sha256: 7f20d29aae85d8e581215d55c7d6928c7f21b94d5b64584865db3ed9dfe092d3 9 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/versions/3.1.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 3 | schemaSha256: dd818c190581234c026d44fed5a0a9b30c53ec562b61e823a0cb7fe9562ae7fc 4 | deltas: 5 | - id: 2020_03_01_add-class-3 6 | sha256: 0793f85cf3a783110337e77e31809369c1525535e54b5236b698b936de37479f 7 | - id: 2020_04_12_add-class-1-prop3 8 | sha256: 7f20d29aae85d8e581215d55c7d6928c7f21b94d5b64584865db3ed9dfe092d3 9 | - id: 2020_06_27_make-class-2-prop1a-nullable 10 | tag: 2.0 11 | sha256: 8b8c64e34fc11af6eb424ccf4ac95b8a5cc596772f71e840516ea5e7dcabdb3a 12 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/versions/4.0.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 3 | schemaSha256: e7084ca36c5d861f5ffb2071da0a40b2ffeed386ff83f33991a7f4f5b5b6a113 4 | deltas: 5 | - id: 2020_03_01_add-class-3 6 | sha256: 0793f85cf3a783110337e77e31809369c1525535e54b5236b698b936de37479f 7 | - id: 2020_04_12_add-class-1-prop3 8 | sha256: 7f20d29aae85d8e581215d55c7d6928c7f21b94d5b64584865db3ed9dfe092d3 9 | - id: 2020_05_10_rename-class-2-prop1 10 | sha256: e57871d8203707dd313515b6b357f631556404867f00dce36f1a05936ebc460c 11 | -------------------------------------------------------------------------------- /src/test/resources/schema/test-index/versions/5.0.yaml: -------------------------------------------------------------------------------- 1 | released: true 2 | releaseDate: 3 | schemaSha256: bc8489efee601a2eebcaf7f30a7ecf9d8eab3059da0ca07f8c49905e974d8ff3 4 | deltas: 5 | - id: 2020_03_01_add-class-3 6 | sha256: 0793f85cf3a783110337e77e31809369c1525535e54b5236b698b936de37479f 7 | - id: 2020_04_12_add-class-1-prop3 8 | sha256: 7f20d29aae85d8e581215d55c7d6928c7f21b94d5b64584865db3ed9dfe092d3 9 | - id: 2020_05_10_rename-class-2-prop1 10 | sha256: e57871d8203707dd313515b6b357f631556404867f00dce36f1a05936ebc460c 11 | - id: 2020_06_27_make-class-2-prop1a-nullable 12 | sha256: 13f9d3dc6e317aeeba84d55725b1136b15a54a17beea100df89f0fc6483d3856 13 | -------------------------------------------------------------------------------- /src/test/scala/com/convergencelabs/convergence/server/InducedTestingException.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 - Convergence Labs, Inc. 3 | * 4 | * This file is part of the Convergence Server, which is released under 5 | * the terms of the GNU General Public License version 3 (GPLv3). A copy 6 | * of the GPLv3 should have been provided along with this file, typically 7 | * located in the "LICENSE" file, which is part of this source code package. 8 | * Alternatively, see for the 9 | * full text of the GPLv3 license, if it was not provided. 10 | */ 11 | 12 | package com.convergencelabs.convergence.server 13 | 14 | import scala.util.control.NoStackTrace 15 | 16 | /** 17 | * A utility class used when any exception will do for testing error cases 18 | * during unit testing. This exception has no stack trace in order to 19 | * not clutter the console and to improve performance. 20 | * 21 | * @param message An optional message for the exception. 22 | */ 23 | final case class InducedTestingException(message: String = "induced error for testing") 24 | extends RuntimeException(message) 25 | with NoStackTrace 26 | -------------------------------------------------------------------------------- /version.sbt: -------------------------------------------------------------------------------- 1 | ThisBuild / version := "1.0.0-rc.13" 2 | 3 | ThisBuild / versionScheme := Some("semver-spec") 4 | --------------------------------------------------------------------------------