com.hqme.cm
Interface IVSD

All Known Implementing Classes:
IVSD.Stub

public interface IVSD

IVSD defines the HQME Virtual Storage Device (VSD) plugin interface. It abstracts object-data and meta-data storage and indexing facilities for a variety of storage devices. Storage is hierarchical and easily mapped to different file systems..


Nested Class Summary
static class IVSD.Stub
          Local-side IPC implementation stub class.
 
Method Summary
 java.lang.String[] allObjects(java.lang.String filter)
          The purpose of this method is to retrieve all objects matching the optional filter, substring of the interested objects' name, if they are visible to the calling client's origin.
 IContentObject createObject(java.lang.String name)
          Create a ContentObject object.
 long[] functionGroups()
          The functionGroups is a read-only data member and is an array of longs where each value describes a function group of the VSD to which the VSD Interface is associated.
 Property[] getCommandStatus(int commandId)
          Retrieve the status for a previously submitted VSD command.
 IContentObject getObject(java.lang.String name)
          Retrieve a ContentObject instance which provides additional information and access to the underlying object.
 java.lang.String getProperty(java.lang.String key)
          Retrieve a specific property associated with a VSD, as visible and relevant to the calling origin.
 java.lang.String[] getPropertyKeys()
          Retrieve the current VSD property keys.
 int issueCommand(int commandId, Property[] arguments)
          Issue a VSD a command.
 java.lang.String name()
          The name is a read only-data member and is the VSD name to which the VSD interface is associated.
 int removeObject(java.lang.String name)
          Remove a ContentObject object.
 int removeProperty(java.lang.String key)
          Remove a specific property associated with a VSD.
 int setProperty(java.lang.String key, java.lang.String value)
          Set a property key associated with a VSD
 int storageId()
          The storageId is a read-only data member and is the VSD identifier, assigned by VSD storage manager, platform unique and persistent once assigned.
 

Method Detail

storageId

int storageId()
              throws android.os.RemoteException
The storageId is a read-only data member and is the VSD identifier, assigned by VSD storage manager, platform unique and persistent once assigned.

Returns:
The VSD storage ID
Throws:
android.os.RemoteException

name

java.lang.String name()
                      throws android.os.RemoteException
The name is a read only-data member and is the VSD name to which the VSD interface is associated.

Returns:
The VSD name
Throws:
android.os.RemoteException

functionGroups

long[] functionGroups()
                      throws android.os.RemoteException
The functionGroups is a read-only data member and is an array of longs where each value describes a function group of the VSD to which the VSD Interface is associated. Properties and Commands may be applied based on the function groups.

Returns:
Array of function groups associated with the VSD.
Throws:
android.os.RemoteException

allObjects

java.lang.String[] allObjects(java.lang.String filter)
                              throws android.os.RemoteException
The purpose of this method is to retrieve all objects matching the optional filter, substring of the interested objects' name, if they are visible to the calling client's origin. This method returns a sequence of strings where each item in the sequence is a unique asset name.

Parameters:
filter - The optional current "working" folder for the search. For example, "myFolder1/", "myFolder1/mySubFolder1/" are valid filter, and NULL or empty string is treated as the VSD root "folder".
Returns:
Array of unique asset name for all found objects.
Throws:
android.os.RemoteException

getObject

IContentObject getObject(java.lang.String name)
                         throws android.os.RemoteException
Retrieve a ContentObject instance which provides additional information and access to the underlying object.

Parameters:
name - of the content object. It is the complete "path" including the object name to be accessed.
Returns:
Reference to the ContentObject. Return NULL if not found.
Throws:
android.os.RemoteException

createObject

IContentObject createObject(java.lang.String name)
                            throws android.os.RemoteException
Create a ContentObject object.

Parameters:
name - The name of the object to be created. The object logical hierarchy is indicated if a relative path included. Valid name example: "myObject1", "myFolder1/myObject1.mp3". The old object with the same name will be overwritten.
Returns:
Reference to the ContentObject.
Throws:
android.os.RemoteException

removeObject

int removeObject(java.lang.String name)
                 throws android.os.RemoteException
Remove a ContentObject object.

Parameters:
name - The name of the object to be remove. The object logical hierarchy is indicated if a relative path included. Valid name example: "myObject1", "myFolder1/myObject1.mp3".
Returns:
Error code.
Throws:
android.os.RemoteException

getPropertyKeys

java.lang.String[] getPropertyKeys()
                                   throws android.os.RemoteException
Retrieve the current VSD property keys.

Returns:
Property keys.
Throws:
android.os.RemoteException

getProperty

java.lang.String getProperty(java.lang.String key)
                             throws android.os.RemoteException
Retrieve a specific property associated with a VSD, as visible and relevant to the calling origin.

Parameters:
key - Property key name. The following VSD properties are defined for all VSDs: "VS_FN_GROUPS", "VS_TOTAL_CAPACITY", "VS_AVAILABLE_CAPACITY", "VS_OBJECT_COUNT"
Returns:
Property value. Return NULL if not found. If the return value is a binary chunk, it will be BASE64 encoded.
Throws:
android.os.RemoteException

setProperty

int setProperty(java.lang.String key,
                java.lang.String value)
                throws android.os.RemoteException
Set a property key associated with a VSD

Parameters:
key - Property key
value - Property value. If the value is a binary chunk, it must be BASE64 encoded.
Returns:
error code The possible error codes are "STATUS_SUCCESS", "ERR_PERMISSION_DENIED", and "ERR_GENERAL".
Throws:
android.os.RemoteException

removeProperty

int removeProperty(java.lang.String key)
                   throws android.os.RemoteException
Remove a specific property associated with a VSD.

Parameters:
key - Property key name
Returns:
error code The possible error codes are "STATUS_SUCCESS", "ERR_PERMISSION_DENIED", "ERR_NOT_FOUND", and "ERR_GENERAL".
Throws:
android.os.RemoteException

issueCommand

int issueCommand(int commandId,
                 Property[] arguments)
                 throws android.os.RemoteException
Issue a VSD a command. A VSD has a set of functional features which are utilized using the issueCommand and getCommandStatus methods.

Parameters:
commandId - Command id
arguments - property array as arguments.
Returns:
Error code.
Throws:
android.os.RemoteException

getCommandStatus

Property[] getCommandStatus(int commandId)
                            throws android.os.RemoteException
Retrieve the status for a previously submitted VSD command.

Parameters:
commandId - Command id
results - Property array as results.
Returns:
Error code.
Throws:
android.os.RemoteException