public class AssetLinkLocalServiceImpl extends AssetLinkLocalServiceBaseImpl
assetLinkFinder, assetLinkLocalService, assetLinkPersistence, counterLocalService, persistedModelLocalServiceRegistry
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) |
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 groupId,
Date startDate,
Date endDate,
int start,
int end) |
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> |
getLinks(long classNameId,
long classPK)
Returns all the asset links of an AssetEntry.
|
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, createPersistedModel, deletePersistedModel, destroy, dslQuery, dslQueryCount, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchAssetLink, getActionableDynamicQuery, getAssetLink, getAssetLinkFinder, getAssetLinkLocalService, getAssetLinkPersistence, getAssetLinks, getAssetLinksCount, getBasePersistence, getCounterLocalService, getCTPersistence, getIndexableActionableDynamicQuery, getModelClass, getModelClassName, getOSGiServiceIdentifier, getPersistedModel, initActionableDynamicQuery, runSQL, setAssetLinkFinder, setAssetLinkLocalService, setAssetLinkPersistence, setCounterLocalService, updateAssetLink, updateWithUnsafeFunction
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
Important: Inspect AssetLinkLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
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
Important: Inspect AssetLinkLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
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 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 groupId, Date startDate, Date endDate, int start, int end)
public 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> getLinks(long classNameId, long classPK)
classNameId
- AssetEntry's classNameIdclassPK
- AssetEntry's classPKpublic 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)