public static final class PublishInfo.Builder
extends java.lang.Object
PublishInfo
.Constructor and Description |
---|
PublishInfo.Builder()
Constructor with parameters for the required properties of
PublishInfo . |
Modifier and Type | Method and Description |
---|---|
PublishInfo |
build() |
PublishInfo.Builder |
setAuthenticationMethod(PublishInfo.AuthenticationMethod authenticationMethod)
Indicates how a subscribed library should authenticate (BASIC, NONE) to the
published library endpoint.
|
PublishInfo.Builder |
setCurrentPassword(char[] currentPassword)
The current password to verify.
|
PublishInfo.Builder |
setPassword(char[] password)
The new password to require for authentication.
|
PublishInfo.Builder |
setPersistJsonEnabled(java.lang.Boolean persistJsonEnabled)
Whether library and library item metadata are persisted in the storage backing
as JSON files.
|
PublishInfo.Builder |
setPublished(java.lang.Boolean published)
Whether the local library is published.
|
PublishInfo.Builder |
setPublishUrl(java.net.URI publishUrl)
The URL to which the library metadata is published by the Content Library
Service.
|
PublishInfo.Builder |
setUserName(java.lang.String userName)
The username to require for authentication.
|
public PublishInfo.Builder()
PublishInfo
.public PublishInfo.Builder setAuthenticationMethod(PublishInfo.AuthenticationMethod authenticationMethod)
LocalLibrary.create(java.lang.String, com.vmware.content.LibraryModel)
method. It is optional for the LocalLibrary.update(java.lang.String, com.vmware.content.LibraryModel)
operation, and if null
the value will not be changed. When the existing
authentication method is PublishInfo.AuthenticationMethod.BASIC
and
authentication is being turned off by updating this property to PublishInfo.AuthenticationMethod.NONE
, then the
PublishInfo.getCurrentPassword()
property is
required. This property will always be present in the results of the LocalLibrary.get(java.lang.String)
method.authenticationMethod
- New value for the property.public PublishInfo.Builder setPublished(java.lang.Boolean published)
LocalLibrary.create(java.lang.String, com.vmware.content.LibraryModel)
method. It is optional for the LocalLibrary.update(java.lang.String, com.vmware.content.LibraryModel)
operation, and if null
the value will not be changed. When the existing
authentication method is PublishInfo.AuthenticationMethod.BASIC
and the local
library is published, the PublishInfo.getCurrentPassword()
property is required
before turning off publishing. This property will always be present in the
results of the LocalLibrary.get(java.lang.String)
method.published
- New value for the property.public PublishInfo.Builder setPublishUrl(java.net.URI publishUrl)
This value can be used to set the SubscriptionInfo.getSubscriptionUrl()
property when
creating a subscribed library.
create
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.publishUrl
- New value for the property.public PublishInfo.Builder setUserName(java.lang.String userName)
LocalLibrary.create(java.lang.String, com.vmware.content.LibraryModel)
and LocalLibrary.update(java.lang.String, com.vmware.content.LibraryModel)
methods. When the
authentication method is PublishInfo.AuthenticationMethod.NONE
, the username
can be left null
. When the authentication method is PublishInfo.AuthenticationMethod.BASIC
, the username
is ignored in the current release. It defaults to "vcsp". It is preferable to
leave this null
. If specified, it must be set to "vcsp".userName
- New value for the property.public PublishInfo.Builder setPassword(char[] password)
LocalLibrary.create(java.lang.String, com.vmware.content.LibraryModel)
method. When the authentication method is PublishInfo.AuthenticationMethod.NONE
, the password
can be left null
. When the authentication method is PublishInfo.AuthenticationMethod.BASIC
, the password
should be a non-empty string. This property is optional for the LocalLibrary.update(java.lang.String, com.vmware.content.LibraryModel)
method. Leaving it null
during
update indicates that the password is not changed. When the password is changed,
the PublishInfo.getCurrentPassword()
property
is required. This property is not used for the LocalLibrary.get(java.lang.String)
method.password
- New value for the property.public PublishInfo.Builder setCurrentPassword(char[] currentPassword)
LocalLibrary.create(java.lang.String, com.vmware.content.LibraryModel)
method. This property is optional for the LocalLibrary.update(java.lang.String, com.vmware.content.LibraryModel)
method. When the existing authentication
method is PublishInfo.AuthenticationMethod.NONE
, the current
password can be left null
. When the existing authentication method is
PublishInfo.AuthenticationMethod.BASIC
, the
current password is verified before applying the new PublishInfo.getPassword()
, turning off authentication,
or unpublishing the library. This property is not used for the LocalLibrary.get(java.lang.String)
method.currentPassword
- New value for the property.public PublishInfo.Builder setPersistJsonEnabled(java.lang.Boolean persistJsonEnabled)
Enabling JSON persistence allows you to synchronize a subscribed library
manually instead of over HTTP. You copy the local library content and metadata
to another storage backing manually and then create a subscribed library
referencing the location of the library JSON file in the SubscriptionInfo.getSubscriptionUrl()
. When the
subscribed library's storage backing matches the subscription URL, files do not
need to be copied to the subscribed library.
For a library backed by a datastore, the library JSON file will be stored at the path contentlib-{library_id}/lib.json on the datastore.
For a library backed by a remote file system, the library JSON file will be stored at {library_id}/lib.json in the remote file system path.
This property is optional for thecreate
method. It will always be
present in the return value of the get
or list
methods. It is
optional for the update
method.persistJsonEnabled
- New value for the property.public PublishInfo build()