com.brightcove.omniture

## Class OmnitureComponent.DefaultMediaNameFactory

- java.lang.Object
- - com.brightcove.omniture.OmnitureComponent.DefaultMediaNameFactory

- All Implemented Interfaces:
    OmnitureComponent.MediaNameFactory
  Enclosing class:
    OmnitureComponent

      public static class OmnitureComponent.DefaultMediaNameFactory
      extends java.lang.Object
      implements OmnitureComponent.MediaNameFactory

  Default implementation of MediaNameFactory which follows these steps:
  1. If video exists and has an ID property as identified by Video.Fields.ID, use it
  2. Otherwise if given a Source object, presumably the one chosen by the current SourceSelector implementation, use the URL from that Source
  3. Otherwise fall back to the DEFAULT_MEDIA_NAME constant value

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_MEDIA_NAME`
    `static java.lang.String` | `TAG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultMediaNameFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `build(Video video)`
    `java.lang.String` | `build(Video video, Source source)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TAG

          public static final java.lang.String TAG

    - #### DEFAULT_MEDIA_NAME

          public static final java.lang.String DEFAULT_MEDIA_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DefaultMediaNameFactory

          public DefaultMediaNameFactory()

  - ### Method Detail

    - #### build

          public java.lang.String build(Video video)

      Specified by:
        `build` in interface `OmnitureComponent.MediaNameFactory`

    - #### build

          public java.lang.String build(Video video,
                                        Source source)

      Specified by:
        `build` in interface `OmnitureComponent.MediaNameFactory`