Class ResourceExtenderService

    • Field Detail

      • BEAN_SERVICE

        public static final java.lang.String BEAN_SERVICE
        The Constant BEAN_SERVICE.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResourceExtenderService

        public ResourceExtenderService()
    • Method Detail

      • remove

        @Transactional("extend.transactionManager")
        public void remove​(int nIdExtender)
        Delete.
        Specified by:
        remove in interface IResourceExtenderService
        Parameters:
        nIdExtender - the n id extender
      • isAuthorized

        public boolean isAuthorized​(java.lang.String strIdExtendableResource,
                                    java.lang.String strExtendableResourceType,
                                    java.lang.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​(java.lang.String strExtendableResourceType,
                                                  java.lang.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
      • findResourceExtender

        public ResourceExtenderDTO findResourceExtender​(java.lang.String strExtenderType,
                                                        java.lang.String strIdExtendableResource,
                                                        java.lang.String strExtendableResourceType)
        Find the resource extender.
        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​(java.lang.String strExtenderType,
                                                                java.lang.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
      • findResourceExtenderIncludingWildcard

        public ResourceExtenderDTO findResourceExtenderIncludingWildcard​(java.lang.String strExtenderType,
                                                                         java.lang.String strIdExtendableResource,
                                                                         java.lang.String strExtendableResourceType)
        Find the resource extender, or the wildcard resource extender if no extender with the specified id exists.
        Specified by:
        findResourceExtenderIncludingWildcard 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
      • getExtenderTypes

        public fr.paris.lutece.util.ReferenceList getExtenderTypes​(java.util.Locale locale)
        Gets the extender types.
        Specified by:
        getExtenderTypes in interface IResourceExtenderService
        Parameters:
        locale - the locale
        Returns:
        the extender types
      • getExtenderTypesInstalled

        public java.util.Map<java.lang.String,​java.lang.Boolean> getExtenderTypesInstalled​(java.lang.String strIdExtendableResource,
                                                                                                 java.lang.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 java.lang.String getContent​(java.lang.String strIdExtendableResource,
                                           java.lang.String strExtendableResourceType,
                                           java.lang.String strExtenderType,
                                           java.lang.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
      • getExtendableResourceName

        public java.lang.String getExtendableResourceName​(java.lang.String strIdExtendableResource,
                                                          java.lang.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​(java.lang.String strIdExtendableResource,
                                                                                                 java.lang.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 java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Boolean>> getActionPermissions​(java.util.List<java.lang.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
      • getExtendableResourceUrl

        public java.lang.String getExtendableResourceUrl​(java.lang.String strIdResource,
                                                         java.lang.String strResourceType)
        Get the main URL to access a resource
        Specified by:
        getExtendableResourceUrl in interface IResourceExtenderService
        Parameters:
        strIdResource - The id of the resource
        strResourceType - The type of a resource
        Returns:
        The main URL to access a resource, or null if the resource has no main URL