Package com.contentful.java.cma.model
Class CMAContentType
- java.lang.Object
-
- com.contentful.java.cma.model.CMAResource
-
- com.contentful.java.cma.model.CMAContentType
-
public class CMAContentType extends CMAResource
Represents a resource of type Content Type.
-
-
Constructor Summary
Constructors Constructor Description CMAContentType()Create a CMAContentType, filling it'sCMASystemfield.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CMAContentTypeaddField(CMAField field)Adds a new field.java.lang.StringgetDescription()java.lang.StringgetDisplayField()java.util.List<CMAField>getFields()java.lang.StringgetName()java.lang.IntegergetVersion()Convenience for getting the version of this resource.CMAContentTypesetDescription(java.lang.String description)Sets the description field for this Content Type.CMAContentTypesetDisplayField(java.lang.String displayField)Sets the display field for this Content Type.CMAContentTypesetEnvironmentId(java.lang.String environmentId)Convenience method for setting an environment id.CMAContentTypesetFields(java.util.List<CMAField> fields)Sets a list of fields for this Content Type.CMAContentTypesetId(java.lang.String id)Convenience: Update the id of this entry without going throughCMAResource.getSystem().CMAContentTypesetName(java.lang.String name)Sets the name for this Content Type.CMAContentTypesetSpaceId(java.lang.String spaceId)Convenience: Update the space id of this entry without going throughCMAResource.getSystem().CMAContentTypesetSystem(CMASystem system)Sets the system field.CMAContentTypesetVersion(java.lang.Integer version)Convenience: Update the version of this entry without going throughCMAResource.getSystem().java.lang.StringtoString()-
Methods inherited from class com.contentful.java.cma.model.CMAResource
getEnvironmentId, getId, getSpaceId, getSystem, getVisibility, isArchived, isPublished, setVisibility
-
-
-
-
Constructor Detail
-
CMAContentType
public CMAContentType()
Create a CMAContentType, filling it'sCMASystemfield.
-
-
Method Detail
-
addField
public CMAContentType addField(CMAField field)
Adds a new field.- Parameters:
field- CMAField instance- Returns:
- this
CMAContentType
-
getName
public java.lang.String getName()
- Returns:
- the name of this Content Type.
-
setName
public CMAContentType setName(java.lang.String name)
Sets the name for this Content Type.- Parameters:
name- name- Returns:
- this
CMAContentType
-
getFields
public java.util.List<CMAField> getFields()
- Returns:
- a list of fields for this Content Type.
-
setFields
public CMAContentType setFields(java.util.List<CMAField> fields)
Sets a list of fields for this Content Type.- Parameters:
fields- List of fields- Returns:
- this
CMAContentTypeinstance
-
getDisplayField
public java.lang.String getDisplayField()
- Returns:
- the display field of this Content Type.
-
setDisplayField
public CMAContentType setDisplayField(java.lang.String displayField)
Sets the display field for this Content Type.- Parameters:
displayField- the field to be set- Returns:
- this
CMAContentTypeinstance
-
getDescription
public java.lang.String getDescription()
- Returns:
- the description of this Content Type.
-
setDescription
public CMAContentType setDescription(java.lang.String description)
Sets the description field for this Content Type.- Parameters:
description- the description to be set- Returns:
- this
CMAContentTypeinstance
-
setSystem
public CMAContentType setSystem(CMASystem system)
Sets the system field.- Overrides:
setSystemin classCMAResource- Parameters:
system- sets the system property.- Returns:
- this, as casted to a resource, for the ease of chaining.
-
setId
public CMAContentType setId(java.lang.String id)
Convenience: Update the id of this entry without going throughCMAResource.getSystem().- Overrides:
setIdin classCMAResource- Parameters:
id- to be set.- Returns:
- the calling instance for chaining.
-
getVersion
public java.lang.Integer getVersion()
Convenience for getting the version of this resource.- Overrides:
getVersionin classCMAResource- Returns:
- the calling instance for chaining.
-
setVersion
public CMAContentType setVersion(java.lang.Integer version)
Convenience: Update the version of this entry without going throughCMAResource.getSystem().- Overrides:
setVersionin classCMAResource- Parameters:
version- to be set.- Returns:
- the calling instance for chaining.
-
setSpaceId
public CMAContentType setSpaceId(java.lang.String spaceId)
Convenience: Update the space id of this entry without going throughCMAResource.getSystem().- Overrides:
setSpaceIdin classCMAResource- Parameters:
spaceId- to be set.- Returns:
- the calling instance for chaining.
-
setEnvironmentId
public CMAContentType setEnvironmentId(java.lang.String environmentId)
Convenience method for setting an environment id.- Overrides:
setEnvironmentIdin classCMAResource- Parameters:
environmentId- the id to be set.- Returns:
- the calling
CMAResourcefor chaining.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classCMAResource- Returns:
- a human readable string, representing the object.
-
-