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.portlet.exportimport.configuration;
016    
017    import com.liferay.portal.kernel.util.StringPool;
018    
019    /**
020     * @author Daniel Kocsis
021     * @author Akos Thurzo
022     */
023    public class ExportImportConfigurationConstants {
024    
025            public static final int TYPE_EXPORT_LAYOUT = 0;
026    
027            public static final String TYPE_EXPORT_LAYOUT_LABEL = "export-layout";
028    
029            public static final int TYPE_EXPORT_PORTLET = 5;
030    
031            public static final String TYPE_EXPORT_PORTLET_LABEL = "export-portlet";
032    
033            public static final int TYPE_IMPORT_LAYOUT = 6;
034    
035            public static final String TYPE_IMPORT_LAYOUT_LABEL = "import-layout";
036    
037            public static final int TYPE_IMPORT_PORTLET = 7;
038    
039            public static final String TYPE_IMPORT_PORTLET_LABEL = "import-portlet";
040    
041            public static final int TYPE_PUBLISH_LAYOUT_LOCAL = 1;
042    
043            public static final String TYPE_PUBLISH_LAYOUT_LOCAL_LABEL =
044                    "publish-layout-local";
045    
046            public static final int TYPE_PUBLISH_LAYOUT_REMOTE = 2;
047    
048            public static final String TYPE_PUBLISH_LAYOUT_REMOTE_LABEL =
049                    "publish-layout-remote";
050    
051            public static final int TYPE_PUBLISH_PORTLET = 8;
052    
053            public static final String TYPE_PUBLISH_PORTLET_LABEL = "publish-portlet";
054    
055            public static final int TYPE_SCHEDULED_PUBLISH_LAYOUT_LOCAL = 3;
056    
057            public static final String TYPE_SCHEDULED_PUBLISH_LAYOUT_LOCAL_LABEL =
058                    "scheduled-publish-layout-local";
059    
060            public static final int TYPE_SCHEDULED_PUBLISH_LAYOUT_REMOTE = 4;
061    
062            public static final String TYPE_SCHEDULED_PUBLISH_LAYOUT_REMOTE_LABEL =
063                    "scheduled-publish-layout-remote";
064    
065            public static String getTypeLabel(int type) {
066                    if (type == TYPE_EXPORT_LAYOUT) {
067                            return TYPE_EXPORT_LAYOUT_LABEL;
068                    }
069                    else if (type == TYPE_EXPORT_PORTLET) {
070                            return TYPE_EXPORT_PORTLET_LABEL;
071                    }
072                    else if (type == TYPE_IMPORT_LAYOUT) {
073                            return TYPE_IMPORT_LAYOUT_LABEL;
074                    }
075                    else if (type == TYPE_IMPORT_PORTLET) {
076                            return TYPE_IMPORT_PORTLET_LABEL;
077                    }
078                    else if (type == TYPE_PUBLISH_LAYOUT_LOCAL) {
079                            return TYPE_PUBLISH_LAYOUT_LOCAL_LABEL;
080                    }
081                    else if (type == TYPE_PUBLISH_LAYOUT_REMOTE) {
082                            return TYPE_PUBLISH_LAYOUT_REMOTE_LABEL;
083                    }
084                    else if (type == TYPE_PUBLISH_PORTLET) {
085                            return TYPE_PUBLISH_PORTLET_LABEL;
086                    }
087                    else if (type == TYPE_SCHEDULED_PUBLISH_LAYOUT_LOCAL) {
088                            return TYPE_SCHEDULED_PUBLISH_LAYOUT_LOCAL_LABEL;
089                    }
090                    else if (type == TYPE_SCHEDULED_PUBLISH_LAYOUT_REMOTE) {
091                            return TYPE_SCHEDULED_PUBLISH_LAYOUT_REMOTE_LABEL;
092                    }
093                    else {
094                            return StringPool.BLANK;
095                    }
096            }
097    
098    }