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.asset.social;
016    
017    import com.liferay.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.social.BaseSocialActivityManager;
019    import com.liferay.portal.kernel.social.SocialActivityManager;
020    import com.liferay.portal.kernel.spring.osgi.OSGiBeanProperties;
021    import com.liferay.portlet.asset.model.AssetEntry;
022    import com.liferay.portlet.social.service.SocialActivityLocalService;
023    
024    /**
025     * @author Adolfo P??rez
026     */
027    @OSGiBeanProperties(
028            property = "model.class.name=com.liferay.portlet.asset.model.AssetEntry",
029            service = SocialActivityManager.class
030    )
031    public class AssetEntrySocialActivityManager
032            extends BaseSocialActivityManager<AssetEntry> {
033    
034            @Override
035            protected String getClassName(AssetEntry assetEntry) {
036                    return assetEntry.getClassName();
037            }
038    
039            @Override
040            protected long getPrimaryKey(AssetEntry assetEntry) {
041                    return assetEntry.getClassPK();
042            }
043    
044            @Override
045            protected SocialActivityLocalService getSocialActivityLocalService() {
046                    return socialActivityLocalService;
047            }
048    
049            @BeanReference(type = SocialActivityLocalService.class)
050            protected SocialActivityLocalService socialActivityLocalService;
051    
052    }