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.social.util;
016    
017    import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018    
019    import java.util.List;
020    
021    /**
022     * @author Adolfo P??rez
023     */
024    public class SocialRelationTypesUtil {
025    
026            public static List<Integer> getAllSocialRelationTypes() {
027                    return getSocialRelationTypes().getAllSocialRelationTypes();
028            }
029    
030            public static SocialRelationTypes getSocialRelationTypes() {
031                    PortalRuntimePermission.checkGetBeanProperty(
032                            SocialRelationTypesUtil.class);
033    
034                    return _socialRelationTypes;
035            }
036    
037            public static String getTypeLabel(int type) {
038                    return getSocialRelationTypes().getTypeLabel(type);
039            }
040    
041            public static boolean isTypeBi(int type) {
042                    return getSocialRelationTypes().isTypeBi(type);
043            }
044    
045            public static boolean isTypeUni(int type) {
046                    return getSocialRelationTypes().isTypeUni(type);
047            }
048    
049            public void setSocialRelationTypes(
050                    SocialRelationTypes socialRelationTypes) {
051    
052                    PortalRuntimePermission.checkSetBeanProperty(SocialRelationTypes.class);
053    
054                    _socialRelationTypes = socialRelationTypes;
055            }
056    
057            private static SocialRelationTypes _socialRelationTypes;
058    
059    }