Class AssetEntryLocalServiceUtil
com.liferay.portlet.asset.service.impl.AssetEntryLocalServiceImpl and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AssetEntryaddAssetEntry(AssetEntry assetEntry) Adds the asset entry to the database.static booleanaddAssetTagAssetEntries(long tagId, long[] entryIds) static booleanaddAssetTagAssetEntries(long tagId, List<AssetEntry> assetEntries) static booleanaddAssetTagAssetEntry(long tagId, long entryId) static booleanaddAssetTagAssetEntry(long tagId, AssetEntry assetEntry) static voidclearAssetTagAssetEntries(long tagId) static AssetEntrycreateAssetEntry(long entryId) Creates a new asset entry with the primary key.static PersistedModelcreatePersistedModel(Serializable primaryKeyObj) static AssetEntrydeleteAssetEntry(long entryId) Deletes the asset entry with the primary key from the database.static AssetEntrydeleteAssetEntry(AssetEntry assetEntry) Deletes the asset entry from the database.static voiddeleteAssetTagAssetEntries(long tagId, long[] entryIds) static voiddeleteAssetTagAssetEntries(long tagId, List<AssetEntry> assetEntries) static voiddeleteAssetTagAssetEntry(long tagId, long entryId) static voiddeleteAssetTagAssetEntry(long tagId, AssetEntry assetEntry) static voiddeleteEntries(long companyId, String className) static AssetEntrydeleteEntry(long entryId) static AssetEntrydeleteEntry(AssetEntry entry) static AssetEntrydeleteEntry(String className, long classPK) static voiddeleteGroupEntries(long groupId) static PersistedModeldeletePersistedModel(PersistedModel persistedModel) static <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static DynamicQuerystatic <T> List<T>dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.static <T> List<T>dynamicQuery(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.static <T> List<T>dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.static longdynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static longdynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.static AssetEntryfetchAssetEntry(long entryId) static AssetEntryfetchEntry(long entryId) static AssetEntryfetchEntry(long classNameId, long classPK) static AssetEntryfetchEntry(long groupId, String classUuid) static AssetEntryfetchEntry(String className, long classPK) static ActionableDynamicQuerystatic List<AssetEntry>getAssetEntries(int start, int end) Returns a range of all the asset entries.static intReturns the number of asset entries.static AssetEntrygetAssetEntry(long entryId) Returns the asset entry with the primary key.static List<AssetEntry>getAssetTagAssetEntries(long tagId) static List<AssetEntry>getAssetTagAssetEntries(long tagId, int start, int end) static List<AssetEntry>getAssetTagAssetEntries(long tagId, int start, int end, OrderByComparator<AssetEntry> orderByComparator) static intgetAssetTagAssetEntriesCount(long tagId) static long[]getAssetTagPrimaryKeys(long entryId) Returns the tagIds of the asset tags associated with the asset entry.static List<AssetEntry>getCompanyEntries(long companyId, int start, int end) static intgetCompanyEntriesCount(long companyId) static List<AssetEntry>getEntries(long[] groupIds, long[] classNameIds, long[] classTypeIds, String keywords, String userName, String title, String description, Boolean listable, boolean advancedSearch, boolean andOperator, int start, int end, String orderByCol1, String orderByCol2, String orderByType1, String orderByType2) static List<AssetEntry>getEntries(long[] groupIds, long[] classNameIds, String keywords, String userName, String title, String description, Boolean listable, boolean advancedSearch, boolean andOperator, int start, int end, String orderByCol1, String orderByCol2, String orderByType1, String orderByType2) static List<AssetEntry>getEntries(AssetEntryQuery entryQuery) static intgetEntriesCount(long[] groupIds, long[] classNameIds, long[] classTypeIds, String keywords, String userName, String title, String description, Boolean listable, boolean advancedSearch, boolean andOperator) static intgetEntriesCount(long[] groupIds, long[] classNameIds, String keywords, String userName, String title, String description, Boolean listable, boolean advancedSearch, boolean andOperator) static intgetEntriesCount(AssetEntryQuery entryQuery) static AssetEntrygetEntry(long entryId) static AssetEntrystatic AssetEntrystatic doublegetEntryPriority(long classNameId, long classPK) static doublegetEntryPriority(String className, long classPK) static List<AssetEntry>getGroupEntries(long groupId) static StringReturns the OSGi service identifier.static PersistedModelgetPersistedModel(Serializable primaryKeyObj) static AssetEntryLocalServicestatic List<AssetEntry>getTopViewedEntries(String[] className, boolean asc, int start, int end) static List<AssetEntry>getTopViewedEntries(String className, boolean asc, int start, int end) static booleanhasAssetTagAssetEntries(long tagId) static booleanhasAssetTagAssetEntry(long tagId, long entryId) static AssetEntryincrementViewCounter(long companyId, long userId, String className, long classPK) static voidincrementViewCounter(long companyId, long userId, String className, long classPK, int increment) static voidincrementViewCounter(long userId, AssetEntry assetEntry) static voidreindex(List<AssetEntry> entries) static Hitssearch(long companyId, long[] groupIds, long userId, long[] classNameIds, long classTypeId, String keywords, boolean showNonindexable, int[] statuses, int start, int end, Sort sort) static Hitssearch(long companyId, long[] groupIds, long userId, String className, long classTypeId, String keywords, boolean showNonindexable, int[] statuses, int start, int end) static Hitssearch(long companyId, long[] groupIds, long userId, String className, long classTypeId, String keywords, boolean showNonindexable, int[] statuses, int start, int end, Sort sort) static Hitssearch(long companyId, long[] groupIds, long userId, String className, long classTypeId, String keywords, boolean showNonindexable, int status, int start, int end) static Hitssearch(long companyId, long[] groupIds, long userId, String className, long classTypeId, String keywords, int status, int start, int end) static Hitssearch(long companyId, long[] groupIds, long userId, String className, long classTypeId, String userName, String title, String description, String assetCategoryIds, String assetTagNames, boolean showNonindexable, int[] statuses, boolean andSearch, int start, int end) static Hitssearch(long companyId, long[] groupIds, long userId, String className, long classTypeId, String userName, String title, String description, String assetCategoryIds, String assetTagNames, boolean showNonindexable, int status, boolean andSearch, int start, int end) static Hitssearch(long companyId, long[] groupIds, long userId, String className, long classTypeId, String userName, String title, String description, String assetCategoryIds, String assetTagNames, int status, boolean andSearch, int start, int end) static Hitssearch(long companyId, long[] groupIds, long userId, String className, String keywords, int status, int start, int end) static Hitssearch(long companyId, long[] groupIds, long userId, String className, String userName, String title, String description, String assetCategoryIds, String assetTagNames, int status, boolean andSearch, int start, int end) static longsearchCount(long companyId, long[] groupIds, long userId, long[] classNameIds, long classTypeId, String keywords, boolean showNonindexable, int[] statuses) static longsearchCount(long companyId, long[] groupIds, long userId, String className, long classTypeId, String keywords, boolean showNonindexable, int[] statuses) static longsearchCount(long companyId, long[] groupIds, long userId, String className, long classTypeId, String keywords, String assetCategoryIds, String assetTagNames, boolean showInvisible, boolean showNonindexable, int[] statuses, boolean andSearch) static longsearchCount(long companyId, long[] groupIds, long userId, String className, long classTypeId, String userName, String title, String description, String assetCategoryIds, String assetTagNames, boolean showInvisible, boolean showNonindexable, int[] statuses, boolean andSearch) static longsearchCount(long companyId, long[] groupIds, long userId, String className, long classTypeId, String userName, String title, String description, String assetCategoryIds, String assetTagNames, boolean showNonindexable, int[] statuses, boolean andSearch) static voidsetAssetTagAssetEntries(long tagId, long[] entryIds) static voidsetService(AssetEntryLocalService service) static AssetEntryupdateAssetEntry(AssetEntry assetEntry) Updates the asset entry in the database or adds it if it does not yet exist.static AssetEntryupdateEntry(long userId, long groupId, String className, long classPK, long[] categoryIds, String[] tagNames) static AssetEntryupdateEntry(long userId, long groupId, Date createDate, Date modifiedDate, String className, long classPK, String classUuid, long classTypeId, long[] categoryIds, String[] tagNames, boolean listable, boolean visible, Date startDate, Date endDate, Date publishDate, Date expirationDate, String mimeType, String title, String description, String summary, String url, String layoutUuid, int height, int width, Double priority) static AssetEntryupdateEntry(long userId, long groupId, Date createDate, Date modifiedDate, String className, long classPK, String classUuid, long classTypeId, long[] categoryIds, String[] tagNames, boolean listable, boolean visible, Date startDate, Date endDate, Date publishDate, Date expirationDate, String mimeType, String title, String description, String summary, String url, String layoutUuid, int height, int width, Double priority, ServiceContext serviceContext) static AssetEntryupdateEntry(String className, long classPK, Date publishDate, Date expirationDate, boolean listable, boolean visible) static AssetEntryupdateVisible(AssetEntry entry, boolean visible) static AssetEntryupdateVisible(String className, long classPK, boolean visible) static voidstatic voidvalidate(long groupId, String className, long classPK, long classTypePK, long[] categoryIds, String[] tagNames)
-
Constructor Details
-
AssetEntryLocalServiceUtil
public AssetEntryLocalServiceUtil()
-
-
Method Details
-
addAssetEntry
Adds the asset entry to the database. Also notifies the appropriate model listeners.Important: Inspect AssetEntryLocalServiceImpl 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.
- Parameters:
assetEntry- the asset entry- Returns:
- the asset entry that was added
-
addAssetTagAssetEntries
-
addAssetTagAssetEntries
public static boolean addAssetTagAssetEntries(long tagId, long[] entryIds) -
addAssetTagAssetEntry
-
addAssetTagAssetEntry
public static boolean addAssetTagAssetEntry(long tagId, long entryId) -
clearAssetTagAssetEntries
public static void clearAssetTagAssetEntries(long tagId) -
createAssetEntry
Creates a new asset entry with the primary key. Does not add the asset entry to the database.- Parameters:
entryId- the primary key for the new asset entry- Returns:
- the new asset entry
-
createPersistedModel
public static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException - Throws:
PortalException
-
deleteAssetEntry
Deletes the asset entry from the database. Also notifies the appropriate model listeners.Important: Inspect AssetEntryLocalServiceImpl 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.
- Parameters:
assetEntry- the asset entry- Returns:
- the asset entry that was removed
-
deleteAssetEntry
Deletes the asset entry with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect AssetEntryLocalServiceImpl 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.
- Parameters:
entryId- the primary key of the asset entry- Returns:
- the asset entry that was removed
- Throws:
PortalException- if a asset entry with the primary key could not be found
-
deleteAssetTagAssetEntries
-
deleteAssetTagAssetEntries
public static void deleteAssetTagAssetEntries(long tagId, long[] entryIds) -
deleteAssetTagAssetEntry
-
deleteAssetTagAssetEntry
public static void deleteAssetTagAssetEntry(long tagId, long entryId) -
deleteEntries
- Throws:
PortalException
-
deleteEntry
- Throws:
PortalException
-
deleteEntry
- Throws:
PortalException
-
deleteEntry
- Throws:
PortalException
-
deleteGroupEntries
- Throws:
PortalException
-
deletePersistedModel
public static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException - Throws:
PortalException
-
dslQuery
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dslQueryCount
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dynamicQuery
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
Performs a dynamic query on the database and returns a range of the matching rows.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.asset.model.impl.AssetEntryModelImpl.- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.asset.model.impl.AssetEntryModelImpl.- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- the upper bound of the range of model instances (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery- the dynamic queryprojection- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchAssetEntry
-
fetchEntry
-
fetchEntry
-
fetchEntry
-
fetchEntry
-
getActionableDynamicQuery
-
getAssetEntries
Returns a range of all the asset entries.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.asset.model.impl.AssetEntryModelImpl.- Parameters:
start- the lower bound of the range of asset entriesend- the upper bound of the range of asset entries (not inclusive)- Returns:
- the range of asset entries
-
getAssetEntriesCount
public static int getAssetEntriesCount()Returns the number of asset entries.- Returns:
- the number of asset entries
-
getAssetEntry
Returns the asset entry with the primary key.- Parameters:
entryId- the primary key of the asset entry- Returns:
- the asset entry
- Throws:
PortalException- if a asset entry with the primary key could not be found
-
getAssetTagAssetEntries
-
getAssetTagAssetEntries
-
getAssetTagAssetEntries
public static List<AssetEntry> getAssetTagAssetEntries(long tagId, int start, int end, OrderByComparator<AssetEntry> orderByComparator) -
getAssetTagAssetEntriesCount
public static int getAssetTagAssetEntriesCount(long tagId) -
getAssetTagPrimaryKeys
public static long[] getAssetTagPrimaryKeys(long entryId) Returns the tagIds of the asset tags associated with the asset entry.- Parameters:
entryId- the entryId of the asset entry- Returns:
- long[] the tagIds of asset tags associated with the asset entry
-
getCompanyEntries
-
getCompanyEntriesCount
public static int getCompanyEntriesCount(long companyId) -
getEntries
-
getEntries
public static List<AssetEntry> getEntries(long[] groupIds, long[] classNameIds, long[] classTypeIds, String keywords, String userName, String title, String description, Boolean listable, boolean advancedSearch, boolean andOperator, int start, int end, String orderByCol1, String orderByCol2, String orderByType1, String orderByType2) -
getEntries
public static List<AssetEntry> getEntries(long[] groupIds, long[] classNameIds, String keywords, String userName, String title, String description, Boolean listable, boolean advancedSearch, boolean andOperator, int start, int end, String orderByCol1, String orderByCol2, String orderByType1, String orderByType2) -
getEntriesCount
-
getEntriesCount
-
getEntriesCount
-
getEntry
- Throws:
PortalException
-
getEntry
- Throws:
PortalException
-
getEntry
- Throws:
PortalException
-
getEntryPriority
public static double getEntryPriority(long classNameId, long classPK) -
getEntryPriority
-
getGroupEntries
-
getIndexableActionableDynamicQuery
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
- Throws:
PortalException
-
getTopViewedEntries
public static List<AssetEntry> getTopViewedEntries(String className, boolean asc, int start, int end) -
getTopViewedEntries
public static List<AssetEntry> getTopViewedEntries(String[] className, boolean asc, int start, int end) -
hasAssetTagAssetEntries
public static boolean hasAssetTagAssetEntries(long tagId) -
hasAssetTagAssetEntry
public static boolean hasAssetTagAssetEntry(long tagId, long entryId) -
incrementViewCounter
- Throws:
PortalException
-
incrementViewCounter
public static AssetEntry incrementViewCounter(long companyId, long userId, String className, long classPK) throws PortalException - Throws:
PortalException
-
incrementViewCounter
public static void incrementViewCounter(long companyId, long userId, String className, long classPK, int increment) -
reindex
- Throws:
PortalException
-
search
-
search
-
search
-
search
-
search
-
search
-
search
-
search
-
search
-
search
-
searchCount
public static long searchCount(long companyId, long[] groupIds, long userId, long[] classNameIds, long classTypeId, String keywords, boolean showNonindexable, int[] statuses) -
searchCount
-
searchCount
-
searchCount
-
searchCount
-
setAssetTagAssetEntries
public static void setAssetTagAssetEntries(long tagId, long[] entryIds) -
updateAssetEntry
Updates the asset entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect AssetEntryLocalServiceImpl 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.
- Parameters:
assetEntry- the asset entry- Returns:
- the asset entry that was updated
-
updateEntry
public static AssetEntry updateEntry(long userId, long groupId, Date createDate, Date modifiedDate, String className, long classPK, String classUuid, long classTypeId, long[] categoryIds, String[] tagNames, boolean listable, boolean visible, Date startDate, Date endDate, Date publishDate, Date expirationDate, String mimeType, String title, String description, String summary, String url, String layoutUuid, int height, int width, Double priority) throws PortalException - Throws:
PortalException
-
updateEntry
public static AssetEntry updateEntry(long userId, long groupId, Date createDate, Date modifiedDate, String className, long classPK, String classUuid, long classTypeId, long[] categoryIds, String[] tagNames, boolean listable, boolean visible, Date startDate, Date endDate, Date publishDate, Date expirationDate, String mimeType, String title, String description, String summary, String url, String layoutUuid, int height, int width, Double priority, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
updateEntry
public static AssetEntry updateEntry(long userId, long groupId, String className, long classPK, long[] categoryIds, String[] tagNames) throws PortalException - Throws:
PortalException
-
updateEntry
public static AssetEntry updateEntry(String className, long classPK, Date publishDate, Date expirationDate, boolean listable, boolean visible) throws PortalException - Throws:
PortalException
-
updateVisible
- Throws:
PortalException
-
updateVisible
public static AssetEntry updateVisible(String className, long classPK, boolean visible) throws PortalException - Throws:
PortalException
-
validate
public static void validate(long groupId, String className, long classPK, long classTypePK, long[] categoryIds, String[] tagNames) throws PortalException - Throws:
PortalException
-
validate
public static void validate(long groupId, String className, long classTypePK, long[] categoryIds, String[] tagNames) throws PortalException - Throws:
PortalException
-
getService
-
setService
-