|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.service.BaseLocalServiceImpl
com.liferay.portlet.asset.service.base.AssetLinkLocalServiceBaseImpl
com.liferay.portlet.asset.service.impl.AssetLinkLocalServiceImpl
public class AssetLinkLocalServiceImpl
This class implements the methods needed to handle AssetLinks, the entity that relates different assets in the portal. The basic information stored for every link includes both assets entry IDs, the userId, the link type and the link's weight.
| Field Summary |
|---|
| Fields inherited from class com.liferay.portlet.asset.service.base.AssetLinkLocalServiceBaseImpl |
|---|
assetEntryFinder, assetEntryLocalService, assetEntryPersistence, assetLinkLocalService, assetLinkPersistence, counterLocalService, persistedModelLocalServiceRegistry, userFinder, userLocalService, userPersistence |
| Constructor Summary | |
|---|---|
AssetLinkLocalServiceImpl()
|
|
| Method Summary | |
|---|---|
AssetLink |
addLink(long userId,
long entryId1,
long entryId2,
int type,
int weight)
Adds a new asset link. |
void |
deleteGroupLinks(long groupId)
|
void |
deleteLink(AssetLink link)
Deletes the asset link. |
void |
deleteLink(long linkId)
Deletes the asset link. |
void |
deleteLinks(long entryId)
Deletes all links associated with the asset entry. |
void |
deleteLinks(long entryId1,
long entryId2)
Delete all links that associate the two asset entries. |
List<AssetLink> |
getDirectLinks(long entryId)
Returns all the asset links whose first entry ID is the given entry ID. |
List<AssetLink> |
getDirectLinks(long entryId,
int typeId)
Returns all the asset links of the given link type whose first entry ID is the given entry ID. |
ExportActionableDynamicQuery |
getExportActionbleDynamicQuery(PortletDataContext portletDataContext)
|
List<AssetLink> |
getLinks(long entryId)
Returns all the asset links whose first or second entry ID is the given entry ID. |
List<AssetLink> |
getLinks(long entryId,
int typeId)
Returns all the asset links of the given link type whose first or second entry ID is the given entry ID. |
List<AssetLink> |
getReverseLinks(long entryId,
int typeId)
Returns all the asset links of the given link type whose second entry ID is the given entry ID. |
AssetLink |
updateLink(long userId,
long entryId1,
long entryId2,
int typeId,
int weight)
|
void |
updateLinks(long userId,
long entryId,
long[] linkEntryIds,
int typeId)
Updates all links of the asset entry, replacing them with links associating the asset entry with the asset entries of the given link entry IDs. |
| Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl |
|---|
getClassLoader, getLocalizationMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AssetLinkLocalServiceImpl()
| Method Detail |
|---|
public AssetLink addLink(long userId,
long entryId1,
long entryId2,
int type,
int weight)
throws PortalException
userId - the primary key of the link's creatorentryId1 - the primary key of the first asset entryentryId2 - the primary key of the second asset entrytype - the link type. Acceptable values include AssetLinkConstants.TYPE_RELATED which is a bidirectional
relationship and AssetLinkConstants.TYPE_CHILD which is a
unidirectional relationship. For more information see AssetLinkConstantsweight - the weight of the relationship, allowing precedence
ordering of links
PortalExceptionpublic void deleteGroupLinks(long groupId)
public void deleteLink(AssetLink link)
link - the asset link
public void deleteLink(long linkId)
throws PortalException
linkId - the primary key of the asset link
PortalExceptionpublic void deleteLinks(long entryId)
entryId - the primary key of the asset entry
public void deleteLinks(long entryId1,
long entryId2)
entryId1 - the primary key of the first asset entryentryId2 - the primary key of the second asset entrypublic List<AssetLink> getDirectLinks(long entryId)
entryId - the primary key of the asset entry
public List<AssetLink> getDirectLinks(long entryId,
int typeId)
entryId - the primary key of the asset entrytypeId - the link type. Acceptable values include AssetLinkConstants.TYPE_RELATED which is a bidirectional
relationship and AssetLinkConstants.TYPE_CHILD which is a
unidirectional relationship. For more information see AssetLinkConstants
public ExportActionableDynamicQuery getExportActionbleDynamicQuery(PortletDataContext portletDataContext)
public List<AssetLink> getLinks(long entryId)
entryId - the primary key of the asset entry
public List<AssetLink> getLinks(long entryId,
int typeId)
entryId - the primary key of the asset entrytypeId - the link type. Acceptable values include AssetLinkConstants.TYPE_RELATED which is a bidirectional
relationship and AssetLinkConstants.TYPE_CHILD which is a
unidirectional relationship. For more information see AssetLinkConstants
public List<AssetLink> getReverseLinks(long entryId,
int typeId)
entryId - the primary key of the asset entrytypeId - the link type. Acceptable values include AssetLinkConstants.TYPE_RELATED which is a bidirectional
relationship and AssetLinkConstants.TYPE_CHILD which is a
unidirectional relationship. For more information see AssetLinkConstants
public AssetLink updateLink(long userId,
long entryId1,
long entryId2,
int typeId,
int weight)
throws PortalException
PortalException
public void updateLinks(long userId,
long entryId,
long[] linkEntryIds,
int typeId)
throws PortalException
If no link exists with a given link entry ID, a new link is created associating the current asset entry with the asset entry of that link entry ID. An existing link is deleted if either of its entry IDs is not contained in the given link entry IDs.
userId - the primary key of the user updating the linksentryId - the primary key of the asset entry to be managedlinkEntryIds - the primary keys of the asset entries to be linked
with the asset entry to be managedtypeId - the type of the asset links to be created. Acceptable
values include AssetLinkConstants.TYPE_RELATED which is a
bidirectional relationship and AssetLinkConstants.TYPE_CHILD which is a unidirectional
relationship. For more information see AssetLinkConstants
PortalException
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||