Commit 4bccb9d2 authored by nshah's avatar nshah

OCVET-247, v17 of Content Transforamtion stubs, 11/Jan/13, 1:02pm

parent d8f6eb8c
......@@ -12,6 +12,7 @@ public interface ContentFormat
* This method returns an identifier representing the media format of
* the content. See [OC-BUNDLE] and <code>ContentProfile</code> for a list
* of valid identifiers.
* See {@link ContentProfile}
*
* @return The media format of the content.
*/
......@@ -23,7 +24,7 @@ public interface ContentFormat
* approved output with CableLabs.
* See {@link ProtectionType}
*
* @return The <code>ProtectionType</code>. Returns empty string if the
* @return The protection type. Returns empty string if the
* content is not protected.
*/
public String getProtectionType();
......
package org.ocap.hn.content;
/**
* Interface defining constants that represent content profile identifiers for
* HTTP adaptive delivery content.
* Interface defining constants that represent content profile identifiers to be
* used in conjunction with the <code>ContentFormat</code> interface.
* See [OC-BUNDLE] for a list of content profile identifiers.
*
*/
public interface ContentProfile
......
......@@ -25,19 +25,21 @@ public interface ContentResource
public static final String UNKNOWN_MIME_TYPE = "unknown";
/**
* Deletes the binary representation of this ContentResource and the
* ContentResource is removed from any containing ContentEntry. The
* ContentResource is not valid anymore after this call.
* This method deletes a local ContentResource only. If the #isLocal
* method returns false an exception is thrown. Does not delete the content
* associated with this ContentResource; see #getLocator.
* Deletes the binary representation of this <code>ContentResource</code>
* and the <code>ContentResource</code> is removed from any containing
* <code>ContentEntry</code>. The <code>ContentResource</code> is not
* valid anymore after this call. This method deletes a local
* <code>ContentResource</code> only. If the #isLocal
* method on the containing <code>ContentItem</code>
* returns false an exception is thrown. Does not delete the content
* associated with this <code>ContentResource</code>; see #getLocator.
*
* @return True if this ContentResource was deleted, otherwise returns
* false.
*
* @throws java.lang.SecurityException if the application is does not have
* a write ExtendedFileAccessPermission.
* @throws java.io.IOException if the ContentResource is not local.
* @throws java.io.IOException if the associated ContentItem is not local.
*
*/
public boolean delete() throws IOException;
......@@ -192,12 +194,16 @@ public interface ContentResource
public boolean isRenderable();
/**
• Returns a list of transformed <code>ContentFormat</code> that are available. There may
• be multiple ContentFormat instances returned that correspond to a single ContentResource
• in case of HTTP Adaptive content.
* Returns a list of transformed <code>ContentFormat</code> that are
* available. There may be multiple <code>ContentFormat</code> instances
* returned that correspond to a single <code>ContentResource</code>
* in case of HTTP Adaptive content. If the #isLocal method on the
* containing <code>ContentItem</code> returns false an exception is thrown.
*
* @return Array of <code>ContentFormat</code>.
* @return Array of ContentFormat.
*
* @throws java.io.IOException if the associated ContentItem is not local.
*/
public ContentFormat[] getTransformedContentFormats();
public ContentFormat[] getTransformedContentFormats() throws IOException;
}
......@@ -6,21 +6,21 @@ package org.ocap.hn.content;
public interface OutputVideoContentFormat extends ContentFormat
{
/**
* Returns the content vertical resolution in pixels.
* Returns the content maximum vertical resolution in pixels.
*
* @return The vertical content resolution.
*/
public int getVerticalResolution();
/**
* Returns the content horizontal resolution in pixels.
* Returns the content maximum horizontal resolution in pixels.
*
* @return The content horizontal resolution.
*/
public int getHorizontalResolution();
/**
* Returns the bit rate in bits per second (bps) of the output content.
* Returns the bit rate in bits per second (bps) of the output content.
*
* @return The bitrate of the content in bits per second
*/
......
......@@ -2,7 +2,8 @@ package org.ocap.hn.content;
/**
* Interface defining constants that represent supported
* output protection types.
* output protection types to be used in conjunction
* with the <code>ContentFormat</code> interface.
*
*/
public interface ProtectionType
......@@ -14,7 +15,8 @@ public interface ProtectionType
public static final String DTCP_IP = "DTCP-IP";
/**
* DECE DRM type. Used with any DRM that is part of DECE as defined in [OC-BUNDLE].
* DECE DRM type. Used with any DRM that is part of DECE as defined
* in [OC-BUNDLE].
*/
public static final String DECE_DRM = "DECE-DRM";
......
......@@ -3,9 +3,9 @@ package org.ocap.hn.transformation;
import org.ocap.hn.content.ContentFormat;
/**
* This interface represents transformations from a single input content format to
* multiple output content formats. Instances implementing this interface are created
* by the <code>TransformationManager</code>.
* This interface represents transformations from a single input content format
* to multiple output content formats. Instances implementing this interface are
* created by the <code>TransformationManager</code>.
*/
public interface Transformation
{
......@@ -18,7 +18,8 @@ public interface Transformation
/**
* Returns all of the possible output content formats the input format can
* be transformed into.
* be transformed into. For content formats, that include video the method
* SHALL return <code>OutputVideoContentFormat</code> instances.
*
* @return The output content formats.
*/
......
......@@ -5,8 +5,10 @@ import org.ocap.hn.content.ContentFormat;
import org.ocap.hn.content.ContentItem;
/**
* Listener interface for classes interested in getting notifications from the TransformationManager
* Only one of the notify callbacks will be received for each (ContentItem, ContentFormat) tuple.
* Listener interface for classes interested in getting notifications from the
* <code>TransformationManager</code>. Only one of the notify callbacks will be
* received for each (<code>ContentItem</code>, <code>ContentFormat</code>)
* tuple.
*
*/
public interface TransformationListener extends EventListener {
......@@ -22,27 +24,30 @@ public interface TransformationListener extends EventListener {
public static final int REASON_RESOURCE_UNAVAILABLE = 1;
/**
* ReasonCode: The specific content item was deleted after the transformation was requested
* ReasonCode: The specific content item was deleted after the
* transformation was requested.
*/
public static final int REASON_CONTENTITEM_DELETED = 2;
/**
* Callback indicating the <code>ContentResource</code> for the contentFormat
* has been created.
* Callback indicating the <code>ContentResource</code> for the
* contentFormat has been created.
*
* @param contentItem affected contentItem
* @param contentFormat requested transformation on contentItem
*/
void notifyTransformationReady(ContentItem contentItem, ContentFormat contentFormat);
void notifyTransformationReady(ContentItem contentItem,
ContentFormat contentFormat);
/**
* Callback indicating the content binary representation for the contentFormat could not
* be created.
* Callback indicating the content binary representation for the
* contentFormat could not be created.
*
* @param contentItem affected contentItem
* @param contentFormat requested transformation on contentItem
* @param reasonCode reason for the failure
*/
void notifyTransformationFailed(ContentItem contentItem, ContentFormat contentFormat, int reasonCode);
void notifyTransformationFailed(ContentItem contentItem,
ContentFormat contentFormat, int reasonCode);
}
......@@ -18,7 +18,7 @@ public abstract class TransformationManager
}
/**
* Gets an instance of the TransformationManager.
* Gets an instance of the <code>TransformationManager</code>.
*
* @throws SecurityException if the calling application has not been granted
* HomeNetPermission("contentmanagement").
......@@ -29,10 +29,11 @@ public abstract class TransformationManager
}
/**
* Adds a TransformationListener to receive callbacks from the TransformationManager.
* The TransformationListener will be notified whenever transformations are applied
* for the ContentItem. Subsequent calls to register the same <code>listener</code>
* will be ignored.
* Adds a <code>TransformationListener</code> to receive callbacks from the
* <code>TransformationManager</code>. The <code>TransformationListener</code>
* will be notified whenever transformations are applied for the
* <code>ContentItem</code>. Subsequent calls to register the same
* listener will be ignored.
*
* @param listener The listener that will receive the callbacks
*/
......@@ -56,10 +57,11 @@ public abstract class TransformationManager
/**
* Sets the default transformations. Default transformations will be applied
* to newly-created ContentItems only and certain calls to TransformationManager.
* A call to setDefaultTransformation over-rides any previously-set default
* transformations and passing an empty array disables any previously-set default
* transformations. See [OC-BUNDLE] for additional mapping of this method.
* to newly-created ContentItems only and certain calls to
* <code>TransformationManager</code>. A call to setDefaultTransformation
* over-rides any previously-set default transformations and passing an
* empty array disables any previously-set default transformations.
* See [OC-BUNDLE] for additional mapping of this method.
*
* @param transformations The new default transformations.
*
......@@ -86,26 +88,28 @@ public abstract class TransformationManager
public abstract Transformation [] getTransformations(ContentItem item);
/**
* Applies the transformations to all existing local content items that represent
* network operator content. A call to this method will remove
* Applies the transformations to all existing local content items that
* represent network operator content. A call to this method will remove
* any existing transformations before setting the transformations.
* See [OC-BUNDLE] for additional mapping of this method.
*
* @param transformations The array of transformations to be applied. If null, all
* transformations will be removed and none will be applied.
* @param transformations The array of transformations to be applied. If
* null, all transformations will be removed and none will be applied.
*/
public abstract void setTransformations(Transformation [] transformations);
/**
* Applies the default transformations for a set of content items. Configures
* metadata indicating content transformation support for each ContentItem
* in the <code>items</code> array parameter. If a content item in the array
* parameter is not local or does not represent MSO local content it is
* skipped without change or notification. A call to this method will remove
* any existing transformations before setting the transformations.
* metadata indicating content transformation support for each
* <code>ContentItem</code> in the items array parameter. If a content item
* in the array parameter is not local or does not represent MSO local
* content it is skipped without change or notification. A call to this
* method will remove any existing transformations before setting the
* transformations.
* See [OC-BUNDLE] for additional mapping of this method.
*
* @param items The array of content items the transformation metadata will be configured in.
* @param items The array of content items the transformation metadata
* will be configured in.
*
* @throws IllegalArgumentException if the parameter is null or empty.
*/
......@@ -114,16 +118,18 @@ public abstract class TransformationManager
/**
* Applies specific transformations for a set of content items. Configures
* metadata indicating content transformation support that matches any
* of the transformations in the Transformations array parameter for each
* of the transformations in the transformations array parameter for each
* content item in the content item array parameter. If a ContentItem in
* the array parameter is not local or does not represent MSO local
* content it is skipped without change or notification. A call to this method will remove
* any existing transformations before setting the transformations.
* content it is skipped without change or notification. A call to this
* method will remove any existing transformations before setting the
* transformations.
* See [OC-BUNDLE] for additional mapping of this method.
*
* @param items The array of content items the transformation metadata will be configured in.
* @param transformations The array of transformations to apply. If null, all
* transformations will be removed and none will be applied.
* @param items The array of content items the transformation metadata will
* be configured in.
* @param transformations The array of transformations to apply. If null,
* all transformations will be removed and none will be applied.
*
* @throws IllegalArgumentException if items parameter is null or empty.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment