001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (C) Alkacon Software (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.gwt.shared.alias;
029
030import com.google.gwt.user.client.rpc.IsSerializable;
031
032/**
033 * A bean representing the result of trying to import a single alias.<p>
034 */
035public class CmsAliasImportResult implements IsSerializable {
036
037    /** The alias path. */
038    private String m_aliasPath;
039
040    /** The line containing the data for the alias. */
041    private String m_line;
042
043    /** The message from importing the alias. */
044    private String m_message;
045
046    /** The alias mode. */
047    private CmsAliasMode m_mode;
048
049    /** The import status. */
050    private CmsAliasImportStatus m_status;
051
052    /** The alias target path. */
053    private String m_targetPath;
054
055    /**
056     * Creates a new instance.<p>
057     *
058     * @param status the import status
059     * @param message the import message
060     * @param aliasPath the alias path
061     * @param targetPath the target path
062     * @param mode the alias mode
063     */
064    public CmsAliasImportResult(
065        CmsAliasImportStatus status,
066        String message,
067        String aliasPath,
068        String targetPath,
069        CmsAliasMode mode) {
070
071        m_message = message;
072        m_status = status;
073        m_aliasPath = aliasPath;
074        m_targetPath = targetPath;
075        m_mode = mode;
076    }
077
078    /**
079     * Creates a new instance.<p>
080     *
081     * @param line the line containing the alias data
082     * @param status the import status
083     * @param message the import message
084     */
085    public CmsAliasImportResult(String line, CmsAliasImportStatus status, String message) {
086
087        m_line = line;
088        m_status = status;
089        m_message = message;
090    }
091
092    /**
093     * Default constructor used for serialization.<p>
094     */
095    protected CmsAliasImportResult() {
096
097        // do nothing
098    }
099
100    /**
101     * Gets the alias path.<p>
102     *
103     * @return the alias path
104     */
105    public String getAliasPath() {
106
107        return m_aliasPath;
108    }
109
110    /**
111     * Gets the line containing the alias data.<p>
112     *
113     * @return the line containing the alias data
114     */
115    public String getLine() {
116
117        return m_line;
118    }
119
120    /**
121     * Gets the import message.<p>
122     *
123     * @return the import message
124     */
125    public String getMessage() {
126
127        return m_message;
128    }
129
130    /**
131     * Gets the alias mode.<p>
132     *
133     * @return the alias mode
134     */
135    public CmsAliasMode getMode() {
136
137        return m_mode;
138    }
139
140    /**
141     * Gets the status.<p>
142     *
143     * @return the status
144     */
145    public CmsAliasImportStatus getStatus() {
146
147        return m_status;
148    }
149
150    /**
151     * Gets the alias target path.<p>
152     *
153     * @return the alias target path
154     */
155    public String getTargetPath() {
156
157        return m_targetPath;
158    }
159
160    /**
161     * Sets the line containing the alias data.<p>
162     *
163     * @param line the line containing the alias data
164     */
165    public void setLine(String line) {
166
167        m_line = line;
168    }
169
170}