001/* 002 * jDTAUS Core Messages 003 * Copyright (C) 2005 Christian Schulte 004 * <cs@schulte.it> 005 * 006 * This library is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 2.1 of the License, or any later version. 010 * 011 * This library is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public 017 * License along with this library; if not, write to the Free Software 018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 019 * 020 */ 021package org.jdtaus.core.messages; 022 023import java.util.Locale; 024import org.jdtaus.core.container.ContainerFactory; 025import org.jdtaus.core.text.Message; 026 027/** 028 * {@code Message} stating that no value was specified for a mandatory property. 029 * 030 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 031 * @version $JDTAUS: MandatoryPropertyMessage.java 8641 2012-09-27 06:45:17Z schulte $ 032 */ 033public final class MandatoryPropertyMessage extends Message 034{ 035 //--Contstants-------------------------------------------------------------- 036 037 /** Serial version UID for backwards compatibility with 1.0.x classes. */ 038 private static final long serialVersionUID = 2271494962184007236L; 039 040 //---------------------------------------------------------------Constants-- 041 //--Message----------------------------------------------------------------- 042 043 /** Empty array. */ 044 private static final Object[] ARGUMENTS = 045 { 046 }; 047 048 /** 049 * {@inheritDoc} 050 * 051 * @return an empty array, since the message has no arguments. 052 */ 053 public Object[] getFormatArguments( final Locale locale ) 054 { 055 return ARGUMENTS; 056 } 057 058 /** 059 * {@inheritDoc} 060 * 061 * @return The corresponding text from the message's {@code ResourceBundle}: 062 * <blockquote><pre> 063 * Missing information. 064 * </pre></blockquote> 065 */ 066 public String getText( final Locale locale ) 067 { 068 return this.getMandatoryPropertyMessage( locale ); 069 } 070 071 //-----------------------------------------------------------------Message-- 072 //--Messages---------------------------------------------------------------- 073 074// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausMessages 075 // This section is managed by jdtaus-container-mojo. 076 077 /** 078 * Gets the text of message <code>mandatoryProperty</code>. 079 * <blockquote><pre>Fehlende Angaben.</pre></blockquote> 080 * <blockquote><pre>Missing information.</pre></blockquote> 081 * 082 * @param locale The locale of the message instance to return. 083 * 084 * @return Information about a mandatory property. 085 */ 086 private String getMandatoryPropertyMessage( final Locale locale ) 087 { 088 return ContainerFactory.getContainer(). 089 getMessage( this, "mandatoryProperty", locale, null ); 090 091 } 092 093// </editor-fold>//GEN-END:jdtausMessages 094 095 //----------------------------------------------------------------Messages-- 096}