Package com.contentful.java.cma.model
Class CMAField
- java.lang.Object
-
- com.contentful.java.cma.model.CMAField
-
public class CMAField extends java.lang.ObjectCMAField.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Object>defaultValue
-
Constructor Summary
Constructors Constructor Description CMAField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.util.Map<java.lang.String,java.lang.Object>>getAllowedResources()java.util.Map<java.lang.String,java.lang.Object>getArrayItems()java.util.Map<java.lang.String,java.lang.Object>getDefaultValue()java.lang.StringgetId()java.lang.StringgetLinkType()java.lang.StringgetName()Constants.CMAFieldTypegetType()java.util.List<java.util.Map<java.lang.String,java.lang.Object>>getValidations()java.lang.BooleanisDisabled()booleanisLocalized()java.lang.BooleanisOmitted()booleanisRequired()CMAFieldsetAllowedResources(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> allowedResources)Sets aListof allowed resources for this field.CMAFieldsetArrayItems(java.util.Map<java.lang.String,java.lang.Object> arrayItems)Sets theitemsattribute value.CMAFieldsetDefaultValue(java.util.Map<java.lang.String,java.lang.Object> defaultValue)Sets the default value.CMAFieldsetDisabled(boolean disabled)Sets thedisabledattribute value.CMAFieldsetId(java.lang.String id)Sets the ID for this field.CMAFieldsetLinkType(java.lang.String linkType)Sets the link type for this field.CMAFieldsetLocalized(boolean localized)Sets thelocalizedattribute value.CMAFieldsetName(java.lang.String name)Sets the name for this field.CMAFieldsetOmitted(boolean omitted)Sets theomittedattribute value.CMAFieldsetRequired(boolean required)Sets therequiredattribute value.CMAFieldsetType(Constants.CMAFieldType type)Sets the type for this field.CMAFieldsetValidations(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> validations)Sets aListof validation rules for this field.java.lang.StringtoString()
-
-
-
Method Detail
-
setDisabled
public CMAField setDisabled(boolean disabled)
Sets thedisabledattribute value.- Parameters:
disabled- boolean indicating whether or not this field is disabled Returns thisCMAFieldinstance- Returns:
- this
CMAFieldinstance
-
setOmitted
public CMAField setOmitted(boolean omitted)
Sets theomittedattribute value.- Parameters:
omitted- boolean indicating whether or not this field is complete omitted Returns thisCMAFieldinstance- Returns:
- this
CMAFieldinstance
-
getId
public java.lang.String getId()
- Returns:
- the
idattribute of this field.
-
setId
public CMAField setId(java.lang.String id)
Sets the ID for this field.- Parameters:
id- the id to be set- Returns:
- this
CMAFieldinstance
-
getDefaultValue
public java.util.Map<java.lang.String,java.lang.Object> getDefaultValue()
- Returns:
- the
defaultValueattribute value as aMap.
-
setDefaultValue
public CMAField setDefaultValue(java.util.Map<java.lang.String,java.lang.Object> defaultValue)
Sets the default value.- Parameters:
defaultValue- the defaultValue to be set- Returns:
- this
CMAFieldinstance
-
getName
public java.lang.String getName()
- Returns:
- the
nameattribute of this field.
-
setName
public CMAField setName(java.lang.String name)
Sets the name for this field.- Parameters:
name- the name to be set- Returns:
- this
CMAFieldinstance
-
getType
public Constants.CMAFieldType getType()
- Returns:
- the
typeattribute of this field.
-
setType
public CMAField setType(Constants.CMAFieldType type)
Sets the type for this field.- Parameters:
type- the type to be set- Returns:
- this
CMAFieldinstance
-
getLinkType
public java.lang.String getLinkType()
- Returns:
- the
linkTypeattribute of this field.
-
setLinkType
public CMAField setLinkType(java.lang.String linkType)
Sets the link type for this field.- Parameters:
linkType- the type of link to be set- Returns:
- this
CMAFieldinstance
-
getValidations
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getValidations()
- Returns:
- a
Listof validation rules for this field.
-
setValidations
public CMAField setValidations(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> validations)
Sets aListof validation rules for this field.- Parameters:
validations- validations list Returns thisCMAFieldinstance- Returns:
- this
CMAFieldinstance
-
getAllowedResources
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getAllowedResources()
- Returns:
- a
Listof allowed resources.
-
setAllowedResources
public CMAField setAllowedResources(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> allowedResources)
Sets aListof allowed resources for this field.- Parameters:
allowedResources- allowed resources list Returns thisCMAFieldinstance- Returns:
- this
CMAFieldinstance
-
getArrayItems
public java.util.Map<java.lang.String,java.lang.Object> getArrayItems()
- Returns:
- the
itemsattribute value as aMap.
-
setArrayItems
public CMAField setArrayItems(java.util.Map<java.lang.String,java.lang.Object> arrayItems)
Sets theitemsattribute value.- Parameters:
arrayItems- Map instance- Returns:
- this
CMAFieldinstance
-
isRequired
public boolean isRequired()
- Returns:
- the
requiredattribute of this field.
-
setRequired
public CMAField setRequired(boolean required)
Sets therequiredattribute value.- Parameters:
required- boolean indicating whether or not this field is required Returns thisCMAFieldinstance- Returns:
- this
CMAFieldinstance
-
isDisabled
public java.lang.Boolean isDisabled()
- Returns:
- the
disabledattribute of this field.
-
isOmitted
public java.lang.Boolean isOmitted()
- Returns:
- the
omittedattribute of this field.
-
isLocalized
public boolean isLocalized()
- Returns:
- the
localizedattribute of this field.
-
setLocalized
public CMAField setLocalized(boolean localized)
Sets thelocalizedattribute value.- Parameters:
localized- boolean indicating whether or not this field is localized Returns thisCMAFieldinstance- Returns:
- this
CMAFieldinstance
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- a human readable string, representing the object.
-
-