- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {DateTime d =
new DateTime()
DateTimeFormatter formatter;String text;formatter.parseDateTime(text)
Object instant;new DateTime(instant)
- Smart code suggestions by Codota
}
@SuppressWarnings({"unchecked"}) private void addContentAttachmentsToList(ContentEntityObject content, List<Attachment> attachments) { if (content != null) attachments.addAll(attachmentManager.getLatestVersionsOfAttachments(content)); }
private DavResourceLocator[] getPageAttachmentResourceLocators() { DavResourceLocator locator = getLocator(); List<Attachment> attachments = attachmentManager.getLatestVersionsOfAttachments(getPage()); StringBuffer contentPathBuffer = new StringBuffer(); List<DavResourceLocator> pageAttachmentResourceLocators = new ArrayList<DavResourceLocator>(); String parentResourcePath = getParentResourcePath(); for (Attachment attachment : attachments) { DavResourceLocator pageAttachmentResourceLocator; contentPathBuffer.setLength(0); contentPathBuffer.append(parentResourcePath) .append('/').append(pageTitle) .append('/').append(attachment.getFileName()); pageAttachmentResourceLocator = locator.getFactory().createResourceLocator( locator.getPrefix(), locator.getWorkspacePath(), contentPathBuffer.toString(), false ); pageAttachmentResourceLocators.add(pageAttachmentResourceLocator); } return pageAttachmentResourceLocators.toArray(new DavResourceLocator[pageAttachmentResourceLocators.size()]); }
ContentEntityObject spaceDesc = thisSpace.getDescription(); @SuppressWarnings("unchecked") List<Attachment> attachments = attachmentManager.getLatestVersionsOfAttachments(spaceDesc); StringBuffer contentPathBuffer = new StringBuffer(); List<DavResourceLocator> resourceLocators = new ArrayList<DavResourceLocator>();