IShare
in
This interface allows to represent a share object.
This interface must not be implemented in your application.
Tags
Table of Contents
Constants
- STATUS_ACCEPTED = 1
- STATUS_PENDING = 0
- STATUS_REJECTED = 2
- TYPE_CIRCLE = 7
- TYPE_DECK = 12
- TYPE_EMAIL = 4
- TYPE_GROUP = 1
- TYPE_GUEST = 8
- TYPE_LINK = 3
- TYPE_REMOTE = 6
- TYPE_REMOTE_GROUP = 9
- TYPE_ROOM = 10
- TYPE_SCIENCEMESH = 15
- TYPE_USER = 0
Methods
- getAttributes() : IAttributes|null
- Get share attributes
- getExpirationDate() : DateTime|null
- Get the expiration date
- getFullId() : string
- Get the full share id. This is the <providerid>:<internalid>.
- getHideDownload() : bool
- Gets a shares hide download state This is mainly for public shares. It will signal that the share page should hide download buttons etc.
- getId() : string
- Get the internal id of the share.
- getLabel() : string
- get label for the share, some shares, e.g. public links can have a label
- getMailSend() : bool
- Get if the recipient should be informed by mail about the share.
- getNode() : File|Folder
- Get the node of the file/folder that is shared
- getNodeCacheEntry() : null|ICacheEntry
- Get the cache entry for the shared node
- getNodeId() : int
- Get the fileid of the node of this share
- getNodeType() : string
- Get the type of node (file/folder)
- getNoExpirationDate() : bool
- Get value of overwrite falsy expiry date flag
- getNote() : string
- Get note attached to a share
- getPassword() : string|null
- Get the password of this share.
- getPasswordExpirationTime() : DateTimeInterface|null
- Get the password's expiration time of this share.
- getPermissions() : int
- Get the share permissions See \OCP\Constants::PERMISSION_*
- getReminderSent() : bool
- Gets a flag that stores whether a reminder via email has been sent
- getSendPasswordByTalk() : bool
- Get if the recipient can start a conversation with the owner to get the password using Nextcloud Talk.
- getSharedBy() : string
- Get share sharer
- getSharedWith() : string
- Get the receiver of this share.
- getSharedWithAvatar() : string
- Get the avatar of the receiver of this share.
- getSharedWithDisplayName() : string
- Get the display name of the receiver of this share.
- getShareOwner() : string
- Get the original share owner (who owns the path that is shared)
- getShareTime() : DateTime
- Get the timestamp this share was created
- getShareType() : int
- Get the shareType
- getStatus() : int
- Get the accepted status See self::STATUS_*
- getTarget() : string
- Get the target path of this share relative to the recipients user folder.
- getToken() : string
- Get the public link token.
- isExpired() : bool
- Is the share expired ?
- newAttributes() : IAttributes
- Create share attributes object
- setAttributes() : IShare
- Set share attributes
- setExpirationDate() : IShare
- Set the expiration date
- setHideDownload() : IShare
- Sets a shares hide download state This is mainly for public shares. It will signal that the share page should hide download buttons etc.
- setId() : IShare
- Set the internal id of the share It is only allowed to set the internal id of a share once.
- setLabel() : IShare
- set a label for a share, some shares, e.g. public links can have a label
- setMailSend() : IShare
- Set if the recipient should be informed by mail about the share.
- setNode() : IShare
- Set the node of the file/folder that is shared
- setNodeCacheEntry() : void
- Set the cache entry for the shared node
- setNodeId() : IShare
- Set file id for lazy evaluation of the node
- setNodeType() : IShare
- Set the type of node (file/folder)
- setNoExpirationDate() : IShare
- Set overwrite flag for falsy expiry date vavlues
- setNote() : IShare
- Attach a note to a share
- setPassword() : IShare
- Set the password for this share.
- setPasswordExpirationTime() : self
- Set the password's expiration time of this share.
- setPermissions() : IShare
- Set the permissions.
- setProviderId() : IShare
- Set the provider id of the share It is only allowed to set the provider id of a share once.
- setReminderSent() : self
- Sets a flag that stores whether a reminder via email has been sent
- setSendPasswordByTalk() : IShare
- Set if the recipient can start a conversation with the owner to get the password using Nextcloud Talk.
- setSharedBy() : IShare
- Set the sharer of the path.
- setSharedWith() : IShare
- Set the receiver of this share.
- setSharedWithAvatar() : IShare
- Set the avatar of the receiver of this share.
- setSharedWithDisplayName() : IShare
- Set the display name of the receiver of this share.
- setShareOwner() : IShare
- Set the original share owner (who owns the path that is shared)
- setShareTime() : IShare
- Set the time this share was created
- setShareType() : IShare
- Set the shareType
- setStatus() : IShare
- Set the accepted status See self::STATUS_*
- setTarget() : IShare
- Set the target path of this share relative to the recipients user folder.
- setToken() : IShare
- Set the public link token.
Constants
STATUS_ACCEPTED
public
mixed
STATUS_ACCEPTED
= 1
Tags
STATUS_PENDING
public
mixed
STATUS_PENDING
= 0
Tags
STATUS_REJECTED
public
mixed
STATUS_REJECTED
= 2
Tags
TYPE_CIRCLE
public
mixed
TYPE_CIRCLE
= 7
Tags
TYPE_DECK
public
mixed
TYPE_DECK
= 12
Tags
TYPE_EMAIL
public
mixed
TYPE_EMAIL
= 4
Tags
TYPE_GROUP
public
mixed
TYPE_GROUP
= 1
Tags
TYPE_GUEST
public
mixed
TYPE_GUEST
= 8
Tags
TYPE_LINK
public
mixed
TYPE_LINK
= 3
Tags
TYPE_REMOTE
public
mixed
TYPE_REMOTE
= 6
Tags
TYPE_REMOTE_GROUP
public
mixed
TYPE_REMOTE_GROUP
= 9
Tags
TYPE_ROOM
public
mixed
TYPE_ROOM
= 10
Tags
TYPE_SCIENCEMESH
public
mixed
TYPE_SCIENCEMESH
= 15
Tags
TYPE_USER
public
mixed
TYPE_USER
= 0
Tags
Methods
getAttributes()
Get share attributes
public
getAttributes() : IAttributes|null
Tags
Return values
IAttributes|nullgetExpirationDate()
Get the expiration date
public
getExpirationDate() : DateTime|null
Tags
Return values
DateTime|nullgetFullId()
Get the full share id. This is the <providerid>:<internalid>.
public
getFullId() : string
The full id is unique in the system.
Tags
Return values
stringgetHideDownload()
Gets a shares hide download state This is mainly for public shares. It will signal that the share page should hide download buttons etc.
public
getHideDownload() : bool
Tags
Return values
boolgetId()
Get the internal id of the share.
public
getId() : string
Tags
Return values
stringgetLabel()
get label for the share, some shares, e.g. public links can have a label
public
getLabel() : string
Tags
Return values
stringgetMailSend()
Get if the recipient should be informed by mail about the share.
public
getMailSend() : bool
Tags
Return values
boolgetNode()
Get the node of the file/folder that is shared
public
getNode() : File|Folder
Tags
Return values
File|FoldergetNodeCacheEntry()
Get the cache entry for the shared node
public
getNodeCacheEntry() : null|ICacheEntry
Tags
Return values
null|ICacheEntrygetNodeId()
Get the fileid of the node of this share
public
getNodeId() : int
Tags
Return values
intgetNodeType()
Get the type of node (file/folder)
public
getNodeType() : string
Tags
Return values
stringgetNoExpirationDate()
Get value of overwrite falsy expiry date flag
public
getNoExpirationDate() : bool
Tags
Return values
boolgetNote()
Get note attached to a share
public
getNote() : string
Tags
Return values
stringgetPassword()
Get the password of this share.
public
getPassword() : string|null
If this share is obtained via a shareprovider the password is hashed.
Tags
Return values
string|nullgetPasswordExpirationTime()
Get the password's expiration time of this share.
public
getPasswordExpirationTime() : DateTimeInterface|null
Tags
Return values
DateTimeInterface|nullgetPermissions()
Get the share permissions See \OCP\Constants::PERMISSION_*
public
getPermissions() : int
Tags
Return values
intgetReminderSent()
Gets a flag that stores whether a reminder via email has been sent
public
getReminderSent() : bool
Tags
Return values
boolgetSendPasswordByTalk()
Get if the recipient can start a conversation with the owner to get the password using Nextcloud Talk.
public
getSendPasswordByTalk() : bool
The returned value does not take into account other factors, like Talk being enabled for the owner of the share or not; it just cover whether the option is enabled for the share itself or not.
Tags
Return values
boolgetSharedBy()
Get share sharer
public
getSharedBy() : string
Tags
Return values
stringgetSharedWith()
Get the receiver of this share.
public
getSharedWith() : string
Tags
Return values
stringgetSharedWithAvatar()
Get the avatar of the receiver of this share.
public
getSharedWithAvatar() : string
Tags
Return values
stringgetSharedWithDisplayName()
Get the display name of the receiver of this share.
public
getSharedWithDisplayName() : string
Tags
Return values
stringgetShareOwner()
Get the original share owner (who owns the path that is shared)
public
getShareOwner() : string
Tags
Return values
stringgetShareTime()
Get the timestamp this share was created
public
getShareTime() : DateTime
Tags
Return values
DateTimegetShareType()
Get the shareType
public
getShareType() : int
Tags
Return values
intgetStatus()
Get the accepted status See self::STATUS_*
public
getStatus() : int
Tags
Return values
intgetTarget()
Get the target path of this share relative to the recipients user folder.
public
getTarget() : string
Tags
Return values
stringgetToken()
Get the public link token.
public
getToken() : string
Tags
Return values
stringisExpired()
Is the share expired ?
public
isExpired() : bool
Tags
Return values
boolnewAttributes()
Create share attributes object
public
newAttributes() : IAttributes
Tags
Return values
IAttributessetAttributes()
Set share attributes
public
setAttributes(IAttributes|null $attributes) : IShare
Parameters
- $attributes : IAttributes|null
Tags
Return values
IShare —The modified object
setExpirationDate()
Set the expiration date
public
setExpirationDate(DateTime|null $expireDate) : IShare
Parameters
- $expireDate : DateTime|null
Tags
Return values
IShare —The modified object
setHideDownload()
Sets a shares hide download state This is mainly for public shares. It will signal that the share page should hide download buttons etc.
public
setHideDownload(bool $hide) : IShare
Parameters
- $hide : bool
Tags
Return values
ISharesetId()
Set the internal id of the share It is only allowed to set the internal id of a share once.
public
setId(string $id) : IShare
Attempts to override the internal id will result in an IllegalIDChangeException
Parameters
- $id : string
Tags
Return values
ISharesetLabel()
set a label for a share, some shares, e.g. public links can have a label
public
setLabel(string $label) : IShare
Parameters
- $label : string
Tags
Return values
IShare —The modified object
setMailSend()
Set if the recipient should be informed by mail about the share.
public
setMailSend(bool $mailSend) : IShare
Parameters
- $mailSend : bool
Tags
Return values
IShare —The modified object
setNode()
Set the node of the file/folder that is shared
public
setNode(Node $node) : IShare
Parameters
- $node : Node
Tags
Return values
IShare —The modified object
setNodeCacheEntry()
Set the cache entry for the shared node
public
setNodeCacheEntry(ICacheEntry $entry) : void
Parameters
- $entry : ICacheEntry
Tags
setNodeId()
Set file id for lazy evaluation of the node
public
setNodeId(int $fileId) : IShare
Parameters
- $fileId : int
Tags
Return values
IShare —The modified object
setNodeType()
Set the type of node (file/folder)
public
setNodeType(string $type) : IShare
Parameters
- $type : string
Tags
Return values
IShare —The modified object
setNoExpirationDate()
Set overwrite flag for falsy expiry date vavlues
public
setNoExpirationDate(bool $noExpirationDate) : IShare
Parameters
- $noExpirationDate : bool
Tags
Return values
IShare —The modified object
setNote()
Attach a note to a share
public
setNote(string $note) : IShare
Parameters
- $note : string
Tags
Return values
IShare —The modified object
setPassword()
Set the password for this share.
public
setPassword(string|null $password) : IShare
When the share is passed to the share manager to be created or updated the password will be hashed.
Parameters
- $password : string|null
Tags
Return values
IShare —The modified object
setPasswordExpirationTime()
Set the password's expiration time of this share.
public
setPasswordExpirationTime([DateTimeInterface|null $passwordExpirationTime = null ]) : self
Parameters
- $passwordExpirationTime : DateTimeInterface|null = null
Tags
Return values
self —The modified object
setPermissions()
Set the permissions.
public
setPermissions(int $permissions) : IShare
See \OCP\Constants::PERMISSION_*
Parameters
- $permissions : int
Tags
Return values
IShare —The modified object
setProviderId()
Set the provider id of the share It is only allowed to set the provider id of a share once.
public
setProviderId(string $id) : IShare
Attempts to override the provider id will result in an IllegalIDChangeException
Parameters
- $id : string
Tags
Return values
ISharesetReminderSent()
Sets a flag that stores whether a reminder via email has been sent
public
setReminderSent(bool $reminderSent) : self
Parameters
- $reminderSent : bool
Tags
Return values
self —The modified object
setSendPasswordByTalk()
Set if the recipient can start a conversation with the owner to get the password using Nextcloud Talk.
public
setSendPasswordByTalk(bool $sendPasswordByTalk) : IShare
Parameters
- $sendPasswordByTalk : bool
Tags
Return values
IShare —The modified object
setSharedBy()
Set the sharer of the path.
public
setSharedBy(string $sharedBy) : IShare
Parameters
- $sharedBy : string
Tags
Return values
IShare —The modified object
setSharedWith()
Set the receiver of this share.
public
setSharedWith(string $sharedWith) : IShare
Parameters
- $sharedWith : string
Tags
Return values
IShare —The modified object
setSharedWithAvatar()
Set the avatar of the receiver of this share.
public
setSharedWithAvatar(string $src) : IShare
Parameters
- $src : string
Tags
Return values
IShare —The modified object
setSharedWithDisplayName()
Set the display name of the receiver of this share.
public
setSharedWithDisplayName(string $displayName) : IShare
Parameters
- $displayName : string
Tags
Return values
IShare —The modified object
setShareOwner()
Set the original share owner (who owns the path that is shared)
public
setShareOwner(string $shareOwner) : IShare
Parameters
- $shareOwner : string
Tags
Return values
IShare —The modified object
setShareTime()
Set the time this share was created
public
setShareTime(DateTime $shareTime) : IShare
Parameters
- $shareTime : DateTime
Tags
Return values
IShare —The modified object
setShareType()
Set the shareType
public
setShareType(int $shareType) : IShare
Parameters
- $shareType : int
Tags
Return values
IShare —The modified object
setStatus()
Set the accepted status See self::STATUS_*
public
setStatus(int $status) : IShare
Parameters
- $status : int
Tags
Return values
IShare —The modified object
setTarget()
Set the target path of this share relative to the recipients user folder.
public
setTarget(string $target) : IShare
Parameters
- $target : string
Tags
Return values
IShare —The modified object
setToken()
Set the public link token.
public
setToken(string $token) : IShare
Parameters
- $token : string
Tags
Return values
IShare —The modified object