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.dynamic.data.mapping.kernel;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.util.ProxyFactory;
021    
022    import java.util.List;
023    
024    /**
025     * @author Rafael Praxedes
026     */
027    @ProviderType
028    public class DDMStructureLinkManagerUtil {
029    
030            public static DDMStructureLink addStructureLink(
031                    long classNameId, long classPK, long structureId) {
032    
033                    return _ddmStructureLinkManager.addStructureLink(
034                            classNameId, classPK, structureId);
035            }
036    
037            public static void deleteStructureLink(
038                            long classNameId, long classPK, long structureId)
039                    throws PortalException {
040    
041                    _ddmStructureLinkManager.deleteStructureLink(
042                            classNameId, classPK, structureId);
043            }
044    
045            public static void deleteStructureLinks(long classNameId, long classPK) {
046                    _ddmStructureLinkManager.deleteStructureLinks(classNameId, classPK);
047            }
048    
049            public static List<DDMStructureLink> getClassNameStructureLinks(
050                    long classNameId) {
051    
052                    return _ddmStructureLinkManager.getClassNameStructureLinks(classNameId);
053            }
054    
055            public static List<DDMStructureLink> getStructureLinks(
056                    long classNameId, long classPK) {
057    
058                    return _ddmStructureLinkManager.getStructureLinks(classNameId, classPK);
059            }
060    
061            private static final DDMStructureLinkManager _ddmStructureLinkManager =
062                    ProxyFactory.newServiceTrackedInstance(DDMStructureLinkManager.class);
063    
064    }