public final class ItemModel
extends java.lang.Object
implements java.io.Serializable, com.vmware.vapi.bindings.StaticStructure
ItemModel
class represents a library item that has been stored in a
library.
A ItemModel
represents a single logical unit to be managed
within a LibraryModel
. Items contain the actual
content of a library, and their placement within a library determines policies
that affect that content such as publishing.
A library item can have a
specified type, indicated with the getType()
property. This property is
associated with a Content Library Service plugin that supports specific types
and provides additional services. The types available in a specific Content
Library Service can be queried using the Type
interface. Items of an unknown or unspecified type are treated generically.
Because subscribed library catalogs are synchronized as is, subscribing to a
remote Content Library Service effectively gives you a library with the
functionality of the remote service's type adapter plugins, even if they are not
installed locally.
Items can be managed using the Item
interface and, for items in subscribed
libraries, the SubscribedItem
interface.
Modifier and Type | Class and Description |
---|---|
static class |
ItemModel.Builder
Builder class for
ItemModel . |
Modifier and Type | Field and Description |
---|---|
protected com.vmware.vapi.data.StructValue |
__dynamicStructureFields |
Modifier | Constructor and Description |
---|---|
|
ItemModel()
Default constructor.
|
protected |
ItemModel(com.vmware.vapi.data.StructValue __dynamicStructureFields) |
Modifier and Type | Method and Description |
---|---|
<T extends com.vmware.vapi.bindings.Structure> |
_convertTo(java.lang.Class<T> clazz) |
java.lang.String |
_getCanonicalName() |
static java.lang.String |
_getCanonicalTypeName()
Returns the canonical type name.
|
static com.vmware.vapi.bindings.type.StructType |
_getClassType()
WARNING: Internal method, subject to change in future versions.
|
com.vmware.vapi.data.StructValue |
_getDataValue() |
com.vmware.vapi.data.DataValue |
_getDynamicField(java.lang.String fieldName) |
java.util.Set<java.lang.String> |
_getDynamicFieldNames() |
com.vmware.vapi.bindings.type.StructType |
_getType() |
boolean |
_hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz) |
static ItemModel |
_newInstance(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Returns new instance of this binding class and injects the provided data value. WARNING: The returned object is not fully initialized. |
static ItemModel |
_newInstance2(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Serves as a versioning mechanism. |
void |
_setDynamicField(java.lang.String fieldName,
com.vmware.vapi.data.DataValue fieldValue) |
protected void |
_updateDataValue(com.vmware.vapi.data.StructValue structValue) |
void |
_validate() |
boolean |
equals(java.lang.Object obj) |
java.lang.Boolean |
getCached()
The status that indicates whether the library item is on disk or not.
|
CertificateVerificationInfo |
getCertificateVerificationInfo()
Certificate verification status and
ItemModel 's signing certificate . |
java.lang.String |
getContentVersion()
The latest version of the file content list of this library item.
|
java.util.Calendar |
getCreationTime()
The date and time when this library item was created.
|
java.lang.String |
getDescription()
A human-readable description for this library item.
|
java.lang.String |
getId()
A unique identifier for this library item.
|
java.util.Calendar |
getLastModifiedTime()
The date and time when the metadata for this library item was last changed.
|
java.util.Calendar |
getLastSyncTime()
The date and time when this library item was last synchronized.
|
java.lang.String |
getLibraryId()
The identifier of the
LibraryModel to which this item
belongs. |
java.lang.String |
getMetadataVersion()
A version number for the metadata of this library item.
|
java.lang.String |
getName()
A human-readable name for this library item.
|
java.lang.Boolean |
getSecurityCompliance()
Shows the security compliance of
ItemModel . |
java.lang.Long |
getSize()
The library item size, in bytes.
|
java.lang.String |
getSourceId()
The identifier of the
ItemModel to which this
item is synchronized to if the item belongs to a subscribed library. |
java.lang.String |
getType()
An optional type identifier which indicates the type adapter plugin to use.
|
java.lang.String |
getVersion()
A version number that is updated on metadata changes.
|
int |
hashCode() |
void |
setCached(java.lang.Boolean cached)
The status that indicates whether the library item is on disk or not.
|
void |
setCertificateVerificationInfo(CertificateVerificationInfo certificateVerificationInfo)
Certificate verification status and
ItemModel 's signing certificate . |
void |
setContentVersion(java.lang.String contentVersion)
The latest version of the file content list of this library item.
|
void |
setCreationTime(java.util.Calendar creationTime)
The date and time when this library item was created.
|
void |
setDescription(java.lang.String description)
A human-readable description for this library item.
|
void |
setId(java.lang.String id)
A unique identifier for this library item.
|
void |
setLastModifiedTime(java.util.Calendar lastModifiedTime)
The date and time when the metadata for this library item was last changed.
|
void |
setLastSyncTime(java.util.Calendar lastSyncTime)
The date and time when this library item was last synchronized.
|
void |
setLibraryId(java.lang.String libraryId)
The identifier of the
LibraryModel to which this item
belongs. |
void |
setMetadataVersion(java.lang.String metadataVersion)
A version number for the metadata of this library item.
|
void |
setName(java.lang.String name)
A human-readable name for this library item.
|
void |
setSecurityCompliance(java.lang.Boolean securityCompliance)
Shows the security compliance of
ItemModel . |
void |
setSize(java.lang.Long size)
The library item size, in bytes.
|
void |
setSourceId(java.lang.String sourceId)
The identifier of the
ItemModel to which this
item is synchronized to if the item belongs to a subscribed library. |
void |
setType(java.lang.String type)
An optional type identifier which indicates the type adapter plugin to use.
|
void |
setVersion(java.lang.String version)
A version number that is updated on metadata changes.
|
java.lang.String |
toString() |
protected com.vmware.vapi.data.StructValue __dynamicStructureFields
public ItemModel()
protected ItemModel(com.vmware.vapi.data.StructValue __dynamicStructureFields)
public java.lang.String getId()
create
method. It will not be present
in the return value of the get
or list
methods. It is not used
for the update
method.com.vmware.content.library.Item
. When
methods return a value of this class as a return value, the property will be an
identifier for the resource type: com.vmware.content.library.Item
.public void setId(java.lang.String id)
create
method. It will not be present
in the return value of the get
or list
methods. It is not used
for the update
method.id
- New value for the property.
When clients pass a value of this class as a parameter, the property must be an
identifier for the resource type: com.vmware.content.library.Item
. When
methods return a value of this class as a return value, the property will be an
identifier for the resource type: com.vmware.content.library.Item
.public java.lang.String getLibraryId()
LibraryModel
to which this item
belongs.
This property must be provided for the 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.com.vmware.content.Library
. When
methods return a value of this class as a return value, the property will be an
identifier for the resource type: com.vmware.content.Library
.public void setLibraryId(java.lang.String libraryId)
LibraryModel
to which this item
belongs.
This property must be provided for the 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.libraryId
- New value for the property.
When clients pass a value of this class as a parameter, the property must be an
identifier for the resource type: com.vmware.content.Library
. When
methods return a value of this class as a return value, the property will be an
identifier for the resource type: com.vmware.content.Library
.public java.lang.String getContentVersion()
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.com.vmware.content.library.item.Version
. When methods return a value of this
class as a return value, the property will be an identifier for the resource
type: com.vmware.content.library.item.Version
.public void setContentVersion(java.lang.String contentVersion)
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.contentVersion
- New value for the property.
When clients pass a value of this class as a parameter, the property must be an
identifier for the resource type: com.vmware.content.library.item.Version
. When methods return a value of this
class as a return value, the property will be an identifier for the resource
type: com.vmware.content.library.item.Version
.public java.util.Calendar getCreationTime()
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.public void setCreationTime(java.util.Calendar creationTime)
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.creationTime
- New value for the property.public java.lang.String getDescription()
create
method. Leaving it null
during creation will result in an empty string value. It will always be present
in the result of a get
or list
method. It is optional for the
update
method. Leaving it null
during update indicates that the
description remains unchanged.public void setDescription(java.lang.String description)
create
method. Leaving it null
during creation will result in an empty string value. It will always be present
in the result of a get
or list
method. It is optional for the
update
method. Leaving it null
during update indicates that the
description remains unchanged.description
- New value for the property.public java.util.Calendar getLastModifiedTime()
This property is affected by changes to the properties or file content of this item. It is not modified by changes to the tags of the item, or by changes to the library which owns this item.
This property is not used for thecreate
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.public void setLastModifiedTime(java.util.Calendar lastModifiedTime)
This property is affected by changes to the properties or file content of this item. It is not modified by changes to the tags of the item, or by changes to the library which owns this item.
This property is not used for thecreate
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.lastModifiedTime
- New value for the property.public java.util.Calendar getLastSyncTime()
This
property is updated every time a synchronization is triggered on the library
item, including when a synchronization is triggered on the library to which this
item belongs. The value is null
for a library item that belongs to a
local library.
create
method. It is optional in the
return value of the get
or list
methods. It is not used for the
update
method.public void setLastSyncTime(java.util.Calendar lastSyncTime)
This
property is updated every time a synchronization is triggered on the library
item, including when a synchronization is triggered on the library to which this
item belongs. The value is null
for a library item that belongs to a
local library.
create
method. It is optional in the
return value of the get
or list
methods. It is not used for the
update
method.lastSyncTime
- New value for the property.public java.lang.String getMetadataVersion()
This value is incremented with each change to the metadata of this item. Changes to name, description, and so on will increment this value. The value is not incremented by changes to the content or tags of the item or the library which owns it.
This property is not used for thecreate
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.public void setMetadataVersion(java.lang.String metadataVersion)
This value is incremented with each change to the metadata of this item. Changes to name, description, and so on will increment this value. The value is not incremented by changes to the content or tags of the item or the library which owns it.
This property is not used for thecreate
method. It will always be
present in the return value of the get
or list
methods. It is
not used for the update
method.metadataVersion
- New value for the property.public java.lang.String getName()
The name may not be null
or an empty string. The name does not have to be unique, even within the
same library.
create
method. It will always be
present in the return value of the get
or list
methods. It is
optional for the update
method.public void setName(java.lang.String name)
The name may not be null
or an empty string. The name does not have to be unique, even within the
same library.
create
method. It will always be
present in the return value of the get
or list
methods. It is
optional for the update
method.name
- New value for the property.public java.lang.Boolean getCached()
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.public void setCached(java.lang.Boolean cached)
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.cached
- New value for the property.public java.lang.Long getSize()
create
method. It is optional in the
return value of the get
or list
methods. It is not used for the
update
method.public void setSize(java.lang.Long size)
create
method. It is optional in the
return value of the get
or list
methods. It is not used for the
update
method.size
- New value for the property.public java.lang.String getType()
This property may be set to a non-empty string value that corresponds to an identifier supported by a type adapter plugin present in the Content Library Service. A type adapter plugin, if present for the specified type, can provide additional information and services around the item content. A type adapter can guide the upload process by creating file entries that are in need of being uploaded to complete an item.
The types and plugins supported by the
Content Library Service can be queried using the Type
interface.
create
and update
methods.
During creation, if the type is left unspecified, or if the type is specified
but does not have a corresponding type support plugin, then the type of the
library item is considered to be generic and all data is treated as generic
files. During update, if the type is not specified, then it is not updated.public void setType(java.lang.String type)
This property may be set to a non-empty string value that corresponds to an identifier supported by a type adapter plugin present in the Content Library Service. A type adapter plugin, if present for the specified type, can provide additional information and services around the item content. A type adapter can guide the upload process by creating file entries that are in need of being uploaded to complete an item.
The types and plugins supported by the
Content Library Service can be queried using the Type
interface.
create
and update
methods.
During creation, if the type is left unspecified, or if the type is specified
but does not have a corresponding type support plugin, then the type of the
library item is considered to be generic and all data is treated as generic
files. During update, if the type is not specified, then it is not updated.type
- New value for the property.public java.lang.String getVersion()
This value represents a number that is incremented every time library item properties, such as name or description, are changed. It is not incremented by changes to the file content of the library item, including adding or removing files. It is also not affected by tagging the library item.
This property is not used for thecreate
method. It will always be
present in the result of a get
or list
method. It is optional
for the update
method. Leaving it null
during update indicates
that you do not need to detect concurrent updates.public void setVersion(java.lang.String version)
This value represents a number that is incremented every time library item properties, such as name or description, are changed. It is not incremented by changes to the file content of the library item, including adding or removing files. It is also not affected by tagging the library item.
This property is not used for thecreate
method. It will always be
present in the result of a get
or list
method. It is optional
for the update
method. Leaving it null
during update indicates
that you do not need to detect concurrent updates.version
- New value for the property.public java.lang.String getSourceId()
ItemModel
to which this
item is synchronized to if the item belongs to a subscribed library. The value
is null
for a library item that belongs to a local library.
This property is not used for the create
method. It is optional in the
return value of the get
or list
methods. It is not used for the
update
method.com.vmware.content.library.Item
. When
methods return a value of this class as a return value, the property will be an
identifier for the resource type: com.vmware.content.library.Item
.public void setSourceId(java.lang.String sourceId)
ItemModel
to which this
item is synchronized to if the item belongs to a subscribed library. The value
is null
for a library item that belongs to a local library.
This property is not used for the create
method. It is optional in the
return value of the get
or list
methods. It is not used for the
update
method.sourceId
- New value for the property.
When clients pass a value of this class as a parameter, the property must be an
identifier for the resource type: com.vmware.content.library.Item
. When
methods return a value of this class as a return value, the property will be an
identifier for the resource type: com.vmware.content.library.Item
.public java.lang.Boolean getSecurityCompliance()
ItemModel
.
This property was added in vSphere API 7.0.3.0.
This property is not used for the create
and update
methods. It
will be present in the result of a get
or list
method.public void setSecurityCompliance(java.lang.Boolean securityCompliance)
ItemModel
.
This property was added in vSphere API 7.0.3.0.
This property is not used for the create
and update
methods. It
will be present in the result of a get
or list
method.securityCompliance
- New value for the property.public CertificateVerificationInfo getCertificateVerificationInfo()
ItemModel
's signing certificate . Currently, this
field is available only in following cases 1. This item belongs to a secure
content library 2. The item is of type ovf. This property was added in vSphere
API 7.0.3.0.
This property is not used for the create
and update
methods. It
may be present in the result of a get
or list
method.public void setCertificateVerificationInfo(CertificateVerificationInfo certificateVerificationInfo)
ItemModel
's signing certificate . Currently, this
field is available only in following cases 1. This item belongs to a secure
content library 2. The item is of type ovf. This property was added in vSphere
API 7.0.3.0.
This property is not used for the create
and update
methods. It
may be present in the result of a get
or list
method.certificateVerificationInfo
- New value for the property.public com.vmware.vapi.bindings.type.StructType _getType()
_getType
in interface com.vmware.vapi.bindings.StaticStructure
public com.vmware.vapi.data.StructValue _getDataValue()
_getDataValue
in interface com.vmware.vapi.bindings.Structure
protected void _updateDataValue(com.vmware.vapi.data.StructValue structValue)
public void _validate()
_validate
in interface com.vmware.vapi.bindings.StaticStructure
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in interface com.vmware.vapi.bindings.StaticStructure
toString
in class java.lang.Object
public boolean _hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz)
_hasTypeNameOf
in interface com.vmware.vapi.bindings.Structure
public <T extends com.vmware.vapi.bindings.Structure> T _convertTo(java.lang.Class<T> clazz)
_convertTo
in interface com.vmware.vapi.bindings.Structure
public void _setDynamicField(java.lang.String fieldName, com.vmware.vapi.data.DataValue fieldValue)
_setDynamicField
in interface com.vmware.vapi.bindings.StaticStructure
public com.vmware.vapi.data.DataValue _getDynamicField(java.lang.String fieldName)
_getDynamicField
in interface com.vmware.vapi.bindings.StaticStructure
public java.util.Set<java.lang.String> _getDynamicFieldNames()
_getDynamicFieldNames
in interface com.vmware.vapi.bindings.StaticStructure
public static com.vmware.vapi.bindings.type.StructType _getClassType()
StructType
instance representing the static bindings
type for this Structure
.public java.lang.String _getCanonicalName()
_getCanonicalName
in interface com.vmware.vapi.bindings.Structure
public static java.lang.String _getCanonicalTypeName()
_getCanonicalName()
.public static ItemModel _newInstance(com.vmware.vapi.data.StructValue structValue)
structValue
- the source of the data contained in the binding object. Could
contain more data than fields of this class can describe i.e.
newer version of the binding object. Could be null.StructType
public static ItemModel _newInstance2(com.vmware.vapi.data.StructValue structValue)