Package com.contentful.java.cma.model
Class CMASystem
- java.lang.Object
-
- com.contentful.java.cma.model.CMASystem
-
public class CMASystem extends java.lang.ObjectRecord of all system properties a resource can have.This type adds up all system properties to have one unified way of accessing them.
-
-
Constructor Summary
Constructors Constructor Description CMASystem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetArchivedVersion()CMALinkgetContentType()java.lang.StringgetCreatedAt()CMALinkgetCreatedBy()CMALinkgetEnvironment()CMALinkgetEnvironmentalStatus()Return a link to the state of this environmentjava.lang.StringgetFirstPublishedAt()java.lang.StringgetId()CMATypegetLinkType()CMALinkgetOrganization()java.lang.StringgetPublishedAt()CMALinkgetPublishedBy()java.lang.IntegergetPublishedCounter()java.lang.IntegergetPublishedVersion()CMALinkgetSpace()CMATypegetType()java.lang.StringgetUpdatedAt()CMALinkgetUpdatedBy()java.lang.StringgetUrn()java.lang.IntegergetVersion()CMAVisibilitygetVisibility()CMASystemsetContentType(CMALink contentType)Change the content type of this resource.CMASystemsetId(java.lang.String id)Update or set the id of this resource.CMASystemsetLinkType(CMAType linkType)Set the type of this link.CMASystemsetSpace(CMALink space)Update the space used.CMASystemsetType(CMAType type)Update this type.voidsetUrn(java.lang.String urn)Updates the identifier of the resource.CMASystemsetVersion(java.lang.Integer version)Update/set the version of this resource.voidsetVisibility(CMAVisibility visibility)java.lang.StringtoString()
-
-
-
Method Detail
-
getVisibility
public CMAVisibility getVisibility()
-
setVisibility
public void setVisibility(CMAVisibility visibility)
-
getContentType
public CMALink getContentType()
- Returns:
- the content type if this resource can have one.
-
setContentType
public CMASystem setContentType(CMALink contentType)
Change the content type of this resource.- Parameters:
contentType- the new content type to be used.- Returns:
- the calling instance, for ease of chaining.
-
getCreatedAt
public java.lang.String getCreatedAt()
- Returns:
- a string representing the time this resource was created.
-
getCreatedBy
public CMALink getCreatedBy()
- Returns:
- a link to the user who created this resource initially.
-
getFirstPublishedAt
public java.lang.String getFirstPublishedAt()
- Returns:
- a string representing the time this resource was first published.
-
getId
public java.lang.String getId()
- Returns:
- a string representing the id of this resource.
-
setId
public CMASystem setId(java.lang.String id)
Update or set the id of this resource.- Parameters:
id- the new id to be used.- Returns:
- the instance calling this method for easy chaining.
-
getLinkType
public CMAType getLinkType()
- Returns:
- what type this link links to, if any.
-
setLinkType
public CMASystem setLinkType(CMAType linkType)
Set the type of this link. Aka what object does this link link to?- Parameters:
linkType- one type to link to.- Returns:
- this system, to ease the chaining.
-
getPublishedAt
public java.lang.String getPublishedAt()
- Returns:
- when was this resource last published?
-
getPublishedBy
public CMALink getPublishedBy()
- Returns:
- a link containing the user who published this entry.
-
getPublishedCounter
public java.lang.Integer getPublishedCounter()
- Returns:
- the published counter state.
-
getPublishedVersion
public java.lang.Integer getPublishedVersion()
- Returns:
- the published version of this resource.
-
getSpace
public CMALink getSpace()
- Returns:
- the space this resource is in, if any.
-
setSpace
public CMASystem setSpace(CMALink space)
Update the space used.- Parameters:
space- update the space of this element.- Returns:
- this instance to chain different setters together.
-
getEnvironment
public CMALink getEnvironment()
- Returns:
- the environment this resource is in.
-
getUrn
public java.lang.String getUrn()
- Returns:
- The identifier of the resource.
-
setUrn
public void setUrn(java.lang.String urn)
Updates the identifier of the resource.
-
setType
public CMASystem setType(CMAType type)
Update this type.This method is especially usefull for creating new resources before uploading them.
- Parameters:
type- what type is this resource?- Returns:
- this system to make chaining setters easier.
-
getUpdatedAt
public java.lang.String getUpdatedAt()
- Returns:
- a time when this resource was updated last?
-
getUpdatedBy
public CMALink getUpdatedBy()
- Returns:
- a link to the user updating it last.
-
getVersion
public java.lang.Integer getVersion()
- Returns:
- what version is this resource at?
-
getOrganization
public CMALink getOrganization()
- Returns:
- a link to the organization this entity belongs to.
-
setVersion
public CMASystem setVersion(java.lang.Integer version)
Update/set the version of this resource.- Parameters:
version- which version are we referring to?- Returns:
- this system to ease chaining setters.
-
getArchivedVersion
public java.lang.Integer getArchivedVersion()
- Returns:
- the version number of the last archived version.
-
getEnvironmentalStatus
public CMALink getEnvironmentalStatus()
Return a link to the state of this environmentThis field is only active on an environment.
- Returns:
- a link to the status.
- See Also:
CMAEnvironment.getStatus()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- a human readable string, representing the object.
-
-