TextNotificationMessageTemplateElement.java revision 553c85ed2f0d3e07e4dc3433fa6cab045bc0022d
0N/A/*
3909N/A * CDDL HEADER START
0N/A *
0N/A * The contents of this file are subject to the terms of the
0N/A * Common Development and Distribution License, Version 1.0 only
0N/A * (the "License"). You may not use this file except in compliance
2362N/A * with the License.
0N/A *
2362N/A * You can obtain a copy of the license at
0N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/A * See the License for the specific language governing permissions
0N/A * and limitations under the License.
0N/A *
0N/A * When distributing Covered Code, include this CDDL HEADER in each
0N/A * file and include the License file at
0N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/A * add the following below this CDDL HEADER, with the fields enclosed
0N/A * by brackets "[]" replaced with your own identifying information:
0N/A * Portions Copyright [yyyy] [name of copyright owner]
2362N/A *
2362N/A * CDDL HEADER END
2362N/A *
0N/A *
0N/A * Portions Copyright 2007 Sun Microsystems, Inc.
4632N/A */
0N/Apackage org.opends.server.extensions;
0N/A
0N/A
0N/A
0N/Aimport org.opends.messages.MessageBuilder;
0N/Aimport org.opends.server.types.AccountStatusNotification;
0N/A
0N/A
0N/A
0N/A/**
0N/A * This class implements a notification message template element that will
0N/A * generate a value using static text.
0N/A */
0N/Apublic class TextNotificationMessageTemplateElement
0N/A extends NotificationMessageTemplateElement
0N/A{
4632N/A // The static text associated with this element.
0N/A private final String text;
0N/A
0N/A
0N/A
0N/A /**
0N/A * Creates a new text notification message template element from the provided
0N/A * string.
0N/A *
0N/A * @param text The string to use as the text for this element.
0N/A */
0N/A public TextNotificationMessageTemplateElement(String text)
0N/A {
0N/A this.text = text;
0N/A }
0N/A
0N/A
0N/A
0N/A /**
4632N/A * {@inheritDoc}
4632N/A */
4632N/A public void generateValue(MessageBuilder buffer,
4632N/A AccountStatusNotification notification)
4632N/A {
4632N/A buffer.append(text);
4632N/A }
4632N/A}
4632N/A
4632N/A