Zadanie #1644
Zadanie #1642: Usuwanie artykułów
Dodać w kontrolerze możliwość usuwania dokumentów.
Status: | Zamknięty | Start date: | 2017-04-18 | |
---|---|---|---|---|
Priority: | Normalny | Due date: | ||
Assignee: | Michał Komar | % Done: | 100% | |
Category: | web | |||
Target version: | 0.3 | |||
Developer: | Łukasz Waśkiewicz | Tester: | Michał Komar |
Description
Usuwanie dokumentów powinno znajdować się pod restowym url-em DELETE /document/{id}
Po wywołaniu żądania powinna zostać dodana modyfikacja z ustawionym polem removed na true.
Associated revisions
refs #1644 oznaczanie dokumentu jako skasowanego
refs #1644 poprawki usuwania dokumentów
refs #1644 sprawdzanie uprawnień do kasowania
refs #1644 naprawa usuwania dokumentów
refs #1644 naprawa bazy danych
refs #1644 ulepszenie usuwania dokumentów
refs #1644 naprawa bazy danych (REMOVAL-> MODIFICATION)
History
#1 Updated by Łukasz Waśkiewicz almost 8 years ago
- Status changed from Nowy to Testowanie
- Assignee changed from Łukasz Waśkiewicz to Michał Komar
- % Done changed from 0 to 90
nie wiem jak w websocketem ale póki co zrobiłem aby szło na /topic/document/saved
#2 Updated by Michał Komar almost 8 years ago
- Status changed from Testowanie to Odpowiedź
- Assignee changed from Michał Komar to Łukasz Waśkiewicz
Po websocketach idzie komunikat z removed:false zamiast removed:true, przez co element nie oznacza się jako usunięty. Trzeba też dodać do findDocumentHistory(...) modificationType.Removal przy "case BASIC".
#3 Updated by Łukasz Waśkiewicz almost 8 years ago
- Status changed from Odpowiedź to Testowanie
- Assignee changed from Łukasz Waśkiewicz to Michał Komar
- % Done changed from 90 to 100
poprawione
ale w DocumentController.sendModificationInformation jest jakieś dziwne mapowanie wpierw na DocumentMetadata potem na DocumentReferenceBean.
Chyba można było by to mapować bezpośrednio
DocumentMetadata elementDocument = mapper.map(document, DocumentMetadata.class); DocumentReferenceBean documentReference = mapper.map(elementDocument, DocumentReferenceBean.class);
#4 Updated by Michał Komar almost 8 years ago
- Status changed from Testowanie to Odpowiedź
- Assignee changed from Michał Komar to Łukasz Waśkiewicz
Usuwanie nie działa. Uruchamiane są procesy konwersji i indeksowania, które nie powinny być uruchamiane.
Czasami leci optimistic lock:
Caused by: pl.edu.icm.synat.api.services.store.exception.OptimisticLockException: Optimistic lock of element 4f50eff0-23fd-40ee-897d-62106f55d019[11] failed, found version 4f50eff0-23fd-40ee-897d-62106f55d019[12] at pl.edu.icm.synat.services.store.mongodb.operations.stmt.NewUpdateStatementExecutor.handleModifyExistingRecord(NewUpdateStatementExecutor.java:57) at pl.edu.icm.synat.services.store.mongodb.opera at pl.edu.icm.jupiter.integration.services.JupiterSynatProcessIntegrationService.executeConversionProcess(JupiterSynatProcessIntegrationService.java:174) at pl.edu.icm.jupiter.integration.services.JupiterSynatProcessIntegrationService$$FastClassBySpringCGLIB$$fda4cd92.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:73) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:656) at pl.edu.icm.jupiter.integration.services.JupiterSynatProcessIntegrationService$$EnhancerBySpringCGLIB$$1a756d74.executeConversionProcess(<generated>) at pl.edu.icm.jupiter.services.publishing.PublishingJob.call(PublishingJob.java:59) at pl.edu.icm.jupiter.services.publishing.PublishingServiceImpl.publishDocuments(PublishingServiceImpl.java:66) at pl.edu.icm.jupiter.services.publishing.PublishingServiceImpl.publishDocumentsSynchronous(PublishingServiceImpl.java:77) at pl.edu.icm.jupiter.services.publishing.PublishingServiceImpl$$FastClassBySpringCGLIB$$887f6861.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodPr,username=mk_test,dataset=psjd,id=575]
#5 Updated by Łukasz Waśkiewicz almost 8 years ago
- Status changed from Odpowiedź to Testowanie
- Assignee changed from Łukasz Waśkiewicz to Michał Komar
poprawione
#7 Updated by Michał Komar over 7 years ago
- Status changed from Rozwiązany to Zamknięty