public String getFileName() { return cmisContentStream.getFileName(); }
@Override public String getName() { return contentStream.getFileName(); }
public String getFileName() { return getContentStream().getFileName(); }
protected CmisConnectorBinary(ContentStream contentStream, String sourceName, String documentId, MimeTypeDetector mimeTypeDetector) { // the internal key can be some random string since this in an external binary.... super(new BinaryKey(UUID.randomUUID().toString()), sourceName, documentId, contentStream.getLength(), contentStream.getFileName(), mimeTypeDetector); this.contentStream = contentStream; }
@Override public ContentStream convertContentStream(ContentStream contentStream) { if (contentStream == null) { return null; } BigInteger length = (contentStream.getLength() < 0 ? null : BigInteger.valueOf(contentStream.getLength())); return getBindingsObjectFactory().createContentStream(contentStream.getFileName(), length, contentStream.getMimeType(), contentStream.getStream()); }
@Override public ContentStream convertContentStream(ContentStream contentStream) { if (contentStream == null) { return null; } BigInteger length = (contentStream.getLength() < 0 ? null : BigInteger.valueOf(contentStream.getLength())); return getBindingsObjectFactory().createContentStream(contentStream.getFileName(), length, contentStream.getMimeType(), contentStream.getStream()); }
if (content.getFileName() != null) { response.setHeader(MimeHelper.CONTENT_DISPOSITION, MimeHelper.encodeContentDisposition(MimeHelper.DISPOSITION_ATTACHMENT, content.getFileName()));
String filename = contentStream.getFileName(); if (filename == null || filename.length() == 0) { filename = "content";
String filename = contentStream.getFileName(); if (filename == null || filename.length() == 0) { filename = "content";
public ReusableContentStream(ContentStream contentStream) throws Exception { setLength(contentStream.getBigLength()); setMimeType(contentStream.getMimeType()); setFileName(contentStream.getFileName()); file = TempFileProvider.createTempFile(contentStream.getStream(), "cmis", "contentStream"); }
public ReusableContentStream(ContentStream contentStream) throws Exception { setLength(contentStream.getBigLength()); setMimeType(contentStream.getMimeType()); setFileName(contentStream.getFileName()); file = TempFileProvider.createTempFile(contentStream.getStream(), "cmis", "contentStream"); }
@Override public ContentStream getContentStream(String streamId, BigInteger offset, BigInteger length) { // get the stream ContentStream contentStream = getSession().getContentStream(this, streamId, offset, length); if (contentStream == null) { return null; } // the AtomPub binding doesn't return a file name // -> get the file name from properties, if present String filename = contentStream.getFileName(); if (filename == null) { filename = getContentStreamFileName(); } long lengthLong = (contentStream.getBigLength() == null ? -1 : contentStream.getBigLength().longValue()); // convert and return stream object return getSession().getObjectFactory().createContentStream(filename, lengthLong, contentStream.getMimeType(), contentStream.getStream(), contentStream instanceof PartialContentStream); }
result.setFilename(contentStream.getFileName()); result.setLength(contentStream.getBigLength()); result.setMimeType(contentStream.getMimeType());
@Override public ContentStream getContentStream(String streamId, BigInteger offset, BigInteger length) { // get the stream ContentStream contentStream = getSession().getContentStream(this, streamId, offset, length); if (contentStream == null) { return null; } // the AtomPub binding doesn't return a file name // -> get the file name from properties, if present String filename = contentStream.getFileName(); if (filename == null) { filename = getContentStreamFileName(); } long lengthLong = (contentStream.getBigLength() == null ? -1 : contentStream.getBigLength().longValue()); // convert and return stream object return getSession().getObjectFactory().createContentStream(filename, lengthLong, contentStream.getMimeType(), contentStream.getStream(), contentStream instanceof PartialContentStream); }
addResult(results, assertEquals(expected.getFileName(), actual.getFileName(), null, f));
@Override public ContentStream getContentStream() { if (objectId == null || getStreamId() == null) { return null; } ContentStream contentStream; try { contentStream = session.getBinding().getObjectService() .getContentStream(session.getRepositoryInfo().getId(), objectId, getStreamId(), null, null, null); } catch (CmisConstraintException e) { // no content stream return null; } if (contentStream == null) { return null; } String filename = contentStream.getFileName(); if (filename == null) { filename = getTitle(); } BigInteger bigLength = contentStream.getBigLength(); if (bigLength == null) { bigLength = getBigLength(); } long length = bigLength == null ? -1 : bigLength.longValue(); return session.getObjectFactory().createContentStream(filename, length, contentStream.getMimeType(), contentStream.getStream()); }
@Override public ContentStream getContentStream() { if (objectId == null || getStreamId() == null) { return null; } ContentStream contentStream; try { contentStream = session.getBinding().getObjectService() .getContentStream(session.getRepositoryInfo().getId(), objectId, getStreamId(), null, null, null); } catch (CmisConstraintException e) { // no content stream return null; } if (contentStream == null) { return null; } String filename = contentStream.getFileName(); if (filename == null) { filename = getTitle(); } BigInteger bigLength = contentStream.getBigLength(); if (bigLength == null) { bigLength = getBigLength(); } long length = bigLength == null ? -1 : bigLength.longValue(); return session.getObjectFactory().createContentStream(filename, length, contentStream.getMimeType(), contentStream.getStream()); }
writer.attribute("", XMLConstants.PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM); if (contentStream != null && contentStream.getFileName() != null) { writer.attribute("", XMLConstants.PREFIX_APACHE_CHEMISTY, XMLConstants.NAMESPACE_APACHE_CHEMISTRY); if (contentStream.getFileName() != null) { XMLUtils.write(writer, XMLConstants.PREFIX_APACHE_CHEMISTY, XMLConstants.NAMESPACE_APACHE_CHEMISTRY, TAG_CONTENT_FILENAME, contentStream.getFileName());
if (contentStream.getFileName() != null) { headers = Collections .singletonMap( MimeHelper.CONTENT_DISPOSITION, MimeHelper.encodeContentDisposition(MimeHelper.DISPOSITION_ATTACHMENT, contentStream.getFileName()));
if (contentStream.getFileName() != null) { headers = Collections .singletonMap( MimeHelper.CONTENT_DISPOSITION, MimeHelper.encodeContentDisposition(MimeHelper.DISPOSITION_ATTACHMENT, contentStream.getFileName()));