mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
124205 jvonka: RA-881: Prevent the creation of multiple renditions git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126552 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,6 +23,7 @@ import org.alfresco.rest.api.Renditions;
|
||||
import org.alfresco.rest.api.model.Rendition;
|
||||
import org.alfresco.rest.framework.BinaryProperties;
|
||||
import org.alfresco.rest.framework.WebApiDescription;
|
||||
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
|
||||
import org.alfresco.rest.framework.resource.RelationshipResource;
|
||||
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction;
|
||||
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceBinaryAction;
|
||||
@@ -77,6 +78,13 @@ public class NodeRenditionsRelation implements RelationshipResourceAction.Read<R
|
||||
@Override
|
||||
public List<Rendition> create(String nodeId, List<Rendition> entity, Parameters parameters)
|
||||
{
|
||||
// Temporary - pending future improvements to thumbnail service to minimise chance of
|
||||
// missing/failed thumbnails (when requested/generated 'concurrently')
|
||||
if (entity.size() > 1)
|
||||
{
|
||||
throw new InvalidArgumentException("Please specify one rendition entity id only");
|
||||
}
|
||||
|
||||
for (Rendition rendition : entity)
|
||||
{
|
||||
renditions.createRendition(nodeId, rendition, parameters);
|
||||
|
Reference in New Issue
Block a user