@SchemaValidation(handler=eu.europa.ec.sfc2014.frontoffice.jws.SchemaValidationErrorHandler.class) public class AnnualControlReportServiceImpl extends eu.europa.ec.sfc2014.frontoffice.jws.service.search.GenericServiceJwsImpl<SfcAnnualControlReportVersionDTO,eu.europa.ec.sfc2014.frontoffice.model.dto.controlreport.ControlReportListContainer,eu.europa.ec.sfc2014.frontoffice.model.domain.controlreport.ControlReportVersion,eu.europa.ec.sfc2014.frontoffice.model.domain.controlreport.util.ControlReportCriteria,SfcAnnualControlReportCriteriaDTO,SfcAnnualControlReportQueryDTO>
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 |
---|
AnnualControlReportServiceImpl() |
Modifier and Type | Method and Description |
---|---|
SfcAnnualControlReportVersionDTO |
create(java.lang.String title,
java.lang.String type,
java.lang.Short year)
To be used when a user wants to create a new Annual Control Report.
|
SfcAnnualControlReportVersionDTO |
createNewVersion(java.lang.Long crId,
java.lang.Short version,
java.lang.Short workVersion)
To be used when a user wants to create a new version of a Annual Control Report.
|
void |
delete(java.lang.Long crId,
java.lang.Short version,
java.lang.Short workVersion)
To be used when a user wants to delete a Control Report version from the system.
|
SfcAnnualControlReportVersionDTO |
partialSave(SfcAnnualControlReportVersionDTO version)
Similar to the save operation this partialSave will only update the data that has been provided.
|
SfcAnnualControlReportVersionDTO |
read(java.lang.Long crId,
java.lang.Integer version,
java.lang.Integer workVersion)
Returns a single Annual Control Report Version for the given Control Report ID and for the given version/workVersion.
|
SfcTableOfContentDTO |
readTableOfContent(java.lang.Long crId,
java.lang.Integer version,
java.lang.Integer workVersion,
java.lang.String locale) |
void |
returnForModification(java.lang.Long crId,
java.lang.Integer version,
java.lang.Integer workVersion,
java.lang.String reason)
To be used when a user wants to return the Annual Control Report version sent by the Member State/Region because it is incomplete or incorrect and needs to be modified.
|
SfcAnnualControlReportVersionDTO |
save(SfcAnnualControlReportVersionDTO version)
Saves a ControlReportVersion.
|
SfcSearchResultDTO<SfcAnnualControlReportVersionDTO> |
search(SfcAnnualControlReportQueryDTO query)
Searches for Annual Control Report based on the given Criteria
The following is an example of request
|
void |
send(java.lang.Long crId,
java.lang.Integer version,
java.lang.Integer workVersion)
To be used when a user is ready to send its recorded data on a Annual Control Report Version to the Commission or to an upper Node.
|
java.util.List<SfcValidationResultsDTO> |
validate(java.lang.Long crId,
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 Annual Control Report
|
public SfcAnnualControlReportVersionDTO read(java.lang.Long crId, java.lang.Integer version, java.lang.Integer workVersion) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
This method returns the corresponding Annual Control 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>
<crId>27</crId>
<!--Optional:-->
<version>2017</version>
<workVersion>0</workVersion>
</nat:read>
crId
- : The Control Report IDeu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
- in case of errorpublic SfcTableOfContentDTO readTableOfContent(java.lang.Long crId, java.lang.Integer version, java.lang.Integer workVersion, java.lang.String locale) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
crId
- The mandatory crId (Control Report Id) for this ACR versionversion
- The version number of the ACR. Can be null
.workVersion
- The workVersion of the ACR. Can be null
.locale
- The language of the Contents. Can be null
.eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public SfcSearchResultDTO<SfcAnnualControlReportVersionDTO> search(SfcAnnualControlReportQueryDTO 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>
<crId>27</crId>
<!--Optional:-->
<cci>2014BE</cci>
<isFinal>true</isFinal>
</criteria>
</query>
query
- SfcAnnualControlReportQueryDTOeu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public SfcAnnualControlReportVersionDTO save(SfcAnnualControlReportVersionDTO version) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
The saving of a Annual Control Report Version is not an official send. It just saves the data into the database. Then, once saved, the Annual Control 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 Annual Control 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 Annual Control Report version.
The version argument must always be provided if not an SfcFaultException will be thrown.
version
- of the Annual Control Report to save.eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public SfcAnnualControlReportVersionDTO partialSave(SfcAnnualControlReportVersionDTO version) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
version
- The Annual Control Report to save.eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public SfcAnnualControlReportVersionDTO createNewVersion(java.lang.Long crId, java.lang.Short version, java.lang.Short workVersion) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
On success, a new version of the Annual Control Report has been created as a copy of the previous version, with a version number identical to the previous and a working version number incremented by one. Its status was set to 'Open'.
crId
- The mandatory crId (Control Report Id) for this ACR versionversion
- the current Control Report VersionworkVersion
- the work versioneu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public SfcAnnualControlReportVersionDTO create(java.lang.String title, java.lang.String type, java.lang.Short year) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
On success, a new version of the Annual Control Report has been created with a working version number 0 and Its status was set to 'Open'.
cci
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public java.util.List<SfcValidationResultsDTO> validate(java.lang.Long crId, java.lang.Integer version, java.lang.Integer workVersion, java.lang.String locale) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
crId
- The mandatory crId (Control Report Id) for this ACR versionversion
- workVersion
- locale
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public void send(java.lang.Long crId, java.lang.Integer version, java.lang.Integer workVersion) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
crId
- The mandatory crId (Control Report Id) for this ACR versionversion
- workVersion
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public void returnForModification(java.lang.Long crId, java.lang.Integer version, java.lang.Integer workVersion, java.lang.String reason) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
crId
- The mandatory crId (Control Report Id) for this ACR versionversion
- workVersion
- reason
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
public void delete(java.lang.Long crId, java.lang.Short version, java.lang.Short workVersion) throws eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
crId
- The mandatory crId (Control Report Id) for this ACR versionversion
- workVersion
- eu.europa.ec.sfc2014.core.model.exceptions.SfcFaultException
Copyright © 2024. All rights reserved.