fr.paris.lutece.plugins.extend.service.extender
Class ResourceExtenderService

java.lang.Object
  extended by fr.paris.lutece.plugins.extend.service.extender.ResourceExtenderService
All Implemented Interfaces:
IResourceExtenderService

public class ResourceExtenderService
extends Object
implements IResourceExtenderService

ResourceExtenderService


Field Summary
static String BEAN_SERVICE
          The Constant BEAN_SERVICE.
 
Constructor Summary
ResourceExtenderService()
           
 
Method Summary
 void create(ResourceExtenderDTO extender)
          Creates.
 void doCreateResourceAddOn(ResourceExtenderDTO resourceExtender)
          Do create resource add on.
 void doDeleteResourceAddOn(ResourceExtenderDTO resourceExtender)
          Do delete resource add on.
 List<ResourceExtenderDTO> findAll()
          Find by id hub resource.
 List<ResourceExtenderDTO> findByFilter(ResourceExtenderDTOFilter filter)
          Find by filter.
 List<ResourceExtenderDTO> findByListIds(List<Integer> listIds)
          Find by list ids.
 ResourceExtenderDTO findByPrimaryKey(int nIdExtender)
          Find by primary key.
 List<Integer> findIdsByFilter(ResourceExtenderDTOFilter filter)
          Find ids by filter.
 ResourceExtenderDTO findResourceExtender(String strExtenderType, String strIdExtendableResource, String strExtendableResourceType)
          Find the resource extender that either has an ID.
 ResourceExtenderDTO findWildCardResourceExtender(String strExtenderType, String strExtendableResourceType)
          Find wildcard resource extender.
 Map<String,Map<String,Boolean>> getActionPermissions(List<Integer> listIds, fr.paris.lutece.portal.business.user.AdminUser user)
          Gets the actions permission.
 String getContent(String strIdExtendableResource, String strExtendableResourceType, String strExtenderType, String strParameters, javax.servlet.http.HttpServletRequest request)
          Gets the resource extender content.
 fr.paris.lutece.portal.service.resource.IExtendableResource getExtendableResource(ResourceExtenderDTO resourceExtender)
          Gets the extendable resource
 fr.paris.lutece.portal.service.resource.IExtendableResource getExtendableResource(String strIdExtendableResource, String strExtendableResourceType)
          Gets the extendable resource.
 String getExtendableResourceName(ResourceExtenderDTO resourceExtender)
          Gets the extendable resource name.
 String getExtendableResourceName(String strIdExtendableResource, String strExtendableResourceType)
          Gets the extendable resource name.
 fr.paris.lutece.util.ReferenceList getExtenderTypes(Locale locale)
          Gets the extender types.
 Map<String,Boolean> getExtenderTypesInstalled(String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of installed extenders for a given resource id and a given resource type.
 IResourceExtender getResourceExtender(String strExtenderType)
          Gets the resource extender.
 List<IResourceExtender> getResourceExtenders()
          Gets the resource extenders.
 boolean isAuthorized(String strIdExtendableResource, String strExtendableResourceType, String strExtenderType)
          Checks if is authorized.
 boolean isAuthorizedToAllResources(int nIdExtender)
          Checks if is authorized to all resources.
 boolean isAuthorizedToAllResources(String strExtendableResourceType, String strExtenderType)
          Checks if is authorized to all resources.
 void remove(int nIdExtender)
          Delete.
 void update(ResourceExtenderDTO extender)
          Update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_SERVICE

public static final String BEAN_SERVICE
The Constant BEAN_SERVICE.

See Also:
Constant Field Values
Constructor Detail

ResourceExtenderService

public ResourceExtenderService()
Method Detail

create

@Transactional(value="extend.transactionManager")
public void create(ResourceExtenderDTO extender)
Creates.

Specified by:
create in interface IResourceExtenderService
Parameters:
extender - the extender

update

@Transactional(value="extend.transactionManager")
public void update(ResourceExtenderDTO extender)
Update.

Specified by:
update in interface IResourceExtenderService
Parameters:
extender - the extender

remove

@Transactional(value="extend.transactionManager")
public void remove(int nIdExtender)
Delete.

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

isAuthorized

public boolean isAuthorized(String strIdExtendableResource,
                            String strExtendableResourceType,
                            String strExtenderType)
Checks if is authorized.

Specified by:
isAuthorized in interface IResourceExtenderService
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
strExtenderType - the str extender type
Returns:
true, if is authorized

isAuthorizedToAllResources

public boolean isAuthorizedToAllResources(String strExtendableResourceType,
                                          String strExtenderType)
Checks if is authorized to all resources.

Specified by:
isAuthorizedToAllResources in interface IResourceExtenderService
Parameters:
strExtendableResourceType - the str extendable resource type
strExtenderType - the str extender type
Returns:
true, if is authorized to all resources

isAuthorizedToAllResources

public boolean isAuthorizedToAllResources(int nIdExtender)
Checks if is authorized to all resources.

Specified by:
isAuthorizedToAllResources in interface IResourceExtenderService
Parameters:
nIdExtender - the n id extender
Returns:
true, if is authorized to all resources

findByPrimaryKey

public ResourceExtenderDTO findByPrimaryKey(int nIdExtender)
Find by primary key.

Specified by:
findByPrimaryKey in interface IResourceExtenderService
Parameters:
nIdExtender - the n id extender
Returns:
the extender

findAll

public List<ResourceExtenderDTO> findAll()
Find by id hub resource.

Specified by:
findAll in interface IResourceExtenderService
Returns:
the list

findByFilter

public List<ResourceExtenderDTO> findByFilter(ResourceExtenderDTOFilter filter)
Find by filter.

Specified by:
findByFilter in interface IResourceExtenderService
Parameters:
filter - the filter
Returns:
the list

findResourceExtender

public ResourceExtenderDTO findResourceExtender(String strExtenderType,
                                                String strIdExtendableResource,
                                                String strExtendableResourceType)
Find the resource extender that either has an ID.

Specified by:
findResourceExtender in interface IResourceExtenderService
Parameters:
strExtenderType - the str extender type
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
Returns:
the resource extender dto

findWildCardResourceExtender

public ResourceExtenderDTO findWildCardResourceExtender(String strExtenderType,
                                                        String strExtendableResourceType)
Find wildcard resource extender.

Specified by:
findWildCardResourceExtender in interface IResourceExtenderService
Parameters:
strExtenderType - the str extender type
strExtendableResourceType - the str extendable resource type
Returns:
the resource extender dto

findIdsByFilter

public List<Integer> findIdsByFilter(ResourceExtenderDTOFilter filter)
Find ids by filter.

Specified by:
findIdsByFilter in interface IResourceExtenderService
Parameters:
filter - the filter
Returns:
the list

findByListIds

public List<ResourceExtenderDTO> findByListIds(List<Integer> listIds)
Find by list ids.

Specified by:
findByListIds in interface IResourceExtenderService
Parameters:
listIds - the list ids
Returns:
the list

getExtenderTypes

public fr.paris.lutece.util.ReferenceList getExtenderTypes(Locale locale)
Gets the extender types.

Specified by:
getExtenderTypes in interface IResourceExtenderService
Parameters:
locale - the locale
Returns:
the extender types

getExtenderTypesInstalled

public Map<String,Boolean> getExtenderTypesInstalled(String strIdExtendableResource,
                                                     String strExtendableResourceType,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of installed extenders for a given resource id and a given resource type.

Specified by:
getExtenderTypesInstalled in interface IResourceExtenderService
Parameters:
strIdExtendableResource - Id of the resource
strExtendableResourceType - Type of the resource
plugin - the plugin
Returns:
A map of associations of string / boolean. Only installed extender types are considered.

getContent

public String getContent(String strIdExtendableResource,
                         String strExtendableResourceType,
                         String strExtenderType,
                         String strParameters,
                         javax.servlet.http.HttpServletRequest request)
Gets the resource extender content.

Specified by:
getContent in interface IResourceExtenderService
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
strExtenderType - the str resource extender type
strParameters - the str parameters
request - the request
Returns:
the resource extender content

doCreateResourceAddOn

public void doCreateResourceAddOn(ResourceExtenderDTO resourceExtender)
Do create resource add on.

Specified by:
doCreateResourceAddOn in interface IResourceExtenderService
Parameters:
resourceExtender - the extender

doDeleteResourceAddOn

public void doDeleteResourceAddOn(ResourceExtenderDTO resourceExtender)
Do delete resource add on.

Specified by:
doDeleteResourceAddOn in interface IResourceExtenderService
Parameters:
resourceExtender - the extender

getResourceExtenders

public List<IResourceExtender> getResourceExtenders()
Gets the resource extenders.

Specified by:
getResourceExtenders in interface IResourceExtenderService
Returns:
the resource extenders

getResourceExtender

public IResourceExtender getResourceExtender(String strExtenderType)
Gets the resource extender.

Specified by:
getResourceExtender in interface IResourceExtenderService
Parameters:
strExtenderType - the str extender type
Returns:
the resource extender

getExtendableResourceName

public String getExtendableResourceName(ResourceExtenderDTO resourceExtender)
Gets the extendable resource name.

Specified by:
getExtendableResourceName in interface IResourceExtenderService
Parameters:
resourceExtender - the resource extender
Returns:
the extendable resource name

getExtendableResourceName

public String getExtendableResourceName(String strIdExtendableResource,
                                        String strExtendableResourceType)
Gets the extendable resource name.

Specified by:
getExtendableResourceName in interface IResourceExtenderService
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
Returns:
the extendable resource name

getExtendableResource

public fr.paris.lutece.portal.service.resource.IExtendableResource getExtendableResource(String strIdExtendableResource,
                                                                                         String strExtendableResourceType)
Gets the extendable resource.

Specified by:
getExtendableResource in interface IResourceExtenderService
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
Returns:
the extendable resource

getExtendableResource

public fr.paris.lutece.portal.service.resource.IExtendableResource getExtendableResource(ResourceExtenderDTO resourceExtender)
Gets the extendable resource

Specified by:
getExtendableResource in interface IResourceExtenderService
Parameters:
resourceExtender - the resource extender
Returns:
the extendable resource

getActionPermissions

public Map<String,Map<String,Boolean>> getActionPermissions(List<Integer> listIds,
                                                            fr.paris.lutece.portal.business.user.AdminUser user)
Gets the actions permission.

Specified by:
getActionPermissions in interface IResourceExtenderService
Parameters:
listIds - the list ids
user - the user
Returns:
the actions permission


Copyright © 2013 Mairie de Paris. All Rights Reserved.