Class LrPublishedCollectionSet
Access the functions and properties from the object. Retrieve the objects for the top level published-collection sets by calling LrCatalog:getPublishedCollectionSets(). For a particular publish service, retrieve collection sets that are immediate children of this set with LrPublishService:getChildCollectionSets(). To get immediate children sets, use this object's getChildCollectionSets()
method.
You can create a new collection set object using LrCatalog.createPublishedCollectionSet(). This must be called from within one of the with__WriteAccessDo
gates. The new collection set is not available for access until that function returns.
Summary
LrCatalog
) The catalog object that contains this published-collection set.Functions
- pubCollectionSet:delete()
-
Removes this published-collection set from the catalog.
Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this collection.First supported in version 3.0 of the Lightroom SDK.
- pubCollectionSet:getChildCollectionSets()
-
Retrieves the published collection sets that are immediate children of this set, if any.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(array ofLrPublishedCollectionSet
) The published-collection set objects, or an empty array. - pubCollectionSet:getChildCollections()
-
Retrieves the published collections that are immediate children of this set. Does not go into nested sets.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(array ofLrPublishedCollection
) The published-collection objects. - pubCollectionSet:getChildren()
-
Retrieves all immediate members of this set, both published collections and collection sets.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(array ofLrPublishedCollection
andLrPublishedCollectionSet
) The collection and set objects. - pubCollectionSet:getCollectionSetInfoSummary()
-
Retrieves an information summary about this published collection set.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
A table with the following information:- name: Name of the published collection set.
- localIdentifier: Internal ID number of the collection set (the local identifier).
- remoteId: The ID of the collection set on the remote service.
- remoteUrl: URL of the collection set (if applicable) as published.
- isDefaultCollection: (Boolean) True if this is the default collection.
- parents: (array of tables) Information about any published collection sets that contain this collection. An array of tables, each containing
name
,localCollectionId
,remoteCollectionId
, andpublishedUrl
. - collectionSettings: (table) Any collection-specific settings that have been stored by the plug-in.
- publishSettings: (table) Publish settings for this plug-in.
- pubCollectionSet:getName()
-
Retrieves the current name of this set.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(string) The name. - pubCollectionSet:getParent()
-
Retrieves the parent set, if any of this published-collection set.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(LrPublishedCollectionSet
) The parent set, or nil. - pubCollectionSet:getRemoteId()
-
Retrieves the remote service's unique identifier for this published collection set, as previously recorded by the plug-in.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(string or number) The remote ID. - pubCollectionSet:getRemoteUrl()
-
Retrieves the URL for this published collection set, as assigned by the remote service and previously recorded by the plug-in.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(string or number) The remote URL. - pubCollectionSet:getService()
-
Retrieves the publish service that this set belongs to.
This function must be called from within an asynchronous task started using
LrTasks
.First supported in version 3.0 of the Lightroom SDK.
Return value
(LrPublishService) The publish-service object. - pubCollectionSet:setCollectionSetSettings( settings )
-
Sets the plug-in-specific settings for this published collection set. This is the same block of data that can be edited via the user interface if your plug-in implements the
viewForCollectionSetSettings
hook.Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this collection set.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. settings
- (table) The table of settings; contents are defined by the plug-in.
- pubCollectionSet:setName( name )
-
Sets a new name for this published collection set.
Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this collection.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. name
- (string) The new name.
Return value
True on success, false if there is already a published collection or collection set with the same name and parent. - pubCollectionSet:setParent( parent )
-
Sets a new parent for this published collection set. This function does not enforce any restrictions on collection-set depth, nor does it call the plug-in's
reparentPublishedCollection
callback. The plug-in is responsible for ensuring synchronization with the publication site.It is an error to set a parent that belongs to a different
LrPublishService
, or even to a different publish-service connection.Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this collection set.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. parent
- (
LrPublishedCollectionSet
) The new parent set in the sameLrPublishService
, or nil to make this an immediate child of the service that contains it.
- pubCollectionSet:setRemoteId( remoteId )
-
Sets the unique identifier for this published collection set as understood by the remote service.
Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this collection set.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. remoteId
- (string or number) The new remote ID.
- pubCollectionSet:setRemoteUrl( url )
-
Sets the URL for this published collection set, as provided by the remote service. It is not required to have a URL on record with Lightroom. If one is provided, it is displayed in the publish header in the Library grid and used to enable the "Go to Published Collection Set" command in the collection context menu.
Must be called from within one of the
catalog:with___WriteAccessDo
gates.This call can be used within the same
catalog:with___WriteAccessDo
call that created this collection set.First supported in version 3.0 of the Lightroom SDK.
Parameters
- 1. url
- (string) The URL.
- pubCollectionSet:type()
-
Reports the type of this object.
First supported in version 3.0 of the Lightroom SDK.
Return value
(string) 'LrPublishedCollectionSet'.
Properties
- pubCollectionSet.catalog : (Read-Only)
-
(
LrCatalog
) The catalog object that contains this published-collection set.First supported in version 3.0 of the Lightroom SDK.
See also: LrCatalog - pubCollectionSet.localIdentifier : (Read-Only)
-
(number) The local identifier of the published collection, unique within the catalog.
Must not be called from within the same
catalog:with___WriteAccessDo
gate in which the collection object was created.First supported in version 3.0 of the Lightroom SDK.