fr.paris.lutece.plugins.extend.service.extender.config
Class ResourceExtenderConfigService

java.lang.Object
  extended by fr.paris.lutece.plugins.extend.service.extender.config.ResourceExtenderConfigService
All Implemented Interfaces:
IResourceExtenderConfigService, org.springframework.beans.factory.InitializingBean

public class ResourceExtenderConfigService
extends Object
implements IResourceExtenderConfigService, org.springframework.beans.factory.InitializingBean

ResourceExtenderConfigService


Constructor Summary
ResourceExtenderConfigService()
           
 
Method Summary
 void afterPropertiesSet()
          
 void create(IExtenderConfig config)
          Create a new config
<T> T
find(int nIdExtender)
          Find an extender
<T> T
find(String strExtenderType, String strIdExtendableResource, String strExtendableResourceType)
          Find an extender associated with a resource and with a given extender type
static
<T> T
getConfigBean(IExtenderConfig config)
          Get the config bean
protected  IExtenderConfigDAO<IExtenderConfig> getDAO()
          Get the DAO
 void remove(int nIdExtender)
          Removes.
 void setExtenderConfigDAO(IExtenderConfigDAO<IExtenderConfig> extenderConfigDAO)
          Set the extender config DAO
 void update(IExtenderConfig config)
          Update a config
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceExtenderConfigService

public ResourceExtenderConfigService()
Method Detail

setExtenderConfigDAO

public void setExtenderConfigDAO(IExtenderConfigDAO<IExtenderConfig> extenderConfigDAO)
Set the extender config DAO

Parameters:
extenderConfigDAO - the extender config DAO

create

public void create(IExtenderConfig config)
Create a new config

Specified by:
create in interface IResourceExtenderConfigService
Parameters:
config - the config

update

public void update(IExtenderConfig config)
Update a config

Specified by:
update in interface IResourceExtenderConfigService
Parameters:
config - the config

remove

public void remove(int nIdExtender)
Removes.

Specified by:
remove in interface IResourceExtenderConfigService
Parameters:
nIdExtender - the n id extender

find

public <T> T find(int nIdExtender)
Find an extender

Specified by:
find in interface IResourceExtenderConfigService
Type Parameters:
T - The class of extender to return.
Parameters:
nIdExtender - The id of the extender to return
Returns:
The extender of this service with the given id, or null id none was found

find

public <T> T find(String strExtenderType,
                  String strIdExtendableResource,
                  String strExtendableResourceType)
Find an extender associated with a resource and with a given extender type

Specified by:
find in interface IResourceExtenderConfigService
Type Parameters:
T - The class of extender to return.
Parameters:
strExtenderType - The type of the extender to get
strIdExtendableResource - The id of the resource the extender must be associated with.
strExtendableResourceType - The resource type the extender must be associated with.
Returns:
The extender, or null id none was found

getConfigBean

public static <T> T getConfigBean(IExtenderConfig config)
Get the config bean

Type Parameters:
T - The class of the bean
Parameters:
config - the config
Returns:
the config bean

getDAO

protected IExtenderConfigDAO<IExtenderConfig> getDAO()
Get the DAO

Returns:
the DAO

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


Copyright © 2013 Mairie de Paris. All Rights Reserved.