uicc.contactmanager
Interface FieldDescriptorView


public interface FieldDescriptorView

A field descriptor describes a field that shall be present for all contacts in the contact manger.

All contacts shall have a field that corresponds to each field descriptor listed in the field descriptors list.

For each field descriptor, common properties are defined. These properties shall be fulfilled by the corresponding field for all contacts.
These properties are:

The FieldDescriptorView class provides:

The FieldDescriptorsListView class and the FieldDescriptorView class should be used at application installation in order to define the contacts structure.

A FieldDescriptorView instance may successively represent multiple field descriptors throughout its lifetime.
It is good practice, for an application that needs to manipulate field descriptors, to create one FieldDescriptorView instance at installation, that will be re-used throughout the application's lifetime.

An instance is necessarily in one of the following states:

More detailed description of the behavior of a FieldDescriptorView instance in these states is given below:

The FieldDescriptorView instances are owned by the calling application.


Method Summary
 void deselect()
           If the instance is SELECTED to a field descriptor, removes this bond.
 int getAttributes()
          Returns the attributes that any related field must have, as defined by the setAttributes() method.
 int getFieldDescriptorIdentifier()
          Returns the identifier of the field descriptor.
 int getFieldMaxSize()
          Returns the maximum field size.
 short getLabel(byte[] label, short labelOffset, short maxLabelLength)
          Gets the label of the field (text name of the field).
 short getType()
          Returns the field type.
 void setAttributes(int attributes)
           Sets the attributes that any related field must have.
 void setFieldMaxSize(int maximumSize)
          Sets the maximum size of the field values.
 void setLabel(byte[] label, short labelOffset, short labelLength)
          Sets the label of the field (text name of the field).
 void setType(short type)
          Sets the field type.
 

Method Detail

setType

void setType(short type)
Sets the field type.

Parameters:
type - field type

getType

short getType()
Returns the field type.

Returns:
field type

setAttributes

void setAttributes(int attributes)

Sets the attributes that any related field must have.

In any contact, the field related to this field descriptor must have at least the attributes defined by this method.

It may have additional attributes not defined here.

The attributes argument is an integer, where each bit represents an attribute. The attributes and their bit positions are defined in FieldView.ATTR_* constants.

Parameters:
attributes - field attributes

getAttributes

int getAttributes()
Returns the attributes that any related field must have, as defined by the setAttributes() method.

Returns:
field attributes

setLabel

void setLabel(byte[] label,
              short labelOffset,
              short labelLength)
Sets the label of the field (text name of the field).

Parameters:
label - field label
labelOffset - offset in label buffer
labelLength - length of label

getLabel

short getLabel(byte[] label,
               short labelOffset,
               short maxLabelLength)
Gets the label of the field (text name of the field).

Parameters:
label - buffer to store label into
labelOffset - offset in label buffer
maxLabelLength - maximum length of the label
Returns:
length read

setFieldMaxSize

void setFieldMaxSize(int maximumSize)
Sets the maximum size of the field values.

Parameters:
maximumSize - the maximum field size

getFieldMaxSize

int getFieldMaxSize()
Returns the maximum field size.

Returns:
maximum field size

getFieldDescriptorIdentifier

int getFieldDescriptorIdentifier()
Returns the identifier of the field descriptor.

Returns:
the field descriptor identifier, -1 if not included yet in a field descriptors list

deselect

void deselect()

If the instance is SELECTED to a field descriptor, removes this bond.

After a successful call to this method, the instance is in DESELECTED state.