mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix AWC-999: Content encoding is displayed and is settable in the UI.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6120 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -134,6 +134,26 @@ public class ContentData implements Serializable
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance using the existing one as a template, but replacing the
|
||||
* encoding.
|
||||
*
|
||||
* @param existing an existing set of content data, null to use default values
|
||||
* @param encoding the encoding to set
|
||||
* @return Returns a new, immutable instance of the data
|
||||
*/
|
||||
public static ContentData setEncoding(ContentData existing, String encoding)
|
||||
{
|
||||
ContentData ret = new ContentData(
|
||||
existing == null ? null : existing.contentUrl,
|
||||
existing == null ? null : existing.mimetype,
|
||||
existing == null ? 0L : existing.size,
|
||||
encoding,
|
||||
existing == null ? null : existing.locale);
|
||||
// done
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a content data using the {@link I18NUtil#getLocale() default locale}.
|
||||
*
|
||||
|
Reference in New Issue
Block a user