public class PlaymappingImporter extends Importer
accessibilityTypes, agecategoryTypes, allLocationTypes, assetTypeToLocationCategory, assHandler, assListHandler, equipmenttypePAtoPM, equipmenttypePMtoPA, equipmentTypes, facilityTypes, locationHandler, parkingTypes, postfix, projectHandler| Constructor and Description |
|---|
PlaymappingImporter(Project project) |
| Modifier and Type | Method and Description |
|---|---|
Location |
getExistingLocation(Location newLocation) |
protected Integer |
getLocationId(String pmguid) |
ImportReport |
importJSONAssetsFromAPI(String username,
String password,
String apiurl,
List<String> pm_guids,
ImportReport report,
Connection con) |
List<String> |
importJSONLocationsFromAPI(String username,
String password,
String apiurl,
ImportReport report,
boolean isInitialLoad,
Connection con) |
void |
init() |
protected Integer[] |
parseAgecategories(org.json.JSONObject assetJSON) |
protected Asset |
parseAsset(org.json.JSONObject assetJSON,
Integer locationId,
Map<Integer,Set<Integer>> locationTypes,
ImportReport report,
Connection con) |
protected List<Asset> |
parseAssets(org.json.JSONArray assetsArray,
Map<Integer,Set<Integer>> assetTypes,
ImportReport report,
Connection con) |
protected List<Location> |
parseChildLocations(String locations,
ImportReport report,
Connection con) |
protected Map<String,Object> |
parseImageAndWord(org.json.JSONObject image,
boolean removedFromPlaymapping) |
protected List<Map<String,Object>> |
parseImagesAndWords(org.json.JSONArray images,
boolean removedFromPlaymapping)
Parse images and documents (=words).
|
protected Location |
parseLocation(org.json.JSONObject json,
ImportReport report,
Connection con) |
ImportReport |
processAssets(org.json.JSONArray assetsString,
ImportReport report,
Connection con) |
protected void |
processImages(Integer location,
List<Map<String,Object>> imgs,
ImportReport report,
Connection con,
boolean isAsset,
boolean isAssetRemoved) |
List<String> |
processLocations(String temp,
ImportReport report,
Connection con) |
assetExists, getAssetId, getAssetType, getEquipmentType, getLocationId, getPostfix, getProject, getProject, getProject, getResponse, locationExists, saveAccessibility, saveAsset, saveAssetsAgeCategories, saveFacilities, saveImagesAndWords, saveLocation, saveLocationAgeCategory, saveLocationTypes, setProjectpublic PlaymappingImporter(Project project)
public void init()
public ImportReport processAssets(org.json.JSONArray assetsString, ImportReport report, Connection con) throws NamingException, SQLException
NamingExceptionSQLExceptionpublic List<String> processLocations(String temp, ImportReport report, Connection con) throws NamingException, SQLException
NamingExceptionSQLExceptionpublic Location getExistingLocation(Location newLocation) throws NamingException, SQLException
NamingExceptionSQLExceptionprotected List<Asset> parseAssets(org.json.JSONArray assetsArray, Map<Integer,Set<Integer>> assetTypes, ImportReport report, Connection con) throws NamingException, SQLException
NamingExceptionSQLExceptionprotected Asset parseAsset(org.json.JSONObject assetJSON, Integer locationId, Map<Integer,Set<Integer>> locationTypes, ImportReport report, Connection con)
protected Integer[] parseAgecategories(org.json.JSONObject assetJSON)
protected List<Location> parseChildLocations(String locations, ImportReport report, Connection con)
protected Location parseLocation(org.json.JSONObject json, ImportReport report, Connection con)
protected List<Map<String,Object>> parseImagesAndWords(org.json.JSONArray images, boolean removedFromPlaymapping)
images - The images or documents to be parsedremovedFromPlaymapping - protected Map<String,Object> parseImageAndWord(org.json.JSONObject image, boolean removedFromPlaymapping)
protected void processImages(Integer location, List<Map<String,Object>> imgs, ImportReport report, Connection con, boolean isAsset, boolean isAssetRemoved)
protected Integer getLocationId(String pmguid) throws NamingException, SQLException
NamingExceptionSQLExceptionpublic ImportReport importJSONAssetsFromAPI(String username, String password, String apiurl, List<String> pm_guids, ImportReport report, Connection con) throws SQLException, NamingException
SQLExceptionNamingExceptionpublic List<String> importJSONLocationsFromAPI(String username, String password, String apiurl, ImportReport report, boolean isInitialLoad, Connection con) throws SQLException, NamingException
SQLExceptionNamingExceptionCopyright © 2018. All rights reserved.