<p>
Details about the document attachments, including names, locations, sizes, etc.
</p>

@param attachmentsInformation
Details about the document attachments, including names, locations, sizes, etc.
517246
public void setAttachmentsInformation(java.util.Collection<AttachmentInformation> attachmentsInformation) {
        if (attachmentsInformation == null) {
            this.attachmentsInformation = null;
            return;
        }

        this.attachmentsInformation = new com.amazonaws.internal.SdkInternalList<AttachmentInformation>(attachmentsInformation);
    }
805297
protected static PreparedAttachment prepareAttachment(String attachmentsDir,
                                                          AttachmentStreamFactory attachmentStreamFactory, Attachment attachment, long length, long encodedLength) throws AttachmentException {
        PreparedAttachment pa = new PreparedAttachment(attachment, attachmentsDir, length, attachmentStreamFactory);
        // check the length on disk is correct:
        // - plain encoding, length on disk is signalled by the "length" metadata property
        // - all other encodings, length on disk is signalled by the "encoded_length" metadata property
        if (pa.attachment.encoding == Attachment.Encoding.Plain) {
            if (pa.length != length) {
                throw new AttachmentNotSavedException(String.format("Actual length of %d does not equal expected length of %d", pa.length, length));
            }
        } else {
            if (pa.encodedLength != encodedLength) {
                throw new AttachmentNotSavedException(String.format("Actual encoded length of %d does not equal expected encoded length of %d", pa.encodedLength, pa.length));
            }
        }
        return pa;
    }
375969
protected void addPackageInfo(PackageInfo packageInfo) {
        if (packageInfo != null) {
            packageInfoMap.put(packageInfo.getInternalPackageName(), packageInfo);
        }
    }
1260104
static public Integer getAttachmentPosition(
			JSONObject targetDoc
			,String attachmentName
			) {
		
		JSONObject targetAttachments = targetDoc.optJSONObject("_attachments");
		if( null == targetAttachments ) {
			// No attachment on target doc
			return null;
		}
		
		JSONObject targetAttachment = targetAttachments.optJSONObject(attachmentName);
		if( null == targetAttachment ) {
			// Target document does not have an attachment with this name
			return null;
		}
		
		if( JSONSupport.containsKey(targetAttachment,"revpos") ){
			int revPos = targetAttachment.optInt("revpos",-1);
			if( revPos < 0 ){
				return null;
			}
			return revPos;
		}
		
		return null;
	}
1049673
@Programmatic
    public <T> T paperclipAttaches(final Document document, Class<T> typeAttachedTo) {
        final List<Paperclip> paperclips = findByDocument(document);
        for (Paperclip paperclip : paperclips) {
            final Object attachedTo = paperclip.getAttachedTo();
            if(typeAttachedTo.isAssignableFrom(attachedTo.getClass())) {
                return (T) attachedTo;
            }
        }
        return null;
    }
1276684
@Override public void attachInfo(Context context, ProviderInfo info) {
    super.attachInfo(context, info);

    // Sanity check our security
    if (info.exported) {
      throw new SecurityException("Provider must not be exported");
    }
    if (!info.grantUriPermissions) {
      throw new SecurityException("Provider must grant uri permissions");
    }

    mStrategy = getPathStrategy(context, info.authority);
  }
395531
void copyLayoutInformationFrom(@Nonnull View source) {
        if (this.getPaperSize() == null) {
            this.setPaperSize(source.getPaperSize());
        }

        for (ElementView sourceElementView : source.getElements()) {
            ElementView destinationElementView = findElementView(sourceElementView);
            if (destinationElementView != null) {
                destinationElementView.copyLayoutInformationFrom(sourceElementView);
            }
        }

        for (RelationshipView sourceRelationshipView : source.getRelationships()) {
            RelationshipView destinationRelationshipView = findRelationshipView(sourceRelationshipView);
            if (destinationRelationshipView != null) {
                destinationRelationshipView.copyLayoutInformationFrom(sourceRelationshipView);
            }
        }
    }
780121
protected void copyFieldsFrom(RepositoryResourceImpl fromResource, boolean includeAttachmentInfo) {
        setName(fromResource.getName()); // part of the identification so locked
        setDescription(fromResource.getDescription());
        setShortDescription(fromResource.getShortDescription());
        setProviderName(fromResource.getProviderName()); // part of the identification so locked
        setProviderUrl(fromResource.getProviderUrl());
        setVersion(fromResource.getVersion());
        setDownloadPolicy(fromResource.getDownloadPolicy());
        setLicenseId(fromResource.getLicenseId());
        setLicenseType(fromResource.getLicenseType());
        setMainAttachmentSize(fromResource.getMainAttachmentSize());
        setMainAttachmentSHA256(fromResource.getMainAttachmentSHA256());
        setFeaturedWeight(fromResource.getFeaturedWeight());
        setDisplayPolicy(fromResource.getDisplayPolicy());
        setVanityURL(fromResource.getVanityURL());
        setWlpInformationVersion(fromResource.getWlpInformationVersion());
        setMavenCoordinates(fromResource.getMavenCoordinates());

        if (includeAttachmentInfo) {
            setMainAttachmentSize(fromResource.getMainAttachmentSize());
        }
        _asset.getWlpInformation().setAppliesToFilterInfo(fromResource.getAsset().getWlpInformation().getAppliesToFilterInfo());
    }
772444
def get_attachment_info(self, attachment):
        

        attachment_uid = api.get_uid(attachment)
        attachment_file = attachment.getAttachmentFile()
        attachment_type = attachment.getAttachmentType()
        attachment_icon = attachment_file.icon

        if callable(attachment_icon):
            attachment_icon = attachment_icon()

        return {
            'keywords': attachment.getAttachmentKeys(),
            'size': self.get_attachment_size(attachment),
            'name': attachment_file.filename,
            'Icon': attachment_icon,
            'type': api.get_uid(attachment_type) if attachment_type else '',
            'absolute_url': attachment.absolute_url(),
            'UID': attachment_uid,
            'report_option': attachment.getReportOption(),
            'analysis': '',
        }
90860
public void setApplicationsInfo(java.util.Collection<ApplicationInfo> applicationsInfo) {
        if (applicationsInfo == null) {
            this.applicationsInfo = null;
            return;
        }

        this.applicationsInfo = new com.amazonaws.internal.SdkInternalList<ApplicationInfo>(applicationsInfo);
    }
1370645
public void addAttachment(CmsDocumentDependency dep) {

        // don't add attachment if this is a language version of an already existing attachment
        boolean exist = false;
        for (CmsDocumentDependency att : m_attachments) {
            if (att.getAttachmentNumber() == dep.getAttachmentNumber()) {

                if (m_locale.equals(dep.getLocale())) {
                    // if dependency has same locale as main document it is added as attachment
                    // and gets the old attachment as a language-version with all previous language-versions
                    for (CmsDocumentDependency langAtt : att.getVariants()) {
                        dep.addVariant(langAtt);
                    }
                    dep.addVariant(att);
                    m_attachments.remove(att);
                } else {
                    exist = true;
                    att.addVariant(dep);
                }
                break;
            }
        }

        if (!exist) {
            dep.setType(DependencyType.attachment);
            m_attachments.add(dep);
        } else {
            dep.setType(DependencyType.variant);
        }
        addDependency(dep);
    }
362819
private void setOtherAttachments(
			RROtherProjectInfo12Document.RROtherProjectInfo12 rrOtherProjectInfo) {
        OtherAttachments otherAttachments = OtherAttachments.Factory
                .newInstance();
        otherAttachments.setOtherAttachmentArray(getAttachedFileDataTypes());
        rrOtherProjectInfo.setOtherAttachments(otherAttachments);
    }
776848
public void setDomainInfos(java.util.Collection<DomainInfo> domainInfos) {
        if (domainInfos == null) {
            this.domainInfos = null;
            return;
        }

        this.domainInfos = new java.util.ArrayList<DomainInfo>(domainInfos);
    }
654913
public void setMimeattach(String strMimeattach, String fileName, String type, String disposition, String contentID, boolean removeAfterSend) throws PageException {
	Resource file = ResourceUtil.toResourceNotExisting(pageContext, strMimeattach);
	pageContext.getConfig().getSecurityManager().checkFileLocation(file);
	if (!file.exists()) throw new ApplicationException("can't attach file " + strMimeattach + ", this file doesn't exist");

	smtp.addAttachment(file, fileName, type, disposition, contentID, removeAfterSend);

    }
1030411
public void setDeploymentsInfo(java.util.Collection<DeploymentInfo> deploymentsInfo) {
        if (deploymentsInfo == null) {
            this.deploymentsInfo = null;
            return;
        }

        this.deploymentsInfo = new com.amazonaws.internal.SdkInternalList<DeploymentInfo>(deploymentsInfo);
    }
798588
@Deprecated
    @Programmatic
    public boolean canCreateDocumentAndAttachPaperclips(
            final Object domainObject,
            final DocumentTemplate template) {
        final AttachmentAdvisor attachmentAdvisor = template.newAttachmentAdvisor(domainObject);
        return attachmentAdvisor != null;
    }
650700
@InterfaceAudience.Public
    public List<Attachment> getAttachments() {
        Map<String, Object> attachmentMetadata = getAttachmentMetadata();
        if (attachmentMetadata == null) {
            return new ArrayList<Attachment>();
        }
        List<Attachment> result = new ArrayList<Attachment>(attachmentMetadata.size());
        for (Map.Entry<String, Object> entry : attachmentMetadata.entrySet()) {
            Attachment attachment = toAttachment(entry.getKey(), entry.getValue());
            if (attachment != null) {
                result.add(attachment);
            }
        }
        return result;
    }