@Override public void startElement(String name, Attributes attributes) { if (PROCESSING_STEPS_ELEMENT.equals(name)) { if (processingStepsHandler == null) { processingStepsHandler = new ProcessingStepsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (REPOSITORY_PROPERTIES_ELEMENT.equals(name)) { if (repositoryPropertiesHandler == null) { repositoryPropertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }
protected void finished() { if (isValidXML()) { state.Properties = (propertiesHandler == null ? new OrderedProperties(0) // : propertiesHandler.getProperties()); state.Units = (unitsHandler == null ? new IInstallableUnit[0] // : unitsHandler.getUnits()); state.Repositories = repositoryReferencesHandler == null ? new IRepositoryReference[0] : repositoryReferencesHandler.getReferences(); Object repositoryObject = null; //can't create repository if missing type - this is already logged when parsing attributes if (state.Type == null) return; try { Class<?> clazz = Class.forName(state.Type); Constructor<?> ctor = clazz.getConstructor(IProvisioningAgent.class); repositoryObject = ctor.newInstance(agent); } catch (Exception e) { // TODO: Throw a SAXException e.printStackTrace(); } if (repositoryObject instanceof AbstractMetadataRepository) { repository = (AbstractMetadataRepository) repositoryObject; repository.initialize(state); } } } }
public void startElement(String name, Attributes attributes) { if (name.equals(PROPERTY_ELEMENT)) { new PropertyHandler(this, attributes, properties); } else { invalidElement(name, attributes); } }
if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes);
if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes);
if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes);
currentUnit.setVersion(version); currentUnit.setSingleton(singleton); OrderedProperties properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties()); String updateFrom = null; VersionRange updateRange = null;
currentUnit.setVersion(version); currentUnit.setSingleton(singleton); OrderedProperties properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties()); String updateFrom = null; VersionRange updateRange = null;
currentUnit.setVersion(version); currentUnit.setSingleton(singleton); OrderedProperties properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties()); String updateFrom = null; VersionRange updateRange = null;
protected void finished() { if (isValidXML()) { state.Properties = (propertiesHandler == null ? new OrderedProperties(0) // : propertiesHandler.getProperties()); state.Units = (unitsHandler == null ? new IInstallableUnit[0] // : unitsHandler.getUnits()); state.Repositories = repositoryReferencesHandler == null ? new IRepositoryReference[0] : repositoryReferencesHandler.getReferences(); Object repositoryObject = null; //can't create repository if missing type - this is already logged when parsing attributes if (state.Type == null) return; try { Class<?> clazz = Class.forName(state.Type); Constructor<?> ctor = clazz.getConstructor(IProvisioningAgent.class); repositoryObject = ctor.newInstance(agent); } catch (Exception e) { // TODO: Throw a SAXException e.printStackTrace(); } if (repositoryObject instanceof AbstractMetadataRepository) { repository = (AbstractMetadataRepository) repositoryObject; repository.initialize(state); } } } }
protected void finished() { if (isValidXML()) { state.Properties = (propertiesHandler == null ? new OrderedProperties(0) // : propertiesHandler.getProperties()); state.Units = (unitsHandler == null ? new IInstallableUnit[0] // : unitsHandler.getUnits()); state.Repositories = repositoryReferencesHandler == null ? new IRepositoryReference[0] : repositoryReferencesHandler.getReferences(); Object repositoryObject = null; //can't create repository if missing type - this is already logged when parsing attributes if (state.Type == null) return; try { Class<?> clazz = Class.forName(state.Type); Constructor<?> ctor = clazz.getConstructor(IProvisioningAgent.class); repositoryObject = ctor.newInstance(agent); } catch (Exception e) { // TODO: Throw a SAXException e.printStackTrace(); } if (repositoryObject instanceof AbstractMetadataRepository) { repository = (AbstractMetadataRepository) repositoryObject; repository.initialize(state); } } } }
@Override public void startElement(String name, Attributes attributes) { if (MAPPING_RULES_ELEMENT.equals(name)) { if (mappingRulesHandler == null) { mappingRulesHandler = new MappingRulesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (ARTIFACTS_ELEMENT.equals(name)) { if (artifactsHandler == null) { artifactsHandler = new ArtifactsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }
@Override public void startElement(String name, Attributes attributes) { if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (INSTALLABLE_UNITS_ELEMENT.equals(name)) { if (unitsHandler == null) { unitsHandler = new InstallableUnitsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (IUS_PROPERTIES_ELEMENT.equals(name)) { if (iusPropertiesHandler == null) { iusPropertiesHandler = new IUsPropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }
public void startElement(String name, Attributes attributes) { if (MAPPING_RULES_ELEMENT.equals(name)) { if (mappingRulesHandler == null) { mappingRulesHandler = new MappingRulesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (ARTIFACTS_ELEMENT.equals(name)) { if (artifactsHandler == null) { artifactsHandler = new ArtifactsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }
public void startElement(String name, Attributes attributes) { if (PROCESSING_STEPS_ELEMENT.equals(name)) { if (processingStepsHandler == null) { processingStepsHandler = new ProcessingStepsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (REPOSITORY_PROPERTIES_ELEMENT.equals(name)) { if (repositoryPropertiesHandler == null) { repositoryPropertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }
public void startElement(String name, Attributes attributes) { checkCancel(); if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (INSTALLABLE_UNITS_ELEMENT.equals(name)) { if (unitsHandler == null) { unitsHandler = new InstallableUnitsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (REPOSITORY_REFERENCES_ELEMENT.equals(name)) { if (repositoryReferencesHandler == null) { repositoryReferencesHandler = new RepositoryReferencesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }
public void startElement(String name, Attributes attributes) { checkCancel(); if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (INSTALLABLE_UNITS_ELEMENT.equals(name)) { if (unitsHandler == null) { unitsHandler = new InstallableUnitsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (REPOSITORY_REFERENCES_ELEMENT.equals(name)) { if (repositoryReferencesHandler == null) { repositoryReferencesHandler = new RepositoryReferencesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }
public void startElement(String name, Attributes attributes) { if (MAPPING_RULES_ELEMENT.equals(name)) { if (mappingRulesHandler == null) { mappingRulesHandler = new MappingRulesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (ARTIFACTS_ELEMENT.equals(name)) { if (artifactsHandler == null) { artifactsHandler = new ArtifactsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }
public void startElement(String name, Attributes attributes) { if (MAPPING_RULES_ELEMENT.equals(name)) { if (mappingRulesHandler == null) { mappingRulesHandler = new MappingRulesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (ARTIFACTS_ELEMENT.equals(name)) { if (artifactsHandler == null) { artifactsHandler = new ArtifactsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }
public void startElement(String name, Attributes attributes) { if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { propertiesHandler = new PropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (INSTALLABLE_UNITS_ELEMENT.equals(name)) { if (unitsHandler == null) { unitsHandler = new InstallableUnitsHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else if (IUS_PROPERTIES_ELEMENT.equals(name)) { if (iusPropertiesHandler == null) { iusPropertiesHandler = new IUsPropertiesHandler(this, attributes); } else { duplicateElement(this, name, attributes); } } else { invalidElement(name, attributes); } }