Service for generating QR code content and default filenames.
More...
|
| EncodedData | buildData (Mode mode, WholeFields input) |
| | Builds the QR content and default filename based on the selected mode.
|
| |
| String | buildMecard (String name, String tel, String email, String org, String adr, String url) |
| | Builds a MECARD-formatted string from the provided contact fields.
|
| |
| String | buildMeet (String meetTitle, String meetUId, String meetBeginDateTime, String meetEndDateTime, String meetName, String meetLat, String meetLong) |
| | Builds an iCalendar (VCALENDAR) formatted string representing a meeting (VEVENT).
|
| |
|
| void | appendFieldWithSpecifiedSeparator (StringBuilder sb, String fieldName, String value, String separator) |
| | Appends a MECARD field in the format fieldName:value<separator> if the value is non-blank.
|
| |
Service for generating QR code content and default filenames.
Supports MECARD MEET FREE modes with input validation and standardized formatting. Returns structured results for encoding and export.
◆ appendFieldWithSpecifiedSeparator()
| void fr.softsf.canscan.service.DataBuilderService.appendFieldWithSpecifiedSeparator |
( |
StringBuilder | sb, |
|
|
String | fieldName, |
|
|
String | value, |
|
|
String | separator ) |
|
private |
Appends a MECARD field in the format fieldName:value<separator> if the value is non-blank.
If sb or fieldName is null, or if value is blank, the method does nothing.
- Parameters
-
| sb | the target StringBuilder |
| fieldName | the MECARD field name (e.g., "N", "TEL") |
| value | the field value to append; ignored if blank |
| separator | the separator to append after the field (e.g., ";", or System#lineSeparator()) |
◆ buildData()
| EncodedData fr.softsf.canscan.service.DataBuilderService.buildData |
( |
Mode | mode, |
|
|
WholeFields | input ) |
Builds the QR content and default filename based on the selected mode.
Returns null if mode or input is null.
- Parameters
-
| mode | the QR encoding mode (MECARD or MEET or FREE) |
| input | the structured input data |
- Returns
- a
EncodedData containing the encoded content and default filename, or
null if input is invalid
◆ buildMecard()
| String fr.softsf.canscan.service.DataBuilderService.buildMecard |
( |
String | name, |
|
|
String | tel, |
|
|
String | email, |
|
|
String | org, |
|
|
String | adr, |
|
|
String | url ) |
Builds a MECARD-formatted string from the provided contact fields.
Any blank or null fields are skipped. Returns a valid MECARD string or an empty string if all fields are blank.
- Parameters
-
| name | full name |
| tel | telephone number |
| email | email address |
| org | organization or company |
| adr | postal address |
| url | website or profile URL |
- Returns
- a MECARD string representing the contact information, or empty if all fields are blank
◆ buildMeet()
| String fr.softsf.canscan.service.DataBuilderService.buildMeet |
( |
String | meetTitle, |
|
|
String | meetUId, |
|
|
String | meetBeginDateTime, |
|
|
String | meetEndDateTime, |
|
|
String | meetName, |
|
|
String | meetLat, |
|
|
String | meetLong ) |
Builds an iCalendar (VCALENDAR) formatted string representing a meeting (VEVENT).
Skips blank or null fields. Returns an empty string if all required fields are blank. Latitude and longitude are optional; if provided, they are included in the GEO and LOCATION fields.
- Parameters
-
| meetTitle | the meeting title (SUMMARY) |
| meetUId | the unique meeting identifier (UID) |
| meetBeginDateTime | the meeting start date/time (DTSTART) |
| meetEndDateTime | the meeting end date/time (DTEND) |
| meetName | the organizer name (ORGANIZER); optional |
| meetLat | the meeting latitude; optional |
| meetLong | the meeting longitude; optional |
- Returns
- an iCalendar (VCALENDAR) string representing the meeting, or empty if all fields are blank
◆ APPEND_FIELD_WITH_SPECIFIED_SEPARATOR
| final String fr.softsf.canscan.service.DataBuilderService.APPEND_FIELD_WITH_SPECIFIED_SEPARATOR |
|
staticprivate |
Initial value:=
"appendFieldWithSpecifiedSeparator"
◆ INSTANCE
| fr.softsf.canscan.service.DataBuilderService.INSTANCE |
The documentation for this enum was generated from the following file: