Skip to content

Permit a better extend of VCardProperty #156

@prrvchr

Description

@prrvchr

Hi all,

I use ez-vcard in my LibreOffice extension vCardOOo.

For the purposes of this extension, I have extended all the properties supported by vCardOOo to include methods specific to the underlying database.

However, I am missing three methods from the VCardProperty class in order to process all the properties in a generic way. These three methods would be:

    public String[] getPropertyCategories() {
        return new String[0];
    }

    public String[] getPropertyTypes() {
        return new String[0];
    }

    public Map<String, String> getPropertiesValue() {
        return Collections.emptyMap();
    }

The first method allows me to retrieve all categories for the property: ezvcard.property.Categories

The second method allows me to retrieve all types for properties: ezvcard.property.Address, ezvcard.property.Email and ezvcard.property.Telephone

The last method allows me to retrieve a map (i.e. key -> value) that can be customized for the properties: ezvcard.property.Address, ezvcard.property.Email, ezvcard.property.FormattedName, ezvcard.property.Organization, ezvcard.property.StructuredName, ezvcard.property.Telephone, ezvcard.property.Title and ezvcard.property.Uid. The unique key in this map will be the name of the column in the database.

Wouldn't it be possible to integrate the three methods into the VCardProperties class, specifying that they are there to be overridden?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions