org.exoplatform.forum.bbcode.core
Class BBCodeServiceImpl

java.lang.Object
  extended by 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 Summary
static String BBCODE_HOME_NODE_TYPE
           
static String BBCODE_NODE_TYPE
           
 
Constructor Summary
BBCodeServiceImpl()
           
BBCodeServiceImpl(org.exoplatform.forum.common.jcr.KSDataLocation dataLocator)
           
 
Method Summary
 void delete(String bbcodeId)
          Deletes an existing BBCode.
 BBCode findById(String id)
          Loads a BBCode by its given Id.
 List<String> getActive()
          Retrieves BBCode Ids that are active.
 List<BBCode> getAll()
          Retrieves all BBCodes.
 List<BBCode> getBBCodeActive()
          Gets all active BBCodes.
 org.exoplatform.forum.common.jcr.KSDataLocation getDataLocator()
           
 List<BBCodePlugin> getPlugins()
           
 void initDefaultBBCodes()
          
 void registerBBCodePlugin(BBCodePlugin plugin)
          Registers a new BBCode plugin.
 void save(List<BBCode> bbcodes)
          Saves a list of BBCodes.
 void setContext(org.exoplatform.management.ManagementContext context)
           
 void setDataLocator(org.exoplatform.forum.common.jcr.KSDataLocation dataLocator)
           
 void setPlugins(List<BBCodePlugin> plugins)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BBCODE_NODE_TYPE

public static final String BBCODE_NODE_TYPE

BBCODE_HOME_NODE_TYPE

public static final String BBCODE_HOME_NODE_TYPE
Constructor Detail

BBCodeServiceImpl

public BBCodeServiceImpl()

BBCodeServiceImpl

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

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)


Copyright © 2003–2014 eXo Platform SAS. All rights reserved.