Interface SiteService

All Known Implementing Classes:
SiteServiceImpl

public interface SiteService

Most of the methods below return a Site which is not attached to a Hibernate session (which is what is referred to as 'non-persistent'). While this prevents LazyInitializationExceptions that might occur if there is not continually a Hibernate session, this also means that while the results of these will return you an instance, you might need to look the entity back up from the database to refresh it.

Note also that when resolving sites (via the BroadleafSiteResolver) the usual case is to return a non-persistent version not attached to a Hibernate session.

Author:
Phillip Verheyden (phillipuniverse)
  • Method Details

    • createSite

      Site createSite()
      Creates an instance of Site. Default implementation delegates to SiteDao.create().
      Returns:
    • retrieveSiteById

      @Deprecated Site retrieveSiteById(Long id)
      Deprecated.
      Find a site by its id and returns a non-persistent version
      Parameters:
      id -
      Returns:
    • retrieveNonPersistentSiteById

      Site retrieveNonPersistentSiteById(Long id)
      Retrieves a site by its primary key disconnected from a Hibernate session
    • retrievePersistentSiteById

      Site retrievePersistentSiteById(Long id)
      Retrieves a site by its primary key whose return value is still attached to a Hibernate session
    • retrieveSiteByDomainName

      @Deprecated Site retrieveSiteByDomainName(String domain)
      Find a site by its domain and returns a non-persistent version
      Parameters:
      domain -
      Returns:
    • retrieveNonPersistentSiteByDomainName

      Site retrieveNonPersistentSiteByDomainName(String domain)
      Finds a site by the given domain name and returns a non-persistent version
    • retrievePersistentSiteByDomainName

      Site retrievePersistentSiteByDomainName(String domain)
      Finds a site by the domain name which is still attached to a Hibernate session
      Parameters:
      domain -
      Returns:
    • retrieveNonPersistentSiteByIdentifer

      Site retrieveNonPersistentSiteByIdentifer(String identifier)
      Finds a site by its Site.getSiteIdentifierValue() and return an entity that is not attached to the Hibernate session
      Parameters:
      identifier - the Site.getSiteIdentifierValue() to look for
    • retrievePersistentSiteByIdentifier

      Site retrievePersistentSiteByIdentifier(String identifier)
      Finds a site by its Site.getSiteIdentifierValue()
      Parameters:
      identifier - the Site.getSiteIdentifierValue() to look for
    • save

      @Deprecated Site save(Site site)
      Deprecated.
      Save updates to a site and returns a cloned instance
      Parameters:
      site -
      Returns:
    • saveAndReturnNonPersisted

      Site saveAndReturnNonPersisted(Site site)
      Save updates to a site and returns a non-persistent instance
      Parameters:
      site -
      Returns:
    • saveAndReturnPersisted

      Site saveAndReturnPersisted(Site site)
      Save updates to a site and return the persistent instance attached to a Hibernate session
      Parameters:
      site -
      Returns:
    • retrieveDefaultSite

      @Deprecated Site retrieveDefaultSite()
      Deprecated.
      Returns a clone of the default site.
      Returns:
    • retrieveNonPersistentDefaultSite

      Site retrieveNonPersistentDefaultSite()
      Retrieves the non-persistent version of the default site
    • retrievePersistentDefaultSite

      Site retrievePersistentDefaultSite()
      Retrieves the default site attached to a Hibernate session
    • findAllActiveSites

      @Deprecated List<Site> findAllActiveSites()
      Deprecated.
      Returns:
      a List of non-persistent versions of all sites in the system
    • findAllNonPersistentActiveSites

      List<Site> findAllNonPersistentActiveSites()
      Returns all of the active sites in the system and does not attach them to a Hibernate session
    • findAllPersistentActiveSites

      List<Site> findAllPersistentActiveSites()
      Returns all of the active sites in the system that are still attached to a Hibernate session
    • findCatalogById

      Catalog findCatalogById(Long id)
      Finds a catalog by its id.
      Parameters:
      id -
      Returns:
      the catalog
    • findCatalogByName

      Catalog findCatalogByName(String name)
    • createCatalog

      Catalog createCatalog()
      Creates an instance of Catalog. Default implementation delegates to SiteDao.createCatalog().
      Returns:
      the catalog
    • createSiteCatalog

      SiteCatalogXref createSiteCatalog()
      Creates an instance of SiteCatalogXref. Default implementation delegates to SiteDao.createSiteCatalog()
      Returns:
      the site catalog
    • save

      Catalog save(Catalog catalog)
      Saves the given catalog and returns the merged instance
      Parameters:
      catalog -
      Returns:
    • findAllCatalogs

      List<Catalog> findAllCatalogs()
      Finds all catalogs
      Returns:
      the list of catalogs