Class Content

    • Constructor Detail

      • Content

        public Content()
    • Method Detail

      • getId

        public String getId()
        Returns this content's identifier.
        Returns:
        this content's identifier.
        Since:
        4.2.0
      • getServiceInstanceId

        public String getServiceInstanceId()
        Returns the identifier of the service instance this content belongs to.
        Returns:
        the identifier of the service instance this content belongs to.
        Since:
        4.2.0
      • setServiceInstanceId

        public void setServiceInstanceId​(String serviceInstanceId)
        Sets the service instance this content belongs to.
        Parameters:
        serviceInstanceId - the service instance identifier.
        Since:
        4.2.0
      • getSourceId

        public String getSourceId()
        Returns the source this content belongs to.
        Parameters:
        sourceId - the source identifier.
        Since:
        4.2.0
      • setSourceId

        public void setSourceId​(String sourceId)
        Sets the source this content belongs to.
        Parameters:
        sourceId - the source identifier.
        Since:
        4.2.0
      • getDefaultLocale

        public Locale getDefaultLocale()
        Returns the default locale for this content.
        Returns:
        the default locale for this content, or null if this content has no default locale.
        Since:
        4.2.0
      • setDefaultLocale

        public void setDefaultLocale​(Locale defaultLocale)
        Sets the default locale for this content.
        Parameters:
        defaultLocale - the locale to set. May be null to set that this content has no default locale.
        Since:
        4.2.0
      • getContentLocales

        public Collection<ContentLocale> getContentLocales()
        Returns the locale specific objects of this content.
        Returns:
        the locale specific objects of this content.
        Since:
        4.2.0
      • getContentLocale

        public ContentLocale getContentLocale​(Locale locale,
                                              boolean fallbackToDefaultLocale)
        Returns the locale specific content object, for the given locale, optionally using the default locale.
        Parameters:
        locale - the locale.
        fallbackToDefaultLocale - if true, the default locale for this content will be used if no contentLocale for the specified locale exists.
        Returns:
        the locale specific content object, or null if no object exists, according to the given parameters.
        Since:
        4.2.0