Package com.contentful.java.cma.model
Class CMAEnvironment
- java.lang.Object
-
- com.contentful.java.cma.model.CMAResource
-
- com.contentful.java.cma.model.CMAEnvironment
-
public class CMAEnvironment extends CMAResource
Represents a resource of type environment.
-
-
Constructor Summary
Constructors Constructor Description CMAEnvironment()Create a environment using the default types for the system property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetEnvironmentId()Override retrieval of the environment id here, since the id of this environment is it's id.java.lang.StringgetName()CMAEnvironmentStatusgetStatus()Return the state of this environment<T extends CMAResource>
TsetEnvironmentId(java.lang.String environmentId)Convenience method for setting an environment id.CMAEnvironmentsetId(java.lang.String id)Sets the id of this environment.CMAEnvironmentsetName(java.lang.String name)Sets the name for this environment.CMAEnvironmentsetSystem(CMASystem system)Sets the system field.CMAEnvironmentsetVersion(java.lang.Integer version)Set the version of this environment.java.lang.StringtoString()-
Methods inherited from class com.contentful.java.cma.model.CMAResource
getId, getSpaceId, getSystem, getVersion, getVisibility, isArchived, isPublished, setSpaceId, setVisibility
-
-
-
-
Method Detail
-
setSystem
public CMAEnvironment 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.
-
getName
public java.lang.String getName()
- Returns:
- the name of this environment.
-
setName
public CMAEnvironment setName(java.lang.String name)
Sets the name for this environment.- Parameters:
name- the name of the environment to be set- Returns:
- this
CMAEnvironmentinstance.
-
setId
public CMAEnvironment setId(java.lang.String id)
Sets the id of this environment.- Overrides:
setIdin classCMAResource- Parameters:
id- to be set.- Returns:
- this instance for chaining.
-
getEnvironmentId
public java.lang.String getEnvironmentId()
Override retrieval of the environment id here, since the id of this environment is it's id.- Overrides:
getEnvironmentIdin classCMAResource- Returns:
- the ID of the Environment associated with this resource,
Constants.DEFAULT_ENVIRONMENTif it does not exist.
-
setEnvironmentId
public <T extends CMAResource> T setEnvironmentId(java.lang.String environmentId)
Convenience method for setting an environment id.- Overrides:
setEnvironmentIdin classCMAResource- Type Parameters:
T- An implementation of CMAResource, normally used for chaining setter methods.- Parameters:
environmentId- the id to be set.- Returns:
- the calling
CMAResourcefor chaining.
-
setVersion
public CMAEnvironment setVersion(java.lang.Integer version)
Set the version of this environment.- Overrides:
setVersionin classCMAResource- Parameters:
version- the version to be set.- Returns:
- this environment instance for chaining.
-
getStatus
public CMAEnvironmentStatus getStatus()
Return the state of this environment- Returns:
- one of
CMAEnvironmentStatusto indicate the status of the environment.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classCMAResource- Returns:
- a human readable string, representing the object.
-
-