Академический Документы
Профессиональный Документы
Культура Документы
Receiving area to process incoming raw materials and RGA returns from the customers. The
application requires the ability to read barcodes, take pictures of products and submit information
Interface cURLIO
public JSONObject getURL( String parameters ) - accept some parameters for the GET call
Class cURL
Class cURL extends AsyncTask class so our API calls could be performed in the background of
the application
DATA
• private static URL url – base URI of the remote REST API endpoint
• Private static String parameters - parameters for the POST or GET call, depends on
• Private static String APIKey – string containing Remote REST API authentification
key
METHODS
• Constructors
o cURL(URL url, String apiKey) – sets Base URI and API key for the calls to
REST API
Interface BarCodeReaderIO
Class BarCodereader
Uses ML Kit from FireBase google API
DATA
METHODS
• Public static boolean scan() – a method that calls FireBase ML Kit to capture barcode
image, return true if the image captured successfully and it contains a readable barcode
• Public static boolean translateImageToText() – retrieves text from the barcode image
DATA
METHODS
• Public void goToFG() – on Finish Goods button press go to Finished Goods screen
• Public void goToRM() – on Raw Materials button press go to Raw Materials screen
• Public boolean onAPIKeysubmit() – sets up APIkey, returns true if API key is valid
EmployeeID
DATA
METHODS
• Public boolean addInventory() – adds inventory quantity, returns true if the valid
operation
• Public Boolean subInventory() – subtracts inventory quantity returns true if the valid
operation
• Private Boolean isValidPart() - makes a call via REST API and sets JSONObject part
DATA
METHODS
• Public boolean setPONumber() – set PO number, make a REST call to check if valid
PO retrieve PO quantity.
• Public boolean setQty() - sets part qty if it does not exceds qty on PO
DATA
METHODS
• Public Boolean setRGA(String RGA number) – sets RGA number if it exists in the
database, Makes a call via REST API to check RGA number, part quantity and serial
received part, returns true if serial number matches number from RGA
Phase 8: Implement FG_Activity class
DATA
METHODS
• Public void onRGAEnter() – process RGA number entry, perform part number
validation
• Public void onFGSubmit() - process Finish Good part submit. Add the part to
inventory.
DATA
• Private RawMaterials part – Raw Materials Object
METHODS
• Public void onPartNumberEnter() – on part number entry create RawMaterial Object
As we have no access to the REST API endpoint or example data, we need to make sure that
program works with generic API endpoints. As customer give us access to more detailed
information and resources, we will be able to expend test scenarios and more features to the
application.
Model
OPIS
- APIKey: String
- employeeID: String
- dbURI: URL
+ mainActivity():void
+ goToFG(): void
+ goToRM(): void
Controller + onAPIKeysubmit(): boolean View
+ onEmployeeIDSubmit(): boolean
Inventory
FG_Activity RM_Activity
- partNumber: String
- partUUID: String
- qty : int - part: FinishGoods -part: RawMaterials
- inventoryQty: int
- partJSON: JSONObject
FinishGoods RawMaterial
+FinishGoods(): constructor
+ RawMaterial(): constructor
+FinishGoods(String partNumber):
+ RawMaterial(String partNumber): constructor
constructor
+ setPONumber(String PONumber): boolean
+setRGA(String rgaNumber): boolean
- setPOqty(): boolean
+setSerialNumbe(String serialNumbe):
+ setQty(int qty) : boolean
boolean
+ scan(): boolean
+ getURL(String parameters): JSONObject
+ postURL(String parameters ,JSONObject payload): JSONObject + translateImageToText() : boolean
+ returnText(): String
cURL BarCodeReader
- image:FirebaseVisionImage
- url : URL
- imgText:String
- parametrs :Strimg
- payload: JSONObject
- APIKey: String + scan(): boolean
+ boolean translateImageToText(): boolean
+ string returnText()
+ cURL(): constructor
+ cURL(URL url, String apiKey): constructor
+ getURL(String parameters): JSONObject
+ postURL(String parameters ,JSONObject payload): JSONObject
Firebase
FirebaseVisionBarcode
AsyncTask FirebaseVisionImage