Class DefaultCommonApplicationService<P extends Application>

    • Method Detail

      • readByContextId

        @Cacheable(value="trackingCacheByApplicationContextId",
                   keyGenerator="trackingCacheByApplicationContextId",
                   condition="@cacheStateManager.isEnabled(#root.caches, #root.args)")
        public P readByContextId​(String id,
                                 ContextInfo context)
        Description copied from interface: CrudEntityService
        Read a single instance of an entity in the form of a business domain.
        Specified by:
        readByContextId in interface CrudEntityService<P extends Application>
        Overrides:
        readByContextId in class BaseCrudEntityService<P extends Application>
        Parameters:
        id - The context id for the entity. This is the id by which the business recognizes the item.
        context - Context information used to discriminate the correct version of an entity by context id when multiple verions may be available across sandboxes, catalogs and applications.
        Returns:
        The narrowed entity instance in the form of a business instance
      • getApplicationFromRequestUrl

        @Cacheable(value="trackingCacheByApplicationUrl",
                   condition="@cacheStateManager.isEnabled(#root.caches, #root.args)")
        public Optional<P> getApplicationFromRequestUrl​(@NonNull
                                                        @NonNull String requestUrl)
        Description copied from interface: CommonApplicationService
        Find an Application by a given request url
        Specified by:
        getApplicationFromRequestUrl in interface CommonApplicationService<P extends Application>
        Parameters:
        requestUrl - the url to try to match against
        Returns:
        an Application associated with the given url
      • getApplicationFromUri

        protected Optional<P> getApplicationFromUri​(org.springframework.web.util.UriComponents uri)
        Returns an application that matches the request uri, specifically looking at the host
        Parameters:
        uri - the UriComponents that make up the request
        Returns:
        optional containing the Application that matches the request
      • convertUrlToUri

        protected org.springframework.web.util.UriComponents convertUrlToUri​(@NonNull
                                                                             @NonNull String url)
        Converts a url to UriComponents
        Parameters:
        url - the url to convert
        Returns:
        UriComponents for the given url