ShareResource

Version 1.8 - Updated on 01/12/2017

Contents

Introduction

public class ShareResource

This class stores the details of a shared resource and can be used to create shares. Refer to the corresponding API methods in CloudAPI class to retrieve resources to add to a share.

getName

public String getName()

Retrieve the name of the resource to be added to a share.

  • Returns: the name of the resource

setName

public void setName(String name)

Sets the name of the resource to be added to a share. A share can contain a file, a folder or a playlist. You can obtain the name of the file or folder from a call to FullviewItem#getName(), Photo#getName(), Audio#getName(), Video#getName(), File#getName(), or MetadataItem#getName(). You can obtain the name of the playlist from a call to Playlist#getName().

Refer to the corresponding API methods in CloudAPI class to retrieve resources to add to a share.

  • Parameters: name — the name of a resource to be added to the share

getType

public String getType()

Retrieves the type of the resource to be added to a share.

  • Returns: the type of the resource

getSubType

public String getSubType()

Retrieves the subType of the resource to be added to a share.

  • Returns: the subType of the resource

getLocation

public String getLocation()

Retrieves the location of the resource.

  • Returns: the location of the resource.

setLocation

public void setLocation(String location)

Sets the location of the resource to be added to the share. The location is the URI of a file, folder or a playlist. You can obtain the URI for a file or a folder from a call to FullviewItem#getUri(), Photo#getUri(), Audio#getUri(), Video#getUri(), File#getUri(), or MetadataItem#getUri(). You can obtain the URI for a playlist from a call to Playlist#getUri().

Refer to the corresponding API methods in CloudAPI class to retrieve resources to add to a share.

  • Parameters: location

getSize

public Long getSize()

Retrieves the size of the resource.

  • Returns: the size of the resource

setSize

public void setSize(Long size)

Sets the size of the resource to be added to a share. The size parameter is required for a file. You can obtain the size of a file from a successful call to FullviewItem#getSize(), Photo#getSize(), Audio#getSize(), Video#getSize(), File#getSize() or MetadataItem#getSize(). Set the size parameter to the value of -1 for a folder or a playlist.

Refer to the corresponding API methods in CloudAPI class to retrieve resources to add to a share.

  • Parameters: size

setType

public void setType(String type)

Sets the resource type. Supported types are:

  • file
  • folder
  • playlist

    • Parameters: type — Type to be set for the resource. Supported values are:
      • file
      • folder
      • playlist

setSubType

public void setSubType(String subType)

Sets the resource sub-type. Supported sub-types are: - audio - image - video

  • Parameters: subType — SubType to be set for the resource. Supported values are:
    • audio
    • image
    • video

Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.