com.brightcove.proserve.mediaapi.wrapper.apiobjects
Class CustomField

java.lang.Object
  extended by com.brightcove.proserve.mediaapi.wrapper.apiobjects.CustomField

public class CustomField
extends java.lang.Object

Represents a CustomField object to/from the Media API.

Note that custom fields aren't officially dcoumented on the Brightcove documentation as of 2009/08/18 (http://support.brightcove.com/en/docs/media-api-objects-reference).

Author:
Sander Gates

Constructor Summary
CustomField()
          Default Constructor.
CustomField(java.lang.String json)
          Constructor using JSON string.
CustomField(java.lang.String name, java.lang.String value)
          Constructor using key-value pair.
 
Method Summary
 java.lang.String getName()
          Gets the name of the Custom Field.
 java.lang.String getValue()
          Gets the value of the Custom Field.
 void InitAll()
          Initializes all variables to null
 void setId(java.lang.String value)
          Sets the value of the Custom Field.
 void setName(java.lang.String name)
          Sets the name of the Custom Field.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomField

public CustomField()

Default Constructor.

All fields set to null to start - required fields must be set before calling Write Media API.


CustomField

public CustomField(java.lang.String json)
            throws JSONException

Constructor using JSON string.

Given a JSON string from the Media API, attempts to construct a new Custom Field object and fill out all of the fields defined. All other fields will be null.

Throws:
JSONException

CustomField

public CustomField(java.lang.String name,
                   java.lang.String value)

Constructor using key-value pair.

Given a custom name and value, attempts to construct a new Custom Field object and fill out all of the fields defined. All other fields will be null.

Method Detail

InitAll

public void InitAll()

Initializes all variables to null


getName

public java.lang.String getName()

Gets the name of the Custom Field.

Returns:
Name of the Custom Field

setName

public void setName(java.lang.String name)

Sets the name of the Custom Field.

Parameters:
name - Name of the Custom Field

getValue

public java.lang.String getValue()

Gets the value of the Custom Field.

Returns:
value of the Custom Field

setId

public void setId(java.lang.String value)

Sets the value of the Custom Field.

Parameters:
value - Value of the Custom Field

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object