[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

ContactsMasterList

inherits from ConcatenatedList
inherits from StorageContainer
inherits from CachesStorageSize
inherits from CanOfferPurgingSuggestions
inherits from FilingChoice

Object <- ConcatenatedList <- ContactsMasterList



Operations

Get list of all operations

AddCopyToMasterList
AddToMasterList
BeginContactNameChange
DestroySystemStorageContents
EachStorageObject
EndContactNameChange
FileTo
FindAddressFromAttributeText
FindByName
FindContactFromInfo
FindOrCreateContact
FindSectionAndCardIndex
InstallInto
MakeValid
RemoveFromMasterList
Search
SearchForSuggestions
StorageInstallIndexical
SuggestionSearchStatus


Attributes

Get list of all attributes

CanFileIntoFileCabinet
Count
NumberOfComponentLists


Fields

Field Type
ConcatenatedList: componentLists: ObjectList
CachesStorageSize: storedSize: Unsigned
ContactsMasterList: count: Unsigned


Instance template

instance ContactsMasterList tag;
 componentLists: nilObject;
     storedSize: 0;
          count: 0;
end instance;

Class definition

Define Class ContactsMasterList;
    inherits from ConcatenatedList, StorageContainer, CachesStorageSize, CanOfferPurgingSuggestions, FilingChoice;
    
    field count: Unsigned;
    
    // maintaining the collection
    operation AddToMasterList(contact: FullContact);
        // adds <fullContact> to appropriate lists and caches so that
        // it will appear in the name cards scene and people picker;
        // keeps count field up to date
    operation AddCopyToMasterList(contact: FullContact): FullContact;
        // copies <fullContact> into preferred container, then calls AddToMasterList;
        // returns result of moving <contact> to preferred container
    operation BeginContactNameChange(contact: FullContact): Object;
        // removes <fullContact> from all groups, and returns list of groups it was in;
        // call before RemoveFromMasterList before changing name of <fullContact>;
        // override rarely
    operation EndContactNameChange(contact: FullContact; returnValueFromBegin: Object);
        // adds <fullContact> to list of groups in <returnValueFromBegin>, which should
        // be the result of BeginContactNameChange;
        // call after AddToMasterList after changing name of <fullContact>
        // override rarely
    operation RemoveFromMasterList(fullContact: FullContact; willAddBackAndRedisplay: Boolean);
        // removes <fullContact> from appropriate lists and caches so
        // that it no longer appears in the name cards scene and people picker.
        // willAddBackAndRedisplay indicates that the card will be added back to the list
        // and redisplayed immediately (possibly under a different name), so the name cards
        // scene shouldn't be updated.
        // keeps count field up to date
        
    overrides Count;
        // gets count from field, or calls InheritedCount if field has special invalid value
    overrides MakeValid;
        // puts special invalid value in count field so count will be recomputed next time Count is called
    
    // storeroom and low-memory management
    overrides SearchForSuggestions;
        // adds deletable contacts to purge list
    overrides DestroySystemStorageContents;
        // removes deletable system contacts from master list
    overrides EachStorageObject;
        // calls function on each contact
    overrides StorageInstallIndexical;
        // returns iContactsMasterList
    overrides SuggestionSearchStatus;
        // returns iCheckingUnusedNamecards or iCheckingNamecards, depending on <recommendedOnly>
        
    // filing
    overrides CanFileIntoFileCabinet;
        // returns true since individual full contacts can be filed (as name cards) in file cabinet
    overrides FileTo;
        // calls FileTo on each full contact
    overrides InstallInto;
        // handles contacts being installed into iContactsMasterList,
        // and address labels being installed back onto contacts
    
    // searching
    operation FindAddressFromAttributeText(opNum: OperationNumber; addressType: Unsigned; textToFind: HasText): AddressInfo;
        // returns an address info of type addressType, containing textToFind in the indicated attribute
    operation FindContactFromInfo(addressType: Unsigned; phoneNumber: HasText; var index: Unsigned): FullContact;
        // returns an contact with this phone number or email address, return the index;
        // rarely override
    operation FindOrCreateContact(name: Text; number: Text; var index: Unsigned): FullContact;
        // returns an contact with the given phone number,
        // or creates a new contact and returns it.
        // In both cases, return the phone label index
    overrides FindByName;
        // returns the first contact (alphabetically) with the name parameter
        // returns nilObject if the name parameter has no characters
    operation FindSectionAndCardIndex(contact: FullContact;
            var sectionIndex: Unsigned; var cardIndex: Unsigned): Boolean;
        // fills in <sectionIndex> with number of sub-section containing <fullContact>;
        // fills in <cardIndex> with position of <fullContact> within sub-section containing it;
        // e.g., if <fullContact> is third contact beginning with letter 'Z',
        // sectionIndex would be 26 and cardIndex would be 3
        // returns false if <contact> is not in list
    overrides Search;
        // searches just in the appropriate letter-list, for speed      

    attribute NumberOfComponentLists: Unsigned;
        // Setting the number of component lists creates or destroys element lists of
        // componentLists and reindexes all Contacts and Entities contained therein.
        // Redefined to add a setter. 
end class;