Liferay 6.1.10-ee-ga1

com.liferay.portlet.asset.service
Class AssetEntryLocalServiceUtil

java.lang.Object
  extended by com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil

public class AssetEntryLocalServiceUtil
extends Object

The utility for the asset entry local service. This utility wraps com.liferay.portlet.asset.service.impl.AssetEntryLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server.

This is a local service. 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:
AssetEntryLocalService, com.liferay.portlet.asset.service.base.AssetEntryLocalServiceBaseImpl, com.liferay.portlet.asset.service.impl.AssetEntryLocalServiceImpl

Constructor Summary
AssetEntryLocalServiceUtil()
           
 
Method Summary
static AssetEntry addAssetEntry(AssetEntry assetEntry)
          Adds the asset entry to the database.
static AssetEntry createAssetEntry(long entryId)
          Creates a new asset entry with the primary key.
static void deleteAssetEntry(AssetEntry assetEntry)
          Deletes the asset entry from the database.
static void deleteAssetEntry(long entryId)
          Deletes the asset entry with the primary key from the database.
static void deleteEntry(AssetEntry entry)
           
static void deleteEntry(long entryId)
           
static void deleteEntry(String className, long classPK)
           
static List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator 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 that match the dynamic query.
static AssetEntry fetchAssetEntry(long entryId)
           
static AssetEntry fetchEntry(long entryId)
           
static AssetEntry fetchEntry(String className, long classPK)
           
static List<AssetEntry> getAncestorEntries(long entryId)
           
static List<AssetEntry> getAssetEntries(int start, int end)
          Returns a range of all the asset entries.
static int getAssetEntriesCount()
          Returns the number of asset entries.
static AssetEntry getAssetEntry(long entryId)
          Returns the asset entry with the primary key.
static String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
static List<AssetEntry> getChildEntries(long entryId)
           
static List<AssetEntry> getCompanyEntries(long companyId, int start, int end)
           
static int getCompanyEntriesCount(long companyId)
           
static AssetEntryDisplay[] getCompanyEntryDisplays(long companyId, int start, int end, String languageId)
           
static List<AssetEntry> getEntries(AssetEntryQuery entryQuery)
           
static int getEntriesCount(AssetEntryQuery entryQuery)
           
static AssetEntry getEntry(long entryId)
           
static AssetEntry getEntry(long groupId, String classUuid)
           
static AssetEntry getEntry(String className, long classPK)
           
static AssetEntry getNextEntry(long entryId)
           
static AssetEntry getParentEntry(long entryId)
           
static PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
static AssetEntry getPreviousEntry(long entryId)
           
static AssetEntryLocalService getService()
           
static List<AssetEntry> getTopViewedEntries(String[] className, boolean asc, int start, int end)
           
static List<AssetEntry> getTopViewedEntries(String className, boolean asc, int start, int end)
           
static AssetEntry incrementViewCounter(long userId, String className, long classPK, int increment)
           
static void reindex(List<AssetEntry> entries)
           
static Hits search(long companyId, long[] groupIds, long userId, String className, String keywords, int start, int end)
           
static Hits search(long companyId, long[] groupIds, long userId, String className, String userName, String title, String description, String assetCategoryIds, String assetTagNames, boolean andSearch, int start, int end)
           
static Hits search(long companyId, long[] groupIds, String className, String keywords, int start, int end)
           
static AssetEntryDisplay[] searchEntryDisplays(long companyId, long[] groupIds, String className, String keywords, String languageId, int start, int end)
           
static int searchEntryDisplaysCount(long companyId, long[] groupIds, String className, String keywords, String languageId)
           
static void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 void setService(AssetEntryLocalService service)
           
static AssetEntry updateAssetEntry(AssetEntry assetEntry)
          Updates the asset entry in the database or adds it if it does not yet exist.
static AssetEntry updateAssetEntry(AssetEntry assetEntry, boolean merge)
          Updates the asset entry in the database or adds it if it does not yet exist.
static AssetEntry updateEntry(long userId, long groupId, String className, long classPK, long[] categoryIds, String[] tagNames)
           
static AssetEntry updateEntry(long userId, long groupId, String className, long classPK, String classUuid, long classTypeId, long[] categoryIds, String[] tagNames, 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, Integer priority, boolean sync)
           
static AssetEntry updateVisible(String className, long classPK, boolean visible)
           
static void validate(long groupId, String className, long[] categoryIds, String[] tagNames)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetEntryLocalServiceUtil

public AssetEntryLocalServiceUtil()
Method Detail

addAssetEntry

public static AssetEntry addAssetEntry(AssetEntry assetEntry)
                                throws SystemException
Adds the asset entry to the database. Also notifies the appropriate model listeners.

Parameters:
assetEntry - the asset entry
Returns:
the asset entry that was added
Throws:
SystemException - if a system exception occurred

createAssetEntry

public static AssetEntry createAssetEntry(long entryId)
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

deleteAssetEntry

public static void deleteAssetEntry(long entryId)
                             throws PortalException,
                                    SystemException
Deletes the asset entry with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
entryId - the primary key of the asset entry
Throws:
PortalException - if a asset entry with the primary key could not be found
SystemException - if a system exception occurred

deleteAssetEntry

public static void deleteAssetEntry(AssetEntry assetEntry)
                             throws SystemException
Deletes the asset entry from the database. Also notifies the appropriate model listeners.

Parameters:
assetEntry - the asset entry
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery)
                         throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end)
                         throws SystemException
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.

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
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end,
                                OrderByComparator orderByComparator)
                         throws SystemException
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.

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
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
                              throws SystemException
Returns the number of rows that match the dynamic query.

Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

fetchAssetEntry

public static AssetEntry fetchAssetEntry(long entryId)
                                  throws SystemException
Throws:
SystemException

getAssetEntry

public static AssetEntry getAssetEntry(long entryId)
                                throws PortalException,
                                       SystemException
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
SystemException - if a system exception occurred

getPersistedModel

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

getAssetEntries

public static List<AssetEntry> getAssetEntries(int start,
                                               int end)
                                        throws SystemException
Returns a range of all the asset 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.

Parameters:
start - the lower bound of the range of asset entries
end - the upper bound of the range of asset entries (not inclusive)
Returns:
the range of asset entries
Throws:
SystemException - if a system exception occurred

getAssetEntriesCount

public static int getAssetEntriesCount()
                                throws SystemException
Returns the number of asset entries.

Returns:
the number of asset entries
Throws:
SystemException - if a system exception occurred

updateAssetEntry

public static AssetEntry updateAssetEntry(AssetEntry assetEntry)
                                   throws SystemException
Updates the asset entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
assetEntry - the asset entry
Returns:
the asset entry that was updated
Throws:
SystemException - if a system exception occurred

updateAssetEntry

public static AssetEntry updateAssetEntry(AssetEntry assetEntry,
                                          boolean merge)
                                   throws SystemException
Updates the asset entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
assetEntry - the asset entry
merge - whether to merge the asset entry with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean) for an explanation.
Returns:
the asset entry that was updated
Throws:
SystemException - if a system exception occurred

getBeanIdentifier

public static String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Returns:
the Spring bean ID for this bean

setBeanIdentifier

public static void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Parameters:
beanIdentifier - the Spring bean ID for this bean

deleteEntry

public static void deleteEntry(AssetEntry entry)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

deleteEntry

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

deleteEntry

public static void deleteEntry(String className,
                               long classPK)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

fetchEntry

public static AssetEntry fetchEntry(long entryId)
                             throws SystemException
Throws:
SystemException

fetchEntry

public static AssetEntry fetchEntry(String className,
                                    long classPK)
                             throws SystemException
Throws:
SystemException

getAncestorEntries

public static List<AssetEntry> getAncestorEntries(long entryId)
                                           throws PortalException,
                                                  SystemException
Throws:
PortalException
SystemException

getChildEntries

public static List<AssetEntry> getChildEntries(long entryId)
                                        throws PortalException,
                                               SystemException
Throws:
PortalException
SystemException

getCompanyEntries

public static List<AssetEntry> getCompanyEntries(long companyId,
                                                 int start,
                                                 int end)
                                          throws SystemException
Throws:
SystemException

getCompanyEntriesCount

public static int getCompanyEntriesCount(long companyId)
                                  throws SystemException
Throws:
SystemException

getCompanyEntryDisplays

public static AssetEntryDisplay[] getCompanyEntryDisplays(long companyId,
                                                          int start,
                                                          int end,
                                                          String languageId)
                                                   throws SystemException
Throws:
SystemException

getEntries

public static List<AssetEntry> getEntries(AssetEntryQuery entryQuery)
                                   throws SystemException
Throws:
SystemException

getEntriesCount

public static int getEntriesCount(AssetEntryQuery entryQuery)
                           throws SystemException
Throws:
SystemException

getEntry

public static AssetEntry getEntry(long entryId)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

getEntry

public static AssetEntry getEntry(long groupId,
                                  String classUuid)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

getEntry

public static AssetEntry getEntry(String className,
                                  long classPK)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

getNextEntry

public static AssetEntry getNextEntry(long entryId)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

getParentEntry

public static AssetEntry getParentEntry(long entryId)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getPreviousEntry

public static AssetEntry getPreviousEntry(long entryId)
                                   throws PortalException,
                                          SystemException
Throws:
PortalException
SystemException

getTopViewedEntries

public static List<AssetEntry> getTopViewedEntries(String className,
                                                   boolean asc,
                                                   int start,
                                                   int end)
                                            throws SystemException
Throws:
SystemException

getTopViewedEntries

public static List<AssetEntry> getTopViewedEntries(String[] className,
                                                   boolean asc,
                                                   int start,
                                                   int end)
                                            throws SystemException
Throws:
SystemException

incrementViewCounter

public static AssetEntry incrementViewCounter(long userId,
                                              String className,
                                              long classPK,
                                              int increment)
                                       throws SystemException
Throws:
SystemException

reindex

public static void reindex(List<AssetEntry> entries)
                    throws PortalException
Throws:
PortalException

search

public static Hits search(long companyId,
                          long[] groupIds,
                          long userId,
                          String className,
                          String keywords,
                          int start,
                          int end)
                   throws SystemException
Throws:
SystemException

search

public static Hits search(long companyId,
                          long[] groupIds,
                          long userId,
                          String className,
                          String userName,
                          String title,
                          String description,
                          String assetCategoryIds,
                          String assetTagNames,
                          boolean andSearch,
                          int start,
                          int end)
                   throws SystemException
Throws:
SystemException

search

public static Hits search(long companyId,
                          long[] groupIds,
                          String className,
                          String keywords,
                          int start,
                          int end)
                   throws SystemException
Throws:
SystemException

searchEntryDisplays

public static AssetEntryDisplay[] searchEntryDisplays(long companyId,
                                                      long[] groupIds,
                                                      String className,
                                                      String keywords,
                                                      String languageId,
                                                      int start,
                                                      int end)
                                               throws SystemException
Throws:
SystemException

searchEntryDisplaysCount

public static int searchEntryDisplaysCount(long companyId,
                                           long[] groupIds,
                                           String className,
                                           String keywords,
                                           String languageId)
                                    throws SystemException
Throws:
SystemException

updateEntry

public static AssetEntry updateEntry(long userId,
                                     long groupId,
                                     String className,
                                     long classPK,
                                     long[] categoryIds,
                                     String[] tagNames)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

updateEntry

public static AssetEntry updateEntry(long userId,
                                     long groupId,
                                     String className,
                                     long classPK,
                                     String classUuid,
                                     long classTypeId,
                                     long[] categoryIds,
                                     String[] tagNames,
                                     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,
                                     Integer priority,
                                     boolean sync)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

updateVisible

public static AssetEntry updateVisible(String className,
                                       long classPK,
                                       boolean visible)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

validate

public static void validate(long groupId,
                            String className,
                            long[] categoryIds,
                            String[] tagNames)
                     throws PortalException,
                            SystemException
Throws:
PortalException
SystemException

getService

public static AssetEntryLocalService getService()

setService

public void setService(AssetEntryLocalService service)

Liferay 6.1.10-ee-ga1