Interface IWebResourceFactory

  • All Known Implementing Classes:
    ChannelManager, PageManager

    public interface IWebResourceFactory
    Interface implemented by factories of WebResource. These factories are responsible for generating transient WebResource instances as demanded, but have no direct responsibility over their life-cycle.
    Since:
    5.0.0
    Version:
    $Revision$ $Date$
    • Method Detail

      • createWebResourceByDynamicPath

        WebResource createWebResourceByDynamicPath​(java.lang.String dynamicPath)
                                            throws PortalException
        Creates a WebResource instance based on a dynamic path.
        Parameters:
        dynamicPath - the dynamic path.
        Returns:
        the web resource.
        Throws:
        java.lang.IllegalArgumentException - if dynamicPath is not a valid web resource dynamic path for this factory.
        PortalException
        Since:
        5.0.0
      • getWebResourceSupportedLocales

        java.util.Collection<java.util.Locale> getWebResourceSupportedLocales​(WebResource webResource)
                                                                       throws PortalException
        Returns the locales that are supported for a WebResource created by this factory.
        Parameters:
        webResource - the web resource.
        Returns:
        the supported locales.
        Throws:
        PortalException
        Since:
        16.0.0
      • isCacheEnabled

        boolean isCacheEnabled​(WebResource webResource)
                        throws PortalException
        Returns if the cache is enabled for a web resource.
        Parameters:
        webResource - the web resource.
        Returns:
        true if the cache is enabled, false otherwise.
        Throws:
        PortalException
        Since:
        5.0.0
      • setWebResourcesMissingData

        void setWebResourcesMissingData​(java.lang.String resourceId,
                                        boolean processChildren)
                                 throws PortalException
        Sets missing data in the web resources of the specified resource.
        Parameters:
        resourceId - the resource owner of the web resources.
        processChildren - indicates if web resources of children resources should also be processed.
        Throws:
        PortalException
        Since:
        5.0.0
      • adjustResolvedFriendlyPath

        java.lang.String adjustResolvedFriendlyPath​(WebResource webResource,
                                                    java.lang.String friendlyPath)
        Adjusts a friendly path that has been resolved for a web resource.
        Parameters:
        webResource - the web resource.
        friendlyPath - the resolved friendly path.
        Returns:
        the adjusted friendly path value.
        Since:
        5.0.0
      • adjustFriendlyPathForClash

        java.lang.String adjustFriendlyPathForClash​(java.lang.String originalFriendlyPath,
                                                    java.lang.String clashedFriendlyPath,
                                                    java.lang.String suffix)
        Adjusts a friendly path due to clash.
        Parameters:
        originalFriendlyPath - the original friendly path resolved.
        clashedFriendlyPath - the last clashed friendly path value.
        numRetry - the number of retry for adjust clashing for this friendly path. In each call to this method for resolving a single friendly path this value is incremented.
        Returns:
        the adjusted friendly path value.
        Since:
        5.0.0
      • requiresFriendlyPathUpdate

        boolean requiresFriendlyPathUpdate​(WebResource webResource)
        Returns whether the friendly path for the given web resource requires updating.
        Parameters:
        webResource - the web resource.
        Returns:
        true if update is required, false otherwise.
        Since:
        7.0.0