private static void writeRetentionPolicy ( final XmlSerializer xmlw , final Integer val ) throws IllegalArgumentException , IllegalStateException , IOException { xmlw . startTag ( Constants . EMPTY_STRING , Constants . AnalyticsConstants . RETENTION_POLICY_ELEMENT ) ; // Enabled Utility . serializeElement ( xmlw , Constants . AnalyticsConstants . ENABLED_ELEMENT , val != null ? Constants . TRUE : Constants . FALSE ) ; if ( val != null ) { // Days Utility . serializeElement ( xmlw , Constants . AnalyticsConstants . DAYS_ELEMENT , val . toString ( ) ) ; } // End Retention Policy xmlw . endTag ( Constants . EMPTY_STRING , Constants . AnalyticsConstants . RETENTION_POLICY_ELEMENT ) ; }
Writes the retention policy to the XMLStreamWriter .