public interface ContentContainer extends ContentEntry
| Modifier and Type | Field and Description |
|---|---|
static String |
ALBUM_CONTAINER
Represents the base album container.
|
static String |
ALBUM_CONTAINER_MUSIC
Represents a music album container.
|
static String |
ALBUM_CONTAINER_PHOTO
Represents a photo album container.
|
static String |
CONTAINER
Represents the base container class.
|
static String |
GENRE_CONTAINER
Represents an unordered collection of 'objects' that "belong" to the
genre.
|
static String |
GENRE_CONTAINER_MOVIE
Represents a movie genre container.
|
static String |
GENRE_CONTAINER_MUSIC
Represents a music genre container.
|
static String |
PERSON_CONTAINER
Represents an unordered collection of 'objects' that "belong"
to the people.
|
static String |
PERSON_CONTAINER_MUSIC_ARTIST
Represents a music artist person container.
|
static String |
PLAYLIST_CONTAINER
Represents a collection of objects.
|
static String |
STORAGE_FOLDER_CONTAINER
Represents all, or a partition of some physical storage unit of a single type.
|
static String |
STORAGE_SYSTEM_CONTAINER
Represents a potentially heterogeneous collection of storage media.
|
static String |
STORAGE_VOLUME_CONTAINER
Represents all, or a partition of, some physical storage unit of a single type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addContentEntries(ContentEntry[] entries)
Adds ContentEntry objects to this ContentContainer.
|
boolean |
addContentEntry(ContentEntry entry)
Adds a ContentEntry to this ContentContainer.
|
boolean |
contains(ContentEntry entry)
Checks whether the given
ContentEntry is in this ContentContainer
in local cache only. |
boolean |
createContentContainer(String name,
org.ocap.storage.ExtendedFileAccessPermissions permissions)
Creates a new ContentContainer as a child of this ContentContainer.
|
boolean |
createContentItem(File content,
String name,
org.ocap.storage.ExtendedFileAccessPermissions permissions)
Creates a new ContentItem representing a local file as a child of this
ContentContainer.
|
boolean |
delete()
Deletes this ContentContainer if and only if it is empty.
|
boolean |
deleteContents()
Deletes all the ContentEntry objects in this container except for
ContentContainer entries.
|
boolean |
deleteEntry()
Deletes this ContentContainer and all of the ContentEntry objects in this
container.
|
boolean |
deleteRecursive(boolean recursive)
If the recursive parameter is true, this method behaves in a manner
equivalent to
deleteEntry(). |
int |
getComponentCount()
Gets the number of ContentEntry objects in this ContentContainer.
|
String |
getContainerClass()
Returns the container class of this container.
|
long |
getContentSize()
Gets the size of the ContentContainer and all its content including
all its contained ContentContainer objects.
|
Date |
getCreationDate()
Returns the creation date of this ContentContainer.
|
Enumeration |
getEntries()
Gets an Enumeration over all entries in this ContentContainer, from local
cache only; does not cause network activity.
|
ContentList |
getEntries(ContentDatabaseFilter filter,
boolean traverse)
Returns a ContentList which contains the filtered ContentItems of this
ContentContainer.
|
ContentEntry |
getEntry(int n)
Returns the nth ContentEntry in this container, from local
cache only; does not cause network activity.
|
ContentEntry |
getEntry(String ID)
Returns the ContentEntry associated with the given ID in this container,
or NULL if no entry is found.
|
org.ocap.storage.ExtendedFileAccessPermissions |
getExtendedFileAccessPermissions()
Gets the ExtendedFileAccessPermissions of this ContentContainer.
|
int |
getIndex(ContentEntry n)
Gets the index of the specified ContentEntry, from local
cache only; does not cause network activity.
|
String |
getName()
Gets the name of this ContentContainer.
|
boolean |
isEmpty()
Returns an empty indication.
|
boolean |
removeContentEntries(ContentEntry[] entries)
Removes ContentEntry objects from this ContentContainer.
|
boolean |
removeContentEntry(ContentEntry entry)
Removes a ContentEntry from this ContentContainer.
|
ContentEntry[] |
toArray()
|
getEntryParent, getID, getParentID, getRootMetadataNode, getServer, isLocalstatic final String CONTAINER
static final String ALBUM_CONTAINER
static final String ALBUM_CONTAINER_PHOTO
static final String ALBUM_CONTAINER_MUSIC
static final String GENRE_CONTAINER
static final String GENRE_CONTAINER_MUSIC
static final String GENRE_CONTAINER_MOVIE
static final String PLAYLIST_CONTAINER
static final String PERSON_CONTAINER
static final String PERSON_CONTAINER_MUSIC_ARTIST
static final String STORAGE_SYSTEM_CONTAINER
static final String STORAGE_VOLUME_CONTAINER
static final String STORAGE_FOLDER_CONTAINER
String getContainerClass()
ALBUM_CONTAINER,
ALBUM_CONTAINER_MUSIC,
ALBUM_CONTAINER_PHOTO,
GENRE_CONTAINER,
GENRE_CONTAINER_MUSIC,
GENRE_CONTAINER_MOVIE,
PLAYLIST_CONTAINER,
PERSON_CONTAINER,
PERSON_CONTAINER_MUSIC_ARTIST,
STORAGE_SYSTEM_CONTAINER,
STORAGE_VOLUME_CONTAINER,
STORAGE_FOLDER_CONTAINERContentEntry[] toArray()
ContentEntry
in this ContentContainers including other
ContentContainers. Returns ContentEntry objects stored
in local cache only; does not cause network activity.boolean contains(ContentEntry entry)
ContentEntry is in this ContentContainer
in local cache only.entry - To search for in this ContentEntry.ContentEntry getEntry(String ID)
ID - String ID of the ContentEntry to returnContentEntry.getID()ContentEntry getEntry(int n)
n - Index of the entry to get.ArrayIndexOutOfBoundsException - if the nth value does
not exist.Enumeration getEntries()
int getIndex(ContentEntry n)
n - The index of the ContentEntry to search for.boolean createContentItem(File content, String name, org.ocap.storage.ExtendedFileAccessPermissions permissions)
content - The file containing the content to be representedname - The name of the new ContentItem.permissions - Access permissions of the new ContentContainer.SecurityException - if the caller does not have
HomeNetPermission("contentmanagement"), or if the caller
does not have write permission on this container.boolean createContentContainer(String name, org.ocap.storage.ExtendedFileAccessPermissions permissions)
name - The name of the new ContentContainer.permissions - Access permissions of the new ContentContainer.SecurityException - if the caller does not have
HomeNetPermission("contentmanagement"), or if the caller
does not have write permission on this container.ContentList getEntries(ContentDatabaseFilter filter, boolean traverse)
filter - A ContentDatabaseFilter to filter the ContentItems. If
the filter is null all entries are returnedtraverse - If true entries in the sub-containers are returned,
otherwise only entries in this ContentContainer are returned.ContentDatabaseFilterString getName()
ContentEntry.getID()boolean delete()
throws IOException
SecurityException - if the application is denied to
perform the actionIOException - if this ContentContainer is not local.boolean deleteContents()
throws IOException
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 (except for
ContentContainer entries).IOException - if this ContentContainer is not local.boolean deleteEntry()
throws IOException
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.deleteEntry in interface ContentEntrySecurityException - 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.IOException - if this ContentContainer is not local.boolean deleteRecursive(boolean recursive)
throws IOException
deleteEntry(). If the recursive parameter is false,
this method behaves in a manner equivalent to 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
a partial subset of the entries contained within.recursive - if true all entries and their entries are to be deleted.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.IOException - if this ContentContainer is not local.deleteContents(),
delete()boolean addContentEntry(ContentEntry entry)
entry - the content entry to be added to this containerIllegalStateException - if this ContentContainer does not have
a parentID property, i.e., this ContentContainer is not added
to the CDS.SecurityException - if the caller does not have
HomeNetPermission("contentmanagement"), or if the caller
does not have write permission on this container.boolean addContentEntries(ContentEntry[] entries)
entries - the content entries to be added to this containerIllegalStateException - if this ContentContainer does not have
a parentID property, i.e., this ContentContainer is not added
to the CDS.SecurityException - if the caller does not have
HomeNetPermission("contentmanagement"), or if the caller
does not have write permission on this container.boolean removeContentEntry(ContentEntry entry)
entry - the content entry to be removed from this containerIllegalArgumentException - if the ContentEntry parameter is a NetRecordingEntry
which contains one or more RecordingContentItems.SecurityException - if the caller does not have
HomeNetPermission("contentmanagement"), or if the caller
does not have write permission on this container.boolean removeContentEntries(ContentEntry[] entries)
entries - the content entries to be removed from this containerIllegalArgumentException - if the parameter includes a NetRecordingEntry
which contains one or more RecordingContentItems.SecurityException - if the caller does not have
HomeNetPermission("contentmanagement"), or if the caller
does not have write permission on this container.long getContentSize()
getContentSize in interface ContentEntryDate getCreationDate()
getCreationDate in interface ContentEntryorg.ocap.storage.ExtendedFileAccessPermissions getExtendedFileAccessPermissions()
getExtendedFileAccessPermissions in interface ContentEntryint getComponentCount()
boolean isEmpty()
Copyright © 2012 CableLabs. All Rights Reserved.