com.ibm.rfid.premises.app.entities.supplychain.printing
Class PrintDetails

java.lang.Object
  extended by com.ibm.rfid.premises.app.entities.AbstractXmlObject
      extended by com.ibm.rfid.premises.app.entities.supplychain.printing.PrintDetails

public class PrintDetails
extends AbstractXmlObject

A PrintDetails is required to submit a print job to an IBM WebSphere Sensor Events Server. Although a PrintDetails object is at the top of the Object layering, all of the print job details are stored in the LabelPrint object. The following is an example of how to create a valid PrintDetails:

                EpcData ed = new EpcData();
                ed.setEpcEncoding(EpcData.EPC_ENCODING_SSCC64);
                Label l = new Label();
                l.setEpcData(ed);
                l.addFormData("Unit of Mass", "lbs");
                l.addFormData("Shipping weight", "100");
                l.setQuantity(1);
                l.setTemplateEpcKey("epcdata");
                l.setTemplateName("myTemplate");
                l.setUnitType("PALLET");
                
                LabelList labelList = new LabelList();
                labelList.addDefaultFormData("CompanyName", "IBM");
                labelList.setDefaultTemplateEpcKey("");
                labelList.setDefaultTemplateName("");
                labelList.addLabel(l);

                LabelPrint labelPrint = new LabelPrint();
                labelPrint.setBusinessRefId("123212");
                labelPrint.setDescription("Print for store 17");
                labelPrint.setPrinterName("myPrinter");
                labelPrint.setProfileName("myProfile");
                labelPrint.setLabelList(labelList);
                
                PrintDetails sp = new PrintDetails();
                sp.setLabelPrint(labelPrint);
 

See Also:
LabelPrint

Field Summary
static java.lang.String REQUEST
          Xml String used to describe a request element
static java.lang.String REQUEST_TYPE
          Request type
 
Fields inherited from class com.ibm.rfid.premises.app.entities.AbstractXmlObject
attributes_, EQ, GT, LT, QUOTE, SLASH, tagName_, XML_START
 
Constructor Summary
PrintDetails()
          Base Constructor - Use setLabelPrint(LabelPrint) to set mandatory LabelPrint object.
PrintDetails(java.lang.String xml)
          Creates the print details while creating a LabelPrint object based on specified XML
 
Method Summary
 java.lang.String getDescription()
          Gets the description of the print job being submitted
 LabelPrint getLabelPrint()
          Gets the LabelPrint object
 boolean isValid()
          Verification method used before PrintDetails is submitted to IBM WebSphere Sensor Events Server
 void setDescription(java.lang.String description)
          Sets the description of the print job being submitted
 void setLabelPrint(LabelPrint lp)
           
 java.lang.String toXmlString(boolean isTop)
          Creates an XML string representation of this AbsstractXMLObject
 
Methods inherited from class com.ibm.rfid.premises.app.entities.AbstractXmlObject
getEndTag, getNodeListFromString, getStartTag, getStringFromElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST_TYPE

public static final java.lang.String REQUEST_TYPE
Request type

See Also:
Constant Field Values

REQUEST

public static final java.lang.String REQUEST
Xml String used to describe a request element

See Also:
Constant Field Values
Constructor Detail

PrintDetails

public PrintDetails()
Base Constructor - Use setLabelPrint(LabelPrint) to set mandatory LabelPrint object.


PrintDetails

public PrintDetails(java.lang.String xml)
             throws XmlConvertException
Creates the print details while creating a LabelPrint object based on specified XML

Parameters:
xml -
Throws:
XmlConvertException
Method Detail

getLabelPrint

public LabelPrint getLabelPrint()
Gets the LabelPrint object

Returns:
LabelPrint object associated with this PrintDetails

setLabelPrint

public void setLabelPrint(LabelPrint lp)
Parameters:
lp - LabelPrint object needed for a print job
See Also:
LabelPrint

setDescription

public void setDescription(java.lang.String description)
Sets the description of the print job being submitted

Parameters:
description - short description of print job being submitted.

getDescription

public java.lang.String getDescription()
Gets the description of the print job being submitted

Returns:
String representing short description of print job being submitted

isValid

public boolean isValid()
Verification method used before PrintDetails is submitted to IBM WebSphere Sensor Events Server

Returns:
true if mandatory print job parameters are contained in PrintDetails object. false otherwise.

toXmlString

public java.lang.String toXmlString(boolean isTop)
Description copied from class: AbstractXmlObject
Creates an XML string representation of this AbsstractXMLObject

Specified by:
toXmlString in class AbstractXmlObject
Parameters:
isTop - decides whether or not the XML_START field is appended to the output of this method. Should be true if this AbstractXmlObject is the root element.
Returns:
an XML String representing this AbstractXmlObject.
See Also:
AbstractXmlObject.toXmlString(boolean)


Copyright © 2005 - 2009 IBM Corp. All Rights Reserved.