001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.lar.exportimportconfiguration;
016    
017    import com.liferay.portal.kernel.util.StringPool;
018    
019    /**
020     * @author Daniel Kocsis
021     */
022    public class ExportImportConfigurationConstants {
023    
024            public static final int TYPE_EXPORT_LAYOUT = 0;
025    
026            public static final String TYPE_EXPORT_LAYOUT_LABEL = "export-layout";
027    
028            public static final int TYPE_PUBLISH_LAYOUT_LOCAL = 1;
029    
030            public static final String TYPE_PUBLISH_LAYOUT_LOCAL_LABEL =
031                    "publish-layout-local";
032    
033            public static final int TYPE_PUBLISH_LAYOUT_REMOTE = 2;
034    
035            public static final String TYPE_PUBLISH_LAYOUT_REMOTE_LABEL =
036                    "publish-layout-remote";
037    
038            public static final int TYPE_SCHEDULED_PUBLISH_LAYOUT_LOCAL = 3;
039    
040            public static final String TYPE_SCHEDULED_PUBLISH_LAYOUT_LOCAL_LABEL =
041                    "scheduled-publish-layout-local";
042    
043            public static final int TYPE_SCHEDULED_PUBLISH_LAYOUT_REMOTE = 4;
044    
045            public static final String TYPE_SCHEDULED_PUBLISH_LAYOUT_REMOTE_LABEL =
046                    "scheduled-publish-layout-remote";
047    
048            public static String getTypeLabel(int type) {
049                    if (type == TYPE_EXPORT_LAYOUT) {
050                            return TYPE_EXPORT_LAYOUT_LABEL;
051                    }
052                    else if (type == TYPE_PUBLISH_LAYOUT_LOCAL) {
053                            return TYPE_PUBLISH_LAYOUT_LOCAL_LABEL;
054                    }
055                    else if (type == TYPE_PUBLISH_LAYOUT_REMOTE) {
056                            return TYPE_PUBLISH_LAYOUT_REMOTE_LABEL;
057                    }
058                    else if (type == TYPE_SCHEDULED_PUBLISH_LAYOUT_LOCAL) {
059                            return TYPE_SCHEDULED_PUBLISH_LAYOUT_LOCAL_LABEL;
060                    }
061                    else if (type == TYPE_SCHEDULED_PUBLISH_LAYOUT_REMOTE) {
062                            return TYPE_SCHEDULED_PUBLISH_LAYOUT_REMOTE_LABEL;
063                    }
064                    else {
065                            return StringPool.BLANK;
066                    }
067            }
068    
069    }