@SchemaValidation(handler=eu.europa.ec.sfc2014.frontoffice.jws.SchemaValidationErrorHandler.class) public class NationalAuditReportServiceImpl extends eu.europa.ec.sfc2014.frontoffice.jws.service.search.GenericServiceJwsImpl<SfcNationalAuditReportVersionDTO,eu.europa.ec.sfc2014.frontoffice.model.dto.nationalauditreport.NationalAuditReportListContainer,eu.europa.ec.sfc2014.frontoffice.model.domain.nationalauditreport.NationalAuditReportVersion,eu.europa.ec.sfc2014.frontoffice.model.domain.nationalauditreport.util.NationalAuditReportCriteria,SfcNationalAuditReportCriteriaDTO,SfcNationalAuditReportQueryDTO>
The following Action/State diagram describe the complete internal business flow :
The Web Service is defined as a "document-literal" service, which means
that the SOAP messages have a single part referencing an XML Schema element
that defines the entire body.
Constructor and Description |
---|
NationalAuditReportServiceImpl() |
Modifier and Type | Method and Description |
---|---|
SfcNationalAuditReportVersionDTO |
create(java.lang.String title,
java.util.Date finalAuditReportDate,
java.lang.String type)
To be used when a user wants to create a new National Audit Report.
|
void |
delete(java.lang.Long narId,
java.lang.Short version,
java.lang.Short workVersion)
To be used when a user wants to delete a National Audit Report version from the system.
|
SfcNationalAuditReportVersionDTO |
partialSave(SfcNationalAuditReportVersionDTO version)
Similar to the save operation this partialSave will only update the data that has been provided.
|
SfcNationalAuditReportVersionDTO |
read(java.lang.Long narId,
java.lang.Integer version,
java.lang.Integer workVersion)
Returns a single National Audit Report Version for the given National Audit Report ID and for the given version/workVersion.
|
SfcTableOfContentDTO |
readTableOfContent(java.lang.Long narId,
java.lang.Integer version,
java.lang.Integer workVersion,
java.lang.String locale) |
void |
returnForModification(java.lang.Long narId,
java.lang.Integer version,
java.lang.Integer workVersion,
java.lang.String reason)
To be used when a user wants to return the National Audit Report version sent by the Member State/Region because it is incomplete or incorrect and needs to be modified.
|
SfcNationalAuditReportVersionDTO |
save(SfcNationalAuditReportVersionDTO version)
Saves a NationalAuditReportVersion.
|
SfcSearchResultDTO<SfcNationalAuditReportVersionDTO> |
search(SfcNationalAuditReportQueryDTO query)
Searches for National Audit Report based on the given Criteria
The following is an example of request
|
void |
send(java.lang.Long narId,
java.lang.Integer version,
java.lang.Integer workVersion)
To be used when a user is ready to send its recorded data on a National Audit Report Version to the Commission or to an upper Node.
|
java.util.List<SfcValidationResultsDTO> |
validate(java.lang.Long narId,
java.lang.Integer version,
java.lang.Integer workVersion,
java.lang.String locale)
To be used to do an overall validation of the information related to a version of the National Audit Report
|
public SfcNationalAuditReportVersionDTO read(java.lang.Long narId, java.lang.Integer version, java.lang.Integer workVersion) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
This method returns the corresponding National Audit Report Version object when found. In case nothing could be found in the SFC2014 database (or the user doesn't have the right permission) an empty response is returned.
<nat:read>
<narId>27</narId>
<!--Optional:-->
<version>2017</version>
<workVersion>0</workVersion>
</nat:read>
narId
- : The National Audit Report IDeu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
- in case of errorpublic SfcTableOfContentDTO readTableOfContent(java.lang.Long narId, java.lang.Integer version, java.lang.Integer workVersion, java.lang.String locale) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
narId
- : The National Audit Report IDversion
- The version number of the NAR. Can be null
.workVersion
- The workVersion of the NAR. Can be null
.locale
- The language of the Contents. Can be null
.eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public SfcSearchResultDTO<SfcNationalAuditReportVersionDTO> search(SfcNationalAuditReportQueryDTO query) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
<query>
<!--Optional:-->
<resultRange>
<startIndex>0</startIndex>
<endIndex>99</endIndex>
</resultRange>
<!--Zero or more repetitions:-->
<sort>CCI</sort>
<sort>VERSION</sort>
<!--Zero or more repetitions:-->
<asc>true</asc>
<asc>true</asc>
<!--Optional:-->
<criteria>
<narId>27</narId>
<!--Optional:-->
<cci>2014BE</cci>
<isFinal>true</isFinal>
</criteria>
</query>
query
- SfcNationalAuditReportQueryDTOeu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public SfcNationalAuditReportVersionDTO save(SfcNationalAuditReportVersionDTO version) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
The saving of a National Audit Report Version is not an official send. It just saves the data into the database. Then, once saved, the National Audit Report Version can be validated, in order to check that it fulfils the business rules, and at last, once validated, it can be officially sent to the Commission.
The National Audit Report Version may require several add-ons of non structured documents in order to be valid. These documents are not uploaded through this service, but through the DocumentService. The DocumentService may be involved between the creation and the validation phase of the National Audit Report version.
The version argument must always be provided if not an SfcFaultException will be thrown.
version
- of the National Audit Report to save.eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public SfcNationalAuditReportVersionDTO partialSave(SfcNationalAuditReportVersionDTO version) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
version
- The National Audit Report to save.eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public SfcNationalAuditReportVersionDTO create(java.lang.String title, java.util.Date finalAuditReportDate, java.lang.String type) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
On success, a new version of the National Audit Report has been created with a working version number 0 and Its status was set to 'Open'.
title
- finalAuditReportDate
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public java.util.List<SfcValidationResultsDTO> validate(java.lang.Long narId, java.lang.Integer version, java.lang.Integer workVersion, java.lang.String locale) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
narId
- : The National Audit Report IDversion
- workVersion
- locale
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public void send(java.lang.Long narId, java.lang.Integer version, java.lang.Integer workVersion) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
narId
- : The National Audit Report IDversion
- workVersion
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public void returnForModification(java.lang.Long narId, java.lang.Integer version, java.lang.Integer workVersion, java.lang.String reason) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
narId
- : The National Audit Report IDversion
- workVersion
- reason
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public void delete(java.lang.Long narId, java.lang.Short version, java.lang.Short workVersion) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
narId
- : The National Audit Report IDversion
- workVersion
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
Copyright © 2024. All rights reserved.