* @since 28.0.0 */ public function getMetadataForFiles(array $fileIds): array; /** * save metadata to database and refresh indexes. * metadata are saved if new data are available. * on update, a check on syncToken is done to avoid conflict (race condition) * * @param IFilesMetadata $filesMetadata * * @throws FilesMetadataException if metadata seems malformed * @since 28.0.0 */ public function saveMetadata(IFilesMetadata $filesMetadata): void; /** * delete metadata and its indexes * * @param int $fileId file id * * @return void * @since 28.0.0 */ public function deleteMetadata(int $fileId): void; /** * generate and return a MetadataQuery to help building sql queries * * @param IQueryBuilder $qb * @param string $fileTableAlias alias of the table that contains data about files * @param string $fileIdField alias of the field that contains file ids * * @return IMetadataQuery * @see IMetadataQuery * @since 28.0.0 */ public function getMetadataQuery( IQueryBuilder $qb, string $fileTableAlias, string $fileIdField, ): IMetadataQuery; /** * returns all type of metadata currently available. * The list is stored in a IFilesMetadata with null values but correct type. * * Note: this method loads lazy appconfig values. * * @return IFilesMetadata * @since 28.0.0 */ public function getKnownMetadata(): IFilesMetadata; /** * Initiate a metadata key with its type. * * The call is mandatory before using the metadata property in a webdav request. * The call should be part of a migration/repair step and not be called on app's boot * process as it is using lazy-appconfig value * * Note: this method loads lazy appconfig values. * * @param string $key metadata key * @param string $type metadata type * @param bool $indexed TRUE if metadata can be search * @param int $editPermission remote edit permission via Webdav PROPPATCH * * @see IMetadataValueWrapper::TYPE_INT * @see IMetadataValueWrapper::TYPE_FLOAT * @see IMetadataValueWrapper::TYPE_BOOL * @see IMetadataValueWrapper::TYPE_ARRAY * @see IMetadataValueWrapper::TYPE_STRING_LIST * @see IMetadataValueWrapper::TYPE_INT_LIST * @see IMetadataValueWrapper::TYPE_STRING * @see IMetadataValueWrapper::EDIT_FORBIDDEN * @see IMetadataValueWrapper::EDIT_REQ_OWNERSHIP * @see IMetadataValueWrapper::EDIT_REQ_WRITE_PERMISSION * @see IMetadataValueWrapper::EDIT_REQ_READ_PERMISSION * @since 28.0.0 * @since 29.0.0 uses lazy config value - do not use this method out of repair steps */ public function initMetadata(string $key, string $type, bool $indexed, int $editPermission): void; }