I've created a custom asset and can see the type listed in the configuration of the asset publisher. Here is the code I'm using to actually add the asset:
1
2
3 AssetEntry assetEntry = AssetEntryLocalServiceUtil.createAssetEntry(fp.getFundSystemId());
4
5 assetEntry.setClassPK(fp.getFundSystemId());
6 assetEntry.setClassNameId(PortalUtil.getClassNameId(FundSettings.class.getName()));
7 assetEntry.setDescription(fp.getShortDescription());
8 assetEntry.setVisible(fp.isEnabled());
9 assetEntry.setUserId(uid);
10 assetEntry.setTitle(fp.getTitle());
11 assetEntry.setSummary(fp.getShortDescription());
12 assetEntry.setUserId(fp.getUserId());
13 assetEntry.setCompanyId(fp.getCompanyId());
14 assetEntry.setGroupId(fp.getGroupId());
15 assetEntry.setEntryId(fp.getFundSystemId());
16 assetEntry.setMimeType("text/html");
17 assetEntry.setNew(true);
18 assetEntry.setPrimaryKey(fp.getFundSystemId());
19 assetEntry.setUserName(u.getScreenName());
20 assetEntry.setUserUuid(u.getUserUuid());
21 assetEntry.setVisible(fp.isEnabled());
22
23 AssetEntryLocalServiceUtil.addAssetEntry(assetEntry);
When this is ran I can see the entry in the AssetEntry table in the database. Here is what I see (the items in bold came across without a value):
entryId groupId companyId userId userName createDate modifiedDate classNameId classPK
classUuid visible startDate endDate publishDate expirationDate mimeType
title description summary url height width priority viewCount classTypeId
layoutUuid1354239 10148 10131 66108 Brian Schupbach 2013-02-26 14:41:34.993 2013-02-26 14:41:34.993 1353995 8703 1 NULL NULL NULL NULL 0 0 0 0 0
Can anyone see what I'm doing wrong? I'm stuck..
Please sign in to flag this as inappropriate.