Commit a07df583 authored by kkershaw's avatar kkershaw

Add java stub changes for HNEXT EC-1631

parent 4ce5445a
......@@ -259,7 +259,8 @@ public interface ContentContainer extends ContentEntry
/**
* Deletes this ContentContainer if and only if it is empty.
* References to this ContentContainer are not valid after this call.
* This method removes the content container from its parent.
* This method returns false if this is a root container.
* This method deletes a local ContentContainer only. If the #isLocal
* method returns false an exception is thrown.
*
......@@ -274,30 +275,54 @@ public interface ContentContainer extends ContentEntry
/**
* Deletes all the ContentEntry objects in this container except for
* ContentContainer entries. Calls the {@link ContentEntry#deleteEntry}
* method on each entry in this container. References to ContentEntry
* objects in this container are not valid after this call when the
* deletions are successful. This method deletes local ContentEntry
* ContentContainer entries. This method deletes local ContentEntry
* instances only. If the #isLocal method returns false, an exception is
* thrown.
*
* @return True if all of the ContentEntry objects in this container
* were deleted, otherwise returns false.
* @return True if all of the ContentEntry objects required to be
* deleted are deleted, otherwise returns false (e.g. ContentContainer entries
* are not required to be deleted)
*
* @throws SecurityException if the caller does not have
* HomeNetPermission("contentmanagement"), or if the caller
* does not have write permission on this container or
* and entries contained in this container.
* and entries contained in this container (except for
* ContentContainer entries).
*
* @throws java.io.IOException if this ContentContainer is not local.
*/
public boolean deleteContents() throws IOException;
/**
* Deletes this ContentContainer and all of its ContentEntry objects.
* If the recursive parameter is false, this function behaves in a manner
* equivalent to {@link #deleteContents()}. This method deletes local ContentEntry
* instances only. If the #isLocal method returns false, an exception is thrown.
* Deletes this ContentContainer and all of the ContentEntry objects in this
* container. Calls the {@link ContentEntry#deleteEntry} method on each
* ContentEntry in a recursive manner. This method deletes local
* ContentEntry instances only. If the #isLocal method returns false,
* an exception is thrown.
*
* If a SecurityException is thrown due to insufficient write access permissions
* on any entry contained within this ContentContainer, this method MAY delete
* a partial subset of the entries contained within.
*
* @return True if this ContentContainer and all of the ContentEntry objects in this container were
* deleted, otherwise returns false.
*
* @throws SecurityException if the caller does not have
* HomeNetPermission("contentmanagement"), or if the caller
* does not have write permission on this container or
* any entries contained in this container.
*
* @throws java.io.IOException if this ContentContainer is not local.
*
**/
public boolean deleteEntry() throws IOException;
/**
* If the recursive parameter is true, this method behaves in a manner
* equivalent to {@link #deleteEntry()}. If the recursive parameter is false,
* this method behaves in a manner equivalent to {@link #deleteContents()}.
* This method deletes local ContentEntry instances only. If the #isLocal
* method returns false, an exception is thrown.
*
* If a SecurityException is thrown due to insufficient write access permissions
* on any entry contained within this ContentContainer, this method MAY delete
......@@ -305,6 +330,9 @@ public interface ContentContainer extends ContentEntry
*
* @param recursive if true all entries and their entries are to be deleted.
*
* @return True if all ContentEntry objects that are required to be deleted are
* deleted, otherwise returns false.
* @throws SecurityException if the caller does not have
* HomeNetPermission("contentmanagement"), or if the caller
* does not have write permission on this container or
......@@ -363,8 +391,8 @@ public interface ContentContainer extends ContentEntry
public boolean addContentEntries(ContentEntry[] entries);
/**
* Removes a ContentEntry from this ContentContainer. Can only add
* local ContentEntry objects to local ContentContainers.
* Removes a ContentEntry from this ContentContainer. Can only remove
* local ContentEntry objects from local ContentContainers.
* When the ContentEntry parameter is a ContentContainer, all of its
* ContentEntry objects are removed from the parameter.
* For entries that are ContentContainer objects, a possible implementation
......@@ -388,7 +416,7 @@ public interface ContentContainer extends ContentEntry
/**
* Removes ContentEntry objects from this ContentContainer. Can only
* add local ContentEntry objects to local ContentContainer. If any
* remove local ContentEntry objects from local ContentContainer. If any
* ContentEntry is not contained within this container, this method
* will return false and no entries will be removed.
* When the ContentEntry parameter is a ContentContainer, all of its
......
......@@ -14,6 +14,7 @@ import javax.tv.service.Service;
* ContentResources. A ContentItem can have multiple ContentResources.
*/
public interface ContentItem extends ContentEntry
{
/**
* Represents the base content item.
......@@ -139,12 +140,12 @@ public interface ContentItem extends ContentEntry
* ContentItem only. If the #isLocal method returns false an exception is
* thrown.
* <p>
* Note: this overrides the definition of {@link ContentEntry}. If an
* application calls the ContentEntry.deleteEntry method on an object that
* is an instance of ContentItem, the implementation SHALL delete the
* Note: this overrides the definition of {@link ContentEntry#deleteEntry}.
* If an application calls the ContentEntry.deleteEntry method on an object
* that is an instance of ContentItem, the implementation SHALL delete the
* ContentItem as defined by this method.
* </p>
* The ContentItem is not valid anymore after this call.
* @return True if the ContentItem was deleted, otherwise returns false.
*
* @throws java.lang.SecurityException
* if the application does not have write
......
......@@ -33,6 +33,23 @@ public interface NetRecordingEntry extends ContentEntry {
*/
public static final String PROP_SCHEDULED_CDS_ENTRY_ID = "ocap:scheduledCDSEntryID";
/**
* Deletes this NetRecordingEntry if and only if it contains no RecordingContentItems.
* Deletes a local NetRecordingEntry only. If the #isLocal method returns false
* an exception is thrown.
*
* @return True if this NetRecordingEntry was deleted, otherwise returns
* false.
*
* @throws java.lang.SecurityException
* if the application does not have write
* ExtendedFileAccessPermission.
* @throws IOException
* if the NetRecordingEntry is not local.
*/
public boolean deleteEntry() throws IOException;
/**
* Retrieves the local individual RecordingContentItems that make up this
* series recording.
......
package org.ocap.hn.recording;
import java.io.IOException;
import org.ocap.hn.NetActionHandler;
import org.ocap.hn.NetActionRequest;
import org.ocap.hn.content.ContentItem;
......@@ -145,6 +146,28 @@ public interface RecordingContentItem extends ContentItem
*/
public static final String PROP_NET_RECORDING_ENTRY = "ocap:netRecordingEntry";
/**
* Deletes this RecordingContentItem, but does not remove the physical recording.
* Deletes a local RecordingContentItem only. If the #isLocal method returns false
* an exception is thrown.
* <p>
* Note: this overrides the definition of {@link ContentItem#deleteEntry}. If an
* application calls the ContentEntry.deleteEntry method on an object that
* is an instance of RecordingContentItem, the implementation SHALL delete the
* RecordingContentItem as defined by this method.
* </p>
*
* @return True if this RecordingContentItem was deleted, otherwise returns
* false.
*
* @throws java.lang.SecurityException
* if the application does not have write
* ExtendedFileAccessPermission.
* @throws IOException
* if the RecordingContentItem is not local.
*/
public boolean deleteEntry() throws IOException;
/**
* Requests that the presentation point of this recording be updated.
*
......
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