mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
updated from master
This commit is contained in:
@@ -35,13 +35,7 @@ import static org.springframework.http.HttpStatus.CREATED;
|
|||||||
import static org.springframework.http.HttpStatus.UNPROCESSABLE_ENTITY;
|
import static org.springframework.http.HttpStatus.UNPROCESSABLE_ENTITY;
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
import javax.xml.namespace.QName;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
||||||
import org.alfresco.rest.rm.community.model.record.Record;
|
import org.alfresco.rest.rm.community.model.record.Record;
|
||||||
@@ -153,7 +147,7 @@ public class CompleteRecordTests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Incomplete records with mandatory meta-data missing
|
* Record to be completed is frozen
|
||||||
*/
|
*/
|
||||||
@DataProvider (name = "FrozenRecords")
|
@DataProvider (name = "FrozenRecords")
|
||||||
public Object[][] getFrozenRecords() throws Exception
|
public Object[][] getFrozenRecords() throws Exception
|
||||||
@@ -330,6 +324,7 @@ public class CompleteRecordTests extends BaseRMRestTest
|
|||||||
|
|
||||||
private void createMandatoryMetadata()
|
private void createMandatoryMetadata()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setMandatoryMetadata(Record record)
|
private void setMandatoryMetadata(Record record)
|
||||||
|
@@ -283,7 +283,7 @@ public class RecordsEntityResource implements BinaryResourceAction.Read,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IntegrityException("Model integrity exception: the record is already completed.", null);
|
throw new IntegrityException("Model integrity exception: the record is frozen or already completed.", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// return record state
|
// return record state
|
||||||
|
@@ -1799,6 +1799,47 @@ paths:
|
|||||||
description: Unexpected error
|
description: Unexpected error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Error'
|
$ref: '#/definitions/Error'
|
||||||
|
'/records/{recordId}/complete':
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- records
|
||||||
|
summary: Complete a record
|
||||||
|
description: |
|
||||||
|
Completes the record **recordId**.
|
||||||
|
operationId: completeRecord
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/parameters/recordIdParam'
|
||||||
|
- $ref: '#/parameters/recordEntryIncludeParam'
|
||||||
|
- $ref: '#/parameters/fieldsParam'
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful response
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/RecordEntry'
|
||||||
|
'400':
|
||||||
|
description: |
|
||||||
|
Invalid parameter: **recordIdParam** is not a valid format or
|
||||||
|
**recordIdParam** is not a record
|
||||||
|
'401':
|
||||||
|
description: Authentication failed
|
||||||
|
'403':
|
||||||
|
description: >-
|
||||||
|
Current user does not have permission to complete record
|
||||||
|
**recordIdParam**
|
||||||
|
'404':
|
||||||
|
description: |
|
||||||
|
**recordIdParam** does not exist
|
||||||
|
'422':
|
||||||
|
description: |
|
||||||
|
Model integrity exception: the record is frozen or already completed
|
||||||
|
default:
|
||||||
|
description: Unexpected error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Error'
|
||||||
## Files
|
## Files
|
||||||
'/files/{fileId}/declare':
|
'/files/{fileId}/declare':
|
||||||
post:
|
post:
|
||||||
|
Reference in New Issue
Block a user