1
14
15 package com.liferay.portlet.asset.model.impl;
16
17 import com.liferay.portal.kernel.exception.SystemException;
18 import com.liferay.portal.kernel.util.ListUtil;
19 import com.liferay.portal.kernel.util.StringUtil;
20 import com.liferay.portlet.asset.model.AssetCategory;
21 import com.liferay.portlet.asset.model.AssetEntry;
22 import com.liferay.portlet.asset.model.AssetTag;
23 import com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil;
24 import com.liferay.portlet.asset.service.AssetTagLocalServiceUtil;
25
26 import java.util.List;
27
28
33 public class AssetEntryImpl extends AssetEntryModelImpl implements AssetEntry {
34
35 public AssetEntryImpl() {
36 }
37
38 public List<AssetCategory> getCategories() throws SystemException {
39 return AssetCategoryLocalServiceUtil.getEntryCategories(getEntryId());
40 }
41
42 public long[] getCategoryIds() throws SystemException {
43 return StringUtil.split(
44 ListUtil.toString(getCategories(), "categoryId"), 0L);
45 }
46
47 public String[] getTagNames() throws SystemException {
48 return StringUtil.split(ListUtil.toString(getTags(), "name"));
49 }
50
51 public List<AssetTag> getTags() throws SystemException {
52 return AssetTagLocalServiceUtil.getEntryTags(getEntryId());
53 }
54
55 }