Class ResourceExtenderService
java.lang.Object
fr.paris.lutece.plugins.extend.service.extender.ResourceExtenderService
- All Implemented Interfaces:
IResourceExtenderService
ResourceExtenderService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(ResourceExtenderDTO extender) Creates.voiddoCreateResourceAddOn(ResourceExtenderDTO resourceExtender) Do create resource add on.voiddoDeleteResourceAddOn(ResourceExtenderDTO resourceExtender) Do delete resource add on.findAll()Find by id hub resource.Find by filter.findByListIds(List<Integer> listIds) Find by list ids.findByPrimaryKey(int nIdExtender) Find by primary key.Find ids by filter.findResourceExtender(String strExtenderType, String strIdExtendableResource, String strExtendableResourceType) Find the resource extender.findResourceExtenderIncludingWildcard(String strExtenderType, String strIdExtendableResource, String strExtendableResourceType) Find the resource extender, or the wildcard resource extender if no extender with the specified id exists.findWildCardResourceExtender(String strExtenderType, String strExtendableResourceType) Find wildcard resource extender.getActionPermissions(List<Integer> listIds, fr.paris.lutece.portal.business.user.AdminUser user) Gets the actions permission.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.IExtendableResourcegetExtendableResource(ResourceExtenderDTO resourceExtender) Gets the extendable resourcefr.paris.lutece.portal.service.resource.IExtendableResourcegetExtendableResource(String strIdExtendableResource, String strExtendableResourceType) Gets the extendable resource.getExtendableResourceName(ResourceExtenderDTO resourceExtender) Gets the extendable resource name.getExtendableResourceName(String strIdExtendableResource, String strExtendableResourceType) Gets the extendable resource name.getExtendableResourceUrl(String strIdResource, String strResourceType) Get the main URL to access a resourcefr.paris.lutece.util.ReferenceListgetExtenderTypes(Locale locale) Gets the extender types.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.getResourceExtender(String strExtenderType) Gets the resource extender.Gets the resource extenders.booleanisAuthorized(String strIdExtendableResource, String strExtendableResourceType, String strExtenderType) Checks if is authorized.booleanisAuthorizedToAllResources(int nIdExtender) Checks if is authorized to all resources.booleanisAuthorizedToAllResources(String strExtendableResourceType, String strExtenderType) Checks if is authorized to all resources.voidremove(int nIdExtender) Delete.voidupdate(ResourceExtenderDTO extender) Update.
-
Field Details
-
BEAN_SERVICE
The Constant BEAN_SERVICE.- See Also:
-
-
Constructor Details
-
ResourceExtenderService
public ResourceExtenderService()
-
-
Method Details
-
create
Creates.- Specified by:
createin interfaceIResourceExtenderService- Parameters:
extender- the extender
-
update
Update.- Specified by:
updatein interfaceIResourceExtenderService- Parameters:
extender- the extender
-
remove
@Transactional("extend.transactionManager") public void remove(int nIdExtender) Delete.- Specified by:
removein interfaceIResourceExtenderService- Parameters:
nIdExtender- the n id extender
-
isAuthorized
public boolean isAuthorized(String strIdExtendableResource, String strExtendableResourceType, String strExtenderType) Checks if is authorized.- Specified by:
isAuthorizedin interfaceIResourceExtenderService- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource typestrExtenderType- the str extender type- Returns:
- true, if is authorized
-
isAuthorizedToAllResources
Checks if is authorized to all resources.- Specified by:
isAuthorizedToAllResourcesin interfaceIResourceExtenderService- Parameters:
strExtendableResourceType- the str extendable resource typestrExtenderType- 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:
isAuthorizedToAllResourcesin interfaceIResourceExtenderService- Parameters:
nIdExtender- the n id extender- Returns:
- true, if is authorized to all resources
-
findByPrimaryKey
Find by primary key.- Specified by:
findByPrimaryKeyin interfaceIResourceExtenderService- Parameters:
nIdExtender- the n id extender- Returns:
- the extender
-
findAll
Find by id hub resource.- Specified by:
findAllin interfaceIResourceExtenderService- Returns:
- the list
-
findByFilter
Find by filter.- Specified by:
findByFilterin interfaceIResourceExtenderService- Parameters:
filter- the filter- Returns:
- the list
-
findResourceExtender
public ResourceExtenderDTO findResourceExtender(String strExtenderType, String strIdExtendableResource, String strExtendableResourceType) Find the resource extender.- Specified by:
findResourceExtenderin interfaceIResourceExtenderService- Parameters:
strExtenderType- the str extender typestrIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource type- Returns:
- the resource extender dto
-
findWildCardResourceExtender
public ResourceExtenderDTO findWildCardResourceExtender(String strExtenderType, String strExtendableResourceType) Find wildcard resource extender.- Specified by:
findWildCardResourceExtenderin interfaceIResourceExtenderService- Parameters:
strExtenderType- the str extender typestrExtendableResourceType- the str extendable resource type- Returns:
- the resource extender dto
-
findResourceExtenderIncludingWildcard
public ResourceExtenderDTO findResourceExtenderIncludingWildcard(String strExtenderType, String strIdExtendableResource, String strExtendableResourceType) Find the resource extender, or the wildcard resource extender if no extender with the specified id exists.- Specified by:
findResourceExtenderIncludingWildcardin interfaceIResourceExtenderService- Parameters:
strExtenderType- the str extender typestrIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource type- Returns:
- the resource extender dto
-
findIdsByFilter
Find ids by filter.- Specified by:
findIdsByFilterin interfaceIResourceExtenderService- Parameters:
filter- the filter- Returns:
- the list
-
findByListIds
Find by list ids.- Specified by:
findByListIdsin interfaceIResourceExtenderService- Parameters:
listIds- the list ids- Returns:
- the list
-
getExtenderTypes
Gets the extender types.- Specified by:
getExtenderTypesin interfaceIResourceExtenderService- 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:
getExtenderTypesInstalledin interfaceIResourceExtenderService- Parameters:
strIdExtendableResource- Id of the resourcestrExtendableResourceType- Type of the resourceplugin- 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:
getContentin interfaceIResourceExtenderService- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource typestrExtenderType- the str resource extender typestrParameters- the str parametersrequest- the request- Returns:
- the resource extender content
-
doCreateResourceAddOn
Do create resource add on.- Specified by:
doCreateResourceAddOnin interfaceIResourceExtenderService- Parameters:
resourceExtender- the extender
-
doDeleteResourceAddOn
Do delete resource add on.- Specified by:
doDeleteResourceAddOnin interfaceIResourceExtenderService- Parameters:
resourceExtender- the extender
-
getResourceExtenders
Gets the resource extenders.- Specified by:
getResourceExtendersin interfaceIResourceExtenderService- Returns:
- the resource extenders
-
getResourceExtender
Gets the resource extender.- Specified by:
getResourceExtenderin interfaceIResourceExtenderService- Parameters:
strExtenderType- the str extender type- Returns:
- the resource extender
-
getExtendableResourceName
Gets the extendable resource name.- Specified by:
getExtendableResourceNamein interfaceIResourceExtenderService- 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:
getExtendableResourceNamein interfaceIResourceExtenderService- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- 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:
getExtendableResourcein interfaceIResourceExtenderService- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- 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:
getExtendableResourcein interfaceIResourceExtenderService- Parameters:
resourceExtender- the resource extender- Returns:
- the extendable resource
-
getActionPermissions
public Map<String,Map<String, getActionPermissionsBoolean>> (List<Integer> listIds, fr.paris.lutece.portal.business.user.AdminUser user) Gets the actions permission.- Specified by:
getActionPermissionsin interfaceIResourceExtenderService- Parameters:
listIds- the list idsuser- the user- Returns:
- the actions permission
-
getExtendableResourceUrl
Get the main URL to access a resource- Specified by:
getExtendableResourceUrlin interfaceIResourceExtenderService- Parameters:
strIdResource- The id of the resourcestrResourceType- The type of a resource- Returns:
- The main URL to access a resource, or null if the resource has no main URL
-