Class JpaApplication

  • All Implemented Interfaces:
    com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.Temporal, com.broadleafcommerce.data.tracking.core.TenantTrackable<TenantJpaTracking>, com.broadleafcommerce.data.tracking.core.Trackable, com.broadleafcommerce.data.tracking.core.TypedTrackable<TenantJpaTracking>, Serializable

    @Entity
    public class JpaApplication
    extends Object
    implements com.broadleafcommerce.data.tracking.core.TenantTrackable<TenantJpaTracking>, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.Temporal, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, Serializable
    Represents the tenant concept of a storefront structure. This structure ties together concepts of visible catalogs, as well as URI resolution.

    Redundant domain that is originally maintained in the tenant service. This is redundant domain for microservices interested in tenant structure to perform local discrimination duties. This redundant domain is kept up-to-date via async streaming of changes from the tenant service. See TenantPersistenceHandler.

    Author:
    Jeff Fischer
    See Also:
    Application, Serialized Form
    • Constructor Detail

      • JpaApplication

        public JpaApplication()
    • Method Detail

      • fromMe

        @NonNull
        public org.modelmapper.ModelMapper fromMe()
        Specified by:
        fromMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
      • toMe

        @NonNull
        public org.modelmapper.ModelMapper toMe()
        Specified by:
        toMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
      • getBusinessDomainType

        @NonNull
        public Class<?> getBusinessDomainType()
        Specified by:
        getBusinessDomainType in interface com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
      • getDisplay

        public Optional<String> getDisplay()
        Specified by:
        getDisplay in interface com.broadleafcommerce.data.tracking.core.Trackable
      • getContextId

        public String getContextId()
        Specified by:
        getContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
      • getName

        public String getName()
        See Also:
        Application.getName()
      • getIdentifierType

        public String getIdentifierType()
        See Also:
        Application.getIdentifierType()
      • getIdentifierValue

        public String getIdentifierValue()
        See Also:
        Application.getIdentifierValue()
      • isDeactivated

        public boolean isDeactivated()
        See Also:
        Application.isDeactivated()
      • getDefaultLocale

        public Locale getDefaultLocale()
        See Also:
        Application.getDefaultLocale()
      • getAllowedLocales

        public List<Locale> getAllowedLocales()
        See Also:
        Application.getAllowedLocales()
      • getDefaultCurrency

        public Currency getDefaultCurrency()
        See Also:
        Application.getDefaultCurrency()
      • getAllowedCurrencies

        public List<Currency> getAllowedCurrencies()
        See Also:
        Application.getAllowedCurrencies()
      • isMarketplace

        public boolean isMarketplace()
        See Also:
        Application.isMarketplace()
      • getTimestamp

        public Instant getTimestamp()
        Temporal state describing the time at which this item was last updated. Relates to the Temporal interface and is primarily used during consumption of messages regarding changes in state to this domain. For example, a service consuming a change notification for this domain can compare the current persisted timestamp to this timestamp to determine if it already has a newer version, in which case, it can ignore. This is primarily a measure to ensure that ordering is not required for messages related to state change.
        Specified by:
        getTimestamp in interface com.broadleafcommerce.data.tracking.core.Temporal
        Returns:
        Temporal state describing the time at which this item was last updated
      • getTracking

        public TenantJpaTracking getTracking()
        Retrieve the tracking information from the entity
        Specified by:
        getTracking in interface com.broadleafcommerce.data.tracking.core.Trackable
        Returns:
        Tracking information
      • setContextId

        public void setContextId​(String contextId)
        Specified by:
        setContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
      • setName

        public void setName​(String name)
        See Also:
        Application.getName()
      • setIdentifierType

        public void setIdentifierType​(String identifierType)
        See Also:
        Application.getIdentifierType()
      • setIdentifierValue

        public void setIdentifierValue​(String identifierValue)
        See Also:
        Application.getIdentifierValue()
      • setDeactivated

        public void setDeactivated​(boolean deactivated)
        See Also:
        Application.isDeactivated()
      • setDefaultLocale

        public void setDefaultLocale​(Locale defaultLocale)
        See Also:
        Application.getDefaultLocale()
      • setAllowedLocales

        public void setAllowedLocales​(List<Locale> allowedLocales)
        See Also:
        Application.getAllowedLocales()
      • setDefaultCurrency

        public void setDefaultCurrency​(Currency defaultCurrency)
        See Also:
        Application.getDefaultCurrency()
      • setAllowedCurrencies

        public void setAllowedCurrencies​(List<Currency> allowedCurrencies)
        See Also:
        Application.getAllowedCurrencies()
      • setIsolatedCatalogs

        public void setIsolatedCatalogs​(List<JpaApplicationCatalogRef> isolatedCatalogs)
        See Also:
        Application.getIsolatedCatalogs()
      • setMarketplace

        public void setMarketplace​(boolean isMarketplace)
        See Also:
        Application.isMarketplace()
      • setTimestamp

        public void setTimestamp​(Instant timestamp)
        Temporal state describing the time at which this item was last updated. Relates to the Temporal interface and is primarily used during consumption of messages regarding changes in state to this domain. For example, a service consuming a change notification for this domain can compare the current persisted timestamp to this timestamp to determine if it already has a newer version, in which case, it can ignore. This is primarily a measure to ensure that ordering is not required for messages related to state change.
        Specified by:
        setTimestamp in interface com.broadleafcommerce.data.tracking.core.Temporal
        Parameters:
        timestamp - Temporal state describing the time at which this item was last updated
      • setTracking

        public void setTracking​(TenantJpaTracking tracking)
        Retrieve the tracking information from the entity
        Specified by:
        setTracking in interface com.broadleafcommerce.data.tracking.core.TypedTrackable<TenantJpaTracking>
        Parameters:
        tracking - Tracking information
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object