-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New text fields for address. Ticket generation is very close to worki…
…ng; only the location part of the ticket is ignored. That's what the new text fields are for, and once I get them behaving as desired I'll be able to finish ticket generating. Changed link in navbar to direct to /2017-CSE-Senior-Project-Team-2/html/webpages/ instead of /2017-CSE-Senior-Project-Team-2/html/webpages/index.html. Apache will find the index.* file if it exists there, and I have been using index.jsp.
- Loading branch information
Showing
8 changed files
with
195 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package entities; | ||
/** | ||
* Simple Modification of the RentedDevice class for use in the listed devices page. | ||
* @author John Costa III | ||
* | ||
*/ | ||
public class ListedDevice { | ||
private String Device_Name; | ||
private String Device_Description; | ||
private String Hardware; | ||
private String Model; | ||
public ListedDevice(String name, String desc, String hardware, String model) { | ||
Device_Name = name; | ||
Device_Description = desc; | ||
Hardware = hardware; | ||
Model = model; | ||
} | ||
/** | ||
* Formatting the device to fit a JSON object. | ||
* @author - Connor | ||
*/ | ||
public String toString(){ | ||
StringBuilder sb = new StringBuilder(); | ||
String comma = ", "; | ||
sb.append("{\"name\": \"").append(Device_Name).append("\"").append(comma); | ||
sb.append("\"description\": \"").append(Device_Description).append("\"").append(comma); | ||
sb.append("\"hardware\": \"").append(Hardware).append("\"").append(comma); | ||
sb.append("\"model\": \"").append(Model).append("\""); | ||
sb.append("}"); | ||
return sb.toString(); | ||
} | ||
/** | ||
* This is a static function which will turn a Listed Device array into its proper string. (modification) | ||
* @author - Connor | ||
* @param array | ||
* @return | ||
*/ | ||
public static String arrayToString(ListedDevice[] array){ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("["); | ||
for(int i = 0; i < array.length; i++){ | ||
sb.append(array[i].toString()); | ||
if(i+1 != array.length){ | ||
sb.append(","); | ||
} | ||
} | ||
sb.append("]"); | ||
return sb.toString(); | ||
} | ||
} |