/** * Method writeActivationOS. * * @param activationOS * @param serializer * @param tagName * @throws java.io.IOException */ private void writeActivationOS( ActivationOS activationOS, String tagName, XmlSerializer serializer ) throws java.io.IOException { serializer.startTag( NAMESPACE, tagName ); if ( activationOS.getName() != null ) { serializer.startTag( NAMESPACE, "name" ).text( activationOS.getName() ).endTag( NAMESPACE, "name" ); } if ( activationOS.getFamily() != null ) { serializer.startTag( NAMESPACE, "family" ).text( activationOS.getFamily() ).endTag( NAMESPACE, "family" ); } if ( activationOS.getArch() != null ) { serializer.startTag( NAMESPACE, "arch" ).text( activationOS.getArch() ).endTag( NAMESPACE, "arch" ); } if ( activationOS.getVersion() != null ) { serializer.startTag( NAMESPACE, "version" ).text( activationOS.getVersion() ).endTag( NAMESPACE, "version" ); } serializer.endTag( NAMESPACE, tagName ); } //-- void writeActivationOS( ActivationOS, String, XmlSerializer )
os.setArch( profileOs.getArch() ); os.setFamily( profileOs.getFamily() ); os.setName( profileOs.getName() );
/** * Method updateActivationOS. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateActivationOS(ActivationOS value, String xmlTag, Counter counter, Element element) { boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null); findAndReplaceSimpleElement(innerCount, root, "family", value.getFamily(), null); findAndReplaceSimpleElement(innerCount, root, "arch", value.getArch(), null); findAndReplaceSimpleElement(innerCount, root, "version", value.getVersion(), null); } } //-- void updateActivationOS(ActivationOS, String, Counter, Element)
/** * Method updateActivationOS * * @param value * @param element * @param counter * @param xmlTag */ protected void updateActivationOS(ActivationOS value, String xmlTag, Counter counter, Element element) { boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null); findAndReplaceSimpleElement(innerCount, root, "family", value.getFamily(), null); findAndReplaceSimpleElement(innerCount, root, "arch", value.getArch(), null); findAndReplaceSimpleElement(innerCount, root, "version", value.getVersion(), null); } } //-- void updateActivationOS(ActivationOS, String, Counter, Element)