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$
Author:
Patrice Lamarque

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)
          Delete an existing BBCode
 BBCode findById(String id)
          Load a specific BBCode
 List<String> getActive()
          Retrieve BBCode IDs that are active
 List<BBCode> getAll()
          Retrieve all BBCodes
 org.exoplatform.forum.common.jcr.KSDataLocation getDataLocator()
           
 List<BBCodePlugin> getPlugins()
           
 void initDefaultBBCodes()
          
 void registerBBCodePlugin(BBCodePlugin plugin)
          Register a new BBCode plugin
 void save(List<BBCode> bbcodes)
          Save 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
Register a new BBCode plugin

Specified by:
registerBBCodePlugin in interface BBCodeService
Throws:
Exception

initDefaultBBCodes

public void initDefaultBBCodes()
                        throws Exception

Throws:
Exception

save

public void save(List<BBCode> bbcodes)
          throws Exception
Save a list of BBCodes

Specified by:
save in interface BBCodeService
Parameters:
bbcodes - List of BBCodes to save
Throws:
Exception

getAll

public List<BBCode> getAll()
                    throws Exception
Retrieve all BBCodes

Specified by:
getAll in interface BBCodeService
Returns:
List of all registered BBCodes
Throws:
Exception

getActive

public List<String> getActive()
                       throws Exception
Retrieve BBCode IDs that are active

Specified by:
getActive in interface BBCodeService
Returns:
List of BBCOde IDs
Throws:
Exception

findById

public BBCode findById(String id)
                throws Exception
Load a specific BBCode

Specified by:
findById in interface BBCodeService
Parameters:
id - ID of the BBCode
Returns:
Throws:
Exception

delete

public void delete(String bbcodeId)
            throws Exception
Delete an existing BBCode

Specified by:
delete in interface BBCodeService
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 © 2013 eXo Platform SAS. All Rights Reserved.