org.ocap.hn
Interface ContentManagementModule

All Superinterfaces:
NetModule

public interface ContentManagementModule
extends NetModule

This interface represents a NetModule that provides content management capabilities for the purposes of network copying, moving, deleting, and renaming directories, files, or all components of a recorded service.

All methods in this interface are asynchronous. The implementation SHALL generate an NetActionEvent when an asynchronous method completes or times out. Time outs are implementation specific. Each event SHALL contain an event type defined in NetActionEvent.


Field Summary
 
Fields inherited from interface org.ocap.hn.NetModule
CONTENT_LIST, CONTENT_MANAGER, CONTENT_RENDERER, CONTENT_SERVER, PROP_CONTROL_URL, PROP_DESCRIPTION_URL, PROP_EventSub_URL, PROP_NETMODULE_ID
 
Method Summary
 NetActionRequest copy(Locator source, Locator dest, NetActionHandler handler)
          Copies a file or a recorded service from one device to another.
 NetActionRequest delete(Locator target, NetActionHandler handler)
          Deletes a file or a recorded service on a remote device.
 NetActionRequest move(Locator source, Locator dest, NetActionHandler handler)
          Moves a file or a recorded service from one device to another.
 
Methods inherited from interface org.ocap.hn.NetModule
addNetModuleEventListener, getDevice, getKeys, getNetModuleId, getNetModuleType, getProperty, removeNetModuleEventListener
 

Method Detail

copy

NetActionRequest copy(Locator source,
                      Locator dest,
                      NetActionHandler handler)
                      throws IllegalArgumentException
Copies a file or a recorded service from one device to another. Possible action item types that can be generated by this method include; NetActionEvent.COMPLETED, NetActionEvent.ERROR_TIMED_OUT, NetActionEvent.ERROR_INVALID_PARAMETER, and NetActionEvent.ERROR_UNAUTHORIZED.

If the source parameter locates a ContentContainer, only the container is copied. Container contents will not be copied.

Parameters:
source - Location where the item is to be copied from.
dest - Location where the item is to be copied to.
handler - Action response will be notified to this handler.
Returns:
Action request for app query and control of a pending transaction.
Throws:
SecurityException - if the application does not have HomeNetPermission("contentmanagement") permission in its permission request file, or if the application does not have ExtendedFileAccessPermission for reading from the source or writing to the destination.
IllegalArgumentException - if the source or destination locators are not valid.

move

NetActionRequest move(Locator source,
                      Locator dest,
                      NetActionHandler handler)
                      throws IllegalArgumentException
Moves a file or a recorded service from one device to another. Possible action event types that can be generated by this method include; NetActionEvent.COMPLETED, NetActionEvent.ERROR_TIMED_OUT, NetActionEvent.ERROR_INVALID_PARAMETER, and NetActionEvent.ERROR_UNAUTHORIZED.

Moving a ContentContainer is not supported. If the source parameter locates a ContentContainer this method will throw an exception.

Parameters:
source - Location where the item is to be moved from.
dest - Location where the item is to be moved to.
handler - Action response will be notified to this handler.
Returns:
Action request for app query and control of a pending transaction.
Throws:
SecurityException - if the application does not have HomeNetPermission("contentmanagement") permission in its permission request file, or if the application does not have ExtendedFileAccessPermission for reading from the source or writing to the destination.
IllegalArgumentException - if the source or destination locators are not valid, or if the source locates a ContentContainer.

delete

NetActionRequest delete(Locator target,
                        NetActionHandler handler)
                        throws IllegalArgumentException
Deletes a file or a recorded service on a remote device. Possible action event types that can be generated by this method include; NetActionEvent.COMPLETED, NetActionEvent.ERROR_TIMED_OUT, NetActionEvent.ERROR_INVALID_PARAMETER, and NetActionEvent.ERROR_UNAUTHORIZED.

Parameters:
target - Location of the item is to be deleted.
handler - Action response will be notified to this handler.
Returns:
Action request for app query and control of a pending transaction.
Throws:
SecurityException - if the application does not have HomeNetPermission("contentmanagement") permission in its permission request file, or if the application does not have ExtendedFileAccessPermission for writing to the target.
IllegalArgumentException - if the target locator is not valid.