public class AssetLinkLocalServiceImpl extends AssetLinkLocalServiceBaseImpl
assetEntryFinder, assetEntryLocalService, assetEntryPersistence, assetLinkLocalService, assetLinkPersistence, counterLocalService, persistedModelLocalServiceRegistry, systemEventLocalService, systemEventPersistence, userFinder, userLocalService, userPersistence
Constructor and Description |
---|
AssetLinkLocalServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addDeletionSystemEvent(com.liferay.asset.kernel.model.AssetLink assetLink) |
com.liferay.asset.kernel.model.AssetLink |
addLink(long userId,
long entryId1,
long entryId2,
int type,
int weight)
Adds a new asset link.
|
com.liferay.asset.kernel.model.AssetLink |
deleteAssetLink(com.liferay.asset.kernel.model.AssetLink assetLink)
Deletes the asset link from the database.
|
com.liferay.asset.kernel.model.AssetLink |
deleteAssetLink(long linkId)
Deletes the asset link with the primary key from the database.
|
void |
deleteGroupLinks(long groupId) |
void |
deleteLink(com.liferay.asset.kernel.model.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.
|
protected List<com.liferay.asset.kernel.model.AssetLink> |
filterAssetLinks(List<com.liferay.asset.kernel.model.AssetLink> assetLinks,
boolean excludeInvisibleLinks) |
List<com.liferay.asset.kernel.model.AssetLink> |
getDirectLinks(long entryId)
Returns all the asset links whose first entry ID is the given entry ID.
|
List<com.liferay.asset.kernel.model.AssetLink> |
getDirectLinks(long entryId,
boolean excludeInvisibleLinks) |
List<com.liferay.asset.kernel.model.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.
|
List<com.liferay.asset.kernel.model.AssetLink> |
getDirectLinks(long entryId,
int typeId,
boolean excludeInvisibleLinks) |
com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery |
getExportActionbleDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) |
List<com.liferay.asset.kernel.model.AssetLink> |
getLinks(long entryId)
Returns all the asset links whose first or second entry ID is the given
entry ID.
|
List<com.liferay.asset.kernel.model.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<com.liferay.asset.kernel.model.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.
|
com.liferay.asset.kernel.model.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.
|
addAssetLink, afterPropertiesSet, createAssetLink, deletePersistedModel, destroy, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchAssetLink, getActionableDynamicQuery, getAssetEntryFinder, getAssetEntryLocalService, getAssetEntryPersistence, getAssetLink, getAssetLinkLocalService, getAssetLinkPersistence, getAssetLinks, getAssetLinksCount, getCounterLocalService, getIndexableActionableDynamicQuery, getModelClass, getModelClassName, getOSGiServiceIdentifier, getPersistedModel, getSystemEventLocalService, getSystemEventPersistence, getUserFinder, getUserLocalService, getUserPersistence, initActionableDynamicQuery, runSQL, setAssetEntryFinder, setAssetEntryLocalService, setAssetEntryPersistence, setAssetLinkLocalService, setAssetLinkPersistence, setCounterLocalService, setSystemEventLocalService, setSystemEventPersistence, setUserFinder, setUserLocalService, setUserPersistence, updateAssetLink
public com.liferay.asset.kernel.model.AssetLink addLink(long userId, long entryId1, long entryId2, int type, int weight) throws com.liferay.portal.kernel.exception.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 AssetLinkConstants
weight
- the weight of the relationship, allowing precedence
ordering of linkscom.liferay.portal.kernel.exception.PortalException
public com.liferay.asset.kernel.model.AssetLink deleteAssetLink(com.liferay.asset.kernel.model.AssetLink assetLink)
AssetLinkLocalServiceBaseImpl
deleteAssetLink
in interface com.liferay.asset.kernel.service.AssetLinkLocalService
deleteAssetLink
in class AssetLinkLocalServiceBaseImpl
assetLink
- the asset linkpublic com.liferay.asset.kernel.model.AssetLink deleteAssetLink(long linkId) throws com.liferay.portal.kernel.exception.PortalException
AssetLinkLocalServiceBaseImpl
deleteAssetLink
in interface com.liferay.asset.kernel.service.AssetLinkLocalService
deleteAssetLink
in class AssetLinkLocalServiceBaseImpl
linkId
- the primary key of the asset linkcom.liferay.portal.kernel.exception.PortalException
- if a asset link with the primary key could not be foundpublic void deleteGroupLinks(long groupId)
public void deleteLink(com.liferay.asset.kernel.model.AssetLink link)
link
- the asset linkpublic void deleteLink(long linkId) throws com.liferay.portal.kernel.exception.PortalException
linkId
- the primary key of the asset linkcom.liferay.portal.kernel.exception.PortalException
public void deleteLinks(long entryId)
entryId
- the primary key of the asset entrypublic void deleteLinks(long entryId1, long entryId2)
entryId1
- the primary key of the first asset entryentryId2
- the primary key of the second asset entrypublic List<com.liferay.asset.kernel.model.AssetLink> getDirectLinks(long entryId)
entryId
- the primary key of the asset entrypublic List<com.liferay.asset.kernel.model.AssetLink> getDirectLinks(long entryId, boolean excludeInvisibleLinks)
public List<com.liferay.asset.kernel.model.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 List<com.liferay.asset.kernel.model.AssetLink> getDirectLinks(long entryId, int typeId, boolean excludeInvisibleLinks)
public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionbleDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
public List<com.liferay.asset.kernel.model.AssetLink> getLinks(long entryId)
entryId
- the primary key of the asset entrypublic List<com.liferay.asset.kernel.model.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<com.liferay.asset.kernel.model.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 com.liferay.asset.kernel.model.AssetLink updateLink(long userId, long entryId1, long entryId2, int typeId, int weight) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public void updateLinks(long userId, long entryId, long[] linkEntryIds, int typeId) throws com.liferay.portal.kernel.exception.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
com.liferay.portal.kernel.exception.PortalException
protected void addDeletionSystemEvent(com.liferay.asset.kernel.model.AssetLink assetLink)
protected List<com.liferay.asset.kernel.model.AssetLink> filterAssetLinks(List<com.liferay.asset.kernel.model.AssetLink> assetLinks, boolean excludeInvisibleLinks)