| java.lang.Object com.sun.kvem.midp.pim.PIMHandler com.sun.kvem.midp.pim.PIMBridge
PIMBridge | public class PIMBridge extends PIMHandler (Code) | | Implementations of shared PIM code.
|
Field Summary | |
final public static int | CONTACT_LIST Constant representing a Contact List. | final public static int | EVENT_LIST Constant representing an Event List. | final public static int | TODO_LIST Constant representing a ToDo List. |
Method Summary | |
public void | addCategory(Object listHandle, String category) Adds a category to the categories defined for a list. | public void | closeList(Object listHandle) Closes list. | public synchronized Object | commitListElement(Object listHandle, Object elementKey, byte[] element, String[] categories) Commit a list element. | public void | deleteCategory(Object listHandle, String category) Deletes a category from the categories defined for a list. | public String | getArrayElementLabel(Object listHandle, int field, int arrayElement) Gets the array element label. | public String | getAttributeLabel(Object listHandle, int attribute) Gets attribute label for the given field attribute. | public String[] | getCategories(Object listHandle) Gets the set of categories defined for a list. | public byte[] | getDefaultBinaryValue(Object listHandle, int field) Gets the default byte[] value for the given field. | public boolean | getDefaultBooleanValue(Object listHandle, int field) Gets the default boolean value for the given field. | public long | getDefaultDateValue(Object listHandle, int field) Gets the default date value for the given field. | public int | getDefaultIntValue(Object listHandle, int field) Gets the default integer value for the given field. | public String | getDefaultListName(int listType) Get the name of the default list for the given type. | public String[] | getDefaultStringArrayValue(Object listHandle, int field) Gets the default String[] value for the given field. | public String | getDefaultStringValue(Object listHandle, int field) Gets the default string value for the given field. | public int | getFieldDataType(Object listHandle, int field) Gets the data type of the field. | public String | getFieldLabel(Object listHandle, int field) Gets the label of the field. | public byte[] | getListElement(Object listHandle, Object elementKey) Get the data for a list element. | public String[] | getListElementCategories(Object listHandle, Object elementKey) Get categories for the specified list element. | public synchronized Object[] | getListKeys(Object listHandle) Get list element keys.
Parameters: listHandle - handle of the list an array of objects representing PIM element keys. | public synchronized String[] | getListNames(int listType) Get the supported list names for the given list type. | public int | getMaximumValues(Object listHandle, int field) Get the maximum number of values that can be stored in the given field. | public int | getStringArraySize(Object listHandle, int field) Checks if size of the string array. | public int[] | getSupportedArrayElements(Object listHandle, int field) Gets the array of supported elements. | public int[] | getSupportedAttributes(Object listHandle, int field) Gets the supported attributes for the given field. | public int | getSupportedAttributesMask(Object listHandle, int field) Gets a mask containing all possible attributes for the given field. | public int[] | getSupportedFields(Object listHandle) Gets all fields that are supported in this list. | public boolean | hasDefaultValue(Object listHandle, int field) Checks if field has default value. | public synchronized void | initialize() Set up data structures. | public boolean | isSupportedArrayElement(Object listHandle, int field, int arrayElement) Checks if the array element is supported. | public boolean | isSupportedAttribute(Object listHandle, int field, int attribute) Checks if attribute is supported. | public boolean | isSupportedField(Object listHandle, int field) Checks if field is supported in list. | public Object | openList(int listType, String listName, int openMode) Opens list. | public void | renameCategory(Object listHandle, String currentCategory, String newCategory) Rename a category. |
CONTACT_LIST | final public static int CONTACT_LIST(Code) | | Constant representing a Contact List.
|
EVENT_LIST | final public static int EVENT_LIST(Code) | | Constant representing an Event List.
|
TODO_LIST | final public static int TODO_LIST(Code) | | Constant representing a ToDo List.
|
addCategory | 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: PIMBridge.getCategories |
commitListElement | public synchronized 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. |
deleteCategory | 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: PIMBridge.getCategories |
getArrayElementLabel | public String getArrayElementLabel(Object listHandle, int field, int arrayElement)(Code) | | Gets the array element label.
Parameters: listHandle - handle of the list Parameters: field - the field number Parameters: arrayElement - the element identifier label fro the array element |
getAttributeLabel | public String getAttributeLabel(Object listHandle, int attribute)(Code) | | Gets attribute label for the given field attribute.
Parameters: listHandle - handle of the list Parameters: attribute - identifier of attribute attribute label |
getCategories | public String[] getCategories(Object listHandle) throws PIMException(Code) | | Gets the set of categories defined for a list.
Parameters: listHandle - handle of the list the set of defined categories throws: PIMException - If an error occurs orthe list is no longer accessible or closed. |
getDefaultBinaryValue | 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 the list Parameters: field - identifier of field default value of the field |
getDefaultBooleanValue | 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 the list Parameters: field - identifier of field default value of the field |
getDefaultDateValue | 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 the list Parameters: field - identifier of field default value of the field |
getDefaultIntValue | 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 the list Parameters: field - identifier of field default value of the field |
getDefaultListName | 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 | 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 the list Parameters: field - identifier of field default value of the field |
getDefaultStringValue | 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 the list Parameters: field - identifier of field default value of the field |
getFieldDataType | public int getFieldDataType(Object listHandle, int field)(Code) | | Gets the data type of the field.
Parameters: listHandle - handle of the list Parameters: field - identifier of field data type identifier |
getFieldLabel | public String getFieldLabel(Object listHandle, int field)(Code) | | Gets the label of the field.
Parameters: listHandle - handle of the list Parameters: field - identifier of field label of the field |
getListElement | public byte[] getListElement(Object listHandle, Object elementKey) throws PIMException(Code) | | Get the data for a list element.
Parameters: listHandle - handle of the 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 | 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 | public synchronized Object[] getListKeys(Object listHandle) throws PIMException(Code) | | Get list element keys.
Parameters: listHandle - handle of the 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 | public synchronized 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 | 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 the list Parameters: field - the field type the maximum value |
getStringArraySize | public int getStringArraySize(Object listHandle, int field)(Code) | | Checks if size of the string array.
Parameters: listHandle - handle of the list Parameters: field - the field number size of the string array |
getSupportedArrayElements | public int[] getSupportedArrayElements(Object listHandle, int field)(Code) | | Gets the array of supported elements.
Parameters: listHandle - handle of the list Parameters: field - the field number array of supported elements |
getSupportedAttributes | public int[] getSupportedAttributes(Object listHandle, int field)(Code) | | Gets the supported attributes for the given field.
Parameters: listHandle - handle of the list Parameters: field - identifier of field array of supported attributes of the field |
getSupportedAttributesMask | public int getSupportedAttributesMask(Object listHandle, int field)(Code) | | Gets a mask containing all possible attributes for the given field.
Parameters: listHandle - handle of the list Parameters: field - the field number supported attribute mask |
getSupportedFields | 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 | public boolean hasDefaultValue(Object listHandle, int field)(Code) | | Checks if field has default value.
Parameters: listHandle - handle of the list Parameters: field - identifier of field true if field supported |
initialize | public synchronized void initialize()(Code) | | Set up data structures.
|
isSupportedArrayElement | public boolean isSupportedArrayElement(Object listHandle, int field, int arrayElement)(Code) | | Checks if the array element is supported.
Parameters: listHandle - handle of the list Parameters: field - the field number Parameters: arrayElement - the element identifier true if attribute element is supported |
isSupportedAttribute | public boolean isSupportedAttribute(Object listHandle, int field, int attribute)(Code) | | Checks if attribute is supported.
Parameters: listHandle - handle of the list Parameters: field - the field number Parameters: attribute - identifier of attribute true if attribute is supported |
isSupportedField | public boolean isSupportedField(Object listHandle, int field)(Code) | | Checks if field is supported in list.
Parameters: listHandle - handle of the list Parameters: field - identifier of field true if field supported |
openList | 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. |
renameCategory | 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: PIMBridge.getCategories |
Methods inherited from com.sun.kvem.midp.pim.PIMHandler | abstract public void addCategory(Object listHandle, String category) throws PIMException(Code)(Java Doc) abstract public void closeList(Object listHandle) throws PIMException(Code)(Java Doc) abstract public Object commitListElement(Object listHandle, Object elementKey, byte[] element, String[] categories) throws PIMException(Code)(Java Doc) public String composeDate(long date)(Code)(Java Doc) public String composeDate1(long date)(Code)(Java Doc) public String composeDateTime(long date)(Code)(Java Doc) abstract public void deleteCategory(Object listHandle, String category) throws PIMException(Code)(Java Doc) abstract public String getArrayElementLabel(Object listHandle, int field, int arrayElement)(Code)(Java Doc) abstract public String getAttributeLabel(Object listHandle, int attribute)(Code)(Java Doc) abstract public String[] getCategories(Object listHandle) throws PIMException(Code)(Java Doc) abstract public byte[] getDefaultBinaryValue(Object listHandle, int field)(Code)(Java Doc) abstract public boolean getDefaultBooleanValue(Object listHandle, int field)(Code)(Java Doc) abstract public long getDefaultDateValue(Object listHandle, int field)(Code)(Java Doc) abstract public int getDefaultIntValue(Object listHandle, int field)(Code)(Java Doc) abstract public String getDefaultListName(int listType)(Code)(Java Doc) abstract public String[] getDefaultStringArrayValue(Object listHandle, int field)(Code)(Java Doc) abstract public String getDefaultStringValue(Object listHandle, int field)(Code)(Java Doc) abstract public int getFieldDataType(Object listHandle, int field)(Code)(Java Doc) abstract public String getFieldLabel(Object listHandle, int field)(Code)(Java Doc) public static PIMHandler getInstance()(Code)(Java Doc) abstract public byte[] getListElement(Object listHandle, Object elementKey) throws PIMException(Code)(Java Doc) abstract public String[] getListElementCategories(Object listHandle, Object elementKey) throws PIMException(Code)(Java Doc) abstract public Object[] getListKeys(Object listHandle) throws PIMException(Code)(Java Doc) abstract public String[] getListNames(int listType)(Code)(Java Doc) abstract public int getMaximumValues(Object listHandle, int field)(Code)(Java Doc) abstract public int getStringArraySize(Object listHandle, int field)(Code)(Java Doc) abstract public int[] getSupportedArrayElements(Object listHandle, int field)(Code)(Java Doc) abstract public int[] getSupportedAttributes(Object listHandle, int field)(Code)(Java Doc) abstract public int getSupportedAttributesMask(Object listHandle, int field)(Code)(Java Doc) abstract public int[] getSupportedFields(Object listHandle)(Code)(Java Doc) abstract public boolean hasDefaultValue(Object listHandle, int field)(Code)(Java Doc) abstract public boolean isSupportedArrayElement(Object listHandle, int field, int arrayElement)(Code)(Java Doc) abstract public boolean isSupportedAttribute(Object listHandle, int field, int attribute)(Code)(Java Doc) abstract public boolean isSupportedField(Object listHandle, int field)(Code)(Java Doc) abstract public Object openList(int listType, String listName, int openMode) throws PIMException(Code)(Java Doc) public long parseDate(String s)(Code)(Java Doc) public long parseDateTime(String s)(Code)(Java Doc) abstract public void renameCategory(Object listHandle, String currentCategory, String newCategory) throws PIMException(Code)(Java Doc)
|
|
|