Class WebSiteResourceBundleManager

java.lang.Object
com.helger.dao.AbstractDAO
com.helger.dao.simple.AbstractSimpleDAO
com.helger.photon.io.dao.AbstractPhotonSimpleDAO
com.helger.photon.app.resource.WebSiteResourceBundleManager
All Implemented Interfaces:
com.helger.commons.log.IHasConditionalLogger, com.helger.dao.IAutoSaveAware, com.helger.dao.IDAO, IWebSiteResourceBundleProvider

public final class WebSiteResourceBundleManager extends com.helger.photon.io.dao.AbstractPhotonSimpleDAO implements IWebSiteResourceBundleProvider
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.helger.dao.IDAO

    com.helger.dao.IDAO.EMode
  • Field Summary

    Fields inherited from class com.helger.dao.AbstractDAO

    CONDLOG, DEFAULT_AUTO_SAVE_ENABLED, FILENAME_EXTENSION_NEW, FILENAME_EXTENSION_PREV, m_aRWLock, RW_LOCK
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if the passed resource bundle ID is contained.
    protected com.helger.xml.microdom.IMicroDocument
     
    com.helger.commons.collection.impl.ICommonsMap<String,WebSiteResourceBundleSerialized>
     
    com.helger.commons.collection.impl.ICommonsList<WebSiteResourceBundleSerialized>
     
    Get the serialized resource bundle with the passed ID.
    com.helger.commons.collection.impl.ICommonsList<WebSiteResourceBundleSerialized>
    getResourceBundles(com.helger.commons.collection.impl.ICommonsList<WebSiteResourceWithCondition> aList, boolean bRegular)
     
    protected com.helger.commons.state.EChange
    onRead(com.helger.xml.microdom.IMicroDocument aDoc)
     

    Methods inherited from class com.helger.dao.simple.AbstractSimpleDAO

    beforeWriteToFile, getFilenameProvider, getInitCount, getIO, getLastFilename, getLastInitDateTime, getLastReadDateTime, getLastWriteDateTime, getReadCount, getSafeFile, getWriteCount, getXMLWriterSettings, initialRead, markAsChanged, modifyWriteData, onFilenameChange, onInit, toString, triggerExceptionHandlersRead, triggerExceptionHandlersWrite, writeToFileOnPendingChanges

    Methods inherited from class com.helger.dao.AbstractDAO

    beginWithoutAutoSave, checkFileAccess, endWithoutAutoSave, exceptionHandlersRead, exceptionHandlersWrite, hasPendingChanges, internalHasPendingChanges, internalIsAutoSaveEnabled, internalSetPendingChanges, isAutoSaveEnabled, isSilentMode, setSilentMode

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.helger.dao.IAutoSaveAware

    performWithoutAutoSave, performWithoutAutoSave, performWithoutAutoSaveThrowing, performWithoutAutoSaveThrowing

    Methods inherited from interface com.helger.dao.IDAO

    isReloadable, reload
  • Constructor Details

    • WebSiteResourceBundleManager

      public WebSiteResourceBundleManager(@Nullable String sFilename) throws com.helger.dao.DAOException
      Throws:
      com.helger.dao.DAOException
  • Method Details

    • onRead

      @Nonnull protected com.helger.commons.state.EChange onRead(@Nonnull com.helger.xml.microdom.IMicroDocument aDoc)
      Specified by:
      onRead in class com.helger.dao.simple.AbstractSimpleDAO
    • createWriteData

      @Nonnull protected com.helger.xml.microdom.IMicroDocument createWriteData()
      Specified by:
      createWriteData in class com.helger.dao.simple.AbstractSimpleDAO
    • getAllResourceBundles

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsMap<String,WebSiteResourceBundleSerialized> getAllResourceBundles()
    • getAllResourceBundlesSerialized

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<WebSiteResourceBundleSerialized> getAllResourceBundlesSerialized()
    • getResourceBundleOfID

      @Nullable public WebSiteResourceBundleSerialized getResourceBundleOfID(@Nullable String sBundleID)
      Get the serialized resource bundle with the passed ID.
      Parameters:
      sBundleID - The bundle ID to be resolved. May be null.
      Returns:
      null if no such bundle exists.
    • containsResourceBundleOfID

      public boolean containsResourceBundleOfID(@Nullable String sBundleID)
      Check if the passed resource bundle ID is contained.
      Parameters:
      sBundleID - The bundle ID to be checked. May be null.
      Returns:
      true if the passed bundle exists, false otherwise.
    • getResourceBundles

      @Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<WebSiteResourceBundleSerialized> getResourceBundles(@Nonnull @Nonempty com.helger.commons.collection.impl.ICommonsList<WebSiteResourceWithCondition> aList, boolean bRegular)
      Specified by:
      getResourceBundles in interface IWebSiteResourceBundleProvider