Lines Matching refs:subject

43  * <tr><td><i>subject</i></td> <td>SHOULD</td><td>SHOULD NOT</td><td>SHOULD NOT</td><td>SHOULD NOT</td><td>SHOULD NOT</td></tr>
110 * Returns the default subject of the message, or null if the subject has not been set.
111 * The subject is a short description of message contents.
113 * The default subject of a message is the subject that corresponds to the message's language.
117 * @return the subject of the message.
124 * Returns the subject corresponding to the language. If the language is null, the method result
126 * a corresponding subject.
128 * @param language the language of the subject to return.
129 * @return the subject related to the passed in language.
132 Subject subject = getMessageSubject(language);
133 return subject == null ? null : subject.subject;
138 for (Subject subject : subjects) {
139 if (language.equals(subject.language)) {
140 return subject;
147 * Returns a set of all subjects in this Message, including the default message subject accessible
157 * Sets the subject of the message. The subject is a short description of
160 * @param subject the subject of the message.
162 public void setSubject(String subject) {
163 if (subject == null) {
167 addSubject(null, subject);
171 * Adds a subject with a corresponding language.
173 * @param language the language of the subject being added.
174 * @param subject the subject being added to the message.
176 * @throws NullPointerException if the subject is null, a null pointer exception is thrown
178 public Subject addSubject(String language, String subject) {
180 Subject messageSubject = new Subject(language, subject);
186 * Removes the subject with the given language from the message.
188 * @param language the language of the subject which is to be removed
189 * @return true if a subject was removed and false if it was not.
193 for (Subject subject : subjects) {
194 if (language.equals(subject.language)) {
195 return subjects.remove(subject);
202 * Removes the subject from the message and returns true if the subject was removed.
204 * @param subject the subject being removed from the message.
205 * @return true if the subject was successfully removed and false if it was not.
207 public boolean removeSubject(Subject subject) {
208 return subjects.remove(subject);
212 * Returns all the languages being used for the subjects, not including the default subject.
219 for (Subject subject : subjects) {
220 if (!subject.equals(defaultSubject)) {
221 languages.add(subject.language);
429 // Add the subject in the default language
432 buf.append("<subject>").append(StringUtils.escapeForXML(defaultSubject.subject)).append("</subject>");
434 // Add the subject in other languages
435 for (Subject subject : getSubjects()) {
437 if(subject.equals(defaultSubject))
439 buf.append("<subject xml:lang=\"").append(subject.language).append("\">");
440 buf.append(StringUtils.escapeForXML(subject.subject));
441 buf.append("</subject>");
508 * Represents a message subject, its language and the content of the subject.
512 private String subject;
515 private Subject(String language, String subject) {
519 if (subject == null) {
523 this.subject = subject;
527 * Returns the language of this message subject.
529 * @return the language of this message subject.
536 * Returns the subject content.
538 * @return the content of the subject.
541 return subject;
549 result = prime * result + this.subject.hashCode();
564 // simplified comparison because language and subject are always set
565 return this.language.equals(other.language) && this.subject.equals(other.subject);