public interface ZebraTemplate
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
convertDataDocumentToDataMap(String dataDocument)
Converts a JSON or XML formatted template data document into a Map.
|
void |
deleteTemplate(String templateName)
Deletes the specified template.
|
void |
deleteTemplateImage(String imageName)
Deletes the specified template image.
|
TemplateJob |
generateTemplateDataJob(String templateData,
Map<String,String> fieldDataMap)
Returns an instance of TemplateJob containing the job specific data.
|
TemplateJob |
generateTemplateJob(String templateName,
Map<String,String> fieldDataMap)
Returns an instance of TemplateJob containing the job specific data.
|
List<String> |
getAllTemplateImageNames()
Gets a list of all stored template images.
|
List<String> |
getAllTemplateNames()
Returns a list containing the stored template names.
|
String |
getTemplate(String templateName)
Returns the specified template.
|
List<String> |
getTemplateFields(String templateName)
Returns the template fields from the specified XML template.
|
byte[] |
getTemplateImageData(String imageName)
Returns the raw image data from the specified image name.
|
void |
saveTemplate(String templateName,
String templateData)
Saves the specified template.
|
void |
saveTemplateImage(String imageName,
byte[] imageData)
Saves the specified template image.
|
void deleteTemplate(String templateName) throws IllegalArgumentException, ZebraCardException, IOException
templateName - the name of the template.ZebraCardException - on failure to delete the template.IllegalArgumentException - if specified template name is invalid.IOException - if specified template is not found or an error is encountered accessing the stored template file.void saveTemplate(String templateName, String templateData) throws IllegalArgumentException, ZebraCardException, IOException
templateName - the name of the template.templateData - the XML formatted template.IllegalArgumentException - if specified template name already exists.IOException - on failure to store the template.ZebraCardExceptionString getTemplate(String templateName) throws IllegalArgumentException, IOException
templateName - the name of the template.ZebraCardException - on failure to obtain the template.IllegalArgumentException - if specified template name is invalid.IOException - if specified template is not found or an I/O related error occurs.List<String> getAllTemplateNames() throws IOException
IOException - if an I/O related error occurs while accessing the stored templates.List<String> getTemplateFields(String templateName) throws IllegalArgumentException, ZebraCardException, IOException
templateName - the name of the template.ZebraCardException - on failure to read the stored template data.IllegalArgumentException - if specified template name is null or empty.IOException - if specified template is not found or an I/O related error occurs.TemplateJob generateTemplateJob(String templateName, Map<String,String> fieldDataMap) throws ZebraCardException, IOException, ConnectionException, SettingsException
templateName - the name of the template.fieldDataMap - a map containing the template field names as the keys and the template field values for the key values.ConnectionException - if the device is busy or an error occurs communicating with the printer.IOException - on failure to locate/access the referenced template or image files.SettingsException - if an error occurs while generating the template job.ZebraCardException - on template job generation error.TemplateJob generateTemplateDataJob(String templateData, Map<String,String> fieldDataMap) throws ConnectionException, SettingsException, ZebraCardException, IOException
templateData - the XML formatted template data.fieldDataMap - a map containing the template field names as the keys and the template field values for the key values.ConnectionException - if the device is busy or an error occurs communicating with the printer.IOException - on failure to locate/access the referenced template or image files.SettingsException - if an error occurs while generating the template job.ZebraCardException - on template job generation error.void deleteTemplateImage(String imageName) throws ZebraCardException, IOException
imageName - image name.ZebraCardException - on failure to delete the specified image.IOException - if specified image is not found or an error is encountered accessing the stored image file.List<String> getAllTemplateImageNames() throws IOException
IOException - if an error is encountered while accessing the stored image files.byte[] getTemplateImageData(String imageName) throws IOException, IllegalArgumentException
imageName - the name of the image.IOException - if specified image is not found.IllegalArgumentException - if the specified image name is empty or null.void saveTemplateImage(String imageName, byte[] imageData) throws IOException, IllegalArgumentException
imageName - the name of the image.imageData - the image data.IOException - on failure to save image data.IllegalArgumentException - if the specified image name and/or data is empty or null.Map<String,String> convertDataDocumentToDataMap(String dataDocument) throws IllegalArgumentException, ZebraCardException
dataDocument - JSON or XML formatted template data document.ZebraCardException - on data parsing error.IllegalArgumentException - on invalid dataDocument value or format.
© 2016 ZIH Corp. All Rights Reserved.