/** * Method writeActivationFile. * * @param activationFile * @param serializer * @param tagName * @throws java.io.IOException */ private void writeActivationFile( ActivationFile activationFile, String tagName, XmlSerializer serializer ) throws java.io.IOException { serializer.startTag( NAMESPACE, tagName ); if ( activationFile.getMissing() != null ) { serializer.startTag( NAMESPACE, "missing" ).text( activationFile.getMissing() ).endTag( NAMESPACE, "missing" ); } if ( activationFile.getExists() != null ) { serializer.startTag( NAMESPACE, "exists" ).text( activationFile.getExists() ).endTag( NAMESPACE, "exists" ); } serializer.endTag( NAMESPACE, tagName ); } //-- void writeActivationFile( ActivationFile, String, XmlSerializer )
ActivationFile activationFile = new ActivationFile(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) activationFile.setMissing( interpolatedTrimmed( parser.nextText(), "missing" ) ); activationFile.setExists( interpolatedTrimmed( parser.nextText(), "exists" ) );
file.setExists( profileFile.getExists() ); file.setMissing( profileFile.getMissing() );
/** * Method updateActivationFile * * @param value * @param element * @param counter * @param xmlTag */ protected void updateActivationFile(ActivationFile 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, "missing", value.getMissing(), null); findAndReplaceSimpleElement(innerCount, root, "exists", value.getExists(), null); } } //-- void updateActivationFile(ActivationFile, String, Counter, Element)
/** * Method updateActivationFile. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateActivationFile(ActivationFile 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, "missing", value.getMissing(), null); findAndReplaceSimpleElement(innerCount, root, "exists", value.getExists(), null); } } //-- void updateActivationFile(ActivationFile, String, Counter, Element)