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.exception;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     * @author Sergio Gonz??lez
022     */
023    public class LayoutFriendlyURLException extends PortalException {
024    
025            public static final int ADJACENT_SLASHES = 4;
026    
027            public static final int DOES_NOT_START_WITH_SLASH = 1;
028    
029            public static final int DUPLICATE = 6;
030    
031            public static final int ENDS_WITH_SLASH = 2;
032    
033            public static final int INVALID_CHARACTERS = 5;
034    
035            public static final int KEYWORD_CONFLICT = 7;
036    
037            public static final int POSSIBLE_DUPLICATE = 8;
038    
039            public static final int TOO_DEEP = 9;
040    
041            public static final int TOO_LONG = 10;
042    
043            public static final int TOO_SHORT = 3;
044    
045            public LayoutFriendlyURLException(int type) {
046                    _type = type;
047            }
048    
049            public String getDuplicateClassName() {
050                    return _duplicateClassName;
051            }
052    
053            public long getDuplicateClassPK() {
054                    return _duplicateClassPK;
055            }
056    
057            public String getKeywordConflict() {
058                    return _keywordConflict;
059            }
060    
061            public int getType() {
062                    return _type;
063            }
064    
065            public void setDuplicateClassName(String duplicateClassName) {
066                    _duplicateClassName = duplicateClassName;
067            }
068    
069            public void setDuplicateClassPK(long duplicateClassPK) {
070                    _duplicateClassPK = duplicateClassPK;
071            }
072    
073            public void setKeywordConflict(String keywordConflict) {
074                    _keywordConflict = keywordConflict;
075            }
076    
077            private String _duplicateClassName;
078            private long _duplicateClassPK;
079            private String _keywordConflict;
080            private final int _type;
081    
082    }