Sets the effective attachment options.

@param effectiveAttachmentOptions the effective attachment options
547825
public AbstractSheet<TRow, TColumn, TCell> setEffectiveAttachmentOptions(EnumSet<AttachmentType> effectiveAttachmentOptions) {
        this.effectiveAttachmentOptions = effectiveAttachmentOptions;
        return this;
    }
854366
private void setOtherAttachments(RROtherProjectInfo rrOtherProjectInfo) {
        OtherAttachments otherAttachments = OtherAttachments.Factory
                .newInstance();
        otherAttachments.setOtherAttachmentArray(getAttachedFileDataTypes());
        rrOtherProjectInfo.setOtherAttachments(otherAttachments);
    }
742401
func (s *UpdateDocumentInput) SetAttachments(v []*AttachmentsSource) *UpdateDocumentInput {
	s.Attachments = v
	return s
}
192810
def attachment(self, attachment):
        
        if isinstance(attachment, list):
            for a in attachment:
                self.add_attachment(a)
        else:
            self.add_attachment(attachment)
1276892
void applyAttachment() {
		if (body == null || staticLight) return;
		
		restorePosition.setToTranslation(bodyPosition);
		rotateAroundZero.setToRotationRad(bodyAngle + bodyAngleOffset);
		for (int i = 0; i < rayNum; i++) {
			tmpVec.set(startX[i], startY[i]).mul(rotateAroundZero).mul(restorePosition);
			startX[i] = tmpVec.x;
			startY[i] = tmpVec.y;
			tmpVec.set(endX[i], endY[i]).mul(rotateAroundZero).mul(restorePosition);
			endX[i] = tmpVec.x;
			endY[i] = tmpVec.y;
		}
	}
451523
private static void addAttachments(Map<String, ? extends Attachment> attachments,
                                   Map<String, Object> outMap,
                                   boolean shouldInline,
                                   int minRevPos) {
        // Use a LinkedHashMap which has "predictable iteration order" - this means that the
        // serializer will output the _attachments entries in the same order as the multipart bodies
        // Note that we have already sorted entries by their key (see below where a TreeMap is used)
        // se we only need *this* map to have an iteration order which is in the insertion order
        LinkedHashMap<String, Object> attsMap = new LinkedHashMap<String, Object>();
        outMap.put("_attachments", attsMap);

        // first sort by attachment name - this means that the
        // entries in the _attachments dictionary are in the same
        // order as the multiparts
        attachments = new TreeMap<String, Attachment>(attachments);
        for (Map.Entry<String, ? extends Attachment> att : attachments.entrySet()) {
            // we need to cast down to SavedAttachment, which we know is what the AttachmentManager gives us
            SavedAttachment savedAtt = (SavedAttachment) att.getValue();
            HashMap<String, Object> theAtt = new HashMap<String, Object>();
            try {
                // add the attachment if it's newer than the minimum revpos
                if (savedAtt.revpos > minRevPos) {
                    if (!shouldInline) {
                        theAtt.put("follows", true);
                    } else {
                        theAtt.put("follows", false);
                        // base64 encode this attachment
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        OutputStream bos = Base64OutputStreamFactory.get(baos);
                        InputStream fis = savedAtt.getInputStream();
                        try {
                            int bufSiz = 1024;
                            byte[] buf = new byte[bufSiz];
                            int n = 0;
                            do {
                                n = fis.read(buf);
                                if (n > 0) {
                                    bos.write(buf, 0, n);
                                }
                            } while (n > 0);
                            // out of paranoia, close and flush - docs don't say what you have to
                            // do to

                            // ensure all base64 is written, but close seems to do the right
                            // thing with
                            // the apache codec implementation
                            bos.flush();
                            bos.close();
                            theAtt.put("data", new String(baos.toByteArray(), "UTF-8")); //base64 of data
                        } finally {
                            IOUtils.closeQuietly(fis);
                        }
                    }
                    theAtt.put("length", savedAtt.length);
                    theAtt.put("encoded_length", savedAtt.encodedLength);
                    theAtt.put("content_type", savedAtt.type);
                    theAtt.put("revpos", savedAtt.revpos);
                    if (savedAtt.encoding != Attachment.Encoding.Plain) {
                        theAtt.put("encoding", savedAtt.encoding.toString().toLowerCase(Locale.ENGLISH));
                    }
                } else {
                    // if the revpos of the attachment is higher than the minimum, it's a stub
                    theAtt.put("stub", true);
                }
            } catch (IOException ioe) {
                // if we can't read the file containing the attachment then skip it
                // (this should only occur if someone tampered with the attachments directory
                // or something went seriously wrong)
                logger.log(Level.WARNING,String.format("Error reading attachment %s",att),ioe);
                continue;
            }
            // now we are done, add the attachment to the map
            attsMap.put(att.getKey(), theAtt);
        }
    }
177287
public function setAttachments($attachments)
    {
        $this->removeAttachments();

        if (is_array($attachments)) {
            foreach ($attachments as $attachment) {
                $this->addAttachment($attachment);
            }
        }

        return $this;
    }
836728
public void initDataManagers() {
    if (attachmentDataManager == null) {
      attachmentDataManager = new MybatisAttachmentDataManager(this);
    }
    if (byteArrayDataManager == null) {
      byteArrayDataManager = new MybatisByteArrayDataManager(this);
    }
    if (commentDataManager == null) {
      commentDataManager = new MybatisCommentDataManager(this);
    }
    if (deploymentDataManager == null) {
      deploymentDataManager = new MybatisDeploymentDataManager(this);
    }
    if (eventLogEntryDataManager == null) {
      eventLogEntryDataManager = new MybatisEventLogEntryDataManager(this);
    }
    if (eventSubscriptionDataManager == null) {
      eventSubscriptionDataManager = new MybatisEventSubscriptionDataManager(this);
    }
    if (executionDataManager == null) {
      executionDataManager = new MybatisExecutionDataManager(this);
    }
    if (historicActivityInstanceDataManager == null) {
      historicActivityInstanceDataManager = new MybatisHistoricActivityInstanceDataManager(this);
    }
    if (historicDetailDataManager == null) {
      historicDetailDataManager = new MybatisHistoricDetailDataManager(this);
    }
    if (historicIdentityLinkDataManager == null) {
      historicIdentityLinkDataManager = new MybatisHistoricIdentityLinkDataManager(this);
    }
    if (historicProcessInstanceDataManager == null) {
      historicProcessInstanceDataManager = new MybatisHistoricProcessInstanceDataManager(this);
    }
    if (historicTaskInstanceDataManager == null) {
      historicTaskInstanceDataManager = new MybatisHistoricTaskInstanceDataManager(this);
    }
    if (historicVariableInstanceDataManager == null) {
      historicVariableInstanceDataManager = new MybatisHistoricVariableInstanceDataManager(this);
    }
    if (identityLinkDataManager == null) {
      identityLinkDataManager = new MybatisIdentityLinkDataManager(this);
    }
    if (jobDataManager == null) {
      jobDataManager = new MybatisJobDataManager(this);
    }
    if (timerJobDataManager == null) {
      timerJobDataManager = new MybatisTimerJobDataManager(this);
    }
    if (suspendedJobDataManager == null) {
      suspendedJobDataManager = new MybatisSuspendedJobDataManager(this);
    }
    if (deadLetterJobDataManager == null) {
      deadLetterJobDataManager = new MybatisDeadLetterJobDataManager(this);
    }
    if (modelDataManager == null) {
      modelDataManager = new MybatisModelDataManager(this);
    }
    if (processDefinitionDataManager == null) {
      processDefinitionDataManager = new MybatisProcessDefinitionDataManager(this);
    }
    if (processDefinitionInfoDataManager == null) {
      processDefinitionInfoDataManager = new MybatisProcessDefinitionInfoDataManager(this);
    }
    if (propertyDataManager == null) {
      propertyDataManager = new MybatisPropertyDataManager(this);
    }
    if (resourceDataManager == null) {
      resourceDataManager = new MybatisResourceDataManager(this);
    }
    if (taskDataManager == null) {
      taskDataManager = new MybatisTaskDataManager(this);
    }
    if (variableInstanceDataManager == null) {
      variableInstanceDataManager = new MybatisVariableInstanceDataManager(this);
    }
  }
711489
public void setAttachmentsContent(java.util.Collection<AttachmentContent> attachmentsContent) {
        if (attachmentsContent == null) {
            this.attachmentsContent = null;
            return;
        }

        this.attachmentsContent = new com.amazonaws.internal.SdkInternalList<AttachmentContent>(attachmentsContent);
    }
455112
public void setTransitGatewayVpcAttachments(java.util.Collection<TransitGatewayVpcAttachment> transitGatewayVpcAttachments) {
        if (transitGatewayVpcAttachments == null) {
            this.transitGatewayVpcAttachments = null;
            return;
        }

        this.transitGatewayVpcAttachments = new com.amazonaws.internal.SdkInternalList<TransitGatewayVpcAttachment>(transitGatewayVpcAttachments);
    }
1046141
func (s *AddAttachmentsToSetInput) SetAttachments(v []*Attachment) *AddAttachmentsToSetInput {
	s.Attachments = v
	return s
}
306419
public void setInputAttachments(java.util.Collection<InputAttachment> inputAttachments) {
        if (inputAttachments == null) {
            this.inputAttachments = null;
            return;
        }

        this.inputAttachments = new java.util.ArrayList<InputAttachment>(inputAttachments);
    }
317772
function LocalfsStorageAttachments(options) {
  if(options.removePrefix) {
    this.prefix = options.removePrefix;
  }
  attachments.StorageProvider.call(this, options);
}
759121
func MsgOptionAttachments(attachments ...Attachment) MsgOption {
	return func(config *sendConfig) error {
		if attachments == nil {
			return nil
		}

		attachments, err := json.Marshal(attachments)
		if err == nil {
			config.values.Set("attachments", string(attachments))
		}
		return err
	}
}
697097
public void setAttachedPolicies(java.util.Collection<AttachedPolicy> attachedPolicies) {
        if (attachedPolicies == null) {
            this.attachedPolicies = null;
            return;
        }

        this.attachedPolicies = new com.amazonaws.internal.SdkInternalList<AttachedPolicy>(attachedPolicies);
    }
16884
private function setAttachments()
    {
        $attachments = $this->mailable->get('_attachments');

        if (!is_null($attachments)) {
            foreach ($attachments as $attachment) {
                if (in_array('name')) {
                    $this->message->attach(Attachment::fromPath($attachment['file'])->setFilename($attachment['name']));
                } else {
                    $this->message->attach(Attachment::fromPath($attachment['file']));
                }
            }
        }
    }
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;
    }