@Test( expected = NullPointerException.class ) public void testAddAttachmentReportWithoutReport() { MailDefinition source = new MailDefinition(); source.addAttachmentReport( "type", null ); }
public void addAttachmentReport( final String type, final MasterReport attachmentReport ) { if ( type == null ) { throw new NullPointerException(); } if ( attachmentReport == null ) { throw new NullPointerException(); } if ( ReportProcessTaskRegistry.getInstance().isExportTypeRegistered( type ) == false ) { throw new IllegalArgumentException( "The export type " + type + " is not defined." ); } this.attachmentTypes.add( type ); this.attachmentReports.add( attachmentReport ); }
MailDefinition implements Serializable, Cloneable { public void addAttachmentReport( final String type, final MasterReport attachmentReport ) { if ( type == null ) { throw new NullPointerException(); } if ( attachmentReport == null ) { throw new NullPointerException(); } if ( ReportProcessTaskRegistry.getInstance().isExportTypeRegistered( type ) == false ) { throw new IllegalArgumentException( "The export type " + type + " is not defined." ); } this.attachmentTypes.add( type ); this.attachmentReports.add( attachmentReport ); } }
MailDefinition implements Serializable, Cloneable { public void addAttachmentReport( final String type, final MasterReport attachmentReport ) { if ( type == null ) { throw new NullPointerException(); } if ( attachmentReport == null ) { throw new NullPointerException(); } if ( ReportProcessTaskRegistry.getInstance().isExportTypeRegistered( type ) == false ) { throw new IllegalArgumentException( "The export type " + type + " is not defined." ); } this.attachmentTypes.add( type ); this.attachmentReports.add( attachmentReport ); } MailDefinition();  MailDefinition( final String bodyType, final MasterReport bodyReport ); }
MailDefinition implements Serializable, Cloneable { public void addAttachmentReport( final String type, final MasterReport attachmentReport ) { if ( type == null ) { throw new NullPointerException(); } if ( attachmentReport == null ) { throw new NullPointerException(); } if ( ReportProcessTaskRegistry.getInstance().isExportTypeRegistered( type ) == false ) { throw new IllegalArgumentException( "The export type " + type + " is not defined." ); } this.attachmentTypes.add( type ); this.attachmentReports.add( attachmentReport ); } MailDefinition();  MailDefinition( final String bodyType, final MasterReport bodyReport ); ReportEnvironment getReportEnvironment(); ResourceBundleFactory getResourceBundleFactory(); ResourceKey getContextKey(); void setContextKey( final ResourceKey contextKey ); ResourceManager getResourceManager(); void setResourceManager( final ResourceManager resourceManager ); Properties getSessionProperties(); void setSessionProperties( final Properties sessionProperties ); void addStaticHeader( final String name, final String value ); void addFormulaHeader( final String name, final String formula ); void addHeader( final MailHeader header ); MailHeader getHeader( int i ); int getHeaderCount(); MailHeader[] getHeaders(); void addAttachmentReport( final String type, final MasterReport attachmentReport ); String getBodyType(); MasterReport getBodyReport(); void setBodyReport( final String bodyType, final MasterReport bodyReport ); int getAttachmentCount(); MasterReport getAttachmentReport( final int index ); String getAttachmentType( final int index ); void removeAttachment( final int index ); CompoundDataFactory getDataFactory(); ReportParameterValues getParameterValues(); ReportParameterDefinition getParameterDefinition(); void setParameterDefinition( final ReportParameterDefinition parameterDefinition ); String getBurstQuery(); void setBurstQuery( final String burstQuery ); String getRecipientsQuery(); void setRecipientsQuery( final String recipientsQuery ); Object clone(); Authenticator getAuthenticator(); }
MailDefinition implements Serializable, Cloneable { public void addAttachmentReport( final String type, final MasterReport attachmentReport ) { if ( type == null ) { throw new NullPointerException(); } if ( attachmentReport == null ) { throw new NullPointerException(); } if ( ReportProcessTaskRegistry.getInstance().isExportTypeRegistered( type ) == false ) { throw new IllegalArgumentException( "The export type " + type + " is not defined." ); } this.attachmentTypes.add( type ); this.attachmentReports.add( attachmentReport ); } MailDefinition();  MailDefinition( final String bodyType, final MasterReport bodyReport ); ReportEnvironment getReportEnvironment(); ResourceBundleFactory getResourceBundleFactory(); ResourceKey getContextKey(); void setContextKey( final ResourceKey contextKey ); ResourceManager getResourceManager(); void setResourceManager( final ResourceManager resourceManager ); Properties getSessionProperties(); void setSessionProperties( final Properties sessionProperties ); void addStaticHeader( final String name, final String value ); void addFormulaHeader( final String name, final String formula ); void addHeader( final MailHeader header ); MailHeader getHeader( int i ); int getHeaderCount(); MailHeader[] getHeaders(); void addAttachmentReport( final String type, final MasterReport attachmentReport ); String getBodyType(); MasterReport getBodyReport(); void setBodyReport( final String bodyType, final MasterReport bodyReport ); int getAttachmentCount(); MasterReport getAttachmentReport( final int index ); String getAttachmentType( final int index ); void removeAttachment( final int index ); CompoundDataFactory getDataFactory(); ReportParameterValues getParameterValues(); ReportParameterDefinition getParameterDefinition(); void setParameterDefinition( final ReportParameterDefinition parameterDefinition ); String getBurstQuery(); void setBurstQuery( final String burstQuery ); String getRecipientsQuery(); void setRecipientsQuery( final String recipientsQuery ); Object clone(); Authenticator getAuthenticator();  }