001    /**
002     * Copyright (c) 2000-2012 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.security.pacl.checker;
016    
017    import com.liferay.portal.kernel.util.StringBundler;
018    import com.liferay.portal.kernel.util.StringUtil;
019    
020    /**
021     * @author Brian Wing Shun Chan
022     */
023    public class AuthorizationProperty {
024    
025            public String getKey() {
026                    return _key;
027            }
028    
029            public String getValue() {
030                    return _value;
031            }
032    
033            public String[] getValues() {
034                    return StringUtil.split(getValue());
035            }
036    
037            public void setKey(String key) {
038                    _key = key;
039            }
040    
041            public void setValue(String value) {
042                    _value = value;
043            }
044    
045            @Override
046            public String toString() {
047                    StringBundler sb = new StringBundler(5);
048    
049                    sb.append("{key=");
050                    sb.append(_key);
051                    sb.append(", value=");
052                    sb.append(_value);
053                    sb.append("}");
054    
055                    return sb.toString();
056            }
057    
058            private String _key;
059            private String _value;
060    
061    }