Liferay 6.1.2-ce-ga3

com.liferay.portlet.documentlibrary.service
Class DLContentLocalServiceUtil

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.service.DLContentLocalServiceUtil

public class DLContentLocalServiceUtil
extends Object

The utility for the document library content local service. This utility wraps com.liferay.portlet.documentlibrary.service.impl.DLContentLocalServiceImpl 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:
DLContentLocalService, com.liferay.portlet.documentlibrary.service.base.DLContentLocalServiceBaseImpl, com.liferay.portlet.documentlibrary.service.impl.DLContentLocalServiceImpl

Constructor Summary
DLContentLocalServiceUtil()
           
 
Method Summary
static DLContent addContent(long companyId, long repositoryId, String path, String version, byte[] bytes)
           
static DLContent addContent(long companyId, long repositoryId, String path, String version, InputStream inputStream, long size)
           
static DLContent addDLContent(DLContent dlContent)
          Adds the document library content to the database.
static DLContent createDLContent(long contentId)
          Creates a new document library content with the primary key.
static void deleteContent(long companyId, long repositoryId, String path, String version)
           
static void deleteContents(long companyId, long repositoryId, String path)
           
static void deleteContentsByDirectory(long companyId, long repositoryId, String dirName)
           
static DLContent deleteDLContent(DLContent dlContent)
          Deletes the document library content from the database.
static DLContent deleteDLContent(long contentId)
          Deletes the document library content with the primary key from the database.
static DynamicQuery dynamicQuery()
           
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 DLContent fetchDLContent(long contentId)
           
static String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
static DLContent getContent(long companyId, long repositoryId, String path)
           
static DLContent getContent(long companyId, long repositoryId, String path, String version)
           
static List<DLContent> getContents(long companyId, long repositoryId)
           
static List<DLContent> getContents(long companyId, long repositoryId, String path)
           
static List<DLContent> getContentsByDirectory(long companyId, long repositoryId, String dirName)
           
static DLContentDataBlobModel getDataBlobModel(Serializable primaryKey)
           
static DLContent getDLContent(long contentId)
          Returns the document library content with the primary key.
static List<DLContent> getDLContents(int start, int end)
          Returns a range of all the document library contents.
static int getDLContentsCount()
          Returns the number of document library contents.
static PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
static DLContentLocalService getService()
           
static boolean hasContent(long companyId, long repositoryId, String path, String version)
           
static void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 void setService(DLContentLocalService service)
          Deprecated.  
static DLContent updateDLContent(DLContent dlContent)
          Updates the document library content in the database or adds it if it does not yet exist.
static DLContent updateDLContent(DLContent dlContent, boolean merge)
          Updates the document library content in the database or adds it if it does not yet exist.
static void updateDLContent(long companyId, long oldRepositoryId, long newRepositoryId, String oldPath, String newPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DLContentLocalServiceUtil

public DLContentLocalServiceUtil()
Method Detail

addDLContent

public static DLContent addDLContent(DLContent dlContent)
                              throws SystemException
Adds the document library content to the database. Also notifies the appropriate model listeners.

Parameters:
dlContent - the document library content
Returns:
the document library content that was added
Throws:
SystemException - if a system exception occurred

createDLContent

public static DLContent createDLContent(long contentId)
Creates a new document library content with the primary key. Does not add the document library content to the database.

Parameters:
contentId - the primary key for the new document library content
Returns:
the new document library content

deleteDLContent

public static DLContent deleteDLContent(long contentId)
                                 throws PortalException,
                                        SystemException
Deletes the document library content with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
contentId - the primary key of the document library content
Returns:
the document library content that was removed
Throws:
PortalException - if a document library content with the primary key could not be found
SystemException - if a system exception occurred

deleteDLContent

public static DLContent deleteDLContent(DLContent dlContent)
                                 throws SystemException
Deletes the document library content from the database. Also notifies the appropriate model listeners.

Parameters:
dlContent - the document library content
Returns:
the document library content that was removed
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static DynamicQuery dynamicQuery()

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

fetchDLContent

public static DLContent fetchDLContent(long contentId)
                                throws SystemException
Throws:
SystemException

getDLContent

public static DLContent getDLContent(long contentId)
                              throws PortalException,
                                     SystemException
Returns the document library content with the primary key.

Parameters:
contentId - the primary key of the document library content
Returns:
the document library content
Throws:
PortalException - if a document library content 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

getDLContents

public static List<DLContent> getDLContents(int start,
                                            int end)
                                     throws SystemException
Returns a range of all the document library contents.

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 document library contents
end - the upper bound of the range of document library contents (not inclusive)
Returns:
the range of document library contents
Throws:
SystemException - if a system exception occurred

getDLContentsCount

public static int getDLContentsCount()
                              throws SystemException
Returns the number of document library contents.

Returns:
the number of document library contents
Throws:
SystemException - if a system exception occurred

updateDLContent

public static DLContent updateDLContent(DLContent dlContent)
                                 throws SystemException
Updates the document library content in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
dlContent - the document library content
Returns:
the document library content that was updated
Throws:
SystemException - if a system exception occurred

updateDLContent

public static DLContent updateDLContent(DLContent dlContent,
                                        boolean merge)
                                 throws SystemException
Updates the document library content in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
dlContent - the document library content
merge - whether to merge the document library content 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 document library content that was updated
Throws:
SystemException - if a system exception occurred

getDataBlobModel

public static DLContentDataBlobModel getDataBlobModel(Serializable primaryKey)
                                               throws SystemException
Throws:
SystemException

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

addContent

public static DLContent addContent(long companyId,
                                   long repositoryId,
                                   String path,
                                   String version,
                                   byte[] bytes)
                            throws SystemException
Throws:
SystemException

addContent

public static DLContent addContent(long companyId,
                                   long repositoryId,
                                   String path,
                                   String version,
                                   InputStream inputStream,
                                   long size)
                            throws SystemException
Throws:
SystemException

deleteContent

public static void deleteContent(long companyId,
                                 long repositoryId,
                                 String path,
                                 String version)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

deleteContents

public static void deleteContents(long companyId,
                                  long repositoryId,
                                  String path)
                           throws SystemException
Throws:
SystemException

deleteContentsByDirectory

public static void deleteContentsByDirectory(long companyId,
                                             long repositoryId,
                                             String dirName)
                                      throws SystemException
Throws:
SystemException

getContent

public static DLContent getContent(long companyId,
                                   long repositoryId,
                                   String path)
                            throws SystemException,
                                   NoSuchContentException
Throws:
SystemException
NoSuchContentException

getContent

public static DLContent getContent(long companyId,
                                   long repositoryId,
                                   String path,
                                   String version)
                            throws SystemException,
                                   NoSuchContentException
Throws:
SystemException
NoSuchContentException

getContents

public static List<DLContent> getContents(long companyId,
                                          long repositoryId)
                                   throws SystemException
Throws:
SystemException

getContents

public static List<DLContent> getContents(long companyId,
                                          long repositoryId,
                                          String path)
                                   throws SystemException
Throws:
SystemException

getContentsByDirectory

public static List<DLContent> getContentsByDirectory(long companyId,
                                                     long repositoryId,
                                                     String dirName)
                                              throws SystemException
Throws:
SystemException

hasContent

public static boolean hasContent(long companyId,
                                 long repositoryId,
                                 String path,
                                 String version)
                          throws SystemException
Throws:
SystemException

updateDLContent

public static void updateDLContent(long companyId,
                                   long oldRepositoryId,
                                   long newRepositoryId,
                                   String oldPath,
                                   String newPath)
                            throws SystemException
Throws:
SystemException

getService

public static DLContentLocalService getService()

setService

public void setService(DLContentLocalService service)
Deprecated. 


Liferay 6.1.2-ce-ga3