Liferay 7.0-ce-b4

com.liferay.portlet.blogs.service
Class BlogsEntryLocalServiceUtil

java.lang.Object
  extended by com.liferay.portlet.blogs.service.BlogsEntryLocalServiceUtil

@ProviderType
public class BlogsEntryLocalServiceUtil
extends Object

Provides the local service utility for BlogsEntry. This utility wraps 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.

See Also:
BlogsEntryLocalService, BlogsEntryLocalServiceBaseImpl, BlogsEntryLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
BlogsEntryLocalServiceUtil()
           
 
Method Summary
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)
          Deprecated. As of 7.0.0, replaced by addEntry(long, String, String, String, String, int, int, int, int, int, boolean, boolean, String[], String, ImageSelector, ImageSelector, 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)
          Deprecated. As of 7.0.0, replaced by updateEntry(long, long, String, String, String, String, int, int, int, int, int, boolean, boolean, String[], String, ImageSelector, ImageSelector, 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlogsEntryLocalServiceUtil

public BlogsEntryLocalServiceUtil()
Method Detail

addAttachmentsFolder

public static Folder addAttachmentsFolder(long userId,
                                          long groupId)
                                   throws PortalException
Throws:
PortalException

addBlogsEntry

public static BlogsEntry addBlogsEntry(BlogsEntry blogsEntry)
Adds the blogs entry to the database. Also notifies the appropriate model listeners.

Parameters:
blogsEntry - the blogs entry
Returns:
the blogs entry that was added

addCoverImage

public static void addCoverImage(long entryId,
                                 ImageSelector imageSelector)
                          throws PortalException
Throws:
PortalException

addEntry

public static BlogsEntry addEntry(long userId,
                                  String title,
                                  String content,
                                  Date displayDate,
                                  ServiceContext serviceContext)
                           throws PortalException
Throws:
PortalException

addEntry

public static BlogsEntry addEntry(long userId,
                                  String title,
                                  String content,
                                  ServiceContext serviceContext)
                           throws PortalException
Throws:
PortalException

addEntry

@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
Deprecated. As of 7.0.0, replaced by addEntry(long, String, String, String, String, int, int, int, int, int, boolean, boolean, String[], String, ImageSelector, ImageSelector, ServiceContext)

Throws:
PortalException

addEntry

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
Throws:
PortalException

addEntry

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
Throws:
PortalException

addEntryResources

public static void addEntryResources(BlogsEntry entry,
                                     boolean addGroupPermissions,
                                     boolean addGuestPermissions)
                              throws PortalException
Throws:
PortalException

addEntryResources

public static void addEntryResources(BlogsEntry entry,
                                     ModelPermissions modelPermissions)
                              throws PortalException
Throws:
PortalException

addEntryResources

public static void addEntryResources(long entryId,
                                     boolean addGroupPermissions,
                                     boolean addGuestPermissions)
                              throws PortalException
Throws:
PortalException

addEntryResources

public static void addEntryResources(long entryId,
                                     ModelPermissions modelPermissions)
                              throws PortalException
Throws:
PortalException

addOriginalImageFileEntry

public static long addOriginalImageFileEntry(long userId,
                                             long groupId,
                                             long entryId,
                                             ImageSelector imageSelector)
                                      throws PortalException
Throws:
PortalException

addSmallImage

public static void addSmallImage(long entryId,
                                 ImageSelector imageSelector)
                          throws PortalException
Throws:
PortalException

checkEntries

public static void checkEntries()
                         throws PortalException
Throws:
PortalException

createBlogsEntry

public static BlogsEntry createBlogsEntry(long entryId)
Creates a new blogs entry with the primary key. Does not add the blogs entry to the database.

Parameters:
entryId - the primary key for the new blogs entry
Returns:
the new blogs entry

deleteBlogsEntry

public static BlogsEntry deleteBlogsEntry(BlogsEntry blogsEntry)
Deletes the blogs entry from the database. Also notifies the appropriate model listeners.

Parameters:
blogsEntry - the blogs entry
Returns:
the blogs entry that was removed

deleteBlogsEntry

public static BlogsEntry deleteBlogsEntry(long entryId)
                                   throws PortalException
Deletes the blogs entry with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
entryId - the primary key of the blogs entry
Returns:
the blogs entry that was removed
Throws:
PortalException - if a blogs entry with the primary key could not be found

deleteEntries

public static void deleteEntries(long groupId)
                          throws PortalException
Throws:
PortalException

deleteEntry

public static BlogsEntry deleteEntry(BlogsEntry entry)
                              throws PortalException
Throws:
PortalException

deleteEntry

public static void deleteEntry(long entryId)
                        throws PortalException
Throws:
PortalException

deletePersistedModel

public static PersistedModel deletePersistedModel(PersistedModel persistedModel)
                                           throws PortalException
Throws:
PortalException

dynamicQuery

public static DynamicQuery dynamicQuery()

dynamicQuery

public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows

dynamicQuery

public 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.

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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - 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 - 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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows matching the dynamic query

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery,
                                     Projection projection)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
projection - the projection to apply to the query
Returns:
the number of rows matching the dynamic query

fetchAttachmentsFolder

public static Folder fetchAttachmentsFolder(long userId,
                                            long groupId)

fetchBlogsEntry

public static BlogsEntry fetchBlogsEntry(long entryId)

fetchBlogsEntryByUuidAndGroupId

public static BlogsEntry fetchBlogsEntryByUuidAndGroupId(String uuid,
                                                         long groupId)
Returns the blogs entry matching the UUID and group.

Parameters:
uuid - the blogs entry's UUID
groupId - the primary key of the group
Returns:
the matching blogs entry, or null if a matching blogs entry could not be found

getActionableDynamicQuery

public static ActionableDynamicQuery getActionableDynamicQuery()

getBlogsEntries

public static List<BlogsEntry> getBlogsEntries(int start,
                                               int end)
Returns a range of all the blogs entries.

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.

Parameters:
start - the lower bound of the range of blogs entries
end - the upper bound of the range of blogs entries (not inclusive)
Returns:
the range of blogs entries

getBlogsEntriesByUuidAndCompanyId

public static List<BlogsEntry> getBlogsEntriesByUuidAndCompanyId(String uuid,
                                                                 long companyId)
Returns all the blogs entries matching the UUID and company.

Parameters:
uuid - the UUID of the blogs entries
companyId - the primary key of the company
Returns:
the matching blogs entries, or an empty list if no matches were found

getBlogsEntriesByUuidAndCompanyId

public 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.

Parameters:
uuid - the UUID of the blogs entries
companyId - the primary key of the company
start - the lower bound of the range of blogs entries
end - the upper bound of the range of blogs entries (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the range of matching blogs entries, or an empty list if no matches were found

getBlogsEntriesCount

public static int getBlogsEntriesCount()
Returns the number of blogs entries.

Returns:
the number of blogs entries

getBlogsEntry

public static BlogsEntry getBlogsEntry(long entryId)
                                throws PortalException
Returns the blogs entry with the primary key.

Parameters:
entryId - the primary key of the blogs entry
Returns:
the blogs entry
Throws:
PortalException - if a blogs entry with the primary key could not be found

getBlogsEntryByUuidAndGroupId

public static BlogsEntry getBlogsEntryByUuidAndGroupId(String uuid,
                                                       long groupId)
                                                throws PortalException
Returns the blogs entry matching the UUID and group.

Parameters:
uuid - the blogs entry's UUID
groupId - the primary key of the group
Returns:
the matching blogs entry
Throws:
PortalException - if a matching blogs entry could not be found

getCompanyEntries

public static List<BlogsEntry> getCompanyEntries(long companyId,
                                                 Date displayDate,
                                                 QueryDefinition<BlogsEntry> queryDefinition)

getCompanyEntriesCount

public static int getCompanyEntriesCount(long companyId,
                                         Date displayDate,
                                         QueryDefinition<BlogsEntry> queryDefinition)

getEntriesPrevAndNext

public static BlogsEntry[] getEntriesPrevAndNext(long entryId)
                                          throws PortalException
Throws:
PortalException

getEntry

public static BlogsEntry getEntry(long entryId)
                           throws PortalException
Throws:
PortalException

getEntry

public static BlogsEntry getEntry(long groupId,
                                  String urlTitle)
                           throws PortalException
Throws:
PortalException

getExportActionableDynamicQuery

public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)

getGroupEntries

public static List<BlogsEntry> getGroupEntries(long groupId,
                                               Date displayDate,
                                               QueryDefinition<BlogsEntry> queryDefinition)

getGroupEntries

public static List<BlogsEntry> getGroupEntries(long groupId,
                                               QueryDefinition<BlogsEntry> queryDefinition)

getGroupEntriesCount

public static int getGroupEntriesCount(long groupId,
                                       Date displayDate,
                                       QueryDefinition<BlogsEntry> queryDefinition)

getGroupEntriesCount

public static int getGroupEntriesCount(long groupId,
                                       QueryDefinition<BlogsEntry> queryDefinition)

getGroupUserEntries

public static List<BlogsEntry> getGroupUserEntries(long groupId,
                                                   long userId,
                                                   Date displayDate,
                                                   QueryDefinition<BlogsEntry> queryDefinition)

getGroupUserEntriesCount

public static int getGroupUserEntriesCount(long groupId,
                                           long userId,
                                           Date displayDate,
                                           QueryDefinition<BlogsEntry> queryDefinition)

getGroupsEntries

public static List<BlogsEntry> getGroupsEntries(long companyId,
                                                long groupId,
                                                Date displayDate,
                                                QueryDefinition<BlogsEntry> queryDefinition)

getIndexableActionableDynamicQuery

public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()

getNoAssetEntries

public static List<BlogsEntry> getNoAssetEntries()

getOSGiServiceIdentifier

public static String getOSGiServiceIdentifier()
Returns the OSGi service identifier.

Returns:
the OSGi service identifier

getOrganizationEntries

public static List<BlogsEntry> getOrganizationEntries(long organizationId,
                                                      Date displayDate,
                                                      QueryDefinition<BlogsEntry> queryDefinition)

getOrganizationEntriesCount

public static int getOrganizationEntriesCount(long organizationId,
                                              Date displayDate,
                                              QueryDefinition<BlogsEntry> queryDefinition)

getPersistedModel

public static PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                        throws PortalException
Throws:
PortalException

moveEntriesToTrash

public static void moveEntriesToTrash(long groupId,
                                      long userId)
                               throws PortalException
Throws:
PortalException

moveEntryToTrash

public static BlogsEntry moveEntryToTrash(long userId,
                                          BlogsEntry entry)
                                   throws PortalException
Moves the blogs entry to the recycle bin. Social activity counters for this entry get disabled.

Parameters:
userId - the primary key of the user moving the blogs entry
entry - the blogs entry to be moved
Returns:
the moved blogs entry
Throws:
PortalException

moveEntryToTrash

public static BlogsEntry moveEntryToTrash(long userId,
                                          long entryId)
                                   throws PortalException
Moves the blogs entry with the ID to the recycle bin.

Parameters:
userId - the primary key of the user moving the blogs entry
entryId - the primary key of the blogs entry to be moved
Returns:
the moved blogs entry
Throws:
PortalException

restoreEntryFromTrash

public static BlogsEntry restoreEntryFromTrash(long userId,
                                               long entryId)
                                        throws PortalException
Restores the blogs entry with the ID from the recycle bin. Social activity counters for this entry get activated.

Parameters:
userId - the primary key of the user restoring the blogs entry
entryId - the primary key of the blogs entry to be restored
Returns:
the restored blogs entry from the recycle bin
Throws:
PortalException

subscribe

public static void subscribe(long userId,
                             long groupId)
                      throws PortalException
Throws:
PortalException

unsubscribe

public static void unsubscribe(long userId,
                               long groupId)
                        throws PortalException
Throws:
PortalException

updateAsset

public static void updateAsset(long userId,
                               BlogsEntry entry,
                               long[] assetCategoryIds,
                               String[] assetTagNames,
                               long[] assetLinkEntryIds,
                               Double priority)
                        throws PortalException
Throws:
PortalException

updateBlogsEntry

public static BlogsEntry updateBlogsEntry(BlogsEntry blogsEntry)
Updates the blogs entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
blogsEntry - the blogs entry
Returns:
the blogs entry that was updated

updateEntry

public static BlogsEntry updateEntry(long userId,
                                     long entryId,
                                     String title,
                                     String content,
                                     ServiceContext serviceContext)
                              throws PortalException
Throws:
PortalException

updateEntry

@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
Deprecated. As of 7.0.0, replaced by updateEntry(long, long, String, String, String, String, int, int, int, int, int, boolean, boolean, String[], String, ImageSelector, ImageSelector, ServiceContext)

Throws:
PortalException

updateEntry

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
Throws:
PortalException

updateEntry

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
Throws:
PortalException

updateEntryResources

public static void updateEntryResources(BlogsEntry entry,
                                        String[] groupPermissions,
                                        String[] guestPermissions)
                                 throws PortalException
Throws:
PortalException

updateEntryResources

public static void updateEntryResources(BlogsEntry entry,
                                        ModelPermissions modelPermissions)
                                 throws PortalException
Throws:
PortalException

updateStatus

@Deprecated
public static BlogsEntry updateStatus(long userId,
                                                 long entryId,
                                                 int status,
                                                 ServiceContext serviceContext)
                               throws PortalException
Deprecated. As of 7.0.0, replaced by updateStatus(long, long, int, ServiceContext, Map)

Throws:
PortalException

updateStatus

public static BlogsEntry updateStatus(long userId,
                                      long entryId,
                                      int status,
                                      ServiceContext serviceContext,
                                      Map<String,Serializable> workflowContext)
                               throws PortalException
Throws:
PortalException

getService

public static BlogsEntryLocalService getService()

Liferay 7.0-ce-b4