001/*
002 *  Copyright 2018 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.plugins.contenttypeseditor.edition;
017
018import java.util.Map;
019
020/**
021 * Object representation of an i18n catalog
022 */
023public class I18nCatalog
024{
025
026    /** The last modification of i18n catalog */
027    private long _lastModified;
028
029    /** i18n messages with pair of i18n key/message */
030    private Map<String, String> _i18nMessages;
031
032    /**
033     * Construct a I18nCatalog
034     * 
035     * @param i18nMessages i18n messages
036     */
037    public I18nCatalog(Map<String, String> i18nMessages)
038    {
039        this._i18nMessages = i18nMessages;
040        this._lastModified = -1;
041    }
042
043    /**
044     * Get i18n messages
045     * 
046     * @return i18n messages
047     */
048    public Map<String, String> getI18nMessages()
049    {
050        return this._i18nMessages;
051    }
052
053    /**
054     * Get the last modification of i18n catalog
055     * 
056     * @return The last modification
057     */
058    public long getLastModified()
059    {
060        return this._lastModified;
061    }
062
063    /**
064     * Set the last modification of i18n catalog
065     * 
066     * @param lastModified The new last modification of i18n catalog
067     */
068    public void setLastModified(long lastModified)
069    {
070        this._lastModified = lastModified;
071    }
072
073    /**
074     * Set i18n messages
075     * 
076     * @param i18nMessages New i18n messages
077     */
078    public void setI18nMessages(Map<String, String> i18nMessages)
079    {
080        this._i18nMessages = i18nMessages;
081    }
082}