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