From 063b09421ad064e13fa858076fcb4de616cfe6cb Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Mon, 8 Nov 2021 13:41:43 +0100 Subject: [PATCH] REL: Fix MESSAGE_CODE enum --- proto/caosdb/entity/v1/main.proto | 309 ++++++++++++------------------ 1 file changed, 119 insertions(+), 190 deletions(-) diff --git a/proto/caosdb/entity/v1/main.proto b/proto/caosdb/entity/v1/main.proto index 78bd4d4..224d1af 100644 --- a/proto/caosdb/entity/v1/main.proto +++ b/proto/caosdb/entity/v1/main.proto @@ -137,258 +137,189 @@ enum MessageCode { // code was not in this list. An unknown error code is a sign of a wrong otr // out-dated implementation on either side. MESSAGE_CODE_UNKNOWN = 1; + // The requested entity (retrieve, delete, or update) does not exist. MESSAGE_CODE_ENTITY_DOES_NOT_EXIST = 2; + // The entity has no properties. MESSAGE_CODE_ENTITY_HAS_NO_PROPERTIES = 3; - // TODO(tf) This entity has been deleted successfully. - MESSAGE_CODE_ENTITY_HAS_BEEN_DELETED_SUCCESSFULLY = 5; - - // TODO(tf) Entity has unqualified properties. - MESSAGE_CODE_ENTITY_HAS_UNQUALIFIED_PROPERTIES = 6; - - // TODO(tf) Entity has unqualified parents. - MESSAGE_CODE_ENTITY_HAS_UNQUALIFIED_PARENTS = 7; - - // TODO(tf) DESCRIPTION!!! - MESSAGE_CODE_PARSING_FAILED = 8; - - // TODO(tf) Unknown datatype. - MESSAGE_CODE_UNKNOWN_DATATYPE = 9; + // This entity has been deleted successfully. + MESSAGE_CODE_ENTITY_HAS_BEEN_DELETED_SUCCESSFULLY = 4; - // TODO(tf) Unknown importance. - MESSAGE_CODE_UNKNOWN_IMPORTANCE = 10; + // On insert or update: Entity has unqualified properties. + MESSAGE_CODE_ENTITY_HAS_UNQUALIFIED_PROPERTIES = 5; - // TODO(tf) Entity has no ID. - MESSAGE_CODE_ENTITY_HAS_NO_ID = 11; + // On insert or update: Entity has unqualified parents. + MESSAGE_CODE_ENTITY_HAS_UNQUALIFIED_PARENTS = 6; - // TODO(tf) Entity is required by other entities which are not to be deleted. - MESSAGE_CODE_REQUIRED_BY_PERSISTENT_ENTITY = 12; + // On update: Entity, Property or Parent has no ID and the server is + // configured to require a valid ID for all entities which are to be updated + // and their properties and parents as well. + MESSAGE_CODE_ENTITY_HAS_NO_ID = 7; - // TODO(tf) Property has no datatype. - MESSAGE_CODE_NO_DATATYPE = 13; + // Entity is required by other entities which are not to be deleted. + MESSAGE_CODE_REQUIRED_BY_PERSISTENT_ENTITY = 8; - // TODO(tf) Entity has no description. - MESSAGE_CODE_ENTITY_HAS_NO_DESCRIPTION = 14; + // Property has no datatype. + MESSAGE_CODE_PROPERTY_HAS_NO_DATA_TYPE = 9; - // TODO(tf) Entity has no name. - MESSAGE_CODE_ENTITY_HAS_NO_NAME = 15; + // Entity has no description. + MESSAGE_CODE_ENTITY_HAS_NO_DESCRIPTION = 10; - // TODO(tf) An obligatory property is missing. - MESSAGE_CODE_OBLIGATORY_PROPERTY_MISSING = 16; + // Entity has no name. + MESSAGE_CODE_ENTITY_HAS_NO_NAME = 11; - // TODO(tf) Entity has no parents. - MESSAGE_CODE_ENTITY_HAS_NO_PARENTS = 17; + // On insert or update: An obligatory property is missing. + MESSAGE_CODE_OBLIGATORY_PROPERTY_MISSING = 12; - // TODO(tf) Entity can not be identified due to name duplicates. - MESSAGE_CODE_NAME_DUPLICATES = 18; + // On insert or update: Entity has no parents. + MESSAGE_CODE_ENTITY_HAS_NO_PARENTS = 13; - // TODO(tf) Entity has no name and no ID. - MESSAGE_CODE_ENTITY_HAS_NO_NAME_AND_NO_ID = 19; + // No target path specified. + MESSAGE_CODE_FILE_HAS_NO_TARGET_PATH = 14; - // TODO(tf) Reference property has no refid. - MESSAGE_CODE_REFERENCE_HAS_NO_REFID = 20; + // This target path is not allowed. + MESSAGE_CODE_TARGET_PATH_NOT_ALLOWED = 15; - // TODO(tf) No target path specified. - MESSAGE_CODE_NO_TARGET_PATH = 21; + // This target path does already exist. + MESSAGE_CODE_TARGET_PATH_EXISTS = 16; - // TODO(tf) This target path is not allowed. - MESSAGE_CODE_TARGET_PATH_NOT_ALLOWED = 22; + // Property has no unit. + MESSAGE_CODE_PROPERTY_HAS_NO_UNIT = 17; - // TODO(tf) This target path does already exist. - MESSAGE_CODE_TARGET_PATH_EXISTS = 23; + // Cannot parse value. + MESSAGE_CODE_CANNOT_PARSE_VALUE = 18; - // TODO(tf) Entity has no unit. - MESSAGE_CODE_ENTITY_HAS_NO_UNIT = 24; + // Checksum test failed. File is corrupted. + MESSAGE_CODE_CHECKSUM_TEST_FAILED = 19; - // TODO(tf) Cannot parse value. - MESSAGE_CODE_CANNOT_PARSE_VALUE = 25; + // Size test failed. File is corrupted. + MESSAGE_CODE_SIZE_TEST_FAILED = 20; - // TODO(tf) Checksum test failed. File is corrupted. - MESSAGE_CODE_CHECKSUM_TEST_FAILED = 26; + // Cannot create parent folder in the file system. + MESSAGE_CODE_CANNOT_CREATE_PARENT_FOLDER = 21; - // TODO(tf) Size test failed. File is corrupted. - MESSAGE_CODE_SIZE_TEST_FAILED = 27; + // File has not been uploaded. + MESSAGE_CODE_FILE_HAS_NOT_BEEN_UPLOAED = 22; - // TODO(tf) Could not create parent folder in the file system. - MESSAGE_CODE_CANNOT_CREATE_PARENT_FOLDER = 28; + // Cannot move file to it's target folder. + MESSAGE_CODE_CANNOT_MOVE_FILE_TO_TARGET_PATH = 23; - // TODO(tf) File has not been uploaded. - MESSAGE_CODE_FILE_HAS_NOT_BEEN_UPLOAED = 29; + // Cannot parse value as datetime value. + MESSAGE_CODE_CANNOT_PARSE_DATETIME_VALUE = 24; - // TODO(tf) Thumbnail has not been uploaded. - MESSAGE_CODE_THUMBNAIL_HAS_NOT_BEEN_UPLOAED = 30; + // Cannot parse value as double value. + MESSAGE_CODE_CANNOT_PARSE_DOUBLE_VALUE = 25; - // TODO(tf) Could not move file to it's target folder. - MESSAGE_CODE_CANNOT_MOVE_FILE_TO_TARGET_PATH = 31; + // Cannot parse value as integer value. + MESSAGE_CODE_CANNOT_PARSE_INT_VALUE = 26; - // TODO(tf) Cannot parse value to datetime format - // (yyyy-mm-dd'T'hh:mm:ss[.fffffffff][TimeZone]). - MESSAGE_CODE_CANNOT_PARSE_DATETIME_VALUE = 32; - - // TODO(tf) Cannot parse value to double. - MESSAGE_CODE_CANNOT_PARSE_DOUBLE_VALUE = 33; - - // TODO(tf) Cannot parse value to integer. - MESSAGE_CODE_CANNOT_PARSE_INT_VALUE = 34; - - // TODO(tf) Cannot parse value to boolean (either 'true' or 'false', ignoring + // Cannot parse value as boolean value (either 'true' or 'false', ignoring // case). - MESSAGE_CODE_CANNOT_PARSE_BOOL_VALUE = 35; - - // TODO(tf) Could not connect to MySQL server. - MESSAGE_CODE_CANNOT_CONNECT_TO_DATABASE = 36; - - // TODO(tf) Please check if your MySQL has all required procedures installed. - MESSAGE_CODE_MYSQL_PROCEDURE_EXCEPTION = 37; - - // TODO(tf) This error occurred while parsing the xml. Probably it has a wrong - // encoding. - MESSAGE_CODE_REQUEST_HAS_WRONG_ENCODING = 38; - - // TODO(tf) Request body didn't contain the expected Elements. - MESSAGE_CODE_REQUEST_DOESNT_CONTAIN_EXPECTED_ELEMENTS = 39; - - // TODO(tf) File is not in drop-off box. - MESSAGE_CODE_FILE_NOT_IN_DROPOFFBOX = 40; - - // TODO(tf) File could not be found. - MESSAGE_CODE_FILE_NOT_FOUND = 41; - - // TODO(tf) Could not move file to tmp folder. - MESSAGE_CODE_CANNOT_MOVE_FILE_TO_TMP = 42; - - // TODO(tf) Insufficient read permission for this file. Please make it - // readable. - MESSAGE_CODE_CANNOT_READ_FILE = 43; - - // TODO(tf) Insufficient read permission for this file's thumbnail. Please - // make it readable. - MESSAGE_CODE_CANNOT_READ_THUMBNAIL = 44; - - // TODO(tf) No file representation submitted. - MESSAGE_CODE_NO_FILE_REPRESENTATION_SUBMITTED = 45; - - // TODO(tf) DESCRIPTION? - MESSAGE_CODE_FILE_IS_EMPTY = 46; - - // TODO(tf) A warning occured while processing an entity with the strict flag. - MESSAGE_CODE_WARNING_OCCURED = 47; - - // TODO(tf) DESCRIPTION? - MESSAGE_CODE_UNKNOWN_JOB = 48; - - // TODO(tf) Name is already in use. Choose a different name or reuse an - // existing entity. - MESSAGE_CODE_NAME_IS_NOT_UNIQUE = 49; - - // TODO(tf) This entity cannot be identified uniquely due to name dublicates - MESSAGE_CODE_CANNOT_IDENTIFY_ENTITY_UNIQUELY = 50; + MESSAGE_CODE_CANNOT_PARSE_BOOL_VALUE = 27; - // TODO(tf) This query finished with errors. - MESSAGE_CODE_QUERY_EXCEPTION = 51; + // File could not be found. + MESSAGE_CODE_FILE_NOT_FOUND = 28; - // TODO(tf) This entity is empty. - MESSAGE_CODE_ENTITY_IS_EMPTY = 52; + // A warning occured while processing an entity with the strict flag. + MESSAGE_CODE_WARNING_OCCURED = 29; - // TODO(tf) An unknown error occured during the transaction and it was rolled - // back. - MESSAGE_CODE_TRANSACTION_ROLL_BACK = 53; + // On insert or update: Name is already in use. Choose a different name or + // reuse an existing entity. + MESSAGE_CODE_ENTITY_NAME_IS_NOT_UNIQUE = 30; - // TODO(tf) The file upload failed for an unknown reason. - MESSAGE_CODE_FILE_UPLOAD_FAILED = 54; + // This query finished with errors. + MESSAGE_CODE_QUERY_EXCEPTION = 31; - // TODO(tf) Unknown unit. Values with this unit cannot be converted to other - // units when used in search queries. - MESSAGE_CODE_UNKNOWN_UNIT = 55; + // An unknown error occured during the transaction and it was rolled back. + MESSAGE_CODE_TRANSACTION_ROLL_BACK = 32; - // TODO(tf) You are not allowed to do this. - MESSAGE_CODE_AUTHORIZATION_ERROR = 56; + // Unknown unit. Values with this unit cannot be converted to other units + // when used in search queries. + MESSAGE_CODE_UNKNOWN_UNIT = 34; - // TODO(tf) Reference not qualified. The value of this Reference Property is - // to be a child of its data type. - MESSAGE_CODE_REFERENCE_IS_NOT_ALLOWED_BY_DATATYPE = 57; + // You are not allowed to do this. + MESSAGE_CODE_AUTHORIZATION_ERROR = 35; - // TODO(tf) Cannot parse EntityACL. - MESSAGE_CODE_CANNOT_PARSE_ENTITY_ACL = 58; + // Reference not qualified. The value of this Reference Property is to be a + // child of its data type. + MESSAGE_CODE_REFERENCE_IS_NOT_ALLOWED_BY_DATA_TYPE = 36; - // TODO(tf) This entity cannot be identified due to name duplicates. - MESSAGE_CODE_ENTITY_NAME_DUPLICATES = 59; + // This entity cannot be identified due to name duplicates. + MESSAGE_CODE_ENTITY_NAME_DUPLICATES = 37; - // TODO(tf) This data type cannot be identified due to name duplicates. - MESSAGE_CODE_DATA_TYPE_NAME_DUPLICATES = 60; + // This data type cannot be identified due to name duplicates. + MESSAGE_CODE_DATA_TYPE_NAME_DUPLICATES = 38; - // TODO(tf) This entity cannot be identified as it didn't come with a name or - // id. - MESSAGE_CODE_ENTITY_HAS_NO_NAME_OR_ID = 61; + // This entity cannot be identified as it didn't come with a name or id. + MESSAGE_CODE_ENTITY_HAS_NO_NAME_OR_ID = 39; - // TODO(tf) Affiliation is not defined for this child-parent constellation. - MESSAGE_CODE_AFFILIATION_ERROR = 62; + // Affiliation is not defined for this child-parent constellation. + MESSAGE_CODE_AFFILIATION_ERROR = 40; - // TODO(tf) An error occured during the parsing of this query. Maybe you use a - // wrong syntax? - MESSAGE_CODE_QUERY_PARSING_ERROR = 63; + // An error occured during the parsing of this query. Maybe you use a wrong + // syntax? + MESSAGE_CODE_QUERY_PARSING_ERROR = 41; - // TODO(tf) A property which has 'name' as its parent must have a TEXT data - // type. - MESSAGE_CODE_NAME_PROPERTIES_MUST_BE_TEXT = 64; + // A property which has 'name' as its parent must have a TEXT data type. + MESSAGE_CODE_NAME_PROPERTIES_MUST_BE_TEXT = 42; - // TODO(tf) This entity had parent duplicates. That is meaningless and only - // one parent had been inserted. - MESSAGE_CODE_PARENT_DUPLICATES_WARNING = 65; + // This entity had parent duplicates. That is meaningless and only one parent + // had been inserted. + MESSAGE_CODE_PARENT_DUPLICATES_WARNING = 43; - // TODO(tf) This entity had parent duplicates. Parent duplicates are - // meaningless and would be ignored (and inserted only once). But these - // parents had diverging inheritance instructions which cannot be processed. - MESSAGE_CODE_PARENT_DUPLICATES_ERROR = 66; + // This entity had parent duplicates. Parent duplicates are meaningless and + // would be ignored (and inserted only once). But these parents had diverging + // inheritance instructions which cannot be processed. + MESSAGE_CODE_PARENT_DUPLICATES_ERROR = 44; - // TODO(tf) One or more entities are not qualified. None of them have been + // One or more entities are not qualified. None of them have been // inserted/updated/deleted. - MESSAGE_CODE_ATOMICITY_ERROR = 67; + MESSAGE_CODE_ATOMICITY_ERROR = 45; - // TODO(tf) There is no such role '" + role + "'. - MESSAGE_CODE_NO_SUCH_ENTITY_ROLE = 68; + // There is no such role. + MESSAGE_CODE_NO_SUCH_ENTITY_ROLE = 46; - // TODO(tf) This entity cannot be deleted due to dependency problems - MESSAGE_CODE_REQUIRED_BY_UNQUALIFIED = 69; + // This entity cannot be deleted due to dependency problems + MESSAGE_CODE_REQUIRED_BY_UNQUALIFIED = 47; - // TODO(tf) This entity has an invalid reference. - MESSAGE_CODE_ENTITY_HAS_INVALID_REFERENCE = 70; + // This entity has an unqualified reference. I.e. the referenced entity is + // not qualified for the transaction. + MESSAGE_CODE_ENTITY_HAS_UNQUALIFIED_REFERENCE = 48; - // TODO(tf) Referenced entity does not exist. - MESSAGE_CODE_REFERENCED_ENTITY_DOES_NOT_EXIST = 71; + // Referenced entity does not exist. + MESSAGE_CODE_REFERENCED_ENTITY_DOES_NOT_EXIST = 49; - // TODO(tf) This reference cannot be identified due to name duplicates. - MESSAGE_CODE_REFERENCE_NAME_DUPLICATES = 72; + // This reference cannot be identified due to name duplicates. + MESSAGE_CODE_REFERENCE_NAME_DUPLICATES = 50; - // TODO(tf) The datatype which is to be inherited could not be detected due to - // divergent datatypes of at least two parents. - MESSAGE_CODE_DATATYPE_INHERITANCE_AMBIGUOUS = 73; + // The datatype which is to be inherited could not be detected due to divergent datatypes of at least two parents. + MESSAGE_CODE_DATA_TYPE_INHERITANCE_AMBIGUOUS = 51; - // TODO(tf) This datatype does not accept collections of values (e.g. Lists). - MESSAGE_CODE_DATA_TYPE_DOES_NOT_ACCEPT_COLLECTION_VALUES = 74; + // This datatype does not accept collections of values (e.g. Lists). + MESSAGE_CODE_DATA_TYPE_DOES_NOT_ACCEPT_COLLECTION_VALUES = 52; - // TODO(tf) This unit cannot be parsed. - MESSAGE_CODE_CANNOT_PARSE_UNIT = 75; + // This unit cannot be parsed. + MESSAGE_CODE_CANNOT_PARSE_UNIT = 53; - // TODO(tf) This property is an additional property which has no corresponding + // This property is an additional property which has no corresponding // property among the properties of the parents. - MESSAGE_CODE_ADDITIONAL_PROPERTY = 76; + MESSAGE_CODE_ADDITIONAL_PROPERTY = 54; - // TODO(tf) This property overrides the datatype. - MESSAGE_CODE_PROPERTY_WITH_DATATYPE_OVERRIDE = 77; + // This property overrides the datatype. + MESSAGE_CODE_PROPERTY_WITH_DATA_TYPE_OVERRIDE = 55; - // TODO(tf) This property overrides the description. - MESSAGE_CODE_PROPERTY_WITH_DESC_OVERRIDE = 78; + // This property overrides the description. + MESSAGE_CODE_PROPERTY_WITH_DESCRIPTION_OVERRIDE = 56; - // TODO(tf) This property overrides the name. - MESSAGE_CODE_PROPERTY_WITH_NAME_OVERRIDE = 79; + // This property overrides the name. + MESSAGE_CODE_PROPERTY_WITH_NAME_OVERRIDE = 57; // Indicates that this server cannot process this integer value because it is // out of range. The integer range is an implementation detail and thus this // can happen even though the API allows the value. - MESSAGE_CODE_INTEGER_VALUE_OUT_OF_RANGE = 80; + MESSAGE_CODE_INTEGER_VALUE_OUT_OF_RANGE = 58; } // Messages are used by server's or client's to transport *transient* @@ -631,8 +562,6 @@ message RetrieveRequest { // Is the client requesting to download the file associated with the // retrieved entity or query results? bool register_file_download = 3; - // TODO Settings for the download. Ignored if register_file_download is false. - // FileTransmissionSettings download_settings = 4; } // Response to a retrieve request -- GitLab