nextcloud/lib/public/share/ishare.php

284 lines
5.1 KiB
PHP
Raw Normal View History

<?php
/**
* @author Roeland Jago Douma <rullzer@owncloud.com>
*
2016-01-12 17:02:16 +03:00
* @copyright Copyright (c) 2016, ownCloud, Inc.
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
2016-01-27 14:13:53 +03:00
namespace OCP\Share;
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\Node;
use OCP\IUser;
use OCP\IGroup;
2016-01-27 14:13:53 +03:00
/**
* Interface IShare
*
* @package OCP\Share
* @since 9.0.0
*/
interface IShare {
/**
* Get the id of the share
*
* @return string
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getId();
/**
* Set the id of the share
*
* @param string $id
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified share object
* @since 9.0.0
*/
public function setId($id);
/**
* Get the full share id
*
* @return string
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getFullId();
/**
* Set the provider id
*
* @param string $id
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified share object\
* @since 9.0.0
*/
public function setProviderId($id);
/**
* Set the path of this share
*
2015-11-24 11:58:37 +03:00
* @param Node $path
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setPath(Node $path);
/**
* Get the path of this share for the current user
2016-01-27 14:13:53 +03:00
*
* @return File|Folder
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getPath();
/**
* Set the shareType
*
* @param int $shareType
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setShareType($shareType);
/**
2016-01-27 14:13:53 +03:00
* Get the shareType
*
* @return int
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getShareType();
/**
* Set the receiver of this share
*
* @param IUser|IGroup|string
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setSharedWith($sharedWith);
/**
* Get the receiver of this share
*
* @return IUser|IGroup|string
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getSharedWith();
/**
* Set the permissions
*
* @param int $permissions
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setPermissions($permissions);
/**
* Get the share permissions
*
* @return int
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getPermissions();
/**
* Set the expiration date
*
* @param \DateTime $expireDate
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setExpirationDate($expireDate);
/**
* Get the share expiration date
*
* @return \DateTime
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getExpirationDate();
/**
* Set the sharer of the path
*
* @param IUser|string $sharedBy
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setSharedBy($sharedBy);
/**
* Get share sharer
*
* @return IUser|string
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getSharedBy();
/**
* Set the original share owner (who owns the path)
*
* @param IUser|string
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setShareOwner($shareOwner);
/**
* Get the original share owner (who owns the path)
2016-01-27 14:13:53 +03:00
*
* @return IUser|string
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getShareOwner();
/**
* Set the password
*
* @param string $password
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setPassword($password);
/**
* Is a password set for this share
*
* @return string
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getPassword();
/**
* Set the token
*
* @param string $token
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setToken($token);
/**
* Get the token
*
* @return string
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getToken();
/**
* Get the parent it
*
* @return int
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getParent();
2015-11-02 23:06:55 +03:00
/**
* Set the target of this share
*
* @param string $target
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
*/
public function setTarget($target);
2015-11-02 23:06:55 +03:00
/**
* Get the target of this share
*
* @return string
2016-01-27 14:13:53 +03:00
* @since 9.0.0
2015-11-02 23:06:55 +03:00
*/
public function getTarget();
2016-01-27 13:50:49 +03:00
/**
* Set the time this share was created
*
* @param int $shareTime
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
2016-01-27 13:50:49 +03:00
*/
public function setShareTime($shareTime);
/**
* Get the timestamp this share was created
*
* @return int
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
2016-01-27 13:50:49 +03:00
public function getShareTime();
/**
* Set mailSend
*
* @param bool $mailSend
2016-01-27 14:13:53 +03:00
* @return \OCP\Share\IShare The modified object
* @since 9.0.0
2016-01-27 13:50:49 +03:00
*/
public function setMailSend($mailSend);
/**
* Get mailSend
*
* @return bool
2016-01-27 14:13:53 +03:00
* @since 9.0.0
*/
public function getMailSend();
}