Set subject and plain body as forcedly-direct. <br>
It ignores body file settings. (conversely can keep them)
@param subject The subject to be sent plainly. (NotNull)
@param plainBody The plain body to be sent plainly. (NotNull)
763758
public void forcedlyDirect(String subject, String plainBody) {
        postcard.useDirectBody(plainBody).useWholeFixedText().forcedlyDirect(subject);
    }
296407
@SuppressWarnings("unchecked")
   public <T> void register(String subjectName, SubjectObserver<T> subjectObserver)
   {
      Subject<?> subject = (Subject<?>)this.registry.get(subjectName);
      
      if(subject == null)
         subject = new Topic<T>();
      
      register(subjectName, subjectObserver, (Subject<T>)subject);
      
   }
337320
public function setSubject($subject)
    {
        if ($subject === '') {
            throw new \InvalidArgumentException('$subject must not be empty.', 1331488802);
        }

        if ((strpos($subject, CR) !== false) || (strpos($subject, LF) !== false)) {
            throw new \InvalidArgumentException(
                '$subject must not contain any line breaks or carriage returns.',
                1331488817
            );
        }

        $this->setAsString('subject', $subject);
    }
842818
@Override
	public void setObject(Serializable object) throws JMSException
    {
    	if (bodyIsReadOnly)
    		throw new MessageNotWriteableException("Message body is read-only");
    	
    	assertDeserializationLevel(MessageSerializationLevel.FULL);
    	
        if (object == null)
        {
            body = null;
            return;
        }
        
        try
        {
        	body = SerializationTools.toByteArray(object);
        }
        catch (Exception e)
        {
        	throw new FFMQException("Cannot serialize object message body","MESSAGE_ERROR",e);
        }
    }
999139
public function setSubject($subject)
    {
        if (!is_string($subject)) {
            throw new TypeException('$subject must be of type string.');
        }
        if (!($subject instanceof Subject)) {
            $this->subject = new Subject($subject);
        } else {
            $this->subject = $subject;
        }
    }
399093
public void setBodyXSLT(String bodyXslt) {
        addField(ConfigureNodeFields.body_xslt, FormField.Type.text_single);
        setAnswer(ConfigureNodeFields.body_xslt.getFieldName(), bodyXslt);
    }
781658
public static Predicate<MailMessage> forSubjectAndBody(final Pattern subjectPattern, final Pattern bodyPattern) {
		return new Predicate<MailMessage>() {
			@Override
			public boolean apply(final MailMessage input) {
				boolean result = subjectPattern.matcher(input.getSubject()).matches();
				return result && bodyPattern.matcher(input.getText()).matches();
			}

			@Override
			public String toString() {
				return String.format("subject to match pattern '%s' and body to match pattern '%s'",
						subjectPattern, bodyPattern);
			}
		};
	}
691135
public static void setEntity(HttpConnection connnection, String body, String contentType) {
        connnection.requestProperties.put("Content-type", contentType);
        connnection.setRequestBody(body);
    }
457410
def _put_subject(self, subject_id, body):
        
        assert isinstance(body, (dict)), "PUT requires body to be dict."

        # subject_id could be a path such as '/asset/123' so quote
        uri = self._get_subject_uri(guid=subject_id)
        return self.service._put(uri, body)
909502
private boolean setUnauthenticatedSubjectIfNeeded(Subject invokedSubject, Subject receivedSubject) {
        if ((invokedSubject == null) && (receivedSubject == null)) {
            // create the unauthenticated subject and set as the invocation subject
            subjectManager.setInvocationSubject(unauthenticatedSubjectServiceRef.getService().getUnauthenticatedSubject());
            return true;
        }
        return false;
    }
380514
@Override
	public void setSubject(String subject, java.util.Locale locale) {
		_commerceNotificationTemplate.setSubject(subject, locale);
	}
679192
function setup(subject) {
        context.subject = subject;
        context.subjectType = null;
        context.subjectConstructor = null;
        context.isSet = false;
    }
734243
public function send(string $subject, string $message): void
    {
        $this->getMailer()
            ->send(
                $this->getMessage($subject, $message)
            )
        ;
    }
121692
public function sendResponseBody(ResponseInterface $response):void
    {
        if (($body = $response->getBody()->detach()) === null) {
            $body = $response->getBody()->__toString();
        }
        $this->sendBody($body);
    }
1238419
public boolean addSubject(String subject) {
        try {
            return add(new Meta(Element.SUBJECT, subject));
		} catch (DocumentException de) {
            throw new ExceptionConverter(de);
        }
    }
982021
@Override
    public void setBody(String body) {
        super.setBody(body);
        this.jsonValue = JsonValue.readFrom(body);
    }
428975
private void addRolesToSubject(Subject subject, Set<String> userRoles) {
        if (userRoles == null) {
            userRoles = Collections.emptySet();
        }

        Map<String, Set<String>> attributes =
                SubjectUtils.getAttributes(subject);

        Set<String> roles = attributes.get(ROLE_KEY);
        if (roles == null) {
            roles = new HashSet<String>(userRoles);
            attributes.put(ROLE_KEY, roles);
        } else {
            roles.addAll(userRoles);
        }
        if (logger.isDebugEnabled()) {
            for (String role : userRoles) {
                logger.debug("added role: {}", role);
            }
        }
    }