@ProviderType
public class BlogsEntryLocalServiceUtil
extends Object
BlogsEntryLocalServiceImpl
and is the
primary 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.BlogsEntryLocalService
,
BlogsEntryLocalServiceBaseImpl
,
BlogsEntryLocalServiceImpl
Constructor and Description |
---|
BlogsEntryLocalServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static Folder |
addAttachmentsFolder(long userId,
long groupId) |
static BlogsEntry |
addBlogsEntry(BlogsEntry blogsEntry)
Adds the blogs entry to the database.
|
static void |
addCoverImage(long entryId,
ImageSelector imageSelector) |
static BlogsEntry |
addEntry(long userId,
String title,
String content,
Date displayDate,
ServiceContext serviceContext) |
static BlogsEntry |
addEntry(long userId,
String title,
String content,
ServiceContext serviceContext) |
static BlogsEntry |
addEntry(long userId,
String title,
String description,
String content,
int displayDateMonth,
int displayDateDay,
int displayDateYear,
int displayDateHour,
int displayDateMinute,
boolean allowPingbacks,
boolean allowTrackbacks,
String[] trackbacks,
boolean smallImage,
String smallImageURL,
String smallImageFileName,
InputStream smallImageInputStream,
ServiceContext serviceContext)
|
static BlogsEntry |
addEntry(long userId,
String title,
String subtitle,
String description,
String content,
Date displayDate,
boolean allowPingbacks,
boolean allowTrackbacks,
String[] trackbacks,
String coverImageCaption,
ImageSelector coverImageImageSelector,
ImageSelector smallImageImageSelector,
ServiceContext serviceContext) |
static BlogsEntry |
addEntry(long userId,
String title,
String subtitle,
String description,
String content,
int displayDateMonth,
int displayDateDay,
int displayDateYear,
int displayDateHour,
int displayDateMinute,
boolean allowPingbacks,
boolean allowTrackbacks,
String[] trackbacks,
String coverImageCaption,
ImageSelector coverImageImageSelector,
ImageSelector smallImageImageSelector,
ServiceContext serviceContext) |
static void |
addEntryResources(BlogsEntry entry,
boolean addGroupPermissions,
boolean addGuestPermissions) |
static void |
addEntryResources(BlogsEntry entry,
ModelPermissions modelPermissions) |
static void |
addEntryResources(long entryId,
boolean addGroupPermissions,
boolean addGuestPermissions) |
static void |
addEntryResources(long entryId,
ModelPermissions modelPermissions) |
static long |
addOriginalImageFileEntry(long userId,
long groupId,
long entryId,
ImageSelector imageSelector) |
static void |
addSmallImage(long entryId,
ImageSelector imageSelector) |
static void |
checkEntries() |
static BlogsEntry |
createBlogsEntry(long entryId)
Creates a new blogs entry with the primary key.
|
static BlogsEntry |
deleteBlogsEntry(BlogsEntry blogsEntry)
Deletes the blogs entry from the database.
|
static BlogsEntry |
deleteBlogsEntry(long entryId)
Deletes the blogs entry with the primary key from the database.
|
static void |
deleteEntries(long groupId) |
static BlogsEntry |
deleteEntry(BlogsEntry entry) |
static void |
deleteEntry(long entryId) |
static PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
static DynamicQuery |
dynamicQuery() |
static <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 long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows matching the dynamic query.
|
static Folder |
fetchAttachmentsFolder(long userId,
long groupId) |
static BlogsEntry |
fetchBlogsEntry(long entryId) |
static BlogsEntry |
fetchBlogsEntryByUuidAndGroupId(String uuid,
long groupId)
Returns the blogs entry matching the UUID and group.
|
static ActionableDynamicQuery |
getActionableDynamicQuery() |
static List<BlogsEntry> |
getBlogsEntries(int start,
int end)
Returns a range of all the blogs entries.
|
static List<BlogsEntry> |
getBlogsEntriesByUuidAndCompanyId(String uuid,
long companyId)
Returns all the blogs entries matching the UUID and company.
|
static List<BlogsEntry> |
getBlogsEntriesByUuidAndCompanyId(String uuid,
long companyId,
int start,
int end,
OrderByComparator<BlogsEntry> orderByComparator)
Returns a range of blogs entries matching the UUID and company.
|
static int |
getBlogsEntriesCount()
Returns the number of blogs entries.
|
static BlogsEntry |
getBlogsEntry(long entryId)
Returns the blogs entry with the primary key.
|
static BlogsEntry |
getBlogsEntryByUuidAndGroupId(String uuid,
long groupId)
Returns the blogs entry matching the UUID and group.
|
static List<BlogsEntry> |
getCompanyEntries(long companyId,
Date displayDate,
QueryDefinition<BlogsEntry> queryDefinition) |
static int |
getCompanyEntriesCount(long companyId,
Date displayDate,
QueryDefinition<BlogsEntry> queryDefinition) |
static BlogsEntry[] |
getEntriesPrevAndNext(long entryId) |
static BlogsEntry |
getEntry(long entryId) |
static BlogsEntry |
getEntry(long groupId,
String urlTitle) |
static ExportActionableDynamicQuery |
getExportActionableDynamicQuery(PortletDataContext portletDataContext) |
static List<BlogsEntry> |
getGroupEntries(long groupId,
Date displayDate,
QueryDefinition<BlogsEntry> queryDefinition) |
static List<BlogsEntry> |
getGroupEntries(long groupId,
QueryDefinition<BlogsEntry> queryDefinition) |
static int |
getGroupEntriesCount(long groupId,
Date displayDate,
QueryDefinition<BlogsEntry> queryDefinition) |
static int |
getGroupEntriesCount(long groupId,
QueryDefinition<BlogsEntry> queryDefinition) |
static List<BlogsEntry> |
getGroupsEntries(long companyId,
long groupId,
Date displayDate,
QueryDefinition<BlogsEntry> queryDefinition) |
static List<BlogsEntry> |
getGroupUserEntries(long groupId,
long userId,
Date displayDate,
QueryDefinition<BlogsEntry> queryDefinition) |
static int |
getGroupUserEntriesCount(long groupId,
long userId,
Date displayDate,
QueryDefinition<BlogsEntry> queryDefinition) |
static IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static List<BlogsEntry> |
getNoAssetEntries() |
static List<BlogsEntry> |
getOrganizationEntries(long organizationId,
Date displayDate,
QueryDefinition<BlogsEntry> queryDefinition) |
static int |
getOrganizationEntriesCount(long organizationId,
Date displayDate,
QueryDefinition<BlogsEntry> queryDefinition) |
static String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static PersistedModel |
getPersistedModel(Serializable primaryKeyObj) |
static BlogsEntryLocalService |
getService() |
static void |
moveEntriesToTrash(long groupId,
long userId) |
static BlogsEntry |
moveEntryToTrash(long userId,
BlogsEntry entry)
Moves the blogs entry to the recycle bin.
|
static BlogsEntry |
moveEntryToTrash(long userId,
long entryId)
Moves the blogs entry with the ID to the recycle bin.
|
static BlogsEntry |
restoreEntryFromTrash(long userId,
long entryId)
Restores the blogs entry with the ID from the recycle bin.
|
static void |
subscribe(long userId,
long groupId) |
static void |
unsubscribe(long userId,
long groupId) |
static void |
updateAsset(long userId,
BlogsEntry entry,
long[] assetCategoryIds,
String[] assetTagNames,
long[] assetLinkEntryIds,
Double priority) |
static BlogsEntry |
updateBlogsEntry(BlogsEntry blogsEntry)
Updates the blogs entry in the database or adds it if it does not yet exist.
|
static BlogsEntry |
updateEntry(long userId,
long entryId,
String title,
String content,
ServiceContext serviceContext) |
static BlogsEntry |
updateEntry(long userId,
long entryId,
String title,
String description,
String content,
int displayDateMonth,
int displayDateDay,
int displayDateYear,
int displayDateHour,
int displayDateMinute,
boolean allowPingbacks,
boolean allowTrackbacks,
String[] trackbacks,
boolean smallImage,
String smallImageURL,
String smallImageFileName,
InputStream smallImageInputStream,
ServiceContext serviceContext)
|
static BlogsEntry |
updateEntry(long userId,
long entryId,
String title,
String subtitle,
String description,
String content,
Date displayDate,
boolean allowPingbacks,
boolean allowTrackbacks,
String[] trackbacks,
String coverImageCaption,
ImageSelector coverImageImageSelector,
ImageSelector smallImageImageSelector,
ServiceContext serviceContext) |
static BlogsEntry |
updateEntry(long userId,
long entryId,
String title,
String subtitle,
String description,
String content,
int displayDateMonth,
int displayDateDay,
int displayDateYear,
int displayDateHour,
int displayDateMinute,
boolean allowPingbacks,
boolean allowTrackbacks,
String[] trackbacks,
String coverImageCaption,
ImageSelector coverImageImageSelector,
ImageSelector smallImageImageSelector,
ServiceContext serviceContext) |
static void |
updateEntryResources(BlogsEntry entry,
ModelPermissions modelPermissions) |
static void |
updateEntryResources(BlogsEntry entry,
String[] groupPermissions,
String[] guestPermissions) |
static BlogsEntry |
updateStatus(long userId,
long entryId,
int status,
ServiceContext serviceContext)
Deprecated.
As of 7.0.0, replaced by
updateStatus(long, long,
int, ServiceContext, Map) |
static BlogsEntry |
updateStatus(long userId,
long entryId,
int status,
ServiceContext serviceContext,
Map<String,Serializable> workflowContext) |
public static Folder addAttachmentsFolder(long userId, long groupId) throws PortalException
PortalException
public static BlogsEntry addBlogsEntry(BlogsEntry blogsEntry)
blogsEntry
- the blogs entrypublic static void addCoverImage(long entryId, ImageSelector imageSelector) throws PortalException
PortalException
public static BlogsEntry addEntry(long userId, String title, String content, Date displayDate, ServiceContext serviceContext) throws PortalException
PortalException
public static BlogsEntry addEntry(long userId, String title, String content, ServiceContext serviceContext) throws PortalException
PortalException
@Deprecated public static BlogsEntry addEntry(long userId, String title, String description, String content, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, boolean allowPingbacks, boolean allowTrackbacks, String[] trackbacks, boolean smallImage, String smallImageURL, String smallImageFileName, InputStream smallImageInputStream, ServiceContext serviceContext) throws PortalException
addEntry(long, String,
String, String, String, int, int, int, int, int, boolean,
boolean, String[], String, ImageSelector, ImageSelector,
ServiceContext)
PortalException
public static BlogsEntry addEntry(long userId, String title, String subtitle, String description, String content, Date displayDate, boolean allowPingbacks, boolean allowTrackbacks, String[] trackbacks, String coverImageCaption, ImageSelector coverImageImageSelector, ImageSelector smallImageImageSelector, ServiceContext serviceContext) throws PortalException
PortalException
public static BlogsEntry addEntry(long userId, String title, String subtitle, String description, String content, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, boolean allowPingbacks, boolean allowTrackbacks, String[] trackbacks, String coverImageCaption, ImageSelector coverImageImageSelector, ImageSelector smallImageImageSelector, ServiceContext serviceContext) throws PortalException
PortalException
public static void addEntryResources(BlogsEntry entry, boolean addGroupPermissions, boolean addGuestPermissions) throws PortalException
PortalException
public static void addEntryResources(BlogsEntry entry, ModelPermissions modelPermissions) throws PortalException
PortalException
public static void addEntryResources(long entryId, boolean addGroupPermissions, boolean addGuestPermissions) throws PortalException
PortalException
public static void addEntryResources(long entryId, ModelPermissions modelPermissions) throws PortalException
PortalException
public static long addOriginalImageFileEntry(long userId, long groupId, long entryId, ImageSelector imageSelector) throws PortalException
PortalException
public static void addSmallImage(long entryId, ImageSelector imageSelector) throws PortalException
PortalException
public static void checkEntries() throws PortalException
PortalException
public static BlogsEntry createBlogsEntry(long entryId)
entryId
- the primary key for the new blogs entrypublic static BlogsEntry deleteBlogsEntry(BlogsEntry blogsEntry)
blogsEntry
- the blogs entrypublic static BlogsEntry deleteBlogsEntry(long entryId) throws PortalException
entryId
- the primary key of the blogs entryPortalException
- if a blogs entry with the primary key could not be foundpublic static void deleteEntries(long groupId) throws PortalException
PortalException
public static BlogsEntry deleteEntry(BlogsEntry entry) throws PortalException
PortalException
public static void deleteEntry(long entryId) throws PortalException
PortalException
public static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
PortalException
public static DynamicQuery dynamicQuery()
public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from BlogsEntryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from BlogsEntryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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 (optionally null
)public static long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic static Folder fetchAttachmentsFolder(long userId, long groupId)
public static BlogsEntry fetchBlogsEntry(long entryId)
public static BlogsEntry fetchBlogsEntryByUuidAndGroupId(String uuid, long groupId)
uuid
- the blogs entry's UUIDgroupId
- the primary key of the groupnull
if a matching blogs entry could not be foundpublic static ActionableDynamicQuery getActionableDynamicQuery()
public static List<BlogsEntry> getBlogsEntries(int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from BlogsEntryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of blogs entriesend
- the upper bound of the range of blogs entries (not inclusive)public static List<BlogsEntry> getBlogsEntriesByUuidAndCompanyId(String uuid, long companyId)
uuid
- the UUID of the blogs entriescompanyId
- the primary key of the companypublic static List<BlogsEntry> getBlogsEntriesByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<BlogsEntry> orderByComparator)
uuid
- the UUID of the blogs entriescompanyId
- the primary key of the companystart
- the lower bound of the range of blogs entriesend
- the upper bound of the range of blogs entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static int getBlogsEntriesCount()
public static BlogsEntry getBlogsEntry(long entryId) throws PortalException
entryId
- the primary key of the blogs entryPortalException
- if a blogs entry with the primary key could not be foundpublic static BlogsEntry getBlogsEntryByUuidAndGroupId(String uuid, long groupId) throws PortalException
uuid
- the blogs entry's UUIDgroupId
- the primary key of the groupPortalException
- if a matching blogs entry could not be foundpublic static List<BlogsEntry> getCompanyEntries(long companyId, Date displayDate, QueryDefinition<BlogsEntry> queryDefinition)
public static int getCompanyEntriesCount(long companyId, Date displayDate, QueryDefinition<BlogsEntry> queryDefinition)
public static BlogsEntry[] getEntriesPrevAndNext(long entryId) throws PortalException
PortalException
public static BlogsEntry getEntry(long entryId) throws PortalException
PortalException
public static BlogsEntry getEntry(long groupId, String urlTitle) throws PortalException
PortalException
public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
public static List<BlogsEntry> getGroupEntries(long groupId, Date displayDate, QueryDefinition<BlogsEntry> queryDefinition)
public static List<BlogsEntry> getGroupEntries(long groupId, QueryDefinition<BlogsEntry> queryDefinition)
public static int getGroupEntriesCount(long groupId, Date displayDate, QueryDefinition<BlogsEntry> queryDefinition)
public static int getGroupEntriesCount(long groupId, QueryDefinition<BlogsEntry> queryDefinition)
public static List<BlogsEntry> getGroupsEntries(long companyId, long groupId, Date displayDate, QueryDefinition<BlogsEntry> queryDefinition)
public static List<BlogsEntry> getGroupUserEntries(long groupId, long userId, Date displayDate, QueryDefinition<BlogsEntry> queryDefinition)
public static int getGroupUserEntriesCount(long groupId, long userId, Date displayDate, QueryDefinition<BlogsEntry> queryDefinition)
public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static List<BlogsEntry> getNoAssetEntries()
public static List<BlogsEntry> getOrganizationEntries(long organizationId, Date displayDate, QueryDefinition<BlogsEntry> queryDefinition)
public static int getOrganizationEntriesCount(long organizationId, Date displayDate, QueryDefinition<BlogsEntry> queryDefinition)
public static String getOSGiServiceIdentifier()
public static PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
PortalException
public static void moveEntriesToTrash(long groupId, long userId) throws PortalException
PortalException
public static BlogsEntry moveEntryToTrash(long userId, BlogsEntry entry) throws PortalException
userId
- the primary key of the user moving the blogs entryentry
- the blogs entry to be movedPortalException
public static BlogsEntry moveEntryToTrash(long userId, long entryId) throws PortalException
userId
- the primary key of the user moving the blogs entryentryId
- the primary key of the blogs entry to be movedPortalException
public static BlogsEntry restoreEntryFromTrash(long userId, long entryId) throws PortalException
userId
- the primary key of the user restoring the blogs entryentryId
- the primary key of the blogs entry to be restoredPortalException
public static void subscribe(long userId, long groupId) throws PortalException
PortalException
public static void unsubscribe(long userId, long groupId) throws PortalException
PortalException
public static void updateAsset(long userId, BlogsEntry entry, long[] assetCategoryIds, String[] assetTagNames, long[] assetLinkEntryIds, Double priority) throws PortalException
PortalException
public static BlogsEntry updateBlogsEntry(BlogsEntry blogsEntry)
blogsEntry
- the blogs entrypublic static BlogsEntry updateEntry(long userId, long entryId, String title, String content, ServiceContext serviceContext) throws PortalException
PortalException
@Deprecated public static BlogsEntry updateEntry(long userId, long entryId, String title, String description, String content, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, boolean allowPingbacks, boolean allowTrackbacks, String[] trackbacks, boolean smallImage, String smallImageURL, String smallImageFileName, InputStream smallImageInputStream, ServiceContext serviceContext) throws PortalException
updateEntry(long, long,
String, String, String, String, int, int, int, int, int,
boolean, boolean, String[], String, ImageSelector,
ImageSelector, ServiceContext)
PortalException
public static BlogsEntry updateEntry(long userId, long entryId, String title, String subtitle, String description, String content, Date displayDate, boolean allowPingbacks, boolean allowTrackbacks, String[] trackbacks, String coverImageCaption, ImageSelector coverImageImageSelector, ImageSelector smallImageImageSelector, ServiceContext serviceContext) throws PortalException
PortalException
public static BlogsEntry updateEntry(long userId, long entryId, String title, String subtitle, String description, String content, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, boolean allowPingbacks, boolean allowTrackbacks, String[] trackbacks, String coverImageCaption, ImageSelector coverImageImageSelector, ImageSelector smallImageImageSelector, ServiceContext serviceContext) throws PortalException
PortalException
public static void updateEntryResources(BlogsEntry entry, ModelPermissions modelPermissions) throws PortalException
PortalException
public static void updateEntryResources(BlogsEntry entry, String[] groupPermissions, String[] guestPermissions) throws PortalException
PortalException
@Deprecated public static BlogsEntry updateStatus(long userId, long entryId, int status, ServiceContext serviceContext) throws PortalException
updateStatus(long, long,
int, ServiceContext, Map)
PortalException
public static BlogsEntry updateStatus(long userId, long entryId, int status, ServiceContext serviceContext, Map<String,Serializable> workflowContext) throws PortalException
PortalException
public static BlogsEntryLocalService getService()