public class ExportPointsOfServiceAction
extends java.lang.Object
PointOfServiceModel as a CSV file so it can be later imported to Google Business.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CSV_HEADERS |
protected static java.lang.String |
MODEL_PAGEABLE |
| Constructor and Description |
|---|
ExportPointsOfServiceAction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPerform(<any> ctx) |
protected java.lang.String |
createCsv(java.util.List<PointOfServiceModel> pointsOfService)
Builds a CSV based upon a list of
PointOfServiceModels |
protected void |
createCsvContent(java.lang.StringBuilder stringBuilder,
java.util.List<PointOfServiceModel> pointsOfService)
Creates a CSV body representing a list of
PointOfServiceModels |
java.lang.String |
getConfirmationMessage(<any> ctx) |
protected java.lang.String |
getDailySchedule(PointOfServiceModel pointOfService,
int dayOfWeek)
Generates a formatted 24 hour representation of the opening hours of a
PointOfServiceModel for a given day of the week |
protected SiteBaseUrlResolutionService |
getSiteBaseUrlResolutionService() |
protected java.lang.String |
getSpecialDaySchedule(SpecialOpeningDayModel specialOpeningDayModel)
Provides the opening and closing times for a
SpecialOpeningDayModel showing the date as well sa the hours, or an 'x'
in the case of being closed. |
boolean |
needsConfirmation(<any> ctx) |
<any> |
perform(<any> actionContext) |
protected java.lang.String |
prepareCsvValue(java.lang.String value)
Prepares a value to be inserted into a CSV
|
protected boolean |
validatePointOfServiceMeetsRequirements(PointOfServiceModel pointOfService)
Returns true if the
PointOfServiceModel contains or references all of the data required to pass minimum requirements
for an import to Google My Business |
protected void |
writeBinaryResponse(java.lang.String csvContent)
Writes a CSV file to the browser for download.
|
protected static final java.lang.String CSV_HEADERS
protected static final java.lang.String MODEL_PAGEABLE
public <any> perform(<any> actionContext)
protected void writeBinaryResponse(java.lang.String csvContent)
csvContent - a string representation of the contents of the fileprotected java.lang.String createCsv(java.util.List<PointOfServiceModel> pointsOfService)
PointOfServiceModelspointsOfService - list of PointOfServiceModelsPointOfServiceModels including column headersprotected void createCsvContent(java.lang.StringBuilder stringBuilder,
java.util.List<PointOfServiceModel> pointsOfService)
PointOfServiceModelsstringBuilder - StringBuilder used to build CSVpointsOfService - the PointOfServiceModels to be represented as CSVsprotected boolean validatePointOfServiceMeetsRequirements(PointOfServiceModel pointOfService)
PointOfServiceModel contains or references all of the data required to pass minimum requirements
for an import to Google My BusinesspointOfService - the PointOfServiceModel to be validatedPointOfServiceModel meets the requirements of Google My Businessprotected java.lang.String getDailySchedule(PointOfServiceModel pointOfService, int dayOfWeek)
PointOfServiceModel for a given day of the weekpointOfService - the PointOfServiceModel for which the opening hours must be representeddayOfWeek - the day of the week specified as a Calendar constantprotected java.lang.String getSpecialDaySchedule(SpecialOpeningDayModel specialOpeningDayModel)
SpecialOpeningDayModel showing the date as well sa the hours, or an 'x'
in the case of being closed.specialOpeningDayModel - SpecialOpeningDayModel for which to show the date and opening timesprotected java.lang.String prepareCsvValue(java.lang.String value)
value - the value to be preparedpublic boolean canPerform(<any> ctx)
public boolean needsConfirmation(<any> ctx)
public java.lang.String getConfirmationMessage(<any> ctx)
protected SiteBaseUrlResolutionService getSiteBaseUrlResolutionService()
Copyright © 2018 SAP SE. All Rights Reserved.