Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

120441 jvonka: RA-727: REST fwk - fix GET node binary resource (setting of content info response headers)
   - including encoding (Content-Type charset) & locale (Content-Language)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126382 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 10:36:50 +00:00
parent 8c957be649
commit 2f84bce7f7
4 changed files with 69 additions and 8 deletions

View File

@@ -1,3 +1,21 @@
/*
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.rest.framework.resource.content;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -13,12 +31,14 @@ public class NodeBinaryResource implements BinaryResource
final NodeRef nodeRef;
final QName propertyQName;
final ContentInfo contentInfo;
public NodeBinaryResource(NodeRef nodeRef, QName propertyQName)
public NodeBinaryResource(NodeRef nodeRef, QName propertyQName, ContentInfo contentInfo)
{
super();
this.nodeRef = nodeRef;
this.propertyQName = propertyQName;
this.contentInfo = contentInfo;
}
public NodeRef getNodeRef()
@@ -30,4 +50,8 @@ public class NodeBinaryResource implements BinaryResource
{
return this.propertyQName;
}
public ContentInfo getContentInfo() {
return this.contentInfo;
}
}