Object OmidServiceJsRepository

  • All Implemented Interfaces:

    
    public class OmidServiceJsRepository
    
                        

    A repository for managing the OMID (Open Measurement Interface Definition) JavaScript.

    This object provides methods to fetch and retrieve the OMID JavaScript, either from local storage or from the network. It also manages the fetching status of the OMID script.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getOmidScript() Retrieves the OMID JavaScript.
      final Unit fetchOmidScript() Fetches the OMID JavaScript from the network.
      final Unit clear()
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getOmidScript

         final String getOmidScript()

        Retrieves the OMID JavaScript.

        This method first attempts to retrieve the OMID JavaScript from the local source. If it's not available locally, it reads the OMID JavaScript from the raw resources.

        Returns:

        The OMID JavaScript as a String, or an empty string if the context is null.

      • fetchOmidScript

         final Unit fetchOmidScript()

        Fetches the OMID JavaScript from the network.

        This method checks if the OMID JavaScript should be fetched based on the current status and configuration. If it should be fetched, it attempts to fetch the script from the network and save it locally.