com.liferay.document.library.kernel.service.DLAppService Maven / Gradle / Ivy
Show all versions of com.liferay.portal.kernel Show documentation
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.document.library.kernel.service;
import aQute.bnd.annotation.ProviderType;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
import com.liferay.portal.kernel.lock.Lock;
import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.kernel.repository.model.FileShortcut;
import com.liferay.portal.kernel.repository.model.FileVersion;
import com.liferay.portal.kernel.repository.model.Folder;
import com.liferay.portal.kernel.search.Hits;
import com.liferay.portal.kernel.search.Query;
import com.liferay.portal.kernel.search.SearchContext;
import com.liferay.portal.kernel.search.SearchException;
import com.liferay.portal.kernel.security.access.control.AccessControlled;
import com.liferay.portal.kernel.service.BaseService;
import com.liferay.portal.kernel.service.ServiceContext;
import com.liferay.portal.kernel.transaction.Isolation;
import com.liferay.portal.kernel.transaction.Propagation;
import com.liferay.portal.kernel.transaction.Transactional;
import com.liferay.portal.kernel.util.OrderByComparator;
import java.io.File;
import java.io.InputStream;
import java.util.List;
/**
* Provides the remote service interface for DLApp. Methods of this
* service are expected to have security checks based on the propagated JAAS
* credentials because this service can be accessed remotely.
*
* @author Brian Wing Shun Chan
* @see DLAppServiceUtil
* @see com.liferay.portlet.documentlibrary.service.base.DLAppServiceBaseImpl
* @see com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl
* @generated
*/
@AccessControlled
@JSONWebService
@ProviderType
@Transactional(isolation = Isolation.PORTAL, rollbackFor = {
PortalException.class, SystemException.class})
public interface DLAppService extends BaseService {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this interface directly. Always use {@link DLAppServiceUtil} to access the d l app remote service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
*/
/**
* Adds a file entry and associated metadata. It is created based on a byte
* array.
*
*
* This method takes two file names, the sourceFileName
and the
* title
. The sourceFileName
corresponds to the
* name of the actual file being uploaded. The title
* corresponds to a name the client wishes to assign this file after it has
* been uploaded to the portal. If it is null
, the
* sourceFileName
will be used.
*
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the file entry's parent folder
* @param sourceFileName the original file's name
* @param mimeType the file's MIME type
* @param title the name to be assigned to the file (optionally null
)
* @param description the file's description
* @param changeLog the file's version change log
* @param bytes the file's data (optionally null
)
* @param serviceContext the service context to be applied. Can set the
asset category IDs, asset tag names, and expando bridge
attributes for the file entry. In a Liferay repository, it may
include: - fileEntryTypeId - ID for a custom file entry
type
- fieldsMap - mapping for fields associated with a
custom file entry type
* @return the file entry
*/
public FileEntry addFileEntry(long repositoryId, long folderId,
java.lang.String sourceFileName, java.lang.String mimeType,
java.lang.String title, java.lang.String description,
java.lang.String changeLog, byte[] bytes, ServiceContext serviceContext)
throws PortalException;
/**
* Adds a file entry and associated metadata. It is created based on a
* {@link File} object.
*
*
* This method takes two file names, the sourceFileName
and the
* title
. The sourceFileName
corresponds to the
* name of the actual file being uploaded. The title
* corresponds to a name the client wishes to assign this file after it has
* been uploaded to the portal. If it is null
, the
* sourceFileName
will be used.
*
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the file entry's parent folder
* @param sourceFileName the original file's name
* @param mimeType the file's MIME type
* @param title the name to be assigned to the file (optionally null
)
* @param description the file's description
* @param changeLog the file's version change log
* @param file the file's data (optionally null
)
* @param serviceContext the service context to be applied. Can set the
asset category IDs, asset tag names, and expando bridge
attributes for the file entry. In a Liferay repository, it may
include: - fileEntryTypeId - ID for a custom file entry
type
- fieldsMap - mapping for fields associated with a
custom file entry type
* @return the file entry
*/
public FileEntry addFileEntry(long repositoryId, long folderId,
java.lang.String sourceFileName, java.lang.String mimeType,
java.lang.String title, java.lang.String description,
java.lang.String changeLog, File file, ServiceContext serviceContext)
throws PortalException;
/**
* Adds a file entry and associated metadata. It is created based on a
* {@link InputStream} object.
*
*
* This method takes two file names, the sourceFileName
and the
* title
. The sourceFileName
corresponds to the
* name of the actual file being uploaded. The title
* corresponds to a name the client wishes to assign this file after it has
* been uploaded to the portal. If it is null
, the
* sourceFileName
will be used.
*
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the file entry's parent folder
* @param sourceFileName the original file's name
* @param mimeType the file's MIME type
* @param title the name to be assigned to the file (optionally null
)
* @param description the file's description
* @param changeLog the file's version change log
* @param is the file's data (optionally null
)
* @param size the file's size (optionally 0
)
* @param serviceContext the service context to be applied. Can set the
asset category IDs, asset tag names, and expando bridge
attributes for the file entry. In a Liferay repository, it may
include: - fileEntryTypeId - ID for a custom file entry
type
- fieldsMap - mapping for fields associated with a
custom file entry type
* @return the file entry
*/
public FileEntry addFileEntry(long repositoryId, long folderId,
java.lang.String sourceFileName, java.lang.String mimeType,
java.lang.String title, java.lang.String description,
java.lang.String changeLog, InputStream is, long size,
ServiceContext serviceContext) throws PortalException;
/**
* Adds a file shortcut to the existing file entry. This method is only
* supported by the Liferay repository.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the file shortcut's parent folder
* @param toFileEntryId the primary key of the file shortcut's file entry
* @param serviceContext the service context to be applied. Can set the
asset category IDs, asset tag names, and expando bridge
attributes for the file entry.
* @return the file shortcut
*/
public FileShortcut addFileShortcut(long repositoryId, long folderId,
long toFileEntryId, ServiceContext serviceContext)
throws PortalException;
/**
* Adds a folder.
*
* @param repositoryId the primary key of the repository
* @param parentFolderId the primary key of the folder's parent folder
* @param name the folder's name
* @param description the folder's description
* @param serviceContext the service context to be applied. In a Liferay
repository, it may include boolean mountPoint specifying whether
folder is a facade for mounting a third-party repository
* @return the folder
*/
public Folder addFolder(long repositoryId, long parentFolderId,
java.lang.String name, java.lang.String description,
ServiceContext serviceContext) throws PortalException;
/**
* Adds a temporary file entry.
*
*
* This allows a client to upload a file into a temporary location and
* manipulate its metadata prior to making it available for public usage.
* This is different from checking in and checking out a file entry.
*
*
* @param groupId the primary key of the group
* @param folderId the primary key of the folder where the file entry will
eventually reside
* @param folderName the temporary folder's name
* @param fileName the file's original name
* @param file the file's data (optionally null
)
* @param mimeType the file's MIME type
* @return the temporary file entry
* @see TempFileEntryUtil
*/
public FileEntry addTempFileEntry(long groupId, long folderId,
java.lang.String folderName, java.lang.String fileName, File file,
java.lang.String mimeType) throws PortalException;
/**
* Adds a temporary file entry. It is created based on the {@link
* InputStream} object.
*
*
* This allows a client to upload a file into a temporary location and
* manipulate its metadata prior to making it available for public usage.
* This is different from checking in and checking out a file entry.
*
*
* @param groupId the primary key of the group
* @param folderId the primary key of the folder where the file entry will
eventually reside
* @param folderName the temporary folder's name
* @param fileName the file's original name
* @param inputStream the file's data
* @param mimeType the file's MIME type
* @return the temporary file entry
* @see TempFileEntryUtil
*/
public FileEntry addTempFileEntry(long groupId, long folderId,
java.lang.String folderName, java.lang.String fileName,
InputStream inputStream, java.lang.String mimeType)
throws PortalException;
/**
* Cancels the check out of the file entry. If a user has not checked out
* the specified file entry, invoking this method will result in no changes.
*
*
* When a file entry is checked out, a PWC (private working copy) is created
* and the original file entry is locked. A client can make as many changes
* to the PWC as he desires without those changes being visible to other
* users. If the user is satisfied with the changes, he may elect to check
* in his changes, resulting in a new file version based on the PWC; the PWC
* will be removed and the file entry will be unlocked. If the user is not
* satisfied with the changes, he may elect to cancel his check out; this
* results in the deletion of the PWC and unlocking of the file entry.
*
*
* @param fileEntryId the primary key of the file entry to cancel the
checkout
* @see #checkInFileEntry(long, boolean, String, ServiceContext)
* @see #checkOutFileEntry(long, ServiceContext)
*/
public void cancelCheckOut(long fileEntryId) throws PortalException;
/**
* Checks in the file entry using the lock's UUID. If a user has not checked
* out the specified file entry, invoking this method will result in no
* changes. This method is primarily used by WebDAV.
*
*
* When a file entry is checked out, a PWC (private working copy) is created
* and the original file entry is locked. A client can make as many changes
* to the PWC as he desires without those changes being visible to other
* users. If the user is satisfied with the changes, he may elect to check
* in his changes, resulting in a new file version based on the PWC; the PWC
* will be removed and the file entry will be unlocked. If the user is not
* satisfied with the changes, he may elect to cancel his check out; this
* results in the deletion of the PWC and unlocking of the file entry.
*
*
* @param fileEntryId the primary key of the file entry to check in
* @param lockUuid the lock's UUID
* @param serviceContext the service context to be applied
* @see #cancelCheckOut(long)
* @see #checkOutFileEntry(long, String, long, ServiceContext)
*/
public void checkInFileEntry(long fileEntryId, java.lang.String lockUuid,
ServiceContext serviceContext) throws PortalException;
/**
* Checks in the file entry. If a user has not checked out the specified
* file entry, invoking this method will result in no changes.
*
*
* When a file entry is checked out, a PWC (private working copy) is created
* and the original file entry is locked. A client can make as many changes
* to the PWC as he desires without those changes being visible to other
* users. If the user is satisfied with the changes, he may elect to check
* in his changes, resulting in a new file version based on the PWC; the PWC
* will be removed and the file entry will be unlocked. If the user is not
* satisfied with the changes, he may elect to cancel his check out; this
* results in the deletion of the PWC and unlocking of the file entry.
*
*
* @param fileEntryId the primary key of the file entry to check in
* @param majorVersion whether the new file version is a major version
* @param changeLog the file's version change log
* @param serviceContext the service context to be applied
* @see #cancelCheckOut(long)
* @see #checkOutFileEntry(long, ServiceContext)
*/
public void checkInFileEntry(long fileEntryId, boolean majorVersion,
java.lang.String changeLog, ServiceContext serviceContext)
throws PortalException;
/**
* Checks out the file entry. This method is primarily used by WebDAV.
*
*
* When a file entry is checked out, a PWC (private working copy) is created
* and the original file entry is locked. A client can make as many changes
* to the PWC as he desires without those changes being visible to other
* users. If the user is satisfied with the changes, he may elect to check
* in his changes, resulting in a new file version based on the PWC; the PWC
* will be removed and the file entry will be unlocked. If the user is not
* satisfied with the changes, he may elect to cancel his check out; this
* results in the deletion of the PWC and unlocking of the file entry.
*
*
* @param fileEntryId the file entry to check out
* @param owner the owner string for the checkout (optionally
null
)
* @param expirationTime the time in milliseconds before the lock expires.
If the value is 0
, the default expiration time will
be used from portal.properties>.
* @param serviceContext the service context to be applied
* @return the file entry
* @see #cancelCheckOut(long)
* @see #checkInFileEntry(long, String)
*/
public FileEntry checkOutFileEntry(long fileEntryId,
java.lang.String owner, long expirationTime,
ServiceContext serviceContext) throws PortalException;
/**
* Check out a file entry.
*
*
* When a file entry is checked out, a PWC (private working copy) is created
* and the original file entry is locked. A client can make as many changes
* to the PWC as he desires without those changes being visible to other
* users. If the user is satisfied with the changes, he may elect to check
* in his changes, resulting in a new file version based on the PWC; the PWC
* will be removed and the file entry will be unlocked. If the user is not
* satisfied with the changes, he may elect to cancel his check out; this
* results in the deletion of the PWC and unlocking of the file entry.
*
*
* @param fileEntryId the file entry to check out
* @param serviceContext the service context to be applied
* @see #cancelCheckOut(long)
* @see #checkInFileEntry(long, boolean, String, ServiceContext)
*/
public void checkOutFileEntry(long fileEntryId,
ServiceContext serviceContext) throws PortalException;
/**
* Performs a deep copy of the folder.
*
* @param repositoryId the primary key of the repository
* @param sourceFolderId the primary key of the folder to copy
* @param parentFolderId the primary key of the new folder's parent folder
* @param name the new folder's name
* @param description the new folder's description
* @param serviceContext the service context to be applied
* @return the folder
*/
public Folder copyFolder(long repositoryId, long sourceFolderId,
long parentFolderId, java.lang.String name,
java.lang.String description, ServiceContext serviceContext)
throws PortalException;
/**
* Deletes the file entry with the primary key.
*
* @param fileEntryId the primary key of the file entry
*/
public void deleteFileEntry(long fileEntryId) throws PortalException;
/**
* Deletes the file entry with the title in the folder.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the file entry's parent folder
* @param title the file entry's title
*/
public void deleteFileEntryByTitle(long repositoryId, long folderId,
java.lang.String title) throws PortalException;
/**
* Deletes the file shortcut with the primary key. This method is only
* supported by the Liferay repository.
*
* @param fileShortcutId the primary key of the file shortcut
*/
public void deleteFileShortcut(long fileShortcutId)
throws PortalException;
/**
* Deletes the file version. File versions can only be deleted if it is
* approved and there are other approved file versions available. This
* method is only supported by the Liferay repository.
*
* @param fileEntryId the primary key of the file entry
* @param version the version label of the file version
*/
public void deleteFileVersion(long fileEntryId, java.lang.String version)
throws PortalException;
/**
* Deletes the folder with the primary key and all of its subfolders and
* file entries.
*
* @param folderId the primary key of the folder
*/
public void deleteFolder(long folderId) throws PortalException;
/**
* Deletes the folder with the name in the parent folder and all of its
* subfolders and file entries.
*
* @param repositoryId the primary key of the repository
* @param parentFolderId the primary key of the folder's parent folder
* @param name the folder's name
*/
public void deleteFolder(long repositoryId, long parentFolderId,
java.lang.String name) throws PortalException;
/**
* Deletes the temporary file entry.
*
* @param groupId the primary key of the group
* @param folderId the primary key of the folder where the file entry was
eventually to reside
* @param folderName the temporary folder's name
* @param fileName the file's original name
* @see TempFileEntryUtil
*/
public void deleteTempFileEntry(long groupId, long folderId,
java.lang.String folderName, java.lang.String fileName)
throws PortalException;
/**
* Returns all the file entries in the folder.
*
* @param repositoryId the primary key of the file entry's repository
* @param folderId the primary key of the file entry's folder
* @return the file entries in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFileEntries(long repositoryId, long folderId)
throws PortalException;
/**
* Returns the file entries with the file entry type in the folder.
*
* @param repositoryId the primary key of the file entry's repository
* @param folderId the primary key of the file entry's folder
* @param fileEntryTypeId the primary key of the file entry type
* @return the file entries with the file entry type in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFileEntries(long repositoryId, long folderId,
long fileEntryTypeId) throws PortalException;
/**
* Returns a name-ordered range of all the file entries with the file entry
* type in the folder.
*
* @param repositoryId the primary key of the file entry's repository
* @param folderId the primary key of the file entry's folder
* @param fileEntryTypeId the primary key of the file entry type
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @return the name-ordered range of the file entries in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFileEntries(long repositoryId, long folderId,
long fileEntryTypeId, int start, int end) throws PortalException;
/**
* Returns an ordered range of all the file entries with the file entry type
* in the folder.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the folder
* @param fileEntryTypeId the primary key of the file entry type
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @param obc the comparator to order the results by (optionally
null
)
* @return the range of file entries with the file entry type in the folder
ordered by null
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFileEntries(long repositoryId, long folderId,
long fileEntryTypeId, int start, int end,
OrderByComparator obc) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFileEntries(long repositoryId, long folderId,
java.lang.String[] mimeTypes) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFileEntries(long repositoryId, long folderId,
java.lang.String[] mimeTypes, int start, int end,
OrderByComparator obc) throws PortalException;
/**
* Returns a name-ordered range of all the file entries in the folder.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the file entry's repository
* @param folderId the primary key of the file entry's folder
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @return the name-ordered range of file entries in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFileEntries(long repositoryId, long folderId,
int start, int end) throws PortalException;
/**
* Returns an ordered range of all the file entries in the folder.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the file entry's repository
* @param folderId the primary key of the file entry's folder
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @param obc the comparator to order the file entries (optionally
null
)
* @return the range of file entries in the folder ordered by comparator
obc
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFileEntries(long repositoryId, long folderId,
int start, int end, OrderByComparator obc)
throws PortalException;
/**
* Returns a range of all the file entries and shortcuts in the folder.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the folder
* @param status the workflow status
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @return the range of file entries and shortcuts in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFileEntriesAndFileShortcuts(
long repositoryId, long folderId, int status, int start, int end)
throws PortalException;
/**
* Returns the number of file entries and shortcuts in the folder.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the folder
* @param status the workflow status
* @return the number of file entries and shortcuts in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFileEntriesAndFileShortcutsCount(long repositoryId,
long folderId, int status) throws PortalException;
/**
* Returns the number of file entries and shortcuts in the folder.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the folder
* @param status the workflow status
* @param mimeTypes allowed media types
* @return the number of file entries and shortcuts in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFileEntriesAndFileShortcutsCount(long repositoryId,
long folderId, int status, java.lang.String[] mimeTypes)
throws PortalException;
/**
* Returns the number of file entries in the folder.
*
* @param repositoryId the primary key of the file entry's repository
* @param folderId the primary key of the file entry's folder
* @return the number of file entries in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFileEntriesCount(long repositoryId, long folderId)
throws PortalException;
/**
* Returns the number of file entries with the file entry type in the
* folder.
*
* @param repositoryId the primary key of the file entry's repository
* @param folderId the primary key of the file entry's folder
* @param fileEntryTypeId the primary key of the file entry type
* @return the number of file entries with the file entry type in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFileEntriesCount(long repositoryId, long folderId,
long fileEntryTypeId) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFileEntriesCount(long repositoryId, long folderId,
java.lang.String[] mimeTypes) throws PortalException;
/**
* Returns the file entry with the primary key.
*
* @param fileEntryId the primary key of the file entry
* @return the file entry with the primary key
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public FileEntry getFileEntry(long fileEntryId) throws PortalException;
/**
* Returns the file entry with the title in the folder.
*
* @param groupId the primary key of the file entry's group
* @param folderId the primary key of the file entry's folder
* @param title the file entry's title
* @return the file entry with the title in the folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public FileEntry getFileEntry(long groupId, long folderId,
java.lang.String title) throws PortalException;
/**
* Returns the file entry with the UUID and group.
*
* @param uuid the file entry's UUID
* @param groupId the primary key of the file entry's group
* @return the file entry with the UUID and group
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public FileEntry getFileEntryByUuidAndGroupId(java.lang.String uuid,
long groupId) throws PortalException;
/**
* Returns the file shortcut with the primary key. This method is only
* supported by the Liferay repository.
*
* @param fileShortcutId the primary key of the file shortcut
* @return the file shortcut with the primary key
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public FileShortcut getFileShortcut(long fileShortcutId)
throws PortalException;
/**
* Returns the file version with the primary key.
*
* @param fileVersionId the primary key of the file version
* @return the file version with the primary key
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public FileVersion getFileVersion(long fileVersionId)
throws PortalException;
/**
* Returns the folder with the primary key.
*
* @param folderId the primary key of the folder
* @return the folder with the primary key
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Folder getFolder(long folderId) throws PortalException;
/**
* Returns the folder with the name in the parent folder.
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param name the folder's name
* @return the folder with the name in the parent folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Folder getFolder(long repositoryId, long parentFolderId,
java.lang.String name) throws PortalException;
/**
* Returns all immediate subfolders of the parent folder.
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @return the immediate subfolders of the parent folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFolders(long repositoryId, long parentFolderId)
throws PortalException;
/**
* Returns all immediate subfolders of the parent folder, optionally
* including mount folders for third-party repositories.
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param includeMountFolders whether to include mount folders for
third-party repositories
* @return the immediate subfolders of the parent folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFolders(long repositoryId, long parentFolderId,
boolean includeMountFolders) throws PortalException;
/**
* Returns a name-ordered range of all the immediate subfolders of the
* parent folder, optionally including mount folders for third-party
* repositories.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param includeMountFolders whether to include mount folders for
third-party repositories
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @return the name-ordered range of immediate subfolders of the parent
folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFolders(long repositoryId, long parentFolderId,
boolean includeMountFolders, int start, int end)
throws PortalException;
/**
* Returns an ordered range of all the immediate subfolders of the parent
* folder.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param includeMountFolders whether to include mount folders for
third-party repositories
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @param obc the comparator to order the folders (optionally
null
)
* @return the range of immediate subfolders of the parent folder ordered by
comparator obc
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFolders(long repositoryId, long parentFolderId,
boolean includeMountFolders, int start, int end,
OrderByComparator obc) throws PortalException;
/**
* Returns a name-ordered range of all the immediate subfolders of the
* parent folder.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @return the name-ordered range of immediate subfolders of the parent
folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFolders(long repositoryId, long parentFolderId,
int start, int end) throws PortalException;
/**
* Returns an ordered range of all the immediate subfolders of the parent
* folder.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @param obc the comparator to order the folders (optionally
null
)
* @return the range of immediate subfolders of the parent folder ordered by
comparator obc
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFolders(long repositoryId, long parentFolderId,
int start, int end, OrderByComparator obc)
throws PortalException;
/**
* Returns an ordered range of all the immediate subfolders of the parent
* folder.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param status the workflow status
* @param includeMountFolders whether to include mount folders for
third-party repositories
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @param obc the comparator to order the folders (optionally
null
)
* @return the range of immediate subfolders of the parent folder ordered by
comparator obc
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFolders(long repositoryId, long parentFolderId,
int status, boolean includeMountFolders, int start, int end,
OrderByComparator obc) throws PortalException;
/**
* Returns a name-ordered range of all the immediate subfolders, file
* entries, and file shortcuts in the parent folder.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the parent folder
* @param status the workflow status
* @param includeMountFolders whether to include mount folders for
third-party repositories
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @return the name-ordered range of immediate subfolders, file entries, and
file shortcuts in the parent folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFoldersAndFileEntriesAndFileShortcuts(
long repositoryId, long folderId, int status,
boolean includeMountFolders, int start, int end)
throws PortalException;
/**
* Returns an ordered range of all the immediate subfolders, file entries,
* and file shortcuts in the parent folder.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the parent folder
* @param status the workflow status
* @param includeMountFolders whether to include mount folders for
third-party repositories
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @param obc the comparator to order the results (optionally
null
)
* @return the range of immediate subfolders, file entries, and file
shortcuts in the parent folder ordered by comparator
obc
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFoldersAndFileEntriesAndFileShortcuts(
long repositoryId, long folderId, int status,
boolean includeMountFolders, int start, int end,
OrderByComparator> obc) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getFoldersAndFileEntriesAndFileShortcuts(
long repositoryId, long folderId, int status,
java.lang.String[] mimeTypes, boolean includeMountFolders, int start,
int end, OrderByComparator> obc) throws PortalException;
/**
* Returns the number of immediate subfolders, file entries, and file
* shortcuts in the parent folder.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the parent folder
* @param status the workflow status
* @param includeMountFolders whether to include mount folders for
third-party repositories
* @return the number of immediate subfolders, file entries, and file
shortcuts in the parent folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFoldersAndFileEntriesAndFileShortcutsCount(
long repositoryId, long folderId, int status,
boolean includeMountFolders) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFoldersAndFileEntriesAndFileShortcutsCount(
long repositoryId, long folderId, int status,
java.lang.String[] mimeTypes, boolean includeMountFolders)
throws PortalException;
/**
* Returns the number of immediate subfolders of the parent folder.
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @return the number of immediate subfolders of the parent folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFoldersCount(long repositoryId, long parentFolderId)
throws PortalException;
/**
* Returns the number of immediate subfolders of the parent folder,
* optionally including mount folders for third-party repositories.
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param includeMountFolders whether to include mount folders for
third-party repositories
* @return the number of immediate subfolders of the parent folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFoldersCount(long repositoryId, long parentFolderId,
boolean includeMountFolders) throws PortalException;
/**
* Returns the number of immediate subfolders of the parent folder,
* optionally including mount folders for third-party repositories.
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param status the workflow status
* @param includeMountFolders whether to include mount folders for
third-party repositories
* @return the number of immediate subfolders of the parent folder
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFoldersCount(long repositoryId, long parentFolderId,
int status, boolean includeMountFolders) throws PortalException;
/**
* Returns the number of immediate subfolders and file entries across the
* folders.
*
* @param repositoryId the primary key of the repository
* @param folderIds the primary keys of folders from which to count
immediate subfolders and file entries
* @param status the workflow status
* @return the number of immediate subfolders and file entries across the
folders
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFoldersFileEntriesCount(long repositoryId,
List folderIds, int status) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getGroupFileEntries(long groupId, long userId,
long rootFolderId, java.lang.String[] mimeTypes, int status, int start,
int end, OrderByComparator obc) throws PortalException;
/**
* Returns an ordered range of all the file entries in the group starting at
* the root folder that are stored within the Liferay repository. This
* method is primarily used to search for recently modified file entries. It
* can be limited to the file entries modified by a given user.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param groupId the primary key of the group
* @param userId the primary key of the user who created the file
(optionally 0
)
* @param rootFolderId the primary key of the root folder to begin the
search
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @return the range of matching file entries ordered by date modified
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getGroupFileEntries(long groupId, long userId,
long rootFolderId, int start, int end) throws PortalException;
/**
* Returns an ordered range of all the file entries in the group starting at
* the root folder that are stored within the Liferay repository. This
* method is primarily used to search for recently modified file entries. It
* can be limited to the file entries modified by a given user.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param groupId the primary key of the group
* @param userId the primary key of the user who created the file
(optionally 0
)
* @param rootFolderId the primary key of the root folder to begin the
search
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @param obc the comparator to order the file entries (optionally
null
)
* @return the range of matching file entries ordered by comparator
obc
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getGroupFileEntries(long groupId, long userId,
long rootFolderId, int start, int end, OrderByComparator obc)
throws PortalException;
/**
* Returns an ordered range of all the file entries in the group starting at
* the repository default parent folder that are stored within the Liferay
* repository. This method is primarily used to search for recently modified
* file entries. It can be limited to the file entries modified by a given
* user.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param groupId the primary key of the group
* @param userId the primary key of the user who created the file
(optionally 0
)
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @return the range of matching file entries ordered by date modified
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getGroupFileEntries(long groupId, long userId,
int start, int end) throws PortalException;
/**
* Returns an ordered range of all the file entries in the group that are
* stored within the Liferay repository. This method is primarily used to
* search for recently modified file entries. It can be limited to the file
* entries modified by a given user.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param groupId the primary key of the group
* @param userId the primary key of the user who created the file
(optionally 0
)
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @param obc the comparator to order the file entries (optionally
null
)
* @return the range of matching file entries ordered by comparator
obc
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getGroupFileEntries(long groupId, long userId,
int start, int end, OrderByComparator obc)
throws PortalException;
/**
* Returns the number of file entries in a group starting at the repository
* default parent folder that are stored within the Liferay repository. This
* method is primarily used to search for recently modified file entries. It
* can be limited to the file entries modified by a given user.
*
* @param groupId the primary key of the group
* @param userId the primary key of the user who created the file
(optionally 0
)
* @return the number of matching file entries
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getGroupFileEntriesCount(long groupId, long userId)
throws PortalException;
/**
* Returns the number of file entries in a group starting at the root folder
* that are stored within the Liferay repository. This method is primarily
* used to search for recently modified file entries. It can be limited to
* the file entries modified by a given user.
*
* @param groupId the primary key of the group
* @param userId the primary key of the user who created the file
(optionally 0
)
* @param rootFolderId the primary key of the root folder to begin the
search
* @return the number of matching file entries
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getGroupFileEntriesCount(long groupId, long userId,
long rootFolderId) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getGroupFileEntriesCount(long groupId, long userId,
long rootFolderId, java.lang.String[] mimeTypes, int status)
throws PortalException;
/**
* Returns all immediate subfolders of the parent folder that are used for
* mounting third-party repositories. This method is only supported by the
* Liferay repository.
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @return the immediate subfolders of the parent folder that are used for
mounting third-party repositories
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getMountFolders(long repositoryId, long parentFolderId)
throws PortalException;
/**
* Returns a name-ordered range of all the immediate subfolders of the
* parent folder that are used for mounting third-party repositories. This
* method is only supported by the Liferay repository.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the repository
* @param parentFolderId the primary key of the parent folder
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @return the name-ordered range of immediate subfolders of the parent
folder that are used for mounting third-party repositories
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getMountFolders(long repositoryId, long parentFolderId,
int start, int end) throws PortalException;
/**
* Returns an ordered range of all the immediate subfolders of the parent
* folder that are used for mounting third-party repositories. This method
* is only supported by the Liferay repository.
*
*
* 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 {@link QueryUtil#ALL_POS} will return the full
* result set.
*
*
* @param repositoryId the primary key of the folder's repository
* @param parentFolderId the primary key of the folder's parent folder
* @param start the lower bound of the range of results
* @param end the upper bound of the range of results (not inclusive)
* @param obc the comparator to order the folders (optionally
null
)
* @return the range of immediate subfolders of the parent folder that are
used for mounting third-party repositories ordered by comparator
obc
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getMountFolders(long repositoryId, long parentFolderId,
int start, int end, OrderByComparator obc)
throws PortalException;
/**
* Returns the number of immediate subfolders of the parent folder that are
* used for mounting third-party repositories. This method is only supported
* by the Liferay repository.
*
* @param repositoryId the primary key of the repository
* @param parentFolderId the primary key of the parent folder
* @return the number of folders of the parent folder that are used for
mounting third-party repositories
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getMountFoldersCount(long repositoryId, long parentFolderId)
throws PortalException;
/**
* Returns the OSGi service identifier.
*
* @return the OSGi service identifier
*/
public java.lang.String getOSGiServiceIdentifier();
/**
* Returns all the descendant folders of the folder with the primary key.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the folder
* @return the descendant folders of the folder with the primary key
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getSubfolderIds(long repositoryId, long folderId)
throws PortalException;
/**
* Returns descendant folders of the folder with the primary key, optionally
* limiting to one level deep.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the folder
* @param recurse whether to recurse through each subfolder
* @return the descendant folders of the folder with the primary key
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getSubfolderIds(long repositoryId,
long folderId, boolean recurse) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public void getSubfolderIds(long repositoryId,
List folderIds, long folderId)
throws PortalException;
/**
* Returns all the temporary file entry names.
*
* @param groupId the primary key of the group
* @param folderId the primary key of the folder where the file entry will
eventually reside
* @param folderName the temporary folder's name
* @return the temporary file entry names
* @see #addTempFileEntry(long, long, String, String, File, String)
* @see TempFileEntryUtil
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.lang.String[] getTempFileNames(long groupId, long folderId,
java.lang.String folderName) throws PortalException;
/**
* Locks the folder. This method is primarily used by WebDAV.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the folder
* @return the lock object
*/
public Lock lockFolder(long repositoryId, long folderId)
throws PortalException;
/**
* Locks the folder. This method is primarily used by WebDAV.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the folder
* @param owner the owner string for the checkout (optionally
null
)
* @param inheritable whether the lock must propagate to descendants
* @param expirationTime the time in milliseconds before the lock expires.
If the value is 0
, the default expiration time will
be used from portal.properties>.
* @return the lock object
*/
public Lock lockFolder(long repositoryId, long folderId,
java.lang.String owner, boolean inheritable, long expirationTime)
throws PortalException;
/**
* Moves the file entry to the new folder.
*
* @param fileEntryId the primary key of the file entry
* @param newFolderId the primary key of the new folder
* @param serviceContext the service context to be applied
* @return the file entry
*/
public FileEntry moveFileEntry(long fileEntryId, long newFolderId,
ServiceContext serviceContext) throws PortalException;
/**
* Moves the folder to the new parent folder with the primary key.
*
* @param folderId the primary key of the folder
* @param parentFolderId the primary key of the new parent folder
* @param serviceContext the service context to be applied
* @return the file entry
*/
public Folder moveFolder(long folderId, long parentFolderId,
ServiceContext serviceContext) throws PortalException;
/**
* Refreshes the lock for the file entry. This method is primarily used by
* WebDAV.
*
* @param lockUuid the lock's UUID
* @param companyId the primary key of the file entry's company
* @param expirationTime the time in milliseconds before the lock expires.
If the value is 0
, the default expiration time will
be used from portal.properties>.
* @return the lock object
*/
public Lock refreshFileEntryLock(java.lang.String lockUuid, long companyId,
long expirationTime) throws PortalException;
/**
* Refreshes the lock for the folder. This method is primarily used by
* WebDAV.
*
* @param lockUuid the lock's UUID
* @param companyId the primary key of the file entry's company
* @param expirationTime the time in milliseconds before the lock expires.
If the value is 0
, the default expiration time will
be used from portal.properties>.
* @return the lock object
*/
public Lock refreshFolderLock(java.lang.String lockUuid, long companyId,
long expirationTime) throws PortalException;
/**
* Reverts the file entry to a previous version. A new version will be
* created based on the previous version and metadata.
*
* @param fileEntryId the primary key of the file entry
* @param version the version to revert back to
* @param serviceContext the service context to be applied
*/
public void revertFileEntry(long fileEntryId, java.lang.String version,
ServiceContext serviceContext) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Hits search(long repositoryId, long creatorUserId, long folderId,
java.lang.String[] mimeTypes, int status, int start, int end)
throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Hits search(long repositoryId, long creatorUserId, int status,
int start, int end) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Hits search(long repositoryId, SearchContext searchContext)
throws SearchException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Hits search(long repositoryId, SearchContext searchContext,
Query query) throws SearchException;
/**
* Subscribe the user to changes in documents of the file entry type. This
* method is only supported by the Liferay repository.
*
* @param groupId the primary key of the file entry type's group
* @param fileEntryTypeId the primary key of the file entry type
*/
public void subscribeFileEntryType(long groupId, long fileEntryTypeId)
throws PortalException;
/**
* Subscribe the user to document changes in the folder. This method is only
* supported by the Liferay repository.
*
* @param groupId the primary key of the folder's group
* @param folderId the primary key of the folder
*/
public void subscribeFolder(long groupId, long folderId)
throws PortalException;
/**
* Unlocks the folder. This method is primarily used by WebDAV.
*
* @param repositoryId the primary key of the repository
* @param folderId the primary key of the folder
* @param lockUuid the lock's UUID
*/
public void unlockFolder(long repositoryId, long folderId,
java.lang.String lockUuid) throws PortalException;
/**
* Unlocks the folder. This method is primarily used by WebDAV.
*
* @param repositoryId the primary key of the repository
* @param parentFolderId the primary key of the parent folder
* @param name the folder's name
* @param lockUuid the lock's UUID
*/
public void unlockFolder(long repositoryId, long parentFolderId,
java.lang.String name, java.lang.String lockUuid)
throws PortalException;
/**
* Unsubscribe the user from changes in documents of the file entry type.
* This method is only supported by the Liferay repository.
*
* @param groupId the primary key of the file entry type's group
* @param fileEntryTypeId the primary key of the file entry type
*/
public void unsubscribeFileEntryType(long groupId, long fileEntryTypeId)
throws PortalException;
/**
* Unsubscribe the user from document changes in the folder. This method is
* only supported by the Liferay repository.
*
* @param groupId the primary key of the folder's group
* @param folderId the primary key of the folder
*/
public void unsubscribeFolder(long groupId, long folderId)
throws PortalException;
/**
* Updates a file entry and associated metadata based on a byte array
* object. If the file data is null
, then only the associated
* metadata (i.e., title
, description
, and
* parameters in the serviceContext
) will be updated.
*
*
* This method takes two file names, the sourceFileName
and the
* title
. The sourceFileName
corresponds to the
* name of the actual file being uploaded. The title
* corresponds to a name the client wishes to assign this file after it has
* been uploaded to the portal.
*
*
* @param fileEntryId the primary key of the file entry
* @param sourceFileName the original file's name (optionally
null
)
* @param mimeType the file's MIME type (optionally null
)
* @param title the new name to be assigned to the file (optionally
null
)
* @param description the file's new description
* @param changeLog the file's version change log (optionally
null
)
* @param majorVersion whether the new file version is a major version
* @param bytes the file's data (optionally null
)
* @param serviceContext the service context to be applied. Can set the
asset category IDs, asset tag names, and expando bridge
attributes for the file entry. In a Liferay repository, it may
include: - fileEntryTypeId - ID for a custom file entry
type
- fieldsMap - mapping for fields associated with a
custom file entry type
* @return the file entry
*/
public FileEntry updateFileEntry(long fileEntryId,
java.lang.String sourceFileName, java.lang.String mimeType,
java.lang.String title, java.lang.String description,
java.lang.String changeLog, boolean majorVersion, byte[] bytes,
ServiceContext serviceContext) throws PortalException;
/**
* Updates a file entry and associated metadata based on a {@link File}
* object. If the file data is null
, then only the associated
* metadata (i.e., title
, description
, and
* parameters in the serviceContext
) will be updated.
*
*
* This method takes two file names, the sourceFileName
and the
* title
. The sourceFileName
corresponds to the
* name of the actual file being uploaded. The title
* corresponds to a name the client wishes to assign this file after it has
* been uploaded to the portal.
*
*
* @param fileEntryId the primary key of the file entry
* @param sourceFileName the original file's name (optionally
null
)
* @param mimeType the file's MIME type (optionally null
)
* @param title the new name to be assigned to the file (optionally
null
)
* @param description the file's new description
* @param changeLog the file's version change log (optionally
null
)
* @param majorVersion whether the new file version is a major version
* @param file the file's data (optionally null
)
* @param serviceContext the service context to be applied. Can set the
asset category IDs, asset tag names, and expando bridge
attributes for the file entry. In a Liferay repository, it may
include: - fileEntryTypeId - ID for a custom file entry
type
- fieldsMap - mapping for fields associated with a
custom file entry type
* @return the file entry
*/
public FileEntry updateFileEntry(long fileEntryId,
java.lang.String sourceFileName, java.lang.String mimeType,
java.lang.String title, java.lang.String description,
java.lang.String changeLog, boolean majorVersion, File file,
ServiceContext serviceContext) throws PortalException;
/**
* Updates a file entry and associated metadata based on an {@link
* InputStream} object. If the file data is null
, then only the
* associated metadata (i.e., title
, description
,
* and parameters in the serviceContext
) will be updated.
*
*
* This method takes two file names, the sourceFileName
and the
* title
. The sourceFileName
corresponds to the
* name of the actual file being uploaded. The title
* corresponds to a name the client wishes to assign this file after it has
* been uploaded to the portal.
*
*
* @param fileEntryId the primary key of the file entry
* @param sourceFileName the original file's name (optionally
null
)
* @param mimeType the file's MIME type (optionally null
)
* @param title the new name to be assigned to the file (optionally
null
)
* @param description the file's new description
* @param changeLog the file's version change log (optionally
null
)
* @param majorVersion whether the new file version is a major version
* @param is the file's data (optionally null
)
* @param size the file's size (optionally 0
)
* @param serviceContext the service context to be applied. Can set the
asset category IDs, asset tag names, and expando bridge
attributes for the file entry. In a Liferay repository, it may
include: - fileEntryTypeId - ID for a custom file entry
type
- fieldsMap - mapping for fields associated with a
custom file entry type
* @return the file entry
*/
public FileEntry updateFileEntry(long fileEntryId,
java.lang.String sourceFileName, java.lang.String mimeType,
java.lang.String title, java.lang.String description,
java.lang.String changeLog, boolean majorVersion, InputStream is,
long size, ServiceContext serviceContext) throws PortalException;
public FileEntry updateFileEntryAndCheckIn(long fileEntryId,
java.lang.String sourceFileName, java.lang.String mimeType,
java.lang.String title, java.lang.String description,
java.lang.String changeLog, boolean majorVersion, File file,
ServiceContext serviceContext) throws PortalException;
public FileEntry updateFileEntryAndCheckIn(long fileEntryId,
java.lang.String sourceFileName, java.lang.String mimeType,
java.lang.String title, java.lang.String description,
java.lang.String changeLog, boolean majorVersion, InputStream is,
long size, ServiceContext serviceContext) throws PortalException;
/**
* Updates a file shortcut to the existing file entry. This method is only
* supported by the Liferay repository.
*
* @param fileShortcutId the primary key of the file shortcut
* @param folderId the primary key of the file shortcut's parent folder
* @param toFileEntryId the primary key of the file shortcut's file entry
* @param serviceContext the service context to be applied. Can set the
asset category IDs, asset tag names, and expando bridge
attributes for the file entry.
* @return the file shortcut
*/
public FileShortcut updateFileShortcut(long fileShortcutId, long folderId,
long toFileEntryId, ServiceContext serviceContext)
throws PortalException;
/**
* Updates the folder.
*
* @param folderId the primary key of the folder
* @param name the folder's new name
* @param description the folder's new description
* @param serviceContext the service context to be applied. In a Liferay
repository, it may include: - defaultFileEntryTypeId -
the file entry type to default all Liferay file entries to
- dlFileEntryTypesSearchContainerPrimaryKeys - a
comma-delimited list of file entry type primary keys allowed in
the given folder and all descendants
- restrictionType -
specifying restriction type of file entry types allowed
- workflowDefinitionXYZ - the workflow definition name
specified per file entry type. The parameter name must be the
string
workflowDefinition
appended by the
fileEntryTypeId
(optionally 0
).
* @return the folder
*/
public Folder updateFolder(long folderId, java.lang.String name,
java.lang.String description, ServiceContext serviceContext)
throws PortalException;
/**
* Returns true
if the file entry is checked out. This method
* is primarily used by WebDAV.
*
* @param repositoryId the primary key for the repository
* @param fileEntryId the primary key for the file entry
* @param lockUuid the lock's UUID
* @return true
if the file entry is checked out;
false
otherwise
*/
public boolean verifyFileEntryCheckOut(long repositoryId, long fileEntryId,
java.lang.String lockUuid) throws PortalException;
public boolean verifyFileEntryLock(long repositoryId, long fileEntryId,
java.lang.String lockUuid) throws PortalException;
/**
* Returns true
if the inheritable lock exists. This method is
* primarily used by WebDAV.
*
* @param repositoryId the primary key for the repository
* @param folderId the primary key for the folder
* @param lockUuid the lock's UUID
* @return true
if the inheritable lock exists;
false
otherwise
*/
public boolean verifyInheritableLock(long repositoryId, long folderId,
java.lang.String lockUuid) throws PortalException;
}