public String getEncoding() { return contentData.getEncoding(); }
public String getEncoding() { return contentData.getEncoding(); }
public String getEncoding() { return contentData.getEncoding(); }
public String getEncoding() { return contentData.getEncoding(); }
/** * ContentDataPart * @param contentService content service * @param partName String * @param data data */ public ContentDataPart(ContentService contentService, String partName, ContentData data) { super(partName, data.getMimetype(), data.getEncoding(), null); this.contentService = contentService; this.data = data; this.filename = partName; }
/** * ContentDataPart * @param contentService content service * @param partName String * @param data data */ public ContentDataPart(ContentService contentService, String partName, ContentData data) { super(partName, data.getMimetype(), data.getEncoding(), null); this.contentService = contentService; this.data = data; this.filename = partName; }
@Override protected Map<String, Object> getTransientValues(NodeRef item) { Map<String, Object> values = new HashMap<String, Object>(3); ContentData contentData = getContentData(item); if (contentData != null) { values.put(EncodingFieldProcessor.KEY, contentData.getEncoding()); values.put(MimetypeFieldProcessor.KEY, contentData.getMimetype()); values.put(SizeFieldProcessor.KEY, contentData.getSize()); } return values; }
@Override protected Map<String, Object> getTransientValues(NodeRef item) { Map<String, Object> values = new HashMap<String, Object>(3); ContentData contentData = getContentData(item); if (contentData != null) { values.put(EncodingFieldProcessor.KEY, contentData.getEncoding()); values.put(MimetypeFieldProcessor.KEY, contentData.getMimetype()); values.put(SizeFieldProcessor.KEY, contentData.getSize()); } return values; }
public Reader getReader() { ContentService contentService = services.getContentService(); ContentReader reader = contentService.getReader(nodeRef, property); if (reader != null && reader.exists()) { try { return (contentData.getEncoding() == null) ? new InputStreamReader(reader.getContentInputStream()) : new InputStreamReader(reader.getContentInputStream(), contentData.getEncoding()); } catch (IOException e) { // NOTE: fall-through } } return null; }
public Reader getReader() { ContentService contentService = services.getContentService(); ContentReader reader = contentService.getReader(nodeRef, property); if (reader != null && reader.exists()) { try { return (contentData.getEncoding() == null) ? new InputStreamReader(reader.getContentInputStream()) : new InputStreamReader(reader.getContentInputStream(), contentData.getEncoding()); } catch (IOException e) { // NOTE: fall-through } } return null; }
/** * Construct */ public NodeContentData(NodeRef nodeRef, ContentData contentData) { super(contentData.getContentUrl(), contentData.getMimetype(), contentData.getSize(), contentData.getEncoding(), contentData.getLocale()); this.nodeRef = nodeRef; }
/** * Construct */ public NodeContentData(NodeRef nodeRef, ContentData contentData) { super(contentData.getContentUrl(), contentData.getMimetype(), contentData.getSize(), contentData.getEncoding(), contentData.getLocale()); this.nodeRef = nodeRef; }
writer.setEncoding(contentData.getEncoding()); writer.setMimetype(contentData.getMimetype()); writer.setLocale(contentData.getLocale());
writer.setEncoding(contentData.getEncoding()); writer.setMimetype(contentData.getMimetype()); writer.setLocale(contentData.getLocale());
@Override public ContentData doWork() throws Exception { InputStream contentStream = handler.importStream(sourceContentUrl); ContentWriter writer = contentService.getWriter(null, null, false); writer.setEncoding(sourceContentData.getEncoding()); writer.setMimetype(sourceContentData.getMimetype()); writer.putContent(contentStream); return writer.getContentData(); } }, TenantService.DEFAULT_DOMAIN);
@Override public ContentData doWork() throws Exception { InputStream contentStream = handler.importStream(sourceContentUrl); ContentWriter writer = contentService.getWriter(null, null, false); writer.setEncoding(sourceContentData.getEncoding()); writer.setMimetype(sourceContentData.getMimetype()); writer.putContent(contentStream); return writer.getContentData(); } }, TenantService.DEFAULT_DOMAIN);
encoding = contentData.getEncoding();
encoding = contentData.getEncoding();
encoding = value.getEncoding();
writer.setEncoding(contentData.getEncoding()); writer.setLocale(contentData.getLocale());