StringContent

public class StringContent implements Content

Represents text content. This class is more suited for storing text content than org.motechproject.cmslite.model.StreamContent.

Constructors

StringContent

public StringContent()

StringContent

public StringContent(String language, String name, String value)
Parameters:
  • language – the language for the content
  • name – the name identifying the content
  • value – the content text

StringContent

public StringContent(String language, String name, String value, Map<String, String> metadata)
Parameters:
  • language – the language for the content
  • name – the name identifying the content
  • value – the content text
  • metadata – the additional metadata for the content

Methods

equals

public boolean equals(Object obj)

getLanguage

public String getLanguage()
Returns:the language for the content

getMetadata

public Map<String, String> getMetadata()
Returns:the additional metadata for the content

getName

public String getName()
Returns:the name identifying the content

getValue

public String getValue()
Returns:the content text

hashCode

public int hashCode()

setLanguage

public void setLanguage(String language)
Parameters:
  • language – the language for the content

setMetadata

public void setMetadata(Map<String, String> metadata)
Parameters:
  • metadata – the additional metadata for the content

setName

public void setName(String name)
Parameters:
  • name – the name identifying the content

setValue

public void setValue(String value)
Parameters:
  • value – the content text

toString

public String toString()