Class DefaultCloudFontConnector

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CloudFontCollection createFontCollection()
      Creates a collection that will use this connector's connection details.
      java.lang.String getIdentifier()
      Returns a unique identifier for the connector.
      java.io.File getLocalCacheRoot()
      Returns the root directory of the local cache.
      java.net.URL getUrlForFontPath​(java.lang.String fontPath)
      Given a path to a font resource relative to the cloud file system root, returns a URL that can be used to download the resource.
      java.net.URL getUrlForMetadata()
      Returns a URL for metadata that describes the available fonts.
      java.net.URL getUrlForMetadataVersion()
      Returns a URL that returns a version code for the font metadata.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultCloudFontConnector

        public DefaultCloudFontConnector()
      • DefaultCloudFontConnector

        public DefaultCloudFontConnector​(java.lang.String identifier,
                                         java.lang.String cacheName,
                                         java.lang.String fontBaseUrl,
                                         java.lang.String metadataUrl)
    • Method Detail

      • getIdentifier

        public java.lang.String getIdentifier()
        Description copied from interface: CloudFontConnector
        Returns a unique identifier for the connector. This can be used to distinguish data from different connectors, for example, when storing settings.
        Specified by:
        getIdentifier in interface CloudFontConnector
        Returns:
        a unique identifier for the connector
      • getUrlForFontPath

        public java.net.URL getUrlForFontPath​(java.lang.String fontPath)
        Description copied from interface: CloudFontConnector
        Given a path to a font resource relative to the cloud file system root, returns a URL that can be used to download the resource.
        Specified by:
        getUrlForFontPath in interface CloudFontConnector
        Parameters:
        fontPath - a path to a font resource, such as "ofl/lobster/Lobster-Regular.ttf"
        Returns:
        a URL that can be used to download the resource
      • getUrlForMetadata

        public java.net.URL getUrlForMetadata()
        Description copied from interface: CloudFontConnector
        Returns a URL for metadata that describes the available fonts.
        Specified by:
        getUrlForMetadata in interface CloudFontConnector
        Returns:
        a URL for the font metadata
      • getUrlForMetadataVersion

        public java.net.URL getUrlForMetadataVersion()
        Description copied from interface: CloudFontConnector
        Returns a URL that returns a version code for the font metadata. When this version code changes, any cached metadata should be considered stale.
        Specified by:
        getUrlForMetadataVersion in interface CloudFontConnector
        Returns:
        a URL for the font metadata version
      • getLocalCacheRoot

        public java.io.File getLocalCacheRoot()
        Description copied from interface: CloudFontConnector
        Returns the root directory of the local cache. This directory is used to store downloaded font files and metadata. Two collection instances should not share the same cache root.
        Specified by:
        getLocalCacheRoot in interface CloudFontConnector
        Returns:
        the local cache root