uf:profiles
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
uf:profiles [2008/08/27 15:02] – alombide | uf:profiles [2009/11/18 14:38] (current) – adding elisag | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== Profiles ==== | ==== Profiles ==== | ||
- | * Profiles: each flockr has a profile. There is a minimal set of properties that are present | + | Profiles |
- | * Profile Dude: manages the profiles. Is responsible | + | |
- | * Changed events: when a flockr | + | When a Flockr |
- | * Caching: | + | |
+ | Each Flockr | ||
+ | |||
+ | ==== Profile Fields ==== | ||
+ | |||
+ | A Profile is a property object containing a number of named fields. Each field also has a Field Type. This Field Type is used to generate | ||
+ | |||
+ | ==== Field Types ==== | ||
+ | |||
+ | Field Types are represented as Field Type objects. These objects have the following API: | ||
+ | * isString() | ||
+ | * isEnumeration() | ||
+ | * isInteger() | ||
+ | * isDate() | ||
+ | * isPossibleValue(aValue): | ||
+ | * getPossibleValues(): | ||
+ | * name() | ||
+ | * defaultValue() | ||
+ | * fieldSize(): | ||
+ | * comparators(): | ||
+ | Some of these methods should be overridden when a custom type is added. | ||
+ | |||
+ | The following Field Types are built in: | ||
+ | * StringFieldType: | ||
+ | * EnumerationFieldType: | ||
+ | * IntegerTypeField: | ||
+ | * DateTypeField: | ||
+ | |||
+ | ==== Mandatory Fields ==== | ||
+ | |||
+ | Each profile has the following mandatory fields: | ||
+ | * username | ||
+ | * firstname | ||
+ | * lastname | ||
+ | * birthdate | ||
+ | * sex | ||
+ | |||
+ | ==== API ==== | ||
+ | |||
+ | * getFieldType(fieldName) | ||
+ | * checkFieldTypeForValue | ||
+ | * addFieldTypeMapping(field, | ||
+ | * removeFieldTypeMapping(field) | ||
+ | * makeStringFieldTypeObject() | ||
+ | * makeEnumerationFieldTypeObject(possibleValues) | ||
+ | * makeIntegerTypeFieldObject(low, | ||
+ | * makeDateTypeFieldObject(low, | ||
+ | * isMandatoryField(propName) | ||
+ | * addField(propName, | ||
+ | * removeField(propName) | ||
+ | * setField(propName, | ||
+ | * fieldMatches(field, | ||
+ | |||
+ | ==== Implementation ==== | ||
+ | |||
+ | Properties of Profiles are represented as slots in the profile objects. Each Profile object has a parent object that contains the common behavior and mandatory fields for each profile. Since profiles are frequently copied over the network, they are isolate objects. |
uf/profiles.1219842166.txt.gz · Last modified: 2008/08/27 15:05 (external edit)