Class BBCodeServiceImpl

java.lang.Object
org.exoplatform.forum.bbcode.core.BBCodeServiceImpl
All Implemented Interfaces:
BBCodeService, org.exoplatform.management.ManagementAware, org.picocontainer.Startable

public class BBCodeServiceImpl extends Object implements org.picocontainer.Startable, BBCodeService, org.exoplatform.management.ManagementAware
Managed service implementation for BBCodeService. Stores BBCodes in JCR at KSDataLocation.getBBCodesLocation()
Version:
$Revision$
  • Field Details

    • BBCODE_NODE_TYPE

      public static final String BBCODE_NODE_TYPE
    • BBCODE_HOME_NODE_TYPE

      public static final String BBCODE_HOME_NODE_TYPE
  • Constructor Details

    • BBCodeServiceImpl

      public BBCodeServiceImpl()
    • BBCodeServiceImpl

      public BBCodeServiceImpl(org.exoplatform.forum.common.jcr.KSDataLocation dataLocator)
  • Method Details

    • registerBBCodePlugin

      public void registerBBCodePlugin(BBCodePlugin plugin) throws Exception
      Registers a new BBCode plugin.
      Specified by:
      registerBBCodePlugin in interface BBCodeService
      Parameters:
      plugin - The plugin to be registered.
      Throws:
      Exception
    • initDefaultBBCodes

      public void initDefaultBBCodes() throws Exception
      Throws:
      Exception
    • save

      public void save(List<BBCode> bbcodes) throws Exception
      Saves a list of BBCodes.
      Specified by:
      save in interface BBCodeService
      Parameters:
      bbcodes - BBCodes to be saved.
      Throws:
      Exception
    • getAll

      public List<BBCode> getAll() throws Exception
      Retrieves all BBCodes.
      Specified by:
      getAll in interface BBCodeService
      Returns:
      BBCodes.
      Throws:
      Exception
    • getActive

      public List<String> getActive() throws Exception
      Retrieves BBCode Ids that are active.
      Specified by:
      getActive in interface BBCodeService
      Returns:
      BBCode Ids.
      Throws:
      Exception
    • getBBCodeActive

      public List<BBCode> getBBCodeActive() throws Exception
      Gets all active BBCodes.
      Specified by:
      getBBCodeActive in interface BBCodeService
      Returns:
      BBCodes.
      Throws:
      Exception
    • findById

      public BBCode findById(String id) throws Exception
      Loads a BBCode by its given Id.
      Specified by:
      findById in interface BBCodeService
      Parameters:
      id - Id of the loaded BBCode.
      Returns:
      The BBCode.
      Throws:
      Exception
    • delete

      public void delete(String bbcodeId) throws Exception
      Deletes an existing BBCode.
      Specified by:
      delete in interface BBCodeService
      Parameters:
      bbcodeId - Id of the deleted BBCode.
      Throws:
      Exception
    • start

      public void start()
      Specified by:
      start in interface org.picocontainer.Startable
    • stop

      public void stop()
      Specified by:
      stop in interface org.picocontainer.Startable
    • setContext

      public void setContext(org.exoplatform.management.ManagementContext context)
      Specified by:
      setContext in interface org.exoplatform.management.ManagementAware
    • getDataLocator

      public org.exoplatform.forum.common.jcr.KSDataLocation getDataLocator()
    • setDataLocator

      public void setDataLocator(org.exoplatform.forum.common.jcr.KSDataLocation dataLocator)
    • getPlugins

      public List<BBCodePlugin> getPlugins()
    • setPlugins

      public void setPlugins(List<BBCodePlugin> plugins)