All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liferay.document.library.repository.external.ExtRepositoryObject Maven / Gradle / Ivy

There is a newer version: 7.4.3.112-ga112
Show newest version
/**
 * 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.repository.external;

import java.util.Date;

/**
 * Represents the external repository object, being either an external
 * repository file object or folder object. All data returned by this class'
 * implementation is in native repository format.
 *
 * @author Iván Zaera
 * @author Sergio González
 */
public interface ExtRepositoryObject extends ExtRepositoryModel {

	/**
	 * Returns true if the user has permission to perform the
	 * action on the external repository object.
	 *
	 * @param  extRepositoryPermission the action to check for permission
	 * @return true if the user has permission to perform the
	 *         action on the external repository object; false
	 *         otherwise
	 */
	public boolean containsPermission(
		ExtRepositoryPermission extRepositoryPermission);

	/**
	 * Returns the external repository object's description. The object's
	 * description is not its name.
	 *
	 * @return the external repository object's description
	 */
	public String getDescription();

	/**
	 * Returns the external repository object's file or folder extension,
	 * excluding any leading period.
	 *
	 * @return the external repository object's file or folder extension,
	 *         excluding any leading period
	 */
	public String getExtension();

	/**
	 * Returns the external repository object's last modified date.
	 *
	 * @return the external repository object's last modified date
	 */
	public Date getModifiedDate();

	/**
	 * Holds the permissions that external repositories must support. In this
	 * context, the external repository implementation may be asked about a
	 * permission, and it must answer correctly, but is not required to fully
	 * implement it.
	 *
	 * 

* For instance, an external repository must not fail when asked about the * ADD_SHORTCUT permission, even if the back-end external * repository does not support shortcuts. However, it can return * false when asked for that permission. *

*/ public enum ExtRepositoryPermission { ACCESS, ADD_DISCUSSION, ADD_DOCUMENT, ADD_FOLDER, ADD_SHORTCUT, ADD_SUBFOLDER, DELETE, DELETE_DISCUSSION, PERMISSIONS, UPDATE, UPDATE_DISCUSSION, VIEW } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy