| java.lang.Object com.sun.kvem.midp.pim.PIMHandler
All known Subclasses: com.sun.kvem.midp.pim.PIMProxy, com.sun.kvem.midp.pim.PIMBridge,
PIMHandler | abstract public class PIMHandler (Code) | | Porting layer for PIM functionality. Implemented by PIMBridge
|
Method Summary | |
abstract public void | addCategory(Object listHandle, String category) Adds a category to the categories defined for a list. | abstract public void | closeList(Object listHandle) Closes list. | abstract public Object | commitListElement(Object listHandle, Object elementKey, byte[] element, String[] categories) Commit a list element. | public String | composeDate(long date) Converts date in milliseconds to yyyy-MM-dd string. | public String | composeDate1(long date) Converts date in milliseconds to yyyymmdd string. | public String | composeDateTime(long date) Converts date/time in milliseconds to yyyyMMddTHHmmss. | abstract public void | deleteCategory(Object listHandle, String category) Deletes a category from the categories defined for a list. | abstract public String | getArrayElementLabel(Object listHandle, int field, int arrayElement) Gets the array element label. | abstract public String | getAttributeLabel(Object listHandle, int attribute) Gets attribute label for the given field attribute. | abstract public String[] | getCategories(Object listHandle) Gets the set of categories defined for a list. | abstract public byte[] | getDefaultBinaryValue(Object listHandle, int field) Gets the default byte[] value for the given field. | abstract public boolean | getDefaultBooleanValue(Object listHandle, int field) Gets the default boolean value for the given field. | abstract public long | getDefaultDateValue(Object listHandle, int field) Gets the default date value for the given field. | abstract public int | getDefaultIntValue(Object listHandle, int field) Gets the default integer value for the given field. | abstract public String | getDefaultListName(int listType) Get the name of the default list for the given type. | abstract public String[] | getDefaultStringArrayValue(Object listHandle, int field) Gets the default String[] value for the given field. | abstract public String | getDefaultStringValue(Object listHandle, int field) Gets the default string value for the given field. | abstract public int | getFieldDataType(Object listHandle, int field) Gets the data type of the field. | abstract public String | getFieldLabel(Object listHandle, int field) Gets the label of the field. | public static PIMHandler | getInstance() Gets a handle to the current PIMHandler. | abstract public byte[] | getListElement(Object listHandle, Object elementKey) Get the data for a list element. | abstract public String[] | getListElementCategories(Object listHandle, Object elementKey) Get categories for the specified list element. | abstract public Object[] | getListKeys(Object listHandle) Get list element keys.
Parameters: listHandle - handle of list an array of objects representing PIM element keys. | abstract public String[] | getListNames(int listType) Get the supported list names for the given list type. | abstract public int | getMaximumValues(Object listHandle, int field) Get the maximum number of values that can be stored in the given field. | abstract public int | getStringArraySize(Object listHandle, int field) Checks if size of the string array. | abstract public int[] | getSupportedArrayElements(Object listHandle, int field) Gets the array of supported elements. | abstract public int[] | getSupportedAttributes(Object listHandle, int field) Gets the supported attributes for the given field. | abstract public int | getSupportedAttributesMask(Object listHandle, int field) Gets a mask containing all possible attributes for the given field. | abstract public int[] | getSupportedFields(Object listHandle) Gets all fields that are supported in this list. | abstract public boolean | hasDefaultValue(Object listHandle, int field) Checks if field has default value. | abstract public boolean | isSupportedArrayElement(Object listHandle, int field, int arrayElement) Checks if the array element is supported. | abstract public boolean | isSupportedAttribute(Object listHandle, int field, int attribute) Checks if attribute is supported. | abstract public boolean | isSupportedField(Object listHandle, int field) Checks if field is supported in list. | abstract public Object | openList(int listType, String listName, int openMode) Opens list. | public long | parseDate(String s) Converts date in format yyyy-MM-dd or yyyyMMdd to milliseconds. | public long | parseDateTime(String s) Converts date/time in format yyyyMMddTHHmmss(Z) to milliseconds. | abstract public void | renameCategory(Object listHandle, String currentCategory, String newCategory) Rename a category. |
addCategory | abstract public void addCategory(Object listHandle, String category) throws PIMException(Code) | | Adds a category to the categories defined for a list.
Parameters: listHandle - handle of list Parameters: category - category name throws: PIMException - If an error occurs orthe list is no longer accessible or closed. See Also: PIMHandler.getCategories |
closeList | abstract public void closeList(Object listHandle) throws PIMException(Code) | | Closes list.
Parameters: listHandle - handle of list throws: PIMException - in case of I/O error. |
commitListElement | abstract public Object commitListElement(Object listHandle, Object elementKey, byte[] element, String[] categories) throws PIMException(Code) | | Commit a list element.
Parameters: listHandle - handle of the list Parameters: elementKey - the key of the element to be stored, or null if thisis a new element. Parameters: element - element data in a form that can be interpretedby getListElement() Parameters: categories - list of categories which the list element belongs to a non-null key for this element, to be used in future callsto commitListElement() and getListElement() throws: PIMException - in case of I/O error. |
composeDate | public String composeDate(long date)(Code) | | Converts date in milliseconds to yyyy-MM-dd string.
Parameters: date - number of milliseconds date in format yyyy-MM-dd |
composeDate1 | public String composeDate1(long date)(Code) | | Converts date in milliseconds to yyyymmdd string.
Parameters: date - number of milliseconds date in format yyyymmdd |
composeDateTime | public String composeDateTime(long date)(Code) | | Converts date/time in milliseconds to yyyyMMddTHHmmss.
Parameters: date - number of milliseconds date/time in format yyyyMMddTHHmmss |
deleteCategory | abstract public void deleteCategory(Object listHandle, String category) throws PIMException(Code) | | Deletes a category from the categories defined for a list.
Parameters: listHandle - handle of list Parameters: category - category name throws: PIMException - If an error occurs orthe list is no longer accessible or closed. See Also: PIMHandler.getCategories |
getArrayElementLabel | abstract public String getArrayElementLabel(Object listHandle, int field, int arrayElement)(Code) | | Gets the array element label.
Parameters: listHandle - handle of list Parameters: field - the field number Parameters: arrayElement - the element identifier label fro the array element |
getAttributeLabel | abstract public String getAttributeLabel(Object listHandle, int attribute)(Code) | | Gets attribute label for the given field attribute.
Parameters: listHandle - handle of list Parameters: attribute - identifier of attribute attribute label |
getCategories | abstract public String[] getCategories(Object listHandle) throws PIMException(Code) | | Gets the set of categories defined for a list.
Parameters: listHandle - handle of list the set of defined categories throws: PIMException - If an error occurs orthe list is no longer accessible or closed. |
getDefaultBinaryValue | abstract public byte[] getDefaultBinaryValue(Object listHandle, int field)(Code) | | Gets the default byte[] value for the given field. This will
only
return a valid value if hasDefaultValue(listType, field) returns true.
Parameters: listHandle - handle of list Parameters: field - identifier of field default value of the field |
getDefaultBooleanValue | abstract public boolean getDefaultBooleanValue(Object listHandle, int field)(Code) | | Gets the default boolean value for the given field. This will
only
return a valid value if hasDefaultValue(listType, field) returns true.
Parameters: listHandle - handle of list Parameters: field - identifier of field default value of the field |
getDefaultDateValue | abstract public long getDefaultDateValue(Object listHandle, int field)(Code) | | Gets the default date value for the given field. This will only
return a valid value if hasDefaultValue(listType, field) returns true.
Parameters: listHandle - handle of list Parameters: field - identifier of field default value of the field |
getDefaultIntValue | abstract public int getDefaultIntValue(Object listHandle, int field)(Code) | | Gets the default integer value for the given field. This will
only
return a valid value if hasDefaultValue(listType, field) returns true.
Parameters: listHandle - handle of list Parameters: field - identifier of field default value of the field |
getDefaultListName | abstract public String getDefaultListName(int listType)(Code) | | Get the name of the default list for the given type.
Parameters: listType - the type of the list the name of the default list, or null if no list of this typeis supported. |
getDefaultStringArrayValue | abstract public String[] getDefaultStringArrayValue(Object listHandle, int field)(Code) | | Gets the default String[] value for the given field. This will
only
return a valid value if hasDefaultValue(listType, field) returns true.
Parameters: listHandle - handle of list Parameters: field - identifier of field default value of the field |
getDefaultStringValue | abstract public String getDefaultStringValue(Object listHandle, int field)(Code) | | Gets the default string value for the given field. This will
only
return a valid value if hasDefaultValue(listType, field) returns true.
Parameters: listHandle - handle of list Parameters: field - identifier of field default value of the field |
getFieldDataType | abstract public int getFieldDataType(Object listHandle, int field)(Code) | | Gets the data type of the field.
Parameters: listHandle - handle of list Parameters: field - identifier of field data type identifier |
getFieldLabel | abstract public String getFieldLabel(Object listHandle, int field)(Code) | | Gets the label of the field.
Parameters: listHandle - handle of list Parameters: field - identifier of field label of the field |
getInstance | public static PIMHandler getInstance()(Code) | | Gets a handle to the current PIMHandler.
PIM handler |
getListElement | abstract public byte[] getListElement(Object listHandle, Object elementKey) throws PIMException(Code) | | Get the data for a list element.
Parameters: listHandle - handle of list Parameters: elementKey - the key of the requested element a byte array containing the element data in a supported format throws: PIMException - in case of I/O error. |
getListElementCategories | abstract public String[] getListElementCategories(Object listHandle, Object elementKey) throws PIMException(Code) | | Get categories for the specified list element.
Parameters: listHandle - handle of list Parameters: elementKey - the key of the requested element an array of categories names throws: PIMException - in case of I/O error. |
getListKeys | abstract public Object[] getListKeys(Object listHandle) throws PIMException(Code) | | Get list element keys.
Parameters: listHandle - handle of list an array of objects representing PIM element keys. These keysare to be passed to getListElement() and commitListElement(). throws: PIMException - in case of I/O error. |
getListNames | abstract public String[] getListNames(int listType)(Code) | | Get the supported list names for the given list type. All list elements
must be unique within the list.
Parameters: listType - the type of the list a non-null array of supported list names. A copy of this array isreturned by PIM.listPIMLists() |
getMaximumValues | abstract public int getMaximumValues(Object listHandle, int field)(Code) | | Get the maximum number of values that can be stored in the given field.
Parameters: listHandle - handle of list Parameters: field - the field type the maximum value |
getStringArraySize | abstract public int getStringArraySize(Object listHandle, int field)(Code) | | Checks if size of the string array.
Parameters: listHandle - handle of list Parameters: field - the field number size of the string array |
getSupportedArrayElements | abstract public int[] getSupportedArrayElements(Object listHandle, int field)(Code) | | Gets the array of supported elements.
Parameters: listHandle - handle of list Parameters: field - the field number array of supported elements |
getSupportedAttributes | abstract public int[] getSupportedAttributes(Object listHandle, int field)(Code) | | Gets the supported attributes for the given field.
Parameters: listHandle - handle of list Parameters: field - identifier of field array of supported attributes of the field |
getSupportedAttributesMask | abstract public int getSupportedAttributesMask(Object listHandle, int field)(Code) | | Gets a mask containing all possible attributes for the given field.
Parameters: listHandle - handle of list Parameters: field - the field number supported attribute mask |
getSupportedFields | abstract public int[] getSupportedFields(Object listHandle)(Code) | | Gets all fields that are supported in this list. All fields supported by
this list, including both standard and extended, are returned in this
array.
Parameters: listHandle - handle of list an int array containing all fields supported by this list. Theorder of the fields returned is unspecified. If there are nosupported fields, a zero-length array is returned. |
hasDefaultValue | abstract public boolean hasDefaultValue(Object listHandle, int field)(Code) | | Checks if field has default value.
Parameters: listHandle - handle of list Parameters: field - identifier of field true if field supported |
isSupportedArrayElement | abstract public boolean isSupportedArrayElement(Object listHandle, int field, int arrayElement)(Code) | | Checks if the array element is supported.
Parameters: listHandle - handle of list Parameters: field - the field number Parameters: arrayElement - the element identifier true if attribute element is supported |
isSupportedAttribute | abstract public boolean isSupportedAttribute(Object listHandle, int field, int attribute)(Code) | | Checks if attribute is supported.
Parameters: listHandle - handle of list Parameters: field - the field number Parameters: attribute - identifier of attribute true if attribute is supported |
isSupportedField | abstract public boolean isSupportedField(Object listHandle, int field)(Code) | | Checks if field is supported in list.
Parameters: listHandle - handle of list Parameters: field - identifier of field true if field supported |
openList | abstract public Object openList(int listType, String listName, int openMode) throws PIMException(Code) | | Opens list.
Parameters: listType - the type of the list Parameters: listName - the name of the list Parameters: openMode - open mode list handle that will be used to access this list throws: PIMException - in case of I/O error. |
parseDate | public long parseDate(String s)(Code) | | Converts date in format yyyy-MM-dd or yyyyMMdd to milliseconds.
Parameters: s - date in format yyyy-MM-dd or yyyyMMdd number of milliseconds |
parseDateTime | public long parseDateTime(String s)(Code) | | Converts date/time in format yyyyMMddTHHmmss(Z) to milliseconds.
Parameters: s - date/time in format yyyyMMddTHHmmss(Z) number of milliseconds |
renameCategory | abstract public void renameCategory(Object listHandle, String currentCategory, String newCategory) throws PIMException(Code) | | Rename a category.
Parameters: listHandle - handle of list Parameters: currentCategory - current category name Parameters: newCategory - new category name throws: PIMException - If an error occurs orthe list is no longer accessible or closed. See Also: PIMHandler.getCategories |
|
|