public class CMAContentType extends CMAResource
| Constructor and Description |
|---|
CMAContentType()
Create a CMAContentType, filling it's
CMASystem field. |
| Modifier and Type | Method and Description |
|---|---|
CMAContentType |
addField(CMAField field)
Adds a new field.
|
String |
getDescription() |
String |
getDisplayField() |
List<CMAField> |
getFields() |
CMAMetadata |
getMetadata() |
String |
getName() |
Integer |
getVersion()
Convenience for getting the version of this resource.
|
CMAContentType |
setDescription(String description)
Sets the description field for this Content Type.
|
CMAContentType |
setDisplayField(String displayField)
Sets the display field for this Content Type.
|
CMAContentType |
setEnvironmentId(String environmentId)
Convenience method for setting an environment id.
|
CMAContentType |
setFields(List<CMAField> fields)
Sets a list of fields for this Content Type.
|
CMAContentType |
setId(String id)
Convenience: Update the id of this entry without going through
CMAResource.getSystem(). |
void |
setMetadata(CMAMetadata metadata) |
CMAContentType |
setName(String name)
Sets the name for this Content Type.
|
CMAContentType |
setSpaceId(String spaceId)
Convenience: Update the space id of this entry without going through
CMAResource.getSystem(). |
CMAContentType |
setSystem(CMASystem system)
Sets the system field.
|
CMAContentType |
setVersion(Integer version)
Convenience: Update the version of this entry without going through
CMAResource.getSystem(). |
String |
toString() |
getEnvironmentId, getId, getSpaceId, getSystem, getVisibility, isArchived, isPublished, setVisibilitypublic CMAContentType()
CMASystem field.public CMAMetadata getMetadata()
public void setMetadata(CMAMetadata metadata)
public CMAContentType addField(CMAField field)
field - CMAField instanceCMAContentTypepublic String getName()
public CMAContentType setName(String name)
name - nameCMAContentTypepublic CMAContentType setFields(List<CMAField> fields)
fields - List of fieldsCMAContentType instancepublic String getDisplayField()
public CMAContentType setDisplayField(String displayField)
displayField - the field to be setCMAContentType instancepublic String getDescription()
public CMAContentType setDescription(String description)
description - the description to be setCMAContentType instancepublic CMAContentType setSystem(CMASystem system)
setSystem in class CMAResourcesystem - sets the system property.public CMAContentType setId(String id)
CMAResource.getSystem().setId in class CMAResourceid - to be set.public Integer getVersion()
getVersion in class CMAResourcepublic CMAContentType setVersion(Integer version)
CMAResource.getSystem().setVersion in class CMAResourceversion - to be set.public CMAContentType setSpaceId(String spaceId)
CMAResource.getSystem().setSpaceId in class CMAResourcespaceId - to be set.public CMAContentType setEnvironmentId(String environmentId)
setEnvironmentId in class CMAResourceenvironmentId - the id to be set.CMAResource for chaining.public String toString()
toString in class CMAResourceCopyright © 2026 Contentful, GmbH.. All rights reserved.