private void doValidation() throws DeploymentException { /* * Validation for name field. */ String name = libraryDescriptor.getName(); if (name == null || name.length() <= 0) { Log.loge( getClass().getName(), "doValidation", "LIBRARY-NAME IS MANDATORY FIELD - LIBRARY-DESCRIPTOR: " + this.libraryName); throw new DeploymentException( getClass().getName(), "doValidation", "LIBRARY-NAME IS MANDATORY FIELD - LIBRARY-DESCRIPTOR: " + this.libraryName); } Iterator<String> databaseMappingPaths = libraryDescriptor.getDatabaseMappingPaths(); while (databaseMappingPaths.hasNext()) { String databaseMappingPath = databaseMappingPaths.next(); if (databaseMappingPath.endsWith(XML_FILE_EXTENSION)) { if (!databaseMappingPath.contains(SIMINOV_DESCRIPTOR_EXTENSION)) { Log.loge( getClass().getName(), "doValidation", "INVALID LIBRARY DATABASE MAPPING PATH FOUND, it should contain .core extension in path, PATH-DEFINED: " + databaseMappingPath); throw new DeploymentException( getClass().getName(), "doValidation", "INVALID LIBRARY DATABASE MAPPING PATH FOUND, it should contain .core extension in path, PATH-DEFINED: " + databaseMappingPath); } } } }
private void initializeMapping(final Attributes attributes) { libraryDescriptor.addDatabaseMappingPath(attributes.getValue(LIBRARY_DESCRIPTOR_PATH)); }
public void endElement(String uri, String localName, String qName) throws SAXException { if (localName.equalsIgnoreCase(LIBRARY_DESCRIPTOR_PROPERTY)) { libraryDescriptor.addProperty(propertyName, tempValue); } }