commit b9ab61f7d2dddeb3ddb56e9d6772a5b88c636ee3 Author: FabioN Date: Mon Mar 13 11:18:04 2017 +0000 git-svn-id: https://serverad.studio-ml.local/svn/repo/projects/IntegryManagmentSystem/branches/checkDataNumDoc@5717 7169d44f-50de-5945-979c-d5cbc11e8a2d diff --git a/.classpath b/.classpath new file mode 100644 index 0000000000..d7210c3c8e --- /dev/null +++ b/.classpath @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..335c5d0ea2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,1404 @@ +* text=auto !eol +/ svn_global_002dignores=target%0A +/.classpath -text +/.project -text +.settings/.jsdtscope -text +.settings/org.eclipse.core.resources.prefs -text +.settings/org.eclipse.jdt.core.prefs -text +.settings/org.eclipse.m2e.core.prefs -text +.settings/org.eclipse.wst.common.component -text +.settings/org.eclipse.wst.common.project.facet.core.prefs.xml -text +.settings/org.eclipse.wst.common.project.facet.core.xml -text +.settings/org.eclipse.wst.jsdt.ui.superType.container -text +.settings/org.eclipse.wst.jsdt.ui.superType.name -text +.settings/org.eclipse.wst.validation.prefs -text +/CHANGES.txt -text +/CHANGES.xls -text +/EMS_old.docx -text +/Entity[!!-~]managment[!!-~]system.doc -text +/Interfaccia[!!-~]ecommerce[!!-~]Integry.docx -text +/Interfaccia[!!-~]ecommerce[!!-~]Integry.pdf -text +docs/Applicativi[!!-~]web.pptx -text +docs/Arch1.odp -text +docs/Ems[!!-~]Architettura.pptx -text +docs/Integry[!!-~]Managment[!!-~]System[!!-~]-[!!-~]Sviluppi[!!-~]2.pptx -text +docs/Integry[!!-~]Managment[!!-~]System[!!-~]sviluppi.pptx -text +docs/Integry[!!-~]Managment[!!-~]System.pptx -text +docs/Java[!!-~]6-7.pptx -text +docs/Presentazione[!!-~]standard1.odp -text +docs/Procedure[!!-~]da[!!-~]sviluppare.docx -text +docs/Rule[!!-~]test[!!-~]sum.pptx -text +docs/Schema[!!-~]righe[!!-~]entity.pptx -text +docs/Tutorial[!!-~]Drools[!!-~]Rules.pptx -text +docs/Web[!!-~]e[!!-~]strumenti[!!-~]per[!!-~]la[!!-~]programmazione.pptx -text +ems-common/.classpath -text +ems-common/.project -text +ems-common/.settings/org.eclipse.core.resources.prefs -text +ems-common/.settings/org.eclipse.jdt.core.prefs -text +ems-common/.settings/org.eclipse.m2e.core.prefs -text +ems-common/.settings/org.eclipse.wst.common.component -text +ems-common/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-common/.settings/org.eclipse.wst.validation.prefs -text +ems-common/pom.xml -text +ems-contabil/.classpath -text +ems-contabil/.project -text +ems-contabil/.settings/org.eclipse.core.resources.prefs -text +ems-contabil/.settings/org.eclipse.jdt.core.prefs -text +ems-contabil/.settings/org.eclipse.m2e.core.prefs -text +ems-contabil/.settings/org.eclipse.wst.common.component -text +ems-contabil/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-contabil/.settings/org.eclipse.wst.validation.prefs -text +ems-contabil/pom.xml -text +ems-contabil/src/main/java/it/integry/ems/contabil/controller/ContabilController.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/importaz/service/ImportMovContabilService.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/adapter/TimestampAdapter.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ActiveOrHistoricCurrencyAndAmount.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/AddressType2Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIAccountIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIAmountType1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBdyPaymentRequest000400.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification3.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICashAccount1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICashAccount2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIChargeBearerTypeCode.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICheque1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIChequeType1Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIClearingSystemMemberIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICreditTransferTransactionInformation.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIEnvelPaymentRequest000400.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification3.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGenericIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGenericIdentification2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGroupHeader.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIHdrSrv00107.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIHdrTrt00107.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType3.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBILocalInstrument1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification3.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification4.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIParty1Choice.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification3.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification4.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification5.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentInstructionInformation.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentRequest000400.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentRequestMsg000400.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentTypeInformation1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentTypeInformation2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPersonIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPostalAddress6.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRegulatoryReporting1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRegulatoryReportingType1Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRemittanceLocation1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRemittanceLocationMethod1Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel1Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBISgnInf00104.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBISrvInf1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIStructuredRegulatoryReporting1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CategoryPurpose1Choice.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CongruencyInformation.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ContactDetails2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditDebitCode.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceInformation2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceType1Choice.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceType2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DateAndPlaceOfBirth.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DiagnosticInformation.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentAdjustment1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentType3Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentType5Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericIdentification3.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericOrganisationIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericPersonIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/NamePrefix1Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ObjectFactory.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/OrganisationIdentification4.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/OrganisationIdentificationSchemeName1Choice.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Party6Choice.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PartyIdentification32.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PaymentIdentification1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PaymentMethod3Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PersonIdentification5.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PersonIdentificationSchemeName1Choice.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Priority2Code.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Purpose1Choice.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReceiverInformation.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReceiverType.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RecerencePlatform.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentInformation3.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentType1Choice.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentType2.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RemittanceAmount1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RemittanceInformation5.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/SenderInformation.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/SenderType.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceInformation.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceName.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceName1.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/StructuredRemittanceInformation7.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/package-info.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/service/ContabilService.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/service/DistinteIncassiDTO.java -text +ems-contabil/src/main/java/it/integry/ems/contabil/type/ContabilImportFormat.java -text +ems-contabil/src/main/resources/sepa/xsd/CBIBdyPaymentRequest.00.04.00.xsd -text +ems-contabil/src/main/resources/sepa/xsd/CBIHdrSrv.001.07.xsd -text +ems-contabil/src/main/resources/sepa/xsd/CBIHdrTrt.001.07.xsd -text +ems-contabil/src/main/resources/sepa/xsd/CBIPaymentRequest.00.04.00.xsd -text +ems-contabil/src/main/resources/sepa/xsd/CBIPaymentRequestMsg.00.04.00.xsd -text +ems-contabil/src/main/resources/sepa/xsd/CBISgnInf.001.04.xsd -text +ems-contabil/src/main/resources/sepa/xsd/binding.jxb -text +/ems-core svn_global_002dignores=target%0A +ems-core/.classpath -text +ems-core/.externalToolBuilders/org.drools.eclipse.droolsbuilder.launch -text +ems-core/.project -text +ems-core/.settings/org.eclipse.core.resources.prefs -text +ems-core/.settings/org.eclipse.jdt.core.prefs -text +ems-core/.settings/org.eclipse.m2e.core.prefs -text +ems-core/.settings/org.eclipse.wst.common.component -text +ems-core/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-core/.settings/org.eclipse.wst.validation.prefs -text +ems-core/pom.xml -text +ems-core/src/main/java/it/integry/ems/adapter/BigDecimalDeserialize.java -text +ems-core/src/main/java/it/integry/ems/adapter/CustomDeserializer.java -text +ems-core/src/main/java/it/integry/ems/adapter/DateAdapter.java -text +ems-core/src/main/java/it/integry/ems/adapter/EsitoDeserialize.java -text +ems-core/src/main/java/it/integry/ems/adapter/EsitoSerialize.java -text +ems-core/src/main/java/it/integry/ems/adapter/ExecDateSerializer.java -text +ems-core/src/main/java/it/integry/ems/adapter/IntegerDeserializer.java -text +ems-core/src/main/java/it/integry/ems/adapter/JsonDateAdapter.java -text +ems-core/src/main/java/it/integry/ems/adapter/JsonDateAdapterSerializer.java -text +ems-core/src/main/java/it/integry/ems/adapter/PkEntityDeserializer.java -text +ems-core/src/main/java/it/integry/ems/adapter/PkEntitySerializer.java -text +ems-core/src/main/java/it/integry/ems/adapter/StringUnicodeDeserialize.java -text +ems-core/src/main/java/it/integry/ems/adapter/XmlDateAdapter.java -text +ems-core/src/main/java/it/integry/ems/annotation/DtoField.java -text +ems-core/src/main/java/it/integry/ems/csv/CsvMapper.java -text +ems-core/src/main/java/it/integry/ems/datasource/ConnectionDecorator.java -text +ems-core/src/main/java/it/integry/ems/datasource/DataSource.java -text +ems-core/src/main/java/it/integry/ems/directory/DirWatcherListener.java -text +ems-core/src/main/java/it/integry/ems/directory/DirectoryService.java -text +ems-core/src/main/java/it/integry/ems/directory/EmailListenerInfo.java -text +ems-core/src/main/java/it/integry/ems/directory/EmailService.java -text +ems-core/src/main/java/it/integry/ems/directory/EmailWatcherListener.java -text +ems-core/src/main/java/it/integry/ems/directory/ListenerInfo.java -text +ems-core/src/main/java/it/integry/ems/directory/ReceiptsFileListener.java -text +ems-core/src/main/java/it/integry/ems/exception/CheckConstraintException.java -text +ems-core/src/main/java/it/integry/ems/exception/SyncException.java -text +ems-core/src/main/java/it/integry/ems/export/dto/DialogoDTO.java -text +ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplate.java -text +ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateColumnsMap.java -text +ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateCsv.java -text +ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateEmail.java -text +ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateFileNameConf.java -text +ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateFtp.java -text +ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateModoInvio.java -text +ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateVariable.java -text +ems-core/src/main/java/it/integry/ems/json/CommonObjectMapper.java -text +ems-core/src/main/java/it/integry/ems/json/JSONObjectMapper.java -text +ems-core/src/main/java/it/integry/ems/json/OrdikidsResponseJSONObjectMapper.java -text +ems-core/src/main/java/it/integry/ems/json/ResponseJSONObjectMapper.java -text +ems-core/src/main/java/it/integry/ems/model/ColumnMetadataDTO.java -text +ems-core/src/main/java/it/integry/ems/model/EntityModel.java -text +ems-core/src/main/java/it/integry/ems/model/FieldModel.java -text +ems-core/src/main/java/it/integry/ems/model/PKFieldModel.java -text +ems-core/src/main/java/it/integry/ems/properties/EmailProperties.java -text +ems-core/src/main/java/it/integry/ems/properties/EmsProperties.java -text +ems-core/src/main/java/it/integry/ems/properties/listener/EmsPropertiesFileListener.java -text +ems-core/src/main/java/it/integry/ems/report/dto/JasperDTO.java -text +ems-core/src/main/java/it/integry/ems/report/dto/PairsDTO.java -text +ems-core/src/main/java/it/integry/ems/report/dto/SubreportDTO.java -text +ems-core/src/main/java/it/integry/ems/response/AttachmentDTO.java -text +ems-core/src/main/java/it/integry/ems/response/EsitoType.java -text +ems-core/src/main/java/it/integry/ems/response/FileItem.java -text +ems-core/src/main/java/it/integry/ems/response/ModelEntityResponse.java -text +ems-core/src/main/java/it/integry/ems/response/ParamRequestDTO.java -text +ems-core/src/main/java/it/integry/ems/response/PkEntity.java -text +ems-core/src/main/java/it/integry/ems/response/ServiceRestResponse.java -text +ems-core/src/main/java/it/integry/ems/response/StatusResponse.java -text +ems-core/src/main/java/it/integry/ems/retail/service/RetailUtilService.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/AccountingRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/AgentiRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/AnagRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/CommesseRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/CommonRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/ConfigActivityRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/CostiDTO.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/DistBaseRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/DocOrdRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/DocumentCheckRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/DocumentRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/InventariRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/LottiProdRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/OrdWebRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/OrderLavRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/OrderRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/PackagesRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/PartitaMagRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/ProductionsRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/PurchasesRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/QueryRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/ReceiptRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/SalesRules.java -text +ems-core/src/main/java/it/integry/ems/rules/completing/TabGenTextiles.java -text +ems-core/src/main/java/it/integry/ems/rules/expression/SalesExpression.java -text +ems-core/src/main/java/it/integry/ems/rules/expression/dto/InfoPezziDTO.java -text +ems-core/src/main/java/it/integry/ems/rules/util/CustomAccumulateFunction.java -text +ems-core/src/main/java/it/integry/ems/schedule/QuartzJobBeanWithConf.java -text +ems-core/src/main/java/it/integry/ems/service/EntityProcessor.java -text +ems-core/src/main/java/it/integry/ems/service/HttpRestWrapper.java -text +ems-core/src/main/java/it/integry/ems/service/MailService.java -text +ems-core/src/main/java/it/integry/ems/service/PrinterService.java -text +ems-core/src/main/java/it/integry/ems/service/ReportProcessor.java -text +ems-core/src/main/java/it/integry/ems/service/XlsService.java -text +ems-core/src/main/java/it/integry/ems/spring/etl/ConditionalBeanDefinitionParser.java -text +ems-core/src/main/java/it/integry/ems/spring/etl/ConditionalBeanNamespaceHandler.java -text +ems-core/src/main/java/it/integry/ems/status/HandlerInterceptorAnnotationAwareHandlerMapping.java -text +ems-core/src/main/java/it/integry/ems/status/ServiceChecker.java -text +ems-core/src/main/java/it/integry/ems/sync/ASyncManager.java -text +ems-core/src/main/java/it/integry/ems/sync/ConnectionCacheHolder.java -text +ems-core/src/main/java/it/integry/ems/sync/SyncManager.java -text +ems-core/src/main/java/it/integry/ems/sync/task/ConnectionCacheCleanerListener.java -text +ems-core/src/main/java/it/integry/ems/util/HeaderRowCsvReader.java -text +ems-core/src/main/java/it/integry/ems/util/NullAwareBeanUtilsBean.java -text +ems-core/src/main/java/it/integry/ems/utility/BarcodeUtility.java -text +ems-core/src/main/java/it/integry/ems/utility/IntegerUtility.java -text +ems-core/src/main/java/it/integry/ems/utility/UtilityExport.java -text +ems-core/src/main/java/it/integry/ems/utility/UtilityFile.java -text +ems-core/src/main/java/it/integry/ems/watching/DirFilterWatcher.java -text +ems-core/src/main/java/it/integry/ems/watching/DirWatcher.java -text +ems-core/src/main/java/it/integry/ems/watching/FileWatcher.java -text +ems-core/src/main/java/it/integry/security/provider/RestAuthenticationProvider.java -text +ems-core/src/main/java/it/integry/security/provider/UserService.java -text +ems-core/src/main/java/it/integry/security/utility/CryptoUtils.java -text +ems-core/src/main/java/it/integry/security/utility/RestCredentials.java -text +ems-core/src/main/java/it/integry/security/utility/RestToken.java -text +ems-core/src/main/java/it/integry/security/utility/RestUtil.java -text +ems-core/src/main/resources/rules/Agenti.drl -text +ems-core/src/main/resources/rules/DistBase.drl -text +ems-core/src/main/resources/rules/DocA.drl -text +ems-core/src/main/resources/rules/DocL.drl -text +ems-core/src/main/resources/rules/DocV.drl -text +ems-core/src/main/resources/rules/DocWebA.drl -text +ems-core/src/main/resources/rules/LottiProd.drl -text +ems-core/src/main/resources/rules/OrdA.drl -text +ems-core/src/main/resources/rules/OrdL.drl -text +ems-core/src/main/resources/rules/OrdP.drl -text +ems-core/src/main/resources/rules/OrdWebV.drl -text +ems-core/src/main/resources/rules/accounting.drl -text +ems-core/src/main/resources/rules/anag.drl -text +ems-core/src/main/resources/rules/check_cond.drl -text +ems-core/src/main/resources/rules/commesse.drl -text +ems-core/src/main/resources/rules/commons.drl -text +ems-core/src/main/resources/rules/config_activity.drl -text +ems-core/src/main/resources/rules/document.drl -text +ems-core/src/main/resources/rules/inventari.drl -text +ems-core/src/main/resources/rules/logistic.drl -text +ems-core/src/main/resources/rules/post_calc.drl -text +ems-core/src/main/resources/rules/production.drl -text +ems-core/src/main/resources/rules/purchases.drl -text +ems-core/src/main/resources/rules/retail.drl -text +ems-core/src/main/resources/rules/sales.drl -text +ems-core/src/main/resources/rules/tabGenTextiles.drl -text +ems-core/src/test/java/EntityTestDefaultVal.java -text +ems-core/src/test/java/select.json -text +ems-core/src/test/java/sync_ctb_cont.json -text +ems-document/.classpath -text +ems-document/.project -text +ems-document/.settings/org.eclipse.core.resources.prefs -text +ems-document/.settings/org.eclipse.jdt.core.prefs -text +ems-document/.settings/org.eclipse.m2e.core.prefs -text +ems-document/.settings/org.eclipse.wst.common.component -text +ems-document/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-document/.settings/org.eclipse.wst.validation.prefs -text +ems-document/pom.xml -text +ems-document/src/main/java/it/integry/ems/document/controller/DocumentController.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/EasySpedWSServiceImpl.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/EasySpedWSServiceImplLocator.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/Easyspedde_endpointImpl.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/Easyspedde_endpointStub.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/DestinationAddress.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/DestinationAddressOut.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/FnVAB.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/FnVAT.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/pdf/ArrayOfLabelToPrint.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/pdf/LabelToPrint.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/pdf/LabelToPrintTipiEtichetta.java -text +ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/ws/EasySpedDEWS.java -text +ems-document/src/main/java/it/integry/ems/document/export/controller/DocumentExportController.java -text +ems-document/src/main/java/it/integry/ems/document/export/service/DocumentExporterService.java -text +ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnFooter.java -text +ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnHeader.java -text +ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnItem.java -text +ems-document/src/main/java/it/integry/ems/document/export/swinger/InvRecord.java -text +ems-document/src/main/java/it/integry/ems/document/export/swinger/SwingerResponse.java -text +ems-document/src/main/java/it/integry/ems/document/service/DocumentService.java -text +ems-document/src/main/java/it/integry/ems/document/type/DocumentExportFormat.java -text +ems-engine/.classpath -text +ems-engine/.project -text +ems-engine/.settings/.jsdtscope -text +ems-engine/.settings/org.eclipse.core.resources.prefs -text +ems-engine/.settings/org.eclipse.jdt.core.prefs -text +ems-engine/.settings/org.eclipse.ltk.core.refactoring.prefs -text +ems-engine/.settings/org.eclipse.m2e.core.prefs -text +ems-engine/.settings/org.eclipse.wst.common.component -text +ems-engine/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml -text +ems-engine/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-engine/.settings/org.eclipse.wst.jsdt.ui.superType.container -text +ems-engine/.settings/org.eclipse.wst.jsdt.ui.superType.name -text +ems-engine/.settings/org.eclipse.wst.validation.prefs -text +ems-engine/.tern-project -text +ems-engine/pom.xml -text +ems-engine/src/main/java/it/integry/ems/anag/controller/AnagImportController.java -text +ems-engine/src/main/java/it/integry/ems/controller/EmsController.java -text +ems-engine/src/main/java/it/integry/ems/controller/EmsResponseEntityExceptionHandler.java -text +ems-engine/src/main/java/it/integry/ems/controller/EmsServices.java -text +ems-engine/src/main/java/it/integry/ems/controller/HeaderModifierAdvice.java -text +ems-engine/src/main/java/it/integry/ems/interceptors/BodyLogger.java -text +ems-engine/src/main/java/it/integry/ems/interceptors/ExportInterceptor.java -text +ems-engine/src/main/java/it/integry/ems/metrics/filter/MetricFilter.java -text +ems-engine/src/main/java/it/integry/ems/metrics/listener/MetricRefreshListener.java -text +ems-engine/src/main/java/it/integry/ems/metrics/service/MetricService.java -text +ems-engine/src/main/java/it/integry/ems/properties/listener/DirectoryPropertiesFileListener.java -text +ems-engine/src/main/java/it/integry/ems/scheduler/CustomSchedulerFactoryBean.java -text +ems-engine/src/main/java/it/integry/ems/scheduler/JobInfoDTO.java -text +ems-engine/src/main/java/it/integry/ems/scheduler/SchedulerService.java -text +ems-engine/src/main/java/it/integry/security/AuthenticationRequestWrapper.java -text +ems-engine/src/main/java/it/integry/security/RestAuthenticationEntryPoint.java -text +ems-engine/src/main/java/it/integry/security/filter/RestLoggerBodyFilter.java -text +ems-engine/src/main/java/it/integry/security/filter/RestSecurityFilter.java -text +ems-engine/src/main/resources/META-INF/drools.packagebuilder.conf -text +ems-engine/src/main/resources/META-INF/spring.handlers -text +ems-engine/src/main/resources/META-INF/spring.schemas -text +ems-engine/src/main/resources/conditional/springbeans/condbean.xsd -text +ems-engine/src/main/resources/configs/mail.properties -text +ems-engine/src/main/resources/configs/root.properties -text +ems-engine/src/main/resources/ems/ems.properties -text +ems-engine/src/main/resources/locales/messages.properties -text +ems-engine/src/main/resources/locales/messages_it.properties -text +ems-engine/src/main/resources/log4j2.xml -text +ems-engine/src/main/resources/mvc-dispatcher-servlet.xml -text +ems-engine/src/main/resources/quartz/config.properties -text +ems-engine/src/main/resources/rules/general.drl -text +ems-engine/src/main/resources/spring/applicationContext-security.xml -text +ems-engine/src/main/resources/spring/applicationContext.xml -text +ems-engine/src/main/webapp/META-INF/context.xml -text +ems-engine/src/main/webapp/WEB-INF/web.xml -text +ems-engine/src/main/webapp/css/bootstrap-theme.min.css -text +ems-engine/src/main/webapp/css/bootstrap.min.css -text +ems-engine/src/main/webapp/css/cerch.png -text +ems-engine/src/main/webapp/css/codemirror.css -text +ems-engine/src/main/webapp/css/demo.css -text +ems-engine/src/main/webapp/css/false.png -text +ems-engine/src/main/webapp/css/font-awesome.css -text +ems-engine/src/main/webapp/css/font-awesome.min.css -text +ems-engine/src/main/webapp/css/helper.css -text +ems-engine/src/main/webapp/css/jquery-cron.css -text +ems-engine/src/main/webapp/css/json.human.css -text +ems-engine/src/main/webapp/css/true.png -text +ems-engine/src/main/webapp/fonts/FontAwesome.otf -text +ems-engine/src/main/webapp/fonts/fontawesome-webfont.eot -text +ems-engine/src/main/webapp/fonts/fontawesome-webfont.svg -text +ems-engine/src/main/webapp/fonts/fontawesome-webfont.ttf -text +ems-engine/src/main/webapp/fonts/fontawesome-webfont.woff -text +ems-engine/src/main/webapp/fonts/fontawesome-webfont.woff2 -text +ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.ttf -text +ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.woff -text +ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 -text +ems-engine/src/main/webapp/index.jsp -text +ems-engine/src/main/webapp/js/angular.min.js -text +ems-engine/src/main/webapp/js/bootstrap.min.js -text +ems-engine/src/main/webapp/js/charts.js -text +ems-engine/src/main/webapp/js/exporting.js -text +ems-engine/src/main/webapp/js/helper.js -text +ems-engine/src/main/webapp/js/highcharts-more.js -text +ems-engine/src/main/webapp/js/highcharts.js -text +ems-engine/src/main/webapp/js/jquery-cron.js -text +ems-engine/src/main/webapp/js/jquery.min.js -text +ems-engine/src/main/webapp/js/table.js -text +ems-engine/src/test/java/it/integry/ems/document/DocumentTest.java -text +ems-engine/src/test/java/it/integry/ems/engine/EcommerceTest.java -text +ems-engine/src/test/java/it/integry/ems/engine/EngineTest.java -text +ems-engine/src/test/java/it/integry/ems/entityvalidate/EntityValidate.java -text +ems-engine/src/test/java/it/integry/ems/logistic/LogisticTest.java -text +ems-engine/src/test/java/it/integry/ems/order/OrderTest.java -text +ems-engine/src/test/java/it/integry/ems/production/ProductionTest.java -text +ems-engine/src/test/java/it/integry/ems/test/BaseTester.java -text +ems-engine/src/test/java/it/integry/print/ConsumeHeap.java -text +ems-engine/src/test/java/it/integry/print/Infoss.java -text +ems-engine/src/test/java/it/integry/print/OutMem.java -text +ems-engine/src/test/java/it/integry/print/testprint.java -text +ems-engine/src/test/java/it/integry/security/provider/RuleTester.java -text +ems-engine/src/test/java/it/integry/security/provider/TestLoginRestFul.java -text +ems-engine/src/test/java/it/integry/watching/DirectoryWatchDemo.java -text +/ems-logistic svn_global_002dignores=target%0A +ems-logistic/.classpath -text +ems-logistic/.project -text +ems-logistic/.settings/org.eclipse.core.resources.prefs -text +ems-logistic/.settings/org.eclipse.jdt.core.prefs -text +ems-logistic/.settings/org.eclipse.m2e.core.prefs -text +ems-logistic/.settings/org.eclipse.wst.common.component -text +ems-logistic/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-logistic/.settings/org.eclipse.wst.validation.prefs -text +ems-logistic/pom.xml -text +ems-logistic/src/main/java/it/integry/ems/logistic/controller/LogisticController.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/controller/Slim2kLogisticController.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/controller/SmartLogisticController.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/dto/ArticoloDTO.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/dto/ClienteDTO.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/dto/ColloDTO.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/dto/DialogPackageDTO.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/dto/ListColliDTO.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/importaz/controller/PackageImportController.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/importaz/dto/ColliProduzioneDTO.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/importaz/service/PackagesImportService.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/service/LogisticService.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/service/Slim2kLogisticService.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/service/SmartLogisticService.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/type/AccettazioneType.java -text +ems-logistic/src/main/java/it/integry/ems/logistic/utils/LogisticUtils.java -text +ems-logistic/src/main/java/it/integry/ems/production/controller/ProductionController.java -text +ems-logistic/src/main/java/it/integry/ems/production/controller/WpmController.java -text +ems-logistic/src/main/java/it/integry/ems/production/dto/CartellinoDTO.java -text +ems-logistic/src/main/java/it/integry/ems/production/dto/CrontimeDTO.java -text +ems-logistic/src/main/java/it/integry/ems/production/dto/OrdLavDTO.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/ActivityDelete.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/ApriProduzione.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/Curva.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/CurvaRow.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/CurvaRowDett.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/Immissione.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/Inventario.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/InventarioRow.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/NoteProduttive.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/ReturnAltriOrdini.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/ReturnAvanzamento.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/ReturnOrder.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/ReturnSave.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/ReturnTransaction.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/RilevazionePerdite.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/Transaction.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/TransactionSave.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/Vendita.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/VenditaForDay.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/VenditaForProdFin.java -text +ems-logistic/src/main/java/it/integry/ems/production/farmmes/dto/VenditaRow.java -text +ems-logistic/src/main/java/it/integry/ems/production/importaz/service/FarmMesImportService.java -text +ems-logistic/src/main/java/it/integry/ems/production/importaz/service/ProductionImportService.java -text +ems-logistic/src/main/java/it/integry/ems/production/importaz/service/ProductionLineClosureService.java -text +ems-logistic/src/main/java/it/integry/ems/production/importaz/service/ProductionPlanService.java -text +ems-logistic/src/main/java/it/integry/ems/production/service/ProductionPrinterService.java -text +ems-logistic/src/main/java/it/integry/ems/production/service/WpmService.java -text +ems-logistic/src/main/resources/reports/EtichetteSSCC_conf_small.jasper -text +ems-logistic/src/main/resources/reports/EtichetteSSCC_conf_small.jrxml -text +ems-logistic/src/test/java/receipts_delete_all.json -text +ems-logistic/src/test/java/receipts_insert.json -text +ems-logistic/src/test/java/receipts_insert_complete.json -text +ems-map/.classpath -text +ems-map/.project -text +ems-map/.settings/org.eclipse.core.resources.prefs -text +ems-map/.settings/org.eclipse.jdt.core.prefs -text +ems-map/.settings/org.eclipse.m2e.core.prefs -text +ems-map/.settings/org.eclipse.wst.common.component -text +ems-map/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-map/.settings/org.eclipse.wst.validation.prefs -text +ems-map/pom.xml -text +ems-map/src/main/java/it/integry/ems/map/adapter/AtlasOutputFormatAdapter.java -text +ems-map/src/main/java/it/integry/ems/map/adapter/ColorAdapter.java -text +ems-map/src/main/java/it/integry/ems/map/adapter/MapSourceAdapter.java -text +ems-map/src/main/java/it/integry/ems/map/annotations/AtlasCreatorName.java -text +ems-map/src/main/java/it/integry/ems/map/annotations/SupportedParameters.java -text +ems-map/src/main/java/it/integry/ems/map/atlas/tileprovider/ConvertedRawTileProvider.java -text +ems-map/src/main/java/it/integry/ems/map/atlas/tileprovider/FilterTileProvider.java -text +ems-map/src/main/java/it/integry/ems/map/atlas/tileprovider/TileProvider.java -text +ems-map/src/main/java/it/integry/ems/map/atlas/tilestore/TileStore.java -text +ems-map/src/main/java/it/integry/ems/map/atlas/tilestore/TileStoreEntry.java -text +ems-map/src/main/java/it/integry/ems/map/atlas/tilestore/TileStoreInfo.java -text +ems-map/src/main/java/it/integry/ems/map/atlas/tilestore/berkerly/BerkeleyDbTileStore.java -text +ems-map/src/main/java/it/integry/ems/map/atlas/tilestore/berkerly/DelayedInterruptThread.java -text +ems-map/src/main/java/it/integry/ems/map/atlas/tilestore/berkerly/TileDbEntry.java -text +ems-map/src/main/java/it/integry/ems/map/controller/MapController.java -text +ems-map/src/main/java/it/integry/ems/map/custom/CustomCloudMade.java -text +ems-map/src/main/java/it/integry/ems/map/custom/CustomLocalImageFileMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/custom/CustomLocalTileFilesMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/custom/CustomLocalTileSQliteMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/custom/CustomLocalTileZipMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/custom/CustomMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/custom/CustomMapSourceType.java -text +ems-map/src/main/java/it/integry/ems/map/custom/CustomMultiLayerMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/custom/CustomWmsMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/custom/StandardMapSourceLayer.java -text +ems-map/src/main/java/it/integry/ems/map/dto/PngDataDTO.java -text +ems-map/src/main/java/it/integry/ems/map/exception/DownloadFailedException.java -text +ems-map/src/main/java/it/integry/ems/map/exception/InvalidNameException.java -text +ems-map/src/main/java/it/integry/ems/map/exception/MapCreationException.java -text +ems-map/src/main/java/it/integry/ems/map/exception/MapSourceCreateException.java -text +ems-map/src/main/java/it/integry/ems/map/exception/MapSourceInitializationException.java -text +ems-map/src/main/java/it/integry/ems/map/exception/TileException.java -text +ems-map/src/main/java/it/integry/ems/map/exception/TileStoreException.java -text +ems-map/src/main/java/it/integry/ems/map/exception/UnrecoverableDownloadException.java -text +ems-map/src/main/java/it/integry/ems/map/exception/UpdateFailedException.java -text +ems-map/src/main/java/it/integry/ems/map/init/AbstractMultiLayerMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/init/loader/CustomMapSourceLoader.java -text +ems-map/src/main/java/it/integry/ems/map/init/loader/MapPackClassLoader.java -text +ems-map/src/main/java/it/integry/ems/map/init/loader/MapPackManager.java -text +ems-map/src/main/java/it/integry/ems/map/init/service/DefaultMapSourcesManager.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/AtlasInterface.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/AtlasObject.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/DummyTileFilter.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/ExceptionExtendedInfo.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/FileBasedMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/HttpMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/InitializableMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/LayerInterface.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/MapInterface.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/MapSource.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/MapSourceTextAttribution.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/MapSpace.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/TileFilter.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/TileImageDataWriter.java -text +ems-map/src/main/java/it/integry/ems/map/interfaces/WrappedMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/jdbc/SQLiteLoader.java -text +ems-map/src/main/java/it/integry/ems/map/mapsources/AbstractHttpMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/mapsources/MapSourceTools.java -text +ems-map/src/main/java/it/integry/ems/map/mapsources/MapSourceUrlUpdater.java -text +ems-map/src/main/java/it/integry/ems/map/mapsources/MapSourcesManager.java -text +ems-map/src/main/java/it/integry/ems/map/mapspace/MapSpaceFactory.java -text +ems-map/src/main/java/it/integry/ems/map/mapspace/MercatorPower2MapSpace.java -text +ems-map/src/main/java/it/integry/ems/map/mapspace/MercatorPower2MapSpaceEllipsoidal.java -text +ems-map/src/main/java/it/integry/ems/map/model/AnyAttributeMap.java -text +ems-map/src/main/java/it/integry/ems/map/model/Atlas.java -text +ems-map/src/main/java/it/integry/ems/map/model/AtlasCreator.java -text +ems-map/src/main/java/it/integry/ems/map/model/AtlasOutputFormat.java -text +ems-map/src/main/java/it/integry/ems/map/model/EastNorthCoordinate.java -text +ems-map/src/main/java/it/integry/ems/map/model/Layer.java -text +ems-map/src/main/java/it/integry/ems/map/model/Map.java -text +ems-map/src/main/java/it/integry/ems/map/model/MapPolygon.java -text +ems-map/src/main/java/it/integry/ems/map/model/MapSelection.java -text +ems-map/src/main/java/it/integry/ems/map/model/MapSourceLoaderInfo.java -text +ems-map/src/main/java/it/integry/ems/map/model/MercatorPixelCoordinate.java -text +ems-map/src/main/java/it/integry/ems/map/model/TileImageFormat.java -text +ems-map/src/main/java/it/integry/ems/map/model/TileImageParameters.java -text +ems-map/src/main/java/it/integry/ems/map/model/TileImageType.java -text +ems-map/src/main/java/it/integry/ems/map/openstreetmap/AbstractOsmMapSource.java -text +ems-map/src/main/java/it/integry/ems/map/openstreetmap/CloudMade.java -text +ems-map/src/main/java/it/integry/ems/map/openstreetmap/MapQuest.java -text +ems-map/src/main/java/it/integry/ems/map/openstreetmap/Mapnik.java -text +ems-map/src/main/java/it/integry/ems/map/openstreetmap/OsmPublicTransport.java -text +ems-map/src/main/java/it/integry/ems/map/output/DownloadedTileProvider.java -text +ems-map/src/main/java/it/integry/ems/map/output/OSMTracker.java -text +ems-map/src/main/java/it/integry/ems/map/output/TileDownLoader.java -text +ems-map/src/main/java/it/integry/ems/map/properties/MapProperties.java -text +ems-map/src/main/java/it/integry/ems/map/response/MapPngResponse.java -text +ems-map/src/main/java/it/integry/ems/map/service/MapServiceGenerator.java -text +ems-map/src/main/java/it/integry/ems/map/stream/ArrayOutputStream.java -text +ems-map/src/main/java/it/integry/ems/map/stream/CountingOutputStream.java -text +ems-map/src/main/java/it/integry/ems/map/stream/LittleEndianOutputStream.java -text +ems-map/src/main/java/it/integry/ems/map/stream/RandomAccessFileOutputStream.java -text +ems-map/src/main/java/it/integry/ems/map/stream/ThrottleSupport.java -text +ems-map/src/main/java/it/integry/ems/map/stream/ThrottledInputStream.java -text +ems-map/src/main/java/it/integry/ems/map/stream/ZipStoreOutputStream.java -text +ems-map/src/main/java/it/integry/ems/map/tar/TarArchive.java -text +ems-map/src/main/java/it/integry/ems/map/tar/TarHeader.java -text +ems-map/src/main/java/it/integry/ems/map/tar/TarIndex.java -text +ems-map/src/main/java/it/integry/ems/map/tar/TarIndexTable.java -text +ems-map/src/main/java/it/integry/ems/map/tar/TarIndexedArchive.java -text +ems-map/src/main/java/it/integry/ems/map/tar/TarRecord.java -text +ems-map/src/main/java/it/integry/ems/map/tar/TarTmiArchive.java -text +ems-map/src/main/java/it/integry/ems/map/utils/DeleteFileFilter.java -text +ems-map/src/main/java/it/integry/ems/map/utils/DirInfoFileFilter.java -text +ems-map/src/main/java/it/integry/ems/map/utils/DirectoryFileFilter.java -text +ems-map/src/main/java/it/integry/ems/map/utils/FileExtFilter.java -text +ems-map/src/main/java/it/integry/ems/map/utils/ImageUtils.java -text +ems-map/src/main/java/it/integry/ems/map/utils/MyMath.java -text +ems-map/src/main/java/it/integry/ems/map/writer/MapTileBuilder.java -text +ems-map/src/main/java/it/integry/ems/map/writer/MapTileWriter.java -text +ems-map/src/main/java/it/integry/ems/map/writer/NullPrintWriter.java -text +ems-map/src/main/java/it/integry/ems/map/writer/NullWriter.java -text +ems-map/src/main/java/it/integry/ems/map/writer/image/ImageWriterWarningListener.java -text +ems-map/src/main/java/it/integry/ems/map/writer/image/TileImageJpegDataWriter.java -text +ems-map/src/main/java/it/integry/ems/map/writer/image/TileImagePng4DataWriter.java -text +ems-map/src/main/java/it/integry/ems/map/writer/image/TileImagePng8DataWriter.java -text +ems-map/src/main/java/it/integry/ems/map/writer/image/TileImagePngDataWriter.java -text +ems-map/src/main/resources/atlas/atlas.properties -text +ems-map/src/main/resources/cert/MapPack.cer -text +ems-map/src/main/resources/mapsources/Google.xml -text +ems-map/src/main/resources/mapsources/google-hybrid.xml -text +ems-map/src/main/resources/mapsources/google-map.xml -text +ems-map/src/main/resources/mapsources/mp-openstreetmap.jar -text +ems-map/src/main/resources/mapsources/mp-region_america_north.jar -text +ems-map/src/main/resources/mapsources/mp-region_europe_east.jar -text +ems-map/src/main/resources/mapsources/mp-region_oceania.jar -text +ems-map/src/main/resources/mapsources/puglia.xml -text +ems-map/src/main/resources/mapsources/ulivi.xml -text +ems-map/src/main/resources/tilestore/tilestore.properties -text +ems-model/.classpath -text +ems-model/.project -text +ems-model/.settings/org.eclipse.core.resources.prefs -text +ems-model/.settings/org.eclipse.jdt.core.prefs -text +ems-model/.settings/org.eclipse.m2e.core.prefs -text +ems-model/.settings/org.eclipse.wst.common.component -text +ems-model/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-model/.settings/org.eclipse.wst.validation.prefs -text +ems-model/pom.xml -text +ems-model/src/main/java/it/integry/common/var/CommonConstants.java -text +ems-model/src/main/java/it/integry/ems/annotation/Blob.java -text +ems-model/src/main/java/it/integry/ems/annotation/Clob.java -text +ems-model/src/main/java/it/integry/ems/annotation/EntityChild.java -text +ems-model/src/main/java/it/integry/ems/annotation/FireRecalc.java -text +ems-model/src/main/java/it/integry/ems/annotation/ImportFromParent.java -text +ems-model/src/main/java/it/integry/ems/annotation/MapToTable.java -text +ems-model/src/main/java/it/integry/ems/annotation/Master.java -text +ems-model/src/main/java/it/integry/ems/annotation/PK.java -text +ems-model/src/main/java/it/integry/ems/annotation/Priority.java -text +ems-model/src/main/java/it/integry/ems/annotation/SqlDetailId.java -text +ems-model/src/main/java/it/integry/ems/annotation/SqlField.java -text +ems-model/src/main/java/it/integry/ems/annotation/Table.java -text +ems-model/src/main/java/it/integry/ems/base/ComposedEntityBase.java -text +ems-model/src/main/java/it/integry/ems/base/ComposedEntityInterface.java -text +ems-model/src/main/java/it/integry/ems/base/EntityBase.java -text +ems-model/src/main/java/it/integry/ems/base/EntityInterface.java -text +ems-model/src/main/java/it/integry/ems/base/EntityNotFound.java -text +ems-model/src/main/java/it/integry/ems/base/EntityPropertyHolder.java -text +ems-model/src/main/java/it/integry/ems/business_logic/AccountingBusinessLogic.java -text +ems-model/src/main/java/it/integry/ems/business_logic/ProductionBusinessLogic.java -text +ems-model/src/main/java/it/integry/ems/business_logic/dto/CommessaDTO.java -text +ems-model/src/main/java/it/integry/ems/business_logic/dto/ExplodeDistDTO.java -text +ems-model/src/main/java/it/integry/ems/config/EmsRestConstants.java -text +ems-model/src/main/java/it/integry/ems/db/EntityToDatabaseMapper.java -text +ems-model/src/main/java/it/integry/ems/db/ResultSetMapper.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbFabr.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbFabrDt.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbForn.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbGriglie.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbGriglieArt.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbList.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbListData.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbListLogImport.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbPromoDepo.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbProvenienza.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbSchedaAccr.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbSchedaAcct.java -text +ems-model/src/main/java/it/integry/ems/entity/AtbTipi.java -text +ems-model/src/main/java/it/integry/ems/entity/Azienda.java -text +ems-model/src/main/java/it/integry/ems/entity/CrlMovAttached.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbAgbe.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbAnag.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbBeni.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbBiva.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbCatbeni.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbCatg.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbCaur.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbCaus.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbCausRit.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbCont.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbContFasi.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbFondi.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbGrup.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbIliq.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbInum.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbIreg.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbMast.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbMovi.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbMovr.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbMovrCoan.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbMovt.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbNcIntracee.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbParr.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbPart.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbSana.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbScad.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbSctg.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbSolr.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbSolt.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbTipoAzienda.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbTipoRiep.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbTitoli.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbTitoliDt.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbVarbeni.java -text +ems-model/src/main/java/it/integry/ems/entity/CtbVarbeniRival.java -text +ems-model/src/main/java/it/integry/ems/entity/DrlDocAttached.java -text +ems-model/src/main/java/it/integry/ems/entity/DrlOrdAttached.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbDocColli.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbDocr.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbDocs.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbDoct.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbGrupArt.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbInum.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbOann.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbOrdCq.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbOrdCqr.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbOrdL.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbOrdSteps.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbOrdr.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbOrds.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbOrdt.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbTipi.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbTipiAnag.java -text +ems-model/src/main/java/it/integry/ems/entity/DtbTransazIntracee.java -text +ems-model/src/main/java/it/integry/ems/entity/GrlPasp.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbAliq.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbAnag.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbAnagNote.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbBanc.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbBancAzi.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbBancAziEff.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbDivi.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbDiviCambi.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbDiviIso.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbLingue.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbMezzo.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbModIva.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbNazi.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbPaga.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbPorto.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbSpes.java -text +ems-model/src/main/java/it/integry/ems/entity/GtbTipiPaga.java -text +ems-model/src/main/java/it/integry/ems/entity/JrlCiclDisegni.java -text +ems-model/src/main/java/it/integry/ems/entity/JrlDisOrd.java -text +ems-model/src/main/java/it/integry/ems/entity/JrlFasiActivityType.java -text +ems-model/src/main/java/it/integry/ems/entity/JrlMansioneReparto.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbBdgHr.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbBdgHrDet.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbCalendt.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbCausEventi.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbCicl.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbCiclCq.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbComBdg.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbComCostoStd.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbComImporti.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbComStato.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbComTipo.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbComt.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbDistClavDir.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbDistClavDirDett.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbDistClavInd.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbDistMate.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbFasi.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbFasiAtt.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbFasiCosti.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbFasiImpMesi.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbFlav.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbFlavEventi.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbGiustifica.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbGiustificaRow.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbLotr.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbLott.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbMansioni.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbOffr.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbOfft.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbRLavr.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbRLavt.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbSchedaCq.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbSchedaCqr.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbSforn.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbSlist.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbSlistProd.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbStrCosti.java -text +ems-model/src/main/java/it/integry/ems/entity/JtbStrCostir.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAart.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartAnag.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartAss.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartBarCode.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartCarat.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartDesc.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartEqui.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartLink.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartMarchio.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartParam.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbAartSpec.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbColr.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbColt.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbComp.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbConf.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbDepo.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbDepoArt.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbDepoCasse.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbDepoIntercode.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbDepoMarcatempo.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbDepoOper.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbDepoPosizioni.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbDepoTipi.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbEcrCateg.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbEcrMcateg.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbEcrReparti.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbEcrStipo.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbEcrTipo.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbGrup.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbGrupCosti.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbGrupSgrpAss.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbInvenr.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbInvent.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbLisa.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbLisaData.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbLisaPromo.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbLisvData.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbLisvDataSpese.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbPart.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbPartDt.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbPartitaMag.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbSfam.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbSgrp.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbSpes.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbStip.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbTcol.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbTipi.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbTipiCarat.java -text +ems-model/src/main/java/it/integry/ems/entity/MtbUntMis.java -text +ems-model/src/main/java/it/integry/ems/entity/NtbDocp.java -text +ems-model/src/main/java/it/integry/ems/entity/NtbDocr.java -text +ems-model/src/main/java/it/integry/ems/entity/NtbDoct.java -text +ems-model/src/main/java/it/integry/ems/entity/NtbTipiInca.java -text +ems-model/src/main/java/it/integry/ems/entity/PtbFonti.java -text +ems-model/src/main/java/it/integry/ems/entity/PtbPrevr.java -text +ems-model/src/main/java/it/integry/ems/entity/PtbPrevt.java -text +ems-model/src/main/java/it/integry/ems/entity/SrlActivityTypeUser.java -text +ems-model/src/main/java/it/integry/ems/entity/SrlUser.java -text +ems-model/src/main/java/it/integry/ems/entity/StbAbil.java -text +ems-model/src/main/java/it/integry/ems/entity/StbActivity.java -text +ems-model/src/main/java/it/integry/ems/entity/StbActivityCosts.java -text +ems-model/src/main/java/it/integry/ems/entity/StbActivityFile.java -text +ems-model/src/main/java/it/integry/ems/entity/StbActivityFileModels.java -text +ems-model/src/main/java/it/integry/ems/entity/StbActivityNotification.java -text +ems-model/src/main/java/it/integry/ems/entity/StbActivityResulr.java -text +ems-model/src/main/java/it/integry/ems/entity/StbActivityResult.java -text +ems-model/src/main/java/it/integry/ems/entity/StbActivityType.java -text +ems-model/src/main/java/it/integry/ems/entity/StbActivityTyper.java -text +ems-model/src/main/java/it/integry/ems/entity/StbEditLimit.java -text +ems-model/src/main/java/it/integry/ems/entity/StbEmail.java -text +ems-model/src/main/java/it/integry/ems/entity/StbEmailRecovery.java -text +ems-model/src/main/java/it/integry/ems/entity/StbFilesAttached.java -text +ems-model/src/main/java/it/integry/ems/entity/StbFilterDf.java -text +ems-model/src/main/java/it/integry/ems/entity/StbGestDf.java -text +ems-model/src/main/java/it/integry/ems/entity/StbGestSetup.java -text +ems-model/src/main/java/it/integry/ems/entity/StbLookupLimit.java -text +ems-model/src/main/java/it/integry/ems/entity/StbObjectCustom.java -text +ems-model/src/main/java/it/integry/ems/entity/StbTipiIndirizzi.java -text +ems-model/src/main/java/it/integry/ems/entity/StbUser.java -text +ems-model/src/main/java/it/integry/ems/entity/TtbAnnoStag.java -text +ems-model/src/main/java/it/integry/ems/entity/TtbCart.java -text +ems-model/src/main/java/it/integry/ems/entity/TtbCtcl.java -text +ems-model/src/main/java/it/integry/ems/entity/TtbLisvTaglieData.java -text +ems-model/src/main/java/it/integry/ems/entity/TtbStyleBoxr.java -text +ems-model/src/main/java/it/integry/ems/entity/TtbStyleBoxt.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAgen.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAgenProv.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAgenRigheFat.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAgenTipo.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAmac.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAmacComp.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbArti.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbArtiAcc.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbArtiDesc.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbArtiVaria.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAss.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAtt.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAuto.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAutoKm.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbAutoScad.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbCdist.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbClie.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbCliePersRif.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbCompensiTdr.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbCompensiTdt.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbConcorrenti.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbDest.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbDestIntercode.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbDistIncar.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbDistIncat.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbFidelity.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbFidelityAnag.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbFidelityArticoli.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbGriglia.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbGrigliaArt.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbGrpAcq.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbIspe.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbList.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbListData.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbListPremi.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbMzon.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbPremiArtr.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbPremiArtt.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbPromo.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbRicarSugg.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbRicariche.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbRilPrzr.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbRilPrzt.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbScar.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbSccl.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbScon.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbSconFasce.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbSegm.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbSett.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbTipi.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbTipiNegozio.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbTipoBlocCons.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbTipoFido.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbVetr.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbVett.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbVettZone.java -text +ems-model/src/main/java/it/integry/ems/entity/VtbZone.java -text +ems-model/src/main/java/it/integry/ems/entity/WdtbDocr.java -text +ems-model/src/main/java/it/integry/ems/entity/WdtbDoct.java -text +ems-model/src/main/java/it/integry/ems/entity/WdtbNewCliOrd.java -text +ems-model/src/main/java/it/integry/ems/entity/WdtbOrdr.java -text +ems-model/src/main/java/it/integry/ems/entity/WdtbOrdt.java -text +ems-model/src/main/java/it/integry/ems/exception/NoDataXmlException.java -text +ems-model/src/main/java/it/integry/ems/resolver/CustomPropertyTypeDeserializer.java -text +ems-model/src/main/java/it/integry/ems/resolver/EntitySubTypeHolder.java -text +ems-model/src/main/java/it/integry/ems/resolver/PropertyTypeResolver.java -text +ems-model/src/main/java/it/integry/ems/resolver/ResultSetSerializer.java -text +ems-model/src/main/java/it/integry/ems/resolver/SqlFieldHolder.java -text +ems-model/src/main/java/it/integry/ems/rules/completing/DocumentExtEntityRules.java -text +ems-model/src/main/java/it/integry/ems/rules/util/DroolsUtil.java -text +ems-model/src/main/java/it/integry/ems/rulescompleting/AgendaList.java -text +ems-model/src/main/java/it/integry/ems/rulescompleting/DroolsDataCompleting.java -text +ems-model/src/main/java/it/integry/ems/service/SetupGest.java -text +ems-model/src/main/java/it/integry/ems/types/ApplicationName.java -text +ems-model/src/main/java/it/integry/ems/types/OperationType.java -text +ems-model/src/main/java/it/integry/ems/types/TypeDbObject.java -text +ems-model/src/main/java/it/integry/ems/utility/Base64Utility.java -text +ems-model/src/main/java/it/integry/ems/utility/DatiFiltroDTO.java -text +ems-model/src/main/java/it/integry/ems/utility/FiltroPicking.java -text +ems-model/src/main/java/it/integry/ems/utility/OrderByFieldEntityBase.java -text +ems-model/src/main/java/it/integry/ems/utility/OrderCodAliq.java -text +ems-model/src/main/java/it/integry/ems/utility/UtilityBarcode.java -text +ems-model/src/main/java/it/integry/ems/utility/UtilityBarcode2.java -text +ems-model/src/main/java/it/integry/ems/utility/UtilityDB.java -text +ems-model/src/main/java/it/integry/ems/utility/UtilityDate.java -text +ems-model/src/main/java/it/integry/ems/utility/UtilityString.java -text +ems-model/src/main/java/it/integry/ems/utility/UtilityXML.java -text +ems-model/src/main/java/it/integry/ems/utility/UtilityZip.java -text +ems-order/.classpath -text +ems-order/.project -text +ems-order/.settings/org.eclipse.core.resources.prefs -text +ems-order/.settings/org.eclipse.jdt.core.prefs -text +ems-order/.settings/org.eclipse.m2e.core.prefs -text +ems-order/.settings/org.eclipse.wst.common.component -text +ems-order/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-order/.settings/org.eclipse.wst.validation.prefs -text +ems-order/pom.xml -text +ems-order/src/main/java/it/integry/ems/amazon/controller/AmazonOrderImportController.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AddressType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AddressTypeSupportNonCity.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AdjustmentBuyerPrice.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AdjustmentCurrencyAmount.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AdjustmentDirectPaymentType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AgeRecommendation.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AgeRecommendedDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AgeRecommendedUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AirFlowDisplacementDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AirFlowDisplacementUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AlcoholContentDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AlcoholContentUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AllergenInformationType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AmazonEnvelope.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AmazonFees.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AmazonMaturityRatingType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AmperageDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AmperageUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AntennaTypeValues.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ApertureDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ApertureUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AreaDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AreaDimensionOptionalUnit.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AreaUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AssemblyTimeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/AssemblyTimeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BaseCurrencyCode.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BaseCurrencyCodeWithDefault.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Battery.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BatteryAverageLifeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BatteryCellTypeValues.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BatteryLifeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BatteryPowerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BatteryPowerIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BatteryPowerUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BluRayRegionType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BootSizeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BootSizeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BurnTimeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BurnTimeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/BuyerPrice.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CapacityUnit.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CapacityUnitMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CarSeatWeightGroupEUType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CharacterDataType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Clothing.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ClothingSizeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ClothingSizeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ColorSpecification.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ComputerPlatform.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ComputerPlatformValues.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ConditionInfo.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ContinuousShootingDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ContinuousShootingUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CurencyDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CurrencyAmount.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CurrencyAmountWithDefault.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CurrentDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CurrentUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Customer.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CustomerReturnPolicyType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CustomizationInfoType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CycleLengthDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/CycleLengthUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DataTransferUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DateIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DateUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DatedCompareAtPrice.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DatedPrice.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DegreeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DegreeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DensityDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DensityUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Dimensions.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DirectPaymentType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DistributionDesignationValues.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/DockingStationExternalInterfaceTypeValues.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/EmailAddressType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/EnergyConsumptionDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/EnergyConsumptionUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/EnergyLabelEfficiencyClass.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/EnergyRatingType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/EnergyUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ForceDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ForceUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ForwardFacingWeight.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/FrequencyDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/FrequencyIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/FrequencyUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/FulfillReadiness.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/GiftCardsFormatType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/GlobalCurrencyCode.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/GraduationInterval.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/HardDriveInterfaceTypeValues.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/HardnessDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/HardnessUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/HazmatItemType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Header.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/HeightRecommendation.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/HumanInterfaceInputType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/HumanInterfaceOutputType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/IdentityPackageType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Inventory.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/JewelryLengthDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/JewelryLengthUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/JewelryWeightDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/JewelryWeightUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LanguageSWVG.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LanguageStringType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LengthDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LengthDimensionOptionalUnit.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LengthIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LengthUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LithiumBatteryPackagingType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LoyaltyCustomAttribute.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LuminanceDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LuminanceIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LuminancePositiveIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LuminanceUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LuminiousIntensityDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/LuminousIntensityUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/MagnificationDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/MagnificationUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/MemorySizeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/MemorySizeIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/MemorySizeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/MillimeterDecimalDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/MillimeterUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/MinimumAgeRecommendedDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ModemTypeValues.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/MusicFormatType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/NameValuePair.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/NeckSizeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/NeckSizeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/NoiseLevelDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/NoiseLevelUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ObjectFactory.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OpticalPowerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OpticalPowerUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OptionalLengthIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OptionalMagnificationDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OptionalResolutionDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OrderAcknowledgement.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OrderAdjustment.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OrderFulfillment.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OrderTrackingDTO.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Originality.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Override.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OverrideCurrencyAmount.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/OverrideCurrencyAmountWithTax.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PhoneNumberType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PixelDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PixelUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PositiveCurrencyAmount.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PositiveNonZeroWeightDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PositiveWeightDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PowerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PowerPlugType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PowerUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PressureDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PressureUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Price.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Product.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ProductDTO.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ProductImage.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PromotionApplicationType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/PromotionDataType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/QuantityPriceTypes.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/RearFacingWeight.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/RebateType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Recall.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/RelatedProductID.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Relationship.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ResistanceDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ResistanceUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ResolutionDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ResolutionUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/SerialNumberFormatType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ShoeSafetyCodeIso20345Type.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/Shoes.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ShoulderHarnessHeight.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/SpatialDimensions.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/SpeedDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/SpeedUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/StandardProductID.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/StoneCreationMethod.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/StringCurrencyAmountWithDefault.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/StringLengthDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/StringLengthOptionalDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/StringOverrideCurrencyAmount.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/StringTemperatureDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/StringTimeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/SubscriptionTermDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/SunProtectionDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/SunProtectionUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/SweetnessAtHarvestDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/SweetnessAtHarvestUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TargetGenderType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TemperatureDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TemperatureRatingDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TemperatureRatingUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TemperatureUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TestOrderRequest.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ThreeDTechnologyValues.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TimeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TimeIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TimeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TorqueType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/TorqueUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ToyAwardType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ToysBaby.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VineyardYieldDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VineyardYieldUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VoltageDecimalDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VoltageIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VoltageIntegerDimensionOptionalUnit.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VoltageUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VolumeAndVolumeRateDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VolumeDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VolumeIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VolumeRateDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VolumeRateUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/VolumeUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WaterResistantType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WattageDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WattageDimensionOptionalUnit.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WattageIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WattageUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WeightDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WeightIntegerDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WeightRecommendation.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WeightRecommendationType.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/WeightUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ZoomDimension.java -text +ems-order/src/main/java/it/integry/ems/amazon/dto/ZoomUnitOfMeasure.java -text +ems-order/src/main/java/it/integry/ems/amazon/job/CheckFeedStatus.java -text +ems-order/src/main/java/it/integry/ems/amazon/job/CheckOrderListJob.java -text +ems-order/src/main/java/it/integry/ems/amazon/job/UpdateGiacenzaFeedJob.java -text +ems-order/src/main/java/it/integry/ems/amazon/service/AmazonAPIService.java -text +ems-order/src/main/java/it/integry/ems/amazon/service/MarketplaceFactory.java -text +ems-order/src/main/java/it/integry/ems/amazon/service/OrderImportFromAmazon.java -text +ems-order/src/main/java/it/integry/ems/brt/tracking/MailReaderBrt.java -text +ems-order/src/main/java/it/integry/ems/conquist/controller/ConquistEcommerceController.java -text +ems-order/src/main/java/it/integry/ems/conquist/dto/ClienteDTO.java -text +ems-order/src/main/java/it/integry/ems/conquist/dto/OrdineDTO.java -text +ems-order/src/main/java/it/integry/ems/conquist/dto/ProdottoDTO.java -text +ems-order/src/main/java/it/integry/ems/conquist/dto/TrackingDTO.java -text +ems-order/src/main/java/it/integry/ems/conquist/job/ConquistBollaProntaJob.java -text +ems-order/src/main/java/it/integry/ems/conquist/job/ConquistExportJob.java -text +ems-order/src/main/java/it/integry/ems/conquist/job/ConquistImportJob.java -text +ems-order/src/main/java/it/integry/ems/conquist/service/ConquistEcommerceService.java -text +ems-order/src/main/java/it/integry/ems/order/controller/OrderController.java -text +ems-order/src/main/java/it/integry/ems/order/dto/AnagEcommerceJsonDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/AnagraficaDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/GiacenzaEcommerceDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/HeaderOrderDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/InvoiceDataDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/NotDisponibileDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/OrderEcommerceDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/OrderEcommerceJsonDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/RowOrderDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/RowOrderEcommerceDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/ShippingAddressDTO.java -text +ems-order/src/main/java/it/integry/ems/order/dto/StampaOrdiniWeb.java -text +ems-order/src/main/java/it/integry/ems/order/importaz/job/ImportOrderShJob.java -text +ems-order/src/main/java/it/integry/ems/order/importaz/service/OrderImportService.java -text +ems-order/src/main/java/it/integry/ems/order/service/OrderPrinterService.java -text +ems-order/src/main/java/it/integry/ems/order/type/OrderImportFormat.java -text +ems-order/src/main/java/it/integry/ems/ordikids/dto/request/OrdiKids.java -text +ems-order/src/main/java/it/integry/ems/ordikids/dto/request/OrdiKidsHeader.java -text +ems-order/src/main/java/it/integry/ems/ordikids/dto/request/OrdiKidsNewClie.java -text +ems-order/src/main/java/it/integry/ems/ordikids/dto/request/OrdiKidsNewDest.java -text +ems-order/src/main/java/it/integry/ems/ordikids/dto/request/OrdiKidsRow.java -text +ems-order/src/main/java/it/integry/ems/ordikids/dto/response/OrdikidsResponse.java -text +ems-order/src/main/java/it/integry/ems/ordikids/dto/response/OrdikidsReturnInfo.java -text +ems-order/src/main/java/it/integry/ems/ordikids/dto/response/OrdikidsReturnNoArtDisp.java -text +ems-order/src/main/java/it/integry/ems/ordikids/dto/response/OrdikidsReturnOffLine.java -text +ems-order/src/main/java/it/integry/ems/socialware/controller/SocialWareEcommerceController.java -text +ems-order/src/main/java/it/integry/ems/socialware/dto/ProductDTOSW.java -text +ems-order/src/main/java/it/integry/ems/socialware/dto/ProductDescriptionDTOSW.java -text +ems-order/src/main/java/it/integry/ems/socialware/dto/SocialwareResponse.java -text +ems-order/src/main/java/it/integry/ems/socialware/dto/TrackingDTOSW.java -text +ems-order/src/main/java/it/integry/ems/socialware/job/ExportProductSWJob.java -text +ems-order/src/main/java/it/integry/ems/socialware/service/SocialWareEcommerceService.java -text +ems-order/src/main/resources/amazon/xsd/Inventory.xsd -text +ems-order/src/main/resources/amazon/xsd/OrderAcknowledgement.xsd -text +ems-order/src/main/resources/amazon/xsd/OrderAdjustment.xsd -text +ems-order/src/main/resources/amazon/xsd/OrderFulfillment.xsd -text +ems-order/src/main/resources/amazon/xsd/Override.xsd -text +ems-order/src/main/resources/amazon/xsd/Price.xsd -text +ems-order/src/main/resources/amazon/xsd/Product.xsd -text +ems-order/src/main/resources/amazon/xsd/ProductClothing.xsd -text +ems-order/src/main/resources/amazon/xsd/ProductImage.xsd -text +ems-order/src/main/resources/amazon/xsd/Relationship.xsd -text +ems-order/src/main/resources/amazon/xsd/Shoes.xsd -text +ems-order/src/main/resources/amazon/xsd/TestOrderRequest.xsd -text +ems-order/src/main/resources/amazon/xsd/ToysBaby.xsd -text +ems-order/src/main/resources/amazon/xsd/amzn-base.xsd -text +ems-order/src/main/resources/amazon/xsd/amzn-envelope.xsd -text +ems-order/src/main/resources/amazon/xsd/amzn-header.xsd -text +ems-order/src/main/resources/amazon/xsd/binding.jxb -text +ems-order/src/main/resources/spring/order-spring-config.xml -text +ems-ordikids/.classpath -text +ems-ordikids/.project -text +ems-ordikids/.settings/org.eclipse.core.resources.prefs -text +ems-ordikids/.settings/org.eclipse.jdt.core.prefs -text +ems-ordikids/.settings/org.eclipse.m2e.core.prefs -text +ems-ordikids/.settings/org.eclipse.wst.common.component -text +ems-ordikids/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-ordikids/.settings/org.eclipse.wst.validation.prefs -text +ems-ordikids/pom.xml -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/config/OrdikidsRestConstants.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/controller/OrdikidsController.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/AnagraficaDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/ArticoliDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/ArticoliUnificatoDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/AssortimentoDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/AssortimentoDettDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/CategorieClienteDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/CodBarreDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/ColoriDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/DestinatariDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/DisponibileDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/ElencoListiniDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/ForceupdateDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/ListiniDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/ListiniTaglieDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/LoginAziendaDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/LoginDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/NazioniDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/PagamentiDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/StatoAnagraficaDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/TaglieDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/UtenteDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/VtbListDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/dto/VtbSconDTO.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/prop/OrdikidsProperties.java -text +ems-ordikids/src/main/java/it/integry/ems/ordikids/service/OrdikidsService.java -text +ems-product/.classpath -text +ems-product/.project -text +ems-product/.settings/org.eclipse.core.resources.prefs -text +ems-product/.settings/org.eclipse.jdt.core.prefs -text +ems-product/.settings/org.eclipse.m2e.core.prefs -text +ems-product/.settings/org.eclipse.wst.common.component -text +ems-product/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-product/.settings/org.eclipse.wst.validation.prefs -text +ems-product/pom.xml -text +ems-product/src/main/java/it/integry/ems/product/controller/ProductController.java -text +ems-product/src/main/java/it/integry/ems/product/importaz/service/ImportAnagListiniService.java -text +ems-product/src/main/java/it/integry/ems/product/importaz/service/ImportEcediService.java -text +ems-product/src/main/java/it/integry/ems/product/importaz/service/ImportListiniAcquistoService.java -text +ems-product/src/main/java/it/integry/ems/product/importaz/service/ImportListiniVenditaService.java -text +ems-product/src/main/java/it/integry/ems/product/importaz/service/ProductServices.java -text +/ems-retail svn_global_002dignores=target%0A +ems-retail/.classpath -text +ems-retail/.project -text +ems-retail/.settings/org.eclipse.core.resources.prefs -text +ems-retail/.settings/org.eclipse.jdt.core.prefs -text +ems-retail/.settings/org.eclipse.m2e.core.prefs -text +ems-retail/.settings/org.eclipse.wst.common.component -text +ems-retail/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-retail/.settings/org.eclipse.wst.validation.prefs -text +ems-retail/pom.xml -text +ems-retail/src/main/java/it/integry/ems/retail/controller/PvmController.java -text +ems-retail/src/main/java/it/integry/ems/retail/controller/RetailController.java -text +ems-retail/src/main/java/it/integry/ems/retail/export/controller/RetailExportController.java -text +ems-retail/src/main/java/it/integry/ems/retail/importaz/services/IReceiptsParser.java -text +ems-retail/src/main/java/it/integry/ems/retail/importaz/services/ReceiptsDialog.java -text +ems-retail/src/main/java/it/integry/ems/retail/importaz/services/ReceiptsDialogTab.java -text +ems-retail/src/main/java/it/integry/ems/retail/importaz/services/ReceiptsFrontSt.java -text +ems-retail/src/main/java/it/integry/ems/retail/importaz/services/ReceiptsParser.java -text +ems-retail/src/main/java/it/integry/ems/retail/importaz/services/ReceiptsSelfService.java -text +ems-retail/src/main/java/it/integry/ems/retail/importer/controller/RetailImportController.java -text +ems-retail/src/main/java/it/integry/ems/retail/job/ReceiptsJob.java -text +ems-retail/src/main/java/it/integry/ems/retail/job/ReceiptsJobOneHour.java -text +ems-retail/src/main/java/it/integry/ems/retail/listener/ReceiptsFileListenerSimple.java -text +ems-retail/src/main/java/it/integry/ems/retail/pvm/dto/InvestimentoDTO.java -text +ems-retail/src/main/java/it/integry/ems/retail/service/PvmService.java -text +ems-retail/src/main/resources/spring/retail-spring-config.xml -text +ems-retail/src/test/java/receipts_delete_all.json -text +ems-retail/src/test/java/receipts_insert.json -text +ems-retail/src/test/java/receipts_insert_complete.json -text +ems-system/.classpath -text +ems-system/.project -text +ems-system/.settings/org.eclipse.core.resources.prefs -text +ems-system/.settings/org.eclipse.jdt.core.prefs -text +ems-system/.settings/org.eclipse.m2e.core.prefs -text +ems-system/.settings/org.eclipse.wst.common.component -text +ems-system/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-system/.settings/org.eclipse.wst.validation.prefs -text +ems-system/pom.xml -text +ems-system/src/main/java/it/integry/ems/system/controller/SystemController.java -text +ems-system/src/main/java/it/integry/ems/system/dto/TreeDTO.java -text +ems-system/src/main/java/it/integry/ems/system/job/RecoveryMailJob.java -text +ems-system/src/main/java/it/integry/ems/system/service/SystemService.java -text +ems-utility/.classpath -text +ems-utility/.project -text +ems-utility/.settings/org.eclipse.core.resources.prefs -text +ems-utility/.settings/org.eclipse.jdt.core.prefs -text +ems-utility/.settings/org.eclipse.m2e.core.prefs -text +ems-utility/.settings/org.eclipse.wst.common.component -text +ems-utility/.settings/org.eclipse.wst.common.project.facet.core.xml -text +ems-utility/.settings/org.eclipse.wst.validation.prefs -text +ems-utility/pom.xml -text +ems-utility/src/main/java/it/integry/ems/utility/controller/UtilityController.java -text +ems-utility/src/main/java/it/integry/ems/utility/dto/PdfDTO.java -text +ems-utility/src/main/java/it/integry/ems/utility/service/UtilityService.java -text +/pom.xml -text +sql/rilascio_frontst.sql -text +sql/rilascio_scontrini_2015_05_05.sql -text +sql/script.sql -text +/template[!!-~]doc.doc -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..750fadb4ca --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +ems-common/target +ems-contabil/target +ems-core/target +ems-document/target +ems-engine/.settings/*.prefs +ems-engine/target +ems-logistic/target +ems-map/target +ems-model/target +ems-order/target +ems-ordikids/target +ems-product/target +ems-retail/target +ems-system/target +ems-utility/target +/out diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000000..14a9d2777d --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +ims \ No newline at end of file diff --git a/.idea/artifacts/ems_engine_war.xml b/.idea/artifacts/ems_engine_war.xml new file mode 100644 index 0000000000..a80f3b1b86 --- /dev/null +++ b/.idea/artifacts/ems_engine_war.xml @@ -0,0 +1,8 @@ + + + $PROJECT_DIR$/ems-engine/target + + + + + \ No newline at end of file diff --git a/.idea/artifacts/ems_engine_war_exploded.xml b/.idea/artifacts/ems_engine_war_exploded.xml new file mode 100644 index 0000000000..58fb1a99ec --- /dev/null +++ b/.idea/artifacts/ems_engine_war_exploded.xml @@ -0,0 +1,137 @@ + + + $PROJECT_DIR$/ems-engine/target/ems-engine-1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000000..34344f11ac --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000000..3fe17567c2 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml b/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml new file mode 100644 index 0000000000..30ff5cb791 --- /dev/null +++ b/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__avalon_framework_avalon_framework_impl_4_2_0.xml b/.idea/libraries/Maven__avalon_framework_avalon_framework_impl_4_2_0.xml new file mode 100644 index 0000000000..182cba2b7c --- /dev/null +++ b/.idea/libraries/Maven__avalon_framework_avalon_framework_impl_4_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__bouncycastle_bcmail_jdk14_138.xml b/.idea/libraries/Maven__bouncycastle_bcmail_jdk14_138.xml new file mode 100644 index 0000000000..0c65f5df27 --- /dev/null +++ b/.idea/libraries/Maven__bouncycastle_bcmail_jdk14_138.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__bouncycastle_bcprov_jdk14_138.xml b/.idea/libraries/Maven__bouncycastle_bcprov_jdk14_138.xml new file mode 100644 index 0000000000..5197ed3efc --- /dev/null +++ b/.idea/libraries/Maven__bouncycastle_bcprov_jdk14_138.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__c3p0_c3p0_0_9_1_1.xml b/.idea/libraries/Maven__c3p0_c3p0_0_9_1_1.xml new file mode 100644 index 0000000000..dde215b5e4 --- /dev/null +++ b/.idea/libraries/Maven__c3p0_c3p0_0_9_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_amazonservices_mws_MWSClientJavaRuntime_1_0.xml b/.idea/libraries/Maven__com_amazonservices_mws_MWSClientJavaRuntime_1_0.xml new file mode 100644 index 0000000000..16f1e42cc5 --- /dev/null +++ b/.idea/libraries/Maven__com_amazonservices_mws_MWSClientJavaRuntime_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_amazonservices_mws_MWSOrders_2013_09_01_2015_04_30.xml b/.idea/libraries/Maven__com_amazonservices_mws_MWSOrders_2013_09_01_2015_04_30.xml new file mode 100644 index 0000000000..2c6061c70a --- /dev/null +++ b/.idea/libraries/Maven__com_amazonservices_mws_MWSOrders_2013_09_01_2015_04_30.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_amazonservices_mws_MaWSJavaClientLibrary_1_1.xml b/.idea/libraries/Maven__com_amazonservices_mws_MaWSJavaClientLibrary_1_1.xml new file mode 100644 index 0000000000..30c147b2c5 --- /dev/null +++ b/.idea/libraries/Maven__com_amazonservices_mws_MaWSJavaClientLibrary_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_ancientprogramming_fixedformat4j_fixedformat4j_1_4_0_SNAPSHOT.xml b/.idea/libraries/Maven__com_ancientprogramming_fixedformat4j_fixedformat4j_1_4_0_SNAPSHOT.xml new file mode 100644 index 0000000000..618bac7302 --- /dev/null +++ b/.idea/libraries/Maven__com_ancientprogramming_fixedformat4j_fixedformat4j_1_4_0_SNAPSHOT.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_6_0.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_6_0.xml new file mode 100644 index 0000000000..cc9065d560 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_6_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_6_6.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_6_6.xml new file mode 100644 index 0000000000..be123699dd --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_6_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_6_6.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_6_6.xml new file mode 100644 index 0000000000..c49f705e68 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_6_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_csv_2_6_6.xml b/.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_csv_2_6_6.xml new file mode 100644 index 0000000000..901f1e378b --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_csv_2_6_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_findbugs_annotations_2_0_1.xml b/.idea/libraries/Maven__com_google_code_findbugs_annotations_2_0_1.xml new file mode 100644 index 0000000000..a3d13160ba --- /dev/null +++ b/.idea/libraries/Maven__com_google_code_findbugs_annotations_2_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_gson_gson_2_3_1.xml b/.idea/libraries/Maven__com_google_code_gson_gson_2_3_1.xml new file mode 100644 index 0000000000..d7b503804e --- /dev/null +++ b/.idea/libraries/Maven__com_google_code_gson_gson_2_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_gson_gson_2_5.xml b/.idea/libraries/Maven__com_google_code_gson_gson_2_5.xml new file mode 100644 index 0000000000..80bcd5fe39 --- /dev/null +++ b/.idea/libraries/Maven__com_google_code_gson_gson_2_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_guava_guava_15_0.xml b/.idea/libraries/Maven__com_google_guava_guava_15_0.xml new file mode 100644 index 0000000000..8ae2de1289 --- /dev/null +++ b/.idea/libraries/Maven__com_google_guava_guava_15_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_guava_guava_19_0.xml b/.idea/libraries/Maven__com_google_guava_guava_19_0.xml new file mode 100644 index 0000000000..68e23ccd00 --- /dev/null +++ b/.idea/libraries/Maven__com_google_guava_guava_19_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_protobuf_protobuf_java_2_6_0.xml b/.idea/libraries/Maven__com_google_protobuf_protobuf_java_2_6_0.xml new file mode 100644 index 0000000000..7ced7e4137 --- /dev/null +++ b/.idea/libraries/Maven__com_google_protobuf_protobuf_java_2_6_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_lowagie_itext_2_1_7.xml b/.idea/libraries/Maven__com_lowagie_itext_2_1_7.xml new file mode 100644 index 0000000000..ae673ea65a --- /dev/null +++ b/.idea/libraries/Maven__com_lowagie_itext_2_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_microsoft_sqlserver_sqljdbc4_4_0.xml b/.idea/libraries/Maven__com_microsoft_sqlserver_sqljdbc4_4_0.xml new file mode 100644 index 0000000000..10823cdbfa --- /dev/null +++ b/.idea/libraries/Maven__com_microsoft_sqlserver_sqljdbc4_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_thetransactioncompany_cors_filter_2_5.xml b/.idea/libraries/Maven__com_thetransactioncompany_cors_filter_2_5.xml new file mode 100644 index 0000000000..d01c74e11a --- /dev/null +++ b/.idea/libraries/Maven__com_thetransactioncompany_cors_filter_2_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_thetransactioncompany_java_property_utils_1_9_1.xml b/.idea/libraries/Maven__com_thetransactioncompany_java_property_utils_1_9_1.xml new file mode 100644 index 0000000000..0d6d8fc6d0 --- /dev/null +++ b/.idea/libraries/Maven__com_thetransactioncompany_java_property_utils_1_9_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_7.xml b/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_7.xml new file mode 100644 index 0000000000..08952d7982 --- /dev/null +++ b/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_8_0.xml b/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_8_0.xml new file mode 100644 index 0000000000..cf7c90ccee --- /dev/null +++ b/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_8_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml b/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml new file mode 100644 index 0000000000..e8a6a9f91c --- /dev/null +++ b/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_collections_commons_collections_2_1.xml b/.idea/libraries/Maven__commons_collections_commons_collections_2_1.xml new file mode 100644 index 0000000000..2068b27778 --- /dev/null +++ b/.idea/libraries/Maven__commons_collections_commons_collections_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_digester_commons_digester_2_1.xml b/.idea/libraries/Maven__commons_digester_commons_digester_2_1.xml new file mode 100644 index 0000000000..f1160609cd --- /dev/null +++ b/.idea/libraries/Maven__commons_digester_commons_digester_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_discovery_commons_discovery_0_2.xml b/.idea/libraries/Maven__commons_discovery_commons_discovery_0_2.xml new file mode 100644 index 0000000000..5c97345caf --- /dev/null +++ b/.idea/libraries/Maven__commons_discovery_commons_discovery_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_io_commons_io_2_1.xml b/.idea/libraries/Maven__commons_io_commons_io_2_1.xml new file mode 100644 index 0000000000..3b7814235f --- /dev/null +++ b/.idea/libraries/Maven__commons_io_commons_io_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_io_commons_io_2_2.xml b/.idea/libraries/Maven__commons_io_commons_io_2_2.xml new file mode 100644 index 0000000000..f8084ec288 --- /dev/null +++ b/.idea/libraries/Maven__commons_io_commons_io_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_logging_commons_logging_1_1_1.xml b/.idea/libraries/Maven__commons_logging_commons_logging_1_1_1.xml new file mode 100644 index 0000000000..b770f56aa9 --- /dev/null +++ b/.idea/libraries/Maven__commons_logging_commons_logging_1_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml b/.idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml new file mode 100644 index 0000000000..01c7b8ee61 --- /dev/null +++ b/.idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml new file mode 100644 index 0000000000..eab40b3297 --- /dev/null +++ b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_net_commons_net_3_4.xml b/.idea/libraries/Maven__commons_net_commons_net_3_4.xml new file mode 100644 index 0000000000..c70ad5f7e2 --- /dev/null +++ b/.idea/libraries/Maven__commons_net_commons_net_3_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_net_commons_net_3_5.xml b/.idea/libraries/Maven__commons_net_commons_net_3_5.xml new file mode 100644 index 0000000000..a27cd3f73f --- /dev/null +++ b/.idea/libraries/Maven__commons_net_commons_net_3_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__dom4j_dom4j_1_6_1.xml b/.idea/libraries/Maven__dom4j_dom4j_1_6_1.xml new file mode 100644 index 0000000000..14681ee840 --- /dev/null +++ b/.idea/libraries/Maven__dom4j_dom4j_1_6_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__eclipse_jdtcore_3_1_0.xml b/.idea/libraries/Maven__eclipse_jdtcore_3_1_0.xml new file mode 100644 index 0000000000..a9251587e8 --- /dev/null +++ b/.idea/libraries/Maven__eclipse_jdtcore_3_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__it_integry_utility_barcode_1_1.xml b/.idea/libraries/Maven__it_integry_utility_barcode_1_1.xml new file mode 100644 index 0000000000..4be3fbf665 --- /dev/null +++ b/.idea/libraries/Maven__it_integry_utility_barcode_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_activation_activation_1_1.xml b/.idea/libraries/Maven__javax_activation_activation_1_1.xml new file mode 100644 index 0000000000..180d587561 --- /dev/null +++ b/.idea/libraries/Maven__javax_activation_activation_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_activation_activation_1_1_1.xml b/.idea/libraries/Maven__javax_activation_activation_1_1_1.xml new file mode 100644 index 0000000000..bde4d358d8 --- /dev/null +++ b/.idea/libraries/Maven__javax_activation_activation_1_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_javaee_web_api_6_0.xml b/.idea/libraries/Maven__javax_javaee_web_api_6_0.xml new file mode 100644 index 0000000000..6f532e6751 --- /dev/null +++ b/.idea/libraries/Maven__javax_javaee_web_api_6_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_mail_mail_1_4.xml b/.idea/libraries/Maven__javax_mail_mail_1_4.xml new file mode 100644 index 0000000000..ead2b381a0 --- /dev/null +++ b/.idea/libraries/Maven__javax_mail_mail_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml b/.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml new file mode 100644 index 0000000000..c24f7e3083 --- /dev/null +++ b/.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_xml_rpc_javax_xml_rpc_api_1_1_1.xml b/.idea/libraries/Maven__javax_xml_rpc_javax_xml_rpc_api_1_1_1.xml new file mode 100644 index 0000000000..9d1a9e4ca8 --- /dev/null +++ b/.idea/libraries/Maven__javax_xml_rpc_javax_xml_rpc_api_1_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_xml_soap_saaj_api_1_3_5.xml b/.idea/libraries/Maven__javax_xml_soap_saaj_api_1_3_5.xml new file mode 100644 index 0000000000..498a751c4c --- /dev/null +++ b/.idea/libraries/Maven__javax_xml_soap_saaj_api_1_3_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__jfree_jcommon_1_0_15.xml b/.idea/libraries/Maven__jfree_jcommon_1_0_15.xml new file mode 100644 index 0000000000..2133275616 --- /dev/null +++ b/.idea/libraries/Maven__jfree_jcommon_1_0_15.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__jfree_jfreechart_1_0_12.xml b/.idea/libraries/Maven__jfree_jfreechart_1_0_12.xml new file mode 100644 index 0000000000..e5dfd0ee11 --- /dev/null +++ b/.idea/libraries/Maven__jfree_jfreechart_1_0_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__jstl_jstl_1_2.xml b/.idea/libraries/Maven__jstl_jstl_1_2.xml new file mode 100644 index 0000000000..40b1672861 --- /dev/null +++ b/.idea/libraries/Maven__jstl_jstl_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_12.xml b/.idea/libraries/Maven__junit_junit_4_12.xml new file mode 100644 index 0000000000..d411041745 --- /dev/null +++ b/.idea/libraries/Maven__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_35.xml b/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_35.xml new file mode 100644 index 0000000000..da90023d16 --- /dev/null +++ b/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_35.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_jcip_jcip_annotations_1_0.xml b/.idea/libraries/Maven__net_jcip_jcip_annotations_1_0.xml new file mode 100644 index 0000000000..d29c82f6b5 --- /dev/null +++ b/.idea/libraries/Maven__net_jcip_jcip_annotations_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sf_barcode4j_barcode4j_2_0.xml b/.idea/libraries/Maven__net_sf_barcode4j_barcode4j_2_0.xml new file mode 100644 index 0000000000..3e76289fc7 --- /dev/null +++ b/.idea/libraries/Maven__net_sf_barcode4j_barcode4j_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_sf_jasperreports_jasperreports_4_5_1.xml b/.idea/libraries/Maven__net_sf_jasperreports_jasperreports_4_5_1.xml new file mode 100644 index 0000000000..0ac61419e4 --- /dev/null +++ b/.idea/libraries/Maven__net_sf_jasperreports_jasperreports_4_5_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_antlr_antlr_runtime_3_5.xml b/.idea/libraries/Maven__org_antlr_antlr_runtime_3_5.xml new file mode 100644 index 0000000000..6d3a0f6218 --- /dev/null +++ b/.idea/libraries/Maven__org_antlr_antlr_runtime_3_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_avalon_framework_avalon_framework_api_4_3_1.xml b/.idea/libraries/Maven__org_apache_avalon_framework_avalon_framework_api_4_3_1.xml new file mode 100644 index 0000000000..69f4d92ada --- /dev/null +++ b/.idea/libraries/Maven__org_apache_avalon_framework_avalon_framework_api_4_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_avalon_framework_avalon_framework_impl_4_3_1.xml b/.idea/libraries/Maven__org_apache_avalon_framework_avalon_framework_impl_4_3_1.xml new file mode 100644 index 0000000000..7b79fa57d1 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_avalon_framework_avalon_framework_impl_4_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_axis_axis_1_4.xml b/.idea/libraries/Maven__org_apache_axis_axis_1_4.xml new file mode 100644 index 0000000000..7698bdf139 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_axis_axis_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml new file mode 100644 index 0000000000..78cfcd37a1 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_geronimo_specs_geronimo_stax_api_1_0_spec_1_0.xml b/.idea/libraries/Maven__org_apache_geronimo_specs_geronimo_stax_api_1_0_spec_1_0.xml new file mode 100644 index 0000000000..72d74c3fe2 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_geronimo_specs_geronimo_stax_api_1_0_spec_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_2_3.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_2_3.xml new file mode 100644 index 0000000000..1e69f7e13d --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_6.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_6.xml new file mode 100644 index 0000000000..04cad1e9bd --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_2_2.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_2_2.xml new file mode 100644 index 0000000000..2dcdea6e72 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml new file mode 100644 index 0000000000..a821fc2fd0 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_3.xml b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_3.xml new file mode 100644 index 0000000000..fdc42817f5 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_logging_log4j_log4j_core_2_3.xml b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_core_2_3.xml new file mode 100644 index 0000000000..797728cfc8 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_core_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_logging_log4j_log4j_web_2_3.xml b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_web_2_3.xml new file mode 100644 index 0000000000..2ec940a6b9 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_web_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_pdfbox_fontbox_2_0_0.xml b/.idea/libraries/Maven__org_apache_pdfbox_fontbox_2_0_0.xml new file mode 100644 index 0000000000..fbfbbc1170 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_pdfbox_fontbox_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_pdfbox_pdfbox_2_0_0.xml b/.idea/libraries/Maven__org_apache_pdfbox_pdfbox_2_0_0.xml new file mode 100644 index 0000000000..5412a9910f --- /dev/null +++ b/.idea/libraries/Maven__org_apache_pdfbox_pdfbox_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_poi_poi_3_7.xml b/.idea/libraries/Maven__org_apache_poi_poi_3_7.xml new file mode 100644 index 0000000000..8ecb56a181 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_poi_poi_3_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_poi_poi_ooxml_3_7.xml b/.idea/libraries/Maven__org_apache_poi_poi_ooxml_3_7.xml new file mode 100644 index 0000000000..86c7c9d720 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_poi_poi_ooxml_3_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_poi_poi_ooxml_schemas_3_7.xml b/.idea/libraries/Maven__org_apache_poi_poi_ooxml_schemas_3_7.xml new file mode 100644 index 0000000000..e9e128fd11 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_poi_poi_ooxml_schemas_3_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlbeans_xmlbeans_2_3_0.xml b/.idea/libraries/Maven__org_apache_xmlbeans_xmlbeans_2_3_0.xml new file mode 100644 index 0000000000..466c52c253 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlbeans_xmlbeans_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_anim_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_anim_1_7.xml new file mode 100644 index 0000000000..0cd2ef1d68 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_anim_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_awt_util_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_awt_util_1_7.xml new file mode 100644 index 0000000000..2e7275f15d --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_awt_util_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_bridge_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_bridge_1_7.xml new file mode 100644 index 0000000000..f9b48c0deb --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_bridge_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_css_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_css_1_7.xml new file mode 100644 index 0000000000..ca535c954c --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_css_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_dom_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_dom_1_7.xml new file mode 100644 index 0000000000..3c131e5f21 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_dom_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_ext_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_ext_1_7.xml new file mode 100644 index 0000000000..8a22bc71aa --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_ext_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_gvt_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_gvt_1_7.xml new file mode 100644 index 0000000000..842274525e --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_gvt_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_js_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_js_1_7.xml new file mode 100644 index 0000000000..2d617a3538 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_js_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_parser_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_parser_1_7.xml new file mode 100644 index 0000000000..1e8816a5f8 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_parser_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_script_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_script_1_7.xml new file mode 100644 index 0000000000..73ca6d4452 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_script_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_svg_dom_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_svg_dom_1_7.xml new file mode 100644 index 0000000000..8e6d3adebc --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_svg_dom_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_svggen_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_svggen_1_7.xml new file mode 100644 index 0000000000..dcdf67212d --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_svggen_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_transcoder_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_transcoder_1_7.xml new file mode 100644 index 0000000000..f8eab0a497 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_transcoder_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_util_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_util_1_7.xml new file mode 100644 index 0000000000..8a6a7895f4 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_util_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_batik_xml_1_7.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_xml_1_7.xml new file mode 100644 index 0000000000..3fa5ec4d38 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_batik_xml_1_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_fop_0_94.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_fop_0_94.xml new file mode 100644 index 0000000000..817f4e5973 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_fop_0_94.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlgraphics_xmlgraphics_commons_1_2.xml b/.idea/libraries/Maven__org_apache_xmlgraphics_xmlgraphics_commons_1_2.xml new file mode 100644 index 0000000000..fc09bd512d --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlgraphics_xmlgraphics_commons_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_bouncycastle_bcmail_jdk14_1_38.xml b/.idea/libraries/Maven__org_bouncycastle_bcmail_jdk14_1_38.xml new file mode 100644 index 0000000000..19a76d3495 --- /dev/null +++ b/.idea/libraries/Maven__org_bouncycastle_bcmail_jdk14_1_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk14_1_38.xml b/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk14_1_38.xml new file mode 100644 index 0000000000..cb79152acd --- /dev/null +++ b/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk14_1_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_bouncycastle_bctsp_jdk14_1_38.xml b/.idea/libraries/Maven__org_bouncycastle_bctsp_jdk14_1_38.xml new file mode 100644 index 0000000000..755a52c731 --- /dev/null +++ b/.idea/libraries/Maven__org_bouncycastle_bctsp_jdk14_1_38.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_codehaus_castor_castor_1_2.xml b/.idea/libraries/Maven__org_codehaus_castor_castor_1_2.xml new file mode 100644 index 0000000000..8cc23cd618 --- /dev/null +++ b/.idea/libraries/Maven__org_codehaus_castor_castor_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_codehaus_groovy_groovy_all_1_7_5.xml b/.idea/libraries/Maven__org_codehaus_groovy_groovy_all_1_7_5.xml new file mode 100644 index 0000000000..cc6ddc5120 --- /dev/null +++ b/.idea/libraries/Maven__org_codehaus_groovy_groovy_all_1_7_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_lgpl_1_7_4.xml b/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_lgpl_1_7_4.xml new file mode 100644 index 0000000000..0ad2e94863 --- /dev/null +++ b/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_lgpl_1_7_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_codehaus_jackson_jackson_mapper_lgpl_1_7_4.xml b/.idea/libraries/Maven__org_codehaus_jackson_jackson_mapper_lgpl_1_7_4.xml new file mode 100644 index 0000000000..55cd1e697c --- /dev/null +++ b/.idea/libraries/Maven__org_codehaus_jackson_jackson_mapper_lgpl_1_7_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_drools_drools_compiler_6_4_0_Final.xml b/.idea/libraries/Maven__org_drools_drools_compiler_6_4_0_Final.xml new file mode 100644 index 0000000000..6ea457e0e5 --- /dev/null +++ b/.idea/libraries/Maven__org_drools_drools_compiler_6_4_0_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_drools_drools_core_6_4_0_Final.xml b/.idea/libraries/Maven__org_drools_drools_core_6_4_0_Final.xml new file mode 100644 index 0000000000..4eb2d730a6 --- /dev/null +++ b/.idea/libraries/Maven__org_drools_drools_core_6_4_0_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_eclipse_jdt_core_compiler_ecj_4_4_2.xml b/.idea/libraries/Maven__org_eclipse_jdt_core_compiler_ecj_4_4_2.xml new file mode 100644 index 0000000000..98a6916630 --- /dev/null +++ b/.idea/libraries/Maven__org_eclipse_jdt_core_compiler_ecj_4_4_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 0000000000..f58bbc1127 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_ini4j_ini4j_0_5_2.xml b/.idea/libraries/Maven__org_ini4j_ini4j_0_5_2.xml new file mode 100644 index 0000000000..534b931e5d --- /dev/null +++ b/.idea/libraries/Maven__org_ini4j_ini4j_0_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_javassist_javassist_3_19_0_GA.xml b/.idea/libraries/Maven__org_javassist_javassist_3_19_0_GA.xml new file mode 100644 index 0000000000..be983fccb5 --- /dev/null +++ b/.idea/libraries/Maven__org_javassist_javassist_3_19_0_GA.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jboss_resteasy_jaxrs_api_3_0_12_Final.xml b/.idea/libraries/Maven__org_jboss_resteasy_jaxrs_api_3_0_12_Final.xml new file mode 100644 index 0000000000..6c685e9616 --- /dev/null +++ b/.idea/libraries/Maven__org_jboss_resteasy_jaxrs_api_3_0_12_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jboss_resteasy_resteasy_client_3_0_12_Final.xml b/.idea/libraries/Maven__org_jboss_resteasy_resteasy_client_3_0_12_Final.xml new file mode 100644 index 0000000000..4dcc0fc28b --- /dev/null +++ b/.idea/libraries/Maven__org_jboss_resteasy_resteasy_client_3_0_12_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jboss_resteasy_resteasy_jaxrs_3_0_12_Final.xml b/.idea/libraries/Maven__org_jboss_resteasy_resteasy_jaxrs_3_0_12_Final.xml new file mode 100644 index 0000000000..061b8aec19 --- /dev/null +++ b/.idea/libraries/Maven__org_jboss_resteasy_resteasy_jaxrs_3_0_12_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jboss_spec_javax_annotation_jboss_annotations_api_1_1_spec_1_0_1_Final.xml b/.idea/libraries/Maven__org_jboss_spec_javax_annotation_jboss_annotations_api_1_1_spec_1_0_1_Final.xml new file mode 100644 index 0000000000..26e0a514a5 --- /dev/null +++ b/.idea/libraries/Maven__org_jboss_spec_javax_annotation_jboss_annotations_api_1_1_spec_1_0_1_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_kie_kie_api_6_4_0_Final.xml b/.idea/libraries/Maven__org_kie_kie_api_6_4_0_Final.xml new file mode 100644 index 0000000000..26504d6b3b --- /dev/null +++ b/.idea/libraries/Maven__org_kie_kie_api_6_4_0_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_kie_kie_internal_6_4_0_Final.xml b/.idea/libraries/Maven__org_kie_kie_internal_6_4_0_Final.xml new file mode 100644 index 0000000000..168ba5d988 --- /dev/null +++ b/.idea/libraries/Maven__org_kie_kie_internal_6_4_0_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mvel_mvel2_2_2_8_Final.xml b/.idea/libraries/Maven__org_mvel_mvel2_2_2_8_Final.xml new file mode 100644 index 0000000000..465d3dc8e6 --- /dev/null +++ b/.idea/libraries/Maven__org_mvel_mvel2_2_2_8_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_postgresql_postgresql_9_4_1209_jre6.xml b/.idea/libraries/Maven__org_postgresql_postgresql_9_4_1209_jre6.xml new file mode 100644 index 0000000000..41a275a1a5 --- /dev/null +++ b/.idea/libraries/Maven__org_postgresql_postgresql_9_4_1209_jre6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_quartz_scheduler_quartz_2_2_2.xml b/.idea/libraries/Maven__org_quartz_scheduler_quartz_2_2_2.xml new file mode 100644 index 0000000000..ebb147218f --- /dev/null +++ b/.idea/libraries/Maven__org_quartz_scheduler_quartz_2_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_quartz_scheduler_quartz_jobs_2_2_2.xml b/.idea/libraries/Maven__org_quartz_scheduler_quartz_jobs_2_2_2.xml new file mode 100644 index 0000000000..f1022b1a26 --- /dev/null +++ b/.idea/libraries/Maven__org_quartz_scheduler_quartz_jobs_2_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_reflections_reflections_0_9_10.xml b/.idea/libraries/Maven__org_reflections_reflections_0_9_10.xml new file mode 100644 index 0000000000..d92ca0da1c --- /dev/null +++ b/.idea/libraries/Maven__org_reflections_reflections_0_9_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_2.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_2.xml new file mode 100644 index 0000000000..7d29533b47 --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_7.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_7.xml new file mode 100644 index 0000000000..1e672600f6 --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_config_4_0_4_RELEASE.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_config_4_0_4_RELEASE.xml new file mode 100644 index 0000000000..c0f5e88855 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_security_spring_security_config_4_0_4_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_core_4_0_4_RELEASE.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_core_4_0_4_RELEASE.xml new file mode 100644 index 0000000000..4b9d7e85ea --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_security_spring_security_core_4_0_4_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_web_4_0_4_RELEASE.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_web_4_0_4_RELEASE.xml new file mode 100644 index 0000000000..cf3144c4fc --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_security_spring_security_web_4_0_4_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_aop_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_aop_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..7388c829aa --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_aop_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_beans_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_beans_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..6959be5f8a --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_beans_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_context_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_context_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..d71e0a46d1 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_context_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_context_support_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_context_support_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..877c335161 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_context_support_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_core_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_core_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..9c970d9652 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_core_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_expression_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_expression_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..c9285e1f2c --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_expression_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_instrument_tomcat_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_instrument_tomcat_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..104db35d00 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_instrument_tomcat_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_jdbc_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_jdbc_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..3beb055ce8 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_jdbc_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_orm_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_orm_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..32d4e80fd7 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_orm_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_oxm_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_oxm_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..b652f541d8 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_oxm_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_tx_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_tx_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..2454e0b423 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_tx_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_web_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_web_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..6646dba2bd --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_web_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_webmvc_4_2_5_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_webmvc_4_2_5_RELEASE.xml new file mode 100644 index 0000000000..20be062ba1 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_webmvc_4_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__stax_stax_api_1_0_1.xml b/.idea/libraries/Maven__stax_stax_api_1_0_1.xml new file mode 100644 index 0000000000..0b13335ee1 --- /dev/null +++ b/.idea/libraries/Maven__stax_stax_api_1_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__wsdl4j_wsdl4j_1_6_3.xml b/.idea/libraries/Maven__wsdl4j_wsdl4j_1_6_3.xml new file mode 100644 index 0000000000..8310dc887c --- /dev/null +++ b/.idea/libraries/Maven__wsdl4j_wsdl4j_1_6_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__xalan_xalan_2_6_0.xml b/.idea/libraries/Maven__xalan_xalan_2_6_0.xml new file mode 100644 index 0000000000..89cc4896ee --- /dev/null +++ b/.idea/libraries/Maven__xalan_xalan_2_6_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__xml_apis_xml_apis_1_0_b2.xml b/.idea/libraries/Maven__xml_apis_xml_apis_1_0_b2.xml new file mode 100644 index 0000000000..c36e71714a --- /dev/null +++ b/.idea/libraries/Maven__xml_apis_xml_apis_1_0_b2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__xml_apis_xml_apis_1_3_02.xml b/.idea/libraries/Maven__xml_apis_xml_apis_1_3_02.xml new file mode 100644 index 0000000000..c60138b771 --- /dev/null +++ b/.idea/libraries/Maven__xml_apis_xml_apis_1_3_02.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__xml_apis_xml_apis_ext_1_3_04.xml b/.idea/libraries/Maven__xml_apis_xml_apis_ext_1_3_04.xml new file mode 100644 index 0000000000..6baf5e0191 --- /dev/null +++ b/.idea/libraries/Maven__xml_apis_xml_apis_ext_1_3_04.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml b/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml new file mode 100644 index 0000000000..0f2d9ef4a8 --- /dev/null +++ b/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml b/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml new file mode 100644 index 0000000000..6726a2d68f --- /dev/null +++ b/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000..74a7b70134 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + C:\Users\GiuseppeS\AppData\Roaming\Subversion + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..f967a7353b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..94a25f7f4c --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000..7cb7003231 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1484902798911 + + + + +<<<<<<< 70d6d8467c39fcc483f92cc3e019d9331fefacad + + + +======= + + + +>>>>>>> bbeacd9d87ccf493d23dad497767c9bf282606a3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No facets are configured + + + + + + + + + + + + + + + 1.7 + + + + + + + + + + + + + + + 1.7 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.project b/.project new file mode 100644 index 0000000000..0f80d29c59 --- /dev/null +++ b/.project @@ -0,0 +1,42 @@ + + + IntegryManagmentSystem + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000000..585c967a9c --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..4824b80263 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62a317c860 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..14b697b7bb --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000000..52ac70342d --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,6 @@ + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml new file mode 100644 index 0000000000..1ac9c29930 --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000000..3943c622ad --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000000..3bd5d0a480 --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000000..05bd71b6ec --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000000..6f1cba68d5 --- /dev/null +++ b/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/CHANGES.txt b/CHANGES.txt new file mode 100644 index 0000000000..052affafac --- /dev/null +++ b/CHANGES.txt @@ -0,0 +1,53 @@ +# Change Log +In questo file vengono annotati i cambiamenti a seguente software + +## [1.0.1] - 2016-01-15 aggiunta in ems.properties +sh.import.enabled=false + +## [1.0.0] - 2015-12-16 Prima versione con aggiunta di tutte le lib +### Added +antlr-runtime-3.5.jar +barcode4j-2.0.jar +Bookman Old Style.jar +commons-lang3-3.4.jar +commons-logging-api-1.1.1.jar +drools-compiler-6.3.0.Final.jar +drools-core-6.3.0.Final.jar +ecj-4.3.1.jar +fixedformat4j-1.4.0-SNAPSHOT.jar +fontbox-1.8.9.jar +groovy-all-1.7.5.jar +gson-2.3.1.jar +guava-18.0.jar +httpclient-4.2.3.jar +httpcore-4.2.jar +ini4j-0.5.2.jar +javassist-3.16.1-GA.jar +jdtcore-3.1.0.jar +jempbox-1.8.9.jar +kie-api-6.3.0.Final.jar +kie-internal-6.3.0.Final.jar +mail-1.4.jar +MaWSJavaClientLibrary-1.1.jar +mvel2-2.2.6.Final.jar +MWSClientJavaRuntime-1.0.jar +MWSOrders_2013-09-01-2015-04-30.jar +mysql-connector-java-5.1.35.jar +pdfbox-1.8.9.jar +protobuf-java-2.5.0.jar +quartz-2.2.1.jar +reflections-0.9.10.jar +slf4j-api-1.6.6.jar +slf4j-api-1.7.12.jar +sqlite-jdbc-3.8.10.1.jar +sqljdbc4-4.0.jar +stax-api-1.0.1.jar +utility-barcode-1.1.jar +xmlbeans-2.3.0.jar +xmlpull-1.1.3.1.jar +xpp3_min-1.1.4c.jar +xstream-1.4.7.jar + +### Changed +### Removed +### Fixed \ No newline at end of file diff --git a/CHANGES.xls b/CHANGES.xls new file mode 100644 index 0000000000..33a29f5939 Binary files /dev/null and b/CHANGES.xls differ diff --git a/EMS_old.docx b/EMS_old.docx new file mode 100644 index 0000000000..8d8b065304 Binary files /dev/null and b/EMS_old.docx differ diff --git a/Entity managment system.doc b/Entity managment system.doc new file mode 100644 index 0000000000..b9bb6ac2a5 Binary files /dev/null and b/Entity managment system.doc differ diff --git a/Interfaccia ecommerce Integry.docx b/Interfaccia ecommerce Integry.docx new file mode 100644 index 0000000000..a54e9200d5 Binary files /dev/null and b/Interfaccia ecommerce Integry.docx differ diff --git a/Interfaccia ecommerce Integry.pdf b/Interfaccia ecommerce Integry.pdf new file mode 100644 index 0000000000..69f9cc6025 Binary files /dev/null and b/Interfaccia ecommerce Integry.pdf differ diff --git a/docs/Applicativi web.pptx b/docs/Applicativi web.pptx new file mode 100644 index 0000000000..410f7be99a Binary files /dev/null and b/docs/Applicativi web.pptx differ diff --git a/docs/Arch1.odp b/docs/Arch1.odp new file mode 100644 index 0000000000..9fdcfb7330 Binary files /dev/null and b/docs/Arch1.odp differ diff --git a/docs/Ems Architettura.pptx b/docs/Ems Architettura.pptx new file mode 100644 index 0000000000..7f7127a2bc Binary files /dev/null and b/docs/Ems Architettura.pptx differ diff --git a/docs/Integry Managment System - Sviluppi 2.pptx b/docs/Integry Managment System - Sviluppi 2.pptx new file mode 100644 index 0000000000..ce41e24532 Binary files /dev/null and b/docs/Integry Managment System - Sviluppi 2.pptx differ diff --git a/docs/Integry Managment System sviluppi.pptx b/docs/Integry Managment System sviluppi.pptx new file mode 100644 index 0000000000..92c7bb13c1 Binary files /dev/null and b/docs/Integry Managment System sviluppi.pptx differ diff --git a/docs/Integry Managment System.pptx b/docs/Integry Managment System.pptx new file mode 100644 index 0000000000..2eb1c31c20 Binary files /dev/null and b/docs/Integry Managment System.pptx differ diff --git a/docs/Java 6-7.pptx b/docs/Java 6-7.pptx new file mode 100644 index 0000000000..3f0623081c Binary files /dev/null and b/docs/Java 6-7.pptx differ diff --git a/docs/Presentazione standard1.odp b/docs/Presentazione standard1.odp new file mode 100644 index 0000000000..9fdcfb7330 Binary files /dev/null and b/docs/Presentazione standard1.odp differ diff --git a/docs/Procedure da sviluppare.docx b/docs/Procedure da sviluppare.docx new file mode 100644 index 0000000000..e42fbb3c18 Binary files /dev/null and b/docs/Procedure da sviluppare.docx differ diff --git a/docs/Rule test sum.pptx b/docs/Rule test sum.pptx new file mode 100644 index 0000000000..88e3bb54b9 Binary files /dev/null and b/docs/Rule test sum.pptx differ diff --git a/docs/Schema righe entity.pptx b/docs/Schema righe entity.pptx new file mode 100644 index 0000000000..f00ee071e8 Binary files /dev/null and b/docs/Schema righe entity.pptx differ diff --git a/docs/Tutorial Drools Rules.pptx b/docs/Tutorial Drools Rules.pptx new file mode 100644 index 0000000000..5c53303996 Binary files /dev/null and b/docs/Tutorial Drools Rules.pptx differ diff --git a/docs/Web e strumenti per la programmazione.pptx b/docs/Web e strumenti per la programmazione.pptx new file mode 100644 index 0000000000..4c4667d2f6 Binary files /dev/null and b/docs/Web e strumenti per la programmazione.pptx differ diff --git a/ems-common.iml b/ems-common.iml new file mode 100644 index 0000000000..d3c1ff4845 --- /dev/null +++ b/ems-common.iml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-common/.classpath b/ems-common/.classpath new file mode 100644 index 0000000000..d0324b4a0a --- /dev/null +++ b/ems-common/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-common/.project b/ems-common/.project new file mode 100644 index 0000000000..1eb98b83e9 --- /dev/null +++ b/ems-common/.project @@ -0,0 +1,36 @@ + + + ems-core + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/ems-common/.settings/org.eclipse.core.resources.prefs b/ems-common/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..365bbd6097 --- /dev/null +++ b/ems-common/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/ems-common/.settings/org.eclipse.jdt.core.prefs b/ems-common/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62a317c860 --- /dev/null +++ b/ems-common/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/ems-common/.settings/org.eclipse.m2e.core.prefs b/ems-common/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..14b697b7bb --- /dev/null +++ b/ems-common/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ems-common/.settings/org.eclipse.wst.common.component b/ems-common/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000000..16196510b2 --- /dev/null +++ b/ems-common/.settings/org.eclipse.wst.common.component @@ -0,0 +1,6 @@ + + + + + + diff --git a/ems-common/.settings/org.eclipse.wst.common.project.facet.core.xml b/ems-common/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000000..74af154056 --- /dev/null +++ b/ems-common/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ems-common/.settings/org.eclipse.wst.validation.prefs b/ems-common/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000000..6f1cba68d5 --- /dev/null +++ b/ems-common/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/ems-common/pom.xml b/ems-common/pom.xml new file mode 100644 index 0000000000..f814ebdc74 --- /dev/null +++ b/ems-common/pom.xml @@ -0,0 +1,114 @@ + + 4.0.0 + + it.integry + ims + 1.0 + ../pom.xml + + it.integry.ims + ems-common + jar + + Ems Common + + + UTF-8 + + + + + + src/main/resources + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + ${java.version} + ${java.version} + + + + + + + it.integry.ims + ems-retail + 1.0 + + + it.integry.ims + ems-logistic + 1.0 + + + it.integry.ims + ems-document + 1.0 + + + it.integry.ims + ems-order + 1.0 + + + it.integry.ims + ems-product + 1.0 + + + it.integry.ims + ems-system + 1.0 + + + it.integry.ims + ems-contabil + 1.0 + + + it.integry.ims + ems-utility + 1.0 + + + + commons-codec + commons-codec + 1.6 + + + + + + + + + + + + + + + + + org.apache.commons + commons-lang3 + 3.4 + provided + + + xalan + xalan + 2.6.0 + provided + + + + diff --git a/ems-contabil.iml b/ems-contabil.iml new file mode 100644 index 0000000000..cb83970c92 --- /dev/null +++ b/ems-contabil.iml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-contabil/.classpath b/ems-contabil/.classpath new file mode 100644 index 0000000000..96ff71c6d2 --- /dev/null +++ b/ems-contabil/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-contabil/.project b/ems-contabil/.project new file mode 100644 index 0000000000..b413804d59 --- /dev/null +++ b/ems-contabil/.project @@ -0,0 +1,36 @@ + + + ems-contabil + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/ems-contabil/.settings/org.eclipse.core.resources.prefs b/ems-contabil/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..365bbd6097 --- /dev/null +++ b/ems-contabil/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/ems-contabil/.settings/org.eclipse.jdt.core.prefs b/ems-contabil/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62a317c860 --- /dev/null +++ b/ems-contabil/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/ems-contabil/.settings/org.eclipse.m2e.core.prefs b/ems-contabil/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..14b697b7bb --- /dev/null +++ b/ems-contabil/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ems-contabil/.settings/org.eclipse.wst.common.component b/ems-contabil/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000000..52478c18dd --- /dev/null +++ b/ems-contabil/.settings/org.eclipse.wst.common.component @@ -0,0 +1,6 @@ + + + + + + diff --git a/ems-contabil/.settings/org.eclipse.wst.common.project.facet.core.xml b/ems-contabil/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000000..0ae7970039 --- /dev/null +++ b/ems-contabil/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ems-contabil/.settings/org.eclipse.wst.validation.prefs b/ems-contabil/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000000..6f1cba68d5 --- /dev/null +++ b/ems-contabil/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/ems-contabil/pom.xml b/ems-contabil/pom.xml new file mode 100644 index 0000000000..b1aa4a0223 --- /dev/null +++ b/ems-contabil/pom.xml @@ -0,0 +1,199 @@ + + 4.0.0 + + it.integry + ims + 1.0 + ../pom.xml + + it.integry.ims + ems-contabil + jar + + Ems Contabil + + + + + src/main/resources + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + ${java.version} + ${java.version} + + + + + + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + + xalan + xalan + 2.6.0 + provided + + + + commons-codec + commons-codec + 1.6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.xmlbeans + xmlbeans + 2.3.0 + provided + + + + + org.apache.axis + axis + 1.4 + + + javax.xml.rpc + javax.xml.rpc-api + 1.1.1 + + + commons-discovery + commons-discovery + 0.2 + + + commons-logging + commons-logging + 1.2 + + + javax.xml.soap + saaj-api + 1.3.5 + + + wsdl4j + wsdl4j + 1.6.3 + + + + org.apache.commons + commons-lang3 + 3.4 + provided + + + + com.google.guava + guava + ${guava.version} + provided + + + + + org.jboss.resteasy + resteasy-jaxrs + ${resteasy.version} + + + org.jboss.resteasy + resteasy-client + ${resteasy.version} + + + + org.springframework + spring-web + ${spring.version} + + + org.springframework + spring-webmvc + ${spring.version} + + + + it.integry.ims + ems-core + 1.0 + + + + com.ancientprogramming.fixedformat4j + fixedformat4j + 1.4.0-SNAPSHOT + provided + + + + Racchiude il modulo che gestisce Documenti, Ordini, contabilità + diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/controller/ContabilController.java b/ems-contabil/src/main/java/it/integry/ems/contabil/controller/ContabilController.java new file mode 100644 index 0000000000..29d90a31f9 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/controller/ContabilController.java @@ -0,0 +1,126 @@ +package it.integry.ems.contabil.controller; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.contabil.importaz.service.ImportMovContabilService; +import it.integry.ems.contabil.service.ContabilService; +import it.integry.ems.contabil.type.ContabilImportFormat; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.response.EsitoType; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.response.StatusResponse; +import it.integry.ems.status.ServiceChecker; +import it.integry.ems.utility.UtilityString; + +@RestController +@Scope(value = "request") +@SuppressWarnings("finally") +public class ContabilController { + + private final Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties properties; + @Autowired + private DataSource ds; + @Autowired + private ServiceChecker serviceChecker; + @Autowired + private ContabilService contabilService; + @Autowired + private ImportMovContabilService importMovContabilService; + + @RequestMapping(value = "/contabil/status", method = RequestMethod.GET) + public @ResponseBody List status(HttpServletRequest request) { + + Method[] methods = ContabilController.class.getDeclaredMethods(); + List list = serviceChecker.getServiceStatus(methods, ContabilController.class); + + return list; + } + + @RequestMapping(value = EmsRestConstants.PATH_REG_DISTINTA_INCASSI, method = RequestMethod.POST) + public @ResponseBody List registraDistintaIncassi(HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestBody(required=true) String inputValue ){ + + List resp = new ArrayList(); + try { + String username = request.getHeader("username"); + String password = request.getHeader("password"); + + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + resp = contabilService.registraDistintaIncassi(username, password, inputValue); + } catch (Exception e) { + logger.error(e.toString()); + resp.add(new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e)); + } finally { + return resp; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_SEPA_XML, method = RequestMethod.POST) + public @ResponseBody ServiceRestResponse getSepaXml(HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam("dataDist") String dataDist, @RequestParam("rifDist") Integer rifDist){ + + ServiceRestResponse resp = null; + try{ + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + resp = contabilService.getSepaXml(UtilityString.parseDate(dataDist), rifDist); + } catch (Exception e) { + logger.error(e.toString()); + resp = new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e); + } finally { + return resp; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_IMPORT_MOVCONTABIL, method = RequestMethod.POST) + public @ResponseBody List importMovContFrontSt(HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value=EmsRestConstants.TYPE, required=false) String typeImport, + @RequestParam(value=EmsRestConstants.FORMAT) ContabilImportFormat formatImport, + @RequestBody(required=true) String xmlInputValue){ + + List listResponse = new ArrayList(); + try{ + String username = request.getHeader("username"); + String password = request.getHeader("password"); + + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + + if(ContabilImportFormat.FRONTST.equals(formatImport)){ + listResponse = importMovContabilService.importMovContFrontSt(username, password, xmlInputValue); + } else { + throw new Exception("Formato " + formatImport + "non configurato."); + } + + + } catch (Exception e) { + logger.error(e.toString()); + listResponse.add( new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e)); + } finally { + return listResponse; + } + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/importaz/service/ImportMovContabilService.java b/ems-contabil/src/main/java/it/integry/ems/contabil/importaz/service/ImportMovContabilService.java new file mode 100644 index 0000000000..cda7bb188f --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/importaz/service/ImportMovContabilService.java @@ -0,0 +1,504 @@ +package it.integry.ems.contabil.importaz.service; + +import java.io.StringWriter; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathFactory; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; +import org.w3c.dom.Document; + +import com.fasterxml.jackson.databind.node.ArrayNode; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.entity.CtbMovi; +import it.integry.ems.entity.CtbMovr; +import it.integry.ems.entity.CtbMovt; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.service.HttpRestWrapper; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityDate; +import it.integry.ems.utility.UtilityString; +import it.integry.ems.utility.UtilityXML; + +@Service +@Scope(value = "request") +public class ImportMovContabilService { + @Autowired + private DataSource ds; + @Autowired + private JSONObjectMapper jsonObjectMapper; + @Autowired + private HttpRestWrapper httpRestWrapper; + + + public List importMovContFrontSt(String username, String password, String xmlInputValue )throws Exception{ + StringBuffer xmlFilter= new StringBuffer(""), xmlParameter= new StringBuffer(""); + String query, codMdep; + Connection conn = ds.getConnection(); + PreparedStatement ps; + ResultSet rs; + ArrayNode arrayNode = jsonObjectMapper.createArrayNode(); + + final Map setup = new HashMap(); + setup.put("gestname", "'w_tvdocu_corr_batch_fatt_new_dlg'"); + setup.put("section", "'REGISTRAZIONE_CONTABILE'"); + setup.put("causale", "'CAUSALE_%'"); + setup.put("contropartita", "'CONTROPARTITA_%'"); + setup.put("reparto_gift", "'REPARTO_GIFT'"); + setup.put("conto_gift", "'CONTO_GIFT'"); + + UtilityXML.parseFilterXML(xmlInputValue, xmlFilter, xmlParameter); + Document docParams = UtilityXML.convertStringToDocument(xmlParameter.toString()); + XPath xPath = XPathFactory.newInstance().newXPath(); + + codMdep = xPath.compile("PARAMETER/COD_MDEP").evaluate(docParams); + + query = "SELECT dataUltVcor.cod_dtip, " + + " isNull(dataUltMov.ultimo_mov, dataUltVcor.primo_vcorr) as dataInizio_Corr, " + + " isNull(dataUltMovOp.ultimo_mov, isNull(dataUltMov.ultimo_mov, dataUltVcor.primo_vcorr)) as dataInizio_Op, " + + " dataUltVcor.ultimo_vcorr as dataFine_Corr " + + " FROM " + + " (SELECT deposito.cod_dtip, deposito.cod_mdep, " + + " MIN(documenti.data_doc) as primo_vcorr, " + + " DATEADD(dd, 1, MAX(documenti.data_doc)) as ultimo_vcorr " + + " FROM mtb_depo as deposito left outer join dtb_doct as documenti ON " + + " deposito.cod_mdep = documenti.cod_mdep and " + + " deposito.cod_dtip = documenti.cod_dtip " + + " WHERE deposito.cod_ccau is not null AND " + + " deposito.cod_ccon is not null AND " + + " deposito.cod_dtip is not null AND " + + " deposito.serie is not null " + + " GROUP BY deposito.cod_dtip, deposito.cod_mdep ) as dataUltVcor " + + " LEFT OUTER JOIN " + + " (SELECT dtb_tipi.cod_dtip, mtb_depo.cod_mdep, " + + " DATEADD(dd, 1, Max(ctb_movt.data_doc)) as ultimo_mov " + + " FROM ctb_movt, dtb_tipi, dtb_inum, mtb_depo " + + " WHERE ctb_movt.cod_ireg = dtb_tipi.cod_ireg AND " + + " ctb_movt.num_ireg = dtb_tipi.num_ireg AND " + + " dtb_tipi.cod_ireg = dtb_inum.cod_ireg AND " + + " dtb_tipi.num_ireg = dtb_inum.num_ireg AND " + + " dtb_tipi.cod_dtip = mtb_depo.cod_dtip AND " + + " ctb_movt.ser_doc = mtb_depo.serie AND " + + " ctb_movt.cod_ccau = mtb_depo.cod_ccau " + + " GROUP BY dtb_tipi.cod_dtip, mtb_depo.cod_mdep )as dataUltMov " + + " ON dataUltVcor.cod_dtip = dataUltMov.cod_dtip and dataUltVcor.cod_mdep = dataUltMov.cod_mdep" + + " LEFT OUTER JOIN " + + " (SELECT mtb_depo.cod_mdep, DATEADD(dd, 1, Max(ctb_movt.data_cmov)) as ultimo_mov " + + " FROM ctb_movt LEFT OUTER JOIN (SELECT value as cod_ccau " + + " FROM stb_gest_setup " + + " WHERE gest_name = " + setup.get("gestname") + " AND section = " + setup.get("section") + ") gst on ctb_movt.cod_ccau = gst.cod_ccau, " + + " mtb_depo, azienda " + + " WHERE ctb_movt.ser_doc = mtb_depo.serie " + + " GROUP BY mtb_depo.cod_mdep, azienda.anno_attuale ) as dataUltMovOp " + + " ON dataUltVcor.cod_mdep = dataUltMovOp.cod_mdep " + + "WHERE dataUltVcor.cod_mdep = " + UtilityDB.valueToString(codMdep); + + + ps = conn.prepareStatement(query); + rs = ps.executeQuery(); + if (rs.next()) { + String codDtip = rs.getString("cod_dtip"); + Date dataInizioCorr = rs.getDate("dataInizio_Corr"); + Date dataInizioOp = rs.getDate("dataInizio_Op"); + Date dataFineCorr = rs.getDate("dataFine_Corr"); + + BigDecimal daysCorr = UtilityDate.DaysAfter(dataInizioCorr, dataFineCorr); + BigDecimal daysOp = UtilityDate.DaysAfter(dataInizioOp, dataFineCorr); + + String dataFine = UtilityDB.valueDateToString(dataFineCorr, CommonConstants.DATE_FORMAT_YMD ); + if (daysCorr.compareTo(BigDecimal.ZERO) > 0){ + String dataInizCorr = UtilityDB.valueDateToString(dataInizioCorr, CommonConstants.DATE_FORMAT_YMD ); + String intervalloCorr = dataInizCorr + " AND " + dataFine; + importMovContVcorrFontSt(conn, codMdep, codDtip, intervalloCorr, setup, arrayNode); + } + + if (daysOp.compareTo(BigDecimal.ZERO) > 0){ + String dataInizOp = UtilityDB.valueDateToString(dataInizioOp, CommonConstants.DATE_FORMAT_YMD ); + String intervalloOp = dataInizOp + " AND " + dataFine; + importMovContScoFontSt(conn, codMdep, intervalloOp, setup, arrayNode); + } + }rs.close(); ps.close(); + + List respList = null; + if (arrayNode.size() > 0 ){ + StringWriter writer = new StringWriter(); + jsonObjectMapper.writeValue(writer, arrayNode); + + String jsonBody = writer.toString(); + respList = httpRestWrapper.callProcessEntityList(ds.getProfile(), username, password, jsonBody, false); + } + + return respList; + } + + private void importMovContScoFontSt(Connection conn, String codMdep, String intervalloOp, Map setup, ArrayNode arrayNode)throws Exception { + String query; + PreparedStatement ps; + ResultSet rs; + + query = "SELECT ntb_doct.date_only_doc as data_doc, gst_caus.causale, mtb_depo.serie, " + + " ntb_docp.tipo_inca, ntb_tipi_inca.cod_ccon, ABS(sum(ntb_docp.imp_paga)) as importo , " + + " CASE WHEN sum(ntb_docp.imp_paga) < 0 THEN ABS(sum(ntb_docp.imp_paga)) ELSE 0 END as imp_dare, " + + " CASE WHEN sum(ntb_docp.imp_paga)>= 0 THEN ABS(sum(ntb_docp.imp_paga)) ELSE 0 END as imp_avere, " + + " gst_contrp.tipo_inca_contrp, ntb_tipi_inca_controp.cod_ccon as cod_ccon_contrp, " + + " UPPER(SUBSTRING(SUBSTRING( isNull(ntb_docr.descrizione, isNull(ntb_tipi_inca.descrizione, '')), 1, 30) + ' NEG. ' + mtb_depo.citta, 1, 40)) as des_agg " + + " FROM ntb_doct left outer join ntb_docr on ntb_doct.cod_mdep = ntb_docr.cod_mdep and " + + " ntb_doct.cod_cassa = ntb_docr.cod_cassa and " + + " ntb_doct.data_doc = ntb_docr.data_doc, " + + " ntb_docp, mtb_depo, ntb_tipi_inca, ntb_tipi_inca as ntb_tipi_inca_controp, " + + " (SELECT SUBSTRING( key_section, 9, 5) as tipo_inca, value as causale " + + " FROM stb_gest_setup " + + " WHERE gest_name = " + setup.get("gestname") + " and " + + " section = " + setup.get("section") + " and key_section like " + setup.get("causale")+ ")gst_caus , " + + " (SELECT SUBSTRING( key_section, 15, 5) as tipo_inca, value as tipo_inca_contrp " + + " FROM stb_gest_setup " + + " WHERE gest_name = " + setup.get("gestname") + " and " + + " section = " + setup.get("section") + " and key_section like " + setup.get("contropartita") + ")gst_contrp " + + " WHERE ntb_doct.cod_mdep = " +UtilityDB.valueToString(codMdep) + " AND " + + " ntb_doct.data_doc between " + intervalloOp + " AND " + + " ntb_doct.cod_mdep = mtb_depo.cod_mdep AND " + + " ntb_doct.data_doc = ntb_docp.data_doc and " + + " ntb_doct.cod_cassa = ntb_docp.cod_cassa and " + + " ntb_doct.cod_mdep = ntb_docp.cod_mdep and " + + " ntb_docp.tipo_inca = ntb_tipi_inca.tipo_inca and " + + " ntb_docp.cod_mdep = ntb_tipi_inca.cod_mdep and " + + " ntb_docp.tipo_inca = gst_caus.tipo_inca and " + + " ntb_docp.tipo_inca = gst_contrp.tipo_inca and " + + " ntb_docp.cod_mdep = ntb_tipi_inca_controp.cod_mdep and " + + " gst_contrp.tipo_inca_contrp = ntb_tipi_inca_controp.tipo_inca " + + " GROUP BY ntb_doct.date_only_doc, ntb_docp.tipo_inca, gst_caus.causale, ntb_tipi_inca.cod_ccon, " + + " gst_contrp.tipo_inca_contrp, ntb_tipi_inca_controp.cod_ccon, mtb_depo.serie, mtb_depo.citta, " + + " ntb_tipi_inca.descrizione , ntb_docr.descrizione " + + " ORDER BY ntb_doct.date_only_doc"; + ps = conn.prepareStatement(query); + rs = ps.executeQuery(); + while (rs.next()) { + Date dataDoc = rs.getDate("data_doc"); + String causale = rs.getString("causale"); + String serie = rs.getString("serie"); + String tipoInca = rs.getString("tipo_inca"); + String codCcon = rs.getString("cod_ccon"); + BigDecimal importo = rs.getBigDecimal("importo"); + BigDecimal impDare = rs.getBigDecimal("imp_dare"); + BigDecimal impAvere = rs.getBigDecimal("imp_avere"); + String tipoIncaContrp = rs.getString("tipo_inca_contrp"); + String codCconContrp = rs.getString("cod_ccon_contrp"); + String desAgg = rs.getString("des_agg"); + + if(UtilityString.isNullOrEmpty(causale)) + throw new Exception("Causale non configurata per il tipo incasso" + tipoInca+ "."); + + if(UtilityString.isNullOrEmpty(codCcon)) + throw new Exception("Conto del P.D.C. non configurato per il tipo incasso " + tipoInca+ "."); + + if(UtilityString.isNullOrEmpty(tipoIncaContrp)) + throw new Exception("Tipo Incasso di contropartita non configurato per " + tipoInca + "."); + + + if(UtilityString.isNullOrEmpty(codCconContrp)) + throw new Exception("Conto del P.D.C. non configurato per il tipo incasso " + tipoIncaContrp + " di contropartita."); + + CtbMovt ctbMovt = new CtbMovt(); + ctbMovt.setOperation(OperationType.INSERT); + ctbMovt.setDataCmov(dataDoc); + ctbMovt.setCodCcau(causale); + ctbMovt.setSerDoc(serie); + ctbMovt.setImporto(importo); + + CtbMovr ctbMovr = new CtbMovr(); + ctbMovr.setCodCcon(codCcon); + ctbMovr.setImpDare(impDare); + ctbMovr.setImpAvere(impAvere); + ctbMovr.setDesAgg(desAgg); + ctbMovt.getCtbMovr().add(ctbMovr); + + //CONTROPARTITA + ctbMovr = new CtbMovr(); + ctbMovr.setCodCcon(codCconContrp); + ctbMovr.setImpDare(impAvere); + ctbMovr.setImpAvere(impDare); + ctbMovr.setDesAgg(desAgg); + ctbMovt.getCtbMovr().add(ctbMovr); + + arrayNode.addPOJO(ctbMovt); + }rs.close(); ps.close(); + + } + + private void importMovContVcorrFontSt(Connection conn, String codMdep, String codDtip, String intervalloCorr, Map setup, ArrayNode arrayNode) throws Exception { + PreparedStatement ps; + ResultSet rs; + String query; + + //SELEZIONE TESTATE CORRISPETTIVI + query = "SELECT dtb_doct.cod_anag, dtb_doct.data_doc, dtb_doct.ser_doc, dtb_doct.num_doc, " + + " dtb_doct.tot_imponib + dtb_doct.tot_iva as tot_corr, " + + " ctb_cont.cod_jfas, dtb_tipi.cod_ireg, dtb_tipi.num_ireg, " + + " mtb_depo.cod_ccau, mtb_depo.cod_ccon, 'CORRISPETTIVI '+ isNull(mtb_depo.citta, '') as des_agg " + + " FROM dtb_doct, dtb_tipi, ctb_ireg, mtb_depo, ctb_cont, ctb_grup " + + " WHERE dtb_doct.cod_dtip = dtb_tipi.cod_dtip AND " + + " dtb_tipi.cod_ireg = ctb_ireg.cod_ireg AND " + + " dtb_doct.cod_mdep = mtb_depo.cod_mdep AND " + + " ctb_grup.cod_cgrp = ctb_cont.cod_cgrp AND " + + " mtb_depo.cod_ccon = ctb_cont.cod_ccon AND " + + " mtb_depo.cod_dtip = dtb_tipi.cod_dtip AND " + + " dtb_doct.cod_mdep = " + UtilityDB.valueToString(codMdep) + " AND " + + " dtb_doct.cod_dtip = "+ UtilityDB.valueToString(codDtip) + " AND " + + " dtb_doct.data_doc between " + intervalloCorr + + " ORDER BY dtb_doct.cod_mdep," + + " dtb_doct.data_doc " ; + + ps = conn.prepareStatement(query); + rs = ps.executeQuery(); + while (rs.next()) { + String codAnag = rs.getString("cod_anag"); + Date dataDoc = rs.getDate("data_doc"); + String serDoc = rs.getString("ser_doc"); + Integer numDoc = rs.getInt("num_doc"); + BigDecimal totDoc = rs.getBigDecimal("tot_corr"); + String codJfas = rs.getString("cod_jfas"); + String codIreg = rs.getString("cod_ireg"); + Integer numIreg = rs.getInt("num_ireg"); + String codCcauVcor = rs.getString("cod_ccau"); + String codCconVcor = rs.getString("cod_ccon"); + String desAgg = rs.getString("des_agg"); + + List righeMov = new ArrayList(); + List castellettoIva = new ArrayList(); + + CtbMovt ctbMovt = new CtbMovt(); + ctbMovt.setOperation(OperationType.INSERT); + ctbMovt.setDataCmov(dataDoc); + ctbMovt.setCodCcau(codCcauVcor); + ctbMovt.setCodIreg(codIreg); + ctbMovt.setNumIreg(numIreg); + ctbMovt.setDataDoc(dataDoc); + ctbMovt.setSerDoc(serDoc); + ctbMovt.setNumDoc(numDoc); + ctbMovt.setCodAnag(codAnag); + ctbMovt.setImporto(totDoc); + + //CASTELLETTO IVA MERCE + query = + "SELECT dtb_docr.cod_aliq, " + + " gtb_aliq.perc_aliq, " + + " gtb_aliq.cod_ccon_ric, " + + " dtb_tipi.flag_prz_iva, " + + " CASE WHEN dtb_tipi.flag_prz_iva = 'S' THEN " + + " sum(round((dtb_docr.qta_doc * dtb_docr.val_unt_iva) * (1 - dtb_doct.sconto1/100) * (1 - dtb_doct.sconto2/100) * (1 - dtb_doct.sconto3/100) * (1 - dtb_doct.sconto4/100) * (1 - dtb_docr.sconto5/100) * (1 - dtb_docr.sconto6/100) * (1 - dtb_docr.sconto7/100) * (1 - dtb_docr.sconto8/100), 2)) " + + " ELSE " + + " sum(round((dtb_docr.qta_doc * dtb_docr.val_unt) * (1 - dtb_doct.sconto1/100) * (1 - dtb_doct.sconto2/100) * (1 - dtb_doct.sconto3/100) * (1 - dtb_doct.sconto4/100) * (1 - dtb_docr.sconto5/100) * (1 - dtb_docr.sconto6/100) * (1 - dtb_docr.sconto7/100) * (1 - dtb_docr.sconto8/100), 2)) " + + " END as imponibile " + + "FROM dtb_doct, " + + " dtb_docr, " + + " dtb_tipi," + + " gtb_aliq " + + "WHERE dtb_doct.data_doc = " + UtilityDB.valueDateToString(dataDoc, CommonConstants.DATE_FORMAT_YMD) + " AND " + + " dtb_doct.cod_dtip = " + UtilityDB.valueToString(codDtip) + " AND " + + " dtb_doct.cod_anag = " + UtilityDB.valueToString(codAnag) + " AND " + + " dtb_doct.ser_doc = " + UtilityDB.valueToString(serDoc) + " AND " + + " dtb_doct.num_doc = " + numDoc + " AND " + + " dtb_doct.cod_dtip = dtb_docr.cod_dtip AND " + + " dtb_doct.cod_anag = dtb_docr.cod_anag and " + + " dtb_doct.data_doc = dtb_docr.data_doc and " + + " dtb_doct.ser_doc = dtb_docr.ser_doc and " + + " dtb_doct.num_doc = dtb_docr.num_doc and " + + " dtb_docr.cod_dtip = dtb_tipi.cod_dtip and " + + " dtb_docr.cod_aliq = gtb_aliq.cod_aliq " + + "GROUP BY dtb_docr.cod_aliq, " + + " gtb_aliq.perc_aliq, " + + " gtb_aliq.cod_ccon_ric, " + + " dtb_tipi.flag_prz_iva "; + + BigDecimal imponibile = BigDecimal.ZERO; + PreparedStatement psIva = conn.prepareStatement(query); + ResultSet rsIva = psIva.executeQuery(); + while (rsIva.next()){ + String codAliq = rsIva.getString("cod_aliq"); + BigDecimal percAliq = rsIva.getBigDecimal("perc_aliq"); + String CconAliq = rsIva.getString("cod_ccon_ric"); + String flagIvaInclusa = rsIva.getString("flag_prz_iva"); + BigDecimal imponibAliquota = rsIva.getBigDecimal("imponibile"); + + BigDecimal imponibileIva = BigDecimal.ZERO, imposta = BigDecimal.ZERO; + + if("S".equals(flagIvaInclusa)){ + imponibileIva = imponibAliquota.divide(BigDecimal.ONE.add(percAliq.divide(new BigDecimal("100"))), 2, RoundingMode.HALF_UP); + imposta = imponibAliquota.subtract(imponibileIva).setScale(2, RoundingMode.HALF_UP); + } else { + imponibileIva = imponibAliquota; + imposta = imponibAliquota.multiply(percAliq.divide(new BigDecimal("100"))).setScale(2, RoundingMode.HALF_UP); + } + imponibile = imponibile.add(imponibileIva); + + // CTB_MOVI IVA MERCE + CtbMovi ctbMovi = new CtbMovi(); + ctbMovi.setCodAliq(codAliq); + ctbMovi.setImponibile(imponibileIva); + ctbMovi.setImposta(imposta); + castellettoIva.add(ctbMovi); + + // CTB_MOVR IVA + if (imposta.compareTo(BigDecimal.ZERO) > 0){ + CtbMovr ctbMovrIva = new CtbMovr(); + ctbMovrIva.setCodCcon(CconAliq); + ctbMovrIva.setImpAvere(imposta); + ctbMovrIva.setCodJfas(codJfas); + ctbMovrIva.setDesAgg(desAgg); + righeMov.add(ctbMovrIva); + } + }rsIva.close(); psIva.close(); + + // CTB_MOVR IMPONIBILE + CtbMovr ctbMovr = new CtbMovr(); + ctbMovr.setCodCcon(codCconVcor); + ctbMovr.setImpAvere(imponibile); + ctbMovr.setCodJfas(codJfas); + ctbMovr.setDesAgg(desAgg); + righeMov.add(ctbMovr); + + //CASTELLETTO IVA BUONI REGALO + query = "SELECT importo, gift.cod_aliq, gtb_aliq.perc_aliq " + + " FROM ntb_doct, gtb_aliq, " + + " (SELECT ntb_docr.data_doc, ntb_docr.cod_cassa, ntb_docr.cod_mdep, ntb_docr.prz_unt_iva as importo, ntb_docr.cod_aliq " + + " FROM ntb_docr,(SELECT value_string as reparto " + + " FROM dbo.parseStringIntoArray( " + + " dbo.getGestSetup(" +setup.get("gestname") + "," + setup.get("section")+ ", " + setup.get("reparto_gift") + " ) , '|') ) rep_gift " + + " WHERE ntb_docr.reparto = rep_gift.reparto " + + " UNION ALL " + + " SELECT ntb_docp.data_doc, ntb_docp.cod_cassa, ntb_docp.cod_mdep, -ntb_docp.imp_paga as importo, ntb_tipi_inca.cod_aliq " + + " FROM ntb_docp, ntb_tipi_inca " + + " WHERE ntb_tipi_inca.flag_gift_card = 'S' and " + + " ntb_docp.tipo_inca = ntb_tipi_inca.tipo_inca AND " + + " ntb_docp.cod_mdep = ntb_tipi_inca.cod_mdep ) gift " + + " WHERE ntb_doct.cod_anag_val = " + UtilityDB.valueToString(codAnag) + " AND " + + " ntb_doct.cod_dtip_val = " + UtilityDB.valueToString(codDtip) + " AND " + + " ntb_doct.data_doc_val = " + UtilityDB.valueDateToString(dataDoc, CommonConstants.DATE_FORMAT_YMD) + " AND " + + " ntb_doct.ser_doc_val = " + UtilityDB.valueToString(serDoc) + " AND " + + " ntb_doct.num_doc_val = " + numDoc + " AND " + + " ntb_doct.cod_mdep = " + UtilityDB.valueToString(codMdep) + " AND " + + " ntb_doct.data_doc = gift.data_doc AND " + + " ntb_doct.cod_cassa = gift.cod_cassa AND " + + " ntb_doct.cod_mdep = gift.cod_mdep AND" + + " gift.cod_aliq = gtb_aliq.cod_aliq "; + PreparedStatement psGift = conn.prepareStatement(query); + ResultSet rsGift = psGift.executeQuery(); + while (rsGift.next()){ + BigDecimal importo = rsGift.getBigDecimal("importo").setScale(2, RoundingMode.HALF_UP); + String codAliq = rsGift.getString("cod_aliq"); + BigDecimal percAliq = rsGift.getBigDecimal("perc_aliq"); + BigDecimal imposta = importo.multiply(percAliq.divide(new BigDecimal("100"))).setScale(2, RoundingMode.HALF_UP); + + // CTB_MOVI IVA BUONI REGALO + CtbMovi ctbMovi = new CtbMovi(); + ctbMovi.setCodAliq(codAliq); + ctbMovi.setImponibile(importo); + ctbMovi.setImposta(imposta); + castellettoIva.add(ctbMovi); + + }rsGift.close(); psGift.close(); + + + //CTB_MOVR EMISSIONE BUONI REGALO + query = "SELECT conto_gift.cod_ccon, sum(ntb_docr.prz_unt_iva) as importo " + + "FROM ntb_doct, ntb_docr, " + + " (SELECT value_string as reparto " + + " FROM stb_gest_setup CROSS APPLY dbo.parseStringIntoArray(stb_gest_setup.value, '|') " + + " WHERE gest_name = " + setup.get("gestname") + " AND " + + " section = " + setup.get("section") + " AND " + + " key_section = " + setup.get("reparto_gift") + ") rep_gift, " + + " (SELECT value as cod_ccon " + + " FROM stb_gest_setup " + + " WHERE gest_name = " + setup.get("gestname") + " AND " + + " section = " + setup.get("section") + " AND " + + " key_section = " + setup.get("conto_gift") + ") conto_gift " + + " WHERE ntb_doct.cod_anag_val = " + UtilityDB.valueToString(codAnag) + " AND " + + " ntb_doct.cod_dtip_val = " + UtilityDB.valueToString(codDtip) + " AND " + + " ntb_doct.data_doc_val = " + UtilityDB.valueDateToString(dataDoc, CommonConstants.DATE_FORMAT_YMD) + " AND " + + " ntb_doct.ser_doc_val = " + UtilityDB.valueToString(serDoc) + " AND " + + " ntb_doct.num_doc_val = " + numDoc + " AND " + + " ntb_doct.cod_mdep = " + UtilityDB.valueToString(codMdep) + " AND " + + " ntb_doct.data_doc = ntb_docr.data_doc AND " + + " ntb_doct.cod_cassa = ntb_docr.cod_cassa AND " + + " ntb_doct.cod_mdep = ntb_docr.cod_mdep AND " + + " ntb_docr.reparto = rep_gift.reparto " + + " Group by conto_gift.cod_ccon " + + " HAVING sum(ntb_docr.prz_unt_iva) <> 0 "; + psGift = conn.prepareStatement(query); + rsGift = psGift.executeQuery(); + if (rsGift.next()){ + String codCconGift = rsGift.getString("cod_ccon"); + BigDecimal importo = rsGift.getBigDecimal("importo").setScale(2, RoundingMode.HALF_UP); + + if (UtilityString.isNullOrEmpty(codCconGift)) + throw new Exception("Conto del P.D.C. non configurato per l'emissione dei buoni regalo."); + + CtbMovr ctbMovrGift = new CtbMovr(); + ctbMovrGift.setCodCcon(codCconGift); + ctbMovrGift.setImpAvere(importo); + ctbMovrGift.setCodJfas(codJfas); + ctbMovrGift.setDesAgg(desAgg); + righeMov.add(ctbMovrGift); + + }rsGift.close();psGift.close(); + + //CTB_MOVR INCASSI + query = "SELECT sum(ntb_docp.imp_paga) as imp_incasso, ntb_tipi_inca.cod_ccon " + + " FROM ntb_doct, ntb_docp left outer join ntb_tipi_inca on ntb_docp.tipo_inca = ntb_tipi_inca.tipo_inca AND " + + "ntb_docp.cod_mdep = ntb_tipi_inca.cod_mdep " + + " WHERE ntb_doct.cod_anag_val = " + UtilityDB.valueToString(codAnag) + " AND " + + " ntb_doct.cod_dtip_val = " + UtilityDB.valueToString(codDtip) + " AND " + + " ntb_doct.data_doc_val = " + UtilityDB.valueDateToString(dataDoc, CommonConstants.DATE_FORMAT_YMD) + " AND " + + " ntb_doct.ser_doc_val = " + UtilityDB.valueToString(serDoc) + " AND " + + " ntb_doct.num_doc_val = " + numDoc + " AND " + + " ntb_doct.cod_mdep = " + UtilityDB.valueToString(codMdep) + " AND " + + " ntb_doct.data_doc = ntb_docp.data_doc AND " + + " ntb_doct.cod_cassa = ntb_docp.cod_cassa AND " + + " ntb_doct.cod_mdep = ntb_docp.cod_mdep " + + " GROUP BY ntb_tipi_inca.cod_ccon " + + " HAVING sum(ntb_docp.imp_paga) <> 0 "; + PreparedStatement psInc = conn.prepareStatement(query); + ResultSet rsInc = psInc.executeQuery(); + while (rsInc.next()){ + BigDecimal impInca = rsInc.getBigDecimal("imp_incasso").setScale(2, RoundingMode.HALF_UP); + String CconInca = rsInc.getString("cod_ccon"); + + CtbMovr ctbMovrInc = new CtbMovr(); + ctbMovrInc.setCodCcon(CconInca); + ctbMovrInc.setImpDare(impInca); + ctbMovrInc.setCodJfas(codJfas); + ctbMovrInc.setDesAgg(desAgg); + righeMov.add(ctbMovrInc); + + }rsInc.close(); psInc.close(); + + //AGGANCIO CASTELLETTO IVA + if(castellettoIva.size() > 0 ) + ctbMovt.setCtbMovi(castellettoIva); + //AGGANCIO RIGHE MOVIMENTO + if(righeMov.size() > 0 ) + ctbMovt.setCtbMovr(righeMov); + //AGGIUNTA NODO MOVIMENTO + arrayNode.addPOJO(ctbMovt); + + }rs.close(); ps.close(); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/adapter/TimestampAdapter.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/adapter/TimestampAdapter.java new file mode 100644 index 0000000000..8829862386 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/adapter/TimestampAdapter.java @@ -0,0 +1,36 @@ +package it.integry.ems.contabil.sepa.adapter; + +import java.text.SimpleDateFormat; +import java.util.GregorianCalendar; + +import javax.xml.bind.annotation.adapters.XmlAdapter; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; + +public class TimestampAdapter extends XmlAdapter { + + private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); + + public TimestampAdapter() {} + + public TimestampAdapter(String format) { + dateFormat = new SimpleDateFormat(format); + } + + @Override + public String marshal(XMLGregorianCalendar v) throws Exception { + synchronized (dateFormat) { + return dateFormat.format(v.toGregorianCalendar().getTime()); + } + } + + @Override + public XMLGregorianCalendar unmarshal(String v) throws Exception { + synchronized (dateFormat) { + GregorianCalendar dataValGreg = new GregorianCalendar(); + dataValGreg.setTime(dateFormat.parse(v)); + return DatatypeFactory.newInstance().newXMLGregorianCalendar(dataValGreg); + } + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ActiveOrHistoricCurrencyAndAmount.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ActiveOrHistoricCurrencyAndAmount.java new file mode 100644 index 0000000000..d2e73aeed0 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ActiveOrHistoricCurrencyAndAmount.java @@ -0,0 +1,95 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.math.BigDecimal; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Classe Java per ActiveOrHistoricCurrencyAndAmount complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ActiveOrHistoricCurrencyAndAmount">
+ *   <simpleContent>
+ *     <extension base="<urn:CBI:xsd:CBIPaymentRequest.00.04.00>ActiveOrHistoricCurrencyAndAmount_SimpleType">
+ *       <attribute name="Ccy" use="required" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ActiveOrHistoricCurrencyCode" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ActiveOrHistoricCurrencyAndAmount", propOrder = { + "value" +}) +public class ActiveOrHistoricCurrencyAndAmount { + + @XmlValue + protected BigDecimal value; + @XmlAttribute(name = "Ccy", required = true) + protected String ccy; + + /** + * Recupera il valore della proprietà value. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getValue() { + return value; + } + + /** + * Imposta il valore della proprietà value. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setValue(BigDecimal value) { + this.value = value; + } + + /** + * Recupera il valore della proprietà ccy. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCcy() { + return ccy; + } + + /** + * Imposta il valore della proprietà ccy. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCcy(String value) { + this.ccy = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/AddressType2Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/AddressType2Code.java new file mode 100644 index 0000000000..6297362ad6 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/AddressType2Code.java @@ -0,0 +1,53 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per AddressType2Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="AddressType2Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="ADDR"/>
+ *     <enumeration value="PBOX"/>
+ *     <enumeration value="HOME"/>
+ *     <enumeration value="BIZZ"/>
+ *     <enumeration value="MLTO"/>
+ *     <enumeration value="DLVY"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "AddressType2Code") +@XmlEnum +public enum AddressType2Code { + + ADDR, + PBOX, + HOME, + BIZZ, + MLTO, + DLVY; + + public String value() { + return name(); + } + + public static AddressType2Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIAccountIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIAccountIdentification1.java new file mode 100644 index 0000000000..4c6055bd69 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIAccountIdentification1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIAccountIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIAccountIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="IBAN" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}IBAN2007Identifier"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIAccountIdentification1", propOrder = { + "iban" +}) +public class CBIAccountIdentification1 { + + @XmlElement(name = "IBAN", required = true) + protected String iban; + + /** + * Recupera il valore della proprietà iban. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIBAN() { + return iban; + } + + /** + * Imposta il valore della proprietà iban. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIBAN(String value) { + this.iban = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIAmountType1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIAmountType1.java new file mode 100644 index 0000000000..264120b14f --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIAmountType1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIAmountType1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIAmountType1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="InstdAmt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ActiveOrHistoricCurrencyAndAmount"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIAmountType1", propOrder = { + "instdAmt" +}) +public class CBIAmountType1 { + + @XmlElement(name = "InstdAmt", required = true) + protected ActiveOrHistoricCurrencyAndAmount instdAmt; + + /** + * Recupera il valore della proprietà instdAmt. + * + * @return + * possible object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public ActiveOrHistoricCurrencyAndAmount getInstdAmt() { + return instdAmt; + } + + /** + * Imposta il valore della proprietà instdAmt. + * + * @param value + * allowed object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public void setInstdAmt(ActiveOrHistoricCurrencyAndAmount value) { + this.instdAmt = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBdyPaymentRequest000400.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBdyPaymentRequest000400.java new file mode 100644 index 0000000000..95519cfe34 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBdyPaymentRequest000400.java @@ -0,0 +1,79 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIBdyPaymentRequest.00.04.00 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIBdyPaymentRequest.00.04.00">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CBIEnvelPaymentRequest" type="{urn:CBI:xsd:CBIBdyPaymentRequest.00.04.00}CBIEnvelPaymentRequest.00.04.00" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIBdyPaymentRequest.00.04.00", namespace = "urn:CBI:xsd:CBIBdyPaymentRequest.00.04.00", propOrder = { + "cbiEnvelPaymentRequest" +}) +@XmlRootElement(name="CBIBdyPaymentRequest") +public class CBIBdyPaymentRequest000400 { + + @XmlElement(name = "CBIEnvelPaymentRequest", required = true) + protected List cbiEnvelPaymentRequest; + + /** + * Gets the value of the cbiEnvelPaymentRequest property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the cbiEnvelPaymentRequest property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCBIEnvelPaymentRequest().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CBIEnvelPaymentRequest000400 } + * + * + */ + public List getCBIEnvelPaymentRequest() { + if (cbiEnvelPaymentRequest == null) { + cbiEnvelPaymentRequest = new ArrayList(); + } + return this.cbiEnvelPaymentRequest; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification1.java new file mode 100644 index 0000000000..b027b77e87 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIBranchAndFinancialInstitutionIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIBranchAndFinancialInstitutionIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="FinInstnId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIFinancialInstitutionIdentification1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIBranchAndFinancialInstitutionIdentification1", propOrder = { + "finInstnId" +}) +public class CBIBranchAndFinancialInstitutionIdentification1 { + + @XmlElement(name = "FinInstnId", required = true) + protected CBIFinancialInstitutionIdentification1 finInstnId; + + /** + * Recupera il valore della proprietà finInstnId. + * + * @return + * possible object is + * {@link CBIFinancialInstitutionIdentification1 } + * + */ + public CBIFinancialInstitutionIdentification1 getFinInstnId() { + return finInstnId; + } + + /** + * Imposta il valore della proprietà finInstnId. + * + * @param value + * allowed object is + * {@link CBIFinancialInstitutionIdentification1 } + * + */ + public void setFinInstnId(CBIFinancialInstitutionIdentification1 value) { + this.finInstnId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification2.java new file mode 100644 index 0000000000..aa5e35dade --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification2.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIBranchAndFinancialInstitutionIdentification2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIBranchAndFinancialInstitutionIdentification2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="FinInstnId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIFinancialInstitutionIdentification3"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIBranchAndFinancialInstitutionIdentification2", propOrder = { + "finInstnId" +}) +public class CBIBranchAndFinancialInstitutionIdentification2 { + + @XmlElement(name = "FinInstnId", required = true) + protected CBIFinancialInstitutionIdentification3 finInstnId; + + /** + * Recupera il valore della proprietà finInstnId. + * + * @return + * possible object is + * {@link CBIFinancialInstitutionIdentification3 } + * + */ + public CBIFinancialInstitutionIdentification3 getFinInstnId() { + return finInstnId; + } + + /** + * Imposta il valore della proprietà finInstnId. + * + * @param value + * allowed object is + * {@link CBIFinancialInstitutionIdentification3 } + * + */ + public void setFinInstnId(CBIFinancialInstitutionIdentification3 value) { + this.finInstnId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification3.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification3.java new file mode 100644 index 0000000000..47e6c851e9 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIBranchAndFinancialInstitutionIdentification3.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIBranchAndFinancialInstitutionIdentification3 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIBranchAndFinancialInstitutionIdentification3">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="FinInstnId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIFinancialInstitutionIdentification2"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIBranchAndFinancialInstitutionIdentification3", propOrder = { + "finInstnId" +}) +public class CBIBranchAndFinancialInstitutionIdentification3 { + + @XmlElement(name = "FinInstnId", required = true) + protected CBIFinancialInstitutionIdentification2 finInstnId; + + /** + * Recupera il valore della proprietà finInstnId. + * + * @return + * possible object is + * {@link CBIFinancialInstitutionIdentification2 } + * + */ + public CBIFinancialInstitutionIdentification2 getFinInstnId() { + return finInstnId; + } + + /** + * Imposta il valore della proprietà finInstnId. + * + * @param value + * allowed object is + * {@link CBIFinancialInstitutionIdentification2 } + * + */ + public void setFinInstnId(CBIFinancialInstitutionIdentification2 value) { + this.finInstnId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICashAccount1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICashAccount1.java new file mode 100644 index 0000000000..47767498bf --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICashAccount1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBICashAccount1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBICashAccount1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIAccountIdentification1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBICashAccount1", propOrder = { + "id" +}) +public class CBICashAccount1 { + + @XmlElement(name = "Id", required = true) + protected CBIAccountIdentification1 id; + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link CBIAccountIdentification1 } + * + */ + public CBIAccountIdentification1 getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link CBIAccountIdentification1 } + * + */ + public void setId(CBIAccountIdentification1 value) { + this.id = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICashAccount2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICashAccount2.java new file mode 100644 index 0000000000..c2eff3b7c6 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICashAccount2.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBICashAccount2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBICashAccount2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIAccountIdentification1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBICashAccount2", propOrder = { + "id" +}) +public class CBICashAccount2 { + + @XmlElement(name = "Id", required = true) + protected CBIAccountIdentification1 id; + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link CBIAccountIdentification1 } + * + */ + public CBIAccountIdentification1 getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link CBIAccountIdentification1 } + * + */ + public void setId(CBIAccountIdentification1 value) { + this.id = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIChargeBearerTypeCode.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIChargeBearerTypeCode.java new file mode 100644 index 0000000000..2861bc6216 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIChargeBearerTypeCode.java @@ -0,0 +1,43 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIChargeBearerTypeCode. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="CBIChargeBearerTypeCode">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="SLEV"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "CBIChargeBearerTypeCode") +@XmlEnum +public enum CBIChargeBearerTypeCode { + + SLEV; + + public String value() { + return name(); + } + + public static CBIChargeBearerTypeCode fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICheque1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICheque1.java new file mode 100644 index 0000000000..8de24306c6 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICheque1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBICheque1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBICheque1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ChqTp" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIChequeType1Code" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBICheque1", propOrder = { + "chqTp" +}) +public class CBICheque1 { + + @XmlElement(name = "ChqTp") + protected CBIChequeType1Code chqTp; + + /** + * Recupera il valore della proprietà chqTp. + * + * @return + * possible object is + * {@link CBIChequeType1Code } + * + */ + public CBIChequeType1Code getChqTp() { + return chqTp; + } + + /** + * Imposta il valore della proprietà chqTp. + * + * @param value + * allowed object is + * {@link CBIChequeType1Code } + * + */ + public void setChqTp(CBIChequeType1Code value) { + this.chqTp = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIChequeType1Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIChequeType1Code.java new file mode 100644 index 0000000000..a04d80c29e --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIChequeType1Code.java @@ -0,0 +1,45 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIChequeType1Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="CBIChequeType1Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="CCCH"/>
+ *     <enumeration value="BCHQ"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "CBIChequeType1Code") +@XmlEnum +public enum CBIChequeType1Code { + + CCCH, + BCHQ; + + public String value() { + return name(); + } + + public static CBIChequeType1Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIClearingSystemMemberIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIClearingSystemMemberIdentification1.java new file mode 100644 index 0000000000..cb012bd167 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIClearingSystemMemberIdentification1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIClearingSystemMemberIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIClearingSystemMemberIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MmbId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIClearingSystemMemberIdentification1", propOrder = { + "mmbId" +}) +public class CBIClearingSystemMemberIdentification1 { + + @XmlElement(name = "MmbId", required = true) + protected String mmbId; + + /** + * Recupera il valore della proprietà mmbId. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMmbId() { + return mmbId; + } + + /** + * Imposta il valore della proprietà mmbId. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMmbId(String value) { + this.mmbId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICreditTransferTransactionInformation.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICreditTransferTransactionInformation.java new file mode 100644 index 0000000000..3ddf4df4cd --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBICreditTransferTransactionInformation.java @@ -0,0 +1,473 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBICreditTransferTransactionInformation complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBICreditTransferTransactionInformation">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PmtId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}PaymentIdentification1"/>
+ *         <element name="PmtTpInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPaymentTypeInformation2" minOccurs="0"/>
+ *         <element name="Amt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIAmountType1"/>
+ *         <element name="ChqInstr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBICheque1" minOccurs="0"/>
+ *         <element name="UltmtDbtr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPartyIdentification2" minOccurs="0"/>
+ *         <element name="SrvInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBISrvInf1" minOccurs="0"/>
+ *         <element name="CdtrAgt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIBranchAndFinancialInstitutionIdentification3" minOccurs="0"/>
+ *         <element name="Cdtr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPartyIdentification3"/>
+ *         <element name="CdtrAcct" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBICashAccount2" minOccurs="0"/>
+ *         <element name="UltmtCdtr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPartyIdentification3" minOccurs="0"/>
+ *         <element name="DestCdtrRsp" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPartyIdentification5" minOccurs="0"/>
+ *         <element name="Purp" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Purpose1Choice" minOccurs="0"/>
+ *         <element name="RgltryRptg" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIRegulatoryReporting1" maxOccurs="3" minOccurs="0"/>
+ *         <element name="RltdRmtInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIRemittanceLocation1" maxOccurs="10" minOccurs="0"/>
+ *         <element name="RmtInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}RemittanceInformation5" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBICreditTransferTransactionInformation", propOrder = { + "pmtId", + "pmtTpInf", + "amt", + "chqInstr", + "ultmtDbtr", + "srvInf", + "cdtrAgt", + "cdtr", + "cdtrAcct", + "ultmtCdtr", + "destCdtrRsp", + "purp", + "rgltryRptg", + "rltdRmtInf", + "rmtInf" +}) +public class CBICreditTransferTransactionInformation { + + @XmlElement(name = "PmtId", required = true) + protected PaymentIdentification1 pmtId; + @XmlElement(name = "PmtTpInf") + protected CBIPaymentTypeInformation2 pmtTpInf; + @XmlElement(name = "Amt", required = true) + protected CBIAmountType1 amt; + @XmlElement(name = "ChqInstr") + protected CBICheque1 chqInstr; + @XmlElement(name = "UltmtDbtr") + protected CBIPartyIdentification2 ultmtDbtr; + @XmlElement(name = "SrvInf") + protected CBISrvInf1 srvInf; + @XmlElement(name = "CdtrAgt") + protected CBIBranchAndFinancialInstitutionIdentification3 cdtrAgt; + @XmlElement(name = "Cdtr", required = true) + protected CBIPartyIdentification3 cdtr; + @XmlElement(name = "CdtrAcct") + protected CBICashAccount2 cdtrAcct; + @XmlElement(name = "UltmtCdtr") + protected CBIPartyIdentification3 ultmtCdtr; + @XmlElement(name = "DestCdtrRsp") + protected CBIPartyIdentification5 destCdtrRsp; + @XmlElement(name = "Purp") + protected Purpose1Choice purp; + @XmlElement(name = "RgltryRptg") + protected List rgltryRptg; + @XmlElement(name = "RltdRmtInf") + protected List rltdRmtInf; + @XmlElement(name = "RmtInf") + protected RemittanceInformation5 rmtInf; + + /** + * Recupera il valore della proprietà pmtId. + * + * @return + * possible object is + * {@link PaymentIdentification1 } + * + */ + public PaymentIdentification1 getPmtId() { + return pmtId; + } + + /** + * Imposta il valore della proprietà pmtId. + * + * @param value + * allowed object is + * {@link PaymentIdentification1 } + * + */ + public void setPmtId(PaymentIdentification1 value) { + this.pmtId = value; + } + + /** + * Recupera il valore della proprietà pmtTpInf. + * + * @return + * possible object is + * {@link CBIPaymentTypeInformation2 } + * + */ + public CBIPaymentTypeInformation2 getPmtTpInf() { + return pmtTpInf; + } + + /** + * Imposta il valore della proprietà pmtTpInf. + * + * @param value + * allowed object is + * {@link CBIPaymentTypeInformation2 } + * + */ + public void setPmtTpInf(CBIPaymentTypeInformation2 value) { + this.pmtTpInf = value; + } + + /** + * Recupera il valore della proprietà amt. + * + * @return + * possible object is + * {@link CBIAmountType1 } + * + */ + public CBIAmountType1 getAmt() { + return amt; + } + + /** + * Imposta il valore della proprietà amt. + * + * @param value + * allowed object is + * {@link CBIAmountType1 } + * + */ + public void setAmt(CBIAmountType1 value) { + this.amt = value; + } + + /** + * Recupera il valore della proprietà chqInstr. + * + * @return + * possible object is + * {@link CBICheque1 } + * + */ + public CBICheque1 getChqInstr() { + return chqInstr; + } + + /** + * Imposta il valore della proprietà chqInstr. + * + * @param value + * allowed object is + * {@link CBICheque1 } + * + */ + public void setChqInstr(CBICheque1 value) { + this.chqInstr = value; + } + + /** + * Recupera il valore della proprietà ultmtDbtr. + * + * @return + * possible object is + * {@link CBIPartyIdentification2 } + * + */ + public CBIPartyIdentification2 getUltmtDbtr() { + return ultmtDbtr; + } + + /** + * Imposta il valore della proprietà ultmtDbtr. + * + * @param value + * allowed object is + * {@link CBIPartyIdentification2 } + * + */ + public void setUltmtDbtr(CBIPartyIdentification2 value) { + this.ultmtDbtr = value; + } + + /** + * Recupera il valore della proprietà srvInf. + * + * @return + * possible object is + * {@link CBISrvInf1 } + * + */ + public CBISrvInf1 getSrvInf() { + return srvInf; + } + + /** + * Imposta il valore della proprietà srvInf. + * + * @param value + * allowed object is + * {@link CBISrvInf1 } + * + */ + public void setSrvInf(CBISrvInf1 value) { + this.srvInf = value; + } + + /** + * Recupera il valore della proprietà cdtrAgt. + * + * @return + * possible object is + * {@link CBIBranchAndFinancialInstitutionIdentification3 } + * + */ + public CBIBranchAndFinancialInstitutionIdentification3 getCdtrAgt() { + return cdtrAgt; + } + + /** + * Imposta il valore della proprietà cdtrAgt. + * + * @param value + * allowed object is + * {@link CBIBranchAndFinancialInstitutionIdentification3 } + * + */ + public void setCdtrAgt(CBIBranchAndFinancialInstitutionIdentification3 value) { + this.cdtrAgt = value; + } + + /** + * Recupera il valore della proprietà cdtr. + * + * @return + * possible object is + * {@link CBIPartyIdentification3 } + * + */ + public CBIPartyIdentification3 getCdtr() { + return cdtr; + } + + /** + * Imposta il valore della proprietà cdtr. + * + * @param value + * allowed object is + * {@link CBIPartyIdentification3 } + * + */ + public void setCdtr(CBIPartyIdentification3 value) { + this.cdtr = value; + } + + /** + * Recupera il valore della proprietà cdtrAcct. + * + * @return + * possible object is + * {@link CBICashAccount2 } + * + */ + public CBICashAccount2 getCdtrAcct() { + return cdtrAcct; + } + + /** + * Imposta il valore della proprietà cdtrAcct. + * + * @param value + * allowed object is + * {@link CBICashAccount2 } + * + */ + public void setCdtrAcct(CBICashAccount2 value) { + this.cdtrAcct = value; + } + + /** + * Recupera il valore della proprietà ultmtCdtr. + * + * @return + * possible object is + * {@link CBIPartyIdentification3 } + * + */ + public CBIPartyIdentification3 getUltmtCdtr() { + return ultmtCdtr; + } + + /** + * Imposta il valore della proprietà ultmtCdtr. + * + * @param value + * allowed object is + * {@link CBIPartyIdentification3 } + * + */ + public void setUltmtCdtr(CBIPartyIdentification3 value) { + this.ultmtCdtr = value; + } + + /** + * Recupera il valore della proprietà destCdtrRsp. + * + * @return + * possible object is + * {@link CBIPartyIdentification5 } + * + */ + public CBIPartyIdentification5 getDestCdtrRsp() { + return destCdtrRsp; + } + + /** + * Imposta il valore della proprietà destCdtrRsp. + * + * @param value + * allowed object is + * {@link CBIPartyIdentification5 } + * + */ + public void setDestCdtrRsp(CBIPartyIdentification5 value) { + this.destCdtrRsp = value; + } + + /** + * Recupera il valore della proprietà purp. + * + * @return + * possible object is + * {@link Purpose1Choice } + * + */ + public Purpose1Choice getPurp() { + return purp; + } + + /** + * Imposta il valore della proprietà purp. + * + * @param value + * allowed object is + * {@link Purpose1Choice } + * + */ + public void setPurp(Purpose1Choice value) { + this.purp = value; + } + + /** + * Gets the value of the rgltryRptg property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the rgltryRptg property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRgltryRptg().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CBIRegulatoryReporting1 } + * + * + */ + public List getRgltryRptg() { + if (rgltryRptg == null) { + rgltryRptg = new ArrayList(); + } + return this.rgltryRptg; + } + + /** + * Gets the value of the rltdRmtInf property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the rltdRmtInf property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRltdRmtInf().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CBIRemittanceLocation1 } + * + * + */ + public List getRltdRmtInf() { + if (rltdRmtInf == null) { + rltdRmtInf = new ArrayList(); + } + return this.rltdRmtInf; + } + + /** + * Recupera il valore della proprietà rmtInf. + * + * @return + * possible object is + * {@link RemittanceInformation5 } + * + */ + public RemittanceInformation5 getRmtInf() { + return rmtInf; + } + + /** + * Imposta il valore della proprietà rmtInf. + * + * @param value + * allowed object is + * {@link RemittanceInformation5 } + * + */ + public void setRmtInf(RemittanceInformation5 value) { + this.rmtInf = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIEnvelPaymentRequest000400.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIEnvelPaymentRequest000400.java new file mode 100644 index 0000000000..a36b613c87 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIEnvelPaymentRequest000400.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIEnvelPaymentRequest.00.04.00 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIEnvelPaymentRequest.00.04.00">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <choice>
+ *         <element name="CBIPaymentRequest" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPaymentRequest.00.04.00"/>
+ *         <element name="CBISgnInf" type="{urn:CBI:xsd:CBISgnInf.001.04}CBISgnInf.001.04"/>
+ *       </choice>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIEnvelPaymentRequest.00.04.00", namespace = "urn:CBI:xsd:CBIBdyPaymentRequest.00.04.00", propOrder = { + "cbiPaymentRequest", + "cbiSgnInf" +}) +public class CBIEnvelPaymentRequest000400 { + + @XmlElement(name = "CBIPaymentRequest") + protected CBIPaymentRequest000400 cbiPaymentRequest; + @XmlElement(name = "CBISgnInf") + protected CBISgnInf00104 cbiSgnInf; + + /** + * Recupera il valore della proprietà cbiPaymentRequest. + * + * @return + * possible object is + * {@link CBIPaymentRequest000400 } + * + */ + public CBIPaymentRequest000400 getCBIPaymentRequest() { + return cbiPaymentRequest; + } + + /** + * Imposta il valore della proprietà cbiPaymentRequest. + * + * @param value + * allowed object is + * {@link CBIPaymentRequest000400 } + * + */ + public void setCBIPaymentRequest(CBIPaymentRequest000400 value) { + this.cbiPaymentRequest = value; + } + + /** + * Recupera il valore della proprietà cbiSgnInf. + * + * @return + * possible object is + * {@link CBISgnInf00104 } + * + */ + public CBISgnInf00104 getCBISgnInf() { + return cbiSgnInf; + } + + /** + * Imposta il valore della proprietà cbiSgnInf. + * + * @param value + * allowed object is + * {@link CBISgnInf00104 } + * + */ + public void setCBISgnInf(CBISgnInf00104 value) { + this.cbiSgnInf = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification1.java new file mode 100644 index 0000000000..a81795e3a4 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIFinancialInstitutionIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIFinancialInstitutionIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ClrSysMmbId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIClearingSystemMemberIdentification1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIFinancialInstitutionIdentification1", propOrder = { + "clrSysMmbId" +}) +public class CBIFinancialInstitutionIdentification1 { + + @XmlElement(name = "ClrSysMmbId", required = true) + protected CBIClearingSystemMemberIdentification1 clrSysMmbId; + + /** + * Recupera il valore della proprietà clrSysMmbId. + * + * @return + * possible object is + * {@link CBIClearingSystemMemberIdentification1 } + * + */ + public CBIClearingSystemMemberIdentification1 getClrSysMmbId() { + return clrSysMmbId; + } + + /** + * Imposta il valore della proprietà clrSysMmbId. + * + * @param value + * allowed object is + * {@link CBIClearingSystemMemberIdentification1 } + * + */ + public void setClrSysMmbId(CBIClearingSystemMemberIdentification1 value) { + this.clrSysMmbId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification2.java new file mode 100644 index 0000000000..0ccae77dbd --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification2.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIFinancialInstitutionIdentification2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIFinancialInstitutionIdentification2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="BIC" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}BICIdentifier"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIFinancialInstitutionIdentification2", propOrder = { + "bic" +}) +public class CBIFinancialInstitutionIdentification2 { + + @XmlElement(name = "BIC", required = true) + protected String bic; + + /** + * Recupera il valore della proprietà bic. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBIC() { + return bic; + } + + /** + * Imposta il valore della proprietà bic. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBIC(String value) { + this.bic = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification3.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification3.java new file mode 100644 index 0000000000..b20c626fd2 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIFinancialInstitutionIdentification3.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIFinancialInstitutionIdentification3 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIFinancialInstitutionIdentification3">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="BIC" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}BICIdentifier" minOccurs="0"/>
+ *         <element name="ClrSysMmbId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIClearingSystemMemberIdentification1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIFinancialInstitutionIdentification3", propOrder = { + "bic", + "clrSysMmbId" +}) +public class CBIFinancialInstitutionIdentification3 { + + @XmlElement(name = "BIC") + protected String bic; + @XmlElement(name = "ClrSysMmbId", required = true) + protected CBIClearingSystemMemberIdentification1 clrSysMmbId; + + /** + * Recupera il valore della proprietà bic. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBIC() { + return bic; + } + + /** + * Imposta il valore della proprietà bic. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBIC(String value) { + this.bic = value; + } + + /** + * Recupera il valore della proprietà clrSysMmbId. + * + * @return + * possible object is + * {@link CBIClearingSystemMemberIdentification1 } + * + */ + public CBIClearingSystemMemberIdentification1 getClrSysMmbId() { + return clrSysMmbId; + } + + /** + * Imposta il valore della proprietà clrSysMmbId. + * + * @param value + * allowed object is + * {@link CBIClearingSystemMemberIdentification1 } + * + */ + public void setClrSysMmbId(CBIClearingSystemMemberIdentification1 value) { + this.clrSysMmbId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGenericIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGenericIdentification1.java new file mode 100644 index 0000000000..3458d08a43 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGenericIdentification1.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIGenericIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIGenericIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         <element name="Issr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIGenericIdentification1", propOrder = { + "id", + "issr" +}) +public class CBIGenericIdentification1 { + + @XmlElement(name = "Id", required = true) + protected String id; + @XmlElement(name = "Issr") + protected String issr; + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà issr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssr() { + return issr; + } + + /** + * Imposta il valore della proprietà issr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssr(String value) { + this.issr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGenericIdentification2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGenericIdentification2.java new file mode 100644 index 0000000000..eebf9f80bf --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGenericIdentification2.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIGenericIdentification2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIGenericIdentification2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         <element name="Issr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIGenericIdentification2", propOrder = { + "id", + "issr" +}) +public class CBIGenericIdentification2 { + + @XmlElement(name = "Id", required = true) + protected String id; + @XmlElement(name = "Issr", required = true) + protected String issr; + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà issr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssr() { + return issr; + } + + /** + * Imposta il valore della proprietà issr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssr(String value) { + this.issr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGroupHeader.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGroupHeader.java new file mode 100644 index 0000000000..1a9f12ea8e --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIGroupHeader.java @@ -0,0 +1,216 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import it.integry.ems.contabil.sepa.adapter.TimestampAdapter; + +import java.math.BigDecimal; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Classe Java per CBIGroupHeader complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIGroupHeader">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MsgId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         <element name="CreDtTm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ISODateTime"/>
+ *         <element name="NbOfTxs" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max15NumericText"/>
+ *         <element name="CtrlSum" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}DecimalNumber"/>
+ *         <element name="InitgPty" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPartyIdentification1"/>
+ *         <element name="FwdgAgt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIBranchAndFinancialInstitutionIdentification1" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIGroupHeader", propOrder = { + "msgId", + "creDtTm", + "nbOfTxs", + "ctrlSum", + "initgPty", + "fwdgAgt" +}) +public class CBIGroupHeader { + + @XmlElement(name = "MsgId", required = true) + protected String msgId; + @XmlJavaTypeAdapter(TimestampAdapter.class) + @XmlElement(name = "CreDtTm", required = true) + protected XMLGregorianCalendar creDtTm; + @XmlElement(name = "NbOfTxs", required = true) + protected String nbOfTxs; + @XmlElement(name = "CtrlSum", required = true) + protected BigDecimal ctrlSum; + @XmlElement(name = "InitgPty", required = true) + protected CBIPartyIdentification1 initgPty; + @XmlElement(name = "FwdgAgt") + protected CBIBranchAndFinancialInstitutionIdentification1 fwdgAgt; + + /** + * Recupera il valore della proprietà msgId. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMsgId() { + return msgId; + } + + /** + * Imposta il valore della proprietà msgId. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMsgId(String value) { + this.msgId = value; + } + + /** + * Recupera il valore della proprietà creDtTm. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getCreDtTm() { + return creDtTm; + } + + /** + * Imposta il valore della proprietà creDtTm. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setCreDtTm(XMLGregorianCalendar value) { + this.creDtTm = value; + } + + /** + * Recupera il valore della proprietà nbOfTxs. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNbOfTxs() { + return nbOfTxs; + } + + /** + * Imposta il valore della proprietà nbOfTxs. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNbOfTxs(String value) { + this.nbOfTxs = value; + } + + /** + * Recupera il valore della proprietà ctrlSum. + * + * @return + * possible object is + * {@link BigDecimal } + * + */ + public BigDecimal getCtrlSum() { + return ctrlSum; + } + + /** + * Imposta il valore della proprietà ctrlSum. + * + * @param value + * allowed object is + * {@link BigDecimal } + * + */ + public void setCtrlSum(BigDecimal value) { + this.ctrlSum = value; + } + + /** + * Recupera il valore della proprietà initgPty. + * + * @return + * possible object is + * {@link CBIPartyIdentification1 } + * + */ + public CBIPartyIdentification1 getInitgPty() { + return initgPty; + } + + /** + * Imposta il valore della proprietà initgPty. + * + * @param value + * allowed object is + * {@link CBIPartyIdentification1 } + * + */ + public void setInitgPty(CBIPartyIdentification1 value) { + this.initgPty = value; + } + + /** + * Recupera il valore della proprietà fwdgAgt. + * + * @return + * possible object is + * {@link CBIBranchAndFinancialInstitutionIdentification1 } + * + */ + public CBIBranchAndFinancialInstitutionIdentification1 getFwdgAgt() { + return fwdgAgt; + } + + /** + * Imposta il valore della proprietà fwdgAgt. + * + * @param value + * allowed object is + * {@link CBIBranchAndFinancialInstitutionIdentification1 } + * + */ + public void setFwdgAgt(CBIBranchAndFinancialInstitutionIdentification1 value) { + this.fwdgAgt = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIHdrSrv00107.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIHdrSrv00107.java new file mode 100644 index 0000000000..425d512b0b --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIHdrSrv00107.java @@ -0,0 +1,181 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIHdrSrv.001.07 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIHdrSrv.001.07">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SrvInfo" type="{urn:CBI:xsd:CBIHdrSrv.001.07}ServiceInformation"/>
+ *         <element name="Sender" type="{urn:CBI:xsd:CBIHdrSrv.001.07}SenderInformation"/>
+ *         <element name="Receiver" type="{urn:CBI:xsd:CBIHdrSrv.001.07}ReceiverInformation"/>
+ *         <element name="DiagInfo" type="{urn:CBI:xsd:CBIHdrSrv.001.07}DiagnosticInformation"/>
+ *         <element name="CongrInfo" type="{urn:CBI:xsd:CBIHdrSrv.001.07}CongruencyInformation"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIHdrSrv.001.07", namespace = "urn:CBI:xsd:CBIHdrSrv.001.07", propOrder = { + "srvInfo", + "sender", + "receiver", + "diagInfo", + "congrInfo" +}) +public class CBIHdrSrv00107 { + + @XmlElement(name = "SrvInfo", required = true) + protected ServiceInformation srvInfo; + @XmlElement(name = "Sender", required = true) + protected SenderInformation sender; + @XmlElement(name = "Receiver", required = true) + protected ReceiverInformation receiver; + @XmlElement(name = "DiagInfo", required = true) + protected DiagnosticInformation diagInfo; + @XmlElement(name = "CongrInfo", required = true) + protected CongruencyInformation congrInfo; + + /** + * Recupera il valore della proprietà srvInfo. + * + * @return + * possible object is + * {@link ServiceInformation } + * + */ + public ServiceInformation getSrvInfo() { + return srvInfo; + } + + /** + * Imposta il valore della proprietà srvInfo. + * + * @param value + * allowed object is + * {@link ServiceInformation } + * + */ + public void setSrvInfo(ServiceInformation value) { + this.srvInfo = value; + } + + /** + * Recupera il valore della proprietà sender. + * + * @return + * possible object is + * {@link SenderInformation } + * + */ + public SenderInformation getSender() { + return sender; + } + + /** + * Imposta il valore della proprietà sender. + * + * @param value + * allowed object is + * {@link SenderInformation } + * + */ + public void setSender(SenderInformation value) { + this.sender = value; + } + + /** + * Recupera il valore della proprietà receiver. + * + * @return + * possible object is + * {@link ReceiverInformation } + * + */ + public ReceiverInformation getReceiver() { + return receiver; + } + + /** + * Imposta il valore della proprietà receiver. + * + * @param value + * allowed object is + * {@link ReceiverInformation } + * + */ + public void setReceiver(ReceiverInformation value) { + this.receiver = value; + } + + /** + * Recupera il valore della proprietà diagInfo. + * + * @return + * possible object is + * {@link DiagnosticInformation } + * + */ + public DiagnosticInformation getDiagInfo() { + return diagInfo; + } + + /** + * Imposta il valore della proprietà diagInfo. + * + * @param value + * allowed object is + * {@link DiagnosticInformation } + * + */ + public void setDiagInfo(DiagnosticInformation value) { + this.diagInfo = value; + } + + /** + * Recupera il valore della proprietà congrInfo. + * + * @return + * possible object is + * {@link CongruencyInformation } + * + */ + public CongruencyInformation getCongrInfo() { + return congrInfo; + } + + /** + * Imposta il valore della proprietà congrInfo. + * + * @param value + * allowed object is + * {@link CongruencyInformation } + * + */ + public void setCongrInfo(CongruencyInformation value) { + this.congrInfo = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIHdrTrt00107.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIHdrTrt00107.java new file mode 100644 index 0000000000..507adefd34 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIHdrTrt00107.java @@ -0,0 +1,210 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Classe Java per CBIHdrTrt.001.07 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIHdrTrt.001.07">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="IdCBISndrf" type="{urn:CBI:xsd:CBIHdrTrt.001.07}CBIIdentifier"/>
+ *         <element name="IdCBIRcvrf" type="{urn:CBI:xsd:CBIHdrTrt.001.07}CBIIdentifier"/>
+ *         <element name="SrvNm" type="{urn:CBI:xsd:CBIHdrTrt.001.07}ServiceName"/>
+ *         <element name="IdMsgTrt" type="{urn:CBI:xsd:CBIHdrTrt.001.07}IdMsgTrt1"/>
+ *         <element name="XMLCrtDt" type="{urn:CBI:xsd:CBIHdrTrt.001.07}ISODateTime"/>
+ *         <element name="RtrnAddrl" type="{urn:CBI:xsd:CBIHdrTrt.001.07}RtrnAddrl1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIHdrTrt.001.07", namespace = "urn:CBI:xsd:CBIHdrTrt.001.07", propOrder = { + "idCBISndrf", + "idCBIRcvrf", + "srvNm", + "idMsgTrt", + "xmlCrtDt", + "rtrnAddrl" +}) +public class CBIHdrTrt00107 { + + @XmlElement(name = "IdCBISndrf", required = true) + protected String idCBISndrf; + @XmlElement(name = "IdCBIRcvrf", required = true) + protected String idCBIRcvrf; + @XmlElement(name = "SrvNm", required = true) + protected ServiceName srvNm; + @XmlElement(name = "IdMsgTrt", required = true) + protected String idMsgTrt; + @XmlElement(name = "XMLCrtDt", required = true) + protected XMLGregorianCalendar xmlCrtDt; + @XmlElement(name = "RtrnAddrl", required = true) + protected String rtrnAddrl; + + /** + * Recupera il valore della proprietà idCBISndrf. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdCBISndrf() { + return idCBISndrf; + } + + /** + * Imposta il valore della proprietà idCBISndrf. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdCBISndrf(String value) { + this.idCBISndrf = value; + } + + /** + * Recupera il valore della proprietà idCBIRcvrf. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdCBIRcvrf() { + return idCBIRcvrf; + } + + /** + * Imposta il valore della proprietà idCBIRcvrf. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdCBIRcvrf(String value) { + this.idCBIRcvrf = value; + } + + /** + * Recupera il valore della proprietà srvNm. + * + * @return + * possible object is + * {@link ServiceName } + * + */ + public ServiceName getSrvNm() { + return srvNm; + } + + /** + * Imposta il valore della proprietà srvNm. + * + * @param value + * allowed object is + * {@link ServiceName } + * + */ + public void setSrvNm(ServiceName value) { + this.srvNm = value; + } + + /** + * Recupera il valore della proprietà idMsgTrt. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdMsgTrt() { + return idMsgTrt; + } + + /** + * Imposta il valore della proprietà idMsgTrt. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdMsgTrt(String value) { + this.idMsgTrt = value; + } + + /** + * Recupera il valore della proprietà xmlCrtDt. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getXMLCrtDt() { + return xmlCrtDt; + } + + /** + * Imposta il valore della proprietà xmlCrtDt. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setXMLCrtDt(XMLGregorianCalendar value) { + this.xmlCrtDt = value; + } + + /** + * Recupera il valore della proprietà rtrnAddrl. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRtrnAddrl() { + return rtrnAddrl; + } + + /** + * Imposta il valore della proprietà rtrnAddrl. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRtrnAddrl(String value) { + this.rtrnAddrl = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType1.java new file mode 100644 index 0000000000..ff93ebd75a --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIIdType1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIIdType1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OrgId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIOrganisationIdentification1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIIdType1", propOrder = { + "orgId" +}) +public class CBIIdType1 { + + @XmlElement(name = "OrgId", required = true) + protected CBIOrganisationIdentification1 orgId; + + /** + * Recupera il valore della proprietà orgId. + * + * @return + * possible object is + * {@link CBIOrganisationIdentification1 } + * + */ + public CBIOrganisationIdentification1 getOrgId() { + return orgId; + } + + /** + * Imposta il valore della proprietà orgId. + * + * @param value + * allowed object is + * {@link CBIOrganisationIdentification1 } + * + */ + public void setOrgId(CBIOrganisationIdentification1 value) { + this.orgId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType2.java new file mode 100644 index 0000000000..9d5972a6cd --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType2.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIIdType2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIIdType2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OrgId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIOrganisationIdentification3"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIIdType2", propOrder = { + "orgId" +}) +public class CBIIdType2 { + + @XmlElement(name = "OrgId", required = true) + protected CBIOrganisationIdentification3 orgId; + + /** + * Recupera il valore della proprietà orgId. + * + * @return + * possible object is + * {@link CBIOrganisationIdentification3 } + * + */ + public CBIOrganisationIdentification3 getOrgId() { + return orgId; + } + + /** + * Imposta il valore della proprietà orgId. + * + * @param value + * allowed object is + * {@link CBIOrganisationIdentification3 } + * + */ + public void setOrgId(CBIOrganisationIdentification3 value) { + this.orgId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType3.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType3.java new file mode 100644 index 0000000000..a8de4b6d6a --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIIdType3.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIIdType3 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIIdType3">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="OrgId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIOrganisationIdentification4"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIIdType3", propOrder = { + "orgId" +}) +public class CBIIdType3 { + + @XmlElement(name = "OrgId", required = true) + protected CBIOrganisationIdentification4 orgId; + + /** + * Recupera il valore della proprietà orgId. + * + * @return + * possible object is + * {@link CBIOrganisationIdentification4 } + * + */ + public CBIOrganisationIdentification4 getOrgId() { + return orgId; + } + + /** + * Imposta il valore della proprietà orgId. + * + * @param value + * allowed object is + * {@link CBIOrganisationIdentification4 } + * + */ + public void setOrgId(CBIOrganisationIdentification4 value) { + this.orgId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBILocalInstrument1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBILocalInstrument1.java new file mode 100644 index 0000000000..f58802e8c8 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBILocalInstrument1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBILocalInstrument1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBILocalInstrument1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Prtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBILocalInstrument1", propOrder = { + "prtry" +}) +public class CBILocalInstrument1 { + + @XmlElement(name = "Prtry", required = true) + protected String prtry; + + /** + * Recupera il valore della proprietà prtry. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrtry() { + return prtry; + } + + /** + * Imposta il valore della proprietà prtry. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrtry(String value) { + this.prtry = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification1.java new file mode 100644 index 0000000000..33a55e1a01 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification1.java @@ -0,0 +1,76 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIOrganisationIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIOrganisationIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Othr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIGenericIdentification1" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIOrganisationIdentification1", propOrder = { + "othr" +}) +public class CBIOrganisationIdentification1 { + + @XmlElement(name = "Othr", required = true) + protected List othr; + + /** + * Gets the value of the othr property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the othr property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOthr().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CBIGenericIdentification1 } + * + * + */ + public List getOthr() { + if (othr == null) { + othr = new ArrayList(); + } + return this.othr; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification2.java new file mode 100644 index 0000000000..29906edb3d --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification2.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIOrganisationIdentification2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIOrganisationIdentification2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="BICOrBEI" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}AnyBICIdentifier"/>
+ *           <element name="Othr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIGenericIdentification1"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIOrganisationIdentification2", propOrder = { + "bicOrBEI", + "othr" +}) +public class CBIOrganisationIdentification2 { + + @XmlElement(name = "BICOrBEI") + protected String bicOrBEI; + @XmlElement(name = "Othr") + protected CBIGenericIdentification1 othr; + + /** + * Recupera il valore della proprietà bicOrBEI. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBICOrBEI() { + return bicOrBEI; + } + + /** + * Imposta il valore della proprietà bicOrBEI. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBICOrBEI(String value) { + this.bicOrBEI = value; + } + + /** + * Recupera il valore della proprietà othr. + * + * @return + * possible object is + * {@link CBIGenericIdentification1 } + * + */ + public CBIGenericIdentification1 getOthr() { + return othr; + } + + /** + * Imposta il valore della proprietà othr. + * + * @param value + * allowed object is + * {@link CBIGenericIdentification1 } + * + */ + public void setOthr(CBIGenericIdentification1 value) { + this.othr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification3.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification3.java new file mode 100644 index 0000000000..813a102db3 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification3.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIOrganisationIdentification3 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIOrganisationIdentification3">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Othr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIGenericIdentification1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIOrganisationIdentification3", propOrder = { + "othr" +}) +public class CBIOrganisationIdentification3 { + + @XmlElement(name = "Othr", required = true) + protected CBIGenericIdentification1 othr; + + /** + * Recupera il valore della proprietà othr. + * + * @return + * possible object is + * {@link CBIGenericIdentification1 } + * + */ + public CBIGenericIdentification1 getOthr() { + return othr; + } + + /** + * Imposta il valore della proprietà othr. + * + * @param value + * allowed object is + * {@link CBIGenericIdentification1 } + * + */ + public void setOthr(CBIGenericIdentification1 value) { + this.othr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification4.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification4.java new file mode 100644 index 0000000000..7bdcaee905 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIOrganisationIdentification4.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIOrganisationIdentification4 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIOrganisationIdentification4">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Othr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIGenericIdentification2"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIOrganisationIdentification4", propOrder = { + "othr" +}) +public class CBIOrganisationIdentification4 { + + @XmlElement(name = "Othr", required = true) + protected CBIGenericIdentification2 othr; + + /** + * Recupera il valore della proprietà othr. + * + * @return + * possible object is + * {@link CBIGenericIdentification2 } + * + */ + public CBIGenericIdentification2 getOthr() { + return othr; + } + + /** + * Imposta il valore della proprietà othr. + * + * @param value + * allowed object is + * {@link CBIGenericIdentification2 } + * + */ + public void setOthr(CBIGenericIdentification2 value) { + this.othr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIParty1Choice.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIParty1Choice.java new file mode 100644 index 0000000000..13af6d4c7f --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIParty1Choice.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIParty1Choice complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIParty1Choice">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="OrgId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIOrganisationIdentification2"/>
+ *           <element name="PrvtId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPersonIdentification1"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIParty1Choice", propOrder = { + "orgId", + "prvtId" +}) +public class CBIParty1Choice { + + @XmlElement(name = "OrgId") + protected CBIOrganisationIdentification2 orgId; + @XmlElement(name = "PrvtId") + protected CBIPersonIdentification1 prvtId; + + /** + * Recupera il valore della proprietà orgId. + * + * @return + * possible object is + * {@link CBIOrganisationIdentification2 } + * + */ + public CBIOrganisationIdentification2 getOrgId() { + return orgId; + } + + /** + * Imposta il valore della proprietà orgId. + * + * @param value + * allowed object is + * {@link CBIOrganisationIdentification2 } + * + */ + public void setOrgId(CBIOrganisationIdentification2 value) { + this.orgId = value; + } + + /** + * Recupera il valore della proprietà prvtId. + * + * @return + * possible object is + * {@link CBIPersonIdentification1 } + * + */ + public CBIPersonIdentification1 getPrvtId() { + return prvtId; + } + + /** + * Imposta il valore della proprietà prvtId. + * + * @param value + * allowed object is + * {@link CBIPersonIdentification1 } + * + */ + public void setPrvtId(CBIPersonIdentification1 value) { + this.prvtId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification1.java new file mode 100644 index 0000000000..defac35ec0 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification1.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPartyIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPartyIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Nm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max70Text" minOccurs="0"/>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIIdType1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPartyIdentification1", propOrder = { + "nm", + "id" +}) +public class CBIPartyIdentification1 { + + @XmlElement(name = "Nm") + protected String nm; + @XmlElement(name = "Id", required = true) + protected CBIIdType1 id; + + /** + * Recupera il valore della proprietà nm. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNm() { + return nm; + } + + /** + * Imposta il valore della proprietà nm. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNm(String value) { + this.nm = value; + } + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link CBIIdType1 } + * + */ + public CBIIdType1 getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link CBIIdType1 } + * + */ + public void setId(CBIIdType1 value) { + this.id = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification2.java new file mode 100644 index 0000000000..2c33ceb435 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification2.java @@ -0,0 +1,153 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPartyIdentification2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPartyIdentification2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Nm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max70Text" minOccurs="0"/>
+ *         <element name="PstlAdr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPostalAddress6" minOccurs="0"/>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIIdType2" minOccurs="0"/>
+ *         <element name="CtryOfRes" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CountryCode" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPartyIdentification2", propOrder = { + "nm", + "pstlAdr", + "id", + "ctryOfRes" +}) +public class CBIPartyIdentification2 { + + @XmlElement(name = "Nm") + protected String nm; + @XmlElement(name = "PstlAdr") + protected CBIPostalAddress6 pstlAdr; + @XmlElement(name = "Id") + protected CBIIdType2 id; + @XmlElement(name = "CtryOfRes") + protected String ctryOfRes; + + /** + * Recupera il valore della proprietà nm. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNm() { + return nm; + } + + /** + * Imposta il valore della proprietà nm. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNm(String value) { + this.nm = value; + } + + /** + * Recupera il valore della proprietà pstlAdr. + * + * @return + * possible object is + * {@link CBIPostalAddress6 } + * + */ + public CBIPostalAddress6 getPstlAdr() { + return pstlAdr; + } + + /** + * Imposta il valore della proprietà pstlAdr. + * + * @param value + * allowed object is + * {@link CBIPostalAddress6 } + * + */ + public void setPstlAdr(CBIPostalAddress6 value) { + this.pstlAdr = value; + } + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link CBIIdType2 } + * + */ + public CBIIdType2 getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link CBIIdType2 } + * + */ + public void setId(CBIIdType2 value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà ctryOfRes. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCtryOfRes() { + return ctryOfRes; + } + + /** + * Imposta il valore della proprietà ctryOfRes. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCtryOfRes(String value) { + this.ctryOfRes = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification3.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification3.java new file mode 100644 index 0000000000..a4d45a53c5 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification3.java @@ -0,0 +1,153 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPartyIdentification3 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPartyIdentification3">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Nm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max70Text"/>
+ *         <element name="PstlAdr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPostalAddress6" minOccurs="0"/>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIParty1Choice" minOccurs="0"/>
+ *         <element name="CtryOfRes" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CountryCode" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPartyIdentification3", propOrder = { + "nm", + "pstlAdr", + "id", + "ctryOfRes" +}) +public class CBIPartyIdentification3 { + + @XmlElement(name = "Nm", required = true) + protected String nm; + @XmlElement(name = "PstlAdr") + protected CBIPostalAddress6 pstlAdr; + @XmlElement(name = "Id") + protected CBIParty1Choice id; + @XmlElement(name = "CtryOfRes") + protected String ctryOfRes; + + /** + * Recupera il valore della proprietà nm. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNm() { + return nm; + } + + /** + * Imposta il valore della proprietà nm. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNm(String value) { + this.nm = value; + } + + /** + * Recupera il valore della proprietà pstlAdr. + * + * @return + * possible object is + * {@link CBIPostalAddress6 } + * + */ + public CBIPostalAddress6 getPstlAdr() { + return pstlAdr; + } + + /** + * Imposta il valore della proprietà pstlAdr. + * + * @param value + * allowed object is + * {@link CBIPostalAddress6 } + * + */ + public void setPstlAdr(CBIPostalAddress6 value) { + this.pstlAdr = value; + } + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link CBIParty1Choice } + * + */ + public CBIParty1Choice getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link CBIParty1Choice } + * + */ + public void setId(CBIParty1Choice value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà ctryOfRes. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCtryOfRes() { + return ctryOfRes; + } + + /** + * Imposta il valore della proprietà ctryOfRes. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCtryOfRes(String value) { + this.ctryOfRes = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification4.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification4.java new file mode 100644 index 0000000000..644a154d46 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification4.java @@ -0,0 +1,153 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPartyIdentification4 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPartyIdentification4">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Nm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max70Text"/>
+ *         <element name="PstlAdr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPostalAddress6" minOccurs="0"/>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIIdType2" minOccurs="0"/>
+ *         <element name="CtryOfRes" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CountryCode" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPartyIdentification4", propOrder = { + "nm", + "pstlAdr", + "id", + "ctryOfRes" +}) +public class CBIPartyIdentification4 { + + @XmlElement(name = "Nm", required = true) + protected String nm; + @XmlElement(name = "PstlAdr") + protected CBIPostalAddress6 pstlAdr; + @XmlElement(name = "Id") + protected CBIIdType2 id; + @XmlElement(name = "CtryOfRes") + protected String ctryOfRes; + + /** + * Recupera il valore della proprietà nm. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNm() { + return nm; + } + + /** + * Imposta il valore della proprietà nm. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNm(String value) { + this.nm = value; + } + + /** + * Recupera il valore della proprietà pstlAdr. + * + * @return + * possible object is + * {@link CBIPostalAddress6 } + * + */ + public CBIPostalAddress6 getPstlAdr() { + return pstlAdr; + } + + /** + * Imposta il valore della proprietà pstlAdr. + * + * @param value + * allowed object is + * {@link CBIPostalAddress6 } + * + */ + public void setPstlAdr(CBIPostalAddress6 value) { + this.pstlAdr = value; + } + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link CBIIdType2 } + * + */ + public CBIIdType2 getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link CBIIdType2 } + * + */ + public void setId(CBIIdType2 value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà ctryOfRes. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCtryOfRes() { + return ctryOfRes; + } + + /** + * Imposta il valore della proprietà ctryOfRes. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCtryOfRes(String value) { + this.ctryOfRes = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification5.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification5.java new file mode 100644 index 0000000000..61ee71c6f9 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPartyIdentification5.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPartyIdentification5 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPartyIdentification5">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Nm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max70Text"/>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIIdType3" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPartyIdentification5", propOrder = { + "nm", + "id" +}) +public class CBIPartyIdentification5 { + + @XmlElement(name = "Nm", required = true) + protected String nm; + @XmlElement(name = "Id") + protected CBIIdType3 id; + + /** + * Recupera il valore della proprietà nm. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNm() { + return nm; + } + + /** + * Imposta il valore della proprietà nm. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNm(String value) { + this.nm = value; + } + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link CBIIdType3 } + * + */ + public CBIIdType3 getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link CBIIdType3 } + * + */ + public void setId(CBIIdType3 value) { + this.id = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentInstructionInformation.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentInstructionInformation.java new file mode 100644 index 0000000000..bf2405c6b2 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentInstructionInformation.java @@ -0,0 +1,390 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import it.integry.ems.adapter.DateAdapter; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Classe Java per CBIPaymentInstructionInformation complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPaymentInstructionInformation">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PmtInfId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         <element name="PmtMtd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}PaymentMethod3Code"/>
+ *         <element name="BtchBookg" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}BatchBookingIndicator" minOccurs="0"/>
+ *         <element name="PmtTpInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPaymentTypeInformation1" minOccurs="0"/>
+ *         <element name="ReqdExctnDt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ISODate"/>
+ *         <element name="Dbtr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPartyIdentification4"/>
+ *         <element name="DbtrAcct" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBICashAccount1"/>
+ *         <element name="DbtrAgt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIBranchAndFinancialInstitutionIdentification2"/>
+ *         <element name="UltmtDbtr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPartyIdentification2" minOccurs="0"/>
+ *         <element name="ChrgBr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIChargeBearerTypeCode" minOccurs="0"/>
+ *         <element name="ChrgsAcct" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBICashAccount1" minOccurs="0"/>
+ *         <element name="CdtTrfTxInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBICreditTransferTransactionInformation" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPaymentInstructionInformation", propOrder = { + "pmtInfId", + "pmtMtd", + "btchBookg", + "pmtTpInf", + "reqdExctnDt", + "dbtr", + "dbtrAcct", + "dbtrAgt", + "ultmtDbtr", + "chrgBr", + "chrgsAcct", + "cdtTrfTxInf" +}) +public class CBIPaymentInstructionInformation { + + @XmlElement(name = "PmtInfId", required = true) + protected String pmtInfId; + @XmlElement(name = "PmtMtd", required = true) + protected PaymentMethod3Code pmtMtd; + @XmlElement(name = "BtchBookg") + protected Boolean btchBookg; + @XmlElement(name = "PmtTpInf") + protected CBIPaymentTypeInformation1 pmtTpInf; + @XmlJavaTypeAdapter(DateAdapter.class) + @XmlElement(name = "ReqdExctnDt", required = true) + protected XMLGregorianCalendar reqdExctnDt; + @XmlElement(name = "Dbtr", required = true) + protected CBIPartyIdentification4 dbtr; + @XmlElement(name = "DbtrAcct", required = true) + protected CBICashAccount1 dbtrAcct; + @XmlElement(name = "DbtrAgt", required = true) + protected CBIBranchAndFinancialInstitutionIdentification2 dbtrAgt; + @XmlElement(name = "UltmtDbtr") + protected CBIPartyIdentification2 ultmtDbtr; + @XmlElement(name = "ChrgBr") + protected CBIChargeBearerTypeCode chrgBr; + @XmlElement(name = "ChrgsAcct") + protected CBICashAccount1 chrgsAcct; + @XmlElement(name = "CdtTrfTxInf", required = true) + protected List cdtTrfTxInf; + + /** + * Recupera il valore della proprietà pmtInfId. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPmtInfId() { + return pmtInfId; + } + + /** + * Imposta il valore della proprietà pmtInfId. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPmtInfId(String value) { + this.pmtInfId = value; + } + + /** + * Recupera il valore della proprietà pmtMtd. + * + * @return + * possible object is + * {@link PaymentMethod3Code } + * + */ + public PaymentMethod3Code getPmtMtd() { + return pmtMtd; + } + + /** + * Imposta il valore della proprietà pmtMtd. + * + * @param value + * allowed object is + * {@link PaymentMethod3Code } + * + */ + public void setPmtMtd(PaymentMethod3Code value) { + this.pmtMtd = value; + } + + /** + * Recupera il valore della proprietà btchBookg. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isBtchBookg() { + return btchBookg; + } + + /** + * Imposta il valore della proprietà btchBookg. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setBtchBookg(Boolean value) { + this.btchBookg = value; + } + + /** + * Recupera il valore della proprietà pmtTpInf. + * + * @return + * possible object is + * {@link CBIPaymentTypeInformation1 } + * + */ + public CBIPaymentTypeInformation1 getPmtTpInf() { + return pmtTpInf; + } + + /** + * Imposta il valore della proprietà pmtTpInf. + * + * @param value + * allowed object is + * {@link CBIPaymentTypeInformation1 } + * + */ + public void setPmtTpInf(CBIPaymentTypeInformation1 value) { + this.pmtTpInf = value; + } + + /** + * Recupera il valore della proprietà reqdExctnDt. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getReqdExctnDt() { + return reqdExctnDt; + } + + /** + * Imposta il valore della proprietà reqdExctnDt. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setReqdExctnDt(XMLGregorianCalendar value) { + this.reqdExctnDt = value; + } + + /** + * Recupera il valore della proprietà dbtr. + * + * @return + * possible object is + * {@link CBIPartyIdentification4 } + * + */ + public CBIPartyIdentification4 getDbtr() { + return dbtr; + } + + /** + * Imposta il valore della proprietà dbtr. + * + * @param value + * allowed object is + * {@link CBIPartyIdentification4 } + * + */ + public void setDbtr(CBIPartyIdentification4 value) { + this.dbtr = value; + } + + /** + * Recupera il valore della proprietà dbtrAcct. + * + * @return + * possible object is + * {@link CBICashAccount1 } + * + */ + public CBICashAccount1 getDbtrAcct() { + return dbtrAcct; + } + + /** + * Imposta il valore della proprietà dbtrAcct. + * + * @param value + * allowed object is + * {@link CBICashAccount1 } + * + */ + public void setDbtrAcct(CBICashAccount1 value) { + this.dbtrAcct = value; + } + + /** + * Recupera il valore della proprietà dbtrAgt. + * + * @return + * possible object is + * {@link CBIBranchAndFinancialInstitutionIdentification2 } + * + */ + public CBIBranchAndFinancialInstitutionIdentification2 getDbtrAgt() { + return dbtrAgt; + } + + /** + * Imposta il valore della proprietà dbtrAgt. + * + * @param value + * allowed object is + * {@link CBIBranchAndFinancialInstitutionIdentification2 } + * + */ + public void setDbtrAgt(CBIBranchAndFinancialInstitutionIdentification2 value) { + this.dbtrAgt = value; + } + + /** + * Recupera il valore della proprietà ultmtDbtr. + * + * @return + * possible object is + * {@link CBIPartyIdentification2 } + * + */ + public CBIPartyIdentification2 getUltmtDbtr() { + return ultmtDbtr; + } + + /** + * Imposta il valore della proprietà ultmtDbtr. + * + * @param value + * allowed object is + * {@link CBIPartyIdentification2 } + * + */ + public void setUltmtDbtr(CBIPartyIdentification2 value) { + this.ultmtDbtr = value; + } + + /** + * Recupera il valore della proprietà chrgBr. + * + * @return + * possible object is + * {@link CBIChargeBearerTypeCode } + * + */ + public CBIChargeBearerTypeCode getChrgBr() { + return chrgBr; + } + + /** + * Imposta il valore della proprietà chrgBr. + * + * @param value + * allowed object is + * {@link CBIChargeBearerTypeCode } + * + */ + public void setChrgBr(CBIChargeBearerTypeCode value) { + this.chrgBr = value; + } + + /** + * Recupera il valore della proprietà chrgsAcct. + * + * @return + * possible object is + * {@link CBICashAccount1 } + * + */ + public CBICashAccount1 getChrgsAcct() { + return chrgsAcct; + } + + /** + * Imposta il valore della proprietà chrgsAcct. + * + * @param value + * allowed object is + * {@link CBICashAccount1 } + * + */ + public void setChrgsAcct(CBICashAccount1 value) { + this.chrgsAcct = value; + } + + /** + * Gets the value of the cdtTrfTxInf property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the cdtTrfTxInf property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCdtTrfTxInf().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CBICreditTransferTransactionInformation } + * + * + */ + public List getCdtTrfTxInf() { + if (cdtTrfTxInf == null) { + cdtTrfTxInf = new ArrayList(); + } + return this.cdtTrfTxInf; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentRequest000400.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentRequest000400.java new file mode 100644 index 0000000000..bfc8e1ba19 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentRequest000400.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPaymentRequest.00.04.00 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPaymentRequest.00.04.00">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="GrpHdr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIGroupHeader"/>
+ *         <element name="PmtInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPaymentInstructionInformation"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPaymentRequest.00.04.00", propOrder = { + "grpHdr", + "pmtInf" +}) +@XmlRootElement(name = "CBIPaymentRequest") +public class CBIPaymentRequest000400 { + + @XmlElement(name = "GrpHdr", required = true) + protected CBIGroupHeader grpHdr; + @XmlElement(name = "PmtInf", required = true) + protected CBIPaymentInstructionInformation pmtInf; + + /** + * Recupera il valore della proprietà grpHdr. + * + * @return + * possible object is + * {@link CBIGroupHeader } + * + */ + public CBIGroupHeader getGrpHdr() { + return grpHdr; + } + + /** + * Imposta il valore della proprietà grpHdr. + * + * @param value + * allowed object is + * {@link CBIGroupHeader } + * + */ + public void setGrpHdr(CBIGroupHeader value) { + this.grpHdr = value; + } + + /** + * Recupera il valore della proprietà pmtInf. + * + * @return + * possible object is + * {@link CBIPaymentInstructionInformation } + * + */ + public CBIPaymentInstructionInformation getPmtInf() { + return pmtInf; + } + + /** + * Imposta il valore della proprietà pmtInf. + * + * @param value + * allowed object is + * {@link CBIPaymentInstructionInformation } + * + */ + public void setPmtInf(CBIPaymentInstructionInformation value) { + this.pmtInf = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentRequestMsg000400.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentRequestMsg000400.java new file mode 100644 index 0000000000..3c8213bca2 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentRequestMsg000400.java @@ -0,0 +1,125 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPaymentRequestMsg.00.04.00 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPaymentRequestMsg.00.04.00">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CBIHdrTrt" type="{urn:CBI:xsd:CBIHdrTrt.001.07}CBIHdrTrt.001.07"/>
+ *         <element name="CBIHdrSrv" type="{urn:CBI:xsd:CBIHdrSrv.001.07}CBIHdrSrv.001.07"/>
+ *         <element name="CBIBdyPaymentRequest" type="{urn:CBI:xsd:CBIBdyPaymentRequest.00.04.00}CBIBdyPaymentRequest.00.04.00"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPaymentRequestMsg.00.04.00", namespace = "urn:CBI:xsd:CBIPaymentRequestMsg.00.04.00", propOrder = { + "cbiHdrTrt", + "cbiHdrSrv", + "cbiBdyPaymentRequest" +}) +public class CBIPaymentRequestMsg000400 { + + @XmlElement(name = "CBIHdrTrt", required = true) + protected CBIHdrTrt00107 cbiHdrTrt; + @XmlElement(name = "CBIHdrSrv", required = true) + protected CBIHdrSrv00107 cbiHdrSrv; + @XmlElement(name = "CBIBdyPaymentRequest", required = true) + protected CBIBdyPaymentRequest000400 cbiBdyPaymentRequest; + + /** + * Recupera il valore della proprietà cbiHdrTrt. + * + * @return + * possible object is + * {@link CBIHdrTrt00107 } + * + */ + public CBIHdrTrt00107 getCBIHdrTrt() { + return cbiHdrTrt; + } + + /** + * Imposta il valore della proprietà cbiHdrTrt. + * + * @param value + * allowed object is + * {@link CBIHdrTrt00107 } + * + */ + public void setCBIHdrTrt(CBIHdrTrt00107 value) { + this.cbiHdrTrt = value; + } + + /** + * Recupera il valore della proprietà cbiHdrSrv. + * + * @return + * possible object is + * {@link CBIHdrSrv00107 } + * + */ + public CBIHdrSrv00107 getCBIHdrSrv() { + return cbiHdrSrv; + } + + /** + * Imposta il valore della proprietà cbiHdrSrv. + * + * @param value + * allowed object is + * {@link CBIHdrSrv00107 } + * + */ + public void setCBIHdrSrv(CBIHdrSrv00107 value) { + this.cbiHdrSrv = value; + } + + /** + * Recupera il valore della proprietà cbiBdyPaymentRequest. + * + * @return + * possible object is + * {@link CBIBdyPaymentRequest000400 } + * + */ + public CBIBdyPaymentRequest000400 getCBIBdyPaymentRequest() { + return cbiBdyPaymentRequest; + } + + /** + * Imposta il valore della proprietà cbiBdyPaymentRequest. + * + * @param value + * allowed object is + * {@link CBIBdyPaymentRequest000400 } + * + */ + public void setCBIBdyPaymentRequest(CBIBdyPaymentRequest000400 value) { + this.cbiBdyPaymentRequest = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentTypeInformation1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentTypeInformation1.java new file mode 100644 index 0000000000..7a903ce7e3 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentTypeInformation1.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPaymentTypeInformation1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPaymentTypeInformation1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="InstrPrty" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Priority2Code" minOccurs="0"/>
+ *         <element name="SvcLvl" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIServiceLevel1" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPaymentTypeInformation1", propOrder = { + "instrPrty", + "svcLvl" +}) +public class CBIPaymentTypeInformation1 { + + @XmlElement(name = "InstrPrty") + protected Priority2Code instrPrty; + @XmlElement(name = "SvcLvl") + protected CBIServiceLevel1 svcLvl; + + /** + * Recupera il valore della proprietà instrPrty. + * + * @return + * possible object is + * {@link Priority2Code } + * + */ + public Priority2Code getInstrPrty() { + return instrPrty; + } + + /** + * Imposta il valore della proprietà instrPrty. + * + * @param value + * allowed object is + * {@link Priority2Code } + * + */ + public void setInstrPrty(Priority2Code value) { + this.instrPrty = value; + } + + /** + * Recupera il valore della proprietà svcLvl. + * + * @return + * possible object is + * {@link CBIServiceLevel1 } + * + */ + public CBIServiceLevel1 getSvcLvl() { + return svcLvl; + } + + /** + * Imposta il valore della proprietà svcLvl. + * + * @param value + * allowed object is + * {@link CBIServiceLevel1 } + * + */ + public void setSvcLvl(CBIServiceLevel1 value) { + this.svcLvl = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentTypeInformation2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentTypeInformation2.java new file mode 100644 index 0000000000..de5b468045 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPaymentTypeInformation2.java @@ -0,0 +1,125 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPaymentTypeInformation2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPaymentTypeInformation2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SvcLvl" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIServiceLevel2" minOccurs="0"/>
+ *         <element name="LclInstrm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBILocalInstrument1" minOccurs="0"/>
+ *         <element name="CtgyPurp" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CategoryPurpose1Choice" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPaymentTypeInformation2", propOrder = { + "svcLvl", + "lclInstrm", + "ctgyPurp" +}) +public class CBIPaymentTypeInformation2 { + + @XmlElement(name = "SvcLvl") + protected CBIServiceLevel2 svcLvl; + @XmlElement(name = "LclInstrm") + protected CBILocalInstrument1 lclInstrm; + @XmlElement(name = "CtgyPurp") + protected CategoryPurpose1Choice ctgyPurp; + + /** + * Recupera il valore della proprietà svcLvl. + * + * @return + * possible object is + * {@link CBIServiceLevel2 } + * + */ + public CBIServiceLevel2 getSvcLvl() { + return svcLvl; + } + + /** + * Imposta il valore della proprietà svcLvl. + * + * @param value + * allowed object is + * {@link CBIServiceLevel2 } + * + */ + public void setSvcLvl(CBIServiceLevel2 value) { + this.svcLvl = value; + } + + /** + * Recupera il valore della proprietà lclInstrm. + * + * @return + * possible object is + * {@link CBILocalInstrument1 } + * + */ + public CBILocalInstrument1 getLclInstrm() { + return lclInstrm; + } + + /** + * Imposta il valore della proprietà lclInstrm. + * + * @param value + * allowed object is + * {@link CBILocalInstrument1 } + * + */ + public void setLclInstrm(CBILocalInstrument1 value) { + this.lclInstrm = value; + } + + /** + * Recupera il valore della proprietà ctgyPurp. + * + * @return + * possible object is + * {@link CategoryPurpose1Choice } + * + */ + public CategoryPurpose1Choice getCtgyPurp() { + return ctgyPurp; + } + + /** + * Imposta il valore della proprietà ctgyPurp. + * + * @param value + * allowed object is + * {@link CategoryPurpose1Choice } + * + */ + public void setCtgyPurp(CategoryPurpose1Choice value) { + this.ctgyPurp = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPersonIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPersonIdentification1.java new file mode 100644 index 0000000000..26980422e9 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPersonIdentification1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPersonIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPersonIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Othr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIGenericIdentification1"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPersonIdentification1", propOrder = { + "othr" +}) +public class CBIPersonIdentification1 { + + @XmlElement(name = "Othr", required = true) + protected CBIGenericIdentification1 othr; + + /** + * Recupera il valore della proprietà othr. + * + * @return + * possible object is + * {@link CBIGenericIdentification1 } + * + */ + public CBIGenericIdentification1 getOthr() { + return othr; + } + + /** + * Imposta il valore della proprietà othr. + * + * @param value + * allowed object is + * {@link CBIGenericIdentification1 } + * + */ + public void setOthr(CBIGenericIdentification1 value) { + this.othr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPostalAddress6.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPostalAddress6.java new file mode 100644 index 0000000000..83ab005ff0 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIPostalAddress6.java @@ -0,0 +1,328 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIPostalAddress6 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIPostalAddress6">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="AdrTp" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}AddressType2Code" minOccurs="0"/>
+ *         <element name="Dept" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max70Text" minOccurs="0"/>
+ *         <element name="SubDept" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max70Text" minOccurs="0"/>
+ *         <element name="StrtNm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max70Text" minOccurs="0"/>
+ *         <element name="BldgNb" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max16Text" minOccurs="0"/>
+ *         <element name="PstCd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max16Text" minOccurs="0"/>
+ *         <element name="TwnNm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *         <element name="CtrySubDvsn" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *         <element name="Ctry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CountryCode" minOccurs="0"/>
+ *         <element name="AdrLine" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max70Text" maxOccurs="2" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIPostalAddress6", propOrder = { + "adrTp", + "dept", + "subDept", + "strtNm", + "bldgNb", + "pstCd", + "twnNm", + "ctrySubDvsn", + "ctry", + "adrLine" +}) +public class CBIPostalAddress6 { + + @XmlElement(name = "AdrTp") + protected AddressType2Code adrTp; + @XmlElement(name = "Dept") + protected String dept; + @XmlElement(name = "SubDept") + protected String subDept; + @XmlElement(name = "StrtNm") + protected String strtNm; + @XmlElement(name = "BldgNb") + protected String bldgNb; + @XmlElement(name = "PstCd") + protected String pstCd; + @XmlElement(name = "TwnNm") + protected String twnNm; + @XmlElement(name = "CtrySubDvsn") + protected String ctrySubDvsn; + @XmlElement(name = "Ctry") + protected String ctry; + @XmlElement(name = "AdrLine") + protected List adrLine; + + /** + * Recupera il valore della proprietà adrTp. + * + * @return + * possible object is + * {@link AddressType2Code } + * + */ + public AddressType2Code getAdrTp() { + return adrTp; + } + + /** + * Imposta il valore della proprietà adrTp. + * + * @param value + * allowed object is + * {@link AddressType2Code } + * + */ + public void setAdrTp(AddressType2Code value) { + this.adrTp = value; + } + + /** + * Recupera il valore della proprietà dept. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDept() { + return dept; + } + + /** + * Imposta il valore della proprietà dept. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDept(String value) { + this.dept = value; + } + + /** + * Recupera il valore della proprietà subDept. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSubDept() { + return subDept; + } + + /** + * Imposta il valore della proprietà subDept. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSubDept(String value) { + this.subDept = value; + } + + /** + * Recupera il valore della proprietà strtNm. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStrtNm() { + return strtNm; + } + + /** + * Imposta il valore della proprietà strtNm. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStrtNm(String value) { + this.strtNm = value; + } + + /** + * Recupera il valore della proprietà bldgNb. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBldgNb() { + return bldgNb; + } + + /** + * Imposta il valore della proprietà bldgNb. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBldgNb(String value) { + this.bldgNb = value; + } + + /** + * Recupera il valore della proprietà pstCd. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPstCd() { + return pstCd; + } + + /** + * Imposta il valore della proprietà pstCd. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPstCd(String value) { + this.pstCd = value; + } + + /** + * Recupera il valore della proprietà twnNm. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTwnNm() { + return twnNm; + } + + /** + * Imposta il valore della proprietà twnNm. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTwnNm(String value) { + this.twnNm = value; + } + + /** + * Recupera il valore della proprietà ctrySubDvsn. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCtrySubDvsn() { + return ctrySubDvsn; + } + + /** + * Imposta il valore della proprietà ctrySubDvsn. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCtrySubDvsn(String value) { + this.ctrySubDvsn = value; + } + + /** + * Recupera il valore della proprietà ctry. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCtry() { + return ctry; + } + + /** + * Imposta il valore della proprietà ctry. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCtry(String value) { + this.ctry = value; + } + + /** + * Gets the value of the adrLine property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the adrLine property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAdrLine().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getAdrLine() { + if (adrLine == null) { + adrLine = new ArrayList(); + } + return this.adrLine; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRegulatoryReporting1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRegulatoryReporting1.java new file mode 100644 index 0000000000..a8e200bc08 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRegulatoryReporting1.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIRegulatoryReporting1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIRegulatoryReporting1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DbtCdtRptgInd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIRegulatoryReportingType1Code"/>
+ *         <element name="Dtls" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIStructuredRegulatoryReporting1" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIRegulatoryReporting1", propOrder = { + "dbtCdtRptgInd", + "dtls" +}) +public class CBIRegulatoryReporting1 { + + @XmlElement(name = "DbtCdtRptgInd", required = true) + protected CBIRegulatoryReportingType1Code dbtCdtRptgInd; + @XmlElement(name = "Dtls") + protected CBIStructuredRegulatoryReporting1 dtls; + + /** + * Recupera il valore della proprietà dbtCdtRptgInd. + * + * @return + * possible object is + * {@link CBIRegulatoryReportingType1Code } + * + */ + public CBIRegulatoryReportingType1Code getDbtCdtRptgInd() { + return dbtCdtRptgInd; + } + + /** + * Imposta il valore della proprietà dbtCdtRptgInd. + * + * @param value + * allowed object is + * {@link CBIRegulatoryReportingType1Code } + * + */ + public void setDbtCdtRptgInd(CBIRegulatoryReportingType1Code value) { + this.dbtCdtRptgInd = value; + } + + /** + * Recupera il valore della proprietà dtls. + * + * @return + * possible object is + * {@link CBIStructuredRegulatoryReporting1 } + * + */ + public CBIStructuredRegulatoryReporting1 getDtls() { + return dtls; + } + + /** + * Imposta il valore della proprietà dtls. + * + * @param value + * allowed object is + * {@link CBIStructuredRegulatoryReporting1 } + * + */ + public void setDtls(CBIStructuredRegulatoryReporting1 value) { + this.dtls = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRegulatoryReportingType1Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRegulatoryReportingType1Code.java new file mode 100644 index 0000000000..513effae48 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRegulatoryReportingType1Code.java @@ -0,0 +1,43 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIRegulatoryReportingType1Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="CBIRegulatoryReportingType1Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="DEBT"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "CBIRegulatoryReportingType1Code") +@XmlEnum +public enum CBIRegulatoryReportingType1Code { + + DEBT; + + public String value() { + return name(); + } + + public static CBIRegulatoryReportingType1Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRemittanceLocation1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRemittanceLocation1.java new file mode 100644 index 0000000000..f8bf1b5995 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRemittanceLocation1.java @@ -0,0 +1,125 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIRemittanceLocation1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIRemittanceLocation1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RmtId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *         <element name="RmtLctnMtd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIRemittanceLocationMethod1Code" minOccurs="0"/>
+ *         <element name="RmtLctnElctrncAdr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max2048Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIRemittanceLocation1", propOrder = { + "rmtId", + "rmtLctnMtd", + "rmtLctnElctrncAdr" +}) +public class CBIRemittanceLocation1 { + + @XmlElement(name = "RmtId") + protected String rmtId; + @XmlElement(name = "RmtLctnMtd") + protected CBIRemittanceLocationMethod1Code rmtLctnMtd; + @XmlElement(name = "RmtLctnElctrncAdr") + protected String rmtLctnElctrncAdr; + + /** + * Recupera il valore della proprietà rmtId. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRmtId() { + return rmtId; + } + + /** + * Imposta il valore della proprietà rmtId. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRmtId(String value) { + this.rmtId = value; + } + + /** + * Recupera il valore della proprietà rmtLctnMtd. + * + * @return + * possible object is + * {@link CBIRemittanceLocationMethod1Code } + * + */ + public CBIRemittanceLocationMethod1Code getRmtLctnMtd() { + return rmtLctnMtd; + } + + /** + * Imposta il valore della proprietà rmtLctnMtd. + * + * @param value + * allowed object is + * {@link CBIRemittanceLocationMethod1Code } + * + */ + public void setRmtLctnMtd(CBIRemittanceLocationMethod1Code value) { + this.rmtLctnMtd = value; + } + + /** + * Recupera il valore della proprietà rmtLctnElctrncAdr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRmtLctnElctrncAdr() { + return rmtLctnElctrncAdr; + } + + /** + * Imposta il valore della proprietà rmtLctnElctrncAdr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRmtLctnElctrncAdr(String value) { + this.rmtLctnElctrncAdr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRemittanceLocationMethod1Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRemittanceLocationMethod1Code.java new file mode 100644 index 0000000000..a513927e44 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIRemittanceLocationMethod1Code.java @@ -0,0 +1,47 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIRemittanceLocationMethod1Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="CBIRemittanceLocationMethod1Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="FAXI"/>
+ *     <enumeration value="EMAL"/>
+ *     <enumeration value="SMSM"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "CBIRemittanceLocationMethod1Code") +@XmlEnum +public enum CBIRemittanceLocationMethod1Code { + + FAXI, + EMAL, + SMSM; + + public String value() { + return name(); + } + + public static CBIRemittanceLocationMethod1Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel1.java new file mode 100644 index 0000000000..99c3da9f46 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel1.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIServiceLevel1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIServiceLevel1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Cd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIServiceLevel1Code"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIServiceLevel1", propOrder = { + "cd" +}) +public class CBIServiceLevel1 { + + @XmlElement(name = "Cd", required = true) + protected CBIServiceLevel1Code cd; + + /** + * Recupera il valore della proprietà cd. + * + * @return + * possible object is + * {@link CBIServiceLevel1Code } + * + */ + public CBIServiceLevel1Code getCd() { + return cd; + } + + /** + * Imposta il valore della proprietà cd. + * + * @param value + * allowed object is + * {@link CBIServiceLevel1Code } + * + */ + public void setCd(CBIServiceLevel1Code value) { + this.cd = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel1Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel1Code.java new file mode 100644 index 0000000000..6b552e63d5 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel1Code.java @@ -0,0 +1,45 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIServiceLevel1Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="CBIServiceLevel1Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="SEPA"/>
+ *     <enumeration value="URGP"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "CBIServiceLevel1Code") +@XmlEnum +public enum CBIServiceLevel1Code { + + SEPA, + URGP; + + public String value() { + return name(); + } + + public static CBIServiceLevel1Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel2.java new file mode 100644 index 0000000000..6df3e51c2a --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIServiceLevel2.java @@ -0,0 +1,69 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIServiceLevel2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIServiceLevel2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Prtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIServiceLevel2", propOrder = { + "prtry" +}) +public class CBIServiceLevel2 { + + @XmlElement(name = "Prtry", required = true) + protected String prtry; + + /** + * Recupera il valore della proprietà prtry. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrtry() { + return prtry; + } + + /** + * Imposta il valore della proprietà prtry. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrtry(String value) { + this.prtry = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBISgnInf00104.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBISgnInf00104.java new file mode 100644 index 0000000000..20ae3f0054 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBISgnInf00104.java @@ -0,0 +1,152 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Classe Java per CBISgnInf.001.04 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBISgnInf.001.04">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SgnTyp" type="{urn:CBI:xsd:CBISgnInf.001.04}SignatureType"/>
+ *         <element name="RefPlt" type="{urn:CBI:xsd:CBISgnInf.001.04}RecerencePlatform"/>
+ *         <element name="DtRef" type="{urn:CBI:xsd:CBISgnInf.001.04}ISODateTime"/>
+ *         <element name="Sgnt" type="{urn:CBI:xsd:CBISgnInf.001.04}P7M"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBISgnInf.001.04", namespace = "urn:CBI:xsd:CBISgnInf.001.04", propOrder = { + "sgnTyp", + "refPlt", + "dtRef", + "sgnt" +}) +public class CBISgnInf00104 { + + @XmlElement(name = "SgnTyp", required = true) + protected String sgnTyp; + @XmlElement(name = "RefPlt", required = true) + protected RecerencePlatform refPlt; + @XmlElement(name = "DtRef", required = true) + protected XMLGregorianCalendar dtRef; + @XmlElement(name = "Sgnt", required = true) + protected byte[] sgnt; + + /** + * Recupera il valore della proprietà sgnTyp. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSgnTyp() { + return sgnTyp; + } + + /** + * Imposta il valore della proprietà sgnTyp. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSgnTyp(String value) { + this.sgnTyp = value; + } + + /** + * Recupera il valore della proprietà refPlt. + * + * @return + * possible object is + * {@link RecerencePlatform } + * + */ + public RecerencePlatform getRefPlt() { + return refPlt; + } + + /** + * Imposta il valore della proprietà refPlt. + * + * @param value + * allowed object is + * {@link RecerencePlatform } + * + */ + public void setRefPlt(RecerencePlatform value) { + this.refPlt = value; + } + + /** + * Recupera il valore della proprietà dtRef. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDtRef() { + return dtRef; + } + + /** + * Imposta il valore della proprietà dtRef. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDtRef(XMLGregorianCalendar value) { + this.dtRef = value; + } + + /** + * Recupera il valore della proprietà sgnt. + * + * @return + * possible object is + * byte[] + */ + public byte[] getSgnt() { + return sgnt; + } + + /** + * Imposta il valore della proprietà sgnt. + * + * @param value + * allowed object is + * byte[] + */ + public void setSgnt(byte[] value) { + this.sgnt = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBISrvInf1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBISrvInf1.java new file mode 100644 index 0000000000..505813d106 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBISrvInf1.java @@ -0,0 +1,43 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBISrvInf1. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="CBISrvInf1">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="ESBEN"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "CBISrvInf1") +@XmlEnum +public enum CBISrvInf1 { + + ESBEN; + + public String value() { + return name(); + } + + public static CBISrvInf1 fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIStructuredRegulatoryReporting1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIStructuredRegulatoryReporting1.java new file mode 100644 index 0000000000..c5f4381896 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CBIStructuredRegulatoryReporting1.java @@ -0,0 +1,133 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CBIStructuredRegulatoryReporting1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CBIStructuredRegulatoryReporting1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Cd">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="INF"/>
+ *               <enumeration value="SNR"/>
+ *               <enumeration value="CVA"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Amt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ActiveOrHistoricCurrencyAndAmount" minOccurs="0"/>
+ *         <element name="Inf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CBIStructuredRegulatoryReporting1", propOrder = { + "cd", + "amt", + "inf" +}) +public class CBIStructuredRegulatoryReporting1 { + + @XmlElement(name = "Cd", required = true) + protected String cd; + @XmlElement(name = "Amt") + protected ActiveOrHistoricCurrencyAndAmount amt; + @XmlElement(name = "Inf") + protected String inf; + + /** + * Recupera il valore della proprietà cd. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCd() { + return cd; + } + + /** + * Imposta il valore della proprietà cd. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCd(String value) { + this.cd = value; + } + + /** + * Recupera il valore della proprietà amt. + * + * @return + * possible object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public ActiveOrHistoricCurrencyAndAmount getAmt() { + return amt; + } + + /** + * Imposta il valore della proprietà amt. + * + * @param value + * allowed object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public void setAmt(ActiveOrHistoricCurrencyAndAmount value) { + this.amt = value; + } + + /** + * Recupera il valore della proprietà inf. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInf() { + return inf; + } + + /** + * Imposta il valore della proprietà inf. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInf(String value) { + this.inf = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CategoryPurpose1Choice.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CategoryPurpose1Choice.java new file mode 100644 index 0000000000..7f62fe4371 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CategoryPurpose1Choice.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CategoryPurpose1Choice complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CategoryPurpose1Choice">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="Cd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ExternalCategoryPurpose1Code"/>
+ *           <element name="Prtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CategoryPurpose1Choice", propOrder = { + "cd", + "prtry" +}) +public class CategoryPurpose1Choice { + + @XmlElement(name = "Cd") + protected String cd; + @XmlElement(name = "Prtry") + protected String prtry; + + /** + * Recupera il valore della proprietà cd. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCd() { + return cd; + } + + /** + * Imposta il valore della proprietà cd. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCd(String value) { + this.cd = value; + } + + /** + * Recupera il valore della proprietà prtry. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrtry() { + return prtry; + } + + /** + * Imposta il valore della proprietà prtry. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrtry(String value) { + this.prtry = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CongruencyInformation.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CongruencyInformation.java new file mode 100644 index 0000000000..aae1f3f4e8 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CongruencyInformation.java @@ -0,0 +1,70 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CongruencyInformation complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CongruencyInformation">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SrvBdyNb" type="{urn:CBI:xsd:CBIHdrSrv.001.07}SrvBodyNumber"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CongruencyInformation", namespace = "urn:CBI:xsd:CBIHdrSrv.001.07", propOrder = { + "srvBdyNb" +}) +public class CongruencyInformation { + + @XmlElement(name = "SrvBdyNb", required = true) + protected BigInteger srvBdyNb; + + /** + * Recupera il valore della proprietà srvBdyNb. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSrvBdyNb() { + return srvBdyNb; + } + + /** + * Imposta il valore della proprietà srvBdyNb. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSrvBdyNb(BigInteger value) { + this.srvBdyNb = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ContactDetails2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ContactDetails2.java new file mode 100644 index 0000000000..5f22c689f9 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ContactDetails2.java @@ -0,0 +1,237 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per ContactDetails2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ContactDetails2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="NmPrfx" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}NamePrefix1Code" minOccurs="0"/>
+ *         <element name="Nm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max140Text" minOccurs="0"/>
+ *         <element name="PhneNb" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}PhoneNumber" minOccurs="0"/>
+ *         <element name="MobNb" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}PhoneNumber" minOccurs="0"/>
+ *         <element name="FaxNb" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}PhoneNumber" minOccurs="0"/>
+ *         <element name="EmailAdr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max2048Text" minOccurs="0"/>
+ *         <element name="Othr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ContactDetails2", propOrder = { + "nmPrfx", + "nm", + "phneNb", + "mobNb", + "faxNb", + "emailAdr", + "othr" +}) +public class ContactDetails2 { + + @XmlElement(name = "NmPrfx") + protected NamePrefix1Code nmPrfx; + @XmlElement(name = "Nm") + protected String nm; + @XmlElement(name = "PhneNb") + protected String phneNb; + @XmlElement(name = "MobNb") + protected String mobNb; + @XmlElement(name = "FaxNb") + protected String faxNb; + @XmlElement(name = "EmailAdr") + protected String emailAdr; + @XmlElement(name = "Othr") + protected String othr; + + /** + * Recupera il valore della proprietà nmPrfx. + * + * @return + * possible object is + * {@link NamePrefix1Code } + * + */ + public NamePrefix1Code getNmPrfx() { + return nmPrfx; + } + + /** + * Imposta il valore della proprietà nmPrfx. + * + * @param value + * allowed object is + * {@link NamePrefix1Code } + * + */ + public void setNmPrfx(NamePrefix1Code value) { + this.nmPrfx = value; + } + + /** + * Recupera il valore della proprietà nm. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNm() { + return nm; + } + + /** + * Imposta il valore della proprietà nm. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNm(String value) { + this.nm = value; + } + + /** + * Recupera il valore della proprietà phneNb. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPhneNb() { + return phneNb; + } + + /** + * Imposta il valore della proprietà phneNb. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPhneNb(String value) { + this.phneNb = value; + } + + /** + * Recupera il valore della proprietà mobNb. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMobNb() { + return mobNb; + } + + /** + * Imposta il valore della proprietà mobNb. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMobNb(String value) { + this.mobNb = value; + } + + /** + * Recupera il valore della proprietà faxNb. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFaxNb() { + return faxNb; + } + + /** + * Imposta il valore della proprietà faxNb. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFaxNb(String value) { + this.faxNb = value; + } + + /** + * Recupera il valore della proprietà emailAdr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEmailAdr() { + return emailAdr; + } + + /** + * Imposta il valore della proprietà emailAdr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEmailAdr(String value) { + this.emailAdr = value; + } + + /** + * Recupera il valore della proprietà othr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOthr() { + return othr; + } + + /** + * Imposta il valore della proprietà othr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOthr(String value) { + this.othr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditDebitCode.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditDebitCode.java new file mode 100644 index 0000000000..bd888570b6 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditDebitCode.java @@ -0,0 +1,45 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CreditDebitCode. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="CreditDebitCode">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="CRDT"/>
+ *     <enumeration value="DBIT"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "CreditDebitCode") +@XmlEnum +public enum CreditDebitCode { + + CRDT, + DBIT; + + public String value() { + return name(); + } + + public static CreditDebitCode fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceInformation2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceInformation2.java new file mode 100644 index 0000000000..54b26c91a3 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceInformation2.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CreditorReferenceInformation2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CreditorReferenceInformation2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Tp" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CreditorReferenceType2" minOccurs="0"/>
+ *         <element name="Ref" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreditorReferenceInformation2", propOrder = { + "tp", + "ref" +}) +public class CreditorReferenceInformation2 { + + @XmlElement(name = "Tp") + protected CreditorReferenceType2 tp; + @XmlElement(name = "Ref") + protected String ref; + + /** + * Recupera il valore della proprietà tp. + * + * @return + * possible object is + * {@link CreditorReferenceType2 } + * + */ + public CreditorReferenceType2 getTp() { + return tp; + } + + /** + * Imposta il valore della proprietà tp. + * + * @param value + * allowed object is + * {@link CreditorReferenceType2 } + * + */ + public void setTp(CreditorReferenceType2 value) { + this.tp = value; + } + + /** + * Recupera il valore della proprietà ref. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRef() { + return ref; + } + + /** + * Imposta il valore della proprietà ref. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRef(String value) { + this.ref = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceType1Choice.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceType1Choice.java new file mode 100644 index 0000000000..7bd030e3ef --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceType1Choice.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CreditorReferenceType1Choice complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CreditorReferenceType1Choice">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="Cd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}DocumentType3Code"/>
+ *           <element name="Prtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreditorReferenceType1Choice", propOrder = { + "cd", + "prtry" +}) +public class CreditorReferenceType1Choice { + + @XmlElement(name = "Cd") + protected DocumentType3Code cd; + @XmlElement(name = "Prtry") + protected String prtry; + + /** + * Recupera il valore della proprietà cd. + * + * @return + * possible object is + * {@link DocumentType3Code } + * + */ + public DocumentType3Code getCd() { + return cd; + } + + /** + * Imposta il valore della proprietà cd. + * + * @param value + * allowed object is + * {@link DocumentType3Code } + * + */ + public void setCd(DocumentType3Code value) { + this.cd = value; + } + + /** + * Recupera il valore della proprietà prtry. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrtry() { + return prtry; + } + + /** + * Imposta il valore della proprietà prtry. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrtry(String value) { + this.prtry = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceType2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceType2.java new file mode 100644 index 0000000000..252b00ee6c --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/CreditorReferenceType2.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per CreditorReferenceType2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="CreditorReferenceType2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CdOrPrtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CreditorReferenceType1Choice"/>
+ *         <element name="Issr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CreditorReferenceType2", propOrder = { + "cdOrPrtry", + "issr" +}) +public class CreditorReferenceType2 { + + @XmlElement(name = "CdOrPrtry", required = true) + protected CreditorReferenceType1Choice cdOrPrtry; + @XmlElement(name = "Issr") + protected String issr; + + /** + * Recupera il valore della proprietà cdOrPrtry. + * + * @return + * possible object is + * {@link CreditorReferenceType1Choice } + * + */ + public CreditorReferenceType1Choice getCdOrPrtry() { + return cdOrPrtry; + } + + /** + * Imposta il valore della proprietà cdOrPrtry. + * + * @param value + * allowed object is + * {@link CreditorReferenceType1Choice } + * + */ + public void setCdOrPrtry(CreditorReferenceType1Choice value) { + this.cdOrPrtry = value; + } + + /** + * Recupera il valore della proprietà issr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssr() { + return issr; + } + + /** + * Imposta il valore della proprietà issr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssr(String value) { + this.issr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DateAndPlaceOfBirth.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DateAndPlaceOfBirth.java new file mode 100644 index 0000000000..cd3dbd224d --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DateAndPlaceOfBirth.java @@ -0,0 +1,154 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Classe Java per DateAndPlaceOfBirth complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="DateAndPlaceOfBirth">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="BirthDt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ISODate"/>
+ *         <element name="PrvcOfBirth" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *         <element name="CityOfBirth" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         <element name="CtryOfBirth" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CountryCode"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DateAndPlaceOfBirth", propOrder = { + "birthDt", + "prvcOfBirth", + "cityOfBirth", + "ctryOfBirth" +}) +public class DateAndPlaceOfBirth { + + @XmlElement(name = "BirthDt", required = true) + protected XMLGregorianCalendar birthDt; + @XmlElement(name = "PrvcOfBirth") + protected String prvcOfBirth; + @XmlElement(name = "CityOfBirth", required = true) + protected String cityOfBirth; + @XmlElement(name = "CtryOfBirth", required = true) + protected String ctryOfBirth; + + /** + * Recupera il valore della proprietà birthDt. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getBirthDt() { + return birthDt; + } + + /** + * Imposta il valore della proprietà birthDt. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setBirthDt(XMLGregorianCalendar value) { + this.birthDt = value; + } + + /** + * Recupera il valore della proprietà prvcOfBirth. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrvcOfBirth() { + return prvcOfBirth; + } + + /** + * Imposta il valore della proprietà prvcOfBirth. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrvcOfBirth(String value) { + this.prvcOfBirth = value; + } + + /** + * Recupera il valore della proprietà cityOfBirth. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCityOfBirth() { + return cityOfBirth; + } + + /** + * Imposta il valore della proprietà cityOfBirth. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCityOfBirth(String value) { + this.cityOfBirth = value; + } + + /** + * Recupera il valore della proprietà ctryOfBirth. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCtryOfBirth() { + return ctryOfBirth; + } + + /** + * Imposta il valore della proprietà ctryOfBirth. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCtryOfBirth(String value) { + this.ctryOfBirth = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DiagnosticInformation.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DiagnosticInformation.java new file mode 100644 index 0000000000..43a68c4892 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DiagnosticInformation.java @@ -0,0 +1,154 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Classe Java per DiagnosticInformation complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="DiagnosticInformation">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="UsrBnk" type="{urn:CBI:xsd:CBIHdrSrv.001.07}CBIIdentifier" minOccurs="0"/>
+ *         <element name="DiagVers" type="{urn:CBI:xsd:CBIHdrSrv.001.07}Max35Text"/>
+ *         <element name="ChkSbj" type="{urn:CBI:xsd:CBIHdrSrv.001.07}CBIIdentifier"/>
+ *         <element name="ChkDt" type="{urn:CBI:xsd:CBIHdrSrv.001.07}ISODateTime"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DiagnosticInformation", namespace = "urn:CBI:xsd:CBIHdrSrv.001.07", propOrder = { + "usrBnk", + "diagVers", + "chkSbj", + "chkDt" +}) +public class DiagnosticInformation { + + @XmlElement(name = "UsrBnk") + protected String usrBnk; + @XmlElement(name = "DiagVers", required = true) + protected String diagVers; + @XmlElement(name = "ChkSbj", required = true) + protected String chkSbj; + @XmlElement(name = "ChkDt", required = true) + protected XMLGregorianCalendar chkDt; + + /** + * Recupera il valore della proprietà usrBnk. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUsrBnk() { + return usrBnk; + } + + /** + * Imposta il valore della proprietà usrBnk. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUsrBnk(String value) { + this.usrBnk = value; + } + + /** + * Recupera il valore della proprietà diagVers. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDiagVers() { + return diagVers; + } + + /** + * Imposta il valore della proprietà diagVers. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDiagVers(String value) { + this.diagVers = value; + } + + /** + * Recupera il valore della proprietà chkSbj. + * + * @return + * possible object is + * {@link String } + * + */ + public String getChkSbj() { + return chkSbj; + } + + /** + * Imposta il valore della proprietà chkSbj. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setChkSbj(String value) { + this.chkSbj = value; + } + + /** + * Recupera il valore della proprietà chkDt. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getChkDt() { + return chkDt; + } + + /** + * Imposta il valore della proprietà chkDt. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setChkDt(XMLGregorianCalendar value) { + this.chkDt = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentAdjustment1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentAdjustment1.java new file mode 100644 index 0000000000..a504f8febb --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentAdjustment1.java @@ -0,0 +1,153 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per DocumentAdjustment1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="DocumentAdjustment1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Amt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ActiveOrHistoricCurrencyAndAmount"/>
+ *         <element name="CdtDbtInd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CreditDebitCode" minOccurs="0"/>
+ *         <element name="Rsn" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max4Text" minOccurs="0"/>
+ *         <element name="AddtlInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max140Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DocumentAdjustment1", propOrder = { + "amt", + "cdtDbtInd", + "rsn", + "addtlInf" +}) +public class DocumentAdjustment1 { + + @XmlElement(name = "Amt", required = true) + protected ActiveOrHistoricCurrencyAndAmount amt; + @XmlElement(name = "CdtDbtInd") + protected CreditDebitCode cdtDbtInd; + @XmlElement(name = "Rsn") + protected String rsn; + @XmlElement(name = "AddtlInf") + protected String addtlInf; + + /** + * Recupera il valore della proprietà amt. + * + * @return + * possible object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public ActiveOrHistoricCurrencyAndAmount getAmt() { + return amt; + } + + /** + * Imposta il valore della proprietà amt. + * + * @param value + * allowed object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public void setAmt(ActiveOrHistoricCurrencyAndAmount value) { + this.amt = value; + } + + /** + * Recupera il valore della proprietà cdtDbtInd. + * + * @return + * possible object is + * {@link CreditDebitCode } + * + */ + public CreditDebitCode getCdtDbtInd() { + return cdtDbtInd; + } + + /** + * Imposta il valore della proprietà cdtDbtInd. + * + * @param value + * allowed object is + * {@link CreditDebitCode } + * + */ + public void setCdtDbtInd(CreditDebitCode value) { + this.cdtDbtInd = value; + } + + /** + * Recupera il valore della proprietà rsn. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRsn() { + return rsn; + } + + /** + * Imposta il valore della proprietà rsn. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRsn(String value) { + this.rsn = value; + } + + /** + * Recupera il valore della proprietà addtlInf. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAddtlInf() { + return addtlInf; + } + + /** + * Imposta il valore della proprietà addtlInf. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAddtlInf(String value) { + this.addtlInf = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentType3Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentType3Code.java new file mode 100644 index 0000000000..b2179def80 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentType3Code.java @@ -0,0 +1,53 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per DocumentType3Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="DocumentType3Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="RADM"/>
+ *     <enumeration value="RPIN"/>
+ *     <enumeration value="FXDR"/>
+ *     <enumeration value="DISP"/>
+ *     <enumeration value="PUOR"/>
+ *     <enumeration value="SCOR"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "DocumentType3Code") +@XmlEnum +public enum DocumentType3Code { + + RADM, + RPIN, + FXDR, + DISP, + PUOR, + SCOR; + + public String value() { + return name(); + } + + public static DocumentType3Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentType5Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentType5Code.java new file mode 100644 index 0000000000..129a1c2e6f --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/DocumentType5Code.java @@ -0,0 +1,71 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per DocumentType5Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="DocumentType5Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="MSIN"/>
+ *     <enumeration value="CNFA"/>
+ *     <enumeration value="DNFA"/>
+ *     <enumeration value="CINV"/>
+ *     <enumeration value="CREN"/>
+ *     <enumeration value="DEBN"/>
+ *     <enumeration value="HIRI"/>
+ *     <enumeration value="SBIN"/>
+ *     <enumeration value="CMCN"/>
+ *     <enumeration value="SOAC"/>
+ *     <enumeration value="DISP"/>
+ *     <enumeration value="BOLD"/>
+ *     <enumeration value="VCHR"/>
+ *     <enumeration value="AROI"/>
+ *     <enumeration value="TSUT"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "DocumentType5Code") +@XmlEnum +public enum DocumentType5Code { + + MSIN, + CNFA, + DNFA, + CINV, + CREN, + DEBN, + HIRI, + SBIN, + CMCN, + SOAC, + DISP, + BOLD, + VCHR, + AROI, + TSUT; + + public String value() { + return name(); + } + + public static DocumentType5Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericIdentification3.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericIdentification3.java new file mode 100644 index 0000000000..81a63f82a1 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericIdentification3.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per GenericIdentification3 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="GenericIdentification3">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         <element name="Issr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GenericIdentification3", propOrder = { + "id", + "issr" +}) +public class GenericIdentification3 { + + @XmlElement(name = "Id", required = true) + protected String id; + @XmlElement(name = "Issr") + protected String issr; + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà issr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssr() { + return issr; + } + + /** + * Imposta il valore della proprietà issr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssr(String value) { + this.issr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericOrganisationIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericOrganisationIdentification1.java new file mode 100644 index 0000000000..220aa64da2 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericOrganisationIdentification1.java @@ -0,0 +1,125 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per GenericOrganisationIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="GenericOrganisationIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         <element name="SchmeNm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}OrganisationIdentificationSchemeName1Choice" minOccurs="0"/>
+ *         <element name="Issr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GenericOrganisationIdentification1", propOrder = { + "id", + "schmeNm", + "issr" +}) +public class GenericOrganisationIdentification1 { + + @XmlElement(name = "Id", required = true) + protected String id; + @XmlElement(name = "SchmeNm") + protected OrganisationIdentificationSchemeName1Choice schmeNm; + @XmlElement(name = "Issr") + protected String issr; + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà schmeNm. + * + * @return + * possible object is + * {@link OrganisationIdentificationSchemeName1Choice } + * + */ + public OrganisationIdentificationSchemeName1Choice getSchmeNm() { + return schmeNm; + } + + /** + * Imposta il valore della proprietà schmeNm. + * + * @param value + * allowed object is + * {@link OrganisationIdentificationSchemeName1Choice } + * + */ + public void setSchmeNm(OrganisationIdentificationSchemeName1Choice value) { + this.schmeNm = value; + } + + /** + * Recupera il valore della proprietà issr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssr() { + return issr; + } + + /** + * Imposta il valore della proprietà issr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssr(String value) { + this.issr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericPersonIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericPersonIdentification1.java new file mode 100644 index 0000000000..d16c70f873 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/GenericPersonIdentification1.java @@ -0,0 +1,125 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per GenericPersonIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="GenericPersonIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         <element name="SchmeNm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}PersonIdentificationSchemeName1Choice" minOccurs="0"/>
+ *         <element name="Issr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "GenericPersonIdentification1", propOrder = { + "id", + "schmeNm", + "issr" +}) +public class GenericPersonIdentification1 { + + @XmlElement(name = "Id", required = true) + protected String id; + @XmlElement(name = "SchmeNm") + protected PersonIdentificationSchemeName1Choice schmeNm; + @XmlElement(name = "Issr") + protected String issr; + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà schmeNm. + * + * @return + * possible object is + * {@link PersonIdentificationSchemeName1Choice } + * + */ + public PersonIdentificationSchemeName1Choice getSchmeNm() { + return schmeNm; + } + + /** + * Imposta il valore della proprietà schmeNm. + * + * @param value + * allowed object is + * {@link PersonIdentificationSchemeName1Choice } + * + */ + public void setSchmeNm(PersonIdentificationSchemeName1Choice value) { + this.schmeNm = value; + } + + /** + * Recupera il valore della proprietà issr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssr() { + return issr; + } + + /** + * Imposta il valore della proprietà issr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssr(String value) { + this.issr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/NamePrefix1Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/NamePrefix1Code.java new file mode 100644 index 0000000000..e4b9d3b93b --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/NamePrefix1Code.java @@ -0,0 +1,49 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per NamePrefix1Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="NamePrefix1Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="DOCT"/>
+ *     <enumeration value="MIST"/>
+ *     <enumeration value="MISS"/>
+ *     <enumeration value="MADM"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "NamePrefix1Code") +@XmlEnum +public enum NamePrefix1Code { + + DOCT, + MIST, + MISS, + MADM; + + public String value() { + return name(); + } + + public static NamePrefix1Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ObjectFactory.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ObjectFactory.java new file mode 100644 index 0000000000..7ba0f1aa8e --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ObjectFactory.java @@ -0,0 +1,718 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the it.integry.ems.contabil.sepa.dto package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _CBISgnInf_QNAME = new QName("urn:CBI:xsd:CBISgnInf.001.04", "CBISgnInf"); + private final static QName _CBIHdrTrt_QNAME = new QName("urn:CBI:xsd:CBIHdrTrt.001.07", "CBIHdrTrt"); + private final static QName _CBIPaymentRequestMsg_QNAME = new QName("urn:CBI:xsd:CBIPaymentRequestMsg.00.04.00", "CBIPaymentRequestMsg"); + private final static QName _CBIBdyPaymentRequest_QNAME = new QName("urn:CBI:xsd:CBIBdyPaymentRequest.00.04.00", "CBIBdyPaymentRequest"); + private final static QName _CBIPaymentRequest_QNAME = new QName("urn:CBI:xsd:CBIPaymentRequest.00.04.00", "CBIPaymentRequest"); + private final static QName _CBIHdrSrv_QNAME = new QName("urn:CBI:xsd:CBIHdrSrv.001.07", "CBIHdrSrv"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: it.integry.ems.contabil.sepa.dto + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link CBIPaymentRequestMsg000400 } + * + */ + public CBIPaymentRequestMsg000400 createCBIPaymentRequestMsg000400() { + return new CBIPaymentRequestMsg000400(); + } + + /** + * Create an instance of {@link CBIHdrTrt00107 } + * + */ + public CBIHdrTrt00107 createCBIHdrTrt00107() { + return new CBIHdrTrt00107(); + } + + /** + * Create an instance of {@link CBIHdrSrv00107 } + * + */ + public CBIHdrSrv00107 createCBIHdrSrv00107() { + return new CBIHdrSrv00107(); + } + + /** + * Create an instance of {@link SenderInformation } + * + */ + public SenderInformation createSenderInformation() { + return new SenderInformation(); + } + + /** + * Create an instance of {@link ServiceInformation } + * + */ + public ServiceInformation createServiceInformation() { + return new ServiceInformation(); + } + + /** + * Create an instance of {@link CongruencyInformation } + * + */ + public CongruencyInformation createCongruencyInformation() { + return new CongruencyInformation(); + } + + /** + * Create an instance of {@link DiagnosticInformation } + * + */ + public DiagnosticInformation createDiagnosticInformation() { + return new DiagnosticInformation(); + } + + /** + * Create an instance of {@link ReceiverInformation } + * + */ + public ReceiverInformation createReceiverInformation() { + return new ReceiverInformation(); + } + + /** + * Create an instance of {@link CBIBdyPaymentRequest000400 } + * + */ + public CBIBdyPaymentRequest000400 createCBIBdyPaymentRequest000400() { + return new CBIBdyPaymentRequest000400(); + } + + /** + * Create an instance of {@link CBIEnvelPaymentRequest000400 } + * + */ + public CBIEnvelPaymentRequest000400 createCBIEnvelPaymentRequest000400() { + return new CBIEnvelPaymentRequest000400(); + } + + /** + * Create an instance of {@link CBIPaymentRequest000400 } + * + */ + public CBIPaymentRequest000400 createCBIPaymentRequest000400() { + return new CBIPaymentRequest000400(); + } + + /** + * Create an instance of {@link CBIBranchAndFinancialInstitutionIdentification1 } + * + */ + public CBIBranchAndFinancialInstitutionIdentification1 createCBIBranchAndFinancialInstitutionIdentification1() { + return new CBIBranchAndFinancialInstitutionIdentification1(); + } + + /** + * Create an instance of {@link CBIBranchAndFinancialInstitutionIdentification3 } + * + */ + public CBIBranchAndFinancialInstitutionIdentification3 createCBIBranchAndFinancialInstitutionIdentification3() { + return new CBIBranchAndFinancialInstitutionIdentification3(); + } + + /** + * Create an instance of {@link CBIBranchAndFinancialInstitutionIdentification2 } + * + */ + public CBIBranchAndFinancialInstitutionIdentification2 createCBIBranchAndFinancialInstitutionIdentification2() { + return new CBIBranchAndFinancialInstitutionIdentification2(); + } + + /** + * Create an instance of {@link RemittanceAmount1 } + * + */ + public RemittanceAmount1 createRemittanceAmount1() { + return new RemittanceAmount1(); + } + + /** + * Create an instance of {@link GenericOrganisationIdentification1 } + * + */ + public GenericOrganisationIdentification1 createGenericOrganisationIdentification1() { + return new GenericOrganisationIdentification1(); + } + + /** + * Create an instance of {@link CategoryPurpose1Choice } + * + */ + public CategoryPurpose1Choice createCategoryPurpose1Choice() { + return new CategoryPurpose1Choice(); + } + + /** + * Create an instance of {@link CBIAccountIdentification1 } + * + */ + public CBIAccountIdentification1 createCBIAccountIdentification1() { + return new CBIAccountIdentification1(); + } + + /** + * Create an instance of {@link OrganisationIdentification4 } + * + */ + public OrganisationIdentification4 createOrganisationIdentification4() { + return new OrganisationIdentification4(); + } + + /** + * Create an instance of {@link CBIServiceLevel2 } + * + */ + public CBIServiceLevel2 createCBIServiceLevel2() { + return new CBIServiceLevel2(); + } + + /** + * Create an instance of {@link CBIServiceLevel1 } + * + */ + public CBIServiceLevel1 createCBIServiceLevel1() { + return new CBIServiceLevel1(); + } + + /** + * Create an instance of {@link CreditorReferenceType2 } + * + */ + public CreditorReferenceType2 createCreditorReferenceType2() { + return new CreditorReferenceType2(); + } + + /** + * Create an instance of {@link CBIPaymentInstructionInformation } + * + */ + public CBIPaymentInstructionInformation createCBIPaymentInstructionInformation() { + return new CBIPaymentInstructionInformation(); + } + + /** + * Create an instance of {@link CBIFinancialInstitutionIdentification2 } + * + */ + public CBIFinancialInstitutionIdentification2 createCBIFinancialInstitutionIdentification2() { + return new CBIFinancialInstitutionIdentification2(); + } + + /** + * Create an instance of {@link CBIFinancialInstitutionIdentification1 } + * + */ + public CBIFinancialInstitutionIdentification1 createCBIFinancialInstitutionIdentification1() { + return new CBIFinancialInstitutionIdentification1(); + } + + /** + * Create an instance of {@link CBIFinancialInstitutionIdentification3 } + * + */ + public CBIFinancialInstitutionIdentification3 createCBIFinancialInstitutionIdentification3() { + return new CBIFinancialInstitutionIdentification3(); + } + + /** + * Create an instance of {@link CBICheque1 } + * + */ + public CBICheque1 createCBICheque1() { + return new CBICheque1(); + } + + /** + * Create an instance of {@link CBIRemittanceLocation1 } + * + */ + public CBIRemittanceLocation1 createCBIRemittanceLocation1() { + return new CBIRemittanceLocation1(); + } + + /** + * Create an instance of {@link CreditorReferenceInformation2 } + * + */ + public CreditorReferenceInformation2 createCreditorReferenceInformation2() { + return new CreditorReferenceInformation2(); + } + + /** + * Create an instance of {@link CBIParty1Choice } + * + */ + public CBIParty1Choice createCBIParty1Choice() { + return new CBIParty1Choice(); + } + + /** + * Create an instance of {@link GenericIdentification3 } + * + */ + public GenericIdentification3 createGenericIdentification3() { + return new GenericIdentification3(); + } + + /** + * Create an instance of {@link CBICashAccount1 } + * + */ + public CBICashAccount1 createCBICashAccount1() { + return new CBICashAccount1(); + } + + /** + * Create an instance of {@link CBICashAccount2 } + * + */ + public CBICashAccount2 createCBICashAccount2() { + return new CBICashAccount2(); + } + + /** + * Create an instance of {@link DateAndPlaceOfBirth } + * + */ + public DateAndPlaceOfBirth createDateAndPlaceOfBirth() { + return new DateAndPlaceOfBirth(); + } + + /** + * Create an instance of {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public ActiveOrHistoricCurrencyAndAmount createActiveOrHistoricCurrencyAndAmount() { + return new ActiveOrHistoricCurrencyAndAmount(); + } + + /** + * Create an instance of {@link ReferredDocumentType1Choice } + * + */ + public ReferredDocumentType1Choice createReferredDocumentType1Choice() { + return new ReferredDocumentType1Choice(); + } + + /** + * Create an instance of {@link CBIOrganisationIdentification1 } + * + */ + public CBIOrganisationIdentification1 createCBIOrganisationIdentification1() { + return new CBIOrganisationIdentification1(); + } + + /** + * Create an instance of {@link PersonIdentification5 } + * + */ + public PersonIdentification5 createPersonIdentification5() { + return new PersonIdentification5(); + } + + /** + * Create an instance of {@link CreditorReferenceType1Choice } + * + */ + public CreditorReferenceType1Choice createCreditorReferenceType1Choice() { + return new CreditorReferenceType1Choice(); + } + + /** + * Create an instance of {@link DocumentAdjustment1 } + * + */ + public DocumentAdjustment1 createDocumentAdjustment1() { + return new DocumentAdjustment1(); + } + + /** + * Create an instance of {@link StructuredRemittanceInformation7 } + * + */ + public StructuredRemittanceInformation7 createStructuredRemittanceInformation7() { + return new StructuredRemittanceInformation7(); + } + + /** + * Create an instance of {@link CBIRegulatoryReporting1 } + * + */ + public CBIRegulatoryReporting1 createCBIRegulatoryReporting1() { + return new CBIRegulatoryReporting1(); + } + + /** + * Create an instance of {@link PartyIdentification32 } + * + */ + public PartyIdentification32 createPartyIdentification32() { + return new PartyIdentification32(); + } + + /** + * Create an instance of {@link ReferredDocumentInformation3 } + * + */ + public ReferredDocumentInformation3 createReferredDocumentInformation3() { + return new ReferredDocumentInformation3(); + } + + /** + * Create an instance of {@link CBIGroupHeader } + * + */ + public CBIGroupHeader createCBIGroupHeader() { + return new CBIGroupHeader(); + } + + /** + * Create an instance of {@link Party6Choice } + * + */ + public Party6Choice createParty6Choice() { + return new Party6Choice(); + } + + /** + * Create an instance of {@link PersonIdentificationSchemeName1Choice } + * + */ + public PersonIdentificationSchemeName1Choice createPersonIdentificationSchemeName1Choice() { + return new PersonIdentificationSchemeName1Choice(); + } + + /** + * Create an instance of {@link CBIAmountType1 } + * + */ + public CBIAmountType1 createCBIAmountType1() { + return new CBIAmountType1(); + } + + /** + * Create an instance of {@link CBILocalInstrument1 } + * + */ + public CBILocalInstrument1 createCBILocalInstrument1() { + return new CBILocalInstrument1(); + } + + /** + * Create an instance of {@link CBIStructuredRegulatoryReporting1 } + * + */ + public CBIStructuredRegulatoryReporting1 createCBIStructuredRegulatoryReporting1() { + return new CBIStructuredRegulatoryReporting1(); + } + + /** + * Create an instance of {@link CBIOrganisationIdentification4 } + * + */ + public CBIOrganisationIdentification4 createCBIOrganisationIdentification4() { + return new CBIOrganisationIdentification4(); + } + + /** + * Create an instance of {@link CBIOrganisationIdentification3 } + * + */ + public CBIOrganisationIdentification3 createCBIOrganisationIdentification3() { + return new CBIOrganisationIdentification3(); + } + + /** + * Create an instance of {@link CBICreditTransferTransactionInformation } + * + */ + public CBICreditTransferTransactionInformation createCBICreditTransferTransactionInformation() { + return new CBICreditTransferTransactionInformation(); + } + + /** + * Create an instance of {@link CBIOrganisationIdentification2 } + * + */ + public CBIOrganisationIdentification2 createCBIOrganisationIdentification2() { + return new CBIOrganisationIdentification2(); + } + + /** + * Create an instance of {@link PaymentIdentification1 } + * + */ + public PaymentIdentification1 createPaymentIdentification1() { + return new PaymentIdentification1(); + } + + /** + * Create an instance of {@link RemittanceInformation5 } + * + */ + public RemittanceInformation5 createRemittanceInformation5() { + return new RemittanceInformation5(); + } + + /** + * Create an instance of {@link ContactDetails2 } + * + */ + public ContactDetails2 createContactDetails2() { + return new ContactDetails2(); + } + + /** + * Create an instance of {@link ReferredDocumentType2 } + * + */ + public ReferredDocumentType2 createReferredDocumentType2() { + return new ReferredDocumentType2(); + } + + /** + * Create an instance of {@link CBIPaymentTypeInformation1 } + * + */ + public CBIPaymentTypeInformation1 createCBIPaymentTypeInformation1() { + return new CBIPaymentTypeInformation1(); + } + + /** + * Create an instance of {@link Purpose1Choice } + * + */ + public Purpose1Choice createPurpose1Choice() { + return new Purpose1Choice(); + } + + /** + * Create an instance of {@link CBIPaymentTypeInformation2 } + * + */ + public CBIPaymentTypeInformation2 createCBIPaymentTypeInformation2() { + return new CBIPaymentTypeInformation2(); + } + + /** + * Create an instance of {@link OrganisationIdentificationSchemeName1Choice } + * + */ + public OrganisationIdentificationSchemeName1Choice createOrganisationIdentificationSchemeName1Choice() { + return new OrganisationIdentificationSchemeName1Choice(); + } + + /** + * Create an instance of {@link CBIPersonIdentification1 } + * + */ + public CBIPersonIdentification1 createCBIPersonIdentification1() { + return new CBIPersonIdentification1(); + } + + /** + * Create an instance of {@link CBIClearingSystemMemberIdentification1 } + * + */ + public CBIClearingSystemMemberIdentification1 createCBIClearingSystemMemberIdentification1() { + return new CBIClearingSystemMemberIdentification1(); + } + + /** + * Create an instance of {@link CBIPartyIdentification2 } + * + */ + public CBIPartyIdentification2 createCBIPartyIdentification2() { + return new CBIPartyIdentification2(); + } + + /** + * Create an instance of {@link CBIPartyIdentification3 } + * + */ + public CBIPartyIdentification3 createCBIPartyIdentification3() { + return new CBIPartyIdentification3(); + } + + /** + * Create an instance of {@link CBIPartyIdentification4 } + * + */ + public CBIPartyIdentification4 createCBIPartyIdentification4() { + return new CBIPartyIdentification4(); + } + + /** + * Create an instance of {@link CBIPartyIdentification5 } + * + */ + public CBIPartyIdentification5 createCBIPartyIdentification5() { + return new CBIPartyIdentification5(); + } + + /** + * Create an instance of {@link CBIIdType1 } + * + */ + public CBIIdType1 createCBIIdType1() { + return new CBIIdType1(); + } + + /** + * Create an instance of {@link CBIIdType2 } + * + */ + public CBIIdType2 createCBIIdType2() { + return new CBIIdType2(); + } + + /** + * Create an instance of {@link CBIPostalAddress6 } + * + */ + public CBIPostalAddress6 createCBIPostalAddress6() { + return new CBIPostalAddress6(); + } + + /** + * Create an instance of {@link CBIGenericIdentification2 } + * + */ + public CBIGenericIdentification2 createCBIGenericIdentification2() { + return new CBIGenericIdentification2(); + } + + /** + * Create an instance of {@link CBIIdType3 } + * + */ + public CBIIdType3 createCBIIdType3() { + return new CBIIdType3(); + } + + /** + * Create an instance of {@link CBIPartyIdentification1 } + * + */ + public CBIPartyIdentification1 createCBIPartyIdentification1() { + return new CBIPartyIdentification1(); + } + + /** + * Create an instance of {@link CBIGenericIdentification1 } + * + */ + public CBIGenericIdentification1 createCBIGenericIdentification1() { + return new CBIGenericIdentification1(); + } + + /** + * Create an instance of {@link GenericPersonIdentification1 } + * + */ + public GenericPersonIdentification1 createGenericPersonIdentification1() { + return new GenericPersonIdentification1(); + } + + /** + * Create an instance of {@link CBISgnInf00104 } + * + */ + public CBISgnInf00104 createCBISgnInf00104() { + return new CBISgnInf00104(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CBISgnInf00104 }{@code >}} + * + */ + @XmlElementDecl(namespace = "urn:CBI:xsd:CBISgnInf.001.04", name = "CBISgnInf") + public JAXBElement createCBISgnInf(CBISgnInf00104 value) { + return new JAXBElement(_CBISgnInf_QNAME, CBISgnInf00104 .class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CBIHdrTrt00107 }{@code >}} + * + */ + @XmlElementDecl(namespace = "urn:CBI:xsd:CBIHdrTrt.001.07", name = "CBIHdrTrt") + public JAXBElement createCBIHdrTrt(CBIHdrTrt00107 value) { + return new JAXBElement(_CBIHdrTrt_QNAME, CBIHdrTrt00107 .class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CBIPaymentRequestMsg000400 }{@code >}} + * + */ + @XmlElementDecl(namespace = "urn:CBI:xsd:CBIPaymentRequestMsg.00.04.00", name = "CBIPaymentRequestMsg") + public JAXBElement createCBIPaymentRequestMsg(CBIPaymentRequestMsg000400 value) { + return new JAXBElement(_CBIPaymentRequestMsg_QNAME, CBIPaymentRequestMsg000400 .class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CBIBdyPaymentRequest000400 }{@code >}} + * + */ + @XmlElementDecl(namespace = "urn:CBI:xsd:CBIBdyPaymentRequest.00.04.00", name = "CBIBdyPaymentRequest") + public JAXBElement createCBIBdyPaymentRequest(CBIBdyPaymentRequest000400 value) { + return new JAXBElement(_CBIBdyPaymentRequest_QNAME, CBIBdyPaymentRequest000400 .class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CBIPaymentRequest000400 }{@code >}} + * + */ + @XmlElementDecl(namespace = "urn:CBI:xsd:CBIPaymentRequest.00.04.00", name = "CBIPaymentRequest") + public JAXBElement createCBIPaymentRequest(CBIPaymentRequest000400 value) { + return new JAXBElement(_CBIPaymentRequest_QNAME, CBIPaymentRequest000400 .class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CBIHdrSrv00107 }{@code >}} + * + */ + @XmlElementDecl(namespace = "urn:CBI:xsd:CBIHdrSrv.001.07", name = "CBIHdrSrv") + public JAXBElement createCBIHdrSrv(CBIHdrSrv00107 value) { + return new JAXBElement(_CBIHdrSrv_QNAME, CBIHdrSrv00107 .class, null, value); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/OrganisationIdentification4.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/OrganisationIdentification4.java new file mode 100644 index 0000000000..d4c8f0ce44 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/OrganisationIdentification4.java @@ -0,0 +1,104 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per OrganisationIdentification4 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="OrganisationIdentification4">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="BICOrBEI" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}AnyBICIdentifier" minOccurs="0"/>
+ *         <element name="Othr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}GenericOrganisationIdentification1" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OrganisationIdentification4", propOrder = { + "bicOrBEI", + "othr" +}) +public class OrganisationIdentification4 { + + @XmlElement(name = "BICOrBEI") + protected String bicOrBEI; + @XmlElement(name = "Othr") + protected List othr; + + /** + * Recupera il valore della proprietà bicOrBEI. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBICOrBEI() { + return bicOrBEI; + } + + /** + * Imposta il valore della proprietà bicOrBEI. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBICOrBEI(String value) { + this.bicOrBEI = value; + } + + /** + * Gets the value of the othr property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the othr property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOthr().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GenericOrganisationIdentification1 } + * + * + */ + public List getOthr() { + if (othr == null) { + othr = new ArrayList(); + } + return this.othr; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/OrganisationIdentificationSchemeName1Choice.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/OrganisationIdentificationSchemeName1Choice.java new file mode 100644 index 0000000000..fefd0d1e43 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/OrganisationIdentificationSchemeName1Choice.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per OrganisationIdentificationSchemeName1Choice complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="OrganisationIdentificationSchemeName1Choice">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="Cd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ExternalOrganisationIdentification1Code"/>
+ *           <element name="Prtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OrganisationIdentificationSchemeName1Choice", propOrder = { + "cd", + "prtry" +}) +public class OrganisationIdentificationSchemeName1Choice { + + @XmlElement(name = "Cd") + protected String cd; + @XmlElement(name = "Prtry") + protected String prtry; + + /** + * Recupera il valore della proprietà cd. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCd() { + return cd; + } + + /** + * Imposta il valore della proprietà cd. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCd(String value) { + this.cd = value; + } + + /** + * Recupera il valore della proprietà prtry. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrtry() { + return prtry; + } + + /** + * Imposta il valore della proprietà prtry. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrtry(String value) { + this.prtry = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Party6Choice.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Party6Choice.java new file mode 100644 index 0000000000..b3c25457b8 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Party6Choice.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per Party6Choice complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="Party6Choice">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="OrgId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}OrganisationIdentification4"/>
+ *           <element name="PrvtId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}PersonIdentification5"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Party6Choice", propOrder = { + "orgId", + "prvtId" +}) +public class Party6Choice { + + @XmlElement(name = "OrgId") + protected OrganisationIdentification4 orgId; + @XmlElement(name = "PrvtId") + protected PersonIdentification5 prvtId; + + /** + * Recupera il valore della proprietà orgId. + * + * @return + * possible object is + * {@link OrganisationIdentification4 } + * + */ + public OrganisationIdentification4 getOrgId() { + return orgId; + } + + /** + * Imposta il valore della proprietà orgId. + * + * @param value + * allowed object is + * {@link OrganisationIdentification4 } + * + */ + public void setOrgId(OrganisationIdentification4 value) { + this.orgId = value; + } + + /** + * Recupera il valore della proprietà prvtId. + * + * @return + * possible object is + * {@link PersonIdentification5 } + * + */ + public PersonIdentification5 getPrvtId() { + return prvtId; + } + + /** + * Imposta il valore della proprietà prvtId. + * + * @param value + * allowed object is + * {@link PersonIdentification5 } + * + */ + public void setPrvtId(PersonIdentification5 value) { + this.prvtId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PartyIdentification32.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PartyIdentification32.java new file mode 100644 index 0000000000..61db1d9c84 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PartyIdentification32.java @@ -0,0 +1,181 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per PartyIdentification32 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="PartyIdentification32">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Nm" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max140Text" minOccurs="0"/>
+ *         <element name="PstlAdr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CBIPostalAddress6" minOccurs="0"/>
+ *         <element name="Id" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Party6Choice" minOccurs="0"/>
+ *         <element name="CtryOfRes" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CountryCode" minOccurs="0"/>
+ *         <element name="CtctDtls" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ContactDetails2" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PartyIdentification32", propOrder = { + "nm", + "pstlAdr", + "id", + "ctryOfRes", + "ctctDtls" +}) +public class PartyIdentification32 { + + @XmlElement(name = "Nm") + protected String nm; + @XmlElement(name = "PstlAdr") + protected CBIPostalAddress6 pstlAdr; + @XmlElement(name = "Id") + protected Party6Choice id; + @XmlElement(name = "CtryOfRes") + protected String ctryOfRes; + @XmlElement(name = "CtctDtls") + protected ContactDetails2 ctctDtls; + + /** + * Recupera il valore della proprietà nm. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNm() { + return nm; + } + + /** + * Imposta il valore della proprietà nm. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNm(String value) { + this.nm = value; + } + + /** + * Recupera il valore della proprietà pstlAdr. + * + * @return + * possible object is + * {@link CBIPostalAddress6 } + * + */ + public CBIPostalAddress6 getPstlAdr() { + return pstlAdr; + } + + /** + * Imposta il valore della proprietà pstlAdr. + * + * @param value + * allowed object is + * {@link CBIPostalAddress6 } + * + */ + public void setPstlAdr(CBIPostalAddress6 value) { + this.pstlAdr = value; + } + + /** + * Recupera il valore della proprietà id. + * + * @return + * possible object is + * {@link Party6Choice } + * + */ + public Party6Choice getId() { + return id; + } + + /** + * Imposta il valore della proprietà id. + * + * @param value + * allowed object is + * {@link Party6Choice } + * + */ + public void setId(Party6Choice value) { + this.id = value; + } + + /** + * Recupera il valore della proprietà ctryOfRes. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCtryOfRes() { + return ctryOfRes; + } + + /** + * Imposta il valore della proprietà ctryOfRes. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCtryOfRes(String value) { + this.ctryOfRes = value; + } + + /** + * Recupera il valore della proprietà ctctDtls. + * + * @return + * possible object is + * {@link ContactDetails2 } + * + */ + public ContactDetails2 getCtctDtls() { + return ctctDtls; + } + + /** + * Imposta il valore della proprietà ctctDtls. + * + * @param value + * allowed object is + * {@link ContactDetails2 } + * + */ + public void setCtctDtls(ContactDetails2 value) { + this.ctctDtls = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PaymentIdentification1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PaymentIdentification1.java new file mode 100644 index 0000000000..15ea90ba12 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PaymentIdentification1.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per PaymentIdentification1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="PaymentIdentification1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="InstrId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         <element name="EndToEndId" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PaymentIdentification1", propOrder = { + "instrId", + "endToEndId" +}) +public class PaymentIdentification1 { + + @XmlElement(name = "InstrId", required = true) + protected String instrId; + @XmlElement(name = "EndToEndId", required = true) + protected String endToEndId; + + /** + * Recupera il valore della proprietà instrId. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInstrId() { + return instrId; + } + + /** + * Imposta il valore della proprietà instrId. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInstrId(String value) { + this.instrId = value; + } + + /** + * Recupera il valore della proprietà endToEndId. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEndToEndId() { + return endToEndId; + } + + /** + * Imposta il valore della proprietà endToEndId. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEndToEndId(String value) { + this.endToEndId = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PaymentMethod3Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PaymentMethod3Code.java new file mode 100644 index 0000000000..cad9ec0633 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PaymentMethod3Code.java @@ -0,0 +1,47 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per PaymentMethod3Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="PaymentMethod3Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="CHK"/>
+ *     <enumeration value="TRF"/>
+ *     <enumeration value="TRA"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "PaymentMethod3Code") +@XmlEnum +public enum PaymentMethod3Code { + + CHK, + TRF, + TRA; + + public String value() { + return name(); + } + + public static PaymentMethod3Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PersonIdentification5.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PersonIdentification5.java new file mode 100644 index 0000000000..171f876342 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PersonIdentification5.java @@ -0,0 +1,104 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per PersonIdentification5 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="PersonIdentification5">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DtAndPlcOfBirth" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}DateAndPlaceOfBirth" minOccurs="0"/>
+ *         <element name="Othr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}GenericPersonIdentification1" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PersonIdentification5", propOrder = { + "dtAndPlcOfBirth", + "othr" +}) +public class PersonIdentification5 { + + @XmlElement(name = "DtAndPlcOfBirth") + protected DateAndPlaceOfBirth dtAndPlcOfBirth; + @XmlElement(name = "Othr") + protected List othr; + + /** + * Recupera il valore della proprietà dtAndPlcOfBirth. + * + * @return + * possible object is + * {@link DateAndPlaceOfBirth } + * + */ + public DateAndPlaceOfBirth getDtAndPlcOfBirth() { + return dtAndPlcOfBirth; + } + + /** + * Imposta il valore della proprietà dtAndPlcOfBirth. + * + * @param value + * allowed object is + * {@link DateAndPlaceOfBirth } + * + */ + public void setDtAndPlcOfBirth(DateAndPlaceOfBirth value) { + this.dtAndPlcOfBirth = value; + } + + /** + * Gets the value of the othr property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the othr property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOthr().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link GenericPersonIdentification1 } + * + * + */ + public List getOthr() { + if (othr == null) { + othr = new ArrayList(); + } + return this.othr; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PersonIdentificationSchemeName1Choice.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PersonIdentificationSchemeName1Choice.java new file mode 100644 index 0000000000..f86747cdc6 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/PersonIdentificationSchemeName1Choice.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per PersonIdentificationSchemeName1Choice complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="PersonIdentificationSchemeName1Choice">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="Cd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ExternalPersonIdentification1Code"/>
+ *           <element name="Prtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PersonIdentificationSchemeName1Choice", propOrder = { + "cd", + "prtry" +}) +public class PersonIdentificationSchemeName1Choice { + + @XmlElement(name = "Cd") + protected String cd; + @XmlElement(name = "Prtry") + protected String prtry; + + /** + * Recupera il valore della proprietà cd. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCd() { + return cd; + } + + /** + * Imposta il valore della proprietà cd. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCd(String value) { + this.cd = value; + } + + /** + * Recupera il valore della proprietà prtry. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrtry() { + return prtry; + } + + /** + * Imposta il valore della proprietà prtry. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrtry(String value) { + this.prtry = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Priority2Code.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Priority2Code.java new file mode 100644 index 0000000000..fbe2af0cd6 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Priority2Code.java @@ -0,0 +1,45 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per Priority2Code. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="Priority2Code">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="HIGH"/>
+ *     <enumeration value="NORM"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "Priority2Code") +@XmlEnum +public enum Priority2Code { + + HIGH, + NORM; + + public String value() { + return name(); + } + + public static Priority2Code fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Purpose1Choice.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Purpose1Choice.java new file mode 100644 index 0000000000..ed22ff63a8 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/Purpose1Choice.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per Purpose1Choice complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="Purpose1Choice">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="Cd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ExternalPurpose1Code"/>
+ *           <element name="Prtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "Purpose1Choice", propOrder = { + "cd", + "prtry" +}) +public class Purpose1Choice { + + @XmlElement(name = "Cd") + protected String cd; + @XmlElement(name = "Prtry") + protected String prtry; + + /** + * Recupera il valore della proprietà cd. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCd() { + return cd; + } + + /** + * Imposta il valore della proprietà cd. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCd(String value) { + this.cd = value; + } + + /** + * Recupera il valore della proprietà prtry. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrtry() { + return prtry; + } + + /** + * Imposta il valore della proprietà prtry. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrtry(String value) { + this.prtry = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReceiverInformation.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReceiverInformation.java new file mode 100644 index 0000000000..ae1491e9c0 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReceiverInformation.java @@ -0,0 +1,125 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per ReceiverInformation complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ReceiverInformation">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="IdCBIRecv" type="{urn:CBI:xsd:CBIHdrSrv.001.07}CBIIdentifier"/>
+ *         <element name="RecvTyp" type="{urn:CBI:xsd:CBIHdrSrv.001.07}ReceiverType"/>
+ *         <element name="CBIRefrRecv" type="{urn:CBI:xsd:CBIHdrSrv.001.07}CBIIdentifier"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReceiverInformation", namespace = "urn:CBI:xsd:CBIHdrSrv.001.07", propOrder = { + "idCBIRecv", + "recvTyp", + "cbiRefrRecv" +}) +public class ReceiverInformation { + + @XmlElement(name = "IdCBIRecv", required = true) + protected String idCBIRecv; + @XmlElement(name = "RecvTyp", required = true) + protected ReceiverType recvTyp; + @XmlElement(name = "CBIRefrRecv", required = true) + protected String cbiRefrRecv; + + /** + * Recupera il valore della proprietà idCBIRecv. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdCBIRecv() { + return idCBIRecv; + } + + /** + * Imposta il valore della proprietà idCBIRecv. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdCBIRecv(String value) { + this.idCBIRecv = value; + } + + /** + * Recupera il valore della proprietà recvTyp. + * + * @return + * possible object is + * {@link ReceiverType } + * + */ + public ReceiverType getRecvTyp() { + return recvTyp; + } + + /** + * Imposta il valore della proprietà recvTyp. + * + * @param value + * allowed object is + * {@link ReceiverType } + * + */ + public void setRecvTyp(ReceiverType value) { + this.recvTyp = value; + } + + /** + * Recupera il valore della proprietà cbiRefrRecv. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCBIRefrRecv() { + return cbiRefrRecv; + } + + /** + * Imposta il valore della proprietà cbiRefrRecv. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCBIRefrRecv(String value) { + this.cbiRefrRecv = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReceiverType.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReceiverType.java new file mode 100644 index 0000000000..eabc699af4 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReceiverType.java @@ -0,0 +1,65 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per ReceiverType. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="ReceiverType">
+ *   <restriction base="{urn:CBI:xsd:CBIHdrSrv.001.07}Max35Text">
+ *     <enumeration value="Banca Proponente"/>
+ *     <enumeration value="Banca Passiva"/>
+ *     <enumeration value="Banca Gateway"/>
+ *     <enumeration value="STD"/>
+ *     <enumeration value="GPA"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "ReceiverType", namespace = "urn:CBI:xsd:CBIHdrSrv.001.07") +@XmlEnum +public enum ReceiverType { + + @XmlEnumValue("Banca Proponente") + BANCA_PROPONENTE("Banca Proponente"), + @XmlEnumValue("Banca Passiva") + BANCA_PASSIVA("Banca Passiva"), + @XmlEnumValue("Banca Gateway") + BANCA_GATEWAY("Banca Gateway"), + STD("STD"), + GPA("GPA"); + private final String value; + + ReceiverType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static ReceiverType fromValue(String v) { + for (ReceiverType c: ReceiverType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RecerencePlatform.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RecerencePlatform.java new file mode 100644 index 0000000000..8385ee7d94 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RecerencePlatform.java @@ -0,0 +1,43 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per RecerencePlatform. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="RecerencePlatform">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="A"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "RecerencePlatform", namespace = "urn:CBI:xsd:CBISgnInf.001.04") +@XmlEnum +public enum RecerencePlatform { + + A; + + public String value() { + return name(); + } + + public static RecerencePlatform fromValue(String v) { + return valueOf(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentInformation3.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentInformation3.java new file mode 100644 index 0000000000..b0f7b9389e --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentInformation3.java @@ -0,0 +1,126 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Classe Java per ReferredDocumentInformation3 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ReferredDocumentInformation3">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Tp" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ReferredDocumentType2" minOccurs="0"/>
+ *         <element name="Nb" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *         <element name="RltdDt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ISODate" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferredDocumentInformation3", propOrder = { + "tp", + "nb", + "rltdDt" +}) +public class ReferredDocumentInformation3 { + + @XmlElement(name = "Tp") + protected ReferredDocumentType2 tp; + @XmlElement(name = "Nb") + protected String nb; + @XmlElement(name = "RltdDt") + protected XMLGregorianCalendar rltdDt; + + /** + * Recupera il valore della proprietà tp. + * + * @return + * possible object is + * {@link ReferredDocumentType2 } + * + */ + public ReferredDocumentType2 getTp() { + return tp; + } + + /** + * Imposta il valore della proprietà tp. + * + * @param value + * allowed object is + * {@link ReferredDocumentType2 } + * + */ + public void setTp(ReferredDocumentType2 value) { + this.tp = value; + } + + /** + * Recupera il valore della proprietà nb. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNb() { + return nb; + } + + /** + * Imposta il valore della proprietà nb. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNb(String value) { + this.nb = value; + } + + /** + * Recupera il valore della proprietà rltdDt. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getRltdDt() { + return rltdDt; + } + + /** + * Imposta il valore della proprietà rltdDt. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setRltdDt(XMLGregorianCalendar value) { + this.rltdDt = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentType1Choice.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentType1Choice.java new file mode 100644 index 0000000000..558ae0bb9f --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentType1Choice.java @@ -0,0 +1,99 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per ReferredDocumentType1Choice complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ReferredDocumentType1Choice">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <choice>
+ *           <element name="Cd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}DocumentType5Code"/>
+ *           <element name="Prtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text"/>
+ *         </choice>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferredDocumentType1Choice", propOrder = { + "cd", + "prtry" +}) +public class ReferredDocumentType1Choice { + + @XmlElement(name = "Cd") + protected DocumentType5Code cd; + @XmlElement(name = "Prtry") + protected String prtry; + + /** + * Recupera il valore della proprietà cd. + * + * @return + * possible object is + * {@link DocumentType5Code } + * + */ + public DocumentType5Code getCd() { + return cd; + } + + /** + * Imposta il valore della proprietà cd. + * + * @param value + * allowed object is + * {@link DocumentType5Code } + * + */ + public void setCd(DocumentType5Code value) { + this.cd = value; + } + + /** + * Recupera il valore della proprietà prtry. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPrtry() { + return prtry; + } + + /** + * Imposta il valore della proprietà prtry. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPrtry(String value) { + this.prtry = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentType2.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentType2.java new file mode 100644 index 0000000000..8b1f7f015a --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ReferredDocumentType2.java @@ -0,0 +1,97 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per ReferredDocumentType2 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ReferredDocumentType2">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CdOrPrtry" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ReferredDocumentType1Choice"/>
+ *         <element name="Issr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max35Text" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ReferredDocumentType2", propOrder = { + "cdOrPrtry", + "issr" +}) +public class ReferredDocumentType2 { + + @XmlElement(name = "CdOrPrtry", required = true) + protected ReferredDocumentType1Choice cdOrPrtry; + @XmlElement(name = "Issr") + protected String issr; + + /** + * Recupera il valore della proprietà cdOrPrtry. + * + * @return + * possible object is + * {@link ReferredDocumentType1Choice } + * + */ + public ReferredDocumentType1Choice getCdOrPrtry() { + return cdOrPrtry; + } + + /** + * Imposta il valore della proprietà cdOrPrtry. + * + * @param value + * allowed object is + * {@link ReferredDocumentType1Choice } + * + */ + public void setCdOrPrtry(ReferredDocumentType1Choice value) { + this.cdOrPrtry = value; + } + + /** + * Recupera il valore della proprietà issr. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIssr() { + return issr; + } + + /** + * Imposta il valore della proprietà issr. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIssr(String value) { + this.issr = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RemittanceAmount1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RemittanceAmount1.java new file mode 100644 index 0000000000..7041cc22b5 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RemittanceAmount1.java @@ -0,0 +1,216 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per RemittanceAmount1 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="RemittanceAmount1">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DuePyblAmt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ActiveOrHistoricCurrencyAndAmount" minOccurs="0"/>
+ *         <element name="DscntApldAmt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ActiveOrHistoricCurrencyAndAmount" minOccurs="0"/>
+ *         <element name="CdtNoteAmt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ActiveOrHistoricCurrencyAndAmount" minOccurs="0"/>
+ *         <element name="TaxAmt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ActiveOrHistoricCurrencyAndAmount" minOccurs="0"/>
+ *         <element name="AdjstmntAmtAndRsn" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}DocumentAdjustment1" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="RmtdAmt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ActiveOrHistoricCurrencyAndAmount" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RemittanceAmount1", propOrder = { + "duePyblAmt", + "dscntApldAmt", + "cdtNoteAmt", + "taxAmt", + "adjstmntAmtAndRsn", + "rmtdAmt" +}) +public class RemittanceAmount1 { + + @XmlElement(name = "DuePyblAmt") + protected ActiveOrHistoricCurrencyAndAmount duePyblAmt; + @XmlElement(name = "DscntApldAmt") + protected ActiveOrHistoricCurrencyAndAmount dscntApldAmt; + @XmlElement(name = "CdtNoteAmt") + protected ActiveOrHistoricCurrencyAndAmount cdtNoteAmt; + @XmlElement(name = "TaxAmt") + protected ActiveOrHistoricCurrencyAndAmount taxAmt; + @XmlElement(name = "AdjstmntAmtAndRsn") + protected List adjstmntAmtAndRsn; + @XmlElement(name = "RmtdAmt") + protected ActiveOrHistoricCurrencyAndAmount rmtdAmt; + + /** + * Recupera il valore della proprietà duePyblAmt. + * + * @return + * possible object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public ActiveOrHistoricCurrencyAndAmount getDuePyblAmt() { + return duePyblAmt; + } + + /** + * Imposta il valore della proprietà duePyblAmt. + * + * @param value + * allowed object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public void setDuePyblAmt(ActiveOrHistoricCurrencyAndAmount value) { + this.duePyblAmt = value; + } + + /** + * Recupera il valore della proprietà dscntApldAmt. + * + * @return + * possible object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public ActiveOrHistoricCurrencyAndAmount getDscntApldAmt() { + return dscntApldAmt; + } + + /** + * Imposta il valore della proprietà dscntApldAmt. + * + * @param value + * allowed object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public void setDscntApldAmt(ActiveOrHistoricCurrencyAndAmount value) { + this.dscntApldAmt = value; + } + + /** + * Recupera il valore della proprietà cdtNoteAmt. + * + * @return + * possible object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public ActiveOrHistoricCurrencyAndAmount getCdtNoteAmt() { + return cdtNoteAmt; + } + + /** + * Imposta il valore della proprietà cdtNoteAmt. + * + * @param value + * allowed object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public void setCdtNoteAmt(ActiveOrHistoricCurrencyAndAmount value) { + this.cdtNoteAmt = value; + } + + /** + * Recupera il valore della proprietà taxAmt. + * + * @return + * possible object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public ActiveOrHistoricCurrencyAndAmount getTaxAmt() { + return taxAmt; + } + + /** + * Imposta il valore della proprietà taxAmt. + * + * @param value + * allowed object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public void setTaxAmt(ActiveOrHistoricCurrencyAndAmount value) { + this.taxAmt = value; + } + + /** + * Gets the value of the adjstmntAmtAndRsn property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the adjstmntAmtAndRsn property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAdjstmntAmtAndRsn().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DocumentAdjustment1 } + * + * + */ + public List getAdjstmntAmtAndRsn() { + if (adjstmntAmtAndRsn == null) { + adjstmntAmtAndRsn = new ArrayList(); + } + return this.adjstmntAmtAndRsn; + } + + /** + * Recupera il valore della proprietà rmtdAmt. + * + * @return + * possible object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public ActiveOrHistoricCurrencyAndAmount getRmtdAmt() { + return rmtdAmt; + } + + /** + * Imposta il valore della proprietà rmtdAmt. + * + * @param value + * allowed object is + * {@link ActiveOrHistoricCurrencyAndAmount } + * + */ + public void setRmtdAmt(ActiveOrHistoricCurrencyAndAmount value) { + this.rmtdAmt = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RemittanceInformation5.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RemittanceInformation5.java new file mode 100644 index 0000000000..b4ce21ad22 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/RemittanceInformation5.java @@ -0,0 +1,109 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per RemittanceInformation5 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="RemittanceInformation5">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Ustrd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max140Text" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Strd" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}StructuredRemittanceInformation7" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RemittanceInformation5", propOrder = { + "ustrd", + "strd" +}) +public class RemittanceInformation5 { + + @XmlElement(name = "Ustrd") + protected List ustrd; + @XmlElement(name = "Strd") + protected List strd; + + /** + * Gets the value of the ustrd property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ustrd property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getUstrd().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getUstrd() { + if (ustrd == null) { + ustrd = new ArrayList(); + } + return this.ustrd; + } + + /** + * Gets the value of the strd property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the strd property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getStrd().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link StructuredRemittanceInformation7 } + * + * + */ + public List getStrd() { + if (strd == null) { + strd = new ArrayList(); + } + return this.strd; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/SenderInformation.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/SenderInformation.java new file mode 100644 index 0000000000..bc9e4a7dad --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/SenderInformation.java @@ -0,0 +1,125 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per SenderInformation complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="SenderInformation">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="IdCBISend" type="{urn:CBI:xsd:CBIHdrSrv.001.07}CBIIdentifier"/>
+ *         <element name="SendTyp" type="{urn:CBI:xsd:CBIHdrSrv.001.07}SenderType"/>
+ *         <element name="CBIRefrSend" type="{urn:CBI:xsd:CBIHdrSrv.001.07}CBIIdentifier"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SenderInformation", namespace = "urn:CBI:xsd:CBIHdrSrv.001.07", propOrder = { + "idCBISend", + "sendTyp", + "cbiRefrSend" +}) +public class SenderInformation { + + @XmlElement(name = "IdCBISend", required = true) + protected String idCBISend; + @XmlElement(name = "SendTyp", required = true) + protected SenderType sendTyp; + @XmlElement(name = "CBIRefrSend", required = true) + protected String cbiRefrSend; + + /** + * Recupera il valore della proprietà idCBISend. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdCBISend() { + return idCBISend; + } + + /** + * Imposta il valore della proprietà idCBISend. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdCBISend(String value) { + this.idCBISend = value; + } + + /** + * Recupera il valore della proprietà sendTyp. + * + * @return + * possible object is + * {@link SenderType } + * + */ + public SenderType getSendTyp() { + return sendTyp; + } + + /** + * Imposta il valore della proprietà sendTyp. + * + * @param value + * allowed object is + * {@link SenderType } + * + */ + public void setSendTyp(SenderType value) { + this.sendTyp = value; + } + + /** + * Recupera il valore della proprietà cbiRefrSend. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCBIRefrSend() { + return cbiRefrSend; + } + + /** + * Imposta il valore della proprietà cbiRefrSend. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCBIRefrSend(String value) { + this.cbiRefrSend = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/SenderType.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/SenderType.java new file mode 100644 index 0000000000..1c8c1ad532 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/SenderType.java @@ -0,0 +1,65 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per SenderType. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="SenderType">
+ *   <restriction base="{urn:CBI:xsd:CBIHdrSrv.001.07}Max35Text">
+ *     <enumeration value="Banca Proponente"/>
+ *     <enumeration value="Banca Passiva"/>
+ *     <enumeration value="Banca Gateway"/>
+ *     <enumeration value="STD"/>
+ *     <enumeration value="GPA"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "SenderType", namespace = "urn:CBI:xsd:CBIHdrSrv.001.07") +@XmlEnum +public enum SenderType { + + @XmlEnumValue("Banca Proponente") + BANCA_PROPONENTE("Banca Proponente"), + @XmlEnumValue("Banca Passiva") + BANCA_PASSIVA("Banca Passiva"), + @XmlEnumValue("Banca Gateway") + BANCA_GATEWAY("Banca Gateway"), + STD("STD"), + GPA("GPA"); + private final String value; + + SenderType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static SenderType fromValue(String v) { + for (SenderType c: SenderType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceInformation.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceInformation.java new file mode 100644 index 0000000000..3165fe12af --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceInformation.java @@ -0,0 +1,126 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Classe Java per ServiceInformation complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="ServiceInformation">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="SrvNm" type="{urn:CBI:xsd:CBIHdrSrv.001.07}ServiceName1"/>
+ *         <element name="IdE2EMsg" type="{urn:CBI:xsd:CBIHdrSrv.001.07}IdE2EMsg1"/>
+ *         <element name="XMLCrtDt" type="{urn:CBI:xsd:CBIHdrSrv.001.07}ISODateTime"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ServiceInformation", namespace = "urn:CBI:xsd:CBIHdrSrv.001.07", propOrder = { + "srvNm", + "idE2EMsg", + "xmlCrtDt" +}) +public class ServiceInformation { + + @XmlElement(name = "SrvNm", required = true) + protected ServiceName1 srvNm; + @XmlElement(name = "IdE2EMsg", required = true) + protected String idE2EMsg; + @XmlElement(name = "XMLCrtDt", required = true) + protected XMLGregorianCalendar xmlCrtDt; + + /** + * Recupera il valore della proprietà srvNm. + * + * @return + * possible object is + * {@link ServiceName1 } + * + */ + public ServiceName1 getSrvNm() { + return srvNm; + } + + /** + * Imposta il valore della proprietà srvNm. + * + * @param value + * allowed object is + * {@link ServiceName1 } + * + */ + public void setSrvNm(ServiceName1 value) { + this.srvNm = value; + } + + /** + * Recupera il valore della proprietà idE2EMsg. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIdE2EMsg() { + return idE2EMsg; + } + + /** + * Imposta il valore della proprietà idE2EMsg. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIdE2EMsg(String value) { + this.idE2EMsg = value; + } + + /** + * Recupera il valore della proprietà xmlCrtDt. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getXMLCrtDt() { + return xmlCrtDt; + } + + /** + * Imposta il valore della proprietà xmlCrtDt. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setXMLCrtDt(XMLGregorianCalendar value) { + this.xmlCrtDt = value; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceName.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceName.java new file mode 100644 index 0000000000..f130d2bd02 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceName.java @@ -0,0 +1,226 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per ServiceName. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="ServiceName">
+ *   <restriction base="{urn:CBI:xsd:CBIHdrTrt.001.07}Max60Text">
+ *     <enumeration value="PORTING-IR"/>
+ *     <enumeration value="PORTING-IM"/>
+ *     <enumeration value="PORTING-IB"/>
+ *     <enumeration value="PORTING-AL"/>
+ *     <enumeration value="PORTING-PC"/>
+ *     <enumeration value="PORTING-PE"/>
+ *     <enumeration value="PORTING-AP"/>
+ *     <enumeration value="PORTING-AI"/>
+ *     <enumeration value="PORTING-AB"/>
+ *     <enumeration value="PORTING-SL-D"/>
+ *     <enumeration value="PORTING-F4"/>
+ *     <enumeration value="PORTING-I4"/>
+ *     <enumeration value="PORTING-R4"/>
+ *     <enumeration value="PORTING-EIR"/>
+ *     <enumeration value="PORTING-EIM"/>
+ *     <enumeration value="PORTING-EIB"/>
+ *     <enumeration value="PORTING-EAL"/>
+ *     <enumeration value="PORTING-BB"/>
+ *     <enumeration value="PORTING-EP"/>
+ *     <enumeration value="PORTING-AV"/>
+ *     <enumeration value="PORTING-RH"/>
+ *     <enumeration value="PORTING-RA"/>
+ *     <enumeration value="PORTING-EC"/>
+ *     <enumeration value="PORTING-DT"/>
+ *     <enumeration value="PORTING-RP"/>
+ *     <enumeration value="PORTING-SL-I"/>
+ *     <enumeration value="PORTING-A4"/>
+ *     <enumeration value="PORTING-Q4"/>
+ *     <enumeration value="BON-INIZ-BEN"/>
+ *     <enumeration value="ESITO-BON-ORD-BEN"/>
+ *     <enumeration value="ANT-FATT-ITA"/>
+ *     <enumeration value="ANT-FATT-EST"/>
+ *     <enumeration value="STAT-RPT-ANT-FATT"/>
+ *     <enumeration value="INV-E2E-FATT"/>
+ *     <enumeration value="INV-E2E-DOC-NON-STRUTT"/>
+ *     <enumeration value="SALDO-MOV-INTR"/>
+ *     <enumeration value="DISP-PAG-ITA"/>
+ *     <enumeration value="DISP-PAG-SEPA"/>
+ *     <enumeration value="STAT-RPT-DISP-PAG"/>
+ *     <enumeration value="AVV-BON-IN"/>
+ *     <enumeration value="AVV-ISTR"/>
+ *     <enumeration value="INF-TRF"/>
+ *     <enumeration value="INC-SDDC"/>
+ *     <enumeration value="INC-SDDB"/>
+ *     <enumeration value="STAT-RPT-INC-SDD"/>
+ *     <enumeration value="INF-ACCT-RT"/>
+ *     <enumeration value="STAT-RPT-PSD"/>
+ *     <enumeration value="CBILL-BATCH"/>
+ *     <enumeration value="CBILL-BATCH-BILLER"/>
+ *     <enumeration value="CERT-CRED-REQ"/>
+ *     <enumeration value="STAT-RPT-CERT-CRED"/>
+ *     <enumeration value="INF-STMT"/>
+ *     <enumeration value="SALDI-ANAG-TRIB"/>
+ *     <enumeration value="ESITO-SALDI-ANAG-TRIB"/>
+ *     <enumeration value="INC-SEDAC"/>
+ *     <enumeration value="INC-SEDAD"/>
+ *     <enumeration value="DISP-PAG-EST"/>
+ *     <enumeration value="STAT-RPT-DISP-PAG-EST"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "ServiceName", namespace = "urn:CBI:xsd:CBIHdrTrt.001.07") +@XmlEnum +public enum ServiceName { + + @XmlEnumValue("PORTING-IR") + PORTING_IR("PORTING-IR"), + @XmlEnumValue("PORTING-IM") + PORTING_IM("PORTING-IM"), + @XmlEnumValue("PORTING-IB") + PORTING_IB("PORTING-IB"), + @XmlEnumValue("PORTING-AL") + PORTING_AL("PORTING-AL"), + @XmlEnumValue("PORTING-PC") + PORTING_PC("PORTING-PC"), + @XmlEnumValue("PORTING-PE") + PORTING_PE("PORTING-PE"), + @XmlEnumValue("PORTING-AP") + PORTING_AP("PORTING-AP"), + @XmlEnumValue("PORTING-AI") + PORTING_AI("PORTING-AI"), + @XmlEnumValue("PORTING-AB") + PORTING_AB("PORTING-AB"), + @XmlEnumValue("PORTING-SL-D") + PORTING_SL_D("PORTING-SL-D"), + @XmlEnumValue("PORTING-F4") + PORTING_F_4("PORTING-F4"), + @XmlEnumValue("PORTING-I4") + PORTING_I_4("PORTING-I4"), + @XmlEnumValue("PORTING-R4") + PORTING_R_4("PORTING-R4"), + @XmlEnumValue("PORTING-EIR") + PORTING_EIR("PORTING-EIR"), + @XmlEnumValue("PORTING-EIM") + PORTING_EIM("PORTING-EIM"), + @XmlEnumValue("PORTING-EIB") + PORTING_EIB("PORTING-EIB"), + @XmlEnumValue("PORTING-EAL") + PORTING_EAL("PORTING-EAL"), + @XmlEnumValue("PORTING-BB") + PORTING_BB("PORTING-BB"), + @XmlEnumValue("PORTING-EP") + PORTING_EP("PORTING-EP"), + @XmlEnumValue("PORTING-AV") + PORTING_AV("PORTING-AV"), + @XmlEnumValue("PORTING-RH") + PORTING_RH("PORTING-RH"), + @XmlEnumValue("PORTING-RA") + PORTING_RA("PORTING-RA"), + @XmlEnumValue("PORTING-EC") + PORTING_EC("PORTING-EC"), + @XmlEnumValue("PORTING-DT") + PORTING_DT("PORTING-DT"), + @XmlEnumValue("PORTING-RP") + PORTING_RP("PORTING-RP"), + @XmlEnumValue("PORTING-SL-I") + PORTING_SL_I("PORTING-SL-I"), + @XmlEnumValue("PORTING-A4") + PORTING_A_4("PORTING-A4"), + @XmlEnumValue("PORTING-Q4") + PORTING_Q_4("PORTING-Q4"), + @XmlEnumValue("BON-INIZ-BEN") + BON_INIZ_BEN("BON-INIZ-BEN"), + @XmlEnumValue("ESITO-BON-ORD-BEN") + ESITO_BON_ORD_BEN("ESITO-BON-ORD-BEN"), + @XmlEnumValue("ANT-FATT-ITA") + ANT_FATT_ITA("ANT-FATT-ITA"), + @XmlEnumValue("ANT-FATT-EST") + ANT_FATT_EST("ANT-FATT-EST"), + @XmlEnumValue("STAT-RPT-ANT-FATT") + STAT_RPT_ANT_FATT("STAT-RPT-ANT-FATT"), + @XmlEnumValue("INV-E2E-FATT") + INV_E_2_E_FATT("INV-E2E-FATT"), + @XmlEnumValue("INV-E2E-DOC-NON-STRUTT") + INV_E_2_E_DOC_NON_STRUTT("INV-E2E-DOC-NON-STRUTT"), + @XmlEnumValue("SALDO-MOV-INTR") + SALDO_MOV_INTR("SALDO-MOV-INTR"), + @XmlEnumValue("DISP-PAG-ITA") + DISP_PAG_ITA("DISP-PAG-ITA"), + @XmlEnumValue("DISP-PAG-SEPA") + DISP_PAG_SEPA("DISP-PAG-SEPA"), + @XmlEnumValue("STAT-RPT-DISP-PAG") + STAT_RPT_DISP_PAG("STAT-RPT-DISP-PAG"), + @XmlEnumValue("AVV-BON-IN") + AVV_BON_IN("AVV-BON-IN"), + @XmlEnumValue("AVV-ISTR") + AVV_ISTR("AVV-ISTR"), + @XmlEnumValue("INF-TRF") + INF_TRF("INF-TRF"), + @XmlEnumValue("INC-SDDC") + INC_SDDC("INC-SDDC"), + @XmlEnumValue("INC-SDDB") + INC_SDDB("INC-SDDB"), + @XmlEnumValue("STAT-RPT-INC-SDD") + STAT_RPT_INC_SDD("STAT-RPT-INC-SDD"), + @XmlEnumValue("INF-ACCT-RT") + INF_ACCT_RT("INF-ACCT-RT"), + @XmlEnumValue("STAT-RPT-PSD") + STAT_RPT_PSD("STAT-RPT-PSD"), + @XmlEnumValue("CBILL-BATCH") + CBILL_BATCH("CBILL-BATCH"), + @XmlEnumValue("CBILL-BATCH-BILLER") + CBILL_BATCH_BILLER("CBILL-BATCH-BILLER"), + @XmlEnumValue("CERT-CRED-REQ") + CERT_CRED_REQ("CERT-CRED-REQ"), + @XmlEnumValue("STAT-RPT-CERT-CRED") + STAT_RPT_CERT_CRED("STAT-RPT-CERT-CRED"), + @XmlEnumValue("INF-STMT") + INF_STMT("INF-STMT"), + @XmlEnumValue("SALDI-ANAG-TRIB") + SALDI_ANAG_TRIB("SALDI-ANAG-TRIB"), + @XmlEnumValue("ESITO-SALDI-ANAG-TRIB") + ESITO_SALDI_ANAG_TRIB("ESITO-SALDI-ANAG-TRIB"), + @XmlEnumValue("INC-SEDAC") + INC_SEDAC("INC-SEDAC"), + @XmlEnumValue("INC-SEDAD") + INC_SEDAD("INC-SEDAD"), + @XmlEnumValue("DISP-PAG-EST") + DISP_PAG_EST("DISP-PAG-EST"), + @XmlEnumValue("STAT-RPT-DISP-PAG-EST") + STAT_RPT_DISP_PAG_EST("STAT-RPT-DISP-PAG-EST"); + private final String value; + + ServiceName(String v) { + value = v; + } + + public String value() { + return value; + } + + public static ServiceName fromValue(String v) { + for (ServiceName c: ServiceName.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceName1.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceName1.java new file mode 100644 index 0000000000..3cedaece92 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/ServiceName1.java @@ -0,0 +1,226 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per ServiceName1. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + *

+ *

+ * <simpleType name="ServiceName1">
+ *   <restriction base="{urn:CBI:xsd:CBIHdrSrv.001.07}Max60Text">
+ *     <enumeration value="PORTING-IR"/>
+ *     <enumeration value="PORTING-IM"/>
+ *     <enumeration value="PORTING-IB"/>
+ *     <enumeration value="PORTING-AL"/>
+ *     <enumeration value="PORTING-PC"/>
+ *     <enumeration value="PORTING-PE"/>
+ *     <enumeration value="PORTING-AP"/>
+ *     <enumeration value="PORTING-AI"/>
+ *     <enumeration value="PORTING-AB"/>
+ *     <enumeration value="PORTING-SL-D"/>
+ *     <enumeration value="PORTING-F4"/>
+ *     <enumeration value="PORTING-I4"/>
+ *     <enumeration value="PORTING-R4"/>
+ *     <enumeration value="PORTING-EIR"/>
+ *     <enumeration value="PORTING-EIM"/>
+ *     <enumeration value="PORTING-EIB"/>
+ *     <enumeration value="PORTING-EAL"/>
+ *     <enumeration value="PORTING-BB"/>
+ *     <enumeration value="PORTING-EP"/>
+ *     <enumeration value="PORTING-AV"/>
+ *     <enumeration value="PORTING-RH"/>
+ *     <enumeration value="PORTING-RA"/>
+ *     <enumeration value="PORTING-EC"/>
+ *     <enumeration value="PORTING-DT"/>
+ *     <enumeration value="PORTING-RP"/>
+ *     <enumeration value="PORTING-SL-I"/>
+ *     <enumeration value="PORTING-A4"/>
+ *     <enumeration value="PORTING-Q4"/>
+ *     <enumeration value="BON-INIZ-BEN"/>
+ *     <enumeration value="ESITO-BON-ORD-BEN"/>
+ *     <enumeration value="ANT-FATT-ITA"/>
+ *     <enumeration value="ANT-FATT-EST"/>
+ *     <enumeration value="STAT-RPT-ANT-FATT"/>
+ *     <enumeration value="INV-E2E-FATT"/>
+ *     <enumeration value="INV-E2E-DOC-NON-STRUTT"/>
+ *     <enumeration value="SALDO-MOV-INTR"/>
+ *     <enumeration value="DISP-PAG-ITA"/>
+ *     <enumeration value="DISP-PAG-SEPA"/>
+ *     <enumeration value="STAT-RPT-DISP-PAG"/>
+ *     <enumeration value="AVV-BON-IN"/>
+ *     <enumeration value="AVV-ISTR"/>
+ *     <enumeration value="INF-TRF"/>
+ *     <enumeration value="INC-SDDC"/>
+ *     <enumeration value="INC-SDDB"/>
+ *     <enumeration value="STAT-RPT-INC-SDD"/>
+ *     <enumeration value="INF-ACCT-RT"/>
+ *     <enumeration value="STAT-RPT-PSD"/>
+ *     <enumeration value="CBILL-BATCH"/>
+ *     <enumeration value="CBILL-BATCH-BILLER"/>
+ *     <enumeration value="CERT-CRED-REQ"/>
+ *     <enumeration value="STAT-RPT-CERT-CRED"/>
+ *     <enumeration value="INF-STMT"/>
+ *     <enumeration value="SALDI-ANAG-TRIB"/>
+ *     <enumeration value="ESITO-SALDI-ANAG-TRIB"/>
+ *     <enumeration value="INC-SEDAC"/>
+ *     <enumeration value="INC-SEDAD"/>
+ *     <enumeration value="DISP-PAG-EST"/>
+ *     <enumeration value="STAT-RPT-DISP-PAG-EST"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "ServiceName1", namespace = "urn:CBI:xsd:CBIHdrSrv.001.07") +@XmlEnum +public enum ServiceName1 { + + @XmlEnumValue("PORTING-IR") + PORTING_IR("PORTING-IR"), + @XmlEnumValue("PORTING-IM") + PORTING_IM("PORTING-IM"), + @XmlEnumValue("PORTING-IB") + PORTING_IB("PORTING-IB"), + @XmlEnumValue("PORTING-AL") + PORTING_AL("PORTING-AL"), + @XmlEnumValue("PORTING-PC") + PORTING_PC("PORTING-PC"), + @XmlEnumValue("PORTING-PE") + PORTING_PE("PORTING-PE"), + @XmlEnumValue("PORTING-AP") + PORTING_AP("PORTING-AP"), + @XmlEnumValue("PORTING-AI") + PORTING_AI("PORTING-AI"), + @XmlEnumValue("PORTING-AB") + PORTING_AB("PORTING-AB"), + @XmlEnumValue("PORTING-SL-D") + PORTING_SL_D("PORTING-SL-D"), + @XmlEnumValue("PORTING-F4") + PORTING_F_4("PORTING-F4"), + @XmlEnumValue("PORTING-I4") + PORTING_I_4("PORTING-I4"), + @XmlEnumValue("PORTING-R4") + PORTING_R_4("PORTING-R4"), + @XmlEnumValue("PORTING-EIR") + PORTING_EIR("PORTING-EIR"), + @XmlEnumValue("PORTING-EIM") + PORTING_EIM("PORTING-EIM"), + @XmlEnumValue("PORTING-EIB") + PORTING_EIB("PORTING-EIB"), + @XmlEnumValue("PORTING-EAL") + PORTING_EAL("PORTING-EAL"), + @XmlEnumValue("PORTING-BB") + PORTING_BB("PORTING-BB"), + @XmlEnumValue("PORTING-EP") + PORTING_EP("PORTING-EP"), + @XmlEnumValue("PORTING-AV") + PORTING_AV("PORTING-AV"), + @XmlEnumValue("PORTING-RH") + PORTING_RH("PORTING-RH"), + @XmlEnumValue("PORTING-RA") + PORTING_RA("PORTING-RA"), + @XmlEnumValue("PORTING-EC") + PORTING_EC("PORTING-EC"), + @XmlEnumValue("PORTING-DT") + PORTING_DT("PORTING-DT"), + @XmlEnumValue("PORTING-RP") + PORTING_RP("PORTING-RP"), + @XmlEnumValue("PORTING-SL-I") + PORTING_SL_I("PORTING-SL-I"), + @XmlEnumValue("PORTING-A4") + PORTING_A_4("PORTING-A4"), + @XmlEnumValue("PORTING-Q4") + PORTING_Q_4("PORTING-Q4"), + @XmlEnumValue("BON-INIZ-BEN") + BON_INIZ_BEN("BON-INIZ-BEN"), + @XmlEnumValue("ESITO-BON-ORD-BEN") + ESITO_BON_ORD_BEN("ESITO-BON-ORD-BEN"), + @XmlEnumValue("ANT-FATT-ITA") + ANT_FATT_ITA("ANT-FATT-ITA"), + @XmlEnumValue("ANT-FATT-EST") + ANT_FATT_EST("ANT-FATT-EST"), + @XmlEnumValue("STAT-RPT-ANT-FATT") + STAT_RPT_ANT_FATT("STAT-RPT-ANT-FATT"), + @XmlEnumValue("INV-E2E-FATT") + INV_E_2_E_FATT("INV-E2E-FATT"), + @XmlEnumValue("INV-E2E-DOC-NON-STRUTT") + INV_E_2_E_DOC_NON_STRUTT("INV-E2E-DOC-NON-STRUTT"), + @XmlEnumValue("SALDO-MOV-INTR") + SALDO_MOV_INTR("SALDO-MOV-INTR"), + @XmlEnumValue("DISP-PAG-ITA") + DISP_PAG_ITA("DISP-PAG-ITA"), + @XmlEnumValue("DISP-PAG-SEPA") + DISP_PAG_SEPA("DISP-PAG-SEPA"), + @XmlEnumValue("STAT-RPT-DISP-PAG") + STAT_RPT_DISP_PAG("STAT-RPT-DISP-PAG"), + @XmlEnumValue("AVV-BON-IN") + AVV_BON_IN("AVV-BON-IN"), + @XmlEnumValue("AVV-ISTR") + AVV_ISTR("AVV-ISTR"), + @XmlEnumValue("INF-TRF") + INF_TRF("INF-TRF"), + @XmlEnumValue("INC-SDDC") + INC_SDDC("INC-SDDC"), + @XmlEnumValue("INC-SDDB") + INC_SDDB("INC-SDDB"), + @XmlEnumValue("STAT-RPT-INC-SDD") + STAT_RPT_INC_SDD("STAT-RPT-INC-SDD"), + @XmlEnumValue("INF-ACCT-RT") + INF_ACCT_RT("INF-ACCT-RT"), + @XmlEnumValue("STAT-RPT-PSD") + STAT_RPT_PSD("STAT-RPT-PSD"), + @XmlEnumValue("CBILL-BATCH") + CBILL_BATCH("CBILL-BATCH"), + @XmlEnumValue("CBILL-BATCH-BILLER") + CBILL_BATCH_BILLER("CBILL-BATCH-BILLER"), + @XmlEnumValue("CERT-CRED-REQ") + CERT_CRED_REQ("CERT-CRED-REQ"), + @XmlEnumValue("STAT-RPT-CERT-CRED") + STAT_RPT_CERT_CRED("STAT-RPT-CERT-CRED"), + @XmlEnumValue("INF-STMT") + INF_STMT("INF-STMT"), + @XmlEnumValue("SALDI-ANAG-TRIB") + SALDI_ANAG_TRIB("SALDI-ANAG-TRIB"), + @XmlEnumValue("ESITO-SALDI-ANAG-TRIB") + ESITO_SALDI_ANAG_TRIB("ESITO-SALDI-ANAG-TRIB"), + @XmlEnumValue("INC-SEDAC") + INC_SEDAC("INC-SEDAC"), + @XmlEnumValue("INC-SEDAD") + INC_SEDAD("INC-SEDAD"), + @XmlEnumValue("DISP-PAG-EST") + DISP_PAG_EST("DISP-PAG-EST"), + @XmlEnumValue("STAT-RPT-DISP-PAG-EST") + STAT_RPT_DISP_PAG_EST("STAT-RPT-DISP-PAG-EST"); + private final String value; + + ServiceName1(String v) { + value = v; + } + + public String value() { + return value; + } + + public static ServiceName1 fromValue(String v) { + for (ServiceName1 c: ServiceName1 .values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/StructuredRemittanceInformation7.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/StructuredRemittanceInformation7.java new file mode 100644 index 0000000000..505dbe127e --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/StructuredRemittanceInformation7.java @@ -0,0 +1,221 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + + +package it.integry.ems.contabil.sepa.dto; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Classe Java per StructuredRemittanceInformation7 complex type. + * + *

Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. + * + *

+ * <complexType name="StructuredRemittanceInformation7">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RfrdDocInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}ReferredDocumentInformation3" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="RfrdDocAmt" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}RemittanceAmount1" minOccurs="0"/>
+ *         <element name="CdtrRefInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}CreditorReferenceInformation2" minOccurs="0"/>
+ *         <element name="Invcr" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}PartyIdentification32" minOccurs="0"/>
+ *         <element name="Invcee" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}PartyIdentification32" minOccurs="0"/>
+ *         <element name="AddtlRmtInf" type="{urn:CBI:xsd:CBIPaymentRequest.00.04.00}Max140Text" maxOccurs="3" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "StructuredRemittanceInformation7", propOrder = { + "rfrdDocInf", + "rfrdDocAmt", + "cdtrRefInf", + "invcr", + "invcee", + "addtlRmtInf" +}) +public class StructuredRemittanceInformation7 { + + @XmlElement(name = "RfrdDocInf") + protected List rfrdDocInf; + @XmlElement(name = "RfrdDocAmt") + protected RemittanceAmount1 rfrdDocAmt; + @XmlElement(name = "CdtrRefInf") + protected CreditorReferenceInformation2 cdtrRefInf; + @XmlElement(name = "Invcr") + protected PartyIdentification32 invcr; + @XmlElement(name = "Invcee") + protected PartyIdentification32 invcee; + @XmlElement(name = "AddtlRmtInf") + protected List addtlRmtInf; + + /** + * Gets the value of the rfrdDocInf property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the rfrdDocInf property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRfrdDocInf().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ReferredDocumentInformation3 } + * + * + */ + public List getRfrdDocInf() { + if (rfrdDocInf == null) { + rfrdDocInf = new ArrayList(); + } + return this.rfrdDocInf; + } + + /** + * Recupera il valore della proprietà rfrdDocAmt. + * + * @return + * possible object is + * {@link RemittanceAmount1 } + * + */ + public RemittanceAmount1 getRfrdDocAmt() { + return rfrdDocAmt; + } + + /** + * Imposta il valore della proprietà rfrdDocAmt. + * + * @param value + * allowed object is + * {@link RemittanceAmount1 } + * + */ + public void setRfrdDocAmt(RemittanceAmount1 value) { + this.rfrdDocAmt = value; + } + + /** + * Recupera il valore della proprietà cdtrRefInf. + * + * @return + * possible object is + * {@link CreditorReferenceInformation2 } + * + */ + public CreditorReferenceInformation2 getCdtrRefInf() { + return cdtrRefInf; + } + + /** + * Imposta il valore della proprietà cdtrRefInf. + * + * @param value + * allowed object is + * {@link CreditorReferenceInformation2 } + * + */ + public void setCdtrRefInf(CreditorReferenceInformation2 value) { + this.cdtrRefInf = value; + } + + /** + * Recupera il valore della proprietà invcr. + * + * @return + * possible object is + * {@link PartyIdentification32 } + * + */ + public PartyIdentification32 getInvcr() { + return invcr; + } + + /** + * Imposta il valore della proprietà invcr. + * + * @param value + * allowed object is + * {@link PartyIdentification32 } + * + */ + public void setInvcr(PartyIdentification32 value) { + this.invcr = value; + } + + /** + * Recupera il valore della proprietà invcee. + * + * @return + * possible object is + * {@link PartyIdentification32 } + * + */ + public PartyIdentification32 getInvcee() { + return invcee; + } + + /** + * Imposta il valore della proprietà invcee. + * + * @param value + * allowed object is + * {@link PartyIdentification32 } + * + */ + public void setInvcee(PartyIdentification32 value) { + this.invcee = value; + } + + /** + * Gets the value of the addtlRmtInf property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the addtlRmtInf property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAddtlRmtInf().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getAddtlRmtInf() { + if (addtlRmtInf == null) { + addtlRmtInf = new ArrayList(); + } + return this.addtlRmtInf; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/package-info.java b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/package-info.java new file mode 100644 index 0000000000..6d87a05158 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/sepa/dto/package-info.java @@ -0,0 +1,9 @@ +// +// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7 +// Vedere http://java.sun.com/xml/jaxb +// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine. +// Generato il: 2016.09.12 alle 11:43:46 AM CEST +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "urn:CBI:xsd:CBIPaymentRequest.00.04.00", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package it.integry.ems.contabil.sepa.dto; diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/service/ContabilService.java b/ems-contabil/src/main/java/it/integry/ems/contabil/service/ContabilService.java new file mode 100644 index 0000000000..52757cc2e3 --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/service/ContabilService.java @@ -0,0 +1,814 @@ +package it.integry.ems.contabil.service; + +import java.io.StringWriter; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.Marshaller; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathFactory; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; +import org.w3c.dom.Document; + +import com.fasterxml.jackson.databind.node.ArrayNode; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.business_logic.AccountingBusinessLogic; +import it.integry.ems.contabil.sepa.dto.ActiveOrHistoricCurrencyAndAmount; +import it.integry.ems.contabil.sepa.dto.AddressType2Code; +import it.integry.ems.contabil.sepa.dto.CBIAccountIdentification1; +import it.integry.ems.contabil.sepa.dto.CBIAmountType1; +import it.integry.ems.contabil.sepa.dto.CBIBranchAndFinancialInstitutionIdentification2; +import it.integry.ems.contabil.sepa.dto.CBIBranchAndFinancialInstitutionIdentification3; +import it.integry.ems.contabil.sepa.dto.CBICashAccount1; +import it.integry.ems.contabil.sepa.dto.CBICashAccount2; +import it.integry.ems.contabil.sepa.dto.CBIChargeBearerTypeCode; +import it.integry.ems.contabil.sepa.dto.CBIClearingSystemMemberIdentification1; +import it.integry.ems.contabil.sepa.dto.CBICreditTransferTransactionInformation; +import it.integry.ems.contabil.sepa.dto.CBIFinancialInstitutionIdentification2; +import it.integry.ems.contabil.sepa.dto.CBIFinancialInstitutionIdentification3; +import it.integry.ems.contabil.sepa.dto.CBIGenericIdentification1; +import it.integry.ems.contabil.sepa.dto.CBIGroupHeader; +import it.integry.ems.contabil.sepa.dto.CBIIdType1; +import it.integry.ems.contabil.sepa.dto.CBIIdType2; +import it.integry.ems.contabil.sepa.dto.CBIOrganisationIdentification1; +import it.integry.ems.contabil.sepa.dto.CBIOrganisationIdentification2; +import it.integry.ems.contabil.sepa.dto.CBIOrganisationIdentification3; +import it.integry.ems.contabil.sepa.dto.CBIParty1Choice; +import it.integry.ems.contabil.sepa.dto.CBIPartyIdentification1; +import it.integry.ems.contabil.sepa.dto.CBIPartyIdentification3; +import it.integry.ems.contabil.sepa.dto.CBIPartyIdentification4; +import it.integry.ems.contabil.sepa.dto.CBIPaymentInstructionInformation; +import it.integry.ems.contabil.sepa.dto.CBIPaymentRequest000400; +import it.integry.ems.contabil.sepa.dto.CBIPaymentTypeInformation1; +import it.integry.ems.contabil.sepa.dto.CBIPaymentTypeInformation2; +import it.integry.ems.contabil.sepa.dto.CBIPostalAddress6; +import it.integry.ems.contabil.sepa.dto.CBIRegulatoryReporting1; +import it.integry.ems.contabil.sepa.dto.CBIRegulatoryReportingType1Code; +import it.integry.ems.contabil.sepa.dto.CBIServiceLevel1; +import it.integry.ems.contabil.sepa.dto.CBIServiceLevel1Code; +import it.integry.ems.contabil.sepa.dto.CategoryPurpose1Choice; +import it.integry.ems.contabil.sepa.dto.PaymentIdentification1; +import it.integry.ems.contabil.sepa.dto.PaymentMethod3Code; +import it.integry.ems.contabil.sepa.dto.Priority2Code; +import it.integry.ems.contabil.sepa.dto.RemittanceInformation5; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.db.ResultSetMapper; +import it.integry.ems.entity.CtbMovi; +import it.integry.ems.entity.CtbMovr; +import it.integry.ems.entity.CtbMovt; +import it.integry.ems.entity.CtbScad; +import it.integry.ems.entity.MtbColt; +import it.integry.ems.entity.VtbDistIncat; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.response.EsitoType; +import it.integry.ems.response.FileItem; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.service.HttpRestWrapper; +import it.integry.ems.service.SetupGest; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityDate; +import it.integry.ems.utility.UtilityString; +import it.integry.ems.utility.UtilityXML; + +@Service +@Scope(value = "request") +public class ContabilService { + + @Autowired + private EmsProperties properties; + @Autowired + private DataSource ds; + @Autowired + private SetupGest setupGest; + @Autowired + private JSONObjectMapper jsonObjectMapper; + @Autowired + private HttpRestWrapper httpRestWrapper; + + public ServiceRestResponse getSepaXml(Date dataDist, Integer rifDist) throws Exception { + + String codCuc = null, ragSoc = null, partIva = null; + + String sqlCuc = "select cod_cuc, nome_ditta, part_iva from azienda"; + PreparedStatement ps = ds.getConnection().prepareStatement(sqlCuc); + ResultSet rs = ps.executeQuery(); + if(rs.next()) { + codCuc = rs.getString("cod_cuc"); + ragSoc = rs.getString("nome_ditta"); + partIva = rs.getString("part_iva"); + } + rs.close();ps.close(); + + if(UtilityString.isNullOrEmpty(codCuc)) + throw new Exception("codice CUC non impostato."); + + //CBIBdyPaymentRequest000400 root = new CBIBdyPaymentRequest000400(); + + String ibanOrdinante = null, codAbi = null, codBancAzi = ""; + String datiDebitore = "select cod_iban, cod_abi, cod_banc_azi from vtb_dist, gtb_banc_azi" + +" where data_dist = "+UtilityDB.valueDateToString(dataDist, CommonConstants.DATE_FORMAT_YMD) + " and rif_dist=" + rifDist + + " and vtb_dist.cod_banc=gtb_banc_azi.cod_banc"; + PreparedStatement psDeb = ds.getConnection().prepareStatement(datiDebitore); + ResultSet rsDeb = psDeb.executeQuery(); + if(rsDeb.next()) { + ibanOrdinante = rsDeb.getString("cod_iban"); + codAbi = rsDeb.getString("cod_abi"); + codBancAzi = rsDeb.getString("cod_banc_azi"); + } + rsDeb.close();psDeb.close(); + if(UtilityString.isNullOrEmpty(ibanOrdinante) || UtilityString.isNullOrEmpty(codAbi)) + throw new Exception("IBAN o COD ABI non trovato per banca " + codBancAzi); + + String sqlBonifici = "select sum(imp_scad) tot_bonifico, gtb_anag.rag_soc as rag_soc_benef, isnull(gtb_anag.part_iva, gtb_anag.cod_fisc) as piva_cf_benef," + + " gtb_anag.indirizzo, gtb_anag.cap, gtb_anag.prov, gtb_anag.citta, gtb_anag.nazione, atb_forn.cod_bic as bic_benef, atb_forn.cod_abi as abi_benef, atb_forn.iban as iban_benef," + + " data_scad,rif_debito,id_gruppo,cod_divi_cont,cambio_divi_cont,data_valuta" + + " from vtb_riba inner join atb_forn on vtb_riba.cod_anag = atb_forn.cod_anag" + + " inner join gtb_anag on atb_forn.cod_anag = gtb_anag.cod_anag where data_dist = "+UtilityDB.valueDateToString(dataDist, CommonConstants.DATE_FORMAT_YMD) + " and rif_dist=" + rifDist + + " group by gtb_anag.rag_soc, isnull(gtb_anag.part_iva, gtb_anag.cod_fisc), gtb_anag.indirizzo, gtb_anag.cap, gtb_anag.prov, gtb_anag.citta, gtb_anag.nazione," + + " atb_forn.cod_bic, atb_forn.cod_abi, atb_forn.iban, num_scad,data_scad,rif_debito,id_gruppo,cod_divi_cont,cambio_divi_cont,data_valuta" + + " order by data_valuta"; + ps = ds.getConnection().prepareStatement(sqlBonifici); + rs = ps.executeQuery(); + + Date dataValutaOld = null; + Integer i = 0; + BigDecimal somma = BigDecimal.ZERO; + Boolean bonificoEstero = false; + + String msgId = "DistintaXml-" + new SimpleDateFormat("ddMMyyyy-HH.mm.ss").format(new Date()); + CBIPaymentRequest000400 payment = setBasicPayment(msgId, ragSoc, codCuc); + + List paymList = new ArrayList(); + while(rs.next()) { + + if(dataValutaOld == null) { + dataValutaOld = rs.getDate("data_valuta"); + paymList.add(payment); + } + + if(dataValutaOld.compareTo(rs.getDate("data_valuta")) != 0) { + //sommatoria + payment.getGrpHdr().setCtrlSum(somma); + // numero + payment.getGrpHdr().setNbOfTxs(i.toString()); + i = 0; + somma = BigDecimal.ZERO; + + bonificoEstero = false; + /* + CBIEnvelPaymentRequest000400 envelope = new CBIEnvelPaymentRequest000400(); + envelope.setCBIPaymentRequest(payment); + root.getCBIEnvelPaymentRequest().add(envelope); + */ + dataValutaOld = rs.getDate("data_valuta"); + payment = setBasicPayment(msgId, ragSoc, codCuc); + paymList.add(payment); + } + + GregorianCalendar dataValGreg = new GregorianCalendar(); + dataValGreg.setTime(rs.getDate("data_valuta")); + XMLGregorianCalendar dataExec = DatatypeFactory.newInstance().newXMLGregorianCalendar(dataValGreg); + payment.getPmtInf().setReqdExctnDt(dataExec); + + BigDecimal importo = rs.getBigDecimal("tot_bonifico").setScale(2); + somma = somma.add(importo); + i++; + + CBIPaymentTypeInformation1 paymType = new CBIPaymentTypeInformation1(); + + paymType.setInstrPrty(Priority2Code.NORM); + CBIServiceLevel1 cbiServiceLevel1 = new CBIServiceLevel1(); + cbiServiceLevel1.setCd(CBIServiceLevel1Code.SEPA); + paymType.setSvcLvl(cbiServiceLevel1); + payment.getPmtInf().setPmtTpInf(paymType); + + CBIPartyIdentification4 ordinantePayData = new CBIPartyIdentification4(); + ordinantePayData.setNm(ragSoc); + CBIIdType2 ordinanteIdData = new CBIIdType2(); + CBIOrganisationIdentification3 ordinanteOrgData = new CBIOrganisationIdentification3(); + CBIGenericIdentification1 ordinanteGenericIdData = new CBIGenericIdentification1(); + ordinanteGenericIdData.setId(partIva); + ordinanteGenericIdData.setIssr("ADE"); + ordinanteOrgData.setOthr(ordinanteGenericIdData); + ordinanteIdData.setOrgId(ordinanteOrgData); + ordinantePayData.setId(ordinanteIdData); + payment.getPmtInf().setDbtr(ordinantePayData); + + CBICashAccount1 ordinanteAccount = new CBICashAccount1(); + CBIAccountIdentification1 ordinanteAccountId = new CBIAccountIdentification1(); + ordinanteAccountId.setIBAN(ibanOrdinante); + ordinanteAccount.setId(ordinanteAccountId); + payment.getPmtInf().setDbtrAcct(ordinanteAccount); + + CBIBranchAndFinancialInstitutionIdentification2 cbiBranch = new CBIBranchAndFinancialInstitutionIdentification2(); + CBIFinancialInstitutionIdentification3 cbiFin = new CBIFinancialInstitutionIdentification3(); + CBIClearingSystemMemberIdentification1 ordinanteMemberId = new CBIClearingSystemMemberIdentification1(); + + //abi + ordinanteMemberId.setMmbId(codAbi); + cbiFin.setClrSysMmbId(ordinanteMemberId); + cbiBranch.setFinInstnId(cbiFin); + payment.getPmtInf().setDbtrAgt(cbiBranch); + + CBICreditTransferTransactionInformation creditTransaction = new CBICreditTransferTransactionInformation(); + PaymentIdentification1 payTrasactId = new PaymentIdentification1(); + payTrasactId.setInstrId(i.toString()); + payTrasactId.setEndToEndId(msgId+"-"+UtilityString.leftPad(i.toString(), 4, '0')); + creditTransaction.setPmtId(payTrasactId); + + CBIPaymentTypeInformation2 paymentTypeTransact = new CBIPaymentTypeInformation2(); + + CategoryPurpose1Choice category = new CategoryPurpose1Choice(); + category.setCd("SUPP"); + paymentTypeTransact.setCtgyPurp(category); + creditTransaction.setPmtTpInf(paymentTypeTransact); + CBIAmountType1 amountCurrency = new CBIAmountType1(); + ActiveOrHistoricCurrencyAndAmount currency = new ActiveOrHistoricCurrencyAndAmount(); + currency.setCcy("EUR"); + currency.setValue(importo); + amountCurrency.setInstdAmt(currency); + creditTransaction.setAmt(amountCurrency); + + if(UtilityString.isNullOrEmpty(rs.getString("iban_benef"))) + throw new Exception("Iban non presente per " + rs.getString("rag_soc_benef")); + + //beneficiario + CBIPartyIdentification3 benficiarioPayData = new CBIPartyIdentification3(); + + String ibanBeneficiario = rs.getString("iban_benef").replaceAll(" ", ""); + + if(!ibanBeneficiario.startsWith("IT")) + bonificoEstero = true; + + if(bonificoEstero && !UtilityString.isNullOrEmpty(rs.getString("bic_benef"))) { + CBIBranchAndFinancialInstitutionIdentification3 benefBranch = new CBIBranchAndFinancialInstitutionIdentification3(); + CBIFinancialInstitutionIdentification2 benefFin = new CBIFinancialInstitutionIdentification2(); + benefFin.setBIC(rs.getString("bic_benef")); + benefBranch.setFinInstnId(benefFin); + creditTransaction.setCdtrAgt(benefBranch); + } + + benficiarioPayData.setNm(rs.getString("rag_soc_benef")); + + CBIPostalAddress6 addressInfo = new CBIPostalAddress6(); + //dati indirizzo + addressInfo.setAdrTp(AddressType2Code.ADDR); + if(!UtilityString.isNullOrEmpty(rs.getString("indirizzo"))) + addressInfo.setStrtNm(rs.getString("indirizzo")); + + if(!UtilityString.isNullOrEmpty(rs.getString("cap"))) + addressInfo.setPstCd(rs.getString("cap")); + + if(!UtilityString.isNullOrEmpty(rs.getString("citta"))) + addressInfo.setTwnNm(rs.getString("citta")); + + if(!UtilityString.isNullOrEmpty(rs.getString("prov"))) + addressInfo.setCtrySubDvsn(rs.getString("prov")); + + if(!UtilityString.isNullOrEmpty(rs.getString("nazione"))) + addressInfo.setCtry(rs.getString("nazione")); + + benficiarioPayData.setPstlAdr(addressInfo); + + CBIParty1Choice benefIdData = new CBIParty1Choice(); + CBIOrganisationIdentification2 benefOrgData = new CBIOrganisationIdentification2(); + CBIGenericIdentification1 benefGenericIdData = new CBIGenericIdentification1(); + benefGenericIdData.setId(rs.getString("piva_cf_benef")); + benefGenericIdData.setIssr("ADE"); + benefOrgData.setOthr(benefGenericIdData); + benefIdData.setOrgId(benefOrgData); + benficiarioPayData.setId(benefIdData); + + + creditTransaction.setCdtr(benficiarioPayData); + + CBICashAccount2 beneficiarioAccount = new CBICashAccount2(); + CBIAccountIdentification1 beneficiarioAccountId = new CBIAccountIdentification1(); + + beneficiarioAccountId.setIBAN(ibanBeneficiario); + beneficiarioAccount.setId(beneficiarioAccountId); + creditTransaction.setCdtrAcct(beneficiarioAccount); + + if(bonificoEstero) { + CBIRegulatoryReporting1 cbiReport = new CBIRegulatoryReporting1(); + cbiReport.setDbtCdtRptgInd(CBIRegulatoryReportingType1Code.DEBT); + /* + CBIStructuredRegulatoryReporting1 cbiStructReport = new CBIStructuredRegulatoryReporting1(); + cbiStructReport.setCd("INF"); + ActiveOrHistoricCurrencyAndAmount infoCurrencyAndAmount = new ActiveOrHistoricCurrencyAndAmount(); + infoCurrencyAndAmount.setCcy("EUR"); + infoCurrencyAndAmount.setValue(importo); + cbiStructReport.setAmt(infoCurrencyAndAmount); + cbiReport.setDtls(cbiStructReport); + creditTransaction.getRgltryRptg().add(cbiReport); + */ + } + + RemittanceInformation5 causale = new RemittanceInformation5(); + causale.getUstrd().add("PAGAMENTO " + rs.getString("rif_debito").trim()); + creditTransaction.setRmtInf(causale); + + payment.getPmtInf().getCdtTrfTxInf().add(creditTransaction); + } + rs.close();ps.close(); + + if(paymList.size() == 1) { + //sommatoria + paymList.get(0).getGrpHdr().setCtrlSum(somma); + // numero + paymList.get(0).getGrpHdr().setNbOfTxs(i.toString()); + } + + List genericList = new ArrayList(); + + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + JAXBContext jaxbContext = JAXBContext.newInstance(CBIPaymentRequest000400.class); + Marshaller jaxbMarshaller = jaxbContext.createMarshaller(); + jaxbMarshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); + + for (CBIPaymentRequest000400 paym : paymList) { + StringWriter writer = new StringWriter(); + jaxbMarshaller.marshal(paym, writer); + + FileItem fileItem = new FileItem("sepa-" + dateFormat.format(paym.getPmtInf().getReqdExctnDt().toGregorianCalendar().getTime()) + ".xml", writer.toString(), "xml"); + genericList.add(fileItem); + } + ServiceRestResponse resp = new ServiceRestResponse(EsitoType.OK, genericList); + + return resp; + } + + private CBIPaymentRequest000400 setBasicPayment(String msgId, String ragSoc, String codSia) throws Exception { + + CBIPaymentRequest000400 payment = new CBIPaymentRequest000400(); + CBIGroupHeader header = new CBIGroupHeader(); + header.setMsgId(msgId); + GregorianCalendar nowGreg = new GregorianCalendar(); + nowGreg.setTime(new Date()); + XMLGregorianCalendar now = DatatypeFactory.newInstance().newXMLGregorianCalendar(nowGreg); + header.setCreDtTm(now); + payment.setGrpHdr(header); + + CBIPartyIdentification1 ordinante = new CBIPartyIdentification1(); + ordinante.setNm(ragSoc); + CBIOrganisationIdentification1 org = new CBIOrganisationIdentification1(); + CBIGenericIdentification1 genericIdOrdinante = new CBIGenericIdentification1(); + genericIdOrdinante.setId(codSia); + genericIdOrdinante.setIssr("CBI"); + + org.getOthr().add(genericIdOrdinante); + CBIIdType1 cbiType = new CBIIdType1(); + cbiType.setOrgId(org); + ordinante.setId(cbiType); + header.setInitgPty(ordinante); + CBIPaymentInstructionInformation paymInfo = new CBIPaymentInstructionInformation(); + paymInfo.setChrgBr(CBIChargeBearerTypeCode.SLEV); + paymInfo.setPmtInfId(msgId); + paymInfo.setPmtMtd(PaymentMethod3Code.TRF); + payment.setPmtInf(paymInfo); + return payment; + } + + public List registraDistintaIncassi(String username, String password, String inputValue) throws Exception{ + final String gestName = "w_vdist_inca_rc"; + final String section = "REGISTRAZIONE_CONTABILE"; + + String codCcauAcc = (String) setupGest.getSetup(ds.getConnection(), gestName, section, "COD_CCAU_ACCONTO"); + if (UtilityString.isNullOrEmpty(codCcauAcc)) { throw new Exception("Causale acconti non definita"); } + String codCcauInc = (String) setupGest.getSetup(ds.getConnection(), gestName, section, "COD_CCAU_INCA"); + if (UtilityString.isNullOrEmpty(codCcauInc)) { throw new Exception("Causale incassi non definita"); } + String codCconAcc = (String) setupGest.getSetup(ds.getConnection(), gestName, section, "COD_CCON_ACCONTO"); + if (UtilityString.isNullOrEmpty(codCconAcc)) { throw new Exception("Conto acconti non definito"); } + String codCconReso = (String) setupGest.getSetup(ds.getConnection(), gestName, section, "COD_CCON_RESO"); + if (UtilityString.isNullOrEmpty(codCconReso)) { throw new Exception("Conto resi non definita"); } + String codCconCassa = (String) setupGest.getSetup(ds.getConnection(), gestName, section, "COD_CCON_CASSA"); + if (UtilityString.isNullOrEmpty(codCconCassa)) { throw new Exception("Conto cassa non definito"); } + String codCconClie = (String) setupGest.getSetup(ds.getConnection(), gestName, section, "COD_CCON_CREDITO"); + if (UtilityString.isNullOrEmpty(codCconClie)) { throw new Exception("Conto crediti non definito"); } + String escludiClienti = (String) setupGest.getSetup(ds.getConnection(), gestName, section, "ESCLUDI_CLIENTI"); + + List distinte = Arrays.asList(jsonObjectMapper.readValue(inputValue, DistinteIncassiDTO[].class)); + + List list = new ArrayList(); + + for (DistinteIncassiDTO distinta : distinte ) { + try { + chkDistintaIncassi(distinta.getDataDist(), distinta.getNumDist()); + ServiceRestResponse resp = registraDistintaIncassi(username, password, distinta.getDataDist(), distinta.getNumDist(), + codCcauAcc, codCcauInc, codCconAcc, codCconReso, codCconCassa, codCconClie, escludiClienti); + list.add(resp); + } catch (Exception e) { + list.add(new ServiceRestResponse(EsitoType.KO, "Distinta n. " + distinta.getNumDist() + " del " + new SimpleDateFormat("dd/MM/yy").format(distinta.getDataDist()) + " non registrata. " + e.getMessage())); + } + } + + return list; + } + + private void chkDistintaIncassi(Date dataDist, Integer numDist) throws Exception { + + String sql = + "SELECT * " + + "FROM vtb_dist_incar LEFT OUTER JOIN dtb_doct ON vtb_dist_incar.cod_anag = dtb_doct.cod_anag AND " + + "vtb_dist_incar.cod_dtip = dtb_doct.cod_dtip AND " + + "vtb_dist_incar.data_doc = dtb_doct.data_doc AND " + + "vtb_dist_incar.ser_doc = dtb_doct.ser_doc AND " + + "vtb_dist_incar.num_doc = dtb_doct.num_doc " + + "WHERE data_dist = " + UtilityDB.valueDateToString(dataDist, CommonConstants.DATE_FORMAT_YMD) + " AND " + + "num_dist = " + UtilityDB.valueToString(numDist) + " AND " + + "flag_reg_acc = 'N' AND " + + "cod_dtip_val is null"; + + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()){ + new Exception("Impossibile registrare in contabilità la distinta n° " + numDist + " del " + new SimpleDateFormat("dd/MM/yyyy").format(dataDist) +"." + + "Ci sono dei documenti di trasporto non ancora fatturati." ); + } + } + + private ServiceRestResponse registraDistintaIncassi(String username, String password, Date dataDist, Integer numDist, String codCcauAcc, + String codCcauInc, String codCconAcc, String codCconReso, String codCconCassa, String codCconClie, String escludiClienti ) throws Exception { + String condEscludiClienti = null, codCcau = null; + CtbMovt ctbMovt = new CtbMovt(); + CtbMovr ctbMovr; + VtbDistIncat vtbDistIncat = new VtbDistIncat(); + List righe = new ArrayList(); + List scadenze = new ArrayList(); + + if (!UtilityString.isNullOrEmpty(escludiClienti)) { + escludiClienti = escludiClienti.replace(",", "','"); + condEscludiClienti = "vtb_dist_incar.cod_anag NOT IN ('" + escludiClienti + "')"; + } + + String sql = + "SELECT Convert(integer, 1) as gruppo, " + + " vtb_dist_incar.cod_anag, " + + " vtb_dist_incar.cod_paga, " + + " vtb_dist_incar.descriz_paga, " + + " Sum(vtb_dist_incar.imp_incasso), " + + " dtb_doct.cod_dtip_val, " + + " dtb_doct.data_doc_val, " + + " dtb_doct.ser_doc_val, " + + " dtb_doct.num_doc_val, " + + " CASE WHEN " + UtilityDB.valueToString(codCconAcc) + " <> " + UtilityDB.valueToString(codCconReso) +" THEN " + + " CASE dtb_tipi.segno_val_scar WHEN -1 THEN " + UtilityDB.valueToString(codCconReso) + " ELSE " + UtilityDB.valueToString(codCconAcc) + " END " + + " ELSE " +UtilityDB.valueToString(codCconAcc) +" END as contoReg, " + + " ntb_tipi_inca.cod_ccon as 'cod_ccon_paga', " + + " mtb_depo.cod_jfas " + + " FROM vtb_dist_incat INNER JOIN vtb_dist_incar ON vtb_dist_incat.data_dist = vtb_dist_incar.data_dist AND " + + " vtb_dist_incat.num_dist = vtb_dist_incar.num_dist " + + " LEFT OUTER JOIN mtb_depo ON vtb_dist_incat.cod_mdep = mtb_depo.cod_mdep " + + " LEFT OUTER JOIN ntb_tipi_inca ON vtb_dist_incat.cod_mdep = ntb_tipi_inca.cod_mdep and " + + " vtb_dist_incar.cod_paga = ntb_tipi_inca.tipo_inca, " + + " dtb_doct, " + + " dtb_tipi " + + " WHERE vtb_dist_incar.cod_anag = dtb_doct.cod_anag and " + + " vtb_dist_incar.cod_dtip = dtb_doct.cod_dtip and " + + " vtb_dist_incar.data_doc = dtb_doct.data_doc and " + + " vtb_dist_incar.ser_doc = dtb_doct.ser_doc and " + + " vtb_dist_incar.num_doc = dtb_doct.num_doc and " + + " vtb_dist_incat.data_dist = " + UtilityDB.valueDateToString(dataDist, CommonConstants.DATE_FORMAT_YMD) + " and " + + " vtb_dist_incat.num_dist = " + UtilityDB.valueToString(numDist) + " and " + + " vtb_dist_incar.cod_dtip is not null and " + + " vtb_dist_incar.cod_dtip = dtb_doct.cod_dtip_val and " + + " dtb_doct.cod_dtip = dtb_tipi.cod_dtip " + + " GROUP BY vtb_dist_incat.cod_vage, " + + " vtb_dist_incat.cod_vvet, " + + " vtb_dist_incar.cod_anag, " + + " vtb_dist_incar.cod_paga, " + + " vtb_dist_incar.descriz_paga, " + + " dtb_doct.cod_dtip_val, " + + " dtb_doct.data_doc_val, " + + " dtb_doct.ser_doc_val, " + + " dtb_doct.num_doc_val, " + + " CASE WHEN " + UtilityDB.valueToString(codCconAcc) + " <> " + UtilityDB.valueToString(codCconReso)+" THEN " + + " CASE dtb_tipi.segno_val_scar WHEN -1 THEN " + UtilityDB.valueToString(codCconReso) + " ELSE " + UtilityDB.valueToString(codCconAcc) + " END " + + " ELSE " +UtilityDB.valueToString(codCconAcc) +" END, " + + " ntb_tipi_inca.cod_ccon, " + + " mtb_depo.cod_jfas " + + " UNION ALL " + + " SELECT Convert(integer, 2) as gruppo, " + + " vtb_dist_incar.cod_anag, " + + " vtb_dist_incar.cod_paga, " + + " vtb_dist_incar.descriz_paga, " + + " vtb_dist_incar.imp_incasso, " + + " null as cod_dtip_val, " + + " null as data_doc_val, " + + " null as ser_doc_val, " + + " null as num_doc_val, " + + " CASE WHEN " + UtilityDB.valueToString(codCconAcc) + " <> " + UtilityDB.valueToString(codCconReso)+" THEN " + + " CASE WHEN vtb_dist_incar.imp_incasso < 0 THEN " + UtilityDB.valueToString(codCconReso) + " ELSE " + UtilityDB.valueToString(codCconAcc) + " END " + + " ELSE " +UtilityDB.valueToString(codCconAcc) +" END as contoReg, " + + " ntb_tipi_inca.cod_ccon, " + + " mtb_depo.cod_jfas " + + " FROM vtb_dist_incat INNER JOIN vtb_dist_incar ON vtb_dist_incat.data_dist = vtb_dist_incar.data_dist AND " + + " vtb_dist_incat.num_dist = vtb_dist_incar.num_dist " + + " LEFT OUTER JOIN mtb_depo ON vtb_dist_incat.cod_mdep = mtb_depo.cod_mdep " + + " LEFT OUTER JOIN ntb_tipi_inca ON vtb_dist_incat.cod_mdep = ntb_tipi_inca.cod_mdep and " + + " vtb_dist_incar.cod_paga = ntb_tipi_inca.tipo_inca " + + " WHERE vtb_dist_incat.data_dist = " + UtilityDB.valueDateToString(dataDist, CommonConstants.DATE_FORMAT_YMD) + " and " + + " vtb_dist_incat.num_dist = " + UtilityDB.valueToString(numDist) + " and " + + " vtb_dist_incar.cod_dtip is null " + + " UNION ALL " + + " SELECT Convert(integer, 3) as gruppo, " + + " vtb_dist_incar.cod_anag, " + + " vtb_dist_incar.cod_paga, " + + " vtb_dist_incar.descriz_paga, " + + " Sum(vtb_dist_incar.imp_incasso), " + + " dtb_doct.cod_dtip_val, " + + " dtb_doct.data_doc_val, " + + " dtb_doct.ser_doc_val, " + + " dtb_doct.num_doc_val, " + + " CASE WHEN " + UtilityDB.valueToString(codCconAcc) + " <> " + UtilityDB.valueToString(codCconReso)+" THEN " + + " CASE dtb_tipi.segno_val_scar WHEN -1 THEN " + UtilityDB.valueToString(codCconReso) + " ELSE " + UtilityDB.valueToString(codCconAcc) + " END " + + " ELSE " +UtilityDB.valueToString(codCconAcc) +" END as contoReg, " + + " ntb_tipi_inca.cod_ccon, " + + " mtb_depo.cod_jfas " + + " FROM vtb_dist_incat INNER JOIN vtb_dist_incar ON vtb_dist_incat.data_dist = vtb_dist_incar.data_dist AND " + + " vtb_dist_incat.num_dist = vtb_dist_incar.num_dist " + + " LEFT OUTER JOIN mtb_depo ON vtb_dist_incat.cod_mdep = mtb_depo.cod_mdep " + + " LEFT OUTER JOIN ntb_tipi_inca ON vtb_dist_incat.cod_mdep = ntb_tipi_inca.cod_mdep and " + + " vtb_dist_incar.cod_paga = ntb_tipi_inca.tipo_inca, " + + " dtb_doct, dtb_tipi " + + " WHERE vtb_dist_incar.cod_anag = dtb_doct.cod_anag and " + + " vtb_dist_incar.cod_dtip = dtb_doct.cod_dtip and " + + " vtb_dist_incar.data_doc = dtb_doct.data_doc and " + + " vtb_dist_incar.ser_doc = dtb_doct.ser_doc and " + + " vtb_dist_incar.num_doc = dtb_doct.num_doc and " + + " vtb_dist_incar.cod_dtip = dtb_tipi.cod_dtip and " + + " vtb_dist_incat.data_dist = " + UtilityDB.valueDateToString(dataDist, CommonConstants.DATE_FORMAT_YMD) + " and " + + " vtb_dist_incat.num_dist = " + UtilityDB.valueToString(numDist) + " and " + + " vtb_dist_incar.cod_dtip is not null and " + + " ( vtb_dist_incar.cod_dtip <> dtb_doct.cod_dtip_val OR dtb_doct.cod_dtip_val is null ) " + + " GROUP BY vtb_dist_incat.cod_vage, " + + " vtb_dist_incat.cod_vvet, " + + " vtb_dist_incar.cod_anag, " + + " vtb_dist_incar.cod_paga, " + + " vtb_dist_incar.descriz_paga, " + + " dtb_doct.cod_dtip_val, " + + " dtb_doct.data_doc_val, " + + " dtb_doct.ser_doc_val, " + + " dtb_doct.num_doc_val, " + + " CASE WHEN " + UtilityDB.valueToString(codCconAcc) + " <> " + UtilityDB.valueToString(codCconReso)+" THEN " + + " CASE dtb_tipi.segno_val_scar WHEN -1 THEN " + UtilityDB.valueToString(codCconReso) + " ELSE " + UtilityDB.valueToString(codCconAcc) + " END " + + " ELSE " +UtilityDB.valueToString(codCconAcc) +" END, " + + " ntb_tipi_inca.cod_ccon, " + + " mtb_depo.cod_jfas " + + " ORDER BY vtb_dist_incar.cod_anag, 7 "; + + sql = UtilityDB.addwhereCond(sql, condEscludiClienti); + + /* + * GRUPPO 1 = FATTURE + * GRUPPO 2 = RIGHE SENZA AGGANCIO A DOCUMENTO + * GRUPPO 3 = BOLLE (FATTURATE E NON ) + */ + + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + ctbMovt.setDataCmov(dataDist); + ctbMovt.setOperation(OperationType.INSERT); + vtbDistIncat.setDataDist(dataDist); + vtbDistIncat.setNumDist(numDist); + vtbDistIncat.setOperation(OperationType.UPDATE); + ctbMovt.setVtbDistIncat(vtbDistIncat); + + ctbMovt.setCtbMovr(righe); + + while(rs.next()){ + //Integer gruppo = rs.getInt(1); + String codAnag = rs.getString(2); + //String codPaga = rs.getString(3); + //String descrPaga = rs.getString(4); + BigDecimal impIncasso = rs.getBigDecimal(5); + //String codDtipVal = rs.getString(6); + Date dataDocVal = rs.getDate(7); + String serDocVal = rs.getString(8); + Integer numDocVal = rs.getInt(9); + String codCconReg = rs.getString(10); + String codCconPaga = rs.getString(11); + String codJfas = rs.getString(12); + Integer annoPart = null; + if (dataDocVal != null ){ + annoPart = Integer.parseInt(new SimpleDateFormat("yyyy").format(dataDocVal)); + } + + if (UtilityString.isNullOrEmpty(codCconPaga)) { + codCconPaga = codCconCassa; + } + + Integer tipoPartita = 0; + Boolean existPartita = false; + List elencoScadPartita = chkPartita(codAnag, annoPart, serDocVal, numDocVal, tipoPartita); + if (elencoScadPartita.size() > 0 ){ existPartita = true;} + + if (tipoPartita == 1 && impIncasso.compareTo(BigDecimal.ZERO) < 0) { + tipoPartita = 0; + }else if (tipoPartita == 0 && impIncasso.compareTo(BigDecimal.ZERO) > 0) { + tipoPartita = 1; + } + + BigDecimal impDare = BigDecimal.ZERO, impAvere = BigDecimal.ZERO; + if (tipoPartita == 0 ) { + impDare = impIncasso.abs(); + } else { + impAvere = impIncasso.abs(); + } + + if (existPartita){ + codCcau = codCcauInc; + codCconReg = codCconClie; + impIncasso = AccountingBusinessLogic.pagaScadenze(dataDist, impIncasso.abs(), elencoScadPartita); + if (impIncasso.compareTo(BigDecimal.ZERO) > 0) { + if (impDare.compareTo(BigDecimal.ZERO) > 0) { + impDare = impDare.subtract(impIncasso); + } else { + impAvere = impAvere.subtract(impIncasso); + } + } else { + impIncasso = BigDecimal.ZERO; + } + if (impAvere.compareTo(BigDecimal.ZERO) > 0 || impDare.compareTo(BigDecimal.ZERO) > 0 ) { + String descrAggRiga = "PART. " + String.valueOf(annoPart).substring(2) + '-' + serDocVal + String.valueOf(numDocVal); + ctbMovr = new CtbMovr(); + righe.add(ctbMovr); + ctbMovr.setCodCcon(codCconReg); + ctbMovr.setTipoAnag("C"); + ctbMovr.setCodAnag(codAnag); + ctbMovr.setAnnoPart(annoPart); + ctbMovr.setSerDoc(serDocVal); + ctbMovr.setNumDoc(numDocVal); + ctbMovr.setImpDare(impDare); + ctbMovr.setImpAvere(impAvere); + ctbMovr.setCodJfas(codJfas); + if(descrAggRiga.length() > 40 ){ + descrAggRiga = descrAggRiga.substring(0, 39); + } + ctbMovr.setDesAgg(descrAggRiga); + + ctbMovr = new CtbMovr(); + righe.add(ctbMovr); + ctbMovr.setCodCcon(codCconPaga); + ctbMovr.setImpDare(impAvere); + ctbMovr.setImpAvere(impDare); + + scadenze.addAll(elencoScadPartita); + } + } + + if (impIncasso.compareTo(BigDecimal.ZERO) > 0 ) { + if (UtilityString.isNullOrEmpty(codCcau)) { + codCcau = codCcauAcc; + } + + if (tipoPartita == 0 ) { + impDare = impIncasso.abs(); + } else { + impAvere = impIncasso.abs(); + } + //Registra acconto + ctbMovr = new CtbMovr(); + righe.add(ctbMovr); + ctbMovr.setCodCcon(codCconReg); + ctbMovr.setTipoAnag("C"); + ctbMovr.setCodAnag(codAnag); + ctbMovr.setImpDare(impDare); + ctbMovr.setImpAvere(impAvere); + + //Registra acconto + ctbMovr = new CtbMovr(); + righe.add(ctbMovr); + ctbMovr.setCodCcon(codCconPaga); + ctbMovr.setImpDare(impAvere); + ctbMovr.setImpAvere(impDare); + + } + } + rs.close();ps.close(); + + if (ctbMovt != null){ + ctbMovt.setCodCcau(codCcau); + ctbMovt.setCtbScad(scadenze); + String descrCaus = null ; + BigDecimal totMov = BigDecimal.ZERO; + sql = + "SELECT descrizione FROM ctb_caus WHERE cod_ccau = " + UtilityDB.valueToString(codCcau); + + ps = ds.getConnection().prepareStatement(sql); + rs = ps.executeQuery(); + if (rs.next()){ + descrCaus = rs.getString(1); + } rs.close();ps.close(); + + if (!UtilityString.isNullOrEmpty(descrCaus)) { + descrCaus += " DIST.N.:" + numDist; + sql = + "SELECT IsNull(IsNull(cod_vage, cod_vvet), cod_mdep) , sum(imp_incasso) as imp_incasso " + + "FROM vtb_dist_incat, vtb_dist_incar " + + "WHERE vtb_dist_incat.data_dist = " + UtilityDB.valueDateToString(dataDist, CommonConstants.DATE_FORMAT_YMD) + " AND " + +"vtb_dist_incat.num_dist = " + UtilityDB.valueToString(numDist) + " AND " + +"vtb_dist_incat.data_dist = vtb_dist_incar.data_dist AND " + +"vtb_dist_incat.num_dist = vtb_dist_incar.num_dist " + +" GROUP BY IsNull(IsNull(cod_vage, cod_vvet), cod_mdep)"; + + + ps = ds.getConnection().prepareStatement(sql); + rs = ps.executeQuery(); + if (rs.next()){ + descrCaus += " " + rs.getString(1); + totMov = rs.getBigDecimal(2); + } rs.close();ps.close(); + + } + if(descrCaus.length() > 40 ){ + descrCaus = descrCaus.substring(0, 39); + } + ctbMovt.setDescrizioneCaus(descrCaus); + ctbMovt.setImporto(totMov); + } + + + StringWriter writer = new StringWriter(); + ArrayNode array = jsonObjectMapper.createArrayNode(); + array.addPOJO(ctbMovt); + jsonObjectMapper.writeValue(writer, array); + + String jsonBody = writer.toString(); + List respList = httpRestWrapper.callProcessEntityList(ds.getProfile(), username, password, jsonBody, false); + + if (respList.size() > 0) { + /*if (respList.get(0).getEsito() == EsitoType.KO){ + System.out.println(new SimpleDateFormat("dd/MM/yyyy").format(dataDist) + " " + numDist); + System.out.println(jsonBody); + }*/ + return respList.get(0); + } else { + throw new Exception("Nessuna lista di ritorno"); + } + } + + private List chkPartita(String codAnag, Integer annoPart, String serDoc, Integer numDoc, Integer tipoPartita) throws SQLException, Exception { + List elencoScadenze = new ArrayList(); + Boolean existPartita = false; + String tipoAnag = ""; + + String sql = + "SELECT tipo_partita, tipo_anag " + + "FROM ctb_part " + + "WHERE ( ctb_part.cod_anag = " + UtilityDB.valueToString(codAnag) + " ) AND " + + " ( ctb_part.anno_part = " + UtilityDB.valueToString(annoPart) + " ) AND " + + " ( ctb_part.ser_doc = " + UtilityDB.valueToString(serDoc) +" ) AND " + + " ( ctb_part.num_doc = " + UtilityDB.valueToString(numDoc) + " ) AND " + + " ( ctb_part.dare_part <> ctb_part.avere_part ) "; + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()){ + existPartita = true; + tipoPartita = rs.getInt(1); + tipoAnag = rs.getString(2); + }rs.close(); ps.close(); + + if (existPartita) { + sql = + "SELECT * " + + "FROM ctb_scad " + + "WHERE ctb_scad.tipo_anag = " + UtilityDB.valueToString(tipoAnag) + " AND " + + "ctb_scad.cod_anag = " + UtilityDB.valueToString(codAnag) + " AND " + + "ctb_scad.anno_part = " + UtilityDB.valueToString(annoPart) + " AND " + + "ctb_scad.ser_doc = " + UtilityDB.valueToString(serDoc) + " AND " + + "ctb_scad.num_doc = " + UtilityDB.valueToString(numDoc) ; + + ps = ds.getConnection().prepareStatement(sql); + rs = ps.executeQuery(); + ResultSetMapper rsCtbScad = new ResultSetMapper(); + elencoScadenze = rsCtbScad.mapResultSetToList(rs, CtbScad.class, OperationType.INSERT_OR_UPDATE); + rs.close();ps.close(); + } + + return elencoScadenze; + } + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/service/DistinteIncassiDTO.java b/ems-contabil/src/main/java/it/integry/ems/contabil/service/DistinteIncassiDTO.java new file mode 100644 index 0000000000..b3db467edf --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/service/DistinteIncassiDTO.java @@ -0,0 +1,31 @@ +package it.integry.ems.contabil.service; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class DistinteIncassiDTO { + @JsonProperty + private Date dataDist; + + public Date getDataDist() { + return dataDist; + } + + public void setDataDist(Date dataDist) { + this.dataDist = dataDist; + } + + public Integer getNumDist() { + return numDist; + } + + public void setNumDist(Integer numDist) { + this.numDist = numDist; + } + + @JsonProperty + private Integer numDist; + + +} diff --git a/ems-contabil/src/main/java/it/integry/ems/contabil/type/ContabilImportFormat.java b/ems-contabil/src/main/java/it/integry/ems/contabil/type/ContabilImportFormat.java new file mode 100644 index 0000000000..3c9c3b09df --- /dev/null +++ b/ems-contabil/src/main/java/it/integry/ems/contabil/type/ContabilImportFormat.java @@ -0,0 +1,15 @@ +package it.integry.ems.contabil.type; + +public enum ContabilImportFormat { + FRONTST("FRONTST") ; + + private String format; + + public String getFormat() { + return format; + } + + private ContabilImportFormat(String format) { + this.format = format; + } +} diff --git a/ems-contabil/src/main/resources/sepa/xsd/CBIBdyPaymentRequest.00.04.00.xsd b/ems-contabil/src/main/resources/sepa/xsd/CBIBdyPaymentRequest.00.04.00.xsd new file mode 100644 index 0000000000..8b848cdaee --- /dev/null +++ b/ems-contabil/src/main/resources/sepa/xsd/CBIBdyPaymentRequest.00.04.00.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-contabil/src/main/resources/sepa/xsd/CBIHdrSrv.001.07.xsd b/ems-contabil/src/main/resources/sepa/xsd/CBIHdrSrv.001.07.xsd new file mode 100644 index 0000000000..81360ad349 --- /dev/null +++ b/ems-contabil/src/main/resources/sepa/xsd/CBIHdrSrv.001.07.xsd @@ -0,0 +1,174 @@ + + + + + + Header di Servizio incluso nella release 6.15 della documentazione Parte Generale. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-contabil/src/main/resources/sepa/xsd/CBIHdrTrt.001.07.xsd b/ems-contabil/src/main/resources/sepa/xsd/CBIHdrTrt.001.07.xsd new file mode 100644 index 0000000000..8c5a676e5e --- /dev/null +++ b/ems-contabil/src/main/resources/sepa/xsd/CBIHdrTrt.001.07.xsd @@ -0,0 +1,129 @@ + + + + + + Header di Tratta incluso nella release 6.15 della documentazione Parte Generale + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-contabil/src/main/resources/sepa/xsd/CBIPaymentRequest.00.04.00.xsd b/ems-contabil/src/main/resources/sepa/xsd/CBIPaymentRequest.00.04.00.xsd new file mode 100644 index 0000000000..ee71c9ebcd --- /dev/null +++ b/ems-contabil/src/main/resources/sepa/xsd/CBIPaymentRequest.00.04.00.xsd @@ -0,0 +1,739 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Aggiunto blocco per ospitare le comunicazione valutarie sintetiche + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-contabil/src/main/resources/sepa/xsd/CBIPaymentRequestMsg.00.04.00.xsd b/ems-contabil/src/main/resources/sepa/xsd/CBIPaymentRequestMsg.00.04.00.xsd new file mode 100644 index 0000000000..9685eb3052 --- /dev/null +++ b/ems-contabil/src/main/resources/sepa/xsd/CBIPaymentRequestMsg.00.04.00.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/ems-contabil/src/main/resources/sepa/xsd/CBISgnInf.001.04.xsd b/ems-contabil/src/main/resources/sepa/xsd/CBISgnInf.001.04.xsd new file mode 100644 index 0000000000..f409b54ed2 --- /dev/null +++ b/ems-contabil/src/main/resources/sepa/xsd/CBISgnInf.001.04.xsd @@ -0,0 +1,61 @@ + + + + + + + Definizione del blocco di informazioni per la gestione della firma digitale incluso nella release 6.12 della documentazione Parte Generale. +Presenta variazioni in seguito alla deliberazione CNIPA/DigitPA n.45 del 21 maggio 2009 + + + + + + + Tipologia di firma digitale utilizzata. +Può assumere i seguenti valori: +1 = PKCS#7 detached +2 = PKCS#7 attached +3 = CAdES-BES detached +4 = CAdES-BES attached + + + + + Codifica di riferimento: + A = UTF-8 + + + + + Data e ora di apposizione della firma + + + + + Busta di firma codificata in base64 +Il formato della busta deve essere coerente con la tipologia di firma indicata nel tag SgnTyp + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-contabil/src/main/resources/sepa/xsd/binding.jxb b/ems-contabil/src/main/resources/sepa/xsd/binding.jxb new file mode 100644 index 0000000000..fdafb8a6b3 --- /dev/null +++ b/ems-contabil/src/main/resources/sepa/xsd/binding.jxb @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/ems-core.iml b/ems-core.iml new file mode 100644 index 0000000000..6c4da9a393 --- /dev/null +++ b/ems-core.iml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-core/.classpath b/ems-core/.classpath new file mode 100644 index 0000000000..96ff71c6d2 --- /dev/null +++ b/ems-core/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-core/.externalToolBuilders/org.drools.eclipse.droolsbuilder.launch b/ems-core/.externalToolBuilders/org.drools.eclipse.droolsbuilder.launch new file mode 100644 index 0000000000..1a14a1da16 --- /dev/null +++ b/ems-core/.externalToolBuilders/org.drools.eclipse.droolsbuilder.launch @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ems-core/.project b/ems-core/.project new file mode 100644 index 0000000000..f2f88a7ef5 --- /dev/null +++ b/ems-core/.project @@ -0,0 +1,46 @@ + + + ems-core + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.ui.externaltools.ExternalToolBuilder + full,incremental, + + + LaunchConfigHandle + <project>/.externalToolBuilders/org.drools.eclipse.droolsbuilder.launch + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/ems-core/.settings/org.eclipse.core.resources.prefs b/ems-core/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..365bbd6097 --- /dev/null +++ b/ems-core/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/ems-core/.settings/org.eclipse.jdt.core.prefs b/ems-core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62a317c860 --- /dev/null +++ b/ems-core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/ems-core/.settings/org.eclipse.m2e.core.prefs b/ems-core/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..14b697b7bb --- /dev/null +++ b/ems-core/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ems-core/.settings/org.eclipse.wst.common.component b/ems-core/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000000..16196510b2 --- /dev/null +++ b/ems-core/.settings/org.eclipse.wst.common.component @@ -0,0 +1,6 @@ + + + + + + diff --git a/ems-core/.settings/org.eclipse.wst.common.project.facet.core.xml b/ems-core/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000000..74af154056 --- /dev/null +++ b/ems-core/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ems-core/.settings/org.eclipse.wst.validation.prefs b/ems-core/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000000..6f1cba68d5 --- /dev/null +++ b/ems-core/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/ems-core/pom.xml b/ems-core/pom.xml new file mode 100644 index 0000000000..d4bbd5f061 --- /dev/null +++ b/ems-core/pom.xml @@ -0,0 +1,360 @@ + + 4.0.0 + + it.integry + ims + 1.0 + ../pom.xml + + it.integry.ims + ems-core + jar + + Ems Core + + + + repo-sqlserver + http://maven.lib.umd.edu/maven2 + + + + + UTF-8 + + + + + + src/main/resources + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + ${java.version} + ${java.version} + + + + + + + + + org.jboss.resteasy + resteasy-jaxrs + ${resteasy.version} + + + org.jboss.resteasy + resteasy-client + ${resteasy.version} + + + + org.apache.httpcomponents + httpclient + ${httpclient.version} + provided + + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + + org.reflections + reflections + 0.9.10 + provided + + + + + javax.mail + mail + 1.4 + provided + + + + org.apache.xmlbeans + xmlbeans + 2.3.0 + provided + + + + + + + + + + + + net.sf.jasperreports + jasperreports + 4.5.1 + + + + + + + + + org.codehaus.groovy + groovy-all + 1.7.5 + provided + + + + + org.apache.xmlgraphics + batik-awt-util + 1.7 + provided + + + org.apache.xmlgraphics + batik-bridge + 1.7 + provided + + + org.apache.xmlgraphics + batik-css + 1.7 + provided + + + org.apache.xmlgraphics + batik-dom + 1.7 + + + + org.apache.xmlgraphics + batik-ext + 1.7 + provided + + + org.apache.xmlgraphics + batik-gvt + 1.7 + provided + + + org.apache.xmlgraphics + batik-parser + 1.7 + provided + + + org.apache.xmlgraphics + batik-svg-dom + 1.7 + + + + org.apache.xmlgraphics + batik-transcoder + 1.7 + + + + org.apache.xmlgraphics + batik-util + 1.7 + provided + + + org.apache.xmlgraphics + batik-xml + 1.7 + + + + + org.quartz-scheduler + quartz + 2.2.2 + provided + + + org.quartz-scheduler + quartz-jobs + 2.2.2 + provided + + + + net.sf.barcode4j + barcode4j + 2.0 + provided + + + it.integry + utility-barcode + 1.1 + provided + + + org.apache.pdfbox + pdfbox + + 2.0.0 + provided + + + + com.google.code.gson + gson + 2.5 + + provided + + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-csv + ${jackson.version} + + + + + org.springframework + spring-aop + ${spring.version} + + + org.springframework + spring-core + ${spring.version} + + + + org.springframework + spring-instrument-tomcat + ${spring.version} + + + org.springframework + spring-oxm + ${spring.version} + + + org.springframework + spring-orm + ${spring.version} + + + org.springframework + spring-context-support + ${spring.version} + + + org.springframework + spring-webmvc + ${spring.version} + + + + org.springframework.security + spring-security-core + ${security.version} + + + org.springframework.security + spring-security-web + ${security.version} + + + + + org.drools + drools-compiler + ${drools.version} + provided + + + org.drools + drools-core + ${drools.version} + provided + + + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + + + org.apache.logging.log4j + log4j-web + ${log4j.version} + + + + org.apache.commons + commons-lang3 + 3.4 + provided + + + + + it.integry.ims + ems-model + 1.0 + + + + + org.ini4j + ini4j + 0.5.2 + provided + + + com.google.guava + guava + ${guava.version} + provided + + + commons-beanutils + commons-beanutils + 1.8.0 + + dependency> + org.apache.pdfbox + pdfbox + 2.0.3 + + + diff --git a/ems-core/src/main/java/it/integry/ems/adapter/BigDecimalDeserialize.java b/ems-core/src/main/java/it/integry/ems/adapter/BigDecimalDeserialize.java new file mode 100644 index 0000000000..950a44d1bb --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/BigDecimalDeserialize.java @@ -0,0 +1,33 @@ +package it.integry.ems.adapter; + +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.utility.UtilityString; + +import java.io.IOException; +import java.math.BigDecimal; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + +public class BigDecimalDeserialize extends JsonDeserializer { + + @Override + public BigDecimal deserialize(JsonParser parser, DeserializationContext context) + throws IOException { + String string = parser.getText(); + + if(!UtilityString.isNullOrEmpty(string)) { + if (string.equalsIgnoreCase("null")) { + return EmsRestConstants.BIGDECIMAL_NULL; + } + + if (string.contains(",")) { + string = parser.getText().replace(",", "."); + } + return new BigDecimal(string); + } else + return null; + } + +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/adapter/CustomDeserializer.java b/ems-core/src/main/java/it/integry/ems/adapter/CustomDeserializer.java new file mode 100644 index 0000000000..1a013511e1 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/CustomDeserializer.java @@ -0,0 +1,45 @@ +package it.integry.ems.adapter; + +import it.integry.ems.response.PkEntity; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +public class CustomDeserializer extends StdDeserializer{ + + private static final long serialVersionUID = 1L; + + public CustomDeserializer(Class t) { + super(t); + } + + @Override + public PkEntity deserialize(JsonParser jp, DeserializationContext dc) + throws IOException, JsonProcessingException { + + JsonToken currentToken = null; + Map map = new HashMap(); + while ((currentToken = jp.nextValue()) != null) { + switch (currentToken) { + case VALUE_NUMBER_INT: + map.put(jp.getCurrentName(), jp.getCurrentValue()); + break; + case VALUE_STRING: + map.put(jp.getCurrentName(), jp.getCurrentValue()); + break; + default: + break; + } + } + PkEntity pk = new PkEntity(); + pk.setMap(map); + return pk; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/DateAdapter.java b/ems-core/src/main/java/it/integry/ems/adapter/DateAdapter.java new file mode 100644 index 0000000000..b24be82f0b --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/DateAdapter.java @@ -0,0 +1,36 @@ +package it.integry.ems.adapter; + +import java.text.SimpleDateFormat; +import java.util.GregorianCalendar; + +import javax.xml.bind.annotation.adapters.XmlAdapter; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; + +public class DateAdapter extends XmlAdapter { + + private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + + public DateAdapter() {} + + public DateAdapter(String format) { + dateFormat = new SimpleDateFormat(format); + } + + @Override + public String marshal(XMLGregorianCalendar v) throws Exception { + synchronized (dateFormat) { + return dateFormat.format(v.toGregorianCalendar().getTime()); + } + } + + @Override + public XMLGregorianCalendar unmarshal(String v) throws Exception { + synchronized (dateFormat) { + GregorianCalendar dataValGreg = new GregorianCalendar(); + dataValGreg.setTime(dateFormat.parse(v)); + return DatatypeFactory.newInstance().newXMLGregorianCalendar(dataValGreg); + } + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/EsitoDeserialize.java b/ems-core/src/main/java/it/integry/ems/adapter/EsitoDeserialize.java new file mode 100644 index 0000000000..c37cca845b --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/EsitoDeserialize.java @@ -0,0 +1,25 @@ +package it.integry.ems.adapter; + +import it.integry.ems.response.EsitoType; + +import java.io.IOException; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonMappingException; + +public class EsitoDeserialize extends JsonDeserializer { + + @Override + public EsitoType deserialize(JsonParser jp, DeserializationContext dc) + throws IOException, JsonProcessingException { + + EsitoType type = EsitoType.forIntValue(Integer.valueOf(jp.getValueAsString())); + if (type != null) { + return type; + } + throw new JsonMappingException("invalid value for type, must be '1' or '-1'"); + } +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/EsitoSerialize.java b/ems-core/src/main/java/it/integry/ems/adapter/EsitoSerialize.java new file mode 100644 index 0000000000..3be880f406 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/EsitoSerialize.java @@ -0,0 +1,21 @@ +package it.integry.ems.adapter; + +import it.integry.ems.response.EsitoType; + +import java.io.IOException; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +public class EsitoSerialize extends JsonSerializer { + + @Override + public void serialize(EsitoType value, JsonGenerator gen, + SerializerProvider serializers) throws IOException, + JsonProcessingException { + + gen.writeNumber(value.value()); + } +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/ExecDateSerializer.java b/ems-core/src/main/java/it/integry/ems/adapter/ExecDateSerializer.java new file mode 100644 index 0000000000..c186ffda93 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/ExecDateSerializer.java @@ -0,0 +1,27 @@ +package it.integry.ems.adapter; + +import it.integry.common.var.CommonConstants; + +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +public class ExecDateSerializer extends JsonSerializer{ + + private static final SimpleDateFormat dateFormat = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD); + + @Override + public void serialize(Date date, JsonGenerator gen, SerializerProvider provider) + throws IOException, JsonProcessingException { + + String formattedDate = dateFormat.format(date); + + gen.writeString(formattedDate); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/IntegerDeserializer.java b/ems-core/src/main/java/it/integry/ems/adapter/IntegerDeserializer.java new file mode 100644 index 0000000000..c1fd754786 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/IntegerDeserializer.java @@ -0,0 +1,28 @@ +package it.integry.ems.adapter; + +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.utility.UtilityString; + +import java.io.IOException; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + +public class IntegerDeserializer extends JsonDeserializer { + + @Override + public Integer deserialize(JsonParser parser, DeserializationContext context) + throws IOException { + String string = parser.getText(); + + if(!UtilityString.isNullOrEmpty(string)) { + if (string.equalsIgnoreCase("null")) { + return EmsRestConstants.INTEGER_NULL; + } + return new Integer(string); + } else + return null; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/JsonDateAdapter.java b/ems-core/src/main/java/it/integry/ems/adapter/JsonDateAdapter.java new file mode 100644 index 0000000000..fc3736da4f --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/JsonDateAdapter.java @@ -0,0 +1,36 @@ +package it.integry.ems.adapter; + +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.utility.UtilityString; + +import java.io.IOException; +import java.util.Date; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + +public class JsonDateAdapter extends JsonDeserializer{ + + @Override + public Date deserialize(JsonParser jp, DeserializationContext arg1) + throws IOException, JsonProcessingException { + + if(UtilityString.isNullOrEmpty(jp.getText())) + return null; + + if(jp.getText().equalsIgnoreCase("null")) { + return EmsRestConstants.DATE_NULL; + } else if((!jp.getText().contains("/") || !jp.getText().contains("-")) && !jp.getText().contains(":")) { + try{ + Long.parseLong(jp.getValueAsString()); + return new Date(jp.getLongValue()); + }catch(Exception e) { + } + } + + return UtilityString.parseDate(jp.getText()); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/JsonDateAdapterSerializer.java b/ems-core/src/main/java/it/integry/ems/adapter/JsonDateAdapterSerializer.java new file mode 100644 index 0000000000..46bcf4e24c --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/JsonDateAdapterSerializer.java @@ -0,0 +1,27 @@ +package it.integry.ems.adapter; + +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +public class JsonDateAdapterSerializer extends JsonSerializer{ + + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + + @Override + public void serialize(Date value, JsonGenerator gen, + SerializerProvider serializers) throws IOException, + JsonProcessingException { + if(value == null){ + gen.writeString(""); + }else{ + gen.writeString(sdf.format(value)); + } + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/PkEntityDeserializer.java b/ems-core/src/main/java/it/integry/ems/adapter/PkEntityDeserializer.java new file mode 100644 index 0000000000..a26a27ea18 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/PkEntityDeserializer.java @@ -0,0 +1,14 @@ +package it.integry.ems.adapter; + + +@Deprecated +public class PkEntityDeserializer { +//extends JsonDeserializer { +// +// @Override +// public PkEntity deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, +// JsonProcessingException { +// return null; +// } + +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/PkEntitySerializer.java b/ems-core/src/main/java/it/integry/ems/adapter/PkEntitySerializer.java new file mode 100644 index 0000000000..752c55b557 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/PkEntitySerializer.java @@ -0,0 +1,24 @@ +package it.integry.ems.adapter; + +import it.integry.ems.response.PkEntity; + +import java.io.IOException; +import java.util.Map.Entry; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +public class PkEntitySerializer extends JsonSerializer { + + @Override + public void serialize(PkEntity value, JsonGenerator gen, SerializerProvider serializers) + throws IOException, JsonProcessingException { + gen.writeStartObject(); + for (Entry entry : value.getMap().entrySet()) { + gen.writeObjectField(entry.getKey(), entry.getValue()); + } + gen.writeEndObject(); + } +} diff --git a/ems-core/src/main/java/it/integry/ems/adapter/StringUnicodeDeserialize.java b/ems-core/src/main/java/it/integry/ems/adapter/StringUnicodeDeserialize.java new file mode 100644 index 0000000000..d31cedda59 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/StringUnicodeDeserialize.java @@ -0,0 +1,23 @@ +package it.integry.ems.adapter; + +import java.io.IOException; + +import org.apache.commons.lang3.StringEscapeUtils; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + +public class StringUnicodeDeserialize extends JsonDeserializer { + + @Override + public String deserialize(JsonParser parser, DeserializationContext context) + throws IOException { + String string = parser.getText(); + if(string.indexOf("\\u") != -1) + return StringEscapeUtils.unescapeJava(string); + else + return string; + } + + } \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/adapter/XmlDateAdapter.java b/ems-core/src/main/java/it/integry/ems/adapter/XmlDateAdapter.java new file mode 100644 index 0000000000..49bbd9951e --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/adapter/XmlDateAdapter.java @@ -0,0 +1,33 @@ +package it.integry.ems.adapter; + +import it.integry.ems.utility.UtilityString; + +import java.text.SimpleDateFormat; +import java.util.Date; + +import javax.xml.bind.annotation.adapters.XmlAdapter; + +public class XmlDateAdapter extends XmlAdapter{ + + public XmlDateAdapter() {} + + public XmlDateAdapter(String format) { + sdf = new SimpleDateFormat(format); + } + + private SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss"); + + @Override + public String marshal(Date arg0) throws Exception { + return sdf.format(arg0); + } + + @Override + public Date unmarshal(String arg0) throws Exception { + String format = UtilityString.determineDateFormat(arg0); + if(format != null && !"dd-MM-yyyy HH:mm:ss".equals(format)) + sdf = new SimpleDateFormat(format); + return sdf.parse(arg0); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/annotation/DtoField.java b/ems-core/src/main/java/it/integry/ems/annotation/DtoField.java new file mode 100644 index 0000000000..0d20aed29c --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/annotation/DtoField.java @@ -0,0 +1,16 @@ +package it.integry.ems.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface DtoField { + + public String value() default ""; + public String formula() default ""; + public String format() default ""; + public int scale() default 5; +} diff --git a/ems-core/src/main/java/it/integry/ems/csv/CsvMapper.java b/ems-core/src/main/java/it/integry/ems/csv/CsvMapper.java new file mode 100644 index 0000000000..acd80d8684 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/csv/CsvMapper.java @@ -0,0 +1,106 @@ +package it.integry.ems.csv; + +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.utility.UtilityString; + +import java.lang.reflect.Field; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.dataformat.csv.CsvSchema; +import com.fasterxml.jackson.dataformat.csv.CsvSchema.Column; + +public class CsvMapper { + + private Map map = new HashMap(); + + public String serialize(List dtoList, String splitChar, String header) + throws Exception { + return serialize(dtoList, splitChar, header, true); + } + + public String serialize(List dtoList, String splitChar, String header, Boolean hasHeader) + throws Exception { + com.fasterxml.jackson.dataformat.csv.CsvMapper mapper = new com.fasterxml.jackson.dataformat.csv.CsvMapper(); + + CsvSchema.Builder builder = new CsvSchema.Builder(); + builder.setColumnSeparator(splitChar.charAt(0)); + + builder.setUseHeader(hasHeader); + String[] columns = header.split(splitChar); + + for (int i = 0; i < columns.length; i++) { + builder.addColumn(new Column(i, columns[i])); + } + + builder.setLineSeparator(System.getProperty("line.separator")); + CsvSchema schema = builder.build().withoutQuoteChar(); + + mapper.configure(JsonGenerator.Feature.IGNORE_UNKNOWN, true); + return mapper.writer(schema).writeValueAsString(dtoList); + } + + public List deserialize(String csv, Class dtoClass, String splitChar) throws Exception { + List outputList = null; + String[] headers = null; + + String delimiter = UtilityString.identifyLineDelimiter(csv); + ByteBuffer byteBuffer = ByteBuffer.wrap(csv.getBytes()); + + boolean firstLine = true; + String line = ""; + for (int i = 0; i < byteBuffer.capacity(); i++) { + line += (char) byteBuffer.get(); + if (line.endsWith(delimiter)) { + if (firstLine) { + firstLine = false; + headers = line.split(splitChar); + for (Field ff : dtoClass.getDeclaredFields()) { + JsonProperty dto = ff.getAnnotation(JsonProperty.class); + if (dto != null) { + for (String head : headers) { + if (dto.value().toLowerCase().equals(head.trim().toLowerCase())) + map.put(head.trim().toLowerCase(), ff); + } + } + } + line = ""; + continue; + } + String[] datas = line.split(splitChar); + T bean = (T) dtoClass.newInstance(); + for (int j = 0; j < datas.length; j++) { + String header = headers[j].trim(); + if (header.compareTo("") != 0 ){ + Field field = map.get(header.toLowerCase()); + if (field == null) { + byteBuffer.clear(); + throw new Exception("Campo non trovato " + header); + } + field.setAccessible(true); + if(field.getGenericType() == Date.class) { + field.set(bean, UtilityString.parseDate(datas[j].trim())); + } else { + field.set(bean, SqlFieldHolder.applyConvert(datas[j].trim(), field.getGenericType())); + } + } + } + line = ""; + if (outputList == null) { + outputList = new ArrayList(); + } + outputList.add(bean); + } + } + byteBuffer.clear(); + map.clear(); + return outputList; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/datasource/ConnectionDecorator.java b/ems-core/src/main/java/it/integry/ems/datasource/ConnectionDecorator.java new file mode 100644 index 0000000000..d52ca4293e --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/datasource/ConnectionDecorator.java @@ -0,0 +1,30 @@ +package it.integry.ems.datasource; + +import java.sql.Connection; + +public class ConnectionDecorator { + + private Connection connection; + private Boolean used; + + public ConnectionDecorator(Connection connection, Boolean used) { + super(); + this.connection = connection; + this.used = used; + } + public Connection getConnection() { + return connection; + } + public void setConnection(Connection connection) { + this.connection = connection; + } + public Boolean isUsed() { + return used; + } + public void setUsed(Boolean used) { + this.used = used; + } + + + +} diff --git a/ems-core/src/main/java/it/integry/ems/datasource/DataSource.java b/ems-core/src/main/java/it/integry/ems/datasource/DataSource.java new file mode 100644 index 0000000000..199803594c --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/datasource/DataSource.java @@ -0,0 +1,144 @@ +package it.integry.ems.datasource; + +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.exception.SyncException; +import it.integry.ems.sync.ConnectionCacheHolder; +import it.integry.ems.utility.UtilityString; +import it.integry.security.utility.CryptoUtils; + +import java.io.File; +import java.io.FileInputStream; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.util.Properties; + +import javax.annotation.PreDestroy; + +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; + +@Service +@Scope(value="request") +public class DataSource { + + private String DRIVER_CLASS_NAME = ""; + private String DB_URL = ""; + private String DB_USER = ""; + private String DB_PASSWORD = ""; + + private String profile; + private String appName; + private String dbName; + + public String getDbName() { + return dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public String getProfile() { + return profile; + } + + private Connection connection = null; + + public synchronized Connection getConnection() throws Exception { + if(connection.isClosed()) + init(); + return connection; + } + + private void init() throws Exception { + Class.forName(DRIVER_CLASS_NAME); + connection = DriverManager.getConnection(DB_URL, DB_USER, DB_PASSWORD); + connection.setTransactionIsolation(java.sql.Connection.TRANSACTION_READ_UNCOMMITTED); + connection.setAutoCommit(false); + } + + @PreDestroy + private void destroy() throws Exception { + forceClose(); + } + + public synchronized void initialize(String profileDB, String pathConnectionIni, String connectionName) throws Exception { + if(UtilityString.isNullOrEmpty(profileDB)){ + throw new Exception("Profile DB non valorizzato - controllare la chiamata del servizio"); + } + + this.profile = profileDB; + this.appName = connectionName; + + File connectionFile = new File(pathConnectionIni); + if (connectionFile.exists()){ + FileInputStream in = new FileInputStream(connectionFile); + Properties props = new Properties(); + props.load(in); + String valueProperty = props.getProperty("CONNECT_STRING_" + profileDB.toUpperCase(), ""); + + String typeDb = props.getProperty("TYPE_DB_" + profileDB.toUpperCase(), "MSS"); + + String[] params = valueProperty.split(";"); + if(params.length < 2){ + throw new SyncException("Configurazione DB non trovata o dati mancanti", profileDB); + } + + String decryptPsw = props.getProperty("DECRYPT_DB_PSW_" + profileDB.toUpperCase(), "S"); + + String dns = params[0]; + setDbName(dns); + DB_USER = params[1]; + DB_PASSWORD = params[2]; + + if("S".equals(decryptPsw)){ + DB_PASSWORD = CryptoUtils.decrypt(DB_PASSWORD); + } + if(EmsRestConstants.TypeDbMYSQL.equals(typeDb)){ + if(params.length < 4) + DB_URL = "jdbc:mysql://" + params[3] + ":3306/" + dns; + } else if (EmsRestConstants.TypeDbMSSQL.equals(typeDb)){ + if(params.length < 4) + throw new SyncException("Stringa di connessione al database non configurata correttamente", profileDB); + DB_URL = "jdbc:sqlserver://" + params[3] + ";databaseName=" + dns+";applicationName=" + appName; + } else if(EmsRestConstants.TypeDbPostgres.equals(typeDb)) { + if(params.length < 4) + throw new SyncException("Stringa di connessione al database non configurata correttamente", profileDB); + DB_URL = "jdbc:postgres://" + params[3] + ":5432/" + dns; + } else { + + DB_URL = "jdbc:odbc:" + dns; + } + + if(EmsRestConstants.TypeDbMSSQL.equals(typeDb)){ + DRIVER_CLASS_NAME = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; + } else if(EmsRestConstants.TypeDbMYSQL.equals(typeDb)){ + DRIVER_CLASS_NAME = "com.mysql.jdbc.Driver"; + } else if(EmsRestConstants.TypeDbPostgres.equals(typeDb)) { + DRIVER_CLASS_NAME = "org.postgresql.Driver"; + } else { + DRIVER_CLASS_NAME = "sun.jdbc.odbc.JdbcOdbcDriver"; + } + + init(); + ConnectionCacheHolder.putConnection(profileDB, new ConnectionDecorator(connection, true)); + } else { + throw new Exception("File " + pathConnectionIni + " non configurato correttamente"); + } + } + + public synchronized void initialize(String profileDB, String pathConnectionIni) throws Exception { + initialize(profileDB, pathConnectionIni, "EMS Connection"); + } + + public void forceClose() throws SQLException { + if (connection != null) { + synchronized (connection) { + connection.close(); + } + ConnectionCacheHolder.dropConnection(profile); + } + + } +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/directory/DirWatcherListener.java b/ems-core/src/main/java/it/integry/ems/directory/DirWatcherListener.java new file mode 100644 index 0000000000..875e73f203 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/directory/DirWatcherListener.java @@ -0,0 +1,144 @@ +package it.integry.ems.directory; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.service.SetupGest; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; +import it.integry.ems.watching.DirWatcher; +import it.integry.security.utility.RestUtil; + +import java.io.File; +import java.io.FileInputStream; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.Date; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.InvocationCallback; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Response; + +import org.apache.commons.io.IOUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class DirWatcherListener extends DirWatcher { + + private Logger logger = LogManager.getLogger(); + + private EmsProperties prop; + private SetupGest setupGest; + + private String serviceRest; + private String database; + private String paramPath; + + public DirWatcherListener(ListenerInfo info, EmsProperties prop, SetupGest setupGest) { + super(info.getDirectoryName(), info.getFileFilter()); + this.database = info.getDatabase(); + this.serviceRest = info.getServiceRest(); + this.paramPath = info.getSetupGestBranch(); + + this.prop = prop; + this.setupGest = setupGest; + } + + @Override + protected void onChange(final File file, String action) throws Exception { + if("add".equals(action)) { + logger.debug(file.getName()); + String flagAttivo = "S"; + String listening = "S"; + DataSource ds = new DataSource(); + ds.initialize(database, prop.getGlobalConnectionIniPath()); + + String mConn = ""; + String[] params = paramPath.split("\\|"); + if(params.length >= 2) { + flagAttivo = (String) setupGest.getSetup(ds.getConnection(), + params[0], params[1], "ATTIVO", ""); + listening = (String) setupGest.getSetup(ds.getConnection(), + params[0], params[1], "LISTENING", ""); + + mConn = (String) setupGest.getSetup(ds.getConnection(), + params[0], "SETUP", "MAX_CONN", ""); + ds.forceClose(); + } + + if(!UtilityString.isNullOrEmpty(flagAttivo) && "S".equals(flagAttivo) && + !UtilityString.isNullOrEmpty(listening) && "S".equals(listening)) { + FileInputStream fis = new FileInputStream(file); + String fileContent = IOUtils.toString(fis); + IOUtils.closeQuietly(fis); + + if (!UtilityString.isNullOrEmpty(mConn)) { + Integer maxConn = Integer.valueOf(mConn); + ds = new DataSource(); + ds.initialize(database, prop.getGlobalConnectionIniPath()); + + String sql = "SELECT (COUNT(dbid) - 1) as NumberOfConnections " + + "FROM sys.sysprocesses WHERE dbid > 0 and DB_NAME(dbid) = " + UtilityDB.valueToString(ds.getProfile()) + + " and program_name <> 'EMS Receipts check'"; + + int numConn = 0; + do { + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if(rs.next()) { + numConn = rs.getInt("NumberOfConnections"); + } + rs.close(); + ps.close(); + + logger.debug("CONNESSIONI ATTIVE ["+ds.getProfile()+"] " + numConn); + + if(numConn > maxConn) { + logger.debug("SCONTRINI IN ATTESA, num connessioni:" + numConn); + } + } while(numConn > maxConn); + ds.forceClose(); + } + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + String auth = RestUtil.generateAuth(database, database, "POST", + fileContent, "text/plain", prop.getRootApi() + serviceRest, now); + + final Client client = ClientBuilder.newClient(); + WebTarget resource = client.target(prop.getEndPointWS()) + .path(prop.getRootApi() + serviceRest) + .resolveTemplate("mode", "async"); + resource = resource.queryParam(CommonConstants.PROFILE_DB, database) + .queryParam("type", params[0].substring(params[0].indexOf("_")+1)) + .queryParam("format", params[1]) + .queryParam("filePath", file.getAbsoluteFile()) + .queryParam("fileName", file.getName()); + + resource.request() + .header("Authorization", database + ":" +auth) + .header("SignDate", now).async() + .post(Entity.text(fileContent), new InvocationCallback() { + @Override + public void completed(Response response) { + String value = response.readEntity(String.class); + logger.info(response.getStatus() + " - " + value); + response.close(); + client.close(); + } + + @Override + public void failed(Throwable throwable) { + System.out.println("Invocation failed per " + file.getName()); + throwable.printStackTrace(); + logger.error(throwable); + client.close(); + } + }); + } + } + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/directory/DirectoryService.java b/ems-core/src/main/java/it/integry/ems/directory/DirectoryService.java new file mode 100644 index 0000000000..c36bd054c1 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/directory/DirectoryService.java @@ -0,0 +1,103 @@ +package it.integry.ems.directory; + +import it.integry.ems.datasource.DataSource; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.retail.service.RetailUtilService; +import it.integry.ems.service.SetupGest; +import it.integry.ems.utility.UtilityString; + +import java.io.FileInputStream; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Properties; +import java.util.Timer; +import java.util.TimerTask; + +import javax.annotation.PostConstruct; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class DirectoryService { + + private List watcherList = new ArrayList(); + + private Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties properties; + @Autowired + private SetupGest setupGest; + @Autowired + private RetailUtilService retailUtilService; + + private ListenerInfo infoServiceReceipts = null; + + @PostConstruct + public void readConfig() throws Exception { + + purgeAndCancelTask(); + Properties prop = new Properties(); + prop.load(new FileInputStream(System.getProperty("catalina.home") + + "/conf/integry/directory.properties")); + Integer count = 1; + + while(!UtilityString.isNullOrEmpty(prop.get("database." + count)) && + !UtilityString.isNullOrEmpty(prop.get("service.rest." + count)) && + !UtilityString.isNullOrEmpty(prop.get("setup.gest.branch." + count))) { + + DataSource ds = new DataSource(); + ds.initialize(prop.get("database." + count).toString(), properties.getGlobalConnectionIniPath()); + + String directoryName = null, fileFilter = null; + String[] params = prop.get("setup.gest.branch." + count).toString().split("\\|"); + if(params.length >= 2) { + directoryName = (String) setupGest.getSetup(ds.getConnection(), + params[0], params[1], "PATH_FILE", ""); + if(UtilityString.isNullOrEmpty(directoryName)) { + logger.info(params[0]+"|"+params[1]+"|"+"PATH_FILE non presente in setup gest"); + System.out.println(params[0]+"|"+params[1]+"|"+"PATH non presente in setup gest"); + } + + fileFilter = (String) setupGest.getSetup(ds.getConnection(), + params[0], params[1], "FILE_FILTER", ""); + if(UtilityString.isNullOrEmpty(fileFilter)) { + logger.info(params[0]+"|"+params[1]+"|"+"FILE_FILTER non presente in setup gest"); + System.out.println(params[0]+"|"+params[1]+"|"+"FILE_FILTER non presente in setup gest"); + } + ds.forceClose(); + + ListenerInfo info = new ListenerInfo(prop.get("database." + count).toString(), directoryName, fileFilter, + (String)prop.get("service.rest." + count), (String)prop.get("setup.gest.branch." + count)); + + TimerTask task = null; + + if("/ems-api".equals(properties.getRootApi())) { + if("/importReceipts".equals((String)prop.get("service.rest." + count))) { + task = new ReceiptsFileListener(info, properties, setupGest, retailUtilService); + infoServiceReceipts = info; + } else + task = new DirWatcherListener(info, properties, setupGest); + Timer timer = new Timer(); + timer.schedule(task, new Date(), 1000); + watcherList.add(timer); + } + } + count++; + } + } + + public ListenerInfo getReceiptService() { + return infoServiceReceipts; + } + + private void purgeAndCancelTask() { + for (int i = 0; i < watcherList.size(); i++) { + watcherList.get(i).cancel(); + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/directory/EmailListenerInfo.java b/ems-core/src/main/java/it/integry/ems/directory/EmailListenerInfo.java new file mode 100644 index 0000000000..eaca4ae962 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/directory/EmailListenerInfo.java @@ -0,0 +1,34 @@ +package it.integry.ems.directory; + +public class EmailListenerInfo { + + private String serviceRest; + private String setupGestBranch; + private String database; + + public EmailListenerInfo(String database, String serviceRest, String setupGestBranch) { + super(); + this.database = database; + this.serviceRest = serviceRest; + this.setupGestBranch = setupGestBranch; + } + + public String getServiceRest() { + return serviceRest; + } + public void setServiceRest(String serviceRest) { + this.serviceRest = serviceRest; + } + public String getSetupGestBranch() { + return setupGestBranch; + } + public void setSetupGestBranch(String setupGestBranch) { + this.setupGestBranch = setupGestBranch; + } + public String getDatabase() { + return database; + } + public void setDatabase(String database) { + this.database = database; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/directory/EmailService.java b/ems-core/src/main/java/it/integry/ems/directory/EmailService.java new file mode 100644 index 0000000000..2ae808ca2a --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/directory/EmailService.java @@ -0,0 +1,109 @@ +package it.integry.ems.directory; + +import it.integry.ems.datasource.DataSource; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.service.SetupGest; +import it.integry.ems.utility.UtilityString; + +import java.io.File; +import java.io.FileInputStream; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Properties; +import java.util.Timer; +import java.util.TimerTask; + +import javax.annotation.PostConstruct; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class EmailService { + + private List watcherList = new ArrayList(); + + private Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties properties; + @Autowired + private SetupGest setupGest; + @Autowired + private JSONObjectMapper jsonObjectMapper; + + private ListenerInfo infoServiceReceipts = null; + + @PostConstruct + public void readConfig() throws Exception { + + purgeAndCancelTask(); + File f = new File(System.getProperty("catalina.home") + "/conf/integry/email.properties"); + if(f.exists()) { + Properties prop = new Properties(); + prop.load(new FileInputStream(f)); + Integer count = 1; + Integer repeatSeconds = 60; + + while(!UtilityString.isNullOrEmpty(prop.get("database." + count)) && + !UtilityString.isNullOrEmpty(prop.get("service.rest." + count)) && + !UtilityString.isNullOrEmpty(prop.get("setup.gest.branch." + count))) { + + DataSource ds = new DataSource(); + ds.initialize(prop.get("database." + count).toString(), properties.getGlobalConnectionIniPath()); + + String username = null, password = null, pop3 = null; + String[] params = prop.get("setup.gest.branch." + count).toString().split("\\|"); + if(params.length >= 2) { + String seconds = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "REPEAT_SECONDS"); + if(!UtilityString.isNullOrEmpty(seconds)) + repeatSeconds = Integer.parseInt(seconds); + + username = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "USERNAME"); + if(UtilityString.isNullOrEmpty(username)) { + logger.info(params[0]+"|"+params[1]+"|"+"USERNAME non presente in setup gest"); + System.out.println(params[0]+"|"+params[1]+"|"+"USERNAME non presente in setup gest"); + } + + password = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "PASSWORD"); + if(UtilityString.isNullOrEmpty(password)) { + logger.info(params[0]+"|"+params[1]+"|"+"PASSWORD non presente in setup gest"); + System.out.println(params[0]+"|"+params[1]+"|"+"PASSWORD non presente in setup gest"); + } + pop3 = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "POP3"); + if(UtilityString.isNullOrEmpty(pop3)) { + logger.info(params[0]+"|"+params[1]+"|"+"SMTP non presente in setup gest"); + System.out.println(params[0]+"|"+params[1]+"|"+"SMTP non presente in setup gest"); + } + ds.forceClose(); + + EmailListenerInfo info = new EmailListenerInfo(prop.get("database." + count).toString(), + (String)prop.get("service.rest." + count), (String)prop.get("setup.gest.branch." + count)); + + TimerTask task = null; + if("/ems-api".equals(properties.getRootApi())) { + task = new EmailWatcherListener(info, properties, setupGest, jsonObjectMapper); + Timer timer = new Timer(); + timer.schedule(task, new Date(), 1000 * repeatSeconds); + watcherList.add(timer); + } + } + count++; + } + } + } + + public ListenerInfo getReceiptService() { + return infoServiceReceipts; + } + + private void purgeAndCancelTask() { + for (int i = 0; i < watcherList.size(); i++) { + watcherList.get(i).cancel(); + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/directory/EmailWatcherListener.java b/ems-core/src/main/java/it/integry/ems/directory/EmailWatcherListener.java new file mode 100644 index 0000000000..6e0ced5f52 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/directory/EmailWatcherListener.java @@ -0,0 +1,274 @@ +package it.integry.ems.directory; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.response.EsitoType; +import it.integry.ems.response.FileItem; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.service.SetupGest; +import it.integry.ems.utility.UtilityString; +import it.integry.security.utility.RestUtil; + +import java.io.ByteArrayOutputStream; +import java.io.StringWriter; +import java.net.InetAddress; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Properties; +import java.util.TimerTask; + +import javax.activation.DataHandler; +import javax.mail.BodyPart; +import javax.mail.Flags; +import javax.mail.Folder; +import javax.mail.Message; +import javax.mail.Multipart; +import javax.mail.Session; +import javax.mail.Store; +import javax.mail.internet.InternetAddress; +import javax.mail.search.FlagTerm; +import javax.mail.search.MessageIDTerm; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.InvocationCallback; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Response; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.fasterxml.jackson.databind.node.ArrayNode; + +public class EmailWatcherListener extends TimerTask { + + private Logger logger = LogManager.getLogger(); + + private EmailListenerInfo emailListenerInfo; + private EmsProperties prop; + private SetupGest setupGest; + private JSONObjectMapper jsonObjectMapper; + + public EmailWatcherListener(EmailListenerInfo emailListenerInfo, EmsProperties prop, + SetupGest setupGest, JSONObjectMapper jsonObjectMapper) { + super(); + this.emailListenerInfo = emailListenerInfo; + this.prop = prop; + this.setupGest = setupGest; + this.jsonObjectMapper = jsonObjectMapper; + } + + @Override + public synchronized void run() { + try { + String flagAttivo = null, username = null, password = null, + imap = null, pop3 = null, pop3Port = null, imapPort = null; + + DataSource ds = new DataSource(); + ds.initialize(emailListenerInfo.getDatabase(), prop.getGlobalConnectionIniPath()); + + String[] params = emailListenerInfo.getSetupGestBranch().split("\\|"); + + if (params.length >= 2) { + flagAttivo = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "ATTIVO"); + username = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "USERNAME"); + if (UtilityString.isNullOrEmpty(username)) + throw new Exception(params[0] + "/" + params[1] + "/USERNAME non configurato correttamente"); + + password = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "PASSWORD"); + if (UtilityString.isNullOrEmpty(password)) + throw new Exception(params[0] + "/" + params[1] + "/PASSWORD non configurato correttamente"); + + pop3 = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "POP3"); + if (UtilityString.isNullOrEmpty(pop3)) + throw new Exception(params[0] + "/" + params[1] + "/POP3 non configurato correttamente"); + + pop3Port = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "POP3_PORT"); + if (UtilityString.isNullOrEmpty(pop3Port)) + throw new Exception(params[0] + "/" + params[1] + "/POP3_PORT non configurato correttamente"); + + imap = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "IMAP"); + if (UtilityString.isNullOrEmpty(imap)) + throw new Exception(params[0] + "/" + params[1] + "/IMAP non configurato correttamente"); + + imapPort = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "IMAP_PORT"); + if (UtilityString.isNullOrEmpty(imapPort)) + throw new Exception(params[0] + "/" + params[1] + "/IMAP_PORT non configurato correttamente"); + } + ds.forceClose(); + if (!UtilityString.isNullOrEmpty(flagAttivo) && "S".equals(flagAttivo)) { + Properties sysProperties = System.getProperties(); + Session session = Session.getDefaultInstance(sysProperties); + Store storePop = null; + Folder inboxPop3 = null; + + Store store = session.getStore("imap"); + store.connect(imap, Integer.parseInt(imapPort), username, password); + Folder inbox = store.getFolder("inbox"); + inbox.open(Folder.READ_WRITE); + + // search for all "unseen" messages + Flags seen = new Flags(Flags.Flag.SEEN); + FlagTerm unseenFlagTerm = new FlagTerm(seen, false); + Message messages[] = inbox.search(unseenFlagTerm); + + logger.debug(messages.length + " NUOVE MAIL TROVATE"); + + if (messages.length > 0) { + storePop = session.getStore("pop3"); + storePop.connect(pop3, Integer.parseInt(pop3Port), username, password); + inboxPop3 = storePop.getFolder("inbox"); + inboxPop3.open(Folder.READ_ONLY); + } + + for (Message message : messages) { + Message[] msgPopList = inboxPop3.search(new MessageIDTerm(message.getHeader("Message-Id")[0])); + + if (msgPopList.length == 1) { + Message msgSingle = msgPopList[0]; + InternetAddress[] froms = (InternetAddress[]) msgSingle.getFrom(); + + String messageId = message.getHeader("Message-Id")[0]; + String subject = message.getSubject(); + + ArrayNode array = jsonObjectMapper.createArrayNode(); + Multipart multipart = (Multipart) msgSingle.getContent(); + for (int x = 0; x < multipart.getCount(); x++) { + BodyPart bodyPart = multipart.getBodyPart(x); + String disposition = bodyPart.getDisposition(); + + if ((disposition != null) && ((disposition.equals(BodyPart.ATTACHMENT) || + (disposition.equals(BodyPart.INLINE))))) { + DataHandler handler = bodyPart.getDataHandler(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + handler.writeTo(baos); + baos.close(); + array.addPOJO(new FileItem(bodyPart.getFileName(), baos.toByteArray())); + } + } + // chiamata al servizio + StringWriter writer = new StringWriter(); + jsonObjectMapper.writeValue(writer, array); + String jsonBody = writer.toString(); + String database = emailListenerInfo.getDatabase(); + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + String auth = RestUtil.generateAuth(database, database, "POST", + jsonBody, EmsRestConstants.APPLICATION_JSON_CHARSET_UTF_8, + prop.getRootApi() + emailListenerInfo.getServiceRest(), now); + + final Client client = ClientBuilder.newClient(); + WebTarget resource = client.target(prop.getEndPointWS()) + .path(prop.getRootApi() + emailListenerInfo.getServiceRest()); + + Response response = resource.queryParam(CommonConstants.PROFILE_DB, database) + .queryParam("subject", subject).queryParam("messageId", messageId) + .queryParam("from", froms[0].getAddress()).request() + .header("Authorization", database + ":" + auth).header("SignDate", now) + .post(Entity.json(jsonBody)); + + String value = response.readEntity(String.class); + + String emailDbg = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "EMAIL_DBG"); + if(value.charAt(0) == '{') { + ServiceRestResponse respWra = jsonObjectMapper.readValue(value, ServiceRestResponse.class); + if(respWra.getEsito() == EsitoType.KO) { + //send email notifica errore + notifyErrorToEmail(username, froms[0].getAddress(), subject, message.getReceivedDate(), emailDbg, respWra.getErrorMessage()); + } + } else if(value.charAt(0) == '[') { + ServiceRestResponse[] respWra = jsonObjectMapper.readValue(value, ServiceRestResponse[].class); + for (ServiceRestResponse serviceRestResponse : respWra) { + if(serviceRestResponse.getEsito() == EsitoType.KO) { + //send email notifica errore + notifyErrorToEmail(username, froms[0].getAddress(), subject, message.getReceivedDate(), emailDbg, serviceRestResponse.getErrorMessage()); + } + } + } else { + notifyErrorToEmail(username, froms[0].getAddress(), subject, message.getReceivedDate(), emailDbg, value); + } + response.close(); + client.close(); + } + message.setFlag(Flags.Flag.SEEN, true); + } + } + } catch (Exception e) { + logger.error(e); + + } + } + + private void notifyErrorToEmail(String emailListen, String mittente, String messageObj, Date messageDate, + String emailDbg, String errorMessage) throws Exception { + if(!UtilityString.isNullOrEmpty(emailDbg)) { + DataSource ds = new DataSource(); + ds.initialize(emailListenerInfo.getDatabase(), prop.getGlobalConnectionIniPath()); + + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + + String nomeAzienda = ""; + PreparedStatement ps = ds.getConnection().prepareStatement("select nome_ditta from azienda"); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + nomeAzienda = rs.getString("nome_ditta"); + } + rs.close(); + ps.close(); + ds.forceClose(); + + String htmlMailBody = "Gentile Amministratore,
si e' verificato il seguente errore
" + errorMessage + "
del servizio " + emailListenerInfo.getServiceRest() + + "
in ascolto sulla mail " + emailListen + " provocato dal messaggio (mittente "+mittente+") con oggetto " + messageObj + " in data " + sdf.format(messageDate); + + String mailSubject = nomeAzienda + " - ERRORE SU " + InetAddress.getLocalHost().getHostName() + + " Servizio " + emailListenerInfo.getServiceRest() + ";Database " + emailListenerInfo.getDatabase(); + + // AttachmentDTO dto = new AttachmentDTO(); + // dto.setFileByte(files); + + StringWriter writer = new StringWriter(); + //jsonObjectMapper.writeValue(writer, dto); + + String jsonBody = writer.toString(); + + String database = emailListenerInfo.getDatabase(); + + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + String auth = RestUtil.generateAuth(database, database, "POST", jsonBody, + "application/json", prop.getRootApi() + EmsRestConstants.PATH_SEND_MAIL, now); + + final Client client = ClientBuilder.newClient(); + WebTarget resource = client.target(prop.getEndPointWS()).path( + prop.getRootApi() + EmsRestConstants.PATH_SEND_MAIL) + .resolveTemplate("mode", "async"); + resource = resource.queryParam(CommonConstants.PROFILE_DB, database) + .queryParam("from", "").queryParam("to", emailDbg) + .queryParam("subject", mailSubject).queryParam("msgText", htmlMailBody) + .queryParam("isHtml", true); + + resource.request().header("Authorization", database + ":" + auth) + .header("SignDate", now).async() + .post(Entity.json(jsonBody), new InvocationCallback() { + @Override + public void completed(Response response) { + String value = response.readEntity(String.class); + logger.info(response.getStatus() + " - " + value); + response.close(); + client.close(); + } + + @Override + public void failed(Throwable throwable) { + throwable.printStackTrace(); + logger.error(throwable); + client.close(); + } + }); + } + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/directory/ListenerInfo.java b/ems-core/src/main/java/it/integry/ems/directory/ListenerInfo.java new file mode 100644 index 0000000000..026704d675 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/directory/ListenerInfo.java @@ -0,0 +1,53 @@ +package it.integry.ems.directory; + +public class ListenerInfo { + + private String directoryName; + private String fileFilter; + private String serviceRest; + private String setupGestBranch; + private String database; + + public ListenerInfo(String database, String directoryName, String fileFilter, String serviceRest, String setupGestBranch) { + super(); + this.setDatabase(database); + this.directoryName = directoryName; + this.fileFilter = fileFilter; + this.serviceRest = serviceRest; + this.setupGestBranch = setupGestBranch; + } + + public String getDirectoryName() { + return directoryName; + } + public void setDirectoryName(String directoryName) { + this.directoryName = directoryName; + } + public String getFileFilter() { + return fileFilter; + } + public void setFileFilter(String fileFilter) { + this.fileFilter = fileFilter; + } + public String getServiceRest() { + return serviceRest; + } + public void setServiceRest(String serviceRest) { + this.serviceRest = serviceRest; + } + public String getSetupGestBranch() { + return setupGestBranch; + } + public void setSetupGestBranch(String setupGestBranch) { + this.setupGestBranch = setupGestBranch; + } + + public String getDatabase() { + return database; + } + + public void setDatabase(String database) { + this.database = database; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/directory/ReceiptsFileListener.java b/ems-core/src/main/java/it/integry/ems/directory/ReceiptsFileListener.java new file mode 100644 index 0000000000..32b8176f45 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/directory/ReceiptsFileListener.java @@ -0,0 +1,134 @@ +package it.integry.ems.directory; + +import it.integry.ems.datasource.DataSource; +import it.integry.ems.directory.ListenerInfo; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.retail.service.RetailUtilService; +import it.integry.ems.service.SetupGest; +import it.integry.ems.types.TypeDbObject; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; +import it.integry.ems.watching.DirWatcher; + +import java.io.File; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.Date; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class ReceiptsFileListener extends DirWatcher { + + private Logger logger = LogManager.getLogger(); + + private EmsProperties prop; + private SetupGest setupGest; + private RetailUtilService retailUtilService; + + private String serviceRest; + private String database; + private String paramPath; + + public ReceiptsFileListener(ListenerInfo info, EmsProperties prop, SetupGest setupGest, RetailUtilService retailUtilService) { + super(info.getDirectoryName(), info.getFileFilter()); + this.database = info.getDatabase(); + this.serviceRest = info.getServiceRest(); + this.paramPath = info.getSetupGestBranch(); + + this.prop = prop; + this.setupGest = setupGest; + this.retailUtilService = retailUtilService; + } + + @Override + protected void onChange(final File file, String action) throws Exception { + //TO-DO -MINA Cancellare quando si sistemerà l'importazione degli scontrini DIALOGO. + if("add".equals(action)) { + logger.debug(file.getName()); + String flagAttivo = "S"; + String listening = "S"; + DataSource ds = new DataSource(); + ds.initialize(database, prop.getGlobalConnectionIniPath()); + + String[] params = paramPath.split("\\|"); + if(params.length >= 2) { + flagAttivo = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "ATTIVO", ""); + listening = (String) setupGest.getSetup(ds.getConnection(), params[0], params[1], "LISTENING", ""); + ds.forceClose(); + } + + if(!UtilityString.isNullOrEmpty(flagAttivo) && "S".equals(flagAttivo) && + !UtilityString.isNullOrEmpty(listening) && "S".equals(listening)) { + logger.debug("ARRIVATO " + file.getName()); + + String databaseFinded = null; + String databaseProfile = null; + + if (file.getName().startsWith("SELF") ) { + databaseProfile = file.getName().substring(5, file.getName().indexOf("_", 5)); + } else { + databaseProfile = file.getName().substring(0, file.getName().indexOf("_")); + } + + ds = new DataSource(); + ds.initialize(database, prop.getGlobalConnectionIniPath(), "EMS Receipts check"); + + if(UtilityDB.existDatabaseObject(ds.getConnection(), "mvw_punti_vendita_dialogo", TypeDbObject.VIEW)) { + PreparedStatement ps = ds.getConnection(). + prepareStatement("select pv, format, db_name from mvw_punti_vendita_dialogo where pv = " + UtilityDB.valueToString(databaseProfile)); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + databaseProfile = rs.getString("db_name"); + } + rs.close(); + ps.close(); + } + ds.forceClose(); + + if("GFOOD".equals(databaseProfile)) + databaseFinded = "gestfood"; + else + databaseFinded = databaseProfile; + + String sql = "SELECT (COUNT(dbid) - 1) as NumberOfConnections " + + "FROM sys.sysprocesses WHERE dbid > 0 and DB_NAME(dbid) = " + UtilityDB.valueToString(databaseFinded) + + " and program_name <> 'EMS Receipts check'"; + ds = new DataSource(); + ds.initialize(databaseFinded, prop.getGlobalConnectionIniPath()); + + Integer maxConn = 200; + String mConn = (String) setupGest.getImportSetup(ds.getConnection(), "SCONTRINI", "SETUP", "MAX_CONN"); + if(!UtilityString.isNullOrEmpty(mConn)) + maxConn = Integer.valueOf(mConn); + + int numConn = 0; + do { + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if(rs.next()) { + numConn = rs.getInt("NumberOfConnections"); + } + rs.close(); + ps.close(); + + logger.debug("CONNESSIONI ATTIVE ["+databaseFinded+"] " + numConn); + + if(numConn > maxConn) { + logger.debug("SCONTRINI IN ATTESA, num connessioni:" + numConn); + } + } while(numConn > maxConn); + ds.forceClose(); + + logger.debug("[POST WAITING] " + file.getName()); + + //fermo nottuno dell'importazione scontrini + Integer hour = Integer.parseInt(new SimpleDateFormat("HH").format(new Date())); + if(hour > 4 && hour < 23) { + this.retailUtilService.callEMS(file.getAbsolutePath(), database); + } + } + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/exception/CheckConstraintException.java b/ems-core/src/main/java/it/integry/ems/exception/CheckConstraintException.java new file mode 100644 index 0000000000..1bcb865bc8 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/exception/CheckConstraintException.java @@ -0,0 +1,11 @@ +package it.integry.ems.exception; + +public class CheckConstraintException extends Exception { + + private static final long serialVersionUID = 1L; + + public CheckConstraintException(String errorMessage) { + super(errorMessage); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/exception/SyncException.java b/ems-core/src/main/java/it/integry/ems/exception/SyncException.java new file mode 100644 index 0000000000..cff817337a --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/exception/SyncException.java @@ -0,0 +1,27 @@ +package it.integry.ems.exception; + +public class SyncException extends Exception { + + private static final long serialVersionUID = 1L; + + private String profileDb; + + public SyncException(String msg, String profileDb) { + super(msg); + this.profileDb = profileDb; + } + + public SyncException(Exception e, String profileDb) { + super(e); + this.profileDb = profileDb; + } + + public String getProfileDb() { + return profileDb; + } + + public void setProfileDb(String profileDb) { + this.profileDb = profileDb; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/export/dto/DialogoDTO.java b/ems-core/src/main/java/it/integry/ems/export/dto/DialogoDTO.java new file mode 100644 index 0000000000..fd01bfefa5 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/export/dto/DialogoDTO.java @@ -0,0 +1,226 @@ +package it.integry.ems.export.dto; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class DialogoDTO { + @JsonProperty("COD_MDEP") + private String codMdep; + + @JsonProperty("COD_CASSA") + private String codCassa; + + @JsonProperty("DATA_DOC")//, defaultObjectValue="yyyyMMddHHmmss") + private String dataDoc; + + @JsonProperty("ID_SCONTR") + private String idScontr; + + @JsonProperty("OPERATORE") + private String operatore; + + @JsonProperty("CAUSALE") + private String causale; + + @JsonProperty("COD_FIDELITY") + private String codFidelity; + + @JsonProperty("TIPO_RIGA") + private String tipoRiga; + + @JsonProperty("CODICE") + private String codice; + + @JsonProperty("EAN") + private String ean; + + @JsonProperty("DESCRIZIONE") + private String descrizione; + + @JsonProperty("REPARTO") + private String reparto; + + @JsonProperty("QTA_DOC") + private String qtaDoc; + + @JsonProperty("PRZ_UNT_IVA") + private String przUntIva; + + @JsonProperty("VAL_SCONTO") + private String valSco; + + @JsonProperty("PERC_ALIQ") + private String percAliq; + + @JsonProperty("IMPORTO") + private String importo; + + @JsonProperty("COD_PROMO") + private String codPromo; + + @JsonProperty("COD_KIT") + private String codKit; + + @JsonProperty("IDX") + private String idx; + + public String getCodMdep() { + return codMdep; + } + + public void setCodMdep(String codMdep) { + this.codMdep = codMdep; + } + + public String getCodCassa() { + return codCassa; + } + + public void setCodCassa(String codCassa) { + this.codCassa = codCassa; + } + + public String getDataDoc() { + return dataDoc; + } + + public void setDataDoc(String dataDoc) { + this.dataDoc = dataDoc; + } + + public String getIdScontr() { + return idScontr; + } + + public void setIdScontr(String idScontr) { + this.idScontr = idScontr; + } + + public String getOperatore() { + return operatore; + } + + public void setOperatore(String operatore) { + this.operatore = operatore; + } + + public String getCausale() { + return causale; + } + + public void setCausale(String causale) { + this.causale = causale; + } + + public String getCodFidelity() { + return codFidelity; + } + + public void setCodFidelity(String codFidelity) { + this.codFidelity = codFidelity; + } + + public String getTipoRiga() { + return tipoRiga; + } + + public void setTipoRiga(String tipoRiga) { + this.tipoRiga = tipoRiga; + } + + public String getCodice() { + return codice; + } + + public void setCodice(String codice) { + this.codice = codice; + } + + public String getEan() { + return ean; + } + + public void setEan(String ean) { + this.ean = ean; + } + + public String getDescrizione() { + return descrizione; + } + + public void setDescrizione(String descrizione) { + this.descrizione = descrizione; + } + + public String getReparto() { + return reparto; + } + + public void setReparto(String reparto) { + this.reparto = reparto; + } + + public String getQtaDoc() { + return qtaDoc; + } + + public void setQtaDoc(String qtaDoc) { + this.qtaDoc = qtaDoc; + } + + public String getPrzUntIva() { + return przUntIva; + } + + public void setPrzUntIva(String przUntIva) { + this.przUntIva = przUntIva; + } + + public String getValSco() { + return valSco; + } + + public void setValSco(String valSco) { + this.valSco= valSco; + } + + public String getPercAliq() { + return percAliq; + } + + public void setPercAliq(String percAliq) { + this.percAliq = percAliq; + } + + public String getImporto() { + return importo; + } + + public void setImporto(String importo) { + this.importo = importo; + } + + public String getCodPromo() { + return codPromo; + } + + public void setCodPromo(String codPromo) { + this.codPromo = codPromo; + } + + public String getCodKit() { + return codKit; + } + + public void setCodKit(String codKit) { + this.codKit = codKit; + } + + public String getIdx() { + return idx; + } + + public void setIdx(String idx) { + this.idx = idx; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplate.java b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplate.java new file mode 100644 index 0000000000..186bcef10a --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplate.java @@ -0,0 +1,68 @@ +package it.integry.ems.export.dto; + +public class ExportTemplate { + private String nomeUtente; + private String tipoExport; + private String profileDb; + private String query; + private ExportTemplateCsv csv; + private ExportTemplateFileNameConf fileNameConf; + private ExportTemplateModoInvio modoInvio; + + public String getNomeUtente() { + return nomeUtente; + } + + public void setNomeUtente(String nomeUtente) { + this.nomeUtente = nomeUtente; + } + + public String getTipoExport() { + return tipoExport; + } + + public void setTipoExport(String tipoExport) { + this.tipoExport = tipoExport; + } + + public String getProfileDb() { + return profileDb; + } + + public void setProfileDb(String profileDb) { + this.profileDb = profileDb; + } + + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public ExportTemplateCsv getCsv() { + return csv; + } + + public void setCsv(ExportTemplateCsv csv) { + this.csv = csv; + } + + public ExportTemplateFileNameConf getFileNameConf() { + return fileNameConf; + } + + public void setFileNameConf(ExportTemplateFileNameConf fileNameConf) { + this.fileNameConf = fileNameConf; + } + + public ExportTemplateModoInvio getModoInvio() { + return modoInvio; + } + + public void setModoInvio(ExportTemplateModoInvio modoInvio) { + this.modoInvio = modoInvio; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateColumnsMap.java b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateColumnsMap.java new file mode 100644 index 0000000000..d4f83e6b86 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateColumnsMap.java @@ -0,0 +1,31 @@ +package it.integry.ems.export.dto; + +public class ExportTemplateColumnsMap { + private String colName; + private String colType; + private String format; + + public String getColName() { + return colName; + } + + public void setColName(String colName) { + this.colName = colName; + } + + public String getColType() { + return colType; + } + + public void setColType(String colType) { + this.colType = colType; + } + + public String getFormat() { + return format; + } + + public void setFormat(String format) { + this.format = format; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateCsv.java b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateCsv.java new file mode 100644 index 0000000000..1133b44616 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateCsv.java @@ -0,0 +1,52 @@ +package it.integry.ems.export.dto; + +import java.util.List; + +public class ExportTemplateCsv { + private String sepCampi; + private String fineLinea; + private Boolean chkHeader; + private Boolean chkApici; + private List columnsMap; + + public String getSepCampi() { + return sepCampi; + } + + public void setSepCampi(String sepCampi) { + this.sepCampi = sepCampi; + } + + public String getFineLinea() { + return fineLinea; + } + + public void setFineLinea(String fineLinea) { + this.fineLinea = fineLinea; + } + + public Boolean getChkHeader() { + return chkHeader; + } + + public void setChkHeader(Boolean chkHeader) { + this.chkHeader = chkHeader; + } + + public Boolean getChkApici() { + return chkApici; + } + + public void setChkApici(Boolean chkApici) { + this.chkApici = chkApici; + } + + public List getColumnsMap() { + return columnsMap; + } + + public void setColumnsMap(List columnsMap) { + this.columnsMap = columnsMap; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateEmail.java b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateEmail.java new file mode 100644 index 0000000000..2e6f0ad59b --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateEmail.java @@ -0,0 +1,58 @@ +package it.integry.ems.export.dto; + +public class ExportTemplateEmail { + public String getEmailFrom() { + return emailFrom; + } + + public void setEmailFrom(String emailFrom) { + this.emailFrom = emailFrom; + } + + public String getEmailTo() { + return emailTo; + } + + public void setEmailTo(String emailTo) { + this.emailTo = emailTo; + } + + public String getSmtp() { + return smtp; + } + + public void setSmtp(String smtp) { + this.smtp = smtp; + } + + public String getSmtpPort() { + return smtpPort; + } + + public void setSmtpPort(String smtpPort) { + this.smtpPort = smtpPort; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + private String emailFrom; + private String emailTo; + private String smtp; + private String smtpPort; + private String username; + private String password; +} diff --git a/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateFileNameConf.java b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateFileNameConf.java new file mode 100644 index 0000000000..4a415d01db --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateFileNameConf.java @@ -0,0 +1,24 @@ +package it.integry.ems.export.dto; + +import java.util.List; + +public class ExportTemplateFileNameConf { + private String namePattern; + private List variables; + + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(String namePattern) { + this.namePattern = namePattern; + } + + public List getVariables() { + return variables; + } + + public void setVariables(List variables) { + this.variables = variables; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateFtp.java b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateFtp.java new file mode 100644 index 0000000000..4921ad0069 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateFtp.java @@ -0,0 +1,50 @@ +package it.integry.ems.export.dto; + +public class ExportTemplateFtp { + private String server; + private String port; + private String username; + private String password; + + public String getServer() { + return server; + } + + public void setServer(String server) { + this.server = server; + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getDirectory() { + return directory; + } + + public void setDirectory(String directory) { + this.directory = directory; + } + + private String directory; +} diff --git a/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateModoInvio.java b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateModoInvio.java new file mode 100644 index 0000000000..ffed95886f --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateModoInvio.java @@ -0,0 +1,50 @@ +package it.integry.ems.export.dto; + +public class ExportTemplateModoInvio { + + private String exportName; + private String cron; + private Boolean chkDownload; + private ExportTemplateFtp ftp; + private ExportTemplateEmail email; + + public String getExportName() { + return exportName; + } + + public void setExportName(String exportName) { + this.exportName = exportName; + } + + public String getCron() { + return cron; + } + + public void setCron(String cron) { + this.cron = cron; + } + + public Boolean getChkDownload() { + return chkDownload; + } + + public void setChkDownload(Boolean chkDownload) { + this.chkDownload = chkDownload; + } + + public ExportTemplateFtp getFtp() { + return ftp; + } + + public void setFtp(ExportTemplateFtp ftp) { + this.ftp = ftp; + } + + public ExportTemplateEmail getEmail() { + return email; + } + + public void setEmail(ExportTemplateEmail email) { + this.email = email; + } +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateVariable.java b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateVariable.java new file mode 100644 index 0000000000..b31308b71a --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/export/dto/ExportTemplateVariable.java @@ -0,0 +1,22 @@ +package it.integry.ems.export.dto; + +public class ExportTemplateVariable { + private String varName; + private String varQuery; + + public String getVarName() { + return varName; + } + + public void setVarName(String varName) { + this.varName = varName; + } + + public String getVarQuery() { + return varQuery; + } + + public void setVarQuery(String varQuery) { + this.varQuery = varQuery; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/json/CommonObjectMapper.java b/ems-core/src/main/java/it/integry/ems/json/CommonObjectMapper.java new file mode 100644 index 0000000000..fb97841c74 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/json/CommonObjectMapper.java @@ -0,0 +1,64 @@ +package it.integry.ems.json; + +import it.integry.ems.adapter.BigDecimalDeserialize; +import it.integry.ems.adapter.EsitoDeserialize; +import it.integry.ems.adapter.EsitoSerialize; +import it.integry.ems.adapter.IntegerDeserializer; +import it.integry.ems.adapter.JsonDateAdapter; +import it.integry.ems.adapter.JsonDateAdapterSerializer; +import it.integry.ems.adapter.StringUnicodeDeserialize; +import it.integry.ems.base.ComposedEntityBase; +import it.integry.ems.base.EntityBase; +import it.integry.ems.resolver.EntitySubTypeHolder; +import it.integry.ems.response.EsitoType; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.util.Date; +import java.util.Set; + +import org.reflections.Reflections; + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; + +public class CommonObjectMapper extends ObjectMapper { + + private static final long serialVersionUID = 1L; + + protected void setupModules(SimpleModule module) { + registerModule(module); + + SimpleModule moduleSubType = new SimpleModule("test", Version.unknownVersion()); + Reflections reflections = new Reflections("it.integry.ems.entity"); + Set> clssList = reflections.getSubTypesOf(EntityBase.class); + clssList.addAll(reflections.getSubTypesOf(ComposedEntityBase.class)); + for (Class clazz : clssList) { + try { + Field f = clazz.getDeclaredField("ENTITY"); + f.setAccessible(true); + String keyType = (String) f.get(null); + EntitySubTypeHolder.getMapType().put(keyType, clazz); + } catch(Exception e){} + moduleSubType.addAbstractTypeMapping(EntityBase.class, clazz); + registerSubtypes(clazz); + } + registerModule(moduleSubType); + } + + protected SimpleModule setupAdapters() { + SimpleModule module = new SimpleModule(); + module.addSerializer(Date.class, new JsonDateAdapterSerializer()); + module.addDeserializer(Date.class, new JsonDateAdapter()); + + module.addSerializer(EsitoType.class, new EsitoSerialize()); + module.addDeserializer(EsitoType.class, new EsitoDeserialize()); + + module.addDeserializer(BigDecimal.class, new BigDecimalDeserialize()); + module.addDeserializer(Integer.class, new IntegerDeserializer()); + + module.addDeserializer(String.class, new StringUnicodeDeserialize()); + return module; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/json/JSONObjectMapper.java b/ems-core/src/main/java/it/integry/ems/json/JSONObjectMapper.java new file mode 100644 index 0000000000..431158322e --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/json/JSONObjectMapper.java @@ -0,0 +1,61 @@ +package it.integry.ems.json; + +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.ser.BeanPropertyWriter; +import com.fasterxml.jackson.databind.ser.FilterProvider; +import com.fasterxml.jackson.databind.ser.PropertyFilter; +import com.fasterxml.jackson.databind.ser.PropertyWriter; +import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; +import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; + +public class JSONObjectMapper extends CommonObjectMapper { + + private static final long serialVersionUID = 1L; + + public JSONObjectMapper() { + SimpleModule module = setupAdapters(); + + PropertyFilter theFilter = new SimpleBeanPropertyFilter() { + @Override + public void serializeAsField(Object pojo, JsonGenerator jgen, SerializerProvider provider, + PropertyWriter writer) throws Exception { + if (include(writer)) { + try { + writer.serializeAsField(pojo, jgen, provider); + return; + } catch (Exception e) { + } + } else if (!jgen.canOmitFields()) { // since 2.3 + writer.serializeAsOmittedField(pojo, jgen, provider); + } + } + + @Override + protected boolean include(BeanPropertyWriter writer) { + return true; + } + + @Override + protected boolean include(PropertyWriter writer) { + return true; + } + }; + FilterProvider filters = new SimpleFilterProvider().addFilter("jsonEntityFilter", theFilter); + + setFilterProvider(filters); + + setSerializationInclusion(Include.NON_NULL); + + // escape dei caratteri non standard + configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true); + + configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + + setupModules(module); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/json/OrdikidsResponseJSONObjectMapper.java b/ems-core/src/main/java/it/integry/ems/json/OrdikidsResponseJSONObjectMapper.java new file mode 100644 index 0000000000..efee3250e2 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/json/OrdikidsResponseJSONObjectMapper.java @@ -0,0 +1,77 @@ +package it.integry.ems.json; + +import it.integry.ems.annotation.EntityChild; +import it.integry.ems.annotation.PK; +import it.integry.ems.annotation.SqlField; + +import java.lang.reflect.Field; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.ser.BeanPropertyWriter; +import com.fasterxml.jackson.databind.ser.FilterProvider; +import com.fasterxml.jackson.databind.ser.PropertyFilter; +import com.fasterxml.jackson.databind.ser.PropertyWriter; +import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; +import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; + +public class OrdikidsResponseJSONObjectMapper extends CommonObjectMapper { + + private static final long serialVersionUID = 1L; + + public OrdikidsResponseJSONObjectMapper() { + SimpleModule module = setupAdapters(); + + PropertyFilter theFilter = new SimpleBeanPropertyFilter() { + @Override + public void serializeAsField(Object pojo, JsonGenerator jgen, SerializerProvider provider, + PropertyWriter writer) throws Exception { + if (include(writer)) { + try { + if("operation".equals(writer.getName())) { + writer.serializeAsField(pojo, jgen, provider); + return; + } else { + Field f = pojo.getClass().getDeclaredField(writer.getName()); + if (f != null) { + PK pk = f.getAnnotation(PK.class); + SqlField sqlField = f.getAnnotation(SqlField.class); + EntityChild child = f.getAnnotation(EntityChild.class); + if (pk != null || child != null || (sqlField != null && sqlField.isReturned())) + writer.serializeAsField(pojo, jgen, provider); + return; + } + } + } catch (Exception e) { + } + } else if (!jgen.canOmitFields()) { // since 2.3 + writer.serializeAsOmittedField(pojo, jgen, provider); + } + } + + @Override + protected boolean include(BeanPropertyWriter writer) { + return true; + } + + @Override + protected boolean include(PropertyWriter writer) { + return true; + } + }; + FilterProvider filters = new SimpleFilterProvider().addFilter("jsonEntityFilter", theFilter); + + setFilterProvider(filters); + + // escape dei caratteri non standard + configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true); + + configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + + setupModules(module); + + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/json/ResponseJSONObjectMapper.java b/ems-core/src/main/java/it/integry/ems/json/ResponseJSONObjectMapper.java new file mode 100644 index 0000000000..3ac3b03395 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/json/ResponseJSONObjectMapper.java @@ -0,0 +1,159 @@ +package it.integry.ems.json; + +import it.integry.ems.annotation.EntityChild; +import it.integry.ems.annotation.PK; +import it.integry.ems.annotation.SqlField; +import it.integry.ems.base.EntityBase; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityString; + +import java.lang.reflect.Field; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.ser.BeanPropertyWriter; +import com.fasterxml.jackson.databind.ser.FilterProvider; +import com.fasterxml.jackson.databind.ser.PropertyFilter; +import com.fasterxml.jackson.databind.ser.PropertyWriter; +import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; +import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; + +public class ResponseJSONObjectMapper extends CommonObjectMapper { + + private static final long serialVersionUID = 1L; + + + public ResponseJSONObjectMapper() { + SimpleModule module = setupAdapters(); + + PropertyFilter theFilter = new SimpleBeanPropertyFilter() { + @Override + + public void serializeAsField(Object pojo, JsonGenerator jgen, SerializerProvider provider, + PropertyWriter writer) throws Exception { + if (include(writer)) { + try { + if("operation".equals(writer.getName())) { + writer.serializeAsField(pojo, jgen, provider); + return; + } else { + String otherSet = null; + Boolean onlyPkMaster = true; + if(pojo instanceof EntityBase) { + onlyPkMaster = ((EntityBase)pojo).getOnlyPkMaster(); + otherSet = ((EntityBase)pojo).getOtherSet(); + } + Field f = pojo.getClass().getDeclaredField(writer.getName()); + if (f != null) { + PK pk = f.getAnnotation(PK.class); + SqlField sqlField = f.getAnnotation(SqlField.class); + EntityChild child = f.getAnnotation(EntityChild.class); + + if( ((EntityBase)pojo).getOperation() == OperationType.SELECT || + ((EntityBase)pojo).getOperation() == OperationType.SELECT_OBJECT){ + if(f.getGenericType() != null) { + writer.serializeAsField(pojo, jgen, provider); + } + } + else { + + if(onlyPkMaster && child != null) + return; + + if (pk != null || child != null || (sqlField != null && sqlField.isReturned())){ + if(pk != null && !UtilityString.isNullOrEmpty(otherSet)) { + Map map = ((EntityBase)pojo).getEntityHolder().getOtherSetCondition(otherSet); + if(map.get(sqlField.value().toUpperCase())!=null) { + f.setAccessible(true); + f.set(pojo, SqlFieldHolder.applyConvert(map.get(sqlField.value().toUpperCase()), f.getType())); + } + } + writer.serializeAsField(pojo, jgen, provider); + } + + } + return; + } + } + } catch (Exception e) { + } + } else if (!jgen.canOmitFields()) { // since 2.3 + writer.serializeAsOmittedField(pojo, jgen, provider); + } + } + + // 2016-11-30 (FABIO-GIUSEPPE): commentato per gestire il ritorno nell'operation SELECT e SELECT_OBJECT tutti i campi della tabella passata + + /* + public void serializeAsField(Object pojo, JsonGenerator jgen, SerializerProvider provider, + PropertyWriter writer) throws Exception { + if (include(writer)) { + try { + if("operation".equals(writer.getName())) { + writer.serializeAsField(pojo, jgen, provider); + return; + } else { + String otherSet = null; + Boolean onlyPkMaster = true; + if(pojo instanceof EntityBase) { + onlyPkMaster = ((EntityBase)pojo).getOnlyPkMaster(); + otherSet = ((EntityBase)pojo).getOtherSet(); + } + Field f = pojo.getClass().getDeclaredField(writer.getName()); + if (f != null) { + PK pk = f.getAnnotation(PK.class); + SqlField sqlField = f.getAnnotation(SqlField.class); + EntityChild child = f.getAnnotation(EntityChild.class); + if(onlyPkMaster && child != null) + return; + + if (pk != null || child != null || (sqlField != null && sqlField.isReturned())){ + if(pk != null && !UtilityString.isNullOrEmpty(otherSet)) { + Map map = ((EntityBase)pojo).getEntityHolder().getOtherSetCondition(otherSet); + if(map.get(sqlField.value().toUpperCase())!=null) { + f.setAccessible(true); + f.set(pojo, SqlFieldHolder.applyConvert(map.get(sqlField.value().toUpperCase()), f.getType())); + } + } + writer.serializeAsField(pojo, jgen, provider); + } + return; + } + } + } catch (Exception e) { + } + } else if (!jgen.canOmitFields()) { // since 2.3 + writer.serializeAsOmittedField(pojo, jgen, provider); + } + }*/ + + @Override + protected boolean include(BeanPropertyWriter writer) { + return true; + } + + @Override + protected boolean include(PropertyWriter writer) { + return true; + } + }; + FilterProvider filters = new SimpleFilterProvider().addFilter("jsonEntityFilter", theFilter); + + setFilterProvider(filters); + + setSerializationInclusion(Include.NON_NULL); + + // escape dei caratteri non standard + configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true); + + configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + + setupModules(module); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/model/ColumnMetadataDTO.java b/ems-core/src/main/java/it/integry/ems/model/ColumnMetadataDTO.java new file mode 100644 index 0000000000..6121cc934b --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/model/ColumnMetadataDTO.java @@ -0,0 +1,29 @@ +package it.integry.ems.model; + +public class ColumnMetadataDTO { + + private String columnName; + private String columnType; + + public ColumnMetadataDTO(String columnName, String columnType) { + super(); + this.columnName = columnName; + this.columnType = columnType; + } + + public String getColumnName() { + return columnName; + } + + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + public String getColumnType() { + return columnType; + } + + public void setColumnType(String columnType) { + this.columnType = columnType; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/model/EntityModel.java b/ems-core/src/main/java/it/integry/ems/model/EntityModel.java new file mode 100644 index 0000000000..95410d7d78 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/model/EntityModel.java @@ -0,0 +1,44 @@ +package it.integry.ems.model; + +import java.util.ArrayList; +import java.util.List; + +public class EntityModel { + + private String entityType; + + private List fieldModel; + private List childModel; + + public String getEntityType() { + return entityType; + } + public void setEntityType(String entityType) { + this.entityType = entityType; + } + public List getFieldModel() { + return fieldModel; + } + public void setFieldModel(List fieldModel) { + this.fieldModel = fieldModel; + } + + public void addFieldModel(FieldModel field) { + if(fieldModel == null) + fieldModel = new ArrayList(); + fieldModel.add(field); + } + + public List getChildModel() { + return childModel; + } + public void setChildModel(List childModel) { + this.childModel = childModel; + } + + public void addChildModel(EntityModel child) { + if(childModel == null) + childModel = new ArrayList(); + childModel.add(child); + } +} diff --git a/ems-core/src/main/java/it/integry/ems/model/FieldModel.java b/ems-core/src/main/java/it/integry/ems/model/FieldModel.java new file mode 100644 index 0000000000..62a7763f03 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/model/FieldModel.java @@ -0,0 +1,21 @@ +package it.integry.ems.model; + +public class FieldModel { + + public FieldModel(String name) { + super(); + this.name = name; + } + + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + +} diff --git a/ems-core/src/main/java/it/integry/ems/model/PKFieldModel.java b/ems-core/src/main/java/it/integry/ems/model/PKFieldModel.java new file mode 100644 index 0000000000..48a2eda978 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/model/PKFieldModel.java @@ -0,0 +1,20 @@ +package it.integry.ems.model; + +public class PKFieldModel extends FieldModel { + + public PKFieldModel(String name) { + super(name); + this.isPk = true; + } + + private Boolean isPk; + + public Boolean getIsPk() { + return isPk; + } + + public void setIsPk(Boolean isPk) { + this.isPk = isPk; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/properties/EmailProperties.java b/ems-core/src/main/java/it/integry/ems/properties/EmailProperties.java new file mode 100644 index 0000000000..8ae279165f --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/properties/EmailProperties.java @@ -0,0 +1,55 @@ +package it.integry.ems.properties; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Deprecated +@Component("emailProperties") +public class EmailProperties { + + @Value("${sender.user}") + private String senderUser; + +// @Value("${pop3}") + private String pop3; + +// @Value("${upload.bolla.user}") + private String uploadBollaUser; + +// @Value("${upload.bolla.psw}") + private String uploadBollaPsw; + + public String getSenderUser() { + return senderUser; + } + + public void setSenderUser(String senderUser) { + this.senderUser = senderUser; + } + + public String getPop3() { + return pop3; + } + + public void setPop3(String pop3) { + this.pop3 = pop3; + } + + public String getUploadBollaUser() { + return uploadBollaUser; + } + + public void setUploadBollaUser(String uploadBollaUser) { + this.uploadBollaUser = uploadBollaUser; + } + + public String getUploadBollaPsw() { + return uploadBollaPsw; + } + + public void setUploadBollaPsw(String uploadBollaPsw) { + this.uploadBollaPsw = uploadBollaPsw; + } + + +} diff --git a/ems-core/src/main/java/it/integry/ems/properties/EmsProperties.java b/ems-core/src/main/java/it/integry/ems/properties/EmsProperties.java new file mode 100644 index 0000000000..7642d3335e --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/properties/EmsProperties.java @@ -0,0 +1,133 @@ +package it.integry.ems.properties; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.stereotype.Component; + +@Component +@Configuration +@PropertySource("file:///${catalina.home}/conf/integry/ems.properties") +public class EmsProperties { + + @Value("${ini.path}") + protected String iniPath; + + @Value("${root.api}") + protected String rootApi; + + @Value("${global.connection.ini.path}") + protected String globalConnectionIniPath; + + @Value("${endpoint.ws}") + protected String endPointWS; + + @Value("${endpoint.brt.ws}") + protected String endPointBrtWS; + + @Value("${amazon.import.enabled}") + protected String amazonImportEnabled; + + @Value("${sh.import.enabled}") + protected Boolean shImportEnabled; + + @Value("${default.printer.name}") + protected String defaultPrinterName; + +// @Value("${receipts.folder}") +// protected String receiptsFolder; + + @Value("${default.database}") + private String defaultDatabase; + + @Value("${default.nodatabase.login}") + private String defaultNodatabaseLogin; + + public String getIniPath() { + return iniPath; + } + + public void setIniPath(String iniPath) { + this.iniPath = iniPath; + } + + public String getRootApi() { + return rootApi; + } + + public void setRootApi(String rootApi) { + this.rootApi = rootApi; + } + + public String getGlobalConnectionIniPath() { + return globalConnectionIniPath; + } + + public void setGlobalConnectionIniPath(String globalConnectionIniPath) { + this.globalConnectionIniPath = globalConnectionIniPath; + } + + public String getEndPointWS() { + return endPointWS; + } + + public void setEndPointWS(String endPointWS) { + this.endPointWS = endPointWS; + } + + public String getEndPointBrtWS() { + return endPointBrtWS; + } + + public void setEndPointBrtWS(String endPointBrtWS) { + this.endPointBrtWS = endPointBrtWS; + } + + public String getAmazonImportEnabled() { + return amazonImportEnabled; + } + + public void setAmazonImportEnabled(String amazonImportEnabled) { + this.amazonImportEnabled = amazonImportEnabled; + } + + public Boolean getShImportEnabled() { + return shImportEnabled; + } + + public void setShImportEnabled(Boolean shImportEnabled) { + this.shImportEnabled = shImportEnabled; + } + + public String getDefaultPrinterName() { + return defaultPrinterName; + } + + public void setDefaultPrinterName(String defaultPrinterName) { + this.defaultPrinterName = defaultPrinterName; + } + +// public String getReceiptsFolder() { +// return receiptsFolder; +// } +// +// public void setReceiptsFolder(String receiptsFolder) { +// this.receiptsFolder = receiptsFolder; +// } + + public String getDefaultDatabase() { + return defaultDatabase; + } + + public void setDefaultDatabase(String defaultDatabase) { + this.defaultDatabase = defaultDatabase; + } + + public String getDefaultNodatabaseLogin() { + return defaultNodatabaseLogin; + } + + public void setDefaultNodatabaseLogin(String defaultNodatabaseLogin) { + this.defaultNodatabaseLogin = defaultNodatabaseLogin; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/properties/listener/EmsPropertiesFileListener.java b/ems-core/src/main/java/it/integry/ems/properties/listener/EmsPropertiesFileListener.java new file mode 100644 index 0000000000..0993d93d3f --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/properties/listener/EmsPropertiesFileListener.java @@ -0,0 +1,64 @@ +package it.integry.ems.properties.listener; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.watching.DirWatcher; + +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.util.Date; +import java.util.Properties; +import java.util.Timer; +import java.util.TimerTask; + +import javax.annotation.PostConstruct; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +@Service +public class EmsPropertiesFileListener { + + private Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties emsProp; + + @PostConstruct + public void init() { + TimerTask task = new DirWatcher(System.getProperty("catalina.home") + + "/conf/" + CommonConstants.INTEGRY, "properties") { + protected void onChange(File file, String action) throws Exception { + if ("modify".equals(action) && file.isFile()) { + logger.debug(file.getName()); + + logger.info("FILE " + file.getName() + " CHANGED!!!"); + + if (file.getName().contains(EmsRestConstants.FILE_PROPS_NAME)) { + InputStream is = new FileInputStream(file); + Properties props = new Properties(); + props.load(is); + + for (Field f : EmsProperties.class.getDeclaredFields()) { + f.setAccessible(true); + Value v = f.getAnnotation(Value.class); + Object val = SqlFieldHolder.applyConvert(props.getProperty(v.value().substring(2, v.value().length() - 1)), + f.getGenericType()); + f.set(emsProp, val); + } + } + } + } + }; + Timer timer = new Timer(); + timer.schedule(task, new Date(), 1000); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/report/dto/JasperDTO.java b/ems-core/src/main/java/it/integry/ems/report/dto/JasperDTO.java new file mode 100644 index 0000000000..d2f718c178 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/report/dto/JasperDTO.java @@ -0,0 +1,113 @@ +package it.integry.ems.report.dto; + +import it.integry.ems.annotation.SqlField; + +import java.util.List; + +public class JasperDTO { + //alternativa al resto + private String b64XmlReport; + + //campi sciolti + @SqlField("filename") + private String fileName; + + private String formatoExport; + + private String query; + + private String jsonSource; + + @SqlField("where_cond_static") + private String whereCond; + + @SqlField("b64_jrxml") + private String b64ReportJrxml; + + private String callId; + + private List params; + + private List subreports; + + public String getB64XmlReport() { + return b64XmlReport; + } + + public void setB64XmlReport(String b64XmlReport) { + this.b64XmlReport = b64XmlReport; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getFormatoExport() { + return formatoExport; + } + + public void setFormatoExport(String formatoExport) { + this.formatoExport = formatoExport; + } + + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public String getJsonSource() { + return jsonSource; + } + + public void setJsonSource(String jsonSource) { + this.jsonSource = jsonSource; + } + + public String getWhereCond() { + return whereCond; + } + + public void setWhereCond(String whereCond) { + this.whereCond = whereCond; + } + + public String getB64ReportJrxml() { + return b64ReportJrxml; + } + + public void setB64ReportJrxml(String b64ReportJrxml) { + this.b64ReportJrxml = b64ReportJrxml; + } + + public String getCallId() { + return callId; + } + + public void setCallId(String callId) { + this.callId = callId; + } + + public List getParams() { + return params; + } + + public void setParams(List params) { + this.params = params; + } + + public List getSubreports() { + return subreports; + } + + public void setSubreports(List subreports) { + this.subreports = subreports; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/report/dto/PairsDTO.java b/ems-core/src/main/java/it/integry/ems/report/dto/PairsDTO.java new file mode 100644 index 0000000000..e8778c38d6 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/report/dto/PairsDTO.java @@ -0,0 +1,29 @@ +package it.integry.ems.report.dto; + +public class PairsDTO { + + private String name; + private Object value; + + public PairsDTO(String name, Object value) { + super(); + this.name = name; + this.value = value; + } + + public PairsDTO() {} + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public Object getValue() { + return value; + } + public void setValue(Object value) { + this.value = value; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/report/dto/SubreportDTO.java b/ems-core/src/main/java/it/integry/ems/report/dto/SubreportDTO.java new file mode 100644 index 0000000000..b23edb7522 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/report/dto/SubreportDTO.java @@ -0,0 +1,32 @@ +package it.integry.ems.report.dto; + +import it.integry.ems.annotation.SqlField; + +public class SubreportDTO { + + @SqlField("jasper_filename") + private String name; + @SqlField("b64_jasper") + private String b64Report; + @SqlField("b64_jrxml") + private String b64Jrxml; + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getB64Report() { + return b64Report; + } + public void setB64Report(String b64Report) { + this.b64Report = b64Report; + } + public String getB64Jrxml() { + return b64Jrxml; + } + public void setB64Jrxml(String b64Jrxml) { + this.b64Jrxml = b64Jrxml; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/response/AttachmentDTO.java b/ems-core/src/main/java/it/integry/ems/response/AttachmentDTO.java new file mode 100644 index 0000000000..3eaced087e --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/response/AttachmentDTO.java @@ -0,0 +1,25 @@ +package it.integry.ems.response; + +import java.util.List; + +public class AttachmentDTO { + + private List fileList; + private List fileByte; + + public List getFileList() { + return fileList; + } + public void setFileList(List fileList) { + this.fileList = fileList; + } + public List getFileByte() { + return fileByte; + } + public void setFileByte(List fileByte) { + this.fileByte = fileByte; + } + + + +} diff --git a/ems-core/src/main/java/it/integry/ems/response/EsitoType.java b/ems-core/src/main/java/it/integry/ems/response/EsitoType.java new file mode 100644 index 0000000000..1572f7c176 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/response/EsitoType.java @@ -0,0 +1,37 @@ +package it.integry.ems.response; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public enum EsitoType { + + OK(1), + KO(-1); + + @Override + public String toString() { + return value.toString(); + } + + private Integer value; + + @JsonProperty("value") + public Integer value() { + return value; + } + + public EsitoType forValue(String val) { + return EsitoType.valueOf(val); + } + + public static EsitoType forIntValue(Integer val) { + if(val==1) + return EsitoType.OK; + else if(val==-1) + return EsitoType.KO; + return null; + } + + EsitoType(Integer v) { + this.value = v; + } +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/response/FileItem.java b/ems-core/src/main/java/it/integry/ems/response/FileItem.java new file mode 100644 index 0000000000..a05303e775 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/response/FileItem.java @@ -0,0 +1,74 @@ +package it.integry.ems.response; + +import org.apache.commons.codec.binary.Base64; + +public class FileItem { + + private String fileName; + private String fileb64Content; + private String fileContent; + private String ext; + + public FileItem() {}; + + public FileItem(String fileName, String fileContent) { + super(); + this.fileName = fileName; + //Charset.forName("UTF-8") + this.fileb64Content = Base64.encodeBase64String(fileContent.getBytes()); + } + + public FileItem(String fileName, byte[] byteContent) { + super(); + this.fileName = fileName; + this.fileb64Content = Base64.encodeBase64String(byteContent); + } + + public FileItem(String fileName, String fileContent, String ext) { + super(); + this.fileName = fileName; + //Charset.forName("UTF-8") + this.fileb64Content = Base64.encodeBase64String(fileContent.getBytes()); + this.ext = ext; + } + + public FileItem(String fileName, byte[] byteContent, String ext) { + super(); + this.fileName = fileName; + this.fileb64Content = Base64.encodeBase64String(byteContent); + this.ext = ext; + } + + public String getFileName() { + return fileName; + } + + public String getFileb64Content() { + return fileb64Content; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public void setFileb64Content(String fileb64Content) { + this.fileb64Content = fileb64Content; + } + + public String getExt() { + return ext; + } + + public void setExt(String ext) { + this.ext = ext; + } + + public String getFileContent() { + return fileContent; + } + + public void setFileContent(String fileContent) { + this.fileContent = fileContent; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/response/ModelEntityResponse.java b/ems-core/src/main/java/it/integry/ems/response/ModelEntityResponse.java new file mode 100644 index 0000000000..3588dce835 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/response/ModelEntityResponse.java @@ -0,0 +1,26 @@ +package it.integry.ems.response; + +import it.integry.ems.model.EntityModel; + +import java.util.ArrayList; +import java.util.List; + +public class ModelEntityResponse { + + private List fieldModel; + + public List getFieldModel() { + return fieldModel; + } + + public void setFieldModel(List fieldModel) { + this.fieldModel = fieldModel; + } + + public void addModel(EntityModel model) { + if(fieldModel == null) + fieldModel = new ArrayList(); + fieldModel.add(model); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/response/ParamRequestDTO.java b/ems-core/src/main/java/it/integry/ems/response/ParamRequestDTO.java new file mode 100644 index 0000000000..f19a581780 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/response/ParamRequestDTO.java @@ -0,0 +1,53 @@ +package it.integry.ems.response; + +public class ParamRequestDTO { + private String name; + private String className; + private Boolean required; + private String defaultValue; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public ParamRequestDTO(String name, String className, Boolean required, String defaultValue) { + super(); + this.name = name; + this.className = className; + this.required = required; + if(!required){ + if(defaultValue.contains("\n")) + defaultValue = ""; + this.defaultValue = defaultValue; + } + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/response/PkEntity.java b/ems-core/src/main/java/it/integry/ems/response/PkEntity.java new file mode 100644 index 0000000000..d90ffde13b --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/response/PkEntity.java @@ -0,0 +1,38 @@ +package it.integry.ems.response; + +import it.integry.ems.adapter.PkEntitySerializer; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +//@JsonDeserialize(using = PkEntityDeserializer.class) +@JsonSerialize(using = PkEntitySerializer.class) +public class PkEntity { + + public PkEntity() { + } + + private List subEntityPk=new ArrayList(); + private Map map = new HashMap(); + + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + public List getSubEntityPk() { + return subEntityPk; + } + + public void setSubEntityPk(List subEntityPk) { + this.subEntityPk = subEntityPk; + } + +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/response/ServiceRestResponse.java b/ems-core/src/main/java/it/integry/ems/response/ServiceRestResponse.java new file mode 100644 index 0000000000..61ee0be9ac --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/response/ServiceRestResponse.java @@ -0,0 +1,241 @@ +package it.integry.ems.response; + +import it.integry.ems.adapter.EsitoDeserialize; + +import it.integry.ems.adapter.ExecDateSerializer; +import it.integry.ems.adapter.JsonDateAdapter; +import it.integry.ems.adapter.JsonDateAdapterSerializer; +import it.integry.ems.base.EntityBase; +import it.integry.ems.exception.SyncException; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityString; + +import java.util.Date; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.kie.api.runtime.rule.ConsequenceException; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +@JsonInclude(value=JsonInclude.Include.NON_DEFAULT) +public class ServiceRestResponse { + + private final Logger logger = LogManager.getLogger(); + + private EsitoType esito; + @JsonSerialize(using = JsonDateAdapterSerializer.class) + @JsonDeserialize(using = JsonDateAdapter.class) + private Date execDate = new Date(); + private String profileDB; + private OperationType operationType; + private String errorMessage; + private FileItem report; + private FileItem xml; + + private Integer lastTransactionIdImport = null; + + private Boolean syncActive=false; + private EntityBase entity; + + private JsonNode jsonNode; + + private List genericList = null; + private List entityList = null; + + public ServiceRestResponse(){} + + public ServiceRestResponse(EsitoType esito) { + this.esito = esito; + } + + public ServiceRestResponse(EsitoType esito, OperationType opType, String profile) { + this(esito); + this.operationType = opType; + this.profileDB = profile; + } + + public ServiceRestResponse(EsitoType esito, String profile, FileItem report) { + this(esito); + this.profileDB = profile; + this.report = report; + } + + public ServiceRestResponse(EsitoType esito, EntityBase entity, String profile, Boolean syncActive) { + this(esito, entity.getOperation(), profile); + this.entity = entity; + this.syncActive = syncActive; + } + + public ServiceRestResponse(EsitoType esito, List list, String profile, String extraColumn) { + this(esito, profile); + this.entityList = list; + } + + public ServiceRestResponse(EsitoType esito, String profileDb, Exception e) { + this(esito); + + if(esito == EsitoType.KO) + e.printStackTrace(); + + this.profileDB = profileDb; + this.errorMessage = e.getLocalizedMessage(); + if(e instanceof SyncException) { + profileDB = ((SyncException)e).getProfileDb(); + } else if(e instanceof ConsequenceException) { + this.errorMessage = e.getLocalizedMessage().replaceAll("\"", "'"); + } + + if(!UtilityString.isNullOrEmpty(this.profileDB)) + this.errorMessage += " (" + this.profileDB + ")"; + } + + public ServiceRestResponse(EsitoType esito, String errorMessage) { + this(esito); + this.errorMessage = errorMessage; + } + + public ServiceRestResponse(EsitoType esito, String msg, EntityBase entity) { + this(esito, msg); + //if(logger.isDebugEnabled()) + this.entity = entity; + } + + public ServiceRestResponse(EsitoType esito, String msg, List entityList) { + this(esito, msg); + //if(logger.isDebugEnabled()) + this.setEntityList(entityList); + } + + public ServiceRestResponse(EsitoType esito, String profileDB, Exception e, Boolean syncActive) { + this(esito, profileDB, e); + this.syncActive = syncActive; + } + + + public ServiceRestResponse(EsitoType esito, Exception e, String profileDB, EntityBase entity, boolean syncActive) { + this(esito, profileDB, e, syncActive); + + if(logger.isDebugEnabled()) + this.entity = entity; + } + + public ServiceRestResponse(EsitoType esito, List list) { + this(esito); + genericList = list; + } + + public EsitoType getEsito() { + return esito; + } + + @JsonDeserialize(using = EsitoDeserialize.class) + public void setEsito(EsitoType esito) { + this.esito = esito; + } + + public String getProfileDB() { + return profileDB; + } + + public void setProfileDB(String profileDB) { + this.profileDB = profileDB; + } + + public OperationType getOperationType() { + return operationType; + } + + public void setOperationType(OperationType operationType) { + this.operationType = operationType; + } + + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public Boolean getSyncActive() { + return syncActive; + } + + public void setSyncActive(Boolean syncActive) { + this.syncActive = syncActive; + } + + public EntityBase getEntity() { + return entity; + } + + public void setEntity(EntityBase entity) { + this.entity = entity; + } + + @JsonSerialize(using=ExecDateSerializer.class) + public Date getExecDate() { + return execDate; + } + + public void setExecDate(Date execDate) { + this.execDate = execDate; + } + + public FileItem getXml() { + return xml; + } + + public void setXml(FileItem xml) { + this.xml = xml; + } + + public Integer getLastTransactionIdImport() { + return lastTransactionIdImport; + } + + public void setLastTransactionIdImport(Integer lastTransactionIdImport) { + this.lastTransactionIdImport = lastTransactionIdImport; + } + + public List getGenericList() { + return genericList; + } + + public void setGenericList(List genericList) { + this.genericList = genericList; + } + + public List getEntityList() { + return entityList; + } + + public void setEntityList(List entityList) { + this.entityList = entityList; + } + + public FileItem getReport() { + return report; + } + + public void setReport(FileItem report) { + this.report = report; + } + + //@JsonProperty("entity") //In modo da essere serializzato con il nome entity + public void setJsonObject(JsonNode jsonNode){ + this.jsonNode = jsonNode; + } + + //@JsonProperty("entity") //In modo da essere serializzato con il nome entity + public JsonNode getJsonObject(){ + return jsonNode; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/response/StatusResponse.java b/ems-core/src/main/java/it/integry/ems/response/StatusResponse.java new file mode 100644 index 0000000000..bc748f740a --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/response/StatusResponse.java @@ -0,0 +1,80 @@ +package it.integry.ems.response; + +import java.util.List; + +public class StatusResponse { + + private String group; + private Boolean active; + private String method; + private String path; + private String bodyClass; + private Boolean bodyRequired; + private String returnClass; + private List paramList; + + public String getGroup() { + return group; + } + + public void setGroup(String group) { + this.group = group; + } + + public Boolean getActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getBodyClass() { + return bodyClass; + } + + public void setBodyClass(String bodyClass) { + this.bodyClass = bodyClass; + } + + public Boolean getBodyRequired() { + return bodyRequired; + } + + public void setBodyRequired(Boolean bodyRequired) { + this.bodyRequired = bodyRequired; + } + + public String getReturnClass() { + return returnClass; + } + + public void setReturnClass(String returnClass) { + this.returnClass = returnClass; + } + + public List getParamList() { + return paramList; + } + + public void setParamList(List paramList) { + this.paramList = paramList; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/retail/service/RetailUtilService.java b/ems-core/src/main/java/it/integry/ems/retail/service/RetailUtilService.java new file mode 100644 index 0000000000..a433310836 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/retail/service/RetailUtilService.java @@ -0,0 +1,156 @@ +package it.integry.ems.retail.service; + +import java.io.File; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.Date; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.InvocationCallback; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Response; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.service.SetupGest; +import it.integry.ems.types.TypeDbObject; +import it.integry.ems.utility.UtilityDB; +import it.integry.security.utility.RestUtil; + +@Service +public class RetailUtilService { + + @Autowired + private SetupGest setupGest; + + @Autowired + private EmsProperties prop; + + private Logger logger = LogManager.getLogger(); + + public void callEMS(String filePath, String dbStart) throws Exception { + final String fileName; + String database = null; + String section = null; + + if(!filePath.startsWith("\\\\")) { + filePath = filePath.replace("file:///", "").replace("\\", "/"); + fileName = filePath.substring(filePath.lastIndexOf("/") + 1); + } else { + fileName = filePath.substring(filePath.lastIndexOf("\\") + 1); + } + + DataSource ds = new DataSource(); + ds.initialize(dbStart, prop.getGlobalConnectionIniPath()); + + if(UtilityDB.existDatabaseObject(ds.getConnection(), "mvw_punti_vendita_dialogo", TypeDbObject.VIEW)) { + logger.trace("QUERY select pv, format, db_name from mvw_punti_vendita_dialogo where pv = " + UtilityDB.valueToString(fileName.substring(0, fileName.indexOf("_")))); + PreparedStatement ps = ds.getConnection(). + prepareStatement("select pv, format, db_name from mvw_punti_vendita_dialogo where pv = " + UtilityDB.valueToString(fileName.substring(0, fileName.indexOf("_")))); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + database = rs.getString("db_name"); + section = rs.getString("format"); + ds.forceClose(); + } + rs.close(); + ps.close(); + } + + ds.forceClose(); + + //se non ha trovato niente con la vista passa al metodo standard + if(section == null && database == null) { + if(fileName.indexOf("_") > 0) + database = fileName.substring(0, fileName.indexOf("_")); + if("GFOOD".equals(database)) + database = "gestfood"; + ds = new DataSource(); + ds.initialize(database, prop.getGlobalConnectionIniPath()); + + section = getSection(ds.getConnection(), "SCONTRINI"); + } + if(section != null) { + if(isImportEnabled(ds.getConnection(), section)){ + + logger.debug("CHIAMATA ABILITA SU " + database); + + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + String auth = RestUtil.generateAuth(database, database, "POST", + "", "text/plain", prop.getRootApi() + EmsRestConstants.PATH_IMPORT_RECEIPTS, now); + + final Client client = ClientBuilder.newClient(); + final WebTarget resource = client.target(prop.getEndPointWS()) + .path(prop.getRootApi() + EmsRestConstants.PATH_IMPORT_RECEIPTS) + .resolveTemplate("mode", "async"); + resource.queryParam(CommonConstants.PROFILE_DB, database) + .queryParam(EmsRestConstants.TYPE, "SCONTRINI") + .queryParam(EmsRestConstants.FORMAT, section) + .queryParam("filePath", filePath).request() + .header("Authorization", database + ":" +auth) + .header("SignDate", now).async() + .post(Entity.text(""), new InvocationCallback() { + @Override + public void completed(Response response) { + String value = response.readEntity(String.class); + logger.info(response.getStatus() + " - " + value); + response.close(); + client.close(); + } + + @Override + public void failed(Throwable throwable) { + logger.error("Invocation failed per " + fileName); + client.close(); + } + }); + } + } else { + logger.debug("NESSUNA SECTION ABILITATA PER IMPORTARE GLI SCONTRINI SU DB: " + database); + } + } + + private String getSection(Connection conn, String typeImport) throws SQLException { + + String section=null; + + String sql = "SELECT section " + +"FROM ( SELECT DISTINCT section, " + +"(select value from stb_gest_setup setup WHERE stb_gest_setup.gest_name = setup.gest_name and stb_gest_setup.section = setup.section and key_section = 'ATTIVO' ) AS flag_attivo " + //+"(select value from stb_gest_setup setup WHERE stb_gest_setup.gest_name = setup.gest_name and stb_gest_setup.section = setup.section and key_section = 'IMPORT_NEW' ) as import_new " + +"FROM stb_gest_setup WHERE gest_name = 'IMPORT_"+typeImport+"' and section <> 'DIALOGO') tmp " + +"WHERE tmp.flag_attivo = 'S'"; + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + section = rs.getString("section"); + } + ps.close(); + rs.close(); + + return section; + } + + private boolean isImportEnabled(Connection connection, String section) throws Exception { + Object res = setupGest.getImportSetup(connection, "SCONTRINI", section, "ATTIVO"); + connection.close(); + if("S".equals(res)) { + return true; + } else { + return false; + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/AccountingRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/AccountingRules.java new file mode 100644 index 0000000000..5cc26a7b93 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/AccountingRules.java @@ -0,0 +1,458 @@ +package it.integry.ems.rules.completing; + +import java.math.BigDecimal; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Types; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import it.integry.ems.entity.CtbInum; +import it.integry.ems.entity.CtbMovi; +import it.integry.ems.entity.CtbMovr; +import it.integry.ems.entity.CtbMovrCoan; +import it.integry.ems.entity.CtbMovt; +import it.integry.ems.entity.CtbParr; +import it.integry.ems.entity.CtbPart; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +public class AccountingRules extends CommonRules { + + public static Integer completeNumIreg(Connection connection, String codIreg) throws SQLException { + String sql = "SELECT min(num_ireg) as min FROM ctb_inum " + + " WHERE cod_ireg = " + UtilityDB.valueToString(codIreg); + + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return 0; + } else { + return Integer.valueOf(list.get(0).get("min").toString()); + } + } + + public static Integer completeNumCmov(Connection connection, CtbMovt entity) throws SQLException { + Integer annoComp = entity.getAnnoComp(); + Integer numCmov = entity.getNumCmov(); + + if (numCmov == null) { numCmov = 0;} + + CallableStatement cs = connection.prepareCall("{call dbo.NextNumMovCont(?, ?)}"); + + cs.setShort(1, annoComp.shortValue()); + cs.setInt(2, numCmov); + cs.registerOutParameter(2, Types.INTEGER); + cs.execute(); + numCmov = (Integer) cs.getObject(2); + + return numCmov; + } + + public static Integer completeNumProt(Connection connection, CtbMovt entity) throws Exception { + Integer annoComp = entity.getAnnoComp(); + String codIreg = entity.getCodIreg(); + Integer numIreg = entity.getNumIreg(); + Integer numProt = entity.getNumProt(); + + if (numProt == null ) { numProt = 0; } + + String sql = + "SELECT num_prot " + + "FROM ctb_inum " + + "WHERE cod_ireg = " + UtilityDB.valueToString(codIreg) + " AND " + + " num_ireg = " + UtilityDB.valueToString(numIreg) + " AND " + + " anno = " + UtilityDB.valueToString(annoComp); + + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + CallableStatement cs = connection.prepareCall("{call dbo.NextNumProt(?, ?, ?, ?)}"); + + cs.setShort(1, annoComp.shortValue()); + cs.setString(2, codIreg); + cs.setShort(3, numIreg.shortValue()); + cs.setShort(4, numProt.shortValue()); + cs.registerOutParameter(4, Types.INTEGER); + cs.execute(); + numProt = cs.getInt(4); + } else { + numProt = 1; + CtbInum ctbInum = new CtbInum(); + ctbInum.setAnno(annoComp); + ctbInum.setCodIreg(codIreg); + ctbInum.setNumIreg(numIreg); + ctbInum.setNumProt(numProt); + entity.setCtbInum(ctbInum); + } + + return numProt; + } + + public static Integer completeNumDocMov (Connection conn, CtbMovt entity) throws Exception { + Date dataDoc = null; + String codIreg = null, serDoc = null; + Integer numIreg = null, numDoc; + + dataDoc = entity.getDataDoc(); + serDoc = entity.getSerDoc(); + codIreg = entity.getCodIreg(); + numIreg = entity.getNumIreg(); + numDoc = entity.getNumDoc(); + if (numDoc == null){numDoc = 0;} + + return DocumentRules.nextNumDoc(conn, dataDoc, codIreg, serDoc, numIreg, numDoc); + } + + + public static Integer completeAnnoComp(Connection connection, Date dataCmov) throws SQLException { + Integer annoComp; + + SimpleDateFormat formatDate = new SimpleDateFormat("yyyy"); + Date now = new Date(); + + if(dataCmov == null){ + annoComp = Integer.valueOf(formatDate.format(now)); + }else{ + annoComp = Integer.valueOf(formatDate.format(dataCmov)); + } + + return annoComp; + } + + public static String completeCodBiva(Connection connection, String codAnag) throws SQLException { + String sql = + " SELECT ctb_biva.cod_biva " + + " FROM atb_forn LEFT OUTER JOIN ctb_cont ON atb_forn.cod_ccon_costi = ctb_cont.cod_ccon" + + " LEFT OUTER JOIN ctb_biva ON ctb_cont.cod_biva = ctb_biva.cod_biva AND " + + " ctb_biva.imposta_da_costo = 'S'" + + " WHERE atb_forn.cod_anag = " + UtilityDB.valueToString(codAnag); + + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return ""; + } else { + return list.get(0).get("cod_biva").toString(); + } + } + + public static void completeDatiCausale(Connection connection, CtbMovt entity) throws Exception { + String sql = + "SELECT descrizione as descrizione_caus, " + + " cod_ireg, " + + " tipo_anag, " + + " cod_ccau_rc " + + " FROM ctb_caus " + + " WHERE cod_ccau = " + UtilityDB.valueToString(entity.getCodCcau()); + + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + public static void completeDatiContoPDC(Connection connection, CtbMovr entity) throws Exception { + String sql = + "SELECT ctb_cont.perc_ded, ctb_grup.tipo, ctb_grup.sezione " + + "FROM ctb_cont, ctb_grup " + + "WHERE ctb_cont.cod_ccon = " + UtilityDB.valueToString(entity.getCodCcon()) + " AND " + + "ctb_cont.cod_cgrp = ctb_grup.cod_cgrp "; + + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + public static void completeDatiRegIva(Connection connection, CtbMovt entity) throws Exception { + String sql = "SELECT flag_scorporo, tipo_numerazione FROM ctb_ireg " + + "WHERE cod_ireg = " + UtilityDB.valueToString(entity.getCodIreg()); + + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + public static String completeCodJfas(Connection connection, String codCcon) throws SQLException { + String codJfas = null; + String sql = "SELECT cod_jfas FROM ctb_cont" + + " WHERE cod_ccon = " + UtilityDB.valueToString(codCcon); + + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + codJfas = rs.getString(1); + }rs.close();ps.close(); + return codJfas; + } + + + public static BigDecimal completePercDed(Connection connection, String codCcon) throws SQLException { + String sql = "SELECT perc_ded FROM ctb_cont" + + " WHERE cod_ccon = " + UtilityDB.valueToString(codCcon); + + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return BigDecimal.ZERO; + } else { + return new BigDecimal(list.get(0).get("perc_ded").toString()); + } + } + + public static void completeDatiReverseCharge(Connection connection, CtbMovt entity) throws Exception { + Integer numCmov = entity.getNumCmov(); + + String sql = + "SELECT crl_movt_rif_cmov.num_cmov_rif as numCmovRc, " + + "ctb_movt.num_doc as numDocRc, " + + "ctb_movt.num_prot as numProtRc " + + "FROM crl_movt_rif_cmov, " + + "ctb_movt " + + "WHERE crl_movt_rif_cmov.num_cmov = " + UtilityDB.valueToString(numCmov) + " AND " + + "crl_movt_rif_cmov.num_cmov_rif = ctb_movt.num_cmov "; + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + public static void completeImpostaImponibile (Connection connection, CtbMovi ctbMovi) throws SQLException { + String sql = + "SELECT perc_aliq FROM gtb_aliq WHERE cod_aliq = " + UtilityDB.valueToString(ctbMovi.getCodAliq()); + + Integer cifreDecDiviCont = ctbMovi.getCifreDecDiviCont(); + BigDecimal imponibile=BigDecimal.ZERO, imposta=BigDecimal.ZERO, percAliq=BigDecimal.ZERO; + + List> list = execQuery(connection, sql); + if (!list.isEmpty()) { + percAliq = new BigDecimal(list.get(0).get("perc_aliq").toString()); + } + + if (ctbMovi.getFlagScorporo() == null || "N".equals(ctbMovi.getFlagScorporo())){ + imposta = new BigDecimal(imponibile.doubleValue() * percAliq.doubleValue() / 100).setScale(cifreDecDiviCont, BigDecimal.ROUND_HALF_UP); + }else{ + imposta = imponibile.subtract(new BigDecimal(imponibile.doubleValue()/(1+percAliq.doubleValue()/100)).setScale(cifreDecDiviCont, BigDecimal.ROUND_HALF_UP)); + imponibile = imponibile.subtract(imposta); + } + + ctbMovi.setImposta(imposta); + + ctbMovi.setImponibile(imponibile); + } + + + + public static String completeFlagReverseCharge(Connection connection, String codAliq) throws SQLException { + String sql = + "SELECT flag_reverse_charge FROM gtb_aliq WHERE cod_aliq = " + UtilityDB.valueToString(codAliq); + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return ""; + } else { + return list.get(0).get("flag_reverse_charge").toString(); + } + } + + public static void completeDatiAliquota(Connection connection, CtbMovi ctbMovi) throws SQLException { + String sql = + "SELECT perc_aliq, flag_reverse_charge FROM gtb_aliq WHERE cod_aliq = " + UtilityDB.valueToString(ctbMovi.getCodAliq()); + + Integer cifreDecDiviCont = ctbMovi.getCifreDecDiviCont(); + BigDecimal imponibile=BigDecimal.ZERO, imposta=BigDecimal.ZERO, percAliq=BigDecimal.ZERO; + String flagReverseCharge = null; + + List> list = execQuery(connection, sql); + if (!list.isEmpty()) { + percAliq = new BigDecimal(list.get(0).get("perc_aliq").toString()); + flagReverseCharge = list.get(0).get("flag_reverse_charge").toString(); + } + + ctbMovi.setFlagReverseCharge(flagReverseCharge); + + if (ctbMovi.getFlagScorporo() == null || "N".equals(ctbMovi.getFlagScorporo())){ + imposta = new BigDecimal(imponibile.doubleValue() * percAliq.doubleValue() / 100).setScale(cifreDecDiviCont, BigDecimal.ROUND_HALF_UP); + }else{ + imposta = imponibile.subtract(new BigDecimal(imponibile.doubleValue()/(1+percAliq.doubleValue()/100)).setScale(cifreDecDiviCont, BigDecimal.ROUND_HALF_UP)); + imponibile = imponibile.subtract(imposta); + } + + ctbMovi.setImposta(imposta); + + ctbMovi.setImponibile(imponibile); + } + + public static void completePartita(Connection conn, CtbMovt ctbMovt) throws Exception { + Integer annoPart = Integer.parseInt(new SimpleDateFormat("yyyy").format(ctbMovt.getDataDoc())); + CtbPart ctbPart = new CtbPart(); + ctbPart.setOperation(OperationType.INSERT_OR_UPDATE); + ctbPart.setTipoAnag(ctbMovt.getTipoAnag()); + ctbPart.setCodAnag(ctbMovt.getCodAnag()); + ctbPart.setAnnoPart(annoPart); + ctbPart.setDataDoc(ctbMovt.getDataDoc()); + ctbPart.setSerDoc(ctbMovt.getSerDoc()); + ctbPart.setNumDoc(ctbMovt.getNumDoc()); + ctbPart.setCodDiviCont(ctbMovt.getCodDiviCont()); + ctbPart.setCambioDiviCont(ctbMovt.getCambioDiviCont()); + + Integer tipoPartita = 0; + + String sql = + "SELECT CASE WHEN segno_ireg * segno_liquid < 0 THEN 0 ELSE 1 END " + + "FROM ctb_caus, ctb_ireg " + + "WHERE ctb_caus.cod_ccau = " + UtilityDB.valueToString(ctbMovt.getCodCcau()) + " AND " + + " ctb_ireg.cod_ireg = " + UtilityDB.valueToString(ctbMovt.getCodIreg()); + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()){ + tipoPartita = rs.getInt(1); + } + rs.close();ps.close(); + + ctbPart.setTipoPartita(tipoPartita); + + ctbMovt.setCtbPart(ctbPart); + } + + public static void InsertCtbParr(Connection conn, CtbMovr ctbMovr) throws Exception { + CtbParr ctbParr = new CtbParr(); + ctbParr.setOperation(OperationType.INSERT_OR_UPDATE); + ctbParr.setCodCcon(ctbMovr.getCodCcon()); + ctbParr.setTipoAnag(ctbMovr.getTipoAnag()); + ctbParr.setCodAnag(ctbMovr.getCodAnag()); + ctbParr.setAnnoPart(ctbMovr.getAnnoPart()); + ctbParr.setSerDoc(ctbMovr.getSerDoc()); + ctbParr.setNumDoc(ctbMovr.getNumDoc()); + ctbParr.setDataCmov(ctbMovr.getDataCmov()); + ctbParr.setIdRiga(ctbMovr.getIdRiga()); + ctbParr.setImpDare(ctbMovr.getImpDare()); + ctbParr.setImpAvere(ctbMovr.getImpAvere()); + ctbParr.setCodCcau(ctbMovr.getCodCcau()); + ctbParr.setDesAgg(ctbMovr.getDesAgg()); + + List elencoPartite = new ArrayList(); + elencoPartite.add(ctbParr); + ctbMovr.setCtbParr(elencoPartite); + } + + public static void completeCtbMovrCoan(Connection conn, CtbMovr ctbMovr) throws Exception { + CtbMovrCoan ctbMovrCoan = new CtbMovrCoan(); + ctbMovrCoan.setOperation(OperationType.INSERT); + ctbMovrCoan.setCodJcom(ctbMovr.getCodJcom()); + ctbMovrCoan.setCodJfas(ctbMovr.getCodJfas()); + ctbMovrCoan.setIdRiga(ctbMovr.getIdRiga()); + ctbMovrCoan.setImpDare(ctbMovr.getImpDare()); + ctbMovrCoan.setImpAvere(ctbMovr.getImpAvere()); + + List elenco = new ArrayList(); + elenco.add(ctbMovrCoan); + ctbMovr.setCtbMovrCoan(elenco); + } + + public static void completeDatiAnagPartita(Connection conn, CtbPart entity) throws Exception { + String sql, codAnag, tipoAnag; + + codAnag = entity.getCodAnag(); + tipoAnag = entity.getTipoAnag(); + + if ("F".equals(tipoAnag)) { + sql = + "SELECT atb_forn.cod_banc, " + + " atb_forn.cod_abi, " + + " atb_forn.cod_cab, " + + " atb_forn.cod_paga " + + " FROM atb_forn " + + "WHERE atb_forn.cod_anag = " + UtilityDB.valueToString(codAnag); + } else { + sql = + "SELECT vtb_clie.cod_vage, " + + " vtb_clie.cod_banc, " + + " vtb_clie.cod_abi, " + + " vtb_clie.cod_cab, " + + " vtb_clie.cod_paga " + + " FROM vtb_clie " + + "WHERE vtb_clie.cod_anag " + UtilityDB.valueToString(codAnag); + } + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/AgentiRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/AgentiRules.java new file mode 100644 index 0000000000..edeab1e921 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/AgentiRules.java @@ -0,0 +1,126 @@ +package it.integry.ems.rules.completing; + +import java.lang.reflect.Field; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.util.List; +import java.util.Map; + +import it.integry.ems.annotation.SqlField; +import it.integry.ems.base.EntityBase; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +public class AgentiRules extends QueryRules { + public static void completeDatiAgenteFromAnag(Connection conn, EntityBase entity) throws Exception { + String codAnag = (String) DroolsUtil.getEntityFieldValue(entity, "cod_anag"); + String ragSoc = (String) DroolsUtil.getEntityFieldValue(entity, "rag_soc"); + String indirizzo = (String) DroolsUtil.getEntityFieldValue(entity, "indirizzo"); + String cap = (String) DroolsUtil.getEntityFieldValue(entity, "cap"); + String citta = (String) DroolsUtil.getEntityFieldValue(entity, "citta"); + String prov = (String) DroolsUtil.getEntityFieldValue(entity, "prov"); + String nazione = (String) DroolsUtil.getEntityFieldValue(entity, "nazione"); + String telefono = (String) DroolsUtil.getEntityFieldValue(entity, "tel"); + String fax = (String) DroolsUtil.getEntityFieldValue(entity, "fax"); + String partIva = (String) DroolsUtil.getEntityFieldValue(entity, "part_iva"); + String codFisc = (String) DroolsUtil.getEntityFieldValue(entity, "cod_fisc"); + String sql = ""; + + sql = " SELECT rag_soc, " + + " indirizzo, " + + " cap," + + " citta, " + + " prov, " + + " nazione, " + + " telefono, " + + " fax, " + + " part_iva, " + + " cod_fisc " + + " FROM gtb_anag " + + "WHERE cod_anag = " + UtilityDB.valueToString(codAnag); + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (columnName.equals("rag_soc")){ + if (ragSoc != null){valueEntity = null;} + } + if (columnName.equals("indirizzo")){ + if (indirizzo != null){valueEntity = null;} + } + if (columnName.equals("cap")){ + if (cap != null){valueEntity = null;} + } + if (columnName.equals("citta")){ + if (citta != null){valueEntity = null;} + } + if (columnName.equals("prov")){ + if (prov != null){valueEntity = null;} + } + if (columnName.equals("nazione")){ + if (nazione != null){valueEntity = null;} + } + if (columnName.equals("telefono")){ + if (telefono != null){valueEntity = null;} + } + if (columnName.equals("fax")){ + if (fax != null){valueEntity = null;} + } + if (columnName.equals("part_iva")){ + if (partIva != null){valueEntity = null;} + } + if (columnName.equals("cod_fisc")){ + if (codFisc != null){valueEntity = null;} + } + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + public static void completeIdRigaEntity(Connection conn, List rows, EntityBase testata) + throws Exception { + + if (rows.size() > 0) { + String wherePK = testata.getEntityHolder().getWherePK(testata); + Field rigaField = testata.getEntityHolder().getRigaField(rows.get(0).getClass()); + if (rigaField != null ) { + rigaField.setAccessible(true); + if (rigaField != null && rigaField.getAnnotation(SqlField.class) != null) { + + String rigaSqlName = SqlFieldHolder.getSqlValue(rigaField.getAnnotation(SqlField.class).value(), + rigaField); + + Integer startRiga = 0; + String sql = "SELECT IsNull(max(" + rigaSqlName + "), 0) as riga " + " FROM " + + rows.get(0).getTableName() + " WHERE " + wherePK; + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + startRiga = 1; + } else { + startRiga = new Integer(list.get(0).get("riga").toString()) + 1; + } + + for (EntityBase row : rows) { + if (rigaField.get(row) == null) { + rigaField.set(row, startRiga); + startRiga++; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/AnagRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/AnagRules.java new file mode 100644 index 0000000000..2e92adf122 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/AnagRules.java @@ -0,0 +1,72 @@ +package it.integry.ems.rules.completing; + +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class AnagRules extends QueryRules { + + public static String completeCodVdes(Connection connection, String codAnag, String placeholder) throws SQLException { + + String sql = "SELECT MAX(cod_vdes) max " + + " FROM vtb_dest " + + " WHERE cod_vdes like '"+placeholder+"%' AND cod_anag = " + UtilityDB.valueToString(codAnag); + List> list = execQuery(connection, sql); + + String fmt; + if(UtilityString.isNullOrEmpty(placeholder)) + fmt = "%05d"; + else + fmt = "%04d"; + if(list.size() == 0) { + return placeholder + String.format(fmt, 1); + } else { + String maxVal = list.get(0).get("max"); + if(maxVal==null) + maxVal = placeholder + String.format(fmt, 0); + + Integer val = null; + Pattern p = Pattern.compile("[0-9]+"); + Matcher m = p.matcher(maxVal); + while (m.find()) { + val = Integer.parseInt(m.group()) + 1; + } + if(val == null) + val = Integer.valueOf(maxVal.substring(1)) + 1; + return placeholder + String.format(fmt, val); + } + } + + public static String completeCodAnag(Connection connection, String placeholder) throws SQLException { + + String sql = "SELECT MAX(cod_anag) max " + + " FROM gtb_anag " + + " WHERE cod_anag like '"+placeholder+"%'"; + List> list = execQuery(connection, sql); + + String fmt = "%04d"; + if(list.size() == 0) { + return placeholder + String.format(fmt, 1); + } else { + String maxVal = list.get(0).get("max"); + if(maxVal==null) + maxVal = placeholder + String.format(fmt, 0); + + Integer val = null; + Pattern p = Pattern.compile("[0-9]+"); + Matcher m = p.matcher(maxVal); + while (m.find()) { + val = Integer.parseInt(m.group()) + 1; + } + if(val == null) + val = Integer.valueOf(maxVal.substring(1)) + 1; + return placeholder + String.format(fmt, val); + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/CommesseRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/CommesseRules.java new file mode 100644 index 0000000000..0a0fe06c8c --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/CommesseRules.java @@ -0,0 +1,50 @@ +package it.integry.ems.rules.completing; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.Map; + +import it.integry.ems.utility.UtilityDB; + + +public class CommesseRules extends QueryRules { + + public static String completeResponsabileCom (Connection conn, String codJflav) throws SQLException { + String sql; + sql = "SELECT CASE WHEN cognome IS NULL THEN nome ELSE cognome + ' ' + nome END as name " + + " FROM jtb_flav " + + " WHERE cod_jflav = " + UtilityDB.valueToString(codJflav); + + Map map = execSingleQuery(conn, sql); + + if (map.get("name") == null) + return null; + else + return map.get("name").toString(); + + } + + public static String completeTipoAnag(Connection conn, String codAnag) throws SQLException{ + String sql; + + sql= "SELECT tipologia FROM pvw_clienti_prospect WHERE cod_ppro = " + UtilityDB.valueToString(codAnag) ; + + Map map = execSingleQuery(conn, sql); + if (map.get("tipologia") == null) + return null; + else + return map.get("tipologia").toString(); + + } + /* + public static BigDecimal completeImportoBdg(Connection conn, BigDecimal importo, BigDecimal percBdg) throws Exception{ + + return percBdg.divide(importo).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP) ; + } + + public static BigDecimal completePercBdg(Connection conn, BigDecimal importo, BigDecimal importoBdg) throws Exception{ + + return importo.multiply(importoBdg).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP) ; + } + */ +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/CommonRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/CommonRules.java new file mode 100644 index 0000000000..c4a19d0676 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/CommonRules.java @@ -0,0 +1,911 @@ +package it.integry.ems.rules.completing; + +import java.lang.reflect.Field; +import java.lang.reflect.ParameterizedType; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; + +import org.springframework.expression.Expression; +import org.springframework.expression.ExpressionParser; +import org.springframework.expression.spel.standard.SpelExpressionParser; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.annotation.SqlField; +import it.integry.ems.base.EntityBase; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.entity.CtbMovr; +import it.integry.ems.entity.DtbDocr; +import it.integry.ems.entity.DtbOrdr; +import it.integry.ems.entity.JtbCicl; +import it.integry.ems.entity.JtbSchedaCqr; +import it.integry.ems.entity.MtbAart; +import it.integry.ems.entity.MtbAartEqui; +import it.integry.ems.entity.MtbAartMarchio; +import it.integry.ems.entity.MtbInvenr; +import it.integry.ems.entity.MtbLisa; +import it.integry.ems.entity.MtbLisvData; +import it.integry.ems.entity.StbActivity; +import it.integry.ems.entity.StbActivityFile; +import it.integry.ems.entity.WdtbDocr; +import it.integry.ems.entity.WdtbOrdr; +import it.integry.ems.entity.WdtbOrdt; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.rulescompleting.DroolsDataCompleting; +import it.integry.ems.service.SetupGest; +import it.integry.ems.types.ApplicationName; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.IntegerUtility; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +public class CommonRules extends QueryRules { + + protected static SetupGest setupGest = new SetupGest(); + + public static Boolean chk(Object arg0, String comparator, Object arg1) { + return validateCheck(arg0, arg1, comparator); + } + + public static BigDecimal scorporoIva(Connection conn, BigDecimal importo, String codAliq) throws SQLException { + BigDecimal percAliq = BigDecimal.ZERO; + String sql = "SELECT perc_aliq FROM gtb_aliq WHERE cod_aliq = " + UtilityDB.valueToString(codAliq); + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + percAliq = rs.getBigDecimal(1); + }rs.close(); ps.close(); + + return scorporoIva(importo, percAliq); + } + + public static BigDecimal scorporoIva(BigDecimal importo, BigDecimal percAliq) { + percAliq = percAliq.divide(new BigDecimal("100")); + percAliq = BigDecimal.ONE.add(percAliq); + importo = importo.divide(percAliq, EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + importo = IntegerUtility.round(importo, 5); + return importo; + } + + private static Boolean validateCheck(Object arg0, Object arg1, String comparator) { + + if (arg0 == null || arg0.equals(EmsRestConstants.NULL)) + arg0 = "null"; + if (arg1 == null || arg0.equals(EmsRestConstants.NULL)) + arg1 = "null"; + + if (arg0 instanceof String) + arg0 = UtilityDB.valueToString(arg0.toString()); + if (arg1 instanceof String) + arg1 = UtilityDB.valueToString(arg1.toString()); + + ExpressionParser parser = new SpelExpressionParser(); + Expression exp = parser.parseExpression(arg0.toString() + comparator + arg1.toString()); + return (Boolean) exp.getValue(); + } + + public static String completeFlagKitArt(Connection conn, String codMart) throws SQLException{ + String flagKit = "N"; + + String sql = "SELECT flag_kit FROM mvw_kit WHERE cod_mart = " + UtilityDB.valueToString(codMart); + List> list = execQuery(conn, sql); + if (!list.isEmpty()) { + flagKit = list.get(0).get("flag_kit").toString(); + } + + return flagKit; + } + + public static Integer completeIdRilPrz(Connection conn, Date dataRil) throws SQLException{ + Integer idRil= 0; + GregorianCalendar calendario = new GregorianCalendar(); + calendario.setTime(dataRil); + Integer anno = new Integer(calendario.get(Calendar.YEAR)); + String sql = "SELECT isNull(max(id_ril), 0) as id_ril from vtb_ril_przt where year(vtb_ril_przt.data_ril) = " +anno; + List> list = execQuery(conn, sql); + if (!list.isEmpty()) { + idRil = new Integer(list.get(0).get("id_ril").toString()); + } + if(idRil == 0){ + idRil = anno* 10000 + 1; + }else{ + Integer idRilTemp = new Integer(UtilityString.mid(idRil.toString(), 5)); + idRilTemp += 1; + idRil = new Integer(anno.toString() +UtilityString.leftPad(idRilTemp.toString(), 4, '0')); + } + return idRil; + } + + public static String getFullName(Connection connection, String username) throws Exception { + String sql = "SELECT full_name FROM stb_user WHERE user_name = '" + username + "'"; + String value = null; + + PreparedStatement info = connection.prepareStatement(sql); + ResultSet res = info.executeQuery(); + if (res.next()) { + value = res.getString("full_name"); + }res.close(); info.close(); + + + if(UtilityString.isNullOrEmpty(value)){ + //VERIFICA UTENTI DEL WEB + sql = "SELECT full_name FROM wtb_users WHERE user_name = '" + username + "'"; + info = connection.prepareStatement(sql); + res = info.executeQuery(); + if (res.next()) { + value = res.getString("full_name"); + }res.close(); info.close(); + } + + if(UtilityString.isNullOrEmpty(value)) + throw new Exception("Nome completo non configurato per l'utente " + username + "."); + + return value; + } + + public static List calcPercAliq(Connection conn, List list) throws Exception { + for (WdtbOrdr row : list) { + if (row.getPercAliq() == null && row.getCodAliq() != null) + row.setPercAliq(CommonRules.completePercAliq(conn, row.getCodAliq())); + } + return list; + } + + public static String getGestione(Connection conn, String codDtip) throws SQLException{ + String gestione = ""; + String sql = "SELECT gestione FROM dtb_tipi WHERE cod_dtip = " + UtilityDB.valueToString(codDtip); + List> list = execQuery(conn, sql); + if (!list.isEmpty()) { + gestione = list.get(0).get("gestione").toString(); + } + + return gestione; + } + + + @SuppressWarnings("unchecked") + public static List reloadRow(Connection conn, EntityBase testata) throws Exception { + List finalList = new ArrayList(); + List fields = testata.getEntityHolder().getEntityChildField(testata.getClass()); + + for (Field field : fields) { + finalList = new ArrayList(); + field.setAccessible(true); + Object object = field.get(testata); + if (object != null && field.getType().isAssignableFrom(List.class)) { + ArrayList rows = (ArrayList)object; + ParameterizedType pType = (ParameterizedType) field.getGenericType(); + Class rowClass = (Class) pType.getActualTypeArguments()[0]; + if (!rows.isEmpty()) { + completeIdRigaEntity(conn, rows, testata); + + if (rowClass.isAssignableFrom(DtbOrdr.class)) { + completePosRigaEntity(conn, rows); + } + } + List list = UtilityDB.reloadOnlyDbRow(conn, testata, rows, field); + + if (list != null && !list.isEmpty()) { + for (EntityBase entityDB : list) { + entityDB.setLoadedFromDb(true); + DroolsDataCompleting dataCompleting = testata.getCompletingManager(); + entityDB.setImportFromParent(testata); + entityDB.setCompletingManager(dataCompleting); + + // completing dell'entity presa da database. + dataCompleting.invokeCheckRules(entityDB, conn, testata.getUsername()); + dataCompleting.complete(entityDB, conn, testata.getUsername()); + } + finalList.addAll(list); + finalList.addAll(rows); + } else { + finalList.addAll(rows); + } + + field.set(testata, finalList); + } + } + //FIX ENTITY HOLDER SULLE RIGHE + for (EntityBase entity : finalList) { + if(entity.getEntityHolder() == null) + entity.setEntityHolder(testata.getEntityHolder()); + } + return finalList; + } + + @Deprecated + public static List reloadRow(Connection conn, WdtbOrdt entity) throws Exception { + + completeIdRigaEntity(conn, entity.getWdtbOrdr(), entity); + + List list = entity.selectEntityRowList(conn, entity, WdtbOrdr.class, WdtbOrdr.ENTITY, ""); + Set set = new TreeSet(new Comparator() { + public int compare(EntityBase w1, EntityBase entityCmp) { + try { + List pks = (List) w1.getEntityHolder().getPkField(w1.getClass()); + for (String pk : pks) { + Field field = w1.getEntityHolder().getFieldBySql(w1.getClass().getSimpleName(), pk); + field.setAccessible(true); + if (!field.get(w1).equals(field.get(entityCmp))) + return -1; + } + return 0; + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + + } + }); + List finalList = null; + + if (list != null && !list.isEmpty()) { + for (EntityBase entityDB : list) { + for (EntityBase entityManaged : entity.getWdtbOrdr()) { + // necessario + entityManaged.setEntityHolder(entity.getEntityHolder()); + entityDB.setEntityHolder(entity.getEntityHolder()); + + if (entityManaged.equalsDB(entityDB)) { + set.remove(entityDB); + set.add(entityManaged); + } else { + set.add(entityManaged); + set.add(entityDB); + } + } + } + finalList = new ArrayList(set); + } else { + finalList = new ArrayList(entity.getWdtbOrdr()); + } + + return finalList; + } +/* + @Deprecated + public static void completeIdRiga(Connection conn, List rows, MtbColt testata) throws Exception { + + String wherePK = testata.getEntityHolder().getWherePK(testata); + Integer startRiga = 0; + String sql = "SELECT IsNull(max(riga), 0) as riga " + " FROM " + rows.get(0).getTableName() + " WHERE " + + wherePK; + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + startRiga = 1; + } else { + startRiga = new Integer(list.get(0).get("riga").toString()) + 1; + } + + for (MtbColr row : rows) { + row.setRiga(startRiga); + startRiga++; + } + } + */ + + public static void completeIdRigaEntity(Connection conn, List rows, EntityBase testata) + throws Exception { + + if (rows.size() > 0) { + String wherePK = testata.getEntityHolder().getWherePK(testata); + Field rigaField = testata.getEntityHolder().getRigaField(rows.get(0).getClass()); + if (rigaField != null ) { + rigaField.setAccessible(true); + if (rigaField != null && rigaField.getAnnotation(SqlField.class) != null) { + + String rigaSqlName = SqlFieldHolder.getSqlValue(rigaField.getAnnotation(SqlField.class).value(), + rigaField); + + Integer startRiga = 0; + String sql = "SELECT IsNull(max(" + rigaSqlName + "), 0) as riga " + " FROM " + + rows.get(0).getTableName() + " WHERE " + wherePK; + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + startRiga = 1; + } else { + startRiga = new Integer(list.get(0).get("riga").toString()) + 1; + } + + for (EntityBase row : rows) { + if (rigaField.get(row) == null) { + rigaField.set(row, startRiga); + startRiga++; + } + } + } + } + } + } + + public static void completePosRigaEntity(Connection conn, List rows) throws Exception { + Integer startRiga = 0; + if (rows.size() > 0) { + Class rowClass = rows.get(0).getClass(); + Field rigaField = rowClass.getDeclaredField("posRiga"); + rigaField.setAccessible(true); + /* + * Field rigaField = ReflectionUtils.findField(rows.getClass(), + * "posRiga"); rigaField.setAccessible(true); + */ + for (EntityBase row : rows) { + startRiga++; + rigaField.set(row, startRiga); + } + } + } + + public static void completeIdRigaCtbMovr(Connection conn, List rows) throws Exception { + Integer startRiga = 1; + if (rows.size() > 0) { + Class rowClass = rows.get(0).getClass(); + Field rigaField = rowClass.getDeclaredField("idRiga"); + rigaField.setAccessible(true); + + for (EntityBase row : rows) { + if (rigaField.get(row) == null) { + rigaField.set(row, startRiga); + startRiga++; + } + } + } + } + + public static void completeIdRigaCtbMovrCoan(Connection conn, List rows, EntityBase testata) throws Exception { + + if (rows.size() > 0) { + String wherePK = "ctb_movr_coan.num_cmov = " + UtilityDB.valueToString(((CtbMovr) testata).getNumCmov()) + " AND " + +"ctb_movr_coan.id_riga = " + UtilityDB.valueToString(((CtbMovr) testata).getIdRiga()); + Field rigaField = testata.getEntityHolder().getRigaField(rows.get(0).getClass()); + if (rigaField != null ) { + rigaField.setAccessible(true); + if (rigaField != null && rigaField.getAnnotation(SqlField.class) != null) { + + String rigaSqlName = SqlFieldHolder.getSqlValue(rigaField.getAnnotation(SqlField.class).value(), + rigaField); + + Integer startRiga = 0; + String sql = "SELECT IsNull(max(" + rigaSqlName + "), 0) as riga " + " FROM " + + rows.get(0).getTableName() + " WHERE " + wherePK; + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + startRiga = 1; + } else { + startRiga = new Integer(list.get(0).get("riga").toString()) + 1; + } + + for (EntityBase row : rows) { + if (rigaField.get(row) == null) { + rigaField.set(row, startRiga); + startRiga++; + } + } + } + } + } + } + + public static void completeIdRigaJtbSchedaCq(Connection conn, String codCq, List rows) + throws Exception { + + Integer startRiga = 0; + String sql = "SELECT IsNull(max(id_riga), 0) as riga " + " FROM jtb_scheda_cqr " + " WHERE cod_cq = " + + UtilityDB.valueToString(codCq); + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + startRiga = 1; + } else { + startRiga = new Integer(list.get(0).get("riga").toString()) + 1; + } + + for (JtbSchedaCqr row : rows) { + if (row.getOperation() == OperationType.INSERT) { + row.setIdRiga(startRiga); + startRiga++; + } + } + } + + public static BigDecimal completeRapConv(Connection conn, EntityBase entity) throws Exception { + String fieldUntMis = null; + + String codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + if (entity instanceof MtbLisa) { + fieldUntMis = "unt_mis_acq"; + } else if (entity instanceof DtbOrdr || entity instanceof WdtbOrdr) { + fieldUntMis = "unt_ord"; + } else if (entity instanceof DtbDocr || entity instanceof WdtbDocr) { + fieldUntMis = "unt_doc"; + } + String untMis = (String) DroolsUtil.getEntityFieldValue(entity, fieldUntMis); + + BigDecimal value = BigDecimal.ONE; + + String query = "SELECT CASE " + UtilityDB.valueToString(untMis) + " WHEN unt_mis THEN 1 " + + " WHEN unt_mis2 THEN rap_conv2 " + " WHEN unt_mis3 THEN rap_conv3 " + " ELSE 1 END as rap_conv " + + " FROM mtb_aart WHERE cod_mart = " + UtilityDB.valueToString(codMart); + PreparedStatement info = conn.prepareStatement(query); + ResultSet res = info.executeQuery(); + if (res.next()) { + value = res.getBigDecimal("rap_conv"); + } + res.close(); + info.close(); + + return value; + } + + public static BigDecimal completePrzVend(Connection conn, EntityBase entity) throws SQLException { + String codVlis = null, codMart = null; + BigDecimal przBase = BigDecimal.ZERO, ricarico = BigDecimal.ZERO, maggPrzVend = BigDecimal.ZERO; + BigDecimal przVend = BigDecimal.ZERO; + + if (entity instanceof MtbLisvData) { + MtbLisvData mtbLisvData = (MtbLisvData) entity; + codVlis = mtbLisvData.getCodVlis(); + codMart = mtbLisvData.getCodMart(); + przBase = mtbLisvData.getPrzBase(); + ricarico = mtbLisvData.getRicarica(); + maggPrzVend = mtbLisvData.getMaggPrzVend(); + } + + String query = "SELECT dbo.f_calcPrzVend(" + UtilityDB.valueToString(codVlis) + ", " + + UtilityDB.valueToString(codMart) + ", " + UtilityDB.valueToString(przBase) + ", " + + UtilityDB.valueToString(ricarico) + ", " + "mtb_aart.perc_sfrido, " + + UtilityDB.valueToString(maggPrzVend) + ") " + "FROM mtb_aart " + "WHERE mtb_aart.cod_mart = " + + UtilityDB.valueToString(codMart); + PreparedStatement info = conn.prepareStatement(query); + ResultSet res = info.executeQuery(); + if (res.next()) { + przVend = res.getBigDecimal(1); + } + res.close(); + info.close(); + + return przVend; + } + + public static BigDecimal completePrzVendIva(Connection conn, EntityBase entity) throws SQLException { + String codMart = null, codVlis = null; + BigDecimal przVend = BigDecimal.ZERO; + BigDecimal przVendIVA = BigDecimal.ZERO; + + if (entity instanceof MtbLisvData) { + MtbLisvData mtbLisvData = (MtbLisvData) entity; + codMart = mtbLisvData.getCodMart(); + codVlis = mtbLisvData.getCodVlis(); + przVend = mtbLisvData.getPrzVend(); + } + + String query = "SELECT dbo.f_calcPrzVendIva(" + UtilityDB.valueToString(codVlis) + ", " + + UtilityDB.valueToString(codMart) + ", " + UtilityDB.valueToString(przVend) + ") "; + PreparedStatement info = conn.prepareStatement(query); + ResultSet res = info.executeQuery(); + if (res.next()) { + przVendIVA = res.getBigDecimal(1); + } + res.close(); + info.close(); + + return przVendIVA; + } + + @Deprecated + public static Double getCostoUltimo(Connection conn, String applicationName, String codMart, String codMdep, + Date dataValidita) throws SQLException { + String sql = ""; + Double costoUltimo = 0d; + + /* + * if(StringUtility.isNotNull(codMdep) && "S".equals(flagCostoDepo)){ + * + * } + */ + + if (ApplicationName.WINGEST.toString().equals(applicationName)) { + sql = "SELECT cod_comp, qta_std FROM mtb_comp WHERE cod_mart = '" + codMart + "'"; + List> list = execQuery(conn, sql); + for (Map map : list) { + + sql = "SELECT flag_caprz_acq FROM mtb_aart WHERE cod_mart = '" + codMart + "'"; + Map flagCalcMap = execSingleQuery(conn, sql); + String flagCalcPrzAcq = flagCalcMap.get("flag_caprz_acq").toString(); + + if ("K".equals(flagCalcPrzAcq)) { + List> ultimoAcqList = getUltimoAcquisto(conn, codMart, dataValidita, codMdep); + + String codDivi = ""; + if (ultimoAcqList.size() == 1) { + codDivi = ultimoAcqList.get(0).get("cod_divi"); + } + // ULTIMO COSTO DEL COMPOSTO VIENE DA ULTIMO DOC. DI + // ACQUISTO DEL COMPOSTO + // VA CONVERTITO IN EURO + Double cambioEuro = 0d; + sql = "SELECT gtb_divi.cambio_euro FROM gtb_divi WHERE gtb_divi.cod_divi = '" + codDivi + "'"; + + Map cambioEuroMap = execSingleQuery(conn, sql); + cambioEuro = Double.valueOf(cambioEuroMap.get("cambio_euro").toString()); + if (cambioEuro != 0) { + // SE IL CAMBIO HA UN VALORE ERRATO, NON FACCIO LA + // CONVERSIONE + costoUltimo = costoUltimo / cambioEuro; + } + } + if ("C".equals(flagCalcPrzAcq) || costoUltimo == 0) { + // ULTIMO COSTO = SOMMA DEI COSTI ULTIMI DEI COMPONENTI + // String codComp = map.get("cod_comp"); + Double qtaStdComp = Double.valueOf(map.get("qta_std")); + Double costoComp = 0d;// getCostoUltimo(profileDB, codComp, + // dataValidita, codMdep); + costoUltimo += costoComp * qtaStdComp; + } + } + + } else { + sql = "SELECT val_ult_car FROM mtb_aart WHERE cod_mart = '" + codMart + "'"; + Map ultValCarMap = execSingleQuery(conn, sql); + return Double.valueOf(ultValCarMap.get("val_ult_car").toString()); + } + + return null; + + } + @Deprecated + public static List> getUltimoAcquisto(Connection conn, + String codMart, Date dataMax, String codMdep) throws SQLException { + + String sql; + + if ("".equals(codMdep)) { + sql = "SELECT top 1 dtb_doct.data_doc, dtb_doct.cod_anag, " + + " gtb_anag.rag_soc, dtb_doct.cod_divi, " + + " ((dtb_docr.val_unt / dtb_docr.rap_conv) * (1 - sconto1/100) * (1 - sconto2/100) * (1 - sconto3/100) * (1 - sconto4/100) * (1 - sconto5/100) * (1 - sconto6/100) * (1 - sconto7/100) * (1 - sconto8/100))" + + " FROM dtb_doct, dtb_docr, dtb_tipi, gtb_anag " + + " WHERE dtb_doct.cod_anag = dtb_docr.cod_anag and " + + " dtb_doct.cod_dtip = dtb_docr.cod_dtip and " + + " dtb_doct.data_doc = dtb_docr.data_doc and " + " dtb_doct.ser_doc = dtb_docr.ser_doc and " + + " dtb_doct.num_doc = dtb_docr.num_doc and " + + " dtb_doct.cod_anag = gtb_anag.cod_anag and " + + " dtb_doct.cod_dtip = dtb_tipi.cod_dtip and " + " dtb_tipi.segno_val_car = 1 and " + + " dtb_tipi.gestione <> 'V' and " + " dtb_tipi.flag_costo = 'S' and " + + " dtb_doct.data_doc <= '" + new SimpleDateFormat("yyyy-MM-dd").format(dataMax) + "'" + + " and " + " dtb_docr.cod_mart = '" + codMart + "' and " + + " dtb_docr.importo_riga > 0 " + " ORDER BY dtb_doct.data_doc DESC "; + } else { + sql = "SELECT top 1 dtb_doct.data_doc, " + " dtb_doct.cod_anag, " + " gtb_anag.rag_soc, " + + " dtb_doct.cod_divi, " + + " ((dtb_docr.val_unt / dtb_docr.rap_conv) * (1 - sconto1/100) * (1 - sconto2/100) * (1 - sconto3/100) * (1 - sconto4/100) * (1 - sconto5/100) * (1 - sconto6/100) * (1 - sconto7/100) * (1 - sconto8/100))" + + " FROM dtb_doct, dtb_docr, dtb_tipi, gtb_anag " + + " WHERE dtb_doct.cod_anag = dtb_docr.cod_anag and " + + " dtb_doct.cod_dtip = dtb_docr.cod_dtip and " + + " dtb_doct.data_doc = dtb_docr.data_doc and " + + " dtb_doct.ser_doc = dtb_docr.ser_doc and " + + " dtb_doct.num_doc = dtb_docr.num_doc and " + + " dtb_doct.cod_anag = gtb_anag.cod_anag and " + + " dtb_doct.cod_dtip = dtb_tipi.cod_dtip and " + " dtb_tipi.segno_val_car = 1 and " + + " dtb_tipi.gestione <> 'V' and " + " dtb_tipi.flag_costo = 'S' and " + + " dtb_doct.data_doc <= '" + new SimpleDateFormat("yyyy-MM-dd").format(dataMax) + "'" + + " and " + " dtb_docr.cod_mart = '" + codMart + "' and " + + " dtb_docr.importo_riga > 0 and " + " dtb_doct.cod_mdep = '" + codMdep + "' " + + " ORDER BY dtb_doct.data_doc DESC "; + } + return execQuery(conn, sql); + } + + public static List> completeCodBarre(Connection connection, String codMart) + throws SQLException { + String sql = "SELECT mvw_barcode_det.cod_barre " + "FROM mvw_barcode_det " + + "WHERE mvw_barcode_det.cod_mart = '" + codMart + "'"; + return execQuery(connection, sql); + } + + public static List> completeCodBarreScontrini(Connection connection, String codMart) + throws SQLException { + String sql = "SELECT mvw_barcode_det.cod_barre " + "FROM mvw_barcode_det " + + "WHERE mvw_barcode_det.cod_mart = '" + codMart + "' and len(mvw_barcode_det.cod_barre) <= 13"; + return execQuery(connection, sql); + } + + public static String getApplicationName(Connection connection) throws SQLException { + String sql = "select application_name from azienda"; + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return ""; + } else { + return list.get(0).get("application_name").toString(); + } + } + + public static List> completeCodDiviCont(Connection connection) throws SQLException { + String sql = "select cod_divi_contab from azienda"; + return execQuery(connection, sql); + } + + + public static Double completeCambioDiviCont(Connection connection) throws SQLException { + String sql = "select gtb_divi.cambio FROM azienda LEFT OUTER JOIN gtb_divi ON azienda.cod_divi_contab = gtb_divi.cod_divi"; + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return new Double("1"); + } else { + return new Double(list.get(0).get("cambio").toString()); + } + } + + public static BigDecimal completeCambio(Connection conn, EntityBase testata) throws Exception { + String codDivi = (String) DroolsUtil.getEntityFieldValue(testata, "cod_divi_cont"); + return completeCambio(conn, codDivi); + } + + public static BigDecimal completeCambio(Connection conn, String codDivi) throws SQLException { + String sql = "select gtb_divi.cambio FROM gtb_divi WHERE gtb_divi.cod_divi = " + UtilityDB.valueToString(codDivi); + List> list = execQuery(conn, sql); + + if ( list.get(0).get("cambio") == null ) + System.out.println(codDivi); + if (list.isEmpty()) { + return BigDecimal.ONE; + } else { + return new BigDecimal(list.get(0).get("cambio").toString()); + } + } + + public static List> completeCodDivi(Connection connection) throws SQLException { + String sql = "SELECT azienda.cod_divi_contab, gtb_divi.cambio" + " FROM azienda, gtb_divi" + + " WHERE azienda.cod_divi_contab = gtb_divi.cod_divi"; + return execQuery(connection, sql); + } + + public static Integer completeCifreDecDiviCont(Connection connection, String codDivi) throws SQLException { + String sql = "SELECT cifre_dec FROM gtb_divi" + " WHERE cod_divi = " + UtilityDB.valueToString(codDivi); + + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return null; + } else { + return Integer.valueOf(list.get(0).get("cifre_dec").toString()); + } + } + + public static BigDecimal roundValue(Connection connection, BigDecimal value, String codDivi) throws Exception { + Integer cifre = completeCifreDecDiviCont(connection, codDivi); + if (cifre == null) + cifre = EmsRestConstants.cifreDecMax; + return IntegerUtility.round(value, cifre); + } + + public static Double roundValue(Connection connection, Double value, String codDivi) throws Exception { + Integer cifre = completeCifreDecDiviCont(connection, codDivi); + if (cifre == null) + cifre = EmsRestConstants.cifreDecMax; + return IntegerUtility.round(value, cifre); + } + + public static Double completeImportoRiga(Connection connection, Double qta, Double valUnt, Double sconto5, + Double sconto6, Double sconto7, Double sconto8, String codDivi) throws Exception { + Double impRiga = qta * valUnt; + sconto5 = 1 - (sconto5 / 100); + sconto6 = 1 - (sconto6 / 100); + sconto7 = 1 - (sconto7 / 100); + sconto8 = 1 - (sconto8 / 100); + + Double value = impRiga * sconto5 * sconto6 * sconto7 * sconto8; + return roundValue(connection, value, codDivi); + } + + public static String completeUntMis(Connection connection, String codMart) throws SQLException { + String sql = "SELECT mtb_aart.unt_mis FROM mtb_aart " + " WHERE mtb_aart.cod_mart = '" + codMart + "'"; + Map map = execSingleQuery(connection, sql); + if (map.get("unt_mis") == null) + return null; + else + return map.get("unt_mis").toString(); + } + + public static List> completeCodAliqSimple(Connection connection, String codMart) + throws SQLException { + String sql = + "SELECT mtb_aart.cod_aliq" + + " FROM mtb_aart " + + " WHERE mtb_aart.cod_mart = '" + codMart + "'"; + List> list = execQuery(connection, sql); + return list; + } + + public static BigDecimal completePercAliq(Connection connection, EntityBase entity) throws Exception { + String codAliq = (String) DroolsUtil.getEntityFieldValue(entity, "cod_aliq"); + + return completePercAliq(connection, codAliq); + } + + public static BigDecimal completePercAliq(Connection connection, String codAliq) throws SQLException { + String sql = "SELECT perc_aliq FROM gtb_aliq WHERE cod_aliq = " + UtilityDB.valueToString(codAliq); + Map map = execSingleQuery(connection, sql); + if (map.get("perc_aliq") != null) + return new BigDecimal(map.get("perc_aliq").toString()); + else + return BigDecimal.ZERO; + } + + public static BigDecimal completeQtaCnf(Connection connection, EntityBase entity) throws Exception { + String codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + + String sql = "SELECT qta_cnf FROM mtb_aart WHERE cod_mart = '" + codMart + "'"; + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return new BigDecimal(1); + } else { + return new BigDecimal(list.get(0).get("qta_cnf").toString()); + } + } + + public static BigDecimal completeQtaCnfDB(Connection connection, EntityBase entity) throws Exception { + // FABIO (14.7.2016): il calcolo della qtaCnf deve considera anche UM della riga con il rispettivo rapporto di conversione, + // mentre la precedente funzione leggeva direttamente qtaCnf dal DB e lo assegnava , come del resto già + // faceva la entity SOAP erroneamento, quindi quando da fuori veniva passato un unità di misura diversa + // da quella di magazzino assegnava comunque la qtaCnf di magazzino + BigDecimal qtaCnfDB = BigDecimal.ONE; + BigDecimal qtaCnf = BigDecimal.ONE; + BigDecimal rapConv = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "rapConv"); + + qtaCnfDB = completeQtaCnf(connection, entity); + if (rapConv.compareTo(BigDecimal.ZERO) == 0){ + qtaCnf = qtaCnfDB; + }else{ + qtaCnf = qtaCnfDB.divide(rapConv,EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + } + + return qtaCnf/*new BigDecimal(completeQtaCnf(connection, entity))*/; + } + + + public static List> completeDescrizione(Connection connection, EntityBase entity) throws Exception { + String codMart; + if (entity instanceof JtbCicl) { + codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_prod"); + }else{ + codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + } + + String sql = "SELECT mtb_aart.descrizione, descrizione_estesa " + "FROM mtb_aart " + + "WHERE mtb_aart.cod_mart = " + UtilityDB.valueToString(codMart); + return execQuery(connection, sql); + } + + public static BigDecimal completeValUntULTC(Connection conn, EntityBase entity) throws Exception { + String fieldDataValidita = null; + BigDecimal rapConv= BigDecimal.ZERO ; + String codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + String codMdep = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mdep"); + + + if (entity instanceof DtbOrdr || entity instanceof WdtbOrdr) { + fieldDataValidita = "data_ord"; + rapConv = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "rap_conv"); + } else if (entity instanceof DtbDocr || entity instanceof WdtbDocr) { + fieldDataValidita = "data_doc"; + rapConv = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "rap_conv"); + }else if(entity instanceof MtbInvenr){ + fieldDataValidita = "data_inventario"; + rapConv = BigDecimal.ONE; + } + + Date dataValidita = (Date) DroolsUtil.getEntityFieldValue(entity, fieldDataValidita); + String sql = "SELECT isNull(dbo.f_GetCostoUltArt_depo(" + + UtilityDB.valueDateToString(dataValidita, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(codMdep) + "," + UtilityDB.valueToString(codMart) + "), 0) as costo_ult"; + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + return BigDecimal.ZERO; + } else { + BigDecimal valUnt = BigDecimal.ZERO; + if (rapConv.compareTo(BigDecimal.ZERO) != 0){ + valUnt = new BigDecimal(list.get(0).get("costo_ult").toString()); + valUnt = valUnt.multiply(rapConv).setScale(EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + } + return valUnt; + } + } + + public static BigDecimal completeValUntDIST(Connection conn, EntityBase entity) throws SQLException { + String codMart = null, codMdep = null; + Date dataValidita = null; + if (entity instanceof DtbOrdr) { + codMart = ((DtbOrdr) entity).getCodMart(); + codMdep = ((DtbOrdr) entity).getCodMdep(); + dataValidita = ((DtbOrdr) entity).getDataOrd(); + } else if(entity instanceof MtbInvenr){ + codMart = ((MtbInvenr) entity).getCodMart(); + codMdep = ((MtbInvenr) entity).getCodMdep(); + dataValidita = ((MtbInvenr) entity).getDataInventario(); + } + String sql = "SELECT dbo.f_GetCostoDist_depo('', " + + UtilityDB.valueToString(codMart) + "," + + "1, " + + "0, " + + UtilityDB.valueDateToString(dataValidita, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(codMdep) + ") as costo_dist"; + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + return BigDecimal.ZERO; + } else { + return new BigDecimal(list.get(0).get("costo_dist").toString()); + } + } + + public static BigDecimal completeValUntCMED(Connection conn, EntityBase entity) throws SQLException { + String codMart = null; + Date dataValidita = null; + if (entity instanceof DtbOrdr) { + codMart = ((DtbOrdr) entity).getCodMart(); + dataValidita = ((DtbOrdr) entity).getDataOrd(); + }else if(entity instanceof MtbInvenr){ + codMart = ((MtbInvenr) entity).getCodMart(); + dataValidita = ((MtbInvenr) entity).getDataInventario(); + } + String sql = "SELECT dbo.f_GetCostoMedArt(" + + UtilityDB.valueDateToString(dataValidita, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(codMart) + ") as costo_med"; + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + return BigDecimal.ZERO; + } else { + return new BigDecimal(list.get(0).get("costo_med").toString()); + } + } + + public static void completeActivityIdChild(StbActivity activity) { + for (StbActivityFile stbActivityFile: activity.getStbActivityFile()) { + stbActivityFile.setId(activity.getActivityId()); + } + } + + public static String completeDescrizionePaga(Connection conn, String codPaga) throws SQLException{ + String sql = "SELECT descrizione FROM gtb_paga WHERE gtb_paga.cod_paga = " + UtilityDB.valueToString(codPaga); + Map map = execSingleQuery(conn, sql); + if (map.get("descrizione") == null) + return null; + else + return map.get("descrizione").toString(); + } + + public static void insMarchio(Connection conn, MtbAart entity) throws Exception{ + String sql = "SELECT marchio FROM mtb_aart_marchio WHERE marchio = " + UtilityDB.valueToString(entity.getMarchio()); + Map map = execSingleQuery(conn, sql); + if (map.get("marchio") == null){ + MtbAartMarchio mtbAartMarchio = new MtbAartMarchio(); + mtbAartMarchio.setMarchio(entity.getMarchio()); + mtbAartMarchio.setOperation(OperationType.INSERT); + entity.setMtbAartMarchio(mtbAartMarchio); + } + + } + public static void insEqui(Connection conn, MtbAart entity) throws Exception{ + String sql = "SELECT id_art_equi FROM mtb_aart_equi WHERE id_art_equi = " + UtilityDB.valueToString(entity.getIdArtEqui()); + Map map = execSingleQuery(conn, sql); + if (map.get("id_art_equi") == null){ + MtbAartEqui mtbAartEqui = new MtbAartEqui(); + mtbAartEqui.setIdArtEqui(entity.getIdArtEqui()); + mtbAartEqui.setDescrizione(entity.getMtbAartEqui_descrizione()); + mtbAartEqui.setOperation(OperationType.INSERT); + entity.setMtbAartEqui(mtbAartEqui); + } + + } +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/ConfigActivityRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/ConfigActivityRules.java new file mode 100644 index 0000000000..e0e518f987 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/ConfigActivityRules.java @@ -0,0 +1,95 @@ +package it.integry.ems.rules.completing; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.entity.StbActivityFile; +import it.integry.ems.utility.UtilityDB; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +import org.apache.commons.codec.binary.Base64; + +public class ConfigActivityRules extends CommonRules { + + public static String completeActivityId(Connection connection) throws SQLException { + CallableStatement cs = connection.prepareCall("{call NextActivityID(?)}"); + cs.registerOutParameter(1, java.sql.Types.VARCHAR); + cs.execute(); + return cs.getString(1); + } + + public static String completeCodJFasAct(Connection connection, String activityTypeId, + String flagTipologia) throws SQLException { + + String sql = "SELECT cod_jfas " + + "FROM stb_activity_type " + + "WHERE activity_type_id = " + UtilityDB.valueToString(activityTypeId) + " AND " + + "flag_tipologia = " + UtilityDB.valueToString(flagTipologia); + + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return ""; + } else { + return list.get(0).get("cod_jfas").toString(); + } + } + + public static Date completeEstimatedEnddtime(Connection connection, String activityTypeId, + String flagTipologia, Date estimatedTime) throws SQLException { + Timestamp estimateEndtime = null; + + SimpleDateFormat dateFormatFile = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD); + + String sql = "SELECT DATEADD(HH, ISNULL(estimated_duration, 0), '" + dateFormatFile.format(estimatedTime) + "') as data" + + "FROM stb_activity_type " + + "WHERE activity_type_id = " + UtilityDB.valueToString(activityTypeId) + " AND " + + "flag_tipologia = " + UtilityDB.valueToString(flagTipologia); + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet res = ps.executeQuery(); + if (res.next()){ + estimateEndtime = res.getTimestamp("data"); + } + res.close();ps.close(); + + return estimateEndtime; + } + + public static Date completeDataInsAct(Connection connection, Date oraInsAct) throws SQLException { + Date dataInsAct = new Date(); + + if (oraInsAct != null) + dataInsAct = oraInsAct; + return dataInsAct; + } + + public static void completeActivityFileOriginalSize(StbActivityFile stbActivityFile) throws Exception { + if(stbActivityFile.getContent() == null) + stbActivityFile.setOriginalSize(0); + else {/* + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ZipOutputStream out = new ZipOutputStream(baos); + ZipEntry e = new ZipEntry(stbActivityFile.getFileName()); + out.putNextEntry(e); + + byte[] cnt = Base64.decodeBase64(stbActivityFile.getContent()); + out.write(cnt, 0, cnt.length); + out.closeEntry(); + out.close(); + stbActivityFile.setOriginalSize(baos.toByteArray().length); + stbActivityFile.setContent(Base64.encodeBase64String(baos.toByteArray()));*/ + } + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/CostiDTO.java b/ems-core/src/main/java/it/integry/ems/rules/completing/CostiDTO.java new file mode 100644 index 0000000000..dd0d328a62 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/CostiDTO.java @@ -0,0 +1,72 @@ +package it.integry.ems.rules.completing; + +import java.math.BigDecimal; +import java.util.Date; + +public class CostiDTO /*implements Comparable */{ + private String codCcon, codJcom, codJfas,codMtip, matricola; + private Date dataInizComp, dataFineComp; + private BigDecimal importo; + + public String getCodCcon() { + return codCcon; + } + public void setCodCcon(String codCcon) { + this.codCcon = codCcon; + } + public String getCodJcom() { + return codJcom; + } + public void setCodJcom(String codJcom) { + this.codJcom = codJcom; + } + public String getCodJfas() { + return codJfas; + } + public void setCodJfas(String codJfas) { + this.codJfas = codJfas; + } + public String getCodMtip() { + return codMtip; + } + public void setCodMtip(String codMtip) { + this.codMtip = codMtip; + } + public String getMatricola() { + return matricola; + } + public void setMatricola(String matricola) { + this.matricola = matricola; + } + public Date getDataInizComp() { + return dataInizComp; + } + public void setDataInizComp(Date dataInizComp) { + this.dataInizComp = dataInizComp; + } + public Date getDataFineComp() { + return dataFineComp; + } + public void setDataFineComp(Date dataFineComp) { + this.dataFineComp = dataFineComp; + } + public BigDecimal getImporto() { + return importo; + } + public void setImporto(BigDecimal importo) { + this.importo = importo; + } + + + public boolean compare(CostiDTO object1, CostiDTO object2) { + return object1.getCodCcon().compareTo((object2.getCodCcon())) < 0; + } + /* + @Override + public int compareTo(CostiDTO o) { + CostiDTO k = (CostiDTO) o; + String codCcon = k.getCodCcon(); + return this.getCodCcon().compareTo(codCcon); + + } */ +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/DistBaseRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/DistBaseRules.java new file mode 100644 index 0000000000..baa848501b --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/DistBaseRules.java @@ -0,0 +1,135 @@ +package it.integry.ems.rules.completing; + +import java.math.BigDecimal; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; +import java.util.Map; + +import it.integry.ems.base.EntityBase; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.service.SetupGest; +import it.integry.ems.utility.UtilityDB; + +public class DistBaseRules extends QueryRules{ + protected static SetupGest setupGest = new SetupGest(); + + public static String completeUntMisProd(Connection connection, String codProd) throws SQLException { + String sql = "SELECT mtb_aart.unt_mis FROM mtb_aart " + " WHERE mtb_aart.cod_mart = '" + codProd + "'"; + Map map = execSingleQuery(connection, sql); + if (map.get("unt_mis") == null) + return null; + else + return map.get("unt_mis").toString(); + } + /*public static String completeUntMisSpes(Connection connection, String codSpes) throws SQLException { + String sql = "SELECT gtb_spes.unt_mis FROM gtb_spes " + " WHERE gtb_spes.cod_spes = '" + codSpes + "'"; + Map map = execSingleQuery(connection, sql); + if (map.get("unt_mis") == null) + return null; + else + return map.get("unt_mis").toString(); + } + public static String completeDescrizioneSpes(Connection connection, String codSpes) throws SQLException { + String sql = "SELECT gtb_spes.descrizione FROM gtb_spes " + " WHERE gtb_spes.cod_spes = '" + codSpes + "'"; + Map map = execSingleQuery(connection, sql); + if (map.get("descrizione") == null) + return null; + else + return map.get("descrizione").toString(); + }*/ + public static BigDecimal completeRapConvProd(Connection conn, EntityBase entity) throws Exception { + + String codProd = (String) DroolsUtil.getEntityFieldValue(entity, "cod_prod"); + + String untMisProd = (String) DroolsUtil.getEntityFieldValue(entity, "unt_mis_prod"); + + BigDecimal value = BigDecimal.ONE; + + String query = "SELECT CASE " + UtilityDB.valueToString(untMisProd) + " WHEN unt_mis THEN 1 " + + " WHEN unt_mis2 THEN rap_conv2 " + " WHEN unt_mis3 THEN rap_conv3 " + " ELSE 1 END as rap_conv " + + " FROM mtb_aart WHERE cod_mart = " + UtilityDB.valueToString(codProd); + PreparedStatement info = conn.prepareStatement(query); + ResultSet res = info.executeQuery(); + if (res.next()) { + value = res.getBigDecimal("rap_conv"); + } + res.close(); + info.close(); + + return value; + } + public static String completeFlagQtaMultipla(Connection connection, BigDecimal lottoMinOrd) throws SQLException { + String value = "N"; + + return value; + } + public static BigDecimal completeRapConvDist(Connection conn, EntityBase entity) throws Exception { + + String codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + + String untMisDist = (String) DroolsUtil.getEntityFieldValue(entity, "unt_mis_dist"); + + BigDecimal value = BigDecimal.ONE; + + String query = "SELECT CASE " + UtilityDB.valueToString(untMisDist) + " WHEN unt_mis THEN 1 " + + " WHEN unt_mis2 THEN rap_conv2 " + " WHEN unt_mis3 THEN rap_conv3 " + " ELSE 1 END as rap_conv " + + " FROM mtb_aart WHERE cod_mart = " + UtilityDB.valueToString(codMart); + PreparedStatement info = conn.prepareStatement(query); + ResultSet res = info.executeQuery(); + if (res.next()) { + value = res.getBigDecimal("rap_conv"); + } + res.close(); + info.close(); + + return value; + } + public static String completeDescrizioneCosInd(Connection connection, String codJcosInd) throws SQLException { + String sql = "SELECT jtb_clav_ind.descrizione FROM jtb_clav_ind " + " WHERE jtb_clav_ind.cod_jcos_ind = '" + codJcosInd + "'"; + Map map = execSingleQuery(connection, sql); + if (map.get("descrizione") == null) + return null; + else + return map.get("descrizione").toString(); + } + public static BigDecimal completePercCost(Connection connection, String codJcosInd) throws SQLException { + BigDecimal value = BigDecimal.ZERO; + String sql = "SELECT jtb_clav_ind.perc_cost FROM jtb_clav_ind " + " WHERE jtb_clav_ind.cod_jcos_ind = '" + codJcosInd + "'"; + Map map = execSingleQuery(connection, sql); + if (map.get("perc_cost") == null) + return value; + else + return new BigDecimal(map.get("perc_cost").toString()); + } + public static List> completeDatiCodJcosDir(Connection connection) throws Exception { + String sql; + String codJcosDir = (String) setupGest.getSetup(connection, "w_jdistinta_rc", "SETUP", "COD_SPES", ""); + if (codJcosDir == null) + return null; + else + sql = "SELECT gtb_spes.cod_spes, gtb_spes.unt_mis, gtb_spes.descrizione FROM gtb_spes " + " WHERE gtb_spes.cod_spes = '" + codJcosDir + "'"; + + return execQuery(connection, sql); + } + /*public static void completeIdRigaAct(Connection conn, List rows, JtbDistClavDir testata) throws Exception { + + String wherePK = testata.getEntityHolder().getWherePK(testata); + Integer startRiga = 0; + String sql = "SELECT IsNull(max(id_riga_act), 0) as id_riga_act " + " FROM " + rows.get(0).getTableName() + " WHERE " + + wherePK; + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + startRiga = 1; + } else { + startRiga = new Integer(list.get(0).get("id_riga_act").toString()) + 1; + } + + for (JtbDistClavDirDett row : rows) { + row.setIdRigaAct(startRiga); + startRiga++; + } + }*/ +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/DocOrdRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/DocOrdRules.java new file mode 100644 index 0000000000..5a51409fc8 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/DocOrdRules.java @@ -0,0 +1,965 @@ +package it.integry.ems.rules.completing; + +import java.math.BigDecimal; + +import java.math.RoundingMode; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.base.EntityBase; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.db.ResultSetMapper; +import it.integry.ems.entity.CtbMovi; +import it.integry.ems.entity.DtbDocColli; +import it.integry.ems.entity.DtbDoct; +import it.integry.ems.entity.DtbOrdr; +import it.integry.ems.entity.DtbOrds; +import it.integry.ems.entity.DtbOrdt; +import it.integry.ems.entity.WdtbDoct; +import it.integry.ems.entity.WdtbOrdr; +import it.integry.ems.entity.WdtbOrdt; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.service.SetupGest; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.IntegerUtility; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +public class DocOrdRules extends QueryRules { +/* + public static void calcTotali(Connection conn, WdtbOrdt testata, List list) throws Exception { + Double imponib = 0d, totIva = 0d; + for (WdtbOrdr row : list) { + if (row.getPercAliq() != null) { + imponib += row.getImportoRiga() * (1 - testata.getSconto3() / 100); + totIva += row.getImportoRiga() * (1 - testata.getSconto3() / 100) * (row.getPercAliq() / 100); + } + } + + Double imponibTrunc = CommonRules.roundValue(conn, imponib, testata.getCodDivi()); + Double totIvaTrunc = CommonRules.roundValue(conn, totIva, testata.getCodDivi()); + testata.setTotImponib(imponibTrunc); + testata.setTotIva(totIvaTrunc); + } */ + + public static void calcTotali(Connection conn, EntityBase testata) throws Exception { + BigDecimal totMerce = BigDecimal.ZERO, nettoMerce = BigDecimal.ZERO, totImponib = BigDecimal.ZERO, + totImposta = BigDecimal.ZERO, totAcconto = BigDecimal.ZERO, totOmaggi = BigDecimal.ZERO, + importoRiga = BigDecimal.ZERO, totImponibAliq = BigDecimal.ZERO, totImpostaAliq = BigDecimal.ZERO, + sconto1 = BigDecimal.ZERO, sconto2 = BigDecimal.ZERO, sconto3 = BigDecimal.ZERO, sfusoTot = BigDecimal.ZERO, colliTot = BigDecimal.ZERO, + sconto4 = BigDecimal.ZERO, sconto5 = BigDecimal.ZERO, sconto6 = BigDecimal.ZERO, percAliq = null, + qta = BigDecimal.ZERO, valUnt = BigDecimal.ZERO, taraKgTot = BigDecimal.ZERO, pesoKgTot = BigDecimal.ZERO; + final BigDecimal cento = new BigDecimal("100"); + Boolean insMovCont = false, isOrdine = false; + String codAliq, codDivi = null, flagPrezziScontati = null, codMart, flagIvaInclusa = "N", tipoIva = null, calcColli = "N", peso = null; + List sconti = new ArrayList(); + List righe = null; + List spese = null; + List colli = new ArrayList(); + List colliFromDB = new ArrayList(); + List castellettoIva = new ArrayList(); + ResultSetMapper mapper = new ResultSetMapper(); + Map lhm_castelletto = new HashMap(); + CostiDTO costi = new CostiDTO(); + List listaCosti = new ArrayList(); + + listaCosti.add(costi); + + + SetupGest setup = new SetupGest(); + lhm_castelletto.clear(); + + codDivi = (String) DroolsUtil.getEntityFieldValue(testata, "cod_divi"); + flagPrezziScontati = (String) DroolsUtil.getEntityFieldValue(testata, "flag_prz_scontati"); + sconto1 = (BigDecimal) DroolsUtil.getEntityFieldValue(testata, "sconto1"); + sconto2 = (BigDecimal) DroolsUtil.getEntityFieldValue(testata, "sconto2"); + sconto3 = (BigDecimal) DroolsUtil.getEntityFieldValue(testata, "sconto3"); + sconto4 = (BigDecimal) DroolsUtil.getEntityFieldValue(testata, "sconto4"); + + if (testata instanceof DtbOrdt) { + righe = ((DtbOrdt) testata).getDtbOrdr(); + spese = ((DtbOrdt) testata).getDtbOrds(); + isOrdine = true; + } else if (testata instanceof WdtbOrdt) { + righe = ((WdtbOrdt) testata).getWdtbOrdr(); + isOrdine = true; + } else if (testata instanceof WdtbDoct) { + righe = ((WdtbDoct) testata).getWdtbDocr(); + } else if (testata instanceof DtbDoct) { + righe = ((DtbDoct) testata).getDtbDocr(); + spese = ((DtbDoct) testata).getDtbDocs(); + colli = ((DtbDoct) testata).getDtbDocColli(); + flagIvaInclusa = (String) DroolsUtil.getEntityFieldValue(testata, "flag_prz_iva"); + if ("S".equals(((DtbDoct) testata).getGeneraMovCont())){ + insMovCont = true; + } + } + + if ("N".equals(flagPrezziScontati)) { + if (sconto1.compareTo(BigDecimal.ZERO) > 0) { + sconti.add(sconto1); + } + if (sconto2.compareTo(BigDecimal.ZERO) > 0) { + sconti.add(sconto2); + } + if (sconto3.compareTo(BigDecimal.ZERO) > 0) { + sconti.add(sconto3); + } + } + + if (testata instanceof WdtbDoct || testata instanceof WdtbOrdt) { + calcColli = "N"; + }else if (isOrdine){ + calcColli = "S"; + }else{ + String whereCondTestata = testata.getEntityHolder().getWherePK(testata); + String sql = "select mtb_colt.gestione, mtb_colt.data_collo, mtb_colt.ser_collo, mtb_colt.num_collo from mtb_colt where " + whereCondTestata; + colliFromDB = mapper.mapQuerySetToList(conn, sql, DtbDocColli.class); + calcColli = (String) setup.getSetup(conn, "DATI_AZIENDA", "DOCU_ORD", "CALC_COLLI", ""); + if (colli == null && colliFromDB.size() == 0){calcColli = "S";} + } + + if (righe != null) { + for (EntityBase row : righe) { + if (row.getOperation() != OperationType.DELETE) { + importoRiga = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "importo_riga"); + codAliq = (String) DroolsUtil.getEntityFieldValue(row, "cod_aliq"); + codMart = (String) DroolsUtil.getEntityFieldValue(row, "cod_mart"); + sconto5 = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "sconto5"); + sconto6 = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "sconto6"); + if (isOrdine) { + qta = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "qta_ord"); + } else { + qta = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "qta_doc"); + } + valUnt = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "val_unt"); + + percAliq = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "perc_aliq"); + tipoIva = (String) DroolsUtil.getEntityFieldValue(row, "tipo_iva"); + + if ("S".equals(flagIvaInclusa)) { + importoRiga = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "importo_riga_iva"); + if (!UtilityString.isNullOrEmpty(codAliq)) { + importoRiga = scorporoIva(importoRiga, percAliq); + } + + } + + BigDecimal pesoKg = BigDecimal.ZERO, taraKg = BigDecimal.ZERO; + String sezione = null; + String query = + "SELECT ctb_grup.sezione, " + + " ISNULL(mtb_aart.peso_kg, 0) as peso_kg, " + + " ISNULL(case when mtb_aart.qta_cnf <> 0 then round(mtb_aart.tara_kg/mtb_aart.qta_cnf, 5) else 0 end , 0) as tara_kg" + + " FROM mtb_aart LEFT OUTER JOIN ctb_cont ON mtb_aart.cod_ccon_ricavi = ctb_cont.cod_ccon " + + " LEFT OUTER JOIN ctb_grup ON ctb_cont.cod_cgrp = ctb_grup.cod_cgrp " + + " WHERE mtb_aart.cod_mart = " + UtilityDB.valueToString(codMart); + + // 4-7-2016 (FABIO) + // SOSTITUITA CON QUELLA DI SOPRA DOVE HO AGGIUNTO ANCHE I DATI NECESSARI AL CACOLO DEL PESO +/* String query = "SELECT ctb_grup.sezione " + " FROM mtb_aart, ctb_cont, ctb_grup " + + " WHERE mtb_aart.cod_ccon_ricavi = ctb_cont.cod_ccon and " + + " ctb_cont.cod_cgrp = ctb_grup.cod_cgrp and " + " mtb_aart.cod_mart = " + + UtilityDB.valueToString(codMart);*/ + List> list = execQuery(conn, query); + if (!list.isEmpty()) { + sezione = list.get(0).get("sezione"); + pesoKg = new BigDecimal(list.get(0).get("peso_kg")); + taraKg = new BigDecimal(list.get(0).get("tara_kg")); + } + + if (!"1".equals(sezione)) { + // ls_sezione = 1 CONTO PATRIMONIALE + if (importoRiga.compareTo(BigDecimal.ZERO) > 1 || !UtilityString.isNullOrEmpty(codMart)) { + totMerce = totMerce.add(importoRiga); + } + for (BigDecimal sconto : sconti) { + if (sconto != null) { + sconto = BigDecimal.valueOf(1).subtract((sconto.divide(BigDecimal.valueOf(100)))); + importoRiga = importoRiga.multiply(sconto); + } + } + + if ("S".equals(flagIvaInclusa)) { + importoRiga = CommonRules.roundValue(conn, importoRiga, codDivi); + } else { + importoRiga = IntegerUtility.round(importoRiga, 5); + } + + nettoMerce = nettoMerce.add(importoRiga); + } + + if ((sconto4 != null && sconto4.compareTo(BigDecimal.ZERO) > 0) && importoRiga.compareTo(BigDecimal.ZERO) > 0) { + importoRiga = importoRiga.multiply(BigDecimal.valueOf(1).subtract((sconto4.divide(BigDecimal.valueOf(100))))); + importoRiga = CommonRules.roundValue(conn, importoRiga, codDivi); + } + + if ((sconto5.compareTo(cento) == 0 || sconto6.compareTo(cento) == 0) + && ((percAliq != null && percAliq.compareTo(BigDecimal.ZERO) > 0) + || "OMAGGI".equals(tipoIva))) { + if ("S".equals(flagIvaInclusa)) { + valUnt = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "val_unt_iva"); + } + importoRiga = qta.multiply(valUnt); + for (BigDecimal sconto : sconti) { + if (sconto != null) { + sconto = BigDecimal.valueOf(1).subtract((sconto.divide(BigDecimal.valueOf(100)))); + importoRiga = importoRiga.multiply(sconto); + importoRiga = CommonRules.roundValue(conn, importoRiga, codDivi); + } + } + + if (sconto5.compareTo(cento) == 0 || sconto6.compareTo(cento) == 0) { + totOmaggi = totOmaggi.add(importoRiga); + } + } + + if (lhm_castelletto.containsKey(codAliq)) { + totImponib = lhm_castelletto.get(codAliq); + totImponib = totImponib.add(importoRiga); + } else { + totImponib = importoRiga; + } + lhm_castelletto.put(codAliq, totImponib); + + /************************** + CALCOLO NUM_COLLI e PESO + **************************/ + if ("S".equals(calcColli) && codMart != null){ + BigDecimal rapConv = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "rap_conv"); + BigDecimal pesoLordoRow = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "peso_lordo"); + BigDecimal qtaCnf = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "qta_cnf"); + + /*CALCOLO PESO*/ + taraKgTot = BigDecimal.ZERO; + BigDecimal pesoLordo = BigDecimal.ZERO; + if( taraKg.compareTo(BigDecimal.ZERO) > 0) + taraKgTot = qta.multiply(rapConv).multiply(taraKg).setScale(EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + pesoKgTot = pesoKgTot.add(taraKgTot).add(qta.multiply(rapConv).multiply(pesoKg)).setScale(EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + + /*CALCOLO PESO LORDO SU RIGHE*/ + pesoLordo = pesoLordo.add(pesoKg).add(taraKg).multiply(qta).multiply(rapConv).setScale(EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + if (pesoLordoRow.compareTo(BigDecimal.ZERO)==0 && pesoLordo.compareTo(BigDecimal.ZERO)>0) + DroolsUtil.completeEntity(row, new String[]{"pesoLordo"}, pesoLordo); + + /*CALCOLO NUMERO COLLI*/ + BigDecimal colliRiga = BigDecimal.ZERO, sfusoRiga = BigDecimal.ZERO, qtaCnfInt = BigDecimal.ZERO; + if (qtaCnf.compareTo(BigDecimal.ZERO) == 0 ){ + colliRiga = BigDecimal.ZERO; + sfusoRiga = BigDecimal.ZERO; + }else{ + + qtaCnfInt = qtaCnf.setScale(0, RoundingMode.DOWN); + //qtaCnfInt = IntegerUtility.round(qtaCnf, 0); + if (qtaCnf.subtract(qtaCnfInt).compareTo(BigDecimal.ZERO) > 0){ + colliRiga = IntegerUtility.round(qta.divide(qtaCnf, RoundingMode.HALF_UP), 0); + colliRiga = colliRiga.setScale(0, RoundingMode.DOWN); + sfusoRiga = BigDecimal.ZERO; + }else{ + colliRiga = qta.divide(qtaCnf, RoundingMode.HALF_UP); + colliRiga = colliRiga.setScale(0, RoundingMode.DOWN); + sfusoRiga = new BigDecimal(qta.doubleValue() % qtaCnf.doubleValue()); + sfusoRiga = IntegerUtility.round(sfusoRiga, 0); + } + } + colliTot = colliTot.add(colliRiga); + sfusoTot = sfusoTot.add(sfusoRiga); + } + } + } + } + + /****************************************** + ASSEGNAZIONE NUM_COLLI e PESO A DOCUMENTO + ******************************************/ + String numColli = null; + if ("S".equals(calcColli)){ + if (pesoKgTot.compareTo(BigDecimal.ZERO)>0){ + pesoKgTot = IntegerUtility.round(pesoKgTot, 2); + peso = "KG " + pesoKgTot.toString(); + } + numColli = colliTot.toString(); + if (sfusoTot.compareTo(BigDecimal.ZERO) > 0) + numColli = numColli + "+" + sfusoTot.toString(); + }else{ + int numColliLogistici = 0; + if (colli != null){ + for (int a = 0; a < colli.size(); a++) { + boolean AddCollo = true; + for (int i = colliFromDB.size() -1; i >= 0; i--) { + if (colli.get(a).getGestione().equals(colliFromDB.get(i).getGestione()) && + colli.get(a).getDataCollo().equals(colliFromDB.get(i).getDataCollo()) && + colli.get(a).getSerCollo().equals(colliFromDB.get(i).getSerCollo()) && + colli.get(a).getNumCollo().equals(colliFromDB.get(i).getNumCollo())){ + colliFromDB.remove(colliFromDB.get(i)); + + if (colli.get(a).getOperation() == OperationType.DELETE) { + AddCollo = false; + }else{ + AddCollo = true; + } + break; + } + } + if (AddCollo){ + numColliLogistici++; + } + } + } + if (colli != null || colliFromDB.size() != 0){ + numColliLogistici = numColliLogistici + colliFromDB.size(); + numColli = null; + if(numColliLogistici != 0){numColli = String.valueOf(numColliLogistici);} + peso = null; + }else{ + calcColli = "S"; + } + } + + if (spese != null) { + for (EntityBase row : spese) { + if (row.getOperation() != OperationType.DELETE) { + importoRiga = (BigDecimal) DroolsUtil.getEntityFieldValue(row, "importo"); + codAliq = (String) DroolsUtil.getEntityFieldValue(row, "cod_aliq"); + + if (lhm_castelletto.containsKey(codAliq)) { + totImponib = lhm_castelletto.get(codAliq); + totImponib = totImponib.add(importoRiga); + } else { + totImponib = importoRiga; + } + lhm_castelletto.put(codAliq, totImponib); + } + } + } + + // RIGA IVA + totImponib = BigDecimal.ZERO; + totImposta = BigDecimal.ZERO; + for (Entry entry : lhm_castelletto.entrySet()) { + codAliq = entry.getKey(); + totImponibAliq = entry.getValue(); + totImpostaAliq = calcImposta(conn, totImponibAliq, codAliq, codDivi); + + CtbMovi iva = new CtbMovi(); + iva.setCodAliq(codAliq); + iva.setImponibile(totImponibAliq); + iva.setImposta(totImpostaAliq); + + castellettoIva.add(iva); + + totImponib = totImponib.add(totImponibAliq); + totImposta = totImposta.add(totImpostaAliq); + } + + String[] fields = new String[] { "totMerce", "nettoMerce", "totImponib", "totIva", "acconto", "totOmaggi", "peso", "numColli" }; + DroolsUtil.completeEntity(testata, fields, totMerce, nettoMerce, totImponib, totImposta, totAcconto, totOmaggi, peso, numColli); + if (insMovCont) { + DroolsUtil.completeEntity(testata, new String[] { "ctbMovi" }, castellettoIva); + } + } + + private static BigDecimal scorporoIva(BigDecimal importo, BigDecimal percAliq) { + importo = importo.divide(BigDecimal.ONE.add(percAliq.divide(new BigDecimal("100")))); + importo = IntegerUtility.round(importo, 5); + return importo; + } + + public static BigDecimal calcImposta(Connection conn, BigDecimal totImponib, String codAliq, String codDivi) + throws Exception { + BigDecimal totImposta = BigDecimal.ZERO, percAliq = BigDecimal.ZERO; + String tipoIva = null; + + String sql = "SELECT perc_aliq, tipo_iva FROM gtb_aliq WHERE cod_aliq = " + UtilityDB.valueToString(codAliq); + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + percAliq = rs.getBigDecimal(1); + tipoIva = rs.getString(2); + if (!"NON ESPOSTA".equals(tipoIva)) { + percAliq = percAliq.divide(new BigDecimal(100)); + totImposta = totImposta.add(CommonRules.roundValue(conn, totImponib.multiply(percAliq), codDivi)); + } + } else { + totImposta = BigDecimal.ZERO; + } + + return totImposta; + } + + public static List> getDatiIva(Connection conn, String codAliq) throws SQLException { + String sql = "SELECT perc_aliq, tipo_iva FROM gtb_aliq WHERE cod_aliq = " + UtilityDB.valueToString(codAliq); + return execQuery(conn, sql); + } + + public static void completeDatiAliq(Connection conn, EntityBase entity) throws Exception { + String codAliq = null; + List> datiIva = new ArrayList>(); + codAliq = (String) DroolsUtil.getEntityFieldValue(entity, "cod_aliq"); + + datiIva = getDatiIva(conn, codAliq); + if (!datiIva.isEmpty()) { + BigDecimal percAliq = new BigDecimal(datiIva.get(0).get("perc_aliq").toString()); + String tipoIva = datiIva.get(0).get("tipo_iva").toString(); + String[] fields = new String[] { "percAliq", "tipoIva" }; + DroolsUtil.completeEntity(entity, fields, percAliq, tipoIva); + } + + } + + public static String completeCodDivi(Connection conn, EntityBase entity) throws Exception { + String codDivi = null, query = null, campoData = null; + String codAnag = (String) DroolsUtil.getEntityFieldValue(entity, "cod_anag"); + String listino = (String) DroolsUtil.getEntityFieldValue(entity, "listino"); + String gestione = (String) DroolsUtil.getEntityFieldValue(entity, "gestione"); + + if (entity instanceof DtbDoct || entity instanceof WdtbDoct){ + campoData = "data_doc"; + }else if (entity instanceof DtbOrdt){ + campoData = "data_ord"; + } + + Date dataDivisa = (Date) DroolsUtil.getEntityFieldValue(entity, campoData); + + if ("V".equals(gestione)){ + if (!CommonConstants.ULTC.equals(listino) && !UtilityString.isNullOrEmpty(listino)){ + query = "SELECT cod_divi from vtb_list WHERE cod_vlis = " + UtilityDB.valueToString(listino); + } + + } else { + if (CommonConstants.ULTC.equals(listino) || CommonConstants.DIST.equals(listino) || CommonConstants.CMPPF.equals(listino)){ + query = "SELECT cod_divi FROM atb_forn WHERE cod_anag = " + UtilityDB.valueToString(codAnag); + }else{ + if (!UtilityString.isNullOrEmpty(listino)) { + query = "SELECT cod_divi_acq as cod_divi FROM atb_list WHERE cod_alis = " + + UtilityDB.valueToString(listino); + } else { + query = "SELECT cod_divi FROM atb_forn WHERE cod_anag = " + UtilityDB.valueToString(codAnag); + } + } + + } + + if (UtilityString.isNullOrEmpty(query)) { + query = "SELECT cod_divi_cont_prima from gtb_anni_divi WHERE anno = DatePart(yy, " + UtilityDB.valueDateToString(dataDivisa, CommonConstants.DATE_FORMAT_YMD) + ")"; + } + + + List> list = execQuery(conn, query); + if (!list.isEmpty()) { + codDivi = list.get(0).get("cod_divi"); + } + + return codDivi; + } + + public static void completeDatiForn(Connection conn, EntityBase entity) throws Exception { + String codAnag = (String) DroolsUtil.getEntityFieldValue(entity, "cod_anag"); + + String sql = "SELECT porto, mezzo, atb_forn.cod_paga as cod_paga, cod_banc, gtb_paga.descrizione as descrizione_paga, cod_abi, cod_cab " + + " FROM atb_forn LEFT OUTER JOIN gtb_paga ON atb_forn.cod_paga = gtb_paga.cod_paga " + + " WHERE atb_forn.cod_anag = " + UtilityDB.valueToString(codAnag); + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + + public static void completeDatiCliente(Connection conn, EntityBase entity) throws Exception { + String codAnag = (String) DroolsUtil.getEntityFieldValue(entity, "cod_anag"); + + String sql = + " SELECT vtb_clie.cod_vage, " + + " vtb_clie.cod_vzon, " + + " vtb_clie.cod_banc, " + + " vtb_clie.cod_paga, " + + " vtb_clie.porto, " + + " vtb_clie.mezzo, " + + " vtb_clie.sconto1, " + + " vtb_clie.sconto2, " + + " vtb_clie.cod_vvet, " + + " vtb_clie.cod_abi, " + + " vtb_clie.cod_cab, " + + " vtb_clie.cod_vvet2, " + + " vtb_clie.cod_banc_azi, " + + " gtb_paga.descrizione as descrizione_paga " + + " FROM vtb_clie LEFT OUTER JOIN gtb_paga ON atb_forn.cod_paga = gtb_paga.cod_paga " + + " WHERE vtb_clie.cod_anag = " + UtilityDB.valueToString(codAnag); + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + + + public static String completeLisV(Connection conn, EntityBase entity) throws Exception { + String listino = null, query, codVdes = null, codAnag = null; + + codAnag = (String) DroolsUtil.getEntityFieldValue(entity, "cod_anag"); + codVdes = (String) DroolsUtil.getEntityFieldValue(entity, "cod_vdes"); + + if (!UtilityString.isNullOrEmpty(codVdes)) { + query = + "SELECT IsNull(vtb_dest.cod_vlis, vtb_clie.cod_vlis) as listino " + + " FROM vtb_dest, " + + " vtb_clie " + + " WHERE vtb_clie.cod_anag = vtb_dest.cod_anag AND " + + " vtb_dest.cod_anag = " + UtilityDB.valueToString(codAnag) + " AND " + + " vtb_dest.cod_vdes = " + UtilityDB.valueToString(codVdes); + List> list = execQuery(conn, query); + if (!list.isEmpty()) { + listino = list.get(0).get("listino"); + } + } + + if (UtilityString.isNullOrEmpty(listino)) { + + query = + "SELECT vtb_clie.cod_vlis as listino " + + " FROM vtb_clie " + + " WHERE vtb_clie.cod_anag = " + UtilityDB.valueToString(codAnag); + List> list = execQuery(conn, query); + if (!list.isEmpty()) { + listino = list.get(0).get("listino"); + } + } + + return listino; + } + + public static void completeDatiSpes(Connection conn, EntityBase spese) throws Exception { + String sql = null, untMisServ = null; + PreparedStatement ps; + ResultSet rs; + BigDecimal valUntServ = BigDecimal.ZERO, qtaServ = BigDecimal.ZERO, importoServ = BigDecimal.ZERO, + cambioDivi = BigDecimal.ZERO; + boolean lb_existListServ = false; + boolean isOrdine = false; + + if (spese instanceof DtbOrds) {isOrdine = true;} + String codDivi = (String) DroolsUtil.getEntityFieldValue(spese, "cod_divi"); + String codSpes = (String) DroolsUtil.getEntityFieldValue(spese, "cod_spes"); + String gestione = (String) DroolsUtil.getEntityFieldValue(spese, "gestione"); + String codAnag = (String) DroolsUtil.getEntityFieldValue(spese, "cod_anag"); + String codVdes = (String) DroolsUtil.getEntityFieldValue(spese, "cod_vdes"); + String codProd = (String) DroolsUtil.getEntityFieldValue(spese, "cod_prod"); + BigDecimal qtaProd = (BigDecimal) DroolsUtil.getEntityFieldValue(spese, "qta_prod"); + + if (isOrdine) { + sql = "SELECT gtb_divi.cambio" + " FROM gtb_divi " + " WHERE cod_divi = " + + UtilityDB.valueToString(codDivi); + ps = conn.prepareStatement(sql); + rs = ps.executeQuery(); + if (rs.next()) { + cambioDivi = rs.getBigDecimal(1); + } + } else { + cambioDivi = (BigDecimal) DroolsUtil.getEntityFieldValue(spese, "cambio"); + } + + if (gestione.equals("L")) { + sql = "SELECT jtb_slist.unt_mis_serv, " + + " jtb_slist.val_unt / gtb_divi.cambio * " + cambioDivi.toString() + " as val_unt, " + + " jtb_slist.qta, " + + " round(jtb_slist.val_unt * jtb_slist.qta / gtb_divi.cambio * " + cambioDivi.toString() + ", 2) as importo " + + "FROM jtb_slist, " + + " jtb_sforn, " + + " gtb_divi " + +"WHERE jtb_sforn.cod_anag = jtb_slist.cod_anag AND " + + " jtb_sforn.cod_divi = gtb_divi.cod_divi AND " + + " jtb_slist.cod_prod = " + UtilityDB.valueToString(codProd) + " AND " + + " jtb_slist.cod_anag = " + UtilityDB.valueToString(codProd) + " AND " + + " cod_spes = " + UtilityDB.valueToString(codProd) + " AND " + + " ((jtb_slist.da_qta <= " + UtilityDB.valueToString(qtaProd) + ") AND " + + " (" + UtilityDB.valueToString(qtaProd) + " <= jtb_slist.a_qta))"; + ps = conn.prepareStatement(sql); + rs = ps.executeQuery(); + if (rs.next()) { + lb_existListServ = true; + untMisServ = rs.getString(1); + valUntServ = rs.getBigDecimal(2); + qtaServ = rs.getBigDecimal(3); + importoServ = rs.getBigDecimal(3); + } + } + + if (isOrdine) { + sql = "SELECT gtb_spes.descrizione, " + + " 0 as qta, " + + " round(gtb_spes.importo / cambio_divi_cont * gtb_divi.cambio, 2) as importo ," + + " gtb_spes.cod_aliq as cod_aliq," + + " gtb_spes.unt_mis as unt_mis" + + " FROM gtb_spes, " + + " gtb_divi " + + " WHERE gtb_divi.cod_divi = " + UtilityDB.valueToString(codDivi) + " and " + + " gtb_spes.cod_spes = " + UtilityDB.valueToString(codSpes); + } else { + sql = "SELECT gtb_spes.descrizione,gtb_spes.importo / cambio_divi_cont * " + cambioDivi.toString() + ", " + + " gtb_spes.cod_aliq," + + " unt_mis " + " " + + " FROM gtb_spes " + + " WHERE gtb_spes.cod_divi = gtb_divi.cod_divi and " + + " gtb_spes.cod_spes = " + UtilityDB.valueToString(codSpes); + } + + ps = conn.prepareStatement(sql); + rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(spese, columnName); + + if (columnName.equals("codAliq")) { + sql = "SELECT dbo.f_getCodAliqSpes(" + UtilityDB.valueToString(gestione) + ", " + + UtilityDB.valueToString(codAnag) + ", " + UtilityDB.valueToString(codVdes) + ", " + + UtilityDB.valueToString(codSpes) + ") as cod_spes_aliq"; + + List> list = execQuery(conn, sql); + columnValue = list.get(0).get("cod_spes_aliq").toString(); + } else if (columnName.equals("qta")) { + if (lb_existListServ) { + columnValue = qtaServ; + } + } else if (columnName.equals("valUnt")) { + if (lb_existListServ) { + columnValue = valUntServ; + } + } else if (columnName.equals("importo")) { + if (lb_existListServ) { + columnValue = importoServ; + } + } else if (columnName.equals("untMis")) { + if (lb_existListServ) { + columnValue = untMisServ; + } + } + + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(spese, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + public static BigDecimal completeImportoRiga(Connection connection, EntityBase entity) throws Exception { + BigDecimal impRiga = BigDecimal.ZERO, qta = null, valUnt = null; + Boolean isOrdine = false; + String flagPrzScontati, codDivi = null; + + List sconti = new ArrayList(); + // TODO sante CHIEDERE A MINA SUL CONTROLLO + if (entity instanceof DtbOrdt || entity instanceof WdtbOrdt || entity instanceof DtbOrdr || entity instanceof WdtbOrdr) { + isOrdine = true; + } + + flagPrzScontati = (String) DroolsUtil.getEntityFieldValue(entity, "flag_prz_scontati"); + codDivi = (String) DroolsUtil.getEntityFieldValue(entity, "cod_divi"); + + if (isOrdine) { + qta = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "qta_ord"); + } else { + qta = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "qta_doc"); + } + valUnt = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "val_unt"); + + sconti.add((BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto5")); + sconti.add((BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto6")); + sconti.add((BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto7")); + sconti.add((BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto8")); + + if ("S".equals(flagPrzScontati)) { + sconti.add((BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto1")); + sconti.add((BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto2")); + sconti.add((BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto3")); + } + + impRiga = qta.multiply(valUnt); + + for (BigDecimal sconto : sconti) { + if (sconto != null) { + sconto = BigDecimal.valueOf(1).subtract((sconto.divide(BigDecimal.valueOf(100)))); + impRiga = impRiga.multiply(sconto); + } + } + return CommonRules.roundValue(connection, impRiga, codDivi); + } + + public static void completeDatiProdotto(Connection conn, EntityBase entity) throws Exception { + String codProd = (String) DroolsUtil.getEntityFieldValue(entity, "cod_prod"); + String sql = ""; + + if (entity instanceof DtbOrdt) { + sql = " SELECT jtb_cicl.descrizione_prod as descrizione_prod, " + + " jtb_cicl.descrizione_estesa as descr_estesa_prod, " + + " jtb_cicl.unt_mis_prod, " + + " jtb_cicl.rap_conv_prod, " + + " jtb_cicl.cod_jfas, " + + " ISNULL(mtb_aart.colli_pedana, 0) as colli_pedana " + + " FROM jtb_cicl LEFT OUTER JOIN mtb_aart ON jtb_cicl.cod_prod = mtb_aart.cod_mart " + + " WHERE jtb_cicl.cod_prod = " + UtilityDB.valueToString(codProd); + }else{ + sql = " SELECT jtb_cicl.unt_mis_prod, " + + " jtb_cicl.rap_conv_prod, " + + " jtb_cicl.cod_jfas " + + " FROM jtb_cicl LEFT OUTER JOIN mtb_aart ON jtb_cicl.cod_prod = mtb_aart.cod_mart " + + " WHERE jtb_cicl.cod_prod = " + UtilityDB.valueToString(codProd); + } + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + public static String completeCodAliq(Connection connection, EntityBase entity) throws Exception { + String codDtip = null; + String gestione = (String) DroolsUtil.getEntityFieldValue(entity, "gestione"); + String codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + String codAnag = (String) DroolsUtil.getEntityFieldValue(entity, "cod_anag"); + String codVdes = (String) DroolsUtil.getEntityFieldValue(entity, "cod_vdes"); + String codPromo = (String) DroolsUtil.getEntityFieldValue(entity, "cod_promo"); + BigDecimal sconto5 = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto5"); + BigDecimal sconto6 = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto6"); + BigDecimal sconto7 = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto7"); + BigDecimal sconto8 = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "sconto8"); + + if (entity instanceof WdtbDoct || entity instanceof DtbDoct) { + codDtip = (String) DroolsUtil.getEntityFieldValue(entity, "cod_dtip"); + } + + String sql = "SELECT dbo.f_getCodAliq(" + UtilityDB.valueToString(gestione) + ", " + + UtilityDB.valueToString(codMart) + ", " + UtilityDB.valueToString(codAnag) + ", " + + UtilityDB.valueToString(codVdes) + ", " + UtilityDB.valueToString(codDtip) + ", " + + UtilityDB.valueToString(codPromo) + ", " + UtilityDB.valueToString(sconto5) + ", " + + UtilityDB.valueToString(sconto6) + ", " + UtilityDB.valueToString(sconto7) + ", " + + UtilityDB.valueToString(sconto8) + ") as cod_aliq "; + + Map map = execSingleQuery(connection, sql); + if (map.get("cod_aliq") == null) + return null; + else + return map.get("cod_aliq").toString(); + } + + public static BigDecimal completeValUntPartitaMagLav(Connection conn, EntityBase entity) throws Exception { + String codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + String partitaMag = (String) DroolsUtil.getEntityFieldValue(entity, "partita_mag"); + BigDecimal cambio = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "cambio"); + BigDecimal rapConv = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "rap_conv"); + + String sql = "SELECT round(mtb_partita_mag.costo_unt_um_mag * " + cambio.toString() + " * " + rapConv.toString() + " / cambio_divi_cont, 5) as costo " + + " FROM mtb_partita_mag " + + " WHERE ( mtb_partita_mag.cod_mart = " + UtilityDB.valueToString(codMart) + " ) AND" + + " ( mtb_partita_mag.partita_mag = " + UtilityDB.valueToString(partitaMag) + ")"; + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + return BigDecimal.ZERO; + } else { + return new BigDecimal(list.get(0).get("costo").toString()); + } + } + + public static BigDecimal completeCambioOrd(Connection conn, EntityBase entity) throws Exception { + String codDivi = (String) DroolsUtil.getEntityFieldValue(entity, "cod_divi"); + String sql = "SELECT gtb_divi.cambio FROM gtb_divi WHERE cod_divi = " + UtilityDB.valueToString(codDivi); + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + return BigDecimal.ZERO; + } else { + return new BigDecimal(list.get(0).get("cambio").toString()); + } + } + + public static void completeQta2Qta3(Connection conn, EntityBase entity) throws Exception { + boolean isOrdine = false; + BigDecimal qta2 = BigDecimal.ZERO , qta3 = BigDecimal.ZERO, rapConv2 = BigDecimal.ZERO , rapConv3 = BigDecimal.ZERO, qta = BigDecimal.ZERO; + String sql, untMis2, untMis3, columnName, untMis; + Object columnValue = null; + String[] fields; + + String codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + String partitaMag = (String) DroolsUtil.getEntityFieldValue(entity, "partita_mag"); + BigDecimal rapConv = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "rap_conv"); + if (rapConv == null){rapConv = BigDecimal.ONE;} + if (entity instanceof DtbOrdr) {isOrdine = true;} + + if (isOrdine){ + qta = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "qta_ord"); + untMis = (String) DroolsUtil.getEntityFieldValue(entity, "unt_ord"); + }else{ + qta = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "qta_doc"); + untMis = (String) DroolsUtil.getEntityFieldValue(entity, "unt_doc"); + } + + sql = "SELECT CASE WHEN " + UtilityDB.valueToString(untMis) + " = mtb_aart.unt_mis THEN mtb_aart.unt_mis2 ELSE CASE WHEN " + UtilityDB.valueToString(untMis) + " = mtb_aart.unt_mis2 THEN mtb_aart.unt_mis ELSE mtb_aart.unt_mis2 END END as unt_mis2, " + + "CASE WHEN " + UtilityDB.valueToString(untMis) + " = mtb_aart.unt_mis THEN ISNULL(mtb_partita_mag.rap_conv2, mtb_aart.rap_conv2)ELSE CASE WHEN " + UtilityDB.valueToString(untMis) + " = mtb_aart.unt_mis2 THEN 1 ELSE ISNULL(mtb_partita_mag.rap_conv2, mtb_aart.rap_conv2) END END as rap_conv2, " + + "CASE WHEN " + UtilityDB.valueToString(untMis) + " = mtb_aart.unt_mis THEN mtb_aart.unt_mis3 ELSE CASE WHEN " + UtilityDB.valueToString(untMis) + " = mtb_aart.unt_mis2 THEN mtb_aart.unt_mis3 ELSE mtb_aart.unt_mis END END as unt_mis3, " + + "CASE WHEN " + UtilityDB.valueToString(untMis) + " = mtb_aart.unt_mis THEN ISNULL(mtb_partita_mag.rap_conv3, mtb_aart.rap_conv3) ELSE CASE WHEN " + UtilityDB.valueToString(untMis) + " = mtb_aart.unt_mis2 THEN ISNULL(mtb_partita_mag.rap_conv3, mtb_aart.rap_conv3) ELSE 1 END END as rap_conv3 " + + "FROM mtb_aart LEFT OUTER JOIN mtb_partita_mag ON mtb_aart.cod_mart = mtb_partita_mag.cod_mart AND " + + " mtb_partita_mag.cod_mart = " + UtilityDB.valueToString(partitaMag) + " " + + "WHERE mtb_aart.cod_mart = " + UtilityDB.valueToString(codMart); + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + untMis2 = rs.getString(1); + rapConv2 = rs.getBigDecimal(2); + untMis3 = rs.getString(3); + rapConv3 = rs.getBigDecimal(4); + + if (untMis2 != null && untMis2.length() != 0){ + if (rapConv2.compareTo(BigDecimal.ZERO) > 0){ + qta2 = qta.multiply(rapConv).divide(rapConv2, EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + } + }else{ + qta2 = BigDecimal.ZERO; + } + if (untMis3 != null && untMis3.length() != 0){ + if (rapConv3.compareTo(BigDecimal.ZERO) > 0 ){ + qta3 = qta.multiply(rapConv).divide(rapConv3, EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + } + }else{ + qta3 = BigDecimal.ZERO; + } + + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + columnName = rsmd.getColumnName(i + 1); + if (isOrdine){ + if (columnName.equals("unt_mis2")){columnName = "unt_ord2";columnValue = untMis2;} + if (columnName.equals("unt_mis3")){columnName = "unt_ord3";columnValue = untMis3;} + if (columnName.equals("rap_conv2")){columnName = "qta_ord2";columnValue = qta2;} + if (columnName.equals("rap_conv3")){columnName = "qta_ord3";columnValue = qta3;} + }else{ + if (columnName.equals("unt_mis2") ){columnName = "unt_doc2";columnValue = untMis2;} + if (columnName.equals("unt_mis3")){columnName = "unt_doc3";columnValue = untMis3;} + if (columnName.equals("rap_conv2")){columnName = "qta_doc2";columnValue = qta2;} + if (columnName.equals("rap_conv3")){columnName = "qta_doc3";columnValue = qta3;} + } +// valueEntity = DroolsUtil.getEntityFieldValue(entity, columnName); + fields = new String[] { UtilityString.sqlToField(columnName) }; +// if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + public static String completeCodMartFromCodBarre(Connection conn, EntityBase entity) throws Exception{ + String codMart = null; + + String codBarre = (String) DroolsUtil.getEntityFieldValue(entity, "cod_barre"); + + String sql = + "SELECT cod_mart " + + " FROM mvw_barcode " + + " WHERE cod_barre = " + UtilityDB.valueToString(codBarre); + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + while(rs.next()){codMart = rs.getString(1);} + rs.close();ps.close(); + + return codMart; + } + public static BigDecimal completePrzVendTx(Connection conn, WdtbOrdr row) throws Exception { + BigDecimal valUnt = BigDecimal.ZERO; + + String listino = row.getListino(); + String gestione = row.getGestione(); + String codMart = row.getCodMart(); + String codCol = row.getCodCol(); + String codTagl = row.getCodTagl(); + BigDecimal rapConv = row.getRapConv(); + + if (CommonConstants.ULTC.equals(listino)){ + // ACQUISIZIONE COSTO ULTIMO +// getCostoUltimo(conn, codMart, dataOrd, codMdep); +// valUnt = InfoCosti.getCostoUltimo() * rapConv; + valUnt = CommonRules.completeValUntULTC(conn, row); + }else if (CommonConstants.CMPPF.equals(listino)) { + //TODO Rosanna completare prezzo - da costo di Anagrafica + // COSTO DA ANAGRAFICA +// calcCostoArticolo(getProfileDB(), codMart, codCol, codTagl, cambioDiviCont); +// valUnt = InfoCosti.getCostoUltimo() * rapConv; + valUnt = BigDecimal.ONE; + }else{ + // ACQUISIZIONE PREZZO DI VENDITA + if ("V".equals(gestione)) { + BigDecimal przVend = BigDecimal.ZERO; + String sql = "select dbo.f_CalcPrzTextiles("+UtilityDB.valueToString(codMart)+", "+ + UtilityDB.valueToString(codCol) +", "+ UtilityDB.valueToString(codTagl) + ", " + + UtilityDB.valueToString(listino) + ", 'N') as prz_vend"; + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + przVend = rs.getBigDecimal("prz_vend"); + } + rs.close(); + ps.close(); + + valUnt= przVend.multiply(rapConv); + } + } + + // row.setValUnt(valUnt); + return valUnt; + } + +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/DocumentCheckRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/DocumentCheckRules.java new file mode 100644 index 0000000000..3d70c413c7 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/DocumentCheckRules.java @@ -0,0 +1,407 @@ +package it.integry.ems.rules.completing; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Statement; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import it.integry.common.var.CommonConstants; +import it.integry.ems.entity.Azienda; +import it.integry.ems.entity.DtbDoct; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +public class DocumentCheckRules { + private static void checkDataMov (Date dataCmov, DtbDoct entity, Connection conn) throws Exception{ + SimpleDateFormat annoFormat = new SimpleDateFormat("yyyy"); + SimpleDateFormat dateformat = new SimpleDateFormat("dd-MMM-yyyy"); + + // ACQUISIZIONE DATI AZIENDA + List> DatiAzi = Azienda.getDatiAzienda(conn); + Integer annoAtt = new Integer(DatiAzi.get(0).get("anno_attuale").toString()); + Integer annoContab = new Integer(DatiAzi.get(0).get("anno_contab").toString()); + Date ultDataGio = dateformat.parse(DatiAzi.get(0).get("ult_data_gio").toString()); + Integer annoMov = Integer.valueOf(annoFormat.format(dataCmov)).intValue(); + Integer numIreg = entity.getNumIreg(); + String codIreg = entity.getCodIreg(); + + // CONTROLLO DATA MOVIMENTO + if (!annoMov.equals(annoContab) && !annoMov.equals(annoAtt)){ + throw new Exception("Data movimento non ammessa ("+UtilityDB.valueDateToString(dataCmov,CommonConstants.DATE_FORMAT_DMY) + "). Anno Contabile: "+ annoContab + " Anno Attuale: " + annoAtt); + } + // CONTROLLO DATA GIORNALE BOLLATO + if (ultDataGio != null){ + if (dataCmov != null && dataCmov.before(ultDataGio) == true){ + throw new Exception("La data deve essere superiore all'ultima data stampata su giornale bollato"); + } + } + // CONTROLLO DATA REGISTRO IVA BOLLATO + if (codIreg != null){ + String query; + PreparedStatement info; + ResultSet res; + Date ultDataIva = null; + query = + "SELECT ult_data_stp " + + " FROM ctb_inum " + + " WHERE cod_ireg = " + UtilityDB.valueToString(codIreg) + " AND " + + " num_ireg = " + UtilityDB.valueToString(numIreg) + " AND " + + " anno = " + UtilityDB.valueToString(annoMov); + info = conn.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + res = info.executeQuery(); + while(res.next()){ultDataIva = res.getDate(1);} + res.close();info.close(); + + if (ultDataIva != null){ + if ((dataCmov.before(ultDataIva)== true || dataCmov.equals(ultDataIva) == true )){ + throw new Exception("La data deve essere superiore all'ultima data stampata sul registro IVA bollato"); + } + }else{ + throw new Exception("Ultima data stampata sul registro bollato (" + codIreg + " n. " + numIreg + ") non corretta"); + } + } + } + + private static void checkData (Date dataDoc, DtbDoct entity, Connection conn) throws Exception { + Integer ggUtili = 0; + SimpleDateFormat annoFormat = new SimpleDateFormat("yyyy"); + Date dataNow = new Date(); + + // ACQUISIZION DATI DOCUMENTO + String codCcau = entity.getCodCcau();; + String codIreg = entity.getCodIreg(); + + // VALORIZZAZIONE VARIABILI + List> DatiAzi = Azienda.getDatiAzienda(conn); + Integer annoAtt = new Integer(DatiAzi.get(0).get("anno_attuale").toString()); + Integer annoMagaz = new Integer(DatiAzi.get(0).get("anno_magaz").toString()); + if (DatiAzi.get(0).get("gg_utili") != null){ggUtili = new Integer(DatiAzi.get(0).get("gg_utili").toString());} + Integer annoComp = Integer.valueOf(annoFormat.format(dataDoc)).intValue(); + Integer giorni = UtilityString.daysAfter(dataDoc, dataNow); + + /*MODIFICA CON GESTIONE DEL SEGNO_LIQUID*/ + + // CONTROLLO DATA MOVIMENTO + if (codIreg != null){ + checkDataMov(dataDoc, entity , conn); + } + // CONTROLLO DATA DOCUMENTO + if (!annoComp.equals(annoMagaz) && !annoComp.equals(annoAtt)){ + throw new Exception("Data non ammessa. Anno documento diverso da anno magazzino e anno attuale."); + } + // CONTROLLO GIORNI UTILI PER LA MODIFICA + if (ggUtili != 0 && ggUtili > 0 && codCcau != null){ + if (giorni > ggUtili){ + throw new Exception("Data non ammessa. Giorni utili per la modifica " + ggUtili + "."); + } + } + } + + public static void checkDocInSequenza(Connection conn, DtbDoct entity) throws Exception { + + } + + public static Boolean checkDataDoc(Connection conn, DtbDoct entity) throws Exception { + String sql; + Date dataRegNew = null; + PreparedStatement info; + ResultSet res; + SimpleDateFormat annoFormat = new SimpleDateFormat("yyyy"); + + // ACQUISIZIONE DATI CHIAVE + String codAnag = entity.getCodAnag(); + String codDtip = entity.getCodDtip(); + Date dataDoc = entity.getDataDoc(); + String serDoc = entity.getSerDoc(); + Integer numDoc = entity.getNumDoc(); + Date dataReg = entity.getDataReg(); + String gestione = entity.getGestione(); + + // ACQUISIZIONE EVENTUALE NUOVA CHIAVE + if (! UtilityString.isNullOrEmpty(entity.getOtherSet())) { + Map mapHeader = entity.getEntityHolder().getOtherSetCondition(entity.getOtherSet()); + for (Map.Entry entry : mapHeader.entrySet()) { + String fieldName = entry.getKey(); + if(mapHeader.get(fieldName) != null) { + String fieldValue = mapHeader.get(fieldName).replace("'", ""); + if( "COD_ANAG".equals(fieldName)){ + codAnag = fieldValue; + } else if( "COD_DTIP".equals(fieldName)){ + codDtip = fieldValue; + } else if( "DATA_DOC".equals(fieldName)){ + dataDoc = UtilityString.parseDate(fieldValue); + } else if( "SER_DOC".equals(fieldName)){ + serDoc = fieldValue; + } else if( "NUM_DOC".equals(fieldName)){ + numDoc = Integer.valueOf(fieldValue); + } + } + } + } + + // ACQUSIZIONE DATI DOCUMENTO + if (dataReg == null){ + sql = + "SELECT data_reg " + + " FROM dtb_doct" + + " WHERE cod_anag = " + UtilityDB.valueToString(codAnag) + " AND " + + " cod_dtip = " + UtilityDB.valueToString(codDtip) + " AND " + + " data_doc = " + UtilityDB.valueDateToString(dataDoc, CommonConstants.DATE_FORMAT_YMD) + " AND " + + " ser_doc = " + UtilityDB.valueToString(serDoc) + " AND " + + " num_doc = " + UtilityDB.valueToString(numDoc); + info = conn.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + res = info.executeQuery(); + while(res.next()){ + dataRegNew = res.getDate(1); + } + res.close();info.close(); + }else{ + dataRegNew = dataReg; + } + + // CONTROLLO CONGRUITA DATA DOCUMENTO-REGISTRO + if (dataReg != null ){ + if (!"V".equals(gestione) && dataReg.before(dataDoc)){ + String rifDoc = " (DOC. N° " + numDoc + "/" + serDoc + " DEL " + UtilityDB.valueDateToString(dataDoc,CommonConstants.DATE_FORMAT_DMY) + " INTESTATO A " + codAnag + ")"; + throw new Exception("DATA REGISTRAZIONE MINORE DI DATA DOCUMENTO" + rifDoc); + } + } + + // CONTROLLO DATA DOCUMENTO\REGISTRAZIONE + if ("V".equals(gestione)){ + dataRegNew = dataDoc; + if (dataReg == null){ + if (entity.getOperation() != OperationType.DELETE){ + throw new Exception("Data documento non valida (NULL)." + + "Se si tratta di una fattura differita verificare che esiste il documento intestato a " + codAnag + " " + codDtip + + "del " + UtilityDB.valueDateToString(dataDoc,CommonConstants.DATE_FORMAT_DMY) + " " + serDoc + " / " + numDoc + + "oppure se si tratta di una sincronizzazione verificare che la bolla non si riferisca ad un deposito diverso rispetto a quello di testata del documento differito"); + } + }else{ + checkData (dataReg, entity, conn); + } + }else{ + if (dataReg == null){ + if (entity.getOperation() != OperationType.DELETE){ + throw new Exception("Data registrazione documento non valida (NULL)." + + "Se si tratta di una fattura differita verificare che esiste il documento intestato a " + codAnag + " " + codDtip + + " del " + UtilityDB.valueDateToString(dataDoc,CommonConstants.DATE_FORMAT_DMY) + " " + serDoc + " / " + numDoc + + " oppure se si tratta di una sincronizzazione verificare che la bolla non si riferisca ad un deposito diverso rispetto a quello di testata del documento differito"); + } + }else{ + checkData (dataReg, entity, conn); + } + } + + List> DatiAzi = Azienda.getDatiAzienda(conn); + Integer annoDoc = Integer.valueOf(annoFormat.format(dataRegNew)).intValue(); + Integer annoCont = new Integer(DatiAzi.get(0).get("anno_contab").toString()); + Integer annoAtt = new Integer(DatiAzi.get(0).get("anno_attuale").toString()); + if (!(annoDoc.equals(annoCont) || annoDoc.equals(annoAtt))){ + throw new Exception("Data non ammessa"); + } + + /* Gestire controllo su movimento contabile */ + if (entity.getOperation() != OperationType.DELETE ){ + + } + + return true; + } + + public static Boolean checkExistDoc(Connection conn, DtbDoct entity) throws Exception { + Integer numDocOld = null; + String codVdes, sql = ""; + boolean returnVal = false; + Statement cmd; + ResultSet res; + PreparedStatement info; + SimpleDateFormat annoFormat = new SimpleDateFormat("yyyy"); + + // ACQUISIZIONE DATI CHIAVE OLD (E' LA CHIAVE VECCHIA SE OTHERSET E' VALORIZZATA) + String codAnagOld = entity.getCodAnag(); + String codDtipOld = entity.getCodDtip(); + Date dataDocOld = entity.getDataDoc(); + String serDocOld = entity.getSerDoc(); + numDocOld = entity.getNumDoc(); + + // ACQUISIZIONE DATI CHIAVE NUOVA (E' UGUALE ALL'EVENTUALE VECCHIA DATA, MA SE VI E' UN OTHERSET IMPOOSTATO VERRANNO MODIFICATI I DATI CON LA NUOVA CHIAVE) + String codAnag = entity.getCodAnag(); + String codDtip = entity.getCodDtip(); + Date dataDoc = entity.getDataDoc(); + String serDoc = entity.getSerDoc(); + Integer numDoc = entity.getNumDoc(); + + // ACQUISIZIONE EVENTUALE NUOVA CHIAVE + if (! UtilityString.isNullOrEmpty(entity.getOtherSet())) { + Map mapHeader = entity.getEntityHolder().getOtherSetCondition(entity.getOtherSet()); + for (Map.Entry entry : mapHeader.entrySet()) { + String fieldName = entry.getKey(); + if(mapHeader.get(fieldName) != null) { + String fieldValue = mapHeader.get(fieldName).replace("'", ""); + if( "COD_ANAG".equals(fieldName)){ + codAnag = fieldValue; + } else if( "COD_DTIP".equals(fieldName)){ + codDtip = fieldValue; + } else if( "DATA_DOC".equals(fieldName)){ + dataDoc = UtilityString.parseDate(fieldValue); + } else if( "SER_DOC".equals(fieldName)){ + serDoc = fieldValue; + } else if( "NUM_DOC".equals(fieldName)){ + numDoc = Integer.valueOf(fieldValue); + } + } + } + } + + // ACQUISIZIONE DATI TIPO DOCUMENTO + Integer annoDoc = Integer.valueOf(annoFormat.format(entity.getDataDoc())).intValue(); + String codIreg = entity.getCodIreg(); + Integer numIreg = entity.getNumIreg(); + String tipoNumeraz = entity.getTipoNumeraz(); + String tipoEmissione = entity.getTipoEmissione(); + String codCcau = entity.getCodCcau(); + String gestione = entity.getGestione(); + boolean isDbInfragruppo = Azienda.isDbInfragruppo(conn); + + // TODO DA TESTATE QUANDO SI IMPLEMENTA IL SALVATAGGIO DEI DOCUMENTI DI VENDITA + if (isDbInfragruppo && "V".equals(gestione) && UtilityString.streNull(codCcau).length() == 0 && + (!"MANUALE".equals(tipoNumeraz)) && entity.getOperation() == OperationType.INSERT){ + sql = + "SELECT dtb_doct.cod_dtip " + + " FROM dtb_doct " + + " WHERE dtb_doct.cod_dtip = " + UtilityDB.valueToString(codDtip) + " AND " + + " dtb_doct.data_doc = " + UtilityDB.valueDateToString(dataDoc, CommonConstants.DATE_FORMAT_YMD) + " AND " + + " dtb_doct.ser_doc = " + UtilityDB.valueToString(serDoc) + " AND " + + " dtb_doct.num_doc = " + UtilityDB.valueToString(numDoc ) + " AND " + + " dtb_doct.cod_anag = " + UtilityDB.valueToString(codAnag ); + cmd = conn.createStatement(); + res = cmd.executeQuery(sql); + if (res.next()){returnVal = true;} + res.close();cmd.close(); + } else { + if (!"MANUALE".equals(tipoNumeraz)){ + // IN CASO DI NUMERAZIONE AUTOMATICA O PROPOSTA VIENE CONTROLLATA L'ESISTENZA DEL DOCUMENTO NELL'ANNO, + // NEL REGISTRO, NELLA SERIE E NEL NUMERO DEL DOCUMENTO CHE SI STA SALVANDO + int count = 0; + sql = + "SELECT cod_anag, " + + " dtb_doct.cod_dtip, " + + " data_doc, " + + " ser_doc, " + + " num_doc " + + " FROM dtb_doct, " + + " dtb_tipi " + + " WHERE dtb_doct.cod_dtip = dtb_tipi.cod_dtip and " + + " dtb_tipi.cod_ireg = " + UtilityDB.valueToString(codIreg) + " AND " + + " dtb_tipi.num_ireg = " + UtilityDB.valueToString(numIreg) + " AND " + + " Datepart(year, dtb_doct.data_doc) = " + UtilityDB.valueToString(annoDoc) + " AND " + + " ser_doc = " + UtilityDB.valueToString(serDoc) + " AND " + + " num_doc = " + UtilityDB.valueToString(numDoc); + + info = conn.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + res = info.executeQuery(); + while(res.next()){ + count++; + codAnag = res.getString(1); + codDtip = res.getString(2); + dataDoc = res.getDate(3); + serDoc = res.getString(4); + numDoc = res.getInt(5); + } + res.close();info.close(); + + if (count == 0){ + returnVal = false; // IL DOCUMENTO NON ESISTE NEL DATABASE + }else{ + // IL DOCUMENTO ESISTE NEL DATABASE + if (codAnagOld != null){ + if (codAnag.equals(codAnagOld) && codDtip.equals(codDtipOld) && + dataDoc.equals(dataDocOld) && serDoc.equals(serDocOld) && + numDoc.equals(numDocOld)){ + returnVal = false; // IL DOCUMENTO ESISTENTE è QUELLO IN CORSO DI VARIAZIONE + }else{ + returnVal = true; // IL DOCUMENTO ESISTENTE NON è QUELLO IN CORSO DI VARIAZIONE + } + }else{ + returnVal = true; // IL DOCUMENTO ESISTENTE NON è QUELLO IN CORSO DI VARIAZIONE + } + } + }else{ + // IN CASO DI NUMERAZIONE MANUALE VIENE CONTROLLATA L'ESISTENZA DEL DOCUMENTO NELL'ANNO, NEL TIPO, NELLA SERIE, + // NEL NUMERO E NEL CLI/FOR DEL DOCUMENTO CHE SI STA SALVANDO SOLO SE SI TRATTA DI ACQUISTI DEVE CONTROLLARE ANCHE + // IL DESTINARIO MERCE (MITTENTE PER ACQUISTi) NECESSARIO PER CHI GESTISCE LA RIFATTURAZIONE + Integer count = 0; + if ("DIRETTA".contentEquals(tipoEmissione) && codCcau == null && "A".equals(gestione)){ + if (!UtilityString.streNull(entity.getCodVdes()).equals("") ){ + codVdes = UtilityDB.valueToString(UtilityString.streNull(entity.getCodVdes())); + }else{ + codVdes = "'" + UtilityString.streNull(entity.getCodVdes()) + "'"; + } + + sql = + "SELECT cod_anag, " + + " dtb_doct.cod_dtip, " + + " data_doc, " + + " ser_doc, " + + " num_doc " + + " FROM dtb_doct " + + " WHERE cod_anag = " + UtilityDB.valueToString(codAnag) + " AND " + + " cod_dtip = " + UtilityDB.valueToString(codDtip) + " AND " + + " Datepart(year, dtb_doct.data_doc) = " + UtilityDB.valueToString(annoDoc) + " AND " + + " ser_doc = " + UtilityDB.valueToString(serDoc) + " AND " + + " num_doc = " + UtilityDB.valueToString(numDoc) + " AND " + + " IsNull(cod_vdes, '') = " + codVdes; + }else{ + sql = + "SELECT cod_anag, " + + " dtb_doct.cod_dtip, " + + " data_doc, " + + " ser_doc, " + + " num_doc " + + " FROM dtb_doct " + + " WHERE cod_anag = " + UtilityDB.valueToString(codAnag) + " AND " + + " cod_dtip = " + UtilityDB.valueToString(codDtip) + " AND " + + " Datepart(year, dtb_doct.data_doc) = " + UtilityDB.valueToString(annoDoc) + " AND " + + " ser_doc = " + UtilityDB.valueToString(serDoc) + " AND " + + " num_doc = " + UtilityDB.valueToString(numDoc); + } + info = conn.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + res = info.executeQuery(); + while(res.next()){ + count++; + codAnag = res.getString(1); + codDtip = res.getString(2); + dataDoc = res.getDate(3); + serDoc = res.getString(4); + numDoc = res.getInt(5); + } + res.close();info.close(); + + if (count == 0){ + returnVal = false; // IL DOCUMENTO NON ESISTE NEL DATABASE + }else{ + if (codAnagOld != null){ + if (codAnag.equals(codAnagOld) && codDtip.equals(codDtipOld) && dataDoc.equals(dataDocOld) && serDoc.equals(serDocOld) && numDoc.equals(numDocOld)){ + returnVal = false; // IL DOCUMENTO ESISTENTE è QUELLO IN CORSO DI VARIAZIONE + }else{ + returnVal = true; // IL DOCUMENTO ESISTENTE NON è QUELLO IN CORSO DI VARIAZIONE + } + }else{ + returnVal = true; // IL DOCUMENTO ESISTENTE NON è QUELLO IN CORSO DI VARIAZIONE + } + } + } + } + if (returnVal == true){ + throw new Exception("DOCUMENTO INTESTATO A " + entity.getCodAnag() + " - " + entity.getCodDtip() + " N. " + entity.getNumDoc().toString() + "/" + entity.getSerDoc() + " DEL " + UtilityDB.valueDateToString(entity.getDataDoc(),CommonConstants.DATE_FORMAT_DMY) + " GIA' ESISTENTE"); + } + + return returnVal; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/DocumentRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/DocumentRules.java new file mode 100644 index 0000000000..4bb1987ac2 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/DocumentRules.java @@ -0,0 +1,489 @@ +package it.integry.ems.rules.completing; + +import java.math.BigDecimal; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Types; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; +import it.integry.common.var.CommonConstants; +import it.integry.ems.base.EntityBase; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.entity.CtbMovt; +import it.integry.ems.entity.DtbDocr; +import it.integry.ems.entity.DtbDoct; +import it.integry.ems.entity.MtbPartitaMag; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +public class DocumentRules extends QueryRules { + public static Integer completeNumDoc (Connection conn, DtbDoct entity) throws SQLException { + Date dataDoc = null; + String codIreg = null, serDoc = null, tipoNumeraz = null; + Integer numIreg = null, numDoc; + + dataDoc = entity.getDataDoc(); + serDoc = entity.getSerDoc(); + tipoNumeraz = entity.getTipoNumeraz(); + codIreg = entity.getCodIreg(); + numIreg = entity.getNumIreg(); + numDoc = entity.getNumDoc(); + if (numDoc == null){numDoc = 0;} + + if ("AUTOMATICA".equals(tipoNumeraz) || "PROPOSTA".equals(tipoNumeraz)) { + numDoc = nextNumDoc(conn, dataDoc, codIreg, serDoc, numIreg, numDoc); + } else { + numDoc = 0; + } + + return numDoc; + } + + public static Integer nextNumDoc(Connection conn, Date dataDoc, String codIreg, String serDoc, Integer numIreg, Integer numDoc) throws SQLException { + + Short anno = new Short(new SimpleDateFormat("yyyy").format(dataDoc)); + + CallableStatement cs = conn.prepareCall("{call dbo.NextNumDoc(?, ?, ?, ?, ?)}"); + + cs.setShort(1, anno); + cs.setString(2, codIreg); + cs.setInt(3, numIreg); + cs.setString(4, serDoc); + cs.setInt(5, numDoc); + cs.registerOutParameter(5, Types.INTEGER); + cs.execute(); + numDoc = (Integer) cs.getObject(5); + + + return numDoc; + } + + public static void completeDatiTipoDoc (Connection conn, EntityBase entity) throws Exception { + + String codDtip = (String) DroolsUtil.getEntityFieldValue(entity, "cod_dtip"); + + String sql = + "SELECT gestione, tipo_numeraz, cod_ireg, num_ireg, tipo_anag, causale_trasp, aspetto_beni, prevista_fat, flag_prz_iva, tipo_emissione, flag_costo, cod_ccau "+ + " FROM dtb_tipi " + + " WHERE dtb_tipi.cod_dtip = " + UtilityDB.valueToString(codDtip); + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + public static String completeGeneraMovCont (Connection conn, DtbDoct entity) throws Exception { + String codCcau = null; + String codDtip = entity.getCodDtip(); + + String sql = + "SELECT IsNull(cod_ccau, cod_ccau_ant) as cod_ccau "+ + " FROM dtb_tipi " + + " WHERE dtb_tipi.cod_dtip = " + UtilityDB.valueToString(codDtip); + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + codCcau = rs.getString(1); + } + + rs.close(); + ps.close(); + + String generaMovCont = "N"; + if (!UtilityString.isNullOrEmpty(codCcau)){ + generaMovCont = "S"; + } + return generaMovCont; + } + + + public static String completeCodCcon (Connection conn, DtbDocr entity) throws Exception { + String codCcon = null; + PreparedStatement ps; + ResultSet rs; + String codDtip = entity.getCodDtip(); + String codMart = entity.getCodMart(); + String gestione = entity.getGestione(); + + String sql = ""; + if (!UtilityString.isNullOrEmpty(codMart)) { + sql = + "SELECT CASE WHEN "+ UtilityDB.valueToString(gestione) + " = 'A' " + + " THEN mtb_aart.cod_ccon_costi ELSE cod_ccon_ricavi END " + + " FROM mtb_aart " + + " WHERE mtb_aart.cod_mart = " + UtilityDB.valueToString(codMart); + + ps = conn.prepareStatement(sql); + rs = ps.executeQuery(); + if (rs.next()) { + codCcon = rs.getString(1); + } + + rs.close(); + ps.close(); + } + + if (UtilityString.isNullOrEmpty(codCcon)) { + sql = + "SELECT controp_default "+ + " FROM dtb_tipi " + + " WHERE dtb_tipi.cod_dtip = " + UtilityDB.valueToString(codDtip); + + ps = conn.prepareStatement(sql); + rs = ps.executeQuery(); + if (rs.next()) { + codCcon = rs.getString(1); + } + + rs.close(); + ps.close(); + } + + return codCcon; + } + + public static String completeCodJfas (Connection conn, EntityBase entity) throws Exception { + String codMdep = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mdep"); + + String sql = "SELECT cod_jfas FROM mtb_depo WHERE cod_mdep = " + UtilityDB.valueToString(codMdep); + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + return ""; + } else { + return list.get(0).get("cod_jfas")/*.toString()*/; + } + } + + public static String completeSerDoc (Connection conn, EntityBase entity) throws Exception { + String serDoc = null; + PreparedStatement ps; + ResultSet rs; + + String codDtip = (String) DroolsUtil.getEntityFieldValue(entity, "cod_dtip"); + String codMdep = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mdep"); + String codIreg = (String) DroolsUtil.getEntityFieldValue(entity, "cod_ireg"); + Integer numIreg = (Integer) DroolsUtil.getEntityFieldValue(entity, "num_ireg"); + Date dataDoc = (Date) DroolsUtil.getEntityFieldValue(entity, "data_doc"); + + String sql = + "SELECT case when dtb_tipi.flag_ser_depo = 'S' THEN (select serie from mtb_depo where cod_mdep = " + UtilityDB.valueToString(codMdep) + ") else dtb_tipi.serie end " + + " FROM dtb_tipi " + + " WHERE dtb_tipi.cod_dtip = " + UtilityDB.valueToString(codDtip); + + ps = conn.prepareStatement(sql); + rs = ps.executeQuery(); + + if (rs.next()) { + serDoc = rs.getString(1); + } + + rs.close();ps.close(); + + + if (UtilityString.isNullOrEmpty(serDoc)){ + Short anno = new Short(new SimpleDateFormat("yyyy").format(dataDoc)); + + sql = + "SELECT min(ser_doc) " + + " FROM dtb_inum " + + " WHERE anno = " + UtilityDB.valueToString(anno) + " AND " + + " cod_ireg = " + UtilityDB.valueToString(codIreg) + " AND " + + " num_ireg = " + UtilityDB.valueToString(numIreg); + ps = conn.prepareStatement(sql); + rs = ps.executeQuery(); + + if (rs.next()) { + serDoc = rs.getString(1); + } + + rs.close();ps.close(); + } + if (UtilityString.isNullOrEmpty(serDoc)){serDoc = "/";} + + return serDoc; + } + + public static Date completeDataReg(Connection conn, EntityBase entity) throws Exception { + Date dataDoc = (Date) DroolsUtil.getEntityFieldValue(entity, "data_doc"); + return dataDoc; + } + + public static BigDecimal completeCostoUntDocA(Connection conn, DtbDocr entity) throws SQLException { + String listino = entity.getListino(); + BigDecimal costoUnt = BigDecimal.ZERO; + + BigDecimal sconto1 = entity.getSconto1(); + BigDecimal sconto2 = entity.getSconto2(); + BigDecimal sconto3 = entity.getSconto3(); + BigDecimal sconto4 = entity.getSconto4(); + BigDecimal sconto5 = entity.getSconto5(); + BigDecimal sconto6 = entity.getSconto6(); + BigDecimal sconto7 = entity.getSconto7(); + BigDecimal sconto8 = entity.getSconto8(); + BigDecimal percOneri = entity.getPercOneri(); + BigDecimal valOneri = entity.getValOneri(); + BigDecimal valUnt = entity.getValUnt(); + + if (!UtilityString.isNullOrEmpty(listino) && !CommonConstants.ULTC.equals(listino)){ + String sql = + "SELECT dbo.f_calcPrzNettoAcq( " + UtilityDB.valueToString(listino) + ", " + + " atb_list.expression_costo, " + + UtilityDB.valueToString(sconto1) + ", " + + UtilityDB.valueToString(sconto2) + ", " + + UtilityDB.valueToString(sconto3) + ", " + + UtilityDB.valueToString(sconto4) + ", " + + UtilityDB.valueToString(sconto5) + ", " + + UtilityDB.valueToString(sconto6) + ", " + + UtilityDB.valueToString(sconto7) + ", " + + UtilityDB.valueToString(sconto8) + ", " + + UtilityDB.valueToString(entity.getPercPromo()) + ", " + + UtilityDB.valueToString(entity.getValPromo()) + ", " + + UtilityDB.valueToString(percOneri) + ", " + + UtilityDB.valueToString(valOneri) + ", " + + UtilityDB.valueToString(valUnt) + ") " + + " FROM atb_list WHERE atb_list.cod_alis = " + UtilityDB.valueToString(listino); + + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + costoUnt = rs.getBigDecimal(1); + } + rs.close();ps.close(); + + } else if (CommonConstants.ULTC.equals(listino)){ + sconto1 = BigDecimal.ONE.subtract(sconto1.divide(CommonConstants.CENTO)); + sconto2 = BigDecimal.ONE.subtract(sconto2.divide(CommonConstants.CENTO)); + sconto3 = BigDecimal.ONE.subtract(sconto3.divide(CommonConstants.CENTO)); + sconto4 = BigDecimal.ONE.subtract(sconto4.divide(CommonConstants.CENTO)); + sconto5 = BigDecimal.ONE.subtract(sconto5.divide(CommonConstants.CENTO)); + sconto6 = BigDecimal.ONE.subtract(sconto6.divide(CommonConstants.CENTO)); + sconto7 = BigDecimal.ONE.subtract(sconto7.divide(CommonConstants.CENTO)); + sconto8 = BigDecimal.ONE.subtract(sconto8.divide(CommonConstants.CENTO)); + percOneri = BigDecimal.ONE.add(percOneri.divide(CommonConstants.CENTO)); + + costoUnt = valUnt.multiply(sconto1); + costoUnt = costoUnt.multiply(sconto2); + costoUnt = costoUnt.multiply(sconto3); + costoUnt = costoUnt.multiply(sconto4); + costoUnt = costoUnt.multiply(sconto5); + costoUnt = costoUnt.multiply(sconto6); + costoUnt = costoUnt.multiply(sconto7); + costoUnt = costoUnt.multiply(sconto8); + costoUnt = costoUnt.multiply(percOneri); + costoUnt = costoUnt.add(valOneri); + } + + return costoUnt; + } + + public static BigDecimal completeCostoUntDocL(Connection conn, DtbDocr entity) throws SQLException { + BigDecimal costoUnt = BigDecimal.ZERO; + + BigDecimal sconto1 = entity.getSconto1(); + BigDecimal sconto2 = entity.getSconto2(); + BigDecimal sconto3 = entity.getSconto3(); + BigDecimal sconto4 = entity.getSconto4(); + BigDecimal percOneri = entity.getPercOneri(); + BigDecimal valOneri = entity.getValOneri(); + BigDecimal valUnt = entity.getValUnt(); + BigDecimal rapConv = entity.getRapConv(); + String flagCosto = entity.getFlagCosto(); + String tipoEmissione = entity.getTipoEmissione(); + String codMdep = entity.getCodMdep(); + String codMart = entity.getCodMart(); + Date dataReg = entity.getDataReg(); + if (valOneri == null){valOneri = BigDecimal.ZERO;} + if (percOneri == null){percOneri = BigDecimal.ZERO;} + if (valUnt == null){valUnt = BigDecimal.ZERO;} + if (rapConv == null){rapConv = BigDecimal.ONE;} + + if ("S".equals(flagCosto)){ + sconto1 = BigDecimal.ONE.subtract(sconto1.divide(CommonConstants.CENTO)); + sconto2 = BigDecimal.ONE.subtract(sconto2.divide(CommonConstants.CENTO)); + sconto3 = BigDecimal.ONE.subtract(sconto3.divide(CommonConstants.CENTO)); + sconto4 = BigDecimal.ONE.subtract(sconto4.divide(CommonConstants.CENTO)); + percOneri = BigDecimal.ONE.add(percOneri.divide(CommonConstants.CENTO)); + + costoUnt = valUnt.multiply(sconto1); + costoUnt = costoUnt.multiply(sconto2); + costoUnt = costoUnt.multiply(sconto3); + costoUnt = costoUnt.multiply(sconto4); + costoUnt = costoUnt.multiply(percOneri); + costoUnt = costoUnt.add(valOneri); + }else{ + if ("DIRETTA".equals(tipoEmissione)){ + String sql = "SELECT dbo.f_getCostoCriterioValGrup(" + + UtilityDB.valueToString(codMart) + "," + + UtilityDB.valueDateToString(dataReg, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(codMdep) + ") as costo"; + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + costoUnt = rs.getBigDecimal(1); + if (costoUnt == null){costoUnt = BigDecimal.ZERO;} + } + rs.close();ps.close(); + costoUnt = costoUnt.multiply(rapConv); + } + } + + return costoUnt; + } + + public static void completeDatiDocComp(Connection conn, DtbDocr entity) { + //TODO -MINA: parlare con Sante e Fabio per cambio chiave + if (UtilityString.isNullOrEmpty(entity.getCodDtipComp())){ + entity.setCodDtipComp(entity.getCodDtip()); + } + if (UtilityString.isNullOrEmpty(entity.getCodAnagComp())){ + entity.setCodAnagComp(entity.getCodAnag()); + } + if (entity.getDataDocComp() == null){ + entity.setDataDocComp(entity.getDataDoc()); + } + if (UtilityString.isNullOrEmpty(entity.getSerDocComp())){ + entity.setSerDocComp(entity.getSerDoc()); + } + if (entity.getNumDocComp() == null ){ + entity.setNumDocComp(entity.getNumDoc()); + } + } + + public static void completeDatiDocVal(Connection conn, DtbDoct entity) { + String previstaFat = entity.getPrevistaFat(); + if ("N".equals(previstaFat)){ + entity.setCodDtipVal(entity.getCodDtip()); + entity.setDataDocVal(entity.getDataDoc()); + entity.setSerDocVal(entity.getSerDoc()); + entity.setNumDocVal(entity.getNumDoc()); + }else{ + entity.setCodDtipVal(EmsRestConstants.NULL); + entity.setDataDocVal(EmsRestConstants.DATE_NULL); + entity.setSerDocVal(EmsRestConstants.NULL); + entity.setNumDocVal(EmsRestConstants.INTEGER_NULL); + } + } + + public static MtbPartitaMag insertPartitaMag(Connection conn, DtbDocr entity) throws Exception{ + MtbPartitaMag mtbPartitaMag = new MtbPartitaMag(); + mtbPartitaMag.setOperation(OperationType.INSERT_OR_UPDATE); + mtbPartitaMag.setCodMart(entity.getCodMart()); + mtbPartitaMag.setPartitaMag(entity.getPartitaMag()); + if (entity.getDataScad() != null){ + mtbPartitaMag.setDataScad(entity.getDataScad()); + } + + return mtbPartitaMag; + } + + public static void regMovCont(Connection conn, DtbDoct dtbDoct) throws Exception{ + String query, codCcau = null, dareAvere, contropDefault, tipoRiep, codIreg = null, codCcauAnt, + flagivainclusa, codCconAnt, codCconCassaDoc, codAliqSplit; + Integer numIreg = null, numProt = null; + PreparedStatement ps; + ResultSet rs; + CtbMovt ctbMovt = new CtbMovt(); + + //TODO -MINA: Aggiungere il calcolo dei totali che ci permette di ricalcolare e creare il castelletto iva + + Date dataReg = dtbDoct.getDataReg(); + Date dataDoc = dtbDoct.getDataDoc(); + String tipoAnag = dtbDoct.getTipoAnag(); + String codAnag = dtbDoct.getCodAnag(); + String codDtip = dtbDoct.getCodDtip(); + String serDoc = dtbDoct.getSerDoc(); + Integer numDoc = dtbDoct.getNumDoc(); + Integer numCmov = dtbDoct.getNumCmov(); + String codJcom = dtbDoct.getCodJcom(); + + if (numCmov != null){ + query = "SELECT num_prot FROM ctb_movt WHERE num_cmov = " + UtilityDB.valueToString(numCmov); + ps = conn.prepareStatement(query); + rs = ps.executeQuery(); + + if(rs.next()){ + numProt = rs.getInt(1); + } + rs.close();ps.close(); + } + + query = + "SELECT dtb_tipi.cod_ccau, " + + " dtb_tipi.dare_avere, " + + " dtb_tipi.controp_default, " + + " dtb_tipi.tipo_riep, " + + " dtb_tipi.cod_ireg, " + + " dtb_tipi.num_ireg, " + + " dtb_tipi.cod_ccau_ant, " + + " dtb_tipi.flag_prz_iva, " + + " dtb_tipi.cod_ccon_ant, " + + " dtb_tipi.cod_ccon_cassa, " + + " ctb_caus.cod_aliq_split " + + " FROM dtb_tipi LEFT OUTER JOIN ctb_caus ON dtb_tipi.cod_ccau = ctb_caus.cod_ccau, " + + " ctb_ireg " + + " WHERE ctb_ireg.cod_ireg = dtb_tipi.cod_ireg AND " + + " dtb_doct.cod_dtip = " + UtilityDB.valueToString(codDtip); + + ps = conn.prepareStatement(query); + rs = ps.executeQuery(); + + if(rs.next()){ + codCcau = rs.getString(1); + dareAvere = rs.getString(2); + contropDefault = rs.getString(3); + tipoRiep = rs.getString(4); + codIreg = rs.getString(5); + numIreg = rs.getInt(6); + codCcauAnt = rs.getString(7); + flagivainclusa = rs.getString(8); + codCconAnt = rs.getString(9); + codCconCassaDoc = rs.getString(10); + codAliqSplit = rs.getString(11); + } + rs.close();ps.close(); + + if (!UtilityString.isNullOrEmpty(codCcau)){ + ctbMovt.setDataCmov(dataReg); + ctbMovt.setCodJcom(codJcom); + ctbMovt.setCodCcau(codCcau); + ctbMovt.setDataDoc(dataDoc); + ctbMovt.setNumDoc(numDoc); + ctbMovt.setSerDoc(serDoc); + ctbMovt.setNumProt(numProt); + ctbMovt.setCodIreg(codIreg); + ctbMovt.setNumIreg(numIreg); + ctbMovt.setTipoAnag(tipoAnag); + ctbMovt.setCodAnag(codAnag); + + + //Registrazione castelletto iva dopo aver aggiunto il calcolo totali + + /* SELECT ctb_anag.cod_ccon INTO :ls_codCconAnag FROM ctb_anag, ctb_cont + WHERE ctb_anag.cod_ccon = ctb_cont.cod_ccon AND cod_anag = :ls_codAnag AND + tipo_riep = :ls_tipoRiep;*/ + + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/InventariRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/InventariRules.java new file mode 100644 index 0000000000..cd9b8a14ea --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/InventariRules.java @@ -0,0 +1,116 @@ +package it.integry.ems.rules.completing; + +import java.math.BigDecimal; + +import java.math.RoundingMode; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.List; +import java.util.Map; + +import it.integry.ems.entity.DtbDocr; +import it.integry.ems.entity.MtbInvenr; +import it.integry.ems.types.ApplicationName; +import it.integry.ems.utility.UtilityDB; + +public class InventariRules extends CommonRules { + + public static Integer completeIdInventario(Connection conn, String codMdep) throws SQLException{ + + String sql = "SELECT isNull(Max(id_inventario) + 1, 1) next_id FROM mtb_invent WHERE cod_mdep = " + UtilityDB.valueToString(codMdep); + + Map map =execSingleQuery(conn, sql); + if(map.get("next_id")== null) + return new Integer(1); + else + return new Integer(map.get("next_id").toString()); + + } + + public static BigDecimal completeCostoInv(Connection conn, MtbInvenr mtbInvenr) throws Exception{ + String regola= mtbInvenr.getRegolaCalcoloCosto(); + BigDecimal costo = BigDecimal.ZERO; + + if("U".equals(regola)){ + costo = CommonRules.completeValUntULTC(conn, mtbInvenr); + }else if ("M".equals(regola)){ + costo = CommonRules.completeValUntCMED(conn, mtbInvenr); + }else if("D".equals(regola)){ + costo= CommonRules.completeValUntDIST(conn, mtbInvenr); + } + + return costo; + } + + public static boolean barCodeCheck (Connection conn, String barCode) throws Exception { + String sql; + Map map; + int check = 0; + + sql = " SELECT COUNT(cod_barre) as num_check " + + " FROM mvw_barcode " + + " WHERE cod_barre = " + UtilityDB.valueToString(barCode); + map =execSingleQuery(conn, sql); + if (!map.isEmpty()) { + check = new Integer(map.get("num_check").toString()); + if(check == 0){ + String applName = CommonRules.getApplicationName(conn); + if(ApplicationName.TEXTILES.toString().equals(applName)){ + map.clear(); + sql = " SELECT COUNT(cod_barre) as num_check " + + " FROM ttb_bar_code " + + " WHERE cod_barre = " + UtilityDB.valueToString(barCode); + map =execSingleQuery(conn, sql); + if (!map.isEmpty()) + check = new Integer(map.get("num_check").toString()); + } + } + } + if (check == 0 ){//CODICE A BARRE NON TROVATO. + return true; + }else{ + return false; + } + } + //REGOLA DI COMPLETAMENTO CODICE ARTICOLO TEXTILES + public static Map completeCodMartTx(Connection connection, String barCode) throws SQLException{ + String sql = "SELECT cod_style as cod_mart, cod_col, cod_tagl " + + " FROM ttb_bar_code " + + " WHERE cod_barre = " + UtilityDB.valueToString(barCode); + Map map = execSingleQuery(connection, sql); + + return map; + + } + //REGOLA DI COMPLETAMENTO CODICE ARTICOLO WINGEST + public static String completeCodMart(Connection connection, String barCode) throws SQLException{ + String codMart = null; + String sql = "SELECT distinct mvw_barcode_det.cod_mart " + + " FROM mvw_barcode_det, mtb_aart " + + " WHERE mvw_barcode_det.cod_barre = " + UtilityDB.valueToString(barCode); + Map map = execSingleQuery(connection, sql); + + if (!map.isEmpty()) + codMart = map.get("cod_mart").toString(); + + return codMart; + } + + + public static BigDecimal completeNumConf(Connection conn, String codMart, BigDecimal qtaInv) throws Exception { + String sql = "SELECT qta_cnf FROM mtb_aart WHERE cod_mart = " + UtilityDB.valueToString(codMart); + Map map = execSingleQuery(conn, sql); + + BigDecimal qtaCnf = new BigDecimal (map.get("qta_cnf").toString()); + + BigDecimal numConf = BigDecimal.ZERO; + if (qtaCnf.equals(BigDecimal.ZERO)|| qtaInv.equals(BigDecimal.ZERO) ) { + numConf = BigDecimal.ONE; + } else { + numConf = qtaInv.divide(qtaCnf, 0 ,RoundingMode.CEILING); + } + + + return numConf; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/LottiProdRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/LottiProdRules.java new file mode 100644 index 0000000000..6ad75932d8 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/LottiProdRules.java @@ -0,0 +1,39 @@ +package it.integry.ems.rules.completing; + +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Types; +import java.util.List; +import java.util.Map; + +import it.integry.ems.base.EntityBase; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.utility.UtilityDB; + +public class LottiProdRules extends QueryRules { + + public static Integer completeIdLotto (Connection conn) throws SQLException { + Integer idLotto; + + CallableStatement cs = conn.prepareCall("{call dbo.nextIdLotto(?)}"); + cs.setInt(1, 0); + cs.registerOutParameter(1, Types.INTEGER); + cs.execute(); + idLotto = (Integer) cs.getObject(1); + + return idLotto; + } + + public static String completeCodJfas (Connection conn, EntityBase entity) throws Exception { + String codJflav = (String) DroolsUtil.getEntityFieldValue(entity, "cod_jflav"); + + String sql = "SELECT cod_jfas FROM jtb_flav WHERE cod_jflav = " + UtilityDB.valueToString(codJflav); + List> list = execQuery(conn, sql); + if (list.isEmpty()) { + return ""; + } else { + return list.get(0).get("cod_jfas"); + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/OrdWebRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/OrdWebRules.java new file mode 100644 index 0000000000..aa65704e58 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/OrdWebRules.java @@ -0,0 +1,68 @@ +package it.integry.ems.rules.completing; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.List; +import java.util.Map; + +import it.integry.ems.entity.WdtbOrdr; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +public class OrdWebRules extends QueryRules { + public static String completeSerie(Connection conn, String codVage) throws SQLException { + String serie= null; + + if(codVage != null){ + String sql = "select serie from vtb_agen where cod_vage = " + UtilityDB.valueToString(codVage) ; + + Map map = execSingleQuery(conn, sql); + if (map.get("serie") != null){ + serie = map.get("serie").toString(); + } + } + + if(UtilityString.isNullOrEmpty(serie)) + serie= "WEB"; + + + return serie; + } + + public static String completeSerieTx(String codVage) throws SQLException { + if(codVage != null) + return codVage + "W"; + else + return "W"; + } + + public static void completeIdArtOrd(Connection conn, List rows) throws Exception { + //RosannaR + //in caso di utilizzo di un articolo Jolly (utilizzati da Midel per le aperture sui conformati) + //l'ordinamento per codice articolo è sbagliato + /* + Collections.sort(rows, new Comparator() { + public int compare(WdtbOrdr o1, WdtbOrdr o2) { + return o1.getCodMart().compareTo(o2.getCodMart()); + } + }); + */ + + String codMartOld = ""; + String gruppoConsOld= ""; + String noteRigaOld = ""; + Integer idArt = 0; + for (WdtbOrdr singleRow : rows) { + if (!codMartOld.equals(singleRow.getCodMart()) || + !gruppoConsOld.equals(UtilityString.streNull(singleRow.getGruppoCons())) || + !noteRigaOld.equals(UtilityString.streNull(singleRow.getNote()))) { + codMartOld = singleRow.getCodMart(); + gruppoConsOld = UtilityString.streNull(singleRow.getGruppoCons()); + noteRigaOld = UtilityString.streNull(singleRow.getNote()); + idArt++; + } + singleRow.setIdArt(idArt); + } + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/OrderLavRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/OrderLavRules.java new file mode 100644 index 0000000000..52c308b426 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/OrderLavRules.java @@ -0,0 +1,12 @@ +package it.integry.ems.rules.completing; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.List; +import java.util.Map; + +import it.integry.ems.entity.DtbOrdt; + +public class OrderLavRules extends QueryRules{ + +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/OrderRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/OrderRules.java new file mode 100644 index 0000000000..2c21b3d294 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/OrderRules.java @@ -0,0 +1,87 @@ +package it.integry.ems.rules.completing; + +import java.math.BigDecimal; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Types; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang3.time.DateUtils; +import org.apache.poi.ss.usermodel.DateUtil; + +import it.integry.ems.base.EntityBase; +import it.integry.ems.entity.DtbOrdr; +import it.integry.ems.entity.DtbOrdt; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.types.OperationType; + +public class OrderRules extends QueryRules { + + public static Integer completeNumOrd (Connection conn, DtbOrdt ord) throws SQLException { + Short anno = new Short(new SimpleDateFormat("yyyy").format(ord.getDataOrd())); + CallableStatement cs = conn.prepareCall("{call dbo.NextNumOrd(?, ?, ?)}"); + cs.setString(1, ord.getGestione()); + cs.setShort(2, anno); + cs.setInt(3, 0); + cs.registerOutParameter(3, Types.INTEGER); + cs.execute(); + return (Integer) cs.getObject(3); + + } + + public static String completeTipoAnag (Connection conn, String gestione) throws SQLException { + String tipoAnag = "F"; + + if("V".equals(gestione)){ + tipoAnag = "C"; + } + + return tipoAnag; + } + + public static Date completeDataConsA (Connection conn, DtbOrdr dtbOrdr) throws SQLException { + Date dataCons = dtbOrdr.getDataOrd(); + return dataCons; + } + public static Date completeDataConsL (Connection conn, DtbOrdr dtbOrdr) throws SQLException { + Date dataCons = dtbOrdr.getDataOrd(); + return dataCons; + } + public static Date completeDataConsOrdP (Connection conn, DtbOrdr dtbOrdr) throws SQLException { + return DateUtils.truncate(new Date(), Calendar.DAY_OF_MONTH); + } + public static Date completeDataInizProdOrdP (Connection conn, DtbOrdr dtbOrdr) throws SQLException { + return DateUtils.truncate(new Date(), Calendar.DAY_OF_MONTH); + } + public static String completeCausaleTrasp(String gestione) { + if ("A".equals(gestione)) { + return "ACQUISTO"; + } else if ("V".equals(gestione)) { + return "VENDITA"; + } else if ("L".equals(gestione)) { + return "LAVORAZIONE"; + } + return null; + } + public static Map completeRifOrdLavOrdP(Connection connection, DtbOrdr dtbOrdr) throws SQLException { + DateFormat formato = new SimpleDateFormat("yyyy/MM/dd"); + String gestione = dtbOrdr.getGestione(); + Date dataOrd = dtbOrdr.getDataOrd(); + Integer numOrd = dtbOrdr.getNumOrd(); + Integer rigaOrd = dtbOrdr.getRigaOrd(); + String sql = + "SELECT data_ord, num_ord " + + "FROM dtb_ordt " + +"WHERE gestione_rif = '" + gestione + "' AND " + + " data_ord_rif = '" + formato.format(dataOrd) + "' AND " + + " num_ord_rif = " + numOrd.toString() + " AND " + + " riga_ord_rif = " + rigaOrd.toString(); + return execSingleQuery(connection, sql); + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/PackagesRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/PackagesRules.java new file mode 100644 index 0000000000..ffba0b051e --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/PackagesRules.java @@ -0,0 +1,146 @@ +package it.integry.ems.rules.completing; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.annotation.SqlField; +import it.integry.ems.entity.MtbColt; +import it.integry.ems.entity.MtbPartitaMag; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityString; + +import java.lang.reflect.Field; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Types; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.bouncycastle.i18n.filter.SQLFilter; +import org.springframework.util.ReflectionUtils; + +public class PackagesRules extends QueryRules { + + public static Integer completeNumCollo(Connection connection, String serie, + Date data, String gestione) throws Exception { + + Short anno = new Short(new SimpleDateFormat("yyyy").format(data)); + CallableStatement cs = connection.prepareCall("{call dbo.NextNumCol(?, ?, ?, ?)}"); + cs.setString(1, serie); + cs.setShort(2, anno); + cs.setString(3, gestione); + cs.setInt(4, 0); + cs.registerOutParameter(4, Types.INTEGER); + cs.execute(); + Integer value = cs.getInt(4); + cs.close(); + return value; + } + + public static void completeDescPartitaMag(MtbPartitaMag partita, String descPartitaMag) throws Exception{ + partita.setDescrizione(descPartitaMag); + } + + public static MtbPartitaMag completePartitaMag(String codMart, String partitaMag, Date dataScad) throws Exception{ + MtbPartitaMag partita = new MtbPartitaMag(); + partita.setCodMart(codMart); + partita.setPartitaMag(partitaMag); + if (dataScad != null){ + partita.setDataScad(dataScad); + } + partita.setOperation(OperationType.INSERT_OR_UPDATE); + return partita; + } + + public static List> completeCodVlis(Connection connection, + String codAnag, String codVdes) throws SQLException { + String sql = ""; + if (codVdes == null){ + sql = + "SELECT vtb_clie.cod_vlis as cod_vlis_clie, " + + " NULL as cod_vlis_dest" + + " FROM vtb_clie " + + " WHERE vtb_clie.cod_anag = '" + codAnag + "'";} + else { + sql = + "SELECT vtb_clie.cod_vlis as cod_vlis_clie, " + + " vtb_dest.cod_vlis as cod_vlis_dest" + + " FROM vtb_dest, " + + " vtb_clie " + + " WHERE vtb_clie.cod_anag = vtb_dest.cod_anag AND " + + " vtb_dest.cod_anag = '" + codAnag + "' AND " + + " vtb_dest.cod_vdes = '" + codVdes + "'"; + } + List> list = execQuery(connection, sql); + if(!list.isEmpty()){ + String val_dest = list.get(0).get("cod_vlis_dest"); + if(val_dest != null){ + list.get(0).put("cod_vlis_clie", val_dest); + }else{ + String val_clie = list.get(0).get("cod_vlis_clie"); + if(val_clie == null){ + return null; + } + } + }else + return null; + + return list; + } + + public static Integer completeSegno(String gestione) { + Integer segno = 1; + + if (gestione == null) { + segno = 1; + } else if ("V".equals(gestione)) { + segno = -1; + } else { + segno = 1; + } + return segno; + } + + public static Object completeWithDefault(Class clazz, String fieldName) throws Exception { + Object value = null; + Field f = ReflectionUtils.findField(clazz, fieldName); + if(f!=null) { + SqlField sql; + if((sql = f.getAnnotation(SqlField.class)) != null) { + value = UtilityString.stringToObject(sql.defaultObjectValue(), f.getType()); + } + } + return value; + } + + /* + public static Double completeQtaCnf(Connection connection, String codMart) throws SQLException{ + String sql = "SELECT qta_cnf FROM mtb_aart WHERE cod_mart = '" + codMart + "'"; + List> list = execQuery(connection, sql); + if(list.isEmpty()){ + return new Double("0.0"); + } else { + return new Double(list.get(0).get("qta_cnf").toString()); + } + } + */ + + public static Integer completeRiga(Connection connection, String gestione, + Date dataCollo, Integer numCollo, String serCollo) throws SQLException { + String sql = "SELECT IsNull(max(riga), 0) as riga " + + " FROM mtb_colr " + + " WHERE gestione = '" + gestione + "' AND " + + " data_collo = '" + new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD). + format(dataCollo) + "' AND " + + " num_collo = " + numCollo + " AND " + + " ser_collo = '" + serCollo + "'"; + List> list = execQuery(connection, sql); + if(list.isEmpty()){ + return new Integer("0"); + } else { + return new Integer(list.get(0).get("riga").toString()) + 1; + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/PartitaMagRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/PartitaMagRules.java new file mode 100644 index 0000000000..283cfbfe0c --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/PartitaMagRules.java @@ -0,0 +1,18 @@ +package it.integry.ems.rules.completing; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.List; +import java.util.Map; + +public class PartitaMagRules extends QueryRules { + + public static List> completeRapConv2e3(Connection connection, String codMart) throws SQLException{ + String sql = "SELECT DISTINCT rap_conv2, rap_conv3 FROM mtb_aart WHERE cod_mart = '" + codMart + "'"; + return execQuery(connection, sql); + } + public static List> completeQtaCnf(Connection connection, String codMart) throws SQLException{ + String sql = "SELECT qta_cnf FROM mtb_aart WHERE cod_mart = '" + codMart + "'"; + return execQuery(connection, sql); + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/ProductionsRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/ProductionsRules.java new file mode 100644 index 0000000000..cbb39000c1 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/ProductionsRules.java @@ -0,0 +1,267 @@ +package it.integry.ems.rules.completing; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.entity.JtbFlav; +import it.integry.ems.entity.JtbFlavEventi; +import it.integry.ems.entity.JtbRLavt; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; + +public class ProductionsRules extends CommonRules { + + public static String completeDescMacchinari(Connection connection, String codMart) + throws SQLException { + String sql = "SELECT ISNULL(descrizione_estesa, descrizione) as desc" + + " FROM mtb_aart WHERE cod_mart = " + UtilityDB.valueToString(codMart); + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return ""; + } else { + return list.get(0).get("desc").toString(); + } + } + + public static String completeCodJfas(Connection connection, String codJflav) throws SQLException { + String sql = "SELECT jtb_flav.cod_jfas " + " FROM jtb_flav" + + " WHERE jtb_flav.cod_jflav = '" + codJflav + "'"; + + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return null; + } else if(UtilityString.isNullOrEmpty(list.get(0).get("cod_jfas"))){ + return null; + } else { + return list.get(0).get("cod_jfas").toString(); + } + } + + public static List> completePercPaga(Connection connection, + String giustificativo) throws SQLException { + String sql = "SELECT perc_paga " + + " FROM jtb_giustifica " + + " WHERE giustificativo = " + UtilityDB.valueToString(giustificativo); + return execQuery(connection, sql); + } + + public static String completeCostoOra(Connection connection, String tipoOrelav, JtbRLavt jtbRLavt) throws SQLException { +// if("O".equals(tipoOrelav)) +// return jtbRLavt.getc +// else if("S".equals(tipoOrelav)) +// return +// else if("V".equals(tipoOrelav)) +// return + return null; + } + + public static String completeFlagAutorizza(Connection connection, String codJcau) throws SQLException { + String flagRichiediAutor = "", flagAutorizza = ""; + String query = "SELECT flag_richiedi_autoriz FROM jtb_caus_eventi WHERE cod_jcau = '" + codJcau + "'"; + PreparedStatement ps = connection.prepareStatement(query); + ResultSet res = ps.executeQuery(); + if (res.next()){ + flagRichiediAutor = res.getString("flag_richiedi_autoriz"); + } + res.close();ps.close(); + if(("N").equals(flagRichiediAutor)){ + flagAutorizza = "S"; + } else { + flagAutorizza = "N"; + } + return flagAutorizza; + } + + //TODO da finire + public static void completeAutorizzazione(Connection connection, JtbFlav jtbFlav, + JtbFlavEventi jtbFlavEventi) throws SQLException { + /* + String query = "SELECT tipo_evento, flag_ripeti FROM jtb_caus_eventi WHERE cod_jcau = '" + jtbFlavEventi.getCodJcau() + "'"; + PreparedStatement ps = connection.prepareStatement(query); + ResultSet res = ps.executeQuery(); + String tipoEvento, flagRipeti; + if(res.next()){ + tipoEvento = res.getString("tipo_evento"); + flagRipeti = res.getString("flag_ripeti"); + } + res.close();ps.close(); + + if("INIZIO LAVORO".equals(tipoEvento)){ + jtbFlav.setDataInizLav(jtbFlavEventi.getDataEvento()); + } else if("ASSUNZIONE".equals(tipoEvento)){ + jtbFlav.setDataAssunz(jtbFlavEventi.getDataEvento()); + } else if("FINE LAVORO".equals(tipoEvento)){ + jtbFlav.setDataFineLavoro(jtbFlavEventi.getDataEvento()); + } else if("VARIAZIONE PAGA BASE".equals(tipoEvento)){ + if ("S".equals(jtbFlavEventi.getFlagAutorizza())) { + valore = jtbFlav.getCostoOrd() + getValPagaBase(ai_rowID); + } else { + if (lb_existRow) { + valore = jtbFlav.getCostoOrd() - getValPagaBase(ai_rowID); + } else { + valore = jtbFlav.getCostoOrd(); + } + } + jtbFlav.setCostoOrd(valore); + } else if("VARIAZIONE INDENNITA".equals(tipoEvento)){ + if ("S".equals(jtbFlavEventi.getFlagAutorizza())) { + valore = jtbFlav.getIndennita() + getValIndennita(ai_rowID); + } else { + if (lb_existRow){ + valore = jtbFlav.getIndennita() - getValIndennita(ai_rowID); + } else { + valore = jtbFlav.getIndennita(); + } + } + + jtbFlav.setIndennita(valore); + } +// jtbCausFlav.setRipetiEvento(ls_flagRipeti);*/ + } + + public static String completeCausaleTrasp(String gestione) { + if ("A".equals(gestione)) { + return "ACQUISTO"; + } else if ("V".equals(gestione)) { + return "VENDITA"; + } else if ("L".equals(gestione)) { + return "LAVORAZIONE"; + } + return null; + } + + public static String completePorto(Connection connection, String codAnag) throws SQLException { + String sql = "SELECT vtb_clie.porto FROM vtb_clie " + + " WHERE vtb_clie.cod_anag = '" + codAnag + "'"; + Map map = execSingleQuery(connection, sql); + if(map.get("porto")==null) + return null; + else + return map.get("porto").toString(); + } + + public static List> completeSconto( + Connection connection, String codAnag, String field) + throws SQLException { + String sql = "SELECT vtb_clie." + field + " FROM vtb_clie " + + " WHERE vtb_clie.cod_anag = '" + codAnag + "'"; + return execQuery(connection, sql); + } + + public static String completeMezzo(Connection connection, String codAnag) throws SQLException { + String sql = "SELECT vtb_clie.mezzo FROM vtb_clie " + + " WHERE vtb_clie.cod_anag = '" + codAnag + "'"; + Map map = execSingleQuery(connection, sql); + if(map.get("mezzo")==null) + return null; + else + return map.get("mezzo").toString(); + } + + public static Integer completeNumOrdWeb(Connection connection, String serie, + String gestione, Date dataOrd) throws Exception { + + Short anno = new Short(new SimpleDateFormat("yyyy").format(dataOrd)); + CallableStatement cs = connection.prepareCall("{call dbo.NextNumOrdWeb(?, ?, ?, ?)}"); + cs.setString(1, serie); + cs.setString(2, gestione); + cs.setShort(3, anno); + cs.setInt(4, 0); + cs.registerOutParameter(4, Types.INTEGER); + cs.execute(); + return cs.getInt(4); + } + + public static Integer completeRigaOrdWeb(Connection connection, + String gestione, Date dataOrd, Integer numOrd, String serie) + throws SQLException { + String sql = "SELECT IsNull(max(riga_ord), 0) as riga " + + " FROM wdtb_ordr WHERE gestione = '" + gestione + "' " + + " AND data_ord = '" + new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(dataOrd) + "' " + + " AND num_ord = " + numOrd + " AND serie = '" + serie + "'"; + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return new Integer("0"); + } else { + return new Integer(list.get(0).get("riga").toString()) + 1; + } + } +/* + + //RosannaR 08/02/17 spostata nelle regole generiche su documenti e ordini + + public static BigDecimal completeValUnt(Connection conn, WdtbOrdr row) throws SQLException { + Double cambioDiviCont = completeCambioDiviCont(conn); + + String query; + Double valUnt = new Double(0); + + String listino = row.getListino(); + String gestione = row.getGestione(); + String codMart = row.getCodMart(); + String codCol = row.getCodCol(); + String codTagl = row.getCodTagl(); +// Date dataOrd = row.getDataOrd(); + Double rapConv = row.getRapConv(); + + String applName = getApplicationName(conn); + if (ApplicationName.WINGEST.toString().equals(applName)) { + // ACQUISIZIONE PREZZO VENDITA + if ("V".equals(gestione)) { + if (listino == null) { + // SE IL LISTINO E' NUL ALLORA IL PREZZO DEVE ESSERE PRESO DALL'ULTIMO PREZZO DI VENDITA + query = "SELECT val_ult_scar FROM mtb_aart WHERE cod_mart = " + + UtilityDB.valueToString(codMart); + + List> res = execQuery(conn, query); + Double valUntScar = Double.valueOf(res.get(0).get("val_ult_scar").toString()); + valUnt = valUntScar * rapConv * cambioDiviCont; + valUnt = IntegerUtility.round(valUnt, EmsRestConstants.cifreDecMax); + } else { + } + } else if ("A".equals(gestione)) { + } else if ("L".equals(gestione)) { + } + } else if (ApplicationName.TEXTILES.toString().equals(applName)) { + if (CommonConstants.ULTC.equals(listino)){ + // ACQUISIZIONE COSTO ULTIMO +// getCostoUltimo(conn, codMart, dataOrd, codMdep); +// valUnt = InfoCosti.getCostoUltimo() * rapConv; + return BigDecimal.ONE; + }else if (CommonConstants.CMPPF.equals(listino)) { + // COSTO DA ANAGRAFICA +// calcCostoArticolo(getProfileDB(), codMart, codCol, codTagl, cambioDiviCont); +// valUnt = InfoCosti.getCostoUltimo() * rapConv; + return BigDecimal.ONE; + }else{ + // ACQUISIZIONE PREZZO DI VENDITA + if ("V".equals(gestione)) { + BigDecimal przVend = BigDecimal.ZERO; + String sql = "select dbo.f_CalcPrzTextiles("+UtilityDB.valueToString(codMart)+", "+ + UtilityDB.valueToString(codCol) +", "+ UtilityDB.valueToString(codTagl) + ", " + + UtilityDB.valueToString(listino) + ", 'N') as prz_vend"; + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + przVend = rs.getBigDecimal("prz_vend"); + } + rs.close(); + ps.close(); + + return przVend.multiply(BigDecimal.valueOf(rapConv)); + } + } + } + row.setValUnt(BigDecimal.valueOf(valUnt)); + return BigDecimal.valueOf(valUnt); + } + */ +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/PurchasesRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/PurchasesRules.java new file mode 100644 index 0000000000..1bb2cee5b3 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/PurchasesRules.java @@ -0,0 +1,444 @@ +package it.integry.ems.rules.completing; + +import java.io.StringWriter; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.WebTarget; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.base.EntityBase; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.entity.AtbGriglieArt; +import it.integry.ems.entity.AtbListData; +import it.integry.ems.entity.DtbOrdr; +import it.integry.ems.entity.MtbLisa; +import it.integry.ems.entity.MtbLisaData; +import it.integry.ems.entity.MtbLisaPromo; +import it.integry.ems.entity.WdtbOrdr; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.service.HttpRestWrapper; +import it.integry.ems.service.MailService; +import it.integry.ems.service.SetupGest; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; +import it.integry.security.utility.RestUtil; + +public class PurchasesRules extends CommonRules { + + public static String completeCodDiviListDataAcq(Connection connection, String codAlis) throws SQLException { + String sql = "SELECT cod_divi_acq FROM atb_list WHERE cod_alis = " + UtilityDB.valueToString(codAlis); + List> list = execQuery(connection, sql); + if (list.isEmpty()){ + sql = "SELECT cod_divi_contab FROM azienda"; + list = execQuery(connection, sql); + if (list.isEmpty()){ + return "";} + else{ + return list.get(0).get("cod_divi_contab").toString(); } + } + else { + return list.get(0).get("cod_divi_acq").toString(); + } + } + + public static String completeTipoVariazione(Connection connection, AtbGriglieArt atbGriglieArt) + throws SQLException { + + String sql = "SELECT tipo_variazione" + " FROM dbo.getGrigliaAcquisto(" + + UtilityDB.valueDateToString(atbGriglieArt.getDataValidita(), CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(atbGriglieArt.getCodAlis()) + "," + + UtilityDB.valueToString(atbGriglieArt.getCodMdep()) + "," + + UtilityDB.valueToString(atbGriglieArt.getCodArtFor()) + "," + + UtilityDB.valueToString(atbGriglieArt.getCodMart()); + + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return "I"; + } else { + if ("D".equals(list.get(0).get("tipo_variazione").toString())) { + return "I"; + } else + return "U"; + } + } + + public static void completeDatiLisa(Connection connection, EntityBase entity) throws SQLException { + + String codAlis, codArtFor, sql; + Date dataIniz; + if (entity instanceof MtbLisaData) { + MtbLisaData mtbLisaData = ((MtbLisaData) entity); + codAlis = mtbLisaData.getCodAlis(); + codArtFor = mtbLisaData.getCodArtFor(); + dataIniz = mtbLisaData.getDataIniz(); + + sql = "SELECT prz_acq, perc_1, perc_2, perc_3, perc_4, perc_oneri, val_oneri, perc_promo, val_promo, tipo_variazione" + + " FROM dbo.getListinoAcquisto(" + + UtilityDB.valueDateToString(dataIniz, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(codAlis) + "," + UtilityDB.valueToString(codArtFor) + ", null, 'N', null)"; + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + if (mtbLisaData.getPrzAcq() == null) + mtbLisaData.setPrzAcq(rs.getBigDecimal("prz_acq")); + + if (mtbLisaData.getPerc1() == null) + mtbLisaData.setPerc1(rs.getBigDecimal("perc_1")); + if (mtbLisaData.getPerc2() == null) + mtbLisaData.setPerc2(rs.getBigDecimal("perc_2")); + if (mtbLisaData.getPerc3() == null) + mtbLisaData.setPerc3(rs.getBigDecimal("perc_3")); + if (mtbLisaData.getPerc4() == null) + mtbLisaData.setPerc4(rs.getBigDecimal("perc_4")); + + if (mtbLisaData.getPercOneri() == null) + mtbLisaData.setPercOneri(rs.getBigDecimal("perc_oneri")); + if (mtbLisaData.getValOneri() == null) + mtbLisaData.setValOneri(rs.getBigDecimal("val_oneri")); + + if (mtbLisaData.getPercPromo() == null) + mtbLisaData.setPercPromo(rs.getBigDecimal("perc_promo")); + if (mtbLisaData.getValPromo() == null) + mtbLisaData.setValPromo(rs.getBigDecimal("val_promo")); + + if (mtbLisaData.getTipoVariazione() == null) { + if (rs.getString("tipo_variazione") == null || "D".equals(rs.getString("tipo_variazione"))) { + mtbLisaData.setTipoVariazione("I"); + } else + mtbLisaData.setTipoVariazione("U"); + } + } + rs.close(); + ps.close(); + } + } + + public static void completeVersioneAcq(Connection connection, AtbListData atbListData) throws Exception { + String query; + if (atbListData.getDataFine() == null ) { + if (OperationType.INSERT.equals(atbListData.getOperation())) { + atbListData.setVersione(null); + } else { + query = "SELECT versione FROM atb_list_data WHERE cod_alis = " + + UtilityDB.valueToString(atbListData.getCodAlis()) + " and data_iniz = " + + UtilityDB.valueDateToString(atbListData.getDataIniz(), CommonConstants.DATE_FORMAT_YMD) + + " and cod_promo is null"; + PreparedStatement ps = connection.prepareStatement(query); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + atbListData.setVersione(rs.getInt("versione")); + } + rs.close(); + ps.close(); + } + } else { + query = "SELECT versione FROM atb_list_data WHERE cod_alis = " + + UtilityDB.valueToString(atbListData.getCodAlis()) + " and data_iniz = " + + UtilityDB.valueDateToString(atbListData.getDataIniz(), CommonConstants.DATE_FORMAT_YMD) + + " and cod_promo = " + UtilityDB.valueToString(atbListData.getCodPromo()); + PreparedStatement ps = connection.prepareStatement(query); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + atbListData.setVersione(rs.getInt("versione")); + } + rs.close(); + ps.close(); + } + + if (atbListData.getVersione() == null || atbListData.getVersione() == 0) { + query = "SELECT isNull(max(versione), 0) as versione FROM atb_list_data WHERE cod_alis = " + + UtilityDB.valueToString(atbListData.getCodAlis()); + PreparedStatement ps = connection.prepareStatement(query); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + atbListData.setVersione(rs.getInt("versione") + 1); + } + rs.close(); + ps.close(); + + } + } + + public static String completeCodMart(Connection connection, String codAlis, String codArtFor) throws SQLException { + String sql = "SELECT cod_mart " + " FROM mtb_lisa " + " WHERE cod_alis = " + UtilityDB.valueToString(codAlis) + + " AND " + " cod_art_for = " + UtilityDB.valueToString(codArtFor); + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return null; + } else { + return list.get(0).get("cod_mart"); + } + } + + public static String completeCodPromo(String codAlis, Integer versione) { + return codAlis + UtilityString.leftPad(versione.toString(), 5, '0'); + } + + public static MtbLisa completeMtbLisa(MtbLisaData mtbLisaData) throws Exception { + MtbLisa mtbLisa = new MtbLisa(); + mtbLisa.setOperation(OperationType.INSERT_OR_UPDATE); + + mtbLisa.setExcludedColumns(mtbLisaData.getExcludedColumns()); + + mtbLisa.setCodAlis(mtbLisaData.getCodAlis()); + mtbLisa.setCodArtFor(mtbLisaData.getCodArtFor()); + mtbLisa.setCodMart(mtbLisaData.getCodMart()); + mtbLisa.setUntMisAcq(mtbLisaData.getUntMisAcq()); + mtbLisa.setGgApprovig(mtbLisaData.getGgApprovig()); + mtbLisa.setFlagFornPref(mtbLisaData.getFlagFornPref()); + mtbLisa.setQtaMinOrd(mtbLisaData.getQtaMinOrd()); + mtbLisa.setFlagQtaMultipla(mtbLisaData.getFlagQtaMultipla()); + mtbLisa.setDescrArtForn(mtbLisaData.getDescrArtForn()); + mtbLisa.setCodBarre(mtbLisaData.getCodBarre()); + mtbLisa.setQtaCnf(mtbLisaData.getQtaCnf()); + mtbLisa.setColliPedana(mtbLisaData.getColliPedana()); + mtbLisa.setFamiglia(mtbLisaData.getFamiglia()); + mtbLisa.setFlagAttivo(mtbLisaData.getFlagAttivo()); + mtbLisa.setRapConv(mtbLisaData.getRapConv()); + mtbLisa.setColliStrato(mtbLisaData.getColliStrato()); + mtbLisa.setCodAliq(mtbLisaData.getCodAliq()); + mtbLisa.setNote(mtbLisaData.getNote()); + + return mtbLisa; + } + + public static void completeDatiPromo(Connection conn, AtbListData atbListData) throws Exception { + for (MtbLisaData mtbLisaData : atbListData.getMtbLisaData()) { + completeMtbLisaPromo(conn, mtbLisaData); + } + } + + + public static void completeMtbLisaPromo(Connection conn, MtbLisaData mtbLisaData) throws Exception { + MtbLisaPromo mtbLisaPromo = mtbLisaData.getMtbLisaPromo(); + + if (mtbLisaPromo == null ){ + mtbLisaPromo = new MtbLisaPromo(); + mtbLisaPromo.setOperation(OperationType.INSERT_OR_UPDATE); + mtbLisaPromo.setCodAlis(mtbLisaData.getCodAlis()); + mtbLisaPromo.setCodArtFor(mtbLisaData.getCodArtFor()); + mtbLisaPromo.setVersione(mtbLisaData.getVersione()); + } + + if (mtbLisaData.getPercPromo1() != null ) { + mtbLisaPromo.setPercPromo1(mtbLisaData.getPercPromo1()); + } + if (mtbLisaData.getPercPromo2() != null ) { + mtbLisaPromo.setPercPromo2(mtbLisaData.getPercPromo2()); + } + if (mtbLisaData.getPercPromo3() != null ) { + mtbLisaPromo.setPercPromo3(mtbLisaData.getPercPromo3()); + } + if (mtbLisaData.getPercPromo4() != null ) { + mtbLisaPromo.setPercPromo4(mtbLisaData.getPercPromo4()); + } + mtbLisaData.setMtbLisaPromo(mtbLisaPromo); + } + + public static String completeCodMartOrdDocA(Connection conn, EntityBase entity) throws Exception { + String listino = null, codArtFor = null, codMart = null, fieldDataValidita; + Date dataValidita = null; + + if (entity instanceof DtbOrdr || entity instanceof WdtbOrdr) { + fieldDataValidita = "data_ord"; + } else { + fieldDataValidita = "data_doc"; + } + + dataValidita = (Date) DroolsUtil.getEntityFieldValue(entity, fieldDataValidita); + listino = (String) DroolsUtil.getEntityFieldValue(entity, "listino"); + codArtFor = (String) DroolsUtil.getEntityFieldValue(entity, "cod_art_for"); + + String query = "SELECT TOP 1 lisa.cod_mart " + " FROM dbo.getListinoAcquisto(" + + UtilityDB.valueDateToString(dataValidita, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(listino) + "," + UtilityDB.valueToString(codArtFor) + ", null, 'N', null) lisa " + + "ORDER BY (case when tipo_variazione <> 'D' THEN 0 ELSE 1 END) "; + + List> list = execQuery(conn, query); + if (!list.isEmpty()) { + codMart = list.get(0).get("cod_mart"); + } + + return codMart; + } + + public static void completeDatiArtOrdDocA(Connection conn, EntityBase entity) throws Exception { + String listino = null, codArtFor = null, codMart = null, fielsNameUntMis = null, fieldDataValidita, + codMdep = null; + Date dataValidita = null; + + if (entity instanceof DtbOrdr || entity instanceof WdtbOrdr) { + fieldDataValidita = "data_ord"; + fielsNameUntMis = "unt_ord"; + } else { + fieldDataValidita = "data_doc"; + fielsNameUntMis = "unt_doc"; + } + dataValidita = (Date) DroolsUtil.getEntityFieldValue(entity, fieldDataValidita); + listino = (String) DroolsUtil.getEntityFieldValue(entity, "listino"); + codArtFor = (String) DroolsUtil.getEntityFieldValue(entity, "cod_art_for"); + codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + codMdep = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mdep"); + + String query = "SELECT TOP 1 lisa.cod_art_for, " + "lisa.unt_mis_acq as '" + fielsNameUntMis + "', " + + "lisa.rap_conv, " + "lisa.qta_cnf, " + "lisa.prz_acq as val_unt, " + "lisa.perc_oneri, " + + "lisa.val_oneri, " + "lisa.perc_promo, " + "lisa.val_promo, " + "lisa.val_promo, " + + "lisa.perc_1 as sconto5, " + "lisa.perc_2 as sconto6, " + + "case when lisa.cod_promo is null then lisa.perc_3 else dbo.f_cumulaSconti(lisa.perc_3, lisa.perc_4, 0, 0) end as sconto7, " + + "case when lisa.cod_promo is null then lisa.perc_4 else dbo.f_cumulaSconti(lisa.perc_promo_1, lisa.perc_promo_2, lisa.perc_promo_3, lisa.perc_promo_4) end as sconto8, " + + "lisa.cod_promo as cod_promo " + "FROM dbo.getListinoAcquisto(" + + UtilityDB.valueDateToString(dataValidita, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(listino) + "," + UtilityDB.valueToString(codArtFor) + "," + + UtilityDB.valueToString(codMart) + ", 'S', "+ UtilityDB.valueToString(codMdep) +") lisa " + + "WHERE lisa.tipo_variazione <> 'D' and lisa.flag_attivo = 'S' "; + + PreparedStatement ps = conn.prepareStatement(query); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null){ + if ("qta_cnf".equals(columnName)){ + BigDecimal rapConv = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "rap_conv"); + columnValue = ((BigDecimal) columnValue).divide(rapConv,EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + + } + DroolsUtil.completeEntity(entity, fields, columnValue); + } + + + } + } + + rs.close(); + ps.close(); + } + + public static String completeListAcq(Connection conn, EntityBase entity) throws Exception { + String listino = null, query, codVdes = null, codAnag = null; + + codAnag = (String) DroolsUtil.getEntityFieldValue(entity, "cod_anag"); + codVdes = (String) DroolsUtil.getEntityFieldValue(entity, "cod_vdes"); + + if (!UtilityString.isNullOrEmpty(codVdes)) { + query = "SELECT IsNull(vtb_dest.cod_alis, atb_forn.cod_alis) as listino " + " FROM vtb_dest, " + + " atb_forn " + " WHERE atb_forn.cod_anag = vtb_dest.cod_anag AND " + + " vtb_dest.cod_anag = '" + codAnag + "' AND " + + " vtb_dest.cod_vdes = '" + codVdes + "'"; + + + List> list = execQuery(conn, query); + if (!list.isEmpty()) { + listino = list.get(0).get("listino"); + } + } + + if (UtilityString.isNullOrEmpty(listino)) { + query = "SELECT atb_forn.cod_alis as listino " + " FROM atb_forn " + " WHERE atb_forn.cod_anag = '" + + codAnag + "'"; + + + List> list = execQuery(conn, query); + if (list.isEmpty()) { + listino = CommonConstants.ULTC; + } else { + listino = list.get(0).get("listino"); + } + } + + return listino; + } + + public static String completeCodArtFor(Connection conn, String codAlis, String codMart) throws SQLException { + String sql; + Map map; + + sql = "SELECT cod_art_for FROM mtb_lisa WHERE cod_alis = " + UtilityDB.valueToString(codAlis) + + " AND cod_mart = " + UtilityDB.valueToString(codMart); + map = execSingleQuery(conn, sql); + + if (map.get("cod_art_for") == null) { + sql = " select dbo.f_suggestCodeCodArtFor(" + UtilityDB.valueToString(codAlis) + ") as cod_art_for "; + map = execSingleQuery(conn, sql); + } + return map.get("cod_art_for").toString(); + } + + public static void completeTestataLisa(Connection conn, AtbListData entity) throws Exception{ + String query = + "SELECT data_iniz, " + + "data_ins, " + + "inserito_da " + + "FROM atb_list_data " + + "WHERE atb_list_data.cod_alis = " + UtilityDB.valueToString(entity.getCodAlis()) + " AND " + + "atb_list_data.versione = "+ UtilityDB.valueToString(entity.getVersione()); + PreparedStatement ps = conn.prepareStatement(query); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null){ + DroolsUtil.completeEntity(entity, fields, columnValue); + } + + + } + } + + rs.close(); + ps.close(); + } + public static Boolean checkChangeDataInizLisa(Connection conn, AtbListData entity) throws Exception{ + Boolean lb_ret = false; + Logger logger = LogManager.getLogger(); + String sql = "SELECT data_iniz FROM atb_list_data " + + "WHERE cod_alis = " + UtilityDB.valueToString(entity.getCodAlis()) + " AND " + + "versione = " + UtilityDB.valueToString(entity.getVersione()) + " AND " + + "data_iniz <> " + UtilityDB.valueDateToString(entity.getDataIniz(), CommonConstants.DATE_FORMAT_YMD); + PreparedStatement ps = conn.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + String ls_message = "Data inizio modificata sul listino " + entity.getCodAlis() + " versione " + entity.getVersione().toString() + " Utente " + entity.getUsername(); + System.out.println(ls_message); + logger.error(ls_message); + SetupGest setup = new SetupGest(); + String ls_blocca = (String) setup.getSetup(conn, "W_ALISTDATA_RC", "'DATA_INIZ", "CHK_VARIAZIONE", ""); + + if ("S".equals(ls_blocca)){ + lb_ret = true; + } + } + + rs.close();ps.close(); + + return lb_ret; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/QueryRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/QueryRules.java new file mode 100644 index 0000000000..fefefaa3d8 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/QueryRules.java @@ -0,0 +1,56 @@ +package it.integry.ems.rules.completing; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class QueryRules { + + protected static List> execQuery(Connection connection, String sql) throws SQLException { + + final List> ret = new ArrayList>(); + + final Statement selectStmt = connection.createStatement(); + final ResultSet rs = selectStmt.executeQuery(sql); + final ResultSetMetaData vMetaData = rs.getMetaData(); + int vColumnCount = vMetaData.getColumnCount(); + while (rs.next()) { + final Map m = new HashMap(); + for (int ii = 1; ii <= vColumnCount; ii++) { + final String vString = rs.getString(ii); + final String vColumnName = vMetaData.getColumnName(ii); + m.put(vColumnName, vString); + } + ret.add(m); + } + rs.close(); + selectStmt.close(); + return ret; + } + + protected static Map execSingleQuery(Connection connection, String sql) throws SQLException { + + final Map m = new HashMap(); + + final Statement selectStmt = connection.createStatement(); + final ResultSet rs = selectStmt.executeQuery(sql); + final ResultSetMetaData vMetaData = rs.getMetaData(); + int vColumnCount = vMetaData.getColumnCount(); + if(rs.next()) { + for (int ii = 1; ii <= vColumnCount; ii++) { + final Object vString = rs.getObject(ii); + final String vColumnName = vMetaData.getColumnName(ii); + m.put(vColumnName, vString); + } + } + rs.close(); + selectStmt.close(); + return m; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/ReceiptRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/ReceiptRules.java new file mode 100644 index 0000000000..f5f3319039 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/ReceiptRules.java @@ -0,0 +1,155 @@ +package it.integry.ems.rules.completing; + +import java.math.BigDecimal; +import java.sql.Connection; +import java.sql.SQLException; +import java.text.DecimalFormat; +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.entity.MtbDepoCasse; +import it.integry.ems.entity.MtbDepoOper; +import it.integry.ems.entity.NtbDocp; +import it.integry.ems.entity.NtbTipiInca; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +public class ReceiptRules extends CommonRules { + + @Deprecated + public static List> completeCodOper(Connection connection, String codMdep) throws SQLException{ + String sql = "SELECT mtb_depo_oper.cod_mdep_oper" + + " FROM mtb_depo_oper " + + " WHERE mtb_depo_oper.cod_mdep = '"+codMdep+"'"; + return execQuery(connection, sql); + } + + public static MtbDepoCasse completeMtbDepoCasse(Connection connection, String codMdep, String codCassa) throws Exception{ + String sql = "select * from mtb_depo_casse where cod_mdep='"+codMdep+"' and cod_cassa = " + codCassa; + + List> list = execQuery(connection, sql); + if(list.size() == 0){ + MtbDepoCasse casse = new MtbDepoCasse(); + casse.setCodMdep(codMdep); + casse.setCodCassa(codCassa); + casse.setMatricola(codCassa); + return casse; + } else + return null; + } + + public static MtbDepoOper completeMtbDepoOper(Connection connection, String codMdep, String codOper) throws Exception{ + String sql = "select * from mtb_depo_oper where cod_mdep='"+codMdep+"' and cod_mdep_oper='"+codOper+"'"; + + List> list = execQuery(connection, sql); + if(list.size() == 0){ + MtbDepoOper oper = new MtbDepoOper(); + + Pattern p = Pattern.compile("^[0-9]+"); + Matcher matcher = p.matcher(codOper); + String codBarreOp; + if(matcher.find()){ + NumberFormat formatter = new DecimalFormat("00"); + String s = formatter.format(Integer.parseInt(codOper)); + codBarreOp = "O" + codMdep + s; + } else { + codBarreOp = codOper; + } + oper.setCodMdep(codMdep); + oper.setCodMdepOper(codOper); + oper.setDescrizione("NUOVO OPERATORE"); + oper.setFlagStorno("N"); + oper.setCodBarre(codBarreOp); + return oper; + } else + return null; + } + + public static List> completeCodDivi(Connection connection) throws SQLException{ + String sql = "SELECT azienda.cod_divi_contab " + + " FROM azienda, " + + " gtb_divi" + + " WHERE azienda.cod_divi_contab = gtb_divi.cod_divi"; + return execQuery(connection, sql); + } + + public static List> completeCodMart(Connection connection, String codBarre) throws SQLException{ + String sql = + "SELECT DISTINCT mvw_barcode_det.cod_mart " + + " FROM mvw_barcode_det, mtb_aart " + + " WHERE ( mvw_barcode_det.cod_barre = '"+codBarre+"' or " + + " ( LEN('"+codBarre+"') = 7 and left('"+codBarre+"', 1) = '2' and right('"+codBarre+"', 6) = cod_barre ) )"; + return execQuery(connection, sql); + } + + public static Integer completeCodMartNonAnagrafato(Connection connection, String codMart) throws SQLException{ + String sql = "SELECT count(*) as conto " + + " FROM mtb_aart " + + " WHERE cod_mart = '"+codMart+"'"; + List> list = execQuery(connection, sql); + return Integer.parseInt(list.get(0).get("conto").toString()); + } + + public static List> completeCodAliq(Connection connection, String codMart) throws Exception { + List> list = completeCodAliqSimple(connection, codMart); + if(list.isEmpty()){ + Object codAliqDefault = setupGest.getImportSetup(connection, "SCONTRINI", "MMPOS_SERVICES", "IVA_DEFAULT"); + list = new ArrayList>(); + Map map = new HashMap(); + map.put("cod_aliq", codAliqDefault.toString()); + list.add(map); + } + return list; + } + + public static BigDecimal completeCosto(Connection connection, String codMart) throws SQLException{ + String sql = "SELECT isnull(mtb_aart.val_ult_car, 0) val_ult_car " + + "FROM mtb_aart " + + "WHERE mtb_aart.cod_mart = '"+codMart+"'"; + List> list = execQuery(connection, sql); + if(list.isEmpty()){ + return BigDecimal.ZERO; + } else { + return new BigDecimal(list.get(0).get("val_ult_car").toString()); + } + } + + public static List> completePromozione(Connection connection, String codMart, + String codMdep, Date dataDoc) throws SQLException{ + String sql = "SELECT cod_promo " + + " FROM dbo.getPromozioneVendita("+ UtilityDB.valueDateToString(dataDoc, CommonConstants.DATE_FORMAT_YMD) +", null, null, null, " + UtilityDB.valueToString(codMart) + ") as promo_vend , "+ + " mtb_depo WHERE promo_vend.cod_vlis = mtb_depo.cod_vlis AND " + + " mtb_depo.cod_mdep = '" + codMdep + "'"; + return execQuery(connection, sql); + } + + public static void insTipiInca(Connection connection, NtbDocp entity) throws Exception { + String sql = + "SELECT tipo_inca FROM ntb_tipi_inca " + + "WHERE cod_mdep = " + UtilityDB.valueToString(entity.getCodMdep()) + + " AND tipo_inca = " + UtilityDB.valueToString(entity.getTipoInca()); + Map map = execSingleQuery(connection, sql); + if (map.get("tipo_inca") == null){ + NtbTipiInca ntbTipiInca = new NtbTipiInca(); + ntbTipiInca.setCodMdep(entity.getCodMdep()); + ntbTipiInca.setTipoInca(entity.getTipoInca()); + String ls_descrPaga; + if (UtilityString.isNullOrEmpty(entity.getDescrPaga())){ + ls_descrPaga = entity.getTipoInca(); + } else { + ls_descrPaga = entity.getDescrPaga(); + } + ntbTipiInca.setDescrizione(ls_descrPaga); + ntbTipiInca.setOperation(OperationType.INSERT_OR_UPDATE); + entity.setNtbTipiInca(ntbTipiInca); + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/SalesRules.java b/ems-core/src/main/java/it/integry/ems/rules/completing/SalesRules.java new file mode 100644 index 0000000000..3d46f0a7cd --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/SalesRules.java @@ -0,0 +1,444 @@ +package it.integry.ems.rules.completing; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.base.EntityBase; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.db.ResultSetMapper; +import it.integry.ems.entity.DtbOrdr; +import it.integry.ems.entity.MtbLisvData; +import it.integry.ems.entity.TtbLisvTaglieData; +import it.integry.ems.entity.VtbListData; +import it.integry.ems.entity.VtbPromo; +import it.integry.ems.entity.WdtbOrdr; +import it.integry.ems.rules.util.DroolsUtil; +import it.integry.ems.types.OperationType; +import it.integry.ems.types.ApplicationName; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +public class SalesRules extends CommonRules { + + public static Boolean chkUntMisVend(Connection connection, String codMart, String untMisVend) throws SQLException { + String sql = + "SELECT count(*) as count_um " + + "FROM mtb_aart " + + "WHERE cod_mart = " + UtilityDB.valueToString(codMart) + " AND " + + "( unt_mis = " + UtilityDB.valueToString(untMisVend) + " OR " + + " unt_mis2 = " + UtilityDB.valueToString(untMisVend) + " OR " + + " unt_mis3 = " + UtilityDB.valueToString(untMisVend) + ") "; + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return true; + } else if("0".equals(list.get(0).get("count_um").toString())) { + return true; + } else + return false; + } + + public static String completeUntMisLisv(Connection connection, MtbLisvData mtbLisvData) throws SQLException { + String untMisVend = null; + String sql = + "SELECT Isnull(lisv.unt_mis_ven, mtb_aart.unt_mis) " + + "FROM mtb_aart left outer join dbo.getListinoVendita(" + + UtilityDB.valueDateToString(mtbLisvData.getDataIniz(), CommonConstants.DATE_FORMAT_YMD)+"," + + UtilityDB.valueToString(mtbLisvData.getCodVlis())+"," + + UtilityDB.valueToString(mtbLisvData.getCodMart())+") lisv on mtb_aart.cod_mart = lisv.cod_mart " + + " WHERE mtb_aart.cod_mart = "+ UtilityDB.valueToString(mtbLisvData.getCodMart()) ; + + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet res = ps.executeQuery(); + if(res.next()){ + untMisVend = res.getString(1); + } + res.close();ps.close(); + + + return untMisVend; + } + + public static void completePromoVend(Connection connection, VtbListData vtbListData) throws Exception { + VtbPromo vtbPromo = new VtbPromo(); + vtbPromo.setOperation(OperationType.INSERT_OR_UPDATE); + vtbPromo.setCodPromo(vtbListData.getCodPromo()); + vtbPromo.setDescrizione(vtbListData.getDescrPromo()); + vtbPromo.setDataInizSellIn(vtbListData.getDataIniz()); + vtbPromo.setDataFineSellIn(vtbListData.getDataFine()); + + vtbListData.setVtbPromo(vtbPromo); + + } + + public static List> completeRicarica(Connection connection, String codVlis) throws SQLException { + String sql = "SELECT ricarica FROM vtb_list WHERE cod_vlis = '" + codVlis + "'"; + return execQuery(connection, sql); + } + + public static String completeCodVlisRif(Connection connection, String codVlis) throws SQLException { + String sql = "SELECT cod_vlis_rif FROM vtb_list WHERE cod_vlis = '" + codVlis + "'"; + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return null; + } else { + String codVlisRif = list.get(0).get("cod_vlis_rif"); + return codVlisRif; + } + } + + public static String completeDescrizioneGriglia(Connection connection, String codGriglia) throws SQLException { + String sql = "SELECT descrizione FROM vtb_griglia WHERE cod_griglia = " + UtilityDB.valueToString(codGriglia); + List> list = execQuery(connection, sql); + if (list.isEmpty()) { + return null; + } else { + String descrizione = list.get(0).get("descrizione"); + return descrizione; + } + } + public static String completeTipoVariazione(Connection connection, MtbLisvData mtbLisvData) throws Exception { + String tipoVariazioneNew; + String sql = "SELECT tipo_variazione" + + " FROM dbo.getListinoVendita(" + + UtilityDB.valueDateToString(mtbLisvData.getDataIniz(), CommonConstants.DATE_FORMAT_YMD)+"," + + UtilityDB.valueToString(mtbLisvData.getCodVlis())+"," + + UtilityDB.valueToString(mtbLisvData.getCodMart())+")"; + + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet res = ps.executeQuery(); + + if(res.next()){ + String tipoVariazione = res.getString(1); + if(UtilityString.isNullOrEmpty(tipoVariazione) || "D".equals(tipoVariazione)) { + tipoVariazioneNew = "I"; + } else { + tipoVariazioneNew = "U"; + } + } else { + tipoVariazioneNew = "I"; + } + + res.close();ps.close(); + + return tipoVariazioneNew; + + } + + public static Integer completeIdRigaPremi(Connection connection, String codVlis) throws Exception { + String query; + Integer idRiga = null; + + query = "SELECT IsNull(max(id_riga), 0) + 1 " + + "FROM vtb_list_premi " + + "WHERE vtb_list_premi.cod_vlis = '" + codVlis + "' "; + + PreparedStatement ps = connection.prepareStatement(query); + ResultSet res = ps.executeQuery(); + if(res.next()){ + idRiga = (Integer) res.getObject(1); + } + res.close();ps.close(); + + + return idRiga; + } + + public static BigDecimal completeValOneri(Connection connection, EntityBase entity) throws SQLException { + + String codMart=null; + + if(entity instanceof MtbLisvData) { + codMart = ((MtbLisvData)entity).getCodMart(); + } + PreparedStatement info; + ResultSet res; + BigDecimal value = BigDecimal.ZERO; + + String query = "SELECT ISNULL(sum(mtb_spes.importo/mtb_spes.cambio_divi_cont),0) as oneri" + + " FROM mtb_aart LEFT OUTER JOIN mtb_spes ON mtb_aart.cod_mart = mtb_spes.cod_mart AND mtb_spes.flag_inc_in_oneri_ven = 'S' " + + " WHERE mtb_aart.cod_mart = " + UtilityDB.valueToString(codMart); + + info = connection.prepareStatement(query); + res = info.executeQuery(); + if(res.next()) { + value = res.getBigDecimal("oneri"); + } + res.close(); + info.close(); + + return value; + } + + public static BigDecimal completeRapConv(Connection connection, String codMart, String untMisVend) throws SQLException { + PreparedStatement info; + ResultSet res; + BigDecimal value = BigDecimal.ZERO; + + String query = + "SELECT CASE " + UtilityDB.valueToString(untMisVend) + " WHEN unt_mis2 THEN rap_conv2 WHEN unt_mis3 THEN rap_conv3 ELSE 1 END as rap_conv" + + " FROM mtb_aart " + + " WHERE mtb_aart.cod_mart = " + UtilityDB.valueToString(codMart); + + info = connection.prepareStatement(query); + res = info.executeQuery(); + if(res.next()) { + value = res.getBigDecimal("rap_conv"); + } + res.close(); + info.close(); + + return value; + } + + public static Integer completeVersioneVend(Connection connection, EntityBase entity) throws Exception { + Integer versioneNew = 0; + + VtbListData vtbListData = (VtbListData) entity; + + versioneNew = getMaxVersioneVend(connection, vtbListData); + return versioneNew; + } + + private static Integer getMaxVersioneVend(Connection conn, VtbListData vtbListData) throws SQLException { + String query; + Integer versioneNew = 0; + PreparedStatement info; + ResultSet res; + + if (vtbListData.getDataFine() == null || vtbListData.getCodPromo() == null ){ + // VERIFICA SE ESISTE UN LISTINO CON LA DATA INIZIO PASSATA + query = " SELECT max(versione) versione" + + " FROM vtb_list_data " + + " WHERE cod_vlis = " + + UtilityDB.valueToString(vtbListData.getCodVlis()) + + " AND data_iniz = " + + UtilityDB.valueDateToString(vtbListData.getDataIniz(),CommonConstants.DATE_FORMAT_YMD) + " AND " + + " cod_promo IS NULL"; + info = conn.prepareStatement(query); + res = info.executeQuery(); + if(res.next()) { + versioneNew = res.getInt("versione"); + } + res.close(); + info.close(); + } else if (vtbListData.getDataFine() != null && vtbListData.getCodPromo() != null ){ + query = " SELECT max(versione) versione" + + " FROM vtb_list_data " + + " WHERE cod_vlis = " + + UtilityDB.valueToString(vtbListData.getCodVlis()) + + " AND data_iniz = " + + UtilityDB.valueDateToString(vtbListData.getDataIniz(),CommonConstants.DATE_FORMAT_YMD) + + " AND data_fine = " + + UtilityDB.valueDateToString(vtbListData.getDataFine(),CommonConstants.DATE_FORMAT_YMD) + " AND " + + " cod_promo = " + UtilityDB.valueToString(vtbListData.getCodPromo()); + info = conn.prepareStatement(query); + res = info.executeQuery(); + if(res.next()) { + versioneNew = res.getInt("versione"); + } + res.close(); + info.close(); + } + + // SE NON C'E IL LISTINO IN DATA ALLORA VIENE CREATA UNA NUOVA + // VERSIONE + if (versioneNew == 0) { + query = " SELECT max(versione) versione" + + " FROM vtb_list_data " + + " WHERE cod_vlis = " + + UtilityDB.valueToString(vtbListData.getCodVlis()); + info = conn.prepareStatement(query); + res = info.executeQuery(); + if(res.next()) { + versioneNew = res.getInt("versione"); + } + versioneNew = versioneNew + 1; + res.close(); + info.close(); + } else { + vtbListData.setOperation(OperationType.UPDATE); + } + + return versioneNew; + } + + public static List> completeRicaricaRow(Connection connection, String codVlis, String codMart, Date dataIniz) throws SQLException { + String applicationName = null, sql; + String query = "SELECT application_name FROM azienda "; + PreparedStatement info = connection.prepareStatement(query); + ResultSet res = info.executeQuery(); + if(res.next()) { + applicationName = res.getString("application_name"); + } + res.close(); + info.close(); + + if (ApplicationName.WINGEST.toString().equals(applicationName)){ + sql = "SELECT ricarico FROM dbo.getListinoVendita ("+UtilityDB.valueDateToString(dataIniz, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(codVlis) + "," + UtilityDB.valueToString(codMart) + ")"; + } else { + sql = "SELECT distinct ricarico FROM dbo.ftx_getListinoVendita("+UtilityDB.valueDateToString(dataIniz, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(codVlis) + "," + UtilityDB.valueToString(codMart) + ", 'N')"; + } + + return execQuery(connection, sql); + } + + public static void completeDatiLisv(Connection connection, MtbLisvData entity) throws Exception { + MtbLisvData mtbLisvData = ((MtbLisvData) entity); + String codVlis = mtbLisvData.getCodVlis(); + String codMart = mtbLisvData.getCodMart(); + Date dataIniz = mtbLisvData.getDataIniz(); + + String sql = + "SELECT prz_base, " + + "ricarico as ricarica, " + + "magg_prz_vend, " + + "prz_vend, " + + "perc_sco1, " + + "perc_sco2, " + + "perc_sco3, " + + "perc_sco4, " + + "perc_prov, " + + "fisso_prov," + + "posizione, " + + "perc_gest, " + + "val_gest, " + + "perc_ispe, " + + "val_ispe, " + + "perc_promo, " + + "val_promo, " + + "perc_oneri, " + + "note, " + + "prz_vend_sug, " + + "qta_cnf_lisv as qta_cnf, " + + "colli_pedana_lisv as colli_pedana, " + + "colli_strato_lisv as colli_strato, " + + "cod_tcol_ul as cod_tcol_Ul, " + + "cod_tcol_ui as cod_tcol_Ui, " + + "sconto_cartoni, " + + "sconto_strato, " + + "sconto_pedane " + + " FROM dbo.getListinoVendita(" + UtilityDB.valueDateToString(dataIniz, CommonConstants.DATE_FORMAT_YMD) + "," + + UtilityDB.valueToString(codVlis) + "," + + UtilityDB.valueToString(codMart) + ") "; + + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null) + DroolsUtil.completeEntity(entity, fields, columnValue); + } + } + + rs.close(); + ps.close(); + } + + public static void completeTaglie(Connection connection, MtbLisvData entity) throws Exception { + String query = + "SELECT " + UtilityDB.valueToString(entity.getCodVlis()) + " as cod_vlis, " + + " ttb_style_taglie.cod_style, " + + " ttb_style_taglie.cod_tagl, " + + UtilityDB.valueToString(entity.getPrzVend()) + " as prz_vend, " + + UtilityDB.valueToString(entity.getPrzVendSug()) + " as prz_vend_sug " + + " FROM ttb_style_taglie, " + + " tvvw_style_scatti " + + " WHERE tvvw_style_scatti.cod_style = " + UtilityDB.valueToString(entity.getCodMart()) + " AND " + + " tvvw_style_scatti.taglia_min = " + UtilityDB.valueToString(entity.getTagliaMin()) + " AND " + + " tvvw_style_scatti.taglia_max = "+UtilityDB.valueToString(entity.getTagliaMax()) + " AND " + + " ttb_style_taglie.cod_style = tvvw_style_scatti.cod_style AND " + + " ttb_style_taglie.flag_attivo = 'S' AND " + + " ttb_style_taglie.pos between tvvw_style_scatti.pos_min AND tvvw_style_scatti.pos_max AND " + + " ttb_style_taglie.num_scatto = tvvw_style_scatti.num_scatto"; + + PreparedStatement ps = connection.prepareStatement(query); + ResultSet rs = ps.executeQuery(); + + + ResultSetMapper rsMapperLisv = new ResultSetMapper(); + List listTtbLisvTaglieData = new ArrayList(); + listTtbLisvTaglieData.addAll(rsMapperLisv.mapResultSetToList(rs, TtbLisvTaglieData.class, OperationType.INSERT_OR_UPDATE)); + ps.close(); + entity.setTtbLisvTaglieData(listTtbLisvTaglieData); + } + + public static void completeDatiArtOrdDocV(Connection conn, EntityBase entity) throws Exception { + String listino = null, codMart = null, fielsNameUntMis = null, fieldDataValidita; + Date dataValidita = null; + + if (entity instanceof DtbOrdr || entity instanceof WdtbOrdr) { + fieldDataValidita = "data_ord"; + fielsNameUntMis = "unt_ord"; + } else { + fieldDataValidita = "data_doc"; + fielsNameUntMis = "unt_doc"; + } + dataValidita = (Date) DroolsUtil.getEntityFieldValue(entity, fieldDataValidita); + listino = (String) DroolsUtil.getEntityFieldValue(entity, "listino"); + codMart = (String) DroolsUtil.getEntityFieldValue(entity, "cod_mart"); + + String query = + "SELECT IsNull(promo.unt_mis_ven, lisv.unt_mis_ven) as " + fielsNameUntMis + ", " + + " IsNull(promo.rap_conv, lisv.rap_conv) as rap_conv, " + + " IsNull(promo.prz_vend, lisv.prz_vend) as val_unt, " + + " IsNull(promo.prz_vend_iva, lisv.prz_vend_iva ) as val_unt_iva, " + + " IsNull(promo.perc_sco1, lisv.perc_sco1) as sconto5, " + + " IsNull(promo.perc_sco2, lisv.perc_sco2) as sconto6, " + + " IsNull(promo.perc_sco3, lisv.perc_sco3) as sconto7, " + + " IsNull(promo.perc_sco4, lisv.perc_sco4) as sconto8, " + + " qta_cnf, " + + " promo.cod_promo " + + " FROM dbo.getListinoVendita(" + UtilityDB.valueDateToString(dataValidita, CommonConstants.DATE_FORMAT_YMD) + ", " + + UtilityDB.valueToString(listino) + ", " + + UtilityDB.valueToString(codMart) + ") lisv LEFT OUTER JOIN " + + " dbo.getPromozioneVendita(" + UtilityDB.valueDateToString(dataValidita, CommonConstants.DATE_FORMAT_YMD) + ", " + + UtilityDB.valueDateToString(dataValidita, CommonConstants.DATE_FORMAT_YMD) + ", " + + UtilityDB.valueToString(listino) + ", " + + "null, " + + UtilityDB.valueToString(codMart) + ") promo on lisv.cod_vlis = promo.cod_vlis and " + + " lisv.cod_mart = promo.cod_mart " + +" WHERE IsNull(promo.tipo_variazione, lisv.tipo_variazione) <> 'D'"; + + PreparedStatement ps = conn.prepareStatement(query); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + ResultSetMetaData rsmd = rs.getMetaData(); + for (int i = 0; i < rsmd.getColumnCount(); i++) { + String columnName = UtilityString.sqlToField(rsmd.getColumnName(i + 1)); + Object columnValue = rs.getObject(i + 1); + Object valueEntity = DroolsUtil.getFieldValue(entity, columnName); + String[] fields = new String[] { columnName }; + if (valueEntity == null){ + if ("qta_cnf".equals(columnName)){ + BigDecimal rapConv = (BigDecimal) DroolsUtil.getEntityFieldValue(entity, "rap_conv"); + columnValue = ((BigDecimal) columnValue).divide(rapConv,EmsRestConstants.cifreDecMax, RoundingMode.HALF_UP); + + } + DroolsUtil.completeEntity(entity, fields, columnValue); + } + + + } + } + + rs.close(); + ps.close(); + } +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/completing/TabGenTextiles.java b/ems-core/src/main/java/it/integry/ems/rules/completing/TabGenTextiles.java new file mode 100644 index 0000000000..c63410321d --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/completing/TabGenTextiles.java @@ -0,0 +1,22 @@ +package it.integry.ems.rules.completing; + +import java.sql.Connection; + +import it.integry.ems.entity.JtbComt; +import it.integry.ems.entity.TtbAnnoStag; +import it.integry.ems.types.OperationType; + +public class TabGenTextiles extends CommonRules { + + public static void completeCommessaAnnoStag(Connection connection, TtbAnnoStag ttbAnnoStag) throws Exception { + JtbComt jtbComt = new JtbComt(); + jtbComt.setOperation(OperationType.INSERT_OR_UPDATE); + jtbComt.setCodJcom(ttbAnnoStag.getAnnoStag()); + jtbComt.setDescrizione(ttbAnnoStag.getAnnoStag()); + + ttbAnnoStag.setJtbComt(jtbComt); + ttbAnnoStag.setCodJcom(ttbAnnoStag.getAnnoStag()); + + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/expression/SalesExpression.java b/ems-core/src/main/java/it/integry/ems/rules/expression/SalesExpression.java new file mode 100644 index 0000000000..cd6e3edd67 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/expression/SalesExpression.java @@ -0,0 +1,169 @@ +package it.integry.ems.rules.expression; + +import java.math.BigDecimal; + +public class SalesExpression { + + public static Double calcPrzNetto(Double prezzo, Double percAliq, Integer cifreMax) { + Double prezzoNetto = prezzo / (1+percAliq/100); + return new BigDecimal(prezzoNetto).setScale(cifreMax, BigDecimal.ROUND_HALF_UP).doubleValue(); + } + /*9/5/16 Mina Valutare forse non servono più + public static BigDecimal calcRicarico(BigDecimal przBase, BigDecimal przVend, BigDecimal percSfrido){ + BigDecimal ricarico = BigDecimal.ZERO; + + if (przBase != BigDecimal.ZERO ) { + Double przBaseD = przBase.doubleValue() * (1 + percSfrido.doubleValue() / 100); + ricarico = new BigDecimal((przVend.doubleValue() - przBaseD)/przBaseD * 100).setScale(2, BigDecimal.ROUND_HALF_UP); + } + return ricarico; + } + + public static BigDecimal calcMargine(BigDecimal przBase, BigDecimal przVend, BigDecimal percSfrido){ + BigDecimal margine = BigDecimal.ZERO; + + if (przVend != BigDecimal.ZERO){ + margine = new BigDecimal((przVend.doubleValue() - (przBase.doubleValue() + / (1 - percSfrido.doubleValue() / 100))) / przVend.doubleValue() * 100) + .setScale(2, BigDecimal.ROUND_HALF_UP); + } + return margine; + } + + public static BigDecimal calcPrzVend(Connection conn, String codVlis, String codMart, BigDecimal przBase, BigDecimal ricarico, BigDecimal maggPrzVend) throws SQLException { + + BigDecimal percSfrido = new BigDecimal(0); + BigDecimal arrotonda = new BigDecimal(0); + + String query, listinoMargine = ""; + Integer cifreDec = 0; + PreparedStatement info; + ResultSet res; + + query = "SELECT vtb_list.arr_ric, " + + " vtb_list.flag_lisv_margine, " + " gtb_divi.cifre_dec " + + "FROM vtb_list, " + " gtb_divi " + + "WHERE vtb_list.cod_divi = gtb_divi.cod_divi AND " + + " vtb_list.cod_vlis = '" + codVlis + "' "; + + info = conn.prepareStatement(query); + res = info.executeQuery(); + + if (res.next()) { + arrotonda = res.getBigDecimal("arr_ric"); + listinoMargine = res.getString("flag_lisv_margine"); + cifreDec = res.getInt("cifre_dec"); + } + res.close(); + info.close(); + query = "SELECT mtb_aart.perc_sfrido " + "FROM mtb_aart " + + "WHERE mtb_aart.cod_mart = '" + codMart + "' "; + info = conn.prepareStatement(query); + res = info.executeQuery(); + + if (res.next()) { + percSfrido = res.getBigDecimal("perc_sfrido"); + } + res.close(); + info.close(); + + return calcPrzVend(przBase, ricarico, maggPrzVend, cifreDec, arrotonda, percSfrido, listinoMargine); + + } + + public static BigDecimal calcPrzVend(BigDecimal przBase, BigDecimal ricarico, BigDecimal maggPrzVend, + Integer cifreDec, BigDecimal arrotonda, BigDecimal percSfrido, String listinoMargine) { + BigDecimal przVend = new BigDecimal(0); + Integer cifrePrec = 0; + + // CALCOLO PREZZO DI VENDITA + if (arrotonda != BigDecimal.ZERO) { + cifrePrec = 0; + + while (arrotonda.compareTo(BigDecimal.ONE) < 0) { + cifrePrec++; + arrotonda.multiply(BigDecimal.TEN); + } + + if (cifrePrec < cifreDec) { + cifrePrec = cifreDec; + } + + przVend = calcPrzVendInternal(przBase, ricarico, maggPrzVend, cifrePrec, percSfrido, listinoMargine); + } else { + przVend = calcPrzVendInternal(przBase, ricarico, maggPrzVend, cifreDec, percSfrido, listinoMargine); + } + + return przVend; + } + + private static BigDecimal calcPrzVendInternal(BigDecimal przBase, BigDecimal ricarico, + BigDecimal maggPrzVend, Integer cifreDec, BigDecimal percSfrido, String listinoMargine) { + + Double przVend; + // CALCOLO PREZZO DI VENDITA + if ("N".equals(listinoMargine)) { + przVend = (przBase.doubleValue() + maggPrzVend.doubleValue()) + * (1 + ricarico.doubleValue() / 100) / (1 - percSfrido.doubleValue() / 100); + } else { + przVend = (przBase.doubleValue() + maggPrzVend.doubleValue()) / (1 - ricarico.doubleValue() / 100) / (1 - percSfrido.doubleValue() / 100); + } + + return new BigDecimal(przVend).setScale(cifreDec, BigDecimal.ROUND_HALF_UP); + } + + private static BigDecimal calcPrzVendIva(BigDecimal przVend, BigDecimal percAliq, Integer cifreDec, String flagArrPrzIva){ + Double przVendIVA; + + //CALCOLO PREZZO DI VENDITA CON IVA + if ("E".equals(flagArrPrzIva)) { + przVendIVA = Math.ceil(((przVend.doubleValue()*(1+percAliq.doubleValue()/100)) * Math.pow(10, cifreDec)))/Math.pow(10, cifreDec); + return new BigDecimal(przVendIVA); + } else if ("D".equals(flagArrPrzIva)){ + przVendIVA = przVend.doubleValue()*(1+percAliq.doubleValue()/100); + return new BigDecimal((int)przVendIVA.intValue()); + } else if ("N".equals(flagArrPrzIva)){ + przVendIVA = przVend.doubleValue() * (1+percAliq.doubleValue()/100); + return new BigDecimal(przVendIVA).setScale(EmsRestConstants.cifreDecMax, BigDecimal.ROUND_HALF_UP); + } else { + przVendIVA = przVend.doubleValue() * (1+percAliq.doubleValue()/100); + return new BigDecimal(przVendIVA).setScale(cifreDec, BigDecimal.ROUND_HALF_UP); + } + + } + + public static BigDecimal calcPrzVendIva(Connection conn, String codVlis, String codMart, BigDecimal przVend) throws SQLException{ + BigDecimal percAliq = BigDecimal.ZERO; + String query, flagArrPrzIva = ""; + Integer cifreDec = EmsRestConstants.cifreDecMax; + PreparedStatement info; + ResultSet res; + + query = "SELECT vtb_list.flag_arr_prz_iva, gtb_divi.cifre_dec FROM vtb_list, gtb_divi " + + "WHERE vtb_list.cod_divi = gtb_divi.cod_divi AND " + + "vtb_list.cod_vlis = '" + codVlis + "' "; + + info = conn.prepareStatement(query); + res = info.executeQuery(); + if(res.next()){ + flagArrPrzIva = res.getString("flag_arr_prz_iva"); + cifreDec = res.getInt("cifre_dec"); + } + res.close();info.close(); + + query = "SELECT gtb_aliq.perc_aliq FROM mtb_aart, gtb_aliq " + + "WHERE mtb_aart.cod_aliq = gtb_aliq.cod_aliq AND " + + " mtb_aart.cod_mart = '" + codMart + "' "; + + info = conn.prepareStatement(query); + res = info.executeQuery(); + if(res.next()){ + percAliq = res.getBigDecimal("perc_aliq"); + } + res.close();info.close(); + + return calcPrzVendIva(przVend, percAliq, cifreDec, flagArrPrzIva); + } + */ + +} diff --git a/ems-core/src/main/java/it/integry/ems/rules/expression/dto/InfoPezziDTO.java b/ems-core/src/main/java/it/integry/ems/rules/expression/dto/InfoPezziDTO.java new file mode 100644 index 0000000000..45d55fe242 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/expression/dto/InfoPezziDTO.java @@ -0,0 +1,120 @@ +package it.integry.ems.rules.expression.dto; + +import java.util.Date; + + +public class InfoPezziDTO { + private String untMisVend, codPromo, descrPromo, codDivi, tipoVariazione, posizione; + private double RapConv, ricarica, przBase, przVend, przVendIva, cambio, maggPrzVend; + private Date dataIniz, dataFine, dataAggPrz; + private long versione; + + public String getUntMisVend() { + return untMisVend; + } + public void setUntMisVend(String untMisVend) { + this.untMisVend = untMisVend; + } + public String getCodPromo() { + return codPromo; + } + public void setCodPromo(String codPromo) { + this.codPromo = codPromo; + } + public String getDescrPromo() { + return descrPromo; + } + public void setDescrPromo(String descrPromo) { + this.descrPromo = descrPromo; + } + public String getCodDivi() { + return codDivi; + } + public void setCodDivi(String codDivi) { + this.codDivi = codDivi; + } + public String getTipoVariazione() { + return tipoVariazione; + } + public void setTipoVariazione(String tipoVariazione) { + this.tipoVariazione = tipoVariazione; + } + public double getRapConv() { + return RapConv; + } + public void setRapConv(double RapConv) { + this.RapConv = RapConv; + } + public double getRicarica() { + return ricarica; + } + public void setRicarica(double ricarica) { + this.ricarica = ricarica; + } + public double getPrzBase() { + return przBase; + } + public void setPrzBase(double przBase) { + this.przBase = przBase; + } + public double getPrzVend() { + return przVend; + } + public void setPrzVend(double przVend) { + this.przVend = przVend; + } + public double getPrzVendIva() { + return przVendIva; + } + public void setPrzVendIva(double przVendIva) { + this.przVendIva = przVendIva; + } + public double getCambio() { + return cambio; + } + public void setCambio(double cambio) { + this.cambio = cambio; + } + public Date getDataIniz() { + return dataIniz; + } + public void setDataIniz(Date dataIniz) { + this.dataIniz = dataIniz; + } + public Date getDataFine() { + return dataFine; + } + public void setDataFine(Date dataFine) { + this.dataFine = dataFine; + } + public Date getDataAggPrz() { + return dataAggPrz; + } + public void setDataAggPrz(Date dataAggPrz) { + this.dataAggPrz = dataAggPrz; + } + public long getVersione() { + return versione; + } + public void setVersione(long versione) { + this.versione = versione; + } + public String getPosizione() { + return posizione; + } + public void setPosizione(String posizione) { + this.posizione = posizione; + } + /** + * @return the maggPrzVend + */ + public double getMaggPrzVend() { + return maggPrzVend; + } + /** + * @param maggPrzVend the maggPrzVend to set + */ + public void setMaggPrzVend(double maggPrzVend) { + this.maggPrzVend = maggPrzVend; + } + } diff --git a/ems-core/src/main/java/it/integry/ems/rules/util/CustomAccumulateFunction.java b/ems-core/src/main/java/it/integry/ems/rules/util/CustomAccumulateFunction.java new file mode 100644 index 0000000000..7da27baa06 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/rules/util/CustomAccumulateFunction.java @@ -0,0 +1,59 @@ +package it.integry.ems.rules.util; + +import it.integry.ems.base.EntityBase; + +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; +import java.io.Serializable; + +import org.kie.api.runtime.rule.AccumulateFunction; + +public class CustomAccumulateFunction implements AccumulateFunction { + + @Override + public void readExternal(ObjectInput arg0) throws IOException, ClassNotFoundException { + + } + + @Override + public void writeExternal(ObjectOutput arg0) throws IOException { + + } + + @Override + public Serializable createContext() { + return new Double(0); + } + + @Override + public void init(Serializable context) throws Exception { + //System.out.println(); + } + + @Override + public void accumulate(Serializable context, Object value) { + + } + + @Override + public void reverse(Serializable context, Object value) throws Exception { + + } + + @Override + public Object getResult(Serializable context) throws Exception { + return context; + } + + @Override + public boolean supportsReverse() { + return false; + } + + @Override + public Class getResultType() { + return EntityBase.class; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/schedule/QuartzJobBeanWithConf.java b/ems-core/src/main/java/it/integry/ems/schedule/QuartzJobBeanWithConf.java new file mode 100644 index 0000000000..d6c9ec2f41 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/schedule/QuartzJobBeanWithConf.java @@ -0,0 +1,82 @@ +package it.integry.ems.schedule; + +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.quartz.SchedulerException; +import org.springframework.beans.BeanWrapper; +import org.springframework.beans.MutablePropertyValues; +import org.springframework.beans.PropertyAccessorFactory; +import org.springframework.beans.factory.annotation.Autowired; + +public abstract class QuartzJobBeanWithConf implements Job { + + protected String profileDb; + protected String enabled; + protected String serviceName; + protected String branch; + + public String getProfileDb() { + return profileDb; + } + + public String getEnabled() { + return enabled; + } + + public String getServiceName() { + return serviceName; + } + + public String getBranch() { + return branch; + } + + @Autowired + public void setProfileDb(String profileDb) { + this.profileDb = profileDb; + } + + @Autowired + public void setEnabled(String enabled) { + this.enabled = enabled; + } + + @Autowired + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + @Autowired + public void setBranch(String branch) { + this.branch = branch; + } + + /** + * This implementation applies the passed-in job data map as bean property + * values, and delegates to {@code executeInternal} afterwards. + * @see #executeInternal + */ + @Override + public final void execute(JobExecutionContext context) throws JobExecutionException { + try { + BeanWrapper bw = PropertyAccessorFactory.forBeanPropertyAccess(this); + MutablePropertyValues pvs = new MutablePropertyValues(); + pvs.addPropertyValues(context.getScheduler().getContext()); + pvs.addPropertyValues(context.getMergedJobDataMap()); + bw.setPropertyValues(pvs, true); + } + catch (SchedulerException ex) { + throw new JobExecutionException(ex); + } + executeInternal(context); + } + + /** + * Execute the actual job. The job data map will already have been + * applied as bean property values by execute. The contract is + * exactly the same as for the standard Quartz execute method. + * @see #execute + */ + protected abstract void executeInternal(JobExecutionContext context) throws JobExecutionException; +} diff --git a/ems-core/src/main/java/it/integry/ems/service/EntityProcessor.java b/ems-core/src/main/java/it/integry/ems/service/EntityProcessor.java new file mode 100644 index 0000000000..eba746f3ab --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/service/EntityProcessor.java @@ -0,0 +1,357 @@ +package it.integry.ems.service; + +import java.io.StringWriter; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.Types; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.node.ObjectNode; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.base.EntityBase; +import it.integry.ems.base.EntityInterface; +import it.integry.ems.base.EntityPropertyHolder; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.export.dto.ExportTemplate; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.model.ColumnMetadataDTO; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.resolver.ResultSetSerializer; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.rulescompleting.DroolsDataCompleting; +import it.integry.ems.sync.ASyncManager; +import it.integry.ems.sync.ConnectionCacheHolder; +import it.integry.ems.sync.SyncManager; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; + +@Service +@Scope(value = "request") +public class EntityProcessor { + + private final Logger logger = LogManager.getLogger(); + + @Autowired + protected SyncManager syncManager; + @Autowired + protected ASyncManager asyncManager; + + @Autowired + private DroolsDataCompleting dataCompleting; + @Autowired + private DataSource ds; + @Autowired + private EmsProperties properties; + @Autowired + private EntityPropertyHolder entityPropertyHolder; + + @Autowired + private JSONObjectMapper jsonObjectMapper; + + private boolean isOnline = false; + private String dbDistributoreFinded = null; + private String primaryProfileDB = null; + + private Map dsSyncList = null; + + public String getPrimaryProfileDB() { + return primaryProfileDB; + } + + public void setPrimaryProfileDB(String primaryProfileDB) { + this.primaryProfileDB = primaryProfileDB; + } + + public Map getDsSyncList() { + return dsSyncList; + } + + public void setDsSyncList(Map dsSyncList) { + this.dsSyncList = dsSyncList; + } + + public Object processEntity(EntityInterface entity) throws Exception { + return processEntity(entity, ""); + } + public Object processEntity(EntityInterface entity, String username) throws Exception { + return processEntity(entity, true, username); + } + + public Object processEntity(EntityInterface entity, Boolean isSync) throws Exception { + return processEntity(entity, isSync, false, true, ""); + } + + public Object processEntity(EntityInterface entity, Boolean isSync, String username) throws Exception { + return processEntity(entity, isSync, false, true, username); + } + + public Object processEntity(EntityInterface entity, Boolean isSync, + Boolean forceTransaction, Boolean firstEntity, String username) throws Exception { + + Connection connection = ds.getConnection(); + try { + entity.setEntityHolder(entityPropertyHolder); + entity.setUsername(username); + entity.setApplicationNameDB(ds.getConnection()); + entity.trimPK(); + if (entity.getOperation() == null) + entity.setOperation(OperationType.NO_OP); + + if(entity.getOperation() == OperationType.NO_OP) { + processInternal(entity, isSync, forceTransaction, firstEntity); + } else if(entity.getOperation() == OperationType.SELECT_OBJECT) { + return entity.selectAndMergeEntity(connection, (EntityBase)entity); + //return entity; + } else if (entity.getOperation() == OperationType.SELECT) { + String json = (String) entity.select(connection); + if(json != null){ + EntityBase[] entityList = null; + //json to entity + if(json.charAt(0) == '[') { + entityList = jsonObjectMapper.readValue(json, EntityBase[].class); + } else if(json.charAt(0) == '{') { + EntityBase ent = jsonObjectMapper.readValue(json, EntityBase.class); + entityList = new EntityBase[] {ent}; + } + + // 2016-11-30 (FABIO-GIUSEPPE): valorizzato operation SELECT nella response + for (int i = 0; i < entityList.length; i++) { + entityList[i].setOperation(entity.getOperation()); + } + + return entityList; + } else + return null; + } else { + processInternal(entity, isSync, forceTransaction, firstEntity); + } + /////////////////////////// + if(!forceTransaction) { + if(!connection.isClosed()) + connection.commit(); + //connection.close(); + } + /////////////////////////// + return null; + } catch (Exception e) { + if(!forceTransaction) { + if(!connection.isClosed()) + connection.rollback(); + //connection.close(); + } + throw e; + } + } + + private void processInternal(EntityInterface entity, Boolean isSync, + Boolean forceTransaction, Boolean firstEntity) throws Exception { + + String username; + entity.setCompletingManager(dataCompleting); + Connection primaryDB = null; + if(dsSyncList != null) + primaryDB = dsSyncList.get(primaryProfileDB); + + if(primaryDB != null && !primaryDB.getCatalog().equals(ds.getConnection().getCatalog())) { + username = primaryDB.getCatalog(); + entity.dataCompleting(primaryDB); + } else { + username = ds.getConnection().getCatalog(); + entity.dataCompleting(ds.getConnection()); + } + + if(!isSync) { + entity.manageWithParentConnection(ds.getConnection()); + } else { + //test on syncronization active + syncIsActive(entity); + // + if (isOnline) { + logger.info("SINCRONIZZAZIONE su entity " + entity.getTableName() + " ONLINE: " + isOnline); + if(dbDistributoreFinded!=null){ + ConnectionCacheHolder.releaseProfile(primaryProfileDB); + ds.initialize(dbDistributoreFinded, properties.getGlobalConnectionIniPath()); + logger.debug("INIT CONN MASTER (" + dbDistributoreFinded + ")"); + } + //esclusione campi sul distributore + String sql = "SELECT " + UtilityDB.valueToString(dbDistributoreFinded) + ", where_cond_sql, type_transaction, recalc_columns " + + " from stb_subscription " + + " where table_name="+UtilityDB.valueToString(entity.getTableName().toUpperCase()) + + " AND flag_attivo='S' AND user_name = " + UtilityDB.valueToString(primaryProfileDB); + + logger.debug("query sync " + sql); + Connection connection = ds.getConnection(); + logger.debug("connection " + connection.getCatalog() + " " + connection.toString()); + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + EntityInterface entityCloned = entity.clone(); + //IMPORTANTE + //inizializza un nuovo arraylist + entityCloned.setRecalcColumns(new ArrayList()); + + if(rs.next()) { + if(rs.getString("recalc_columns")!=null) { + entityCloned.setRecalcColumns(Arrays.asList(rs.getString("recalc_columns").split(","))); + } + } + rs.close(); + ps.close(); + + syncManager.executeSynchronization(entity, entityCloned, dsSyncList, forceTransaction, firstEntity, primaryProfileDB); + } else { + if(primaryDB != null && !primaryDB.getCatalog().equals(ds.getConnection().getCatalog())) { + entity.manageWithParentConnection(primaryDB); + } else { + entity.manageWithParentConnection(ds.getConnection()); + } + + if(entity.isSyncOfflineActive()) + asyncManager.putHasSyncOffline(ds.getConnection().getCatalog()); + asyncManager.putSyncOffline(ds.getConnection().getCatalog(), entity); + } + } + } + + public ServiceRestResponse saveExportTemplate(ExportTemplate exportTemplate) { + + exportTemplate.getModoInvio().getExportName(); + + if(exportTemplate.getModoInvio().getChkDownload()) { + + } + + return null; + } + + public List selectRawData(String query) throws Exception { + SimpleModule module = new SimpleModule(); + module.addSerializer(new ResultSetSerializer()); + + ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); + objectMapper.setDateFormat(new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD)); + objectMapper.registerModule(module); + PreparedStatement ps = ds.getConnection().prepareStatement(query); + ResultSet resultset = ps.executeQuery(); + + List list = new ArrayList(); + ResultSetMetaData rsmd = resultset.getMetaData(); + for (int i=0;i listOut = new ArrayList(); + listOut.add(json); + listOut.add(metadata); + return listOut; + } + + private void syncIsActive(EntityInterface entity) throws Exception { + + //init delle variabili + isOnline = false; + dbDistributoreFinded = null; + + Connection connection = ds.getConnection(); + String dbDistributore = syncManager.getDistributore(entity); + if(dbDistributore != null && !"".equals(dbDistributore)) { + DataSource dsDistro = new DataSource(); + + String whereUser = ""; + if(!ds.getProfile().toUpperCase().equals(dbDistributore.toUpperCase())){ + whereUser = " and user_name in ("+UtilityDB.valueToString(primaryProfileDB)+")"; + dbDistributoreFinded = dbDistributore; + dsDistro.initialize(dbDistributore, properties.getGlobalConnectionIniPath()); + } else { + dsDistro.initialize(ds.getProfile(), properties.getGlobalConnectionIniPath()); + } + + connection = dsDistro.getConnection(); + PreparedStatement ps = (PreparedStatement) connection + .prepareStatement("SELECT where_cond_sql, type from stb_subscription where table_name='" + + entity.getTableName().toUpperCase() + "' AND flag_attivo='S'" + whereUser); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + isOnline = true; + } + rs.close(); + ps.close(); + dsDistro.forceClose(); + } + } + + public boolean isSyncActive() { + return isOnline; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/service/HttpRestWrapper.java b/ems-core/src/main/java/it/integry/ems/service/HttpRestWrapper.java new file mode 100644 index 0000000000..e7da773360 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/service/HttpRestWrapper.java @@ -0,0 +1,56 @@ +package it.integry.ems.service; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Response; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.security.utility.RestUtil; + +@Service +public class HttpRestWrapper { + + @Autowired + private EmsProperties properties; + @Autowired + private JSONObjectMapper jsonObjectMapper; + + public List callProcessEntityList(String database, String username, String password, String jsonBody, Boolean forceTransaction) + throws Exception { + + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + String auth = RestUtil.generateAuth(database, database, "POST", jsonBody, "application/json", + properties.getRootApi() + EmsRestConstants.PATH_PROCESS_ENTITY_LIST, now); + + final Client client = ClientBuilder.newClient(); + final WebTarget resource = client.target(properties.getEndPointWS()) + .path(properties.getRootApi() + EmsRestConstants.PATH_PROCESS_ENTITY_LIST); + Response response = resource.queryParam(CommonConstants.PROFILE_DB, database) + .queryParam("forceTransaction", forceTransaction).request() + .header("Authorization", database + ":" + auth).header("SignDate", now) + .header("username", username).header("password", password) + .post(Entity.json(jsonBody)); + + String str = response.readEntity(String.class); + List respList = Arrays + .asList(jsonObjectMapper.readValue(str, ServiceRestResponse[].class)); + + response.close(); + client.close(); + return respList; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/service/MailService.java b/ems-core/src/main/java/it/integry/ems/service/MailService.java new file mode 100644 index 0000000000..27aae75c74 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/service/MailService.java @@ -0,0 +1,273 @@ +package it.integry.ems.service; + +import it.integry.ems.datasource.DataSource; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.response.FileItem; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; +import it.integry.security.utility.CryptoUtils; + +import java.io.File; +import java.io.FileInputStream; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.List; +import java.util.Properties; + +import javax.activation.MimetypesFileTypeMap; +import javax.mail.internet.AddressException; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeMessage; + +import org.apache.commons.codec.binary.Base64; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.InputStreamSource; +import org.springframework.mail.javamail.JavaMailSenderImpl; +import org.springframework.mail.javamail.MimeMessageHelper; +import org.springframework.stereotype.Service; + +@Service +public class MailService { + + @Autowired + private JavaMailSenderImpl mailSender; + + private String smtp; + private Integer port=25; + private String isSSL; + private String isAuth; + private String from; + private String username; + private String password; +// private String typeContent; + private List attachmentFile; + private List attachmentByte; +// private Boolean autoConfig = false; + + @Autowired + private EmsProperties properties; + +// @Autowired +// private SetupGest setupGest; + + public void sendMail(String profileDb, String from, String fromName, String to, String cc, String ccn, + String subject, String msgText, Boolean isHtml) throws Exception { + sendMail(profileDb, from, fromName, to, cc, ccn, subject, msgText, isHtml, "false"); + } + + public void sendMail(String profileDb, String from, String fromName, String to, String cc, String ccn, + String subject, String msgText, Boolean isHtml, String isDebug) throws Exception { + + readParamenter(profileDb, from); + + Properties props = new Properties(); + + props.put("mail.debug", isDebug); + + mailSender.setHost(smtp); + mailSender.setPort(port); + + //TODO funzionano così in java 6/7 + //TODO quando si passerà a java 8 verificare il protocollo smtps + props.put("mail.transport.protocol", "smtp"); + mailSender.setProtocol("smtp"); + + if ("S".equals(isSSL)) { + if (587 == port){ //inserito per gestire il protocollo tls + props.put("mail.smtp.starttls.enable", "true"); + }else{ + props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); + props.put("mail.smtp.ssl.trust", "*"); + props.put("mail.smtp.ssl.enable", "true"); + } + } + + if ("S".equals(isAuth)) { + props.put("mail.smtp.auth", "true"); + mailSender.setUsername(username); + mailSender.setPassword(password); + } + + MimeMessage message = mailSender.createMimeMessage(); + message.setSubject(subject); + + MimeMessageHelper helper = new MimeMessageHelper(message, true, "UTF-8"); + + if (attachmentFile != null) { + for (String filePath : attachmentFile) { + File f = new File(filePath); + helper.addAttachment(f.getName(), f); + } + } + + MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); + if (attachmentByte != null) { + for (FileItem fileItem : attachmentByte) { + InputStreamSource is = new ByteArrayResource( + Base64.decodeBase64(fileItem.getFileb64Content())); + helper.addAttachment(fileItem.getFileName(), is, mimeTypesMap.getContentType(fileItem.getFileName())); + } + } + + if (UtilityString.isNullOrEmpty(fromName)) { + helper.setFrom(this.from); + } else { + helper.setFrom(this.from, fromName); + } + + if (!UtilityString.isNullOrEmpty(to)) + helper.setTo(to.split(";")); + + if (!UtilityString.isNullOrEmpty(cc)) + helper.setCc(cc.split(";")); + if (!UtilityString.isNullOrEmpty(ccn)) + helper.setBcc(ccn.split(";")); + + // typeContent + helper.setText(msgText, isHtml); + + mailSender.setJavaMailProperties(props); + mailSender.send(message); + } + + private void readParamenter(String profileDb, String fromEmail) throws Exception { + DataSource ds = new DataSource(); + ds.initialize(profileDb, properties.getGlobalConnectionIniPath()); + + String sql = "select e_mail, smtp, authentication, user_name, password, port, ssl, crypt_password, flag_default " + + "from stb_email where e_mail = " + UtilityDB.valueToString(fromEmail); + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + smtp = rs.getString("smtp"); + from = rs.getString("e_mail"); + username = rs.getString("user_name"); + password = rs.getString("password"); + port = rs.getInt("port"); + isSSL = rs.getString("ssl"); + isAuth = rs.getString("authentication"); + if ("S".equals(rs.getString("crypt_password"))) { + password = CryptoUtils.decrypt(password); + } + } else { + Properties propMail = new Properties(); + FileInputStream fis = new FileInputStream(properties.getIniPath() + "/mail.ini"); + if (fis != null) { + propMail.load(fis); + smtp = propMail.getProperty("SMTP"); + from = propMail.getProperty("FROM"); + username = propMail.getProperty("USERNAME"); + password = propMail.getProperty("PASSWORD"); + if(!UtilityString.isNullOrEmpty(propMail.getProperty("PORT"))) + port = Integer.parseInt(propMail.getProperty("PORT")); + isSSL = propMail.getProperty("SSL"); + isAuth = propMail.getProperty("AUTHENTICATION"); + if (UtilityString.isNullOrEmpty(propMail.getProperty("PASSWORD_CRIPTATA")) || + "S".equals(propMail.getProperty("PASSWORD_CRIPTATA"))) { + password = CryptoUtils.decrypt(password); + } + } + } + rs.close(); + ps.close(); + + ds.forceClose(); + } + + public void sendMail(String[] to, String cc, String subject, String msg) throws Exception { + sendMail(mailSender.getUsername(), to, cc, subject, msg, null, null, null); + } + + public void sendMail(String from, String fromName, String[] to, String cc, String ccn, String subject, + String msg, Boolean isHtmlText) throws Exception { + MimeMessage message = mailSender.createMimeMessage(); + message.setSubject(subject); + MimeMessageHelper helper; + helper = new MimeMessageHelper(message, true, "UTF-8"); + helper.setFrom(from, fromName); + helper.setTo(to); + + if (!UtilityString.isNullOrEmpty(cc)) + helper.setCc(cc); + if (!UtilityString.isNullOrEmpty(ccn)) + helper.setBcc(ccn); + + helper.setText(msg, isHtmlText); + mailSender.send(message); + } + + public void sendMail(String from, String[] to, String cc, String subject, String msg) throws Exception { + sendMail(from, to, cc, subject, msg, null, null, null); + } + + public void sendMail(String from, String[] to, String cc, String subject, String msg, byte[] attachment, + String contentType, String attachmentFilename) throws Exception { + MimeMessage message = mailSender.createMimeMessage(); + message.setSubject(subject); + MimeMessageHelper helper; + helper = new MimeMessageHelper(message, true, "UTF-8"); + helper.setFrom(from); + helper.setTo(to); + + if (!UtilityString.isNullOrEmpty(cc)) + helper.setCc(cc); + + if (attachment != null) { + InputStreamSource is = new ByteArrayResource(attachment); + helper.addAttachment(attachmentFilename, is, contentType); + } + helper.setText(msg, true); + mailSender.send(message); + } + + public void sendMail(String from, String[] to, String cc, String subject, String msg, List items) + throws Exception { + MimeMessage message = mailSender.createMimeMessage(); + message.setSubject(subject); + MimeMessageHelper helper; + helper = new MimeMessageHelper(message, true, "UTF-8"); + helper.setFrom(from); + helper.setTo(to); + + if (!UtilityString.isNullOrEmpty(cc)) + helper.setCc(cc); + + if (items.size() > 0) { + for (FileItem fileItem : items) { + InputStreamSource is = new ByteArrayResource( + Base64.decodeBase64(fileItem.getFileb64Content())); + helper.addAttachment(fileItem.getFileName(), is, fileItem.getExt()); + } + } + helper.setText(msg, true); + mailSender.send(message); + } + + public List getAttachmentFile() { + return attachmentFile; + } + + public void setAttachmentFile(List attachmentFile) { + this.attachmentFile = attachmentFile; + } + + public List getAttachmentByte() { + return attachmentByte; + } + + public void setAttachmentByte(List attachmentByte) { + this.attachmentByte = attachmentByte; + } + + public boolean isValidEmailAddress(String email) { + boolean result = true; + try { + InternetAddress emailAddr = new InternetAddress(email); + emailAddr.validate(); + } catch (AddressException ex) { + result = false; + } + return result; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/service/PrinterService.java b/ems-core/src/main/java/it/integry/ems/service/PrinterService.java new file mode 100644 index 0000000000..a1a04dd70b --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/service/PrinterService.java @@ -0,0 +1,124 @@ +package it.integry.ems.service; + +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.utility.UtilityString; + +import java.awt.print.PrinterException; +import java.awt.print.PrinterJob; +import java.io.ByteArrayOutputStream; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.sql.Connection; +import java.util.Map; + +import javax.print.Doc; +import javax.print.DocFlavor; +import javax.print.DocPrintJob; +import javax.print.PrintException; +import javax.print.PrintService; +import javax.print.PrintServiceLookup; +import javax.print.SimpleDoc; +import javax.print.attribute.HashPrintRequestAttributeSet; +import javax.print.attribute.PrintRequestAttributeSet; + +import net.sf.jasperreports.engine.JasperCompileManager; +import net.sf.jasperreports.engine.JasperExportManager; +import net.sf.jasperreports.engine.JasperFillManager; +import net.sf.jasperreports.engine.JasperPrint; +import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.design.JasperDesign; +import net.sf.jasperreports.engine.xml.JRXmlLoader; + +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.printing.PDFPageable; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class PrinterService { + + @Autowired + private EmsProperties properties; + + public void print(String printerName, InputStream is, HashPrintRequestAttributeSet attrib, String mimeType) throws Exception { + PrintService myService = configPrinter(printerName); + + printFileType(myService, is, attrib, mimeType); + } + + public void print(String printerName, String fileName, HashPrintRequestAttributeSet attrib, String mimeType) throws Exception { + PrintService myService = configPrinter(printerName); + + FileInputStream fis = new FileInputStream(fileName); + printFileType(myService, fis, attrib, mimeType); + } + + public void print(String printerName, InputStream is, String mimeType) throws Exception { + PrintService myService = configPrinter(printerName); + + printFileType(myService, is, new HashPrintRequestAttributeSet(), mimeType); + } + + public void print(String printerName, String fileName, String mimeType) throws Exception { + PrintService myService = configPrinter(printerName); + + FileInputStream fis = new FileInputStream(fileName); + printFileType(myService, fis, new HashPrintRequestAttributeSet(), mimeType); + } + + public byte[] createPdfFromReport(Map parameters, InputStream inputStream, Connection conn) throws Exception { + + JasperDesign jasperDesign = JRXmlLoader.load(inputStream); + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); + JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn); + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + JasperExportManager.exportReportToPdfStream(jasperPrint, baos); + baos.close(); + return baos.toByteArray(); + } + + private void printFileType(PrintService myService, InputStream fis, HashPrintRequestAttributeSet attrib, String mimeType) + throws IOException, PrinterException, PrintException { + DocPrintJob printJob = myService.createPrintJob(); + if(mimeType.endsWith("application/pdf")){ + PDDocument dc = PDDocument.load(fis); + PrinterJob job = PrinterJob.getPrinterJob(); + job.setPrintService(myService); +// dc.silentPrint(job); + job.setPageable(new PDFPageable(dc)); + job.print(); + } else { + Doc doc = new SimpleDoc(fis, DocFlavor.INPUT_STREAM.AUTOSENSE, null); + printJob.print(doc, attrib); + } + fis.close(); + } + + private PrintService configPrinter(String printerName) throws IllegalStateException { + DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PAGEABLE; + PrintRequestAttributeSet patts = new HashPrintRequestAttributeSet(); + PrintService[] ps = PrintServiceLookup.lookupPrintServices(flavor, patts); + if (ps.length == 0) { + throw new IllegalStateException("No Printer found"); + } + + if(UtilityString.isNullOrEmpty(printerName)) + printerName = properties.getDefaultPrinterName(); + + PrintService myService = null; + for (PrintService printService : ps) { + if (printService.getName().equals(printerName)) { + myService = printService; + break; + } + } + + if (myService == null) { + throw new IllegalStateException("Printer not found"); + } + return myService; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/service/ReportProcessor.java b/ems-core/src/main/java/it/integry/ems/service/ReportProcessor.java new file mode 100644 index 0000000000..2f4223bf41 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/service/ReportProcessor.java @@ -0,0 +1,412 @@ +package it.integry.ems.service; + +import it.integry.ems.datasource.DataSource; +import it.integry.ems.db.ResultSetMapper; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.report.dto.JasperDTO; +import it.integry.ems.report.dto.PairsDTO; +import it.integry.ems.report.dto.SubreportDTO; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityFile; +import it.integry.ems.utility.UtilityString; +import it.integry.ems.utility.UtilityXML; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.sql.PreparedStatement; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; + +import net.sf.jasperreports.engine.JRAbstractExporter; +import net.sf.jasperreports.engine.JRExporterParameter; +import net.sf.jasperreports.engine.JasperCompileManager; +//import net.sf.jasperreports.engine.JasperExportManager; +import net.sf.jasperreports.engine.JasperFillManager; +import net.sf.jasperreports.engine.JasperPrint; +import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.data.JsonDataSource; +import net.sf.jasperreports.engine.design.JRDesignQuery; +import net.sf.jasperreports.engine.design.JasperDesign; +import net.sf.jasperreports.engine.export.JRHtmlExporter; +import net.sf.jasperreports.engine.export.JRPdfExporter; +import net.sf.jasperreports.engine.export.JRRtfExporter; +import net.sf.jasperreports.engine.export.JRXlsExporter; +import net.sf.jasperreports.engine.query.JRXPathQueryExecuterFactory; +//import net.sf.jasperreports.engine.query.JsonQueryExecuterFactory; +import net.sf.jasperreports.engine.util.JRProperties; +import net.sf.jasperreports.engine.util.JRXmlUtils; +import net.sf.jasperreports.engine.xml.JRXmlLoader; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.IOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +@Service +@Scope(value = "request") +public class ReportProcessor { + +// private final Logger logger = LogManager.getLogger(); + + @Autowired + private DataSource ds; + @Autowired + private EmsProperties properties; + @Autowired + private JSONObjectMapper jsonObjectMapper; + + public byte[] processReportBase64(JasperDTO jasperDTO) throws Exception { + String stringXML, pathSetupWS, formatoExport = null, callId = null; + + pathSetupWS = properties.getIniPath() + "/WEBSERVICES/setup_reportjasper.ini"; + String pathJrxml = UtilityString.profileString(pathSetupWS, "PATH_JRXML", ""); + + String pathTemp = pathJrxml + "temp/"; + if(UtilityFile.directoryCreate(pathTemp)) { + stringXML = new String(Base64.decodeBase64(jasperDTO.getB64XmlReport().getBytes())); + if(stringXML.length() != 0){ + JasperDTO newJasperDTO = reportBase64ToDTO(stringXML, pathTemp, pathJrxml); + byte[] reportByte = processReport(newJasperDTO, newJasperDTO.getFormatoExport()); + + // MANTENGO LA FUNZIONALITA DEL SALVATAGGIO FISICO PER ACCESSO SUCCESSIVO + // (IMPLEMENTATO CON "ASYNC") + if (!UtilityString.isNullOrEmpty(callId)){ + pathSetupWS = properties.getIniPath() + "/WEBSERVICES/setup_web.ini"; + String pathWebShare = UtilityString.profileString(pathSetupWS, "PATH_WEB_SHARE", ""); + UtilityFile.directoryCreate(pathWebShare); + UtilityFile.writeFileRenameDuplicate(pathWebShare, callId + "." + formatoExport, reportByte); + } + return reportByte; + } else{ + throw new Exception("Xml in input non valido"); + } + } else{ + throw new Exception("processReportBase64: Errore di accesso in " + pathTemp); + } + } + + public JasperDTO reportBase64ToDTO(String stringXML, String pathTemp, String pathJrxml) throws Exception { + String b64Jrxml = null, query = null, whereCond = null, jsonSource = null, + params = null, formatoExport = null, callId = null; + ArrayList fileList = new ArrayList(); + Document doc; + FileOutputStream fos; + + JasperDTO newJasperDTO = new JasperDTO(); + doc = UtilityXML.convertStringToDocument(stringXML); + + if(doc == null){ + throw new Exception("xml non valido"); + } + + if(doc.getElementsByTagName("QUERY") != null){ + query = doc.getElementsByTagName("QUERY").item(0).getTextContent(); + } + if(doc.getElementsByTagName("WHERE_COND") != null){ + whereCond = doc.getElementsByTagName("WHERE_COND").item(0).getTextContent(); + } + if(doc.getElementsByTagName("JSON_SOURCE") != null){ + jsonSource = doc.getElementsByTagName("JSON_SOURCE").item(0).getTextContent(); + } + if(doc.getElementsByTagName("PARAMS") != null){ + params = doc.getElementsByTagName("PARAMS").item(0).getTextContent(); + } + if(doc.getElementsByTagName("FORMATO_EXPORT") != null){ + formatoExport = doc.getElementsByTagName("FORMATO_EXPORT").item(0).getTextContent().toUpperCase(); + } + if(doc.getElementsByTagName("CALL_ID") != null){ + callId = doc.getElementsByTagName("CALL_ID").item(0).getTextContent(); + } + if(doc.getElementsByTagName("B64_JRXML") != null){ + b64Jrxml = doc.getElementsByTagName("B64_JRXML").item(0).getTextContent(); + } + if(b64Jrxml == null){ + throw new Exception("B64_JRXML non specificato"); + } + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH.mm.ss.SSS"); + pathJrxml = pathTemp + "tmp" + sdf.format(new Date()) + ".jrxml"; + + newJasperDTO.setQuery(query); + newJasperDTO.setWhereCond(whereCond); + newJasperDTO.setJsonSource(jsonSource); + newJasperDTO.setFileName(pathJrxml); + newJasperDTO.setCallId(callId); + newJasperDTO.setB64ReportJrxml(b64Jrxml); + newJasperDTO.setFormatoExport(formatoExport); + + byte[] bytes = Base64.decodeBase64(b64Jrxml); + fos = new FileOutputStream(new File(pathJrxml)); + fos.write(bytes); + fos.close(); + fileList.add(pathJrxml); + + Node subreports = doc.getElementsByTagName("SUB_REPORTS").item(0); + NodeList nodeListSubRep = subreports.getChildNodes(); + + List subreportsList = new ArrayList(); + for (int i = 0; i < nodeListSubRep.getLength(); i++) { + SubreportDTO dto = new SubreportDTO(); + Node currentNode = nodeListSubRep.item(i); + String jasperFilename = currentNode.getAttributes().getNamedItem("FILENAME").getNodeValue(); + Node firstChild = currentNode.getFirstChild(); + if("B64_JASPER".equals(firstChild.getNodeName())){ + dto.setB64Report(firstChild.getTextContent()); // "B64_JASPER"; + } else if("B64_JRXML".equals(firstChild.getNodeName())) { + dto.setB64Jrxml(firstChild.getTextContent()); // "B64_JRXML"; + } + //String pathJasper = pathTemp + jasperFilename; + dto.setName(jasperFilename); + subreportsList.add(dto); + +// bytes = Base64.decodeBase64(b64Jasper); +// fos = new FileOutputStream(new File(pathJasper)); +// fos.write(bytes); +// fos.close(); +// fileList.add(pathJasper); + } + newJasperDTO.setSubreports(subreportsList); + + if(!UtilityString.isNullOrEmpty(params)){ + params = params.replaceAll("'", "\""); + PairsDTO[] pairs = jsonObjectMapper.readValue(params, PairsDTO[].class); + newJasperDTO.setParams(Arrays.asList(pairs)); + } + return newJasperDTO; + } + + public byte[] processReport(JasperDTO jasperDTO, String outFormat) throws Exception { + + String pathSetupWS, sql = "", jrxmlHome = "", pathJrxml, queryLanguage; + ArrayList fileTempList = new ArrayList(); + + String fileJrxml = jasperDTO.getFileName(); + //fileTempList.add(fileJrxml); + + String query = jasperDTO.getQuery(); + String whereCond = jasperDTO.getWhereCond(); + String jsonSource = jasperDTO.getJsonSource(); + + HashMap hm_parameters = createParamsFromList(jasperDTO.getParams()); + + JRProperties.setProperty("net.sf.jasperreports.default.pdf.embedded", "true"); + JRProperties.setProperty("net.sf.jasperreports.query.executer.factory.xmla-mdx", "net.sf.jasperreports.engine.query.JRXmlaQueryExecuterFactory"); + + if(fileJrxml != null && FilenameUtils.getPrefixLength(fileJrxml) != 0) { + // PATH ASSOLUTA DEL FILE JRXML + jrxmlHome = FilenameUtils.getFullPathNoEndSeparator(fileJrxml) + "/"; + } else { // (SOLO NOME FILE) + pathSetupWS = properties.getIniPath() + "/WEBSERVICES/setup_reportjasper.ini"; + jrxmlHome = UtilityString.profileString(pathSetupWS, "PATH_JRXML", ""); + } + + if(UtilityString.isNullOrEmpty(fileJrxml) && jasperDTO.getB64ReportJrxml() != null) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH.mm.ss.SSS"); + pathJrxml = jrxmlHome+ "temp/" + "tmp" + sdf.format(new Date()) + ".jrxml"; + //fileTempList.add(pathJrxml); + FileOutputStream fos = new FileOutputStream(new File(pathJrxml)); + IOUtils.write(Base64.decodeBase64(jasperDTO.getB64ReportJrxml()), fos); + fos.close(); + } else { + if(fileJrxml != null && !new File(fileJrxml).isAbsolute()) { + if(!(fileJrxml.indexOf(".jrxml") > 0) && !(fileJrxml.indexOf(".jasper") > 0)) { + fileJrxml = fileJrxml + ".jrxml"; + } + pathJrxml = jrxmlHome + fileJrxml; + } else{ + pathJrxml = fileJrxml; + } + } + fileTempList.add(pathJrxml); + JasperDesign jasperDesign = JRXmlLoader.load(pathJrxml); + + hm_parameters.put("SUBREPORT_DIR", jrxmlHome); + if(jasperDTO.getSubreports() != null){ + for (SubreportDTO subrep : jasperDTO.getSubreports()) { + if(!UtilityString.isNullOrEmpty(subrep.getB64Report())) { + fileTempList.add(jrxmlHome + subrep.getName()); + File f = new File(jrxmlHome + subrep.getName()); + if(!f.exists()) { + FileOutputStream fos = new FileOutputStream(f); + IOUtils.write(Base64.decodeBase64(subrep.getB64Report()), fos); + fos.close(); + } + } else if(!UtilityString.isNullOrEmpty(subrep.getB64Jrxml())) { + fileTempList.add(jrxmlHome + subrep.getName() + ".jrxml"); + File f = new File(jrxmlHome + subrep.getName() + ".jrxml"); + if(!f.exists()) { + FileOutputStream fos = new FileOutputStream(f); + IOUtils.write(Base64.decodeBase64(subrep.getB64Jrxml()), fos); + fos.close(); + } + JasperCompileManager.compileReportToFile(f.getAbsolutePath(), f.getAbsolutePath().replace(".jrxml", "")); + fileTempList.add(f.getAbsolutePath().replace(".jrxml", "")); + } + } + } + + JasperPrint jp = null; + + if(!UtilityString.isNullOrEmpty(jsonSource)){ + /** SORGENTE JSON */ + + InputStream stream = new ByteArrayInputStream(jsonSource.getBytes("UTF-8")); + JsonDataSource ds = new JsonDataSource(stream); + ds.setLocale(Locale.US); + + if(fileJrxml != null && fileJrxml.endsWith(".jasper")){ // METODO CON CARICAMENTO FILE COMPILATO .JASPER + jp = JasperFillManager.fillReport(fileJrxml, hm_parameters, ds); + } else { // METODO CON CARICAMENTO FILE .JRXML + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); + jp = JasperFillManager.fillReport(jasperReport, hm_parameters, ds); + } + + } else{ + queryLanguage = jasperDesign.getQuery().getLanguage().toLowerCase(); + + if ("xmla-mdx".equals(queryLanguage)) { + /** SORGENTE XMLA-MDX */ + + String[] obblParams = { "XMLA_DATA_URL", "XMLA_DATA_DATASOURCE", "XMLA_DATA_CATALOG", + "XMLA_USERNAME", "XMLA_PASSWORD" }; + + for(String obblParam : obblParams){ + if (!hm_parameters.containsKey(obblParam)){ + throw new Exception("Parametro obbligatorio '" + obblParam + "' non specificato"); + } + } + + sql = !UtilityString.isNullOrEmpty(query) ? query : jasperDesign.getQuery().getText(); + if (whereCond.length() > 0) { + // usata solo con olap. valutare quando sarà il momento + // sql = UtilityDB.addwhereCondMDX(sql, whereCond); + JRDesignQuery newQuery = new JRDesignQuery(); + newQuery.setText(sql); + jasperDesign.setQuery(newQuery); + } + + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); + jp = JasperFillManager.fillReport(jasperReport, hm_parameters); + + } else if ("sql".equals(queryLanguage) || "xpath".equals(queryLanguage)){ + + /** SORGENTE SQL / XPATH */ + /* SE ESISTE UNA CONDIZIONE DI WHERE ESTERNA, PRENDE LA QUERY + * ORIGINALE DEL REPORT O LA QUERY PASSATA COME PARAMETRO E + * AGGIUNGE LA CONDIZIONE PASSATA */ + + if("sql".equals(queryLanguage)){ + sql = !UtilityString.isNullOrEmpty(query) ? query : jasperDesign.getQuery().getText(); + } + + if(whereCond.replaceAll("\\s+","").compareTo("1=1")!=0){ + sql = UtilityDB.addwhereCondAtLast(sql, whereCond); + } + + if("sql".equals(queryLanguage)) { + JRDesignQuery newQuery = new JRDesignQuery(); + newQuery.setText(sql); + jasperDesign.setQuery(newQuery); + } else if("xpath".equals(queryLanguage)) { + String fileXml = UtilityDB.query2XML(query, ds.getConnection(), "root", "righe"); + if(fileXml!=null && fileXml.length()>0){ + Document doc = JRXmlUtils.parse(IOUtils.toInputStream(fileXml, "UTF-8")); + hm_parameters.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, doc); + } else { + throw new Exception("Datasource xml vuoto"); + } + } + + if(fileJrxml != null && fileJrxml.endsWith(".jasper")){ // METODO CON CARICAMENTO FILE COMPILATO .JASPER + jp = JasperFillManager.fillReport(fileJrxml, hm_parameters, ds.getConnection()); + } else{ // METODO CON CARICAMENTO FILE .JRXML + JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); + jp = JasperFillManager.fillReport(jasperReport, hm_parameters, ds.getConnection()); + } + + } else{ + throw new Exception("Query Language '" + queryLanguage + "' non supportato"); + } + } + + /* + if (jp.getPages().size() == 0){ + throw new Exception("Nessuna pagina da visualizzare."); + }*/ + + for(String fileTemp : fileTempList){ //ELIMINO FILE TEMPORANEI CREATI (JRXML E JASPER) + File f = new File(fileTemp); + if(f.exists()){ + f.delete(); + } + } + + if(jp.getPages().size() > 0){ + ByteArrayOutputStream output = new ByteArrayOutputStream(); + JRAbstractExporter exporter = null; + + if(("PDF").equals(outFormat)){ + //return JasperExportManager.exportReportToPdf(jp); + exporter = new JRPdfExporter(); + } else if(("HTML").equals(outFormat)){ + exporter = new JRHtmlExporter(); + } else if(("XLS").equals(outFormat)){ + exporter = new JRXlsExporter(); + } else if(("RTF").equals(outFormat)){ + exporter = new JRRtfExporter(); + } else { + throw new Exception("Formato di output '" + outFormat + "' non supportato"); + } + + exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp); + exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, output); + exporter.exportReport(); + return output.toByteArray(); + } + return null; + } + + private HashMap createParamsFromList(List params) { + HashMap hm_parameters = new HashMap(); + if(params!=null){ + for(PairsDTO pairsDTO : params){ + hm_parameters.put(pairsDTO.getName(), pairsDTO.getValue()); + } + } + return hm_parameters; + } + + public JasperDTO getReportByName(String reportName) throws Exception { + JasperDTO jasperDTO; + + String sql = "select filename, where_cond_static, b64_jrxml from wtb_jrept WHERE name = " + UtilityDB.valueToString(reportName); + + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSetMapper jasperMapper = new ResultSetMapper(); + ResultSetMapper subRepMapper = new ResultSetMapper(); + jasperDTO = jasperMapper.mapResultSetToObject(ps.executeQuery(), JasperDTO.class); + ps.close(); + + sql = "select jasper_filename, b64_jasper from wtb_jrepr_sub WHERE report_name = " + UtilityDB.valueToString(reportName); + ps = ds.getConnection().prepareStatement(sql); + List subreports = subRepMapper.mapResultSetToList(ps.executeQuery(), SubreportDTO.class); + ps.close(); + jasperDTO.setSubreports(subreports); + + return jasperDTO; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/service/XlsService.java b/ems-core/src/main/java/it/integry/ems/service/XlsService.java new file mode 100644 index 0000000000..cc38fbf90e --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/service/XlsService.java @@ -0,0 +1,106 @@ +package it.integry.ems.service; + +import java.io.File; +import java.io.FileInputStream; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.stereotype.Service; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; + +@Service +public class XlsService { + + public void fillFromXml(String jsonTemplate, String fileName) throws Exception { + + JsonObject template = new JsonParser().parse(jsonTemplate).getAsJsonObject(); + FileInputStream file = new FileInputStream(new File(fileName)); + + XSSFWorkbook workbook = new XSSFWorkbook(file); + XSSFSheet sheet = workbook.getSheetAt(0); + + Iterator rowIterator = sheet.iterator(); + + Map header = new HashMap(); + boolean readHeader = true; + + JsonArray datas = new JsonArray(); + + while (rowIterator.hasNext()) { + Row row = rowIterator.next(); + JsonObject data = new JsonObject(); + + if(readHeader){ + for (Cell cell : row) { + header.put(cell.toString(), cell.getColumnIndex()); + } + }else{ + Set> map = template.entrySet(); + Iterator> iterator = map.iterator(); + while(iterator.hasNext()) { + String propName = iterator.next().getKey(); + JsonElement element = template.get(propName); + + if (element.isJsonPrimitive() && row.getCell(header.get(propName)) != null + && !"".equals(row.getCell(header.get(propName)).toString())) { + data.addProperty(propName, row.getCell(header.get(propName)).toString()); + } else if (element.isJsonArray()) { + recurseJson(data, header, row, propName, element); + } else if (element.isJsonObject()) { + addJsonObject(data, header, row, propName, element); + } + } + } + + if (!readHeader) + datas.add(data); + readHeader = false; + } +// workbook.close(); + file.close(); + } + + + private void addJsonObject(JsonObject data, Map header, + Row row, String propName, JsonElement element) { + JsonObject object = new JsonObject(); + Set> map = element.getAsJsonObject().entrySet(); + Iterator> it = map.iterator(); + while(it.hasNext()){ + String prop = it.next().getKey(); + if (row.getCell(header.get(prop)) != null) { + object.addProperty(prop, row.getCell(header.get(prop)).toString()); + } + } + data.add(propName, object); + } + + private void recurseJson(JsonObject data, Map header, Row row, String propName, JsonElement element) { + JsonArray arrayWrite = new JsonArray(); + data.add(propName, arrayWrite); + + for (JsonElement jsonElement : element.getAsJsonArray()) { + JsonObject obj = new JsonObject(); + Set> map = jsonElement.getAsJsonObject().entrySet(); + Iterator> it = map.iterator(); + while(it.hasNext()){ + String prop = it.next().getKey(); + if (row.getCell(header.get(prop)) != null) { + obj.addProperty(prop, row.getCell(header.get(prop)).toString()); + } + } + arrayWrite.add(obj); + } + } +} diff --git a/ems-core/src/main/java/it/integry/ems/spring/etl/ConditionalBeanDefinitionParser.java b/ems-core/src/main/java/it/integry/ems/spring/etl/ConditionalBeanDefinitionParser.java new file mode 100644 index 0000000000..3b5797d234 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/spring/etl/ConditionalBeanDefinitionParser.java @@ -0,0 +1,147 @@ +package it.integry.ems.spring.etl; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.util.LinkedHashSet; +import java.util.Set; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.BeanDefinitionStoreException; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.BeanDefinitionHolder; +import org.springframework.beans.factory.support.BeanDefinitionReaderUtils; +import org.springframework.beans.factory.xml.BeanDefinitionParser; +import org.springframework.beans.factory.xml.BeanDefinitionParserDelegate; +import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.core.io.Resource; +import org.springframework.core.io.support.ResourcePatternUtils; +import org.springframework.util.ResourceUtils; +import org.springframework.util.xml.DomUtils; +import org.w3c.dom.Element; + +public class ConditionalBeanDefinitionParser implements BeanDefinitionParser { + + /** Default placeholder prefix: "${" */ + public static final String DEFAULT_PLACEHOLDER_PREFIX = "${"; + + /** Default placeholder suffix: "}" */ + public static final String DEFAULT_PLACEHOLDER_SUFFIX = "}"; + + private Logger logger = LogManager.getLogger(); + + public static final String RESOURCE_ATTRIBUTE = "resource"; + + /** + * Parse the "cond" element and check the mandatory "test" attribute. If the + * system property named by test is null or empty (i.e. not defined) then + * return null, which is the same as not defining the bean. + */ + public BeanDefinition parse(Element element, ParserContext parserContext) { + if (DomUtils.nodeNameEquals(element, "cond")) { + String test = element.getAttribute("test"); + Boolean var; + if("".equals(test)){ + var = Boolean.FALSE; + }else{ + if(test.contains("=")){ + String[] el = test.split("="); + var = el[0].trim().equals(el[1].trim()); + }else { + var = Boolean.parseBoolean(test); + } + } + + if (var) { + Element beanElement = DomUtils.getChildElementByTagName(element, "import"); + if(beanElement!=null){ + importBeanDefinitionResource(beanElement, parserContext); + } + beanElement = DomUtils.getChildElementByTagName(element, "bean"); + if(beanElement!=null){ + return parseAndRegisterBean(beanElement, parserContext); + } + } + } + return null; + } + + private BeanDefinition parseAndRegisterBean(Element element, ParserContext parserContext) { + BeanDefinitionParserDelegate delegate = parserContext.getDelegate(); + BeanDefinitionHolder holder = delegate + .parseBeanDefinitionElement(element); + BeanDefinitionReaderUtils.registerBeanDefinition(holder, + parserContext.getRegistry()); + + return holder.getBeanDefinition(); + } + + protected void importBeanDefinitionResource(Element ele, ParserContext parserContext) { + + BeanDefinitionParserDelegate delegate = parserContext.getDelegate(); + + String location = ele.getAttribute(RESOURCE_ATTRIBUTE); + if (!org.springframework.util.StringUtils.hasText(location)) { + delegate.getReaderContext().error("Resource location must not be empty", ele); + return; + } + + // Resolve system properties: e.g. "${user.dir}" + location = delegate.getReaderContext().getEnvironment().resolveRequiredPlaceholders(location); + + Set actualResources = new LinkedHashSet(4); + + // Discover whether the location is an absolute or relative URI + boolean absoluteLocation = false; + try { + absoluteLocation = ResourcePatternUtils.isUrl(location) || ResourceUtils.toURI(location).isAbsolute(); + } + catch (URISyntaxException ex) { + // cannot convert to an URI, considering the location relative + // unless it is the well-known Spring prefix "classpath*:" + } + + // Absolute or relative? + if (absoluteLocation) { + try { + int importCount = delegate.getReaderContext().getReader().loadBeanDefinitions(location, actualResources); + if (logger.isDebugEnabled()) { + logger.trace("Imported " + importCount + " bean definitions from URL location [" + location + "]"); + } + } + catch (BeanDefinitionStoreException ex) { + delegate.getReaderContext().error( + "Failed to import bean definitions from URL location [" + location + "]", ele, ex); + } + } + else { + // No URL -> considering resource location as relative to the current file. + try { + int importCount; + Resource relativeResource = delegate.getReaderContext().getResource().createRelative(location); + if (relativeResource.exists()) { + importCount = delegate.getReaderContext().getReader().loadBeanDefinitions(relativeResource); + actualResources.add(relativeResource); + } + else { + String baseLocation = delegate.getReaderContext().getResource().getURL().toString(); + importCount = delegate.getReaderContext().getReader().loadBeanDefinitions( + org.springframework.util.StringUtils.applyRelativePath(baseLocation, location), actualResources); + } + if (logger.isDebugEnabled()) { + logger.debug("Imported " + importCount + " bean definitions from relative location [" + location + "]"); + } + } + catch (IOException ex) { + delegate.getReaderContext().error("Failed to resolve current resource location", ele, ex); + } + catch (BeanDefinitionStoreException ex) { + delegate.getReaderContext().error("Failed to import bean definitions from relative location [" + location + "]", + ele, ex); + } + } + Resource[] actResArray = actualResources.toArray(new Resource[actualResources.size()]); + delegate.getReaderContext().fireImportProcessed(location, actResArray, delegate.getReaderContext().extractSource(ele)); + } + +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/spring/etl/ConditionalBeanNamespaceHandler.java b/ems-core/src/main/java/it/integry/ems/spring/etl/ConditionalBeanNamespaceHandler.java new file mode 100644 index 0000000000..a1fb72145c --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/spring/etl/ConditionalBeanNamespaceHandler.java @@ -0,0 +1,10 @@ +package it.integry.ems.spring.etl; + +import org.springframework.beans.factory.xml.NamespaceHandlerSupport; + +public class ConditionalBeanNamespaceHandler extends NamespaceHandlerSupport { + + public void init() { + super.registerBeanDefinitionParser("cond", new ConditionalBeanDefinitionParser()); + } +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/status/HandlerInterceptorAnnotationAwareHandlerMapping.java b/ems-core/src/main/java/it/integry/ems/status/HandlerInterceptorAnnotationAwareHandlerMapping.java new file mode 100644 index 0000000000..e7d64e875b --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/status/HandlerInterceptorAnnotationAwareHandlerMapping.java @@ -0,0 +1,21 @@ +package it.integry.ems.status; + +import java.lang.reflect.Method; + +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.mvc.method.RequestMappingInfo; +import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; + +@Component +public class HandlerInterceptorAnnotationAwareHandlerMapping extends RequestMappingHandlerMapping { + + public HandlerInterceptorAnnotationAwareHandlerMapping() { + System.out.println("HandlerInterceptorAnnotationAwareHandlerMapping initialised"); + + } + + public RequestMappingInfo getMappingForMethod(Method method, Class handlerType) { + return super.getMappingForMethod(method, handlerType); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/status/ServiceChecker.java b/ems-core/src/main/java/it/integry/ems/status/ServiceChecker.java new file mode 100644 index 0000000000..97054dcc38 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/status/ServiceChecker.java @@ -0,0 +1,81 @@ +package it.integry.ems.status; + +import it.integry.ems.response.ParamRequestDTO; +import it.integry.ems.response.StatusResponse; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.servlet.mvc.method.RequestMappingInfo; + +@Service +public class ServiceChecker { + + @Autowired + private HandlerInterceptorAnnotationAwareHandlerMapping hiaahm; + + public List getServiceStatus(Method[] methods, Class controllerClass) { + List list = new ArrayList(); + List params = new ArrayList(); + + for (Method method : methods) { + RequestMappingInfo info = hiaahm.getMappingForMethod(method, controllerClass); + params = new ArrayList(); + StatusResponse resp = new StatusResponse(); + RequestMapping mapping = method.getAnnotation(RequestMapping.class); + if(mapping != null) { + Boolean active = true; + resp.setMethod((mapping.method()[0]).name()); + resp.setPath(mapping.value()[0]); + Annotation[][] paramList = method.getParameterAnnotations(); + final Type[] paramTypes = method.getGenericParameterTypes(); + for (int i = 0; i < paramList.length; i++) { + for (Annotation a: paramList[i]) { + String className = ""; + if(paramTypes[i] instanceof Class) + className = ((Class)paramTypes[i]).getSimpleName(); + else if(paramTypes[i] instanceof ParameterizedType) { + ParameterizedType pt = (ParameterizedType)paramTypes[i]; + className = pt.toString(); + } + + if (a instanceof RequestParam) { + params.add(new ParamRequestDTO(((RequestParam)a).value(), className, + ((RequestParam)a).required(), ((RequestParam)a).defaultValue())); + } else if (a instanceof RequestBody) { + resp.setBodyClass(className.replaceAll("java.util.", "")); + resp.setBodyRequired(((RequestBody)a).required()); + } + } + } + if(info == null) + active = false; + resp.setParamList(params); + resp.setActive(active); + + String retClassName = "void"; + final Type retTypes = method.getGenericReturnType(); + if(retTypes != null) { + if(retTypes instanceof Class) + retClassName = ((Class)retTypes).getSimpleName(); + else if(retTypes instanceof ParameterizedType) { + ParameterizedType pt = (ParameterizedType)retTypes; + retClassName = pt.toString(); + } + } + resp.setReturnClass(retClassName.replaceAll("java.util.", "")); + list.add(resp); + } + } + return list; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/sync/ASyncManager.java b/ems-core/src/main/java/it/integry/ems/sync/ASyncManager.java new file mode 100644 index 0000000000..8a0ded2800 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/sync/ASyncManager.java @@ -0,0 +1,118 @@ +package it.integry.ems.sync; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.base.EntityBase; +import it.integry.ems.base.EntityInterface; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.utility.UtilityDB; + +import java.io.StringWriter; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.commons.codec.binary.Base64; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; + +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.google.common.base.Joiner; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Multimap; + +@Service +@Scope(value="request") +public class ASyncManager { + +// @Autowired +// private DataSource ds; + @Autowired + private EmsProperties properties; + @Autowired + private JSONObjectMapper objectMapper; + + private Multimap mapSync = ArrayListMultimap.create(); + private Map mapHasSync = new HashMap(); + + public void putSyncOffline(String database, EntityInterface entity) { + mapSync.put(database.toUpperCase(), entity); + } + + public boolean getSyncOffline(String database) { + return mapSync.get(database.toUpperCase()) != null; + } + + public void putHasSyncOffline(String database) { + if(mapHasSync.get(database.toUpperCase()) == null) + mapHasSync.put(database.toUpperCase(), true); + } + + public void proceedSyncronization(Map dsSyncList) throws Exception { + + Set keys = mapSync.keySet(); + + for (String database : keys) { + if(mapHasSync.get(database.toUpperCase())!=null && mapHasSync.get(database.toUpperCase())) { + + Set entityListName = new HashSet(); + + Collection entityList = mapSync.get(database.toUpperCase()); + ArrayNode array = objectMapper.createArrayNode(); + for (EntityInterface entityI : entityList) { + EntityBase entity = (EntityBase)entityI; + entityListName.add(entity.getTableName().toUpperCase()); + array.addPOJO(entity); + } + StringWriter writer = new StringWriter(); + objectMapper.writeValue(writer, array); + + Connection syncConnection = null; + if(dsSyncList.get(database.toUpperCase()) != null){ + syncConnection = dsSyncList.get(database.toUpperCase()); + + } else if((syncConnection = ConnectionCacheHolder.getConnection(database)) == null) { + DataSource dsSync = new DataSource(); + dsSync.initialize(database, properties.getGlobalConnectionIniPath()); + syncConnection = dsSync.getConnection(); + dsSyncList.put(database, syncConnection); + } + + String transactionDate = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + Integer transactionId = 0; + PreparedStatement ps = syncConnection.prepareStatement("SELECT max(transaction_id) as max_id from stb_transaction_log_db"); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + transactionId = rs.getInt("max_id") + 1; + + Clob clobData = syncConnection.createClob(); + //base64 conversion + String clob = Base64.encodeBase64String(writer.toString().getBytes()); + + clobData.setString(1, clob); + + String nameList = Joiner.on(";").skipNulls().join(entityListName); + String sql = "INSERT INTO stb_transaction_log_db(transaction_id,transaction_date,user_name,transaction_json,entity_name_list) " + + "values ("+transactionId+",'"+transactionDate+"', null, ?, "+UtilityDB.valueToString(nameList)+")"; + PreparedStatement psExec = syncConnection.prepareStatement(sql); + psExec.setClob(1, clobData); + psExec.executeUpdate(); + psExec.close(); + } + rs.close(); + ps.close(); + } + } + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/sync/ConnectionCacheHolder.java b/ems-core/src/main/java/it/integry/ems/sync/ConnectionCacheHolder.java new file mode 100644 index 0000000000..8024ba2294 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/sync/ConnectionCacheHolder.java @@ -0,0 +1,52 @@ +package it.integry.ems.sync; + +import it.integry.ems.datasource.ConnectionDecorator; + +import java.sql.Connection; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + +public class ConnectionCacheHolder { + + private static ConcurrentMap connectionMap = new ConcurrentHashMap(); + private static final int SIZE = 30; + + public static synchronized Connection getConnection(String profileDb) throws Exception { + ConnectionDecorator dec = connectionMap.get(profileDb.toUpperCase()); + if(dec != null && !dec.isUsed() && !dec.getConnection().isClosed()) + return dec.getConnection(); + else + return null; + } + + public static synchronized void putConnection(String profileDB, ConnectionDecorator connectionDecorator) { + if(connectionMap.size() <= SIZE && connectionMap.get(profileDB.toUpperCase()) == null) + connectionMap.put(profileDB.toUpperCase(), connectionDecorator); + } + + public static synchronized void releaseProfile(String profileDB) { + ConnectionDecorator dec = connectionMap.get(profileDB.toUpperCase()); + if(dec != null) { + dec.setUsed(false); + } + } + + public static synchronized void dropConnection(String profileDB) { + connectionMap.remove(profileDB.toUpperCase()); + } + + public static synchronized void cleanConnection() throws Exception { + Set keys = connectionMap.keySet(); + for (String key : keys) { + ConnectionDecorator dec = connectionMap.get(key.toUpperCase()); + if(dec != null && (!dec.isUsed() || dec.getConnection().isClosed())) { + if(!dec.getConnection().isClosed()) + dec.getConnection().close(); + connectionMap.remove(key.toUpperCase()); + } + } + + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/sync/SyncManager.java b/ems-core/src/main/java/it/integry/ems/sync/SyncManager.java new file mode 100644 index 0000000000..1139715c91 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/sync/SyncManager.java @@ -0,0 +1,294 @@ +package it.integry.ems.sync; + +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.PrintStream; +import java.io.StringWriter; +import java.net.InetAddress; +import java.net.URL; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.InvocationCallback; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Response; + +import org.apache.commons.io.IOUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.base.EntityInterface; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.exception.SyncException; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.response.AttachmentDTO; +import it.integry.ems.response.FileItem; +import it.integry.ems.service.SetupGest; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; +import it.integry.security.utility.RestUtil; + +@Service +@Scope(value="request") +public class SyncManager { + + private final Logger logger = LogManager.getLogger(); + + @Autowired + private DataSource ds; + @Autowired + private EmsProperties properties; + @Autowired + private SetupGest setupGest; + @Autowired + private JSONObjectMapper objectMapper; + @Autowired + private ASyncManager asyncManager; + + public void executeSynchronization(EntityInterface entity, EntityInterface entityCloned, Map dsSyncList, + Boolean forceTransaction, Boolean firstEntity, String dbPrimario) throws Exception { + Connection connection = null; + + StringBuffer[] lastProfileUsed = new StringBuffer[]{new StringBuffer("")}; + + try { + logger.debug("AVVIO SYNC ONLINE"); + connection = ds.getConnection(); + entityCloned.manageWithParentConnection(connection); + + if(entity.isSyncOfflineActive()) + asyncManager.putHasSyncOffline(ds.getConnection().getCatalog()); + asyncManager.putSyncOffline(ds.getConnection().getCatalog(), entity); + + proceedSyncronization(entity, dsSyncList, firstEntity, lastProfileUsed, dbPrimario); + + if(!forceTransaction) { + connection.commit(); + //connection.close(); + for (String key : dsSyncList.keySet()) { + Connection dsSync = dsSyncList.get(key); + dsSync.commit(); + ConnectionCacheHolder.releaseProfile(key); + //dsSync.close(); + } + } + } catch (Exception e) { + String subscriptor = null; + if(e instanceof SyncException) + subscriptor = ((SyncException)e).getProfileDb(); + else { + if(UtilityString.isNullOrEmpty(lastProfileUsed[0].toString())) + subscriptor = ""; + else + subscriptor = lastProfileUsed[0].toString(); + } + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + objectMapper.writeValue(baos, entity); + baos.close(); + notifyFailSyncronization(e, ds.getProfile(), subscriptor, "", baos.toByteArray()); + + if(!forceTransaction) { + for (String key : dsSyncList.keySet()) { + Connection dsSync = dsSyncList.get(key); + dsSync.rollback(); + ConnectionCacheHolder.releaseProfile(key); + } + connection.rollback(); + } + + if(!(e instanceof SyncException)) { + if(UtilityString.isNullOrEmpty(lastProfileUsed[0].toString())) + e = new SyncException(e, ds.getProfile()); + else + e = new SyncException(e, lastProfileUsed[0].toString()); + } + throw e; + } + } + + public void notifyFailSyncronization(Exception e, String publicator, + String subscriptor, String transactionId, byte[] entityByteArray) throws Exception { + String htmlMailBody = null; + try { + URL url = new URL("http://www.studioml.it/ems-api/mail_models/mail.php"); + InputStream is = url.openStream(); + htmlMailBody = IOUtils.toString(is); + + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + String tipoSync = ""; + if(UtilityString.isNullOrEmpty(transactionId)) + tipoSync = "online"; + else + tipoSync = "offline ( ID TRANSAZIONE:" + transactionId + ")"; + htmlMailBody = htmlMailBody.replace("%%SYNC_TYPE%%", "Sincronizzazione " + tipoSync); + htmlMailBody = htmlMailBody.replace("%%DATA_ERR_SYNC%%", sdf.format(new Date())); + htmlMailBody = htmlMailBody.replace("%%ERR_STRING%%", e.toString()); + } catch(Exception ex) { + htmlMailBody = "ERRORE INVOCAZIONE SYNC REST PER LA TRANSAZIONE N° " + transactionId + "\n\n" + e.toString(); + } + + String toEmailDbg = (String) setupGest.getSetup(ds.getConnection(), "WS_REST", "SYNC_ONLINE", "EMAIL_FOR_LOG", ""); + + String nomeAzienda = ""; + PreparedStatement ps = ds.getConnection().prepareStatement("select nome_ditta from azienda"); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + nomeAzienda = rs.getString("nome_ditta"); + } + rs.close(); + ps.close(); + + List files = new ArrayList(); + + ByteArrayOutputStream stackTrace = new ByteArrayOutputStream(); + PrintStream pw = new PrintStream(stackTrace); + e.printStackTrace(pw); + + files.add(new FileItem("stacktrace.txt", stackTrace.toByteArray(), "text/plain")); + files.add(new FileItem("entity.json", entityByteArray, "text/plain")); + if(toEmailDbg!=null){ + + String mailSubject = nomeAzienda + " - ERRORE SYNC SU " + InetAddress.getLocalHost().getHostName() + + " (Publication: " + publicator + " - Subscriptor: " + subscriptor + ")"; + + AttachmentDTO dto = new AttachmentDTO(); + dto.setFileByte(files); + + StringWriter writer = new StringWriter(); + objectMapper.writeValue(writer, dto); + + String jsonBody = writer.toString(); + + String database = ds.getProfile(); + + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + String auth = RestUtil.generateAuth(database, database, "POST", jsonBody, + "application/json", properties.getRootApi() + EmsRestConstants.PATH_SEND_MAIL, now); + + final Client client = ClientBuilder.newClient(); + WebTarget resource = client.target(properties.getEndPointWS()).path( + properties.getRootApi() + EmsRestConstants.PATH_SEND_MAIL) + .resolveTemplate("mode", "async"); + resource = resource.queryParam(CommonConstants.PROFILE_DB, database) + .queryParam("from", "").queryParam("to", toEmailDbg) + .queryParam("subject", mailSubject).queryParam("msgText", htmlMailBody) + .queryParam("isHtml", true); + + resource.request().header("Authorization", database + ":" + auth) + .header("SignDate", now).async() + .post(Entity.json(jsonBody), new InvocationCallback() { + @Override + public void completed(Response response) { + String value = response.readEntity(String.class); + logger.info(response.getStatus() + " - " + value); + response.close(); + client.close(); + } + + @Override + public void failed(Throwable throwable) { + throwable.printStackTrace(); + logger.error(throwable); + client.close(); + } + }); + } + } + + private void proceedSyncronization(EntityInterface entity, Map dsSyncList, + Boolean firstEntity, StringBuffer[] lastProfileUsed, String dbPrimario) throws Exception { + Connection connection = ds.getConnection(); + String sql = "SELECT user_name, where_cond_sql, type_transaction," + + " case when user_name = "+UtilityDB.valueToString(dbPrimario)+" then null else recalc_columns end AS recalc_columns " + + " from stb_subscription" + + " where table_name="+UtilityDB.valueToString(entity.getTableName().toUpperCase())+" AND flag_attivo='S' "; + PreparedStatement ps = connection.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + while(rs.next()) { + + String whereCond = rs.getString("where_cond_sql"); + String database = rs.getString("user_name"); + lastProfileUsed[0] = new StringBuffer(database); + + if(!UtilityString.isNullOrEmpty(whereCond) && !SqlFieldHolder.evalCondition(entity, whereCond)){ + continue; + } + + Connection syncConnection = null; + if(firstEntity) { + if((syncConnection = ConnectionCacheHolder.getConnection(database)) == null) { + DataSource dsSync = new DataSource(); + dsSync.initialize(database, properties.getGlobalConnectionIniPath()); + syncConnection = dsSync.getConnection(); + } + dsSyncList.put(database, syncConnection); + } else { + syncConnection = dsSyncList.get(database); + if(syncConnection == null) { + DataSource ds = new DataSource(); + ds.initialize(database, properties.getGlobalConnectionIniPath()); + syncConnection = ds.getConnection(); + dsSyncList.put(database, syncConnection); + } + } + + EntityInterface cloned = entity.deepClone(); + //IMPORTANTE + //inizializza un nuovo arraylist + cloned.setRecalcColumns(new ArrayList()); + + //gestione nel caso non siano sincronizzati + if(cloned.getOperation() == OperationType.UPDATE /*|| cloned.getOperation() == OperationType.NO_OP*/) + cloned.setOperation(OperationType.INSERT_OR_UPDATE); + + if(rs.getString("recalc_columns")!=null) { + cloned.setCompletingManager(entity.getCompletingManager()); + cloned.setRecalcColumns(Arrays.asList(rs.getString("recalc_columns").split(","))); + cloned.dataCompletingSync(syncConnection); + } + + logger.info("SYNC entity " + entity.getTableName() + " su " + syncConnection.getCatalog()); + cloned.manageWithParentConnection(syncConnection); + + if(cloned.isSyncOfflineActive()) + asyncManager.putHasSyncOffline(database); + asyncManager.putSyncOffline(database, entity); + } + rs.close(); + ps.close(); + } + + public String getDistributore(EntityInterface entity) throws Exception { + Connection connection = ds.getConnection(); + connection.setReadOnly(true); + String distributore = null; + PreparedStatement ps = (PreparedStatement) connection. + prepareStatement("SELECT db_distributore from azienda"); + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + distributore = rs.getString("db_distributore"); + rs.close(); + } + ps.close(); + return distributore; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/sync/task/ConnectionCacheCleanerListener.java b/ems-core/src/main/java/it/integry/ems/sync/task/ConnectionCacheCleanerListener.java new file mode 100644 index 0000000000..dab95570e1 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/sync/task/ConnectionCacheCleanerListener.java @@ -0,0 +1,40 @@ +package it.integry.ems.sync.task; + +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.sync.ConnectionCacheHolder; + +import java.util.Date; +import java.util.Timer; +import java.util.TimerTask; + +import javax.annotation.PostConstruct; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class ConnectionCacheCleanerListener { + +// private Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties emsProp; + + @PostConstruct + public void init() { + TimerTask task = new TimerTask() { + + @Override + public void run() { + try { + ConnectionCacheHolder.cleanConnection(); + } catch (Exception e) { + e.printStackTrace(); + } + } + }; + Timer timer = new Timer(); + timer.schedule(task, new Date(), 30*60*1000); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/util/HeaderRowCsvReader.java b/ems-core/src/main/java/it/integry/ems/util/HeaderRowCsvReader.java new file mode 100644 index 0000000000..38a508bfa5 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/util/HeaderRowCsvReader.java @@ -0,0 +1,122 @@ +package it.integry.ems.util; + +import it.integry.ems.annotation.SqlField; +import it.integry.ems.base.ComposedEntityBase; +import it.integry.ems.base.EntityBase; +import it.integry.ems.resolver.SqlFieldHolder; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; + +@SuppressWarnings("unchecked") +@Deprecated +public class HeaderRowCsvReader { + + public HeaderRowCsvReader(String[] headerMapping, String[] rowMapping, + String[] headerKeys, Class testataClass, Class rigaClass) { + this.headerMapping = headerMapping; + this.rowMapping = rowMapping; + this.headerKeys = headerKeys; + + this.testataClass = testataClass; + this.rigaClass = rigaClass; + } + + private String[] header; + private String[] headerMapping; + private String[] rowMapping; + private String[] headerKeys; + + protected Class testataClass; + protected Class rigaClass; + + public void setHeaderMapping(String[] headerMapping) { + this.headerMapping = headerMapping; + } + + public void setRowMapping(String[] rowMapping) { + this.rowMapping = rowMapping; + } + + public void setHeaderKeys(String[] headerKeys) { + this.headerKeys = headerKeys; + } + + private boolean arraySearch(String[] arr, String targetValue) { + for(String s: arr){ + if(s.equals(targetValue)) + return true; + } + return false; + } + + public List parseCsv(String fileName, String separator) throws Exception { + List beans = new ArrayList(); + + H headBean = (H) testataClass.newInstance(); + + FileReader reader = new FileReader(new File(fileName)); + BufferedReader bf = new BufferedReader(reader); + String line = ""; + boolean headerLine = true; + H lastHeadBean = null; + while((line = bf.readLine()) != null){ + if(headerLine){ + this.header = line.split(separator); + headerLine = false; + } else { + String[] datas = line.split(separator); + R rowBean = (R) rigaClass.newInstance(); + int i=0; + for (String headSingle : header) { + Field field; + if((field = beanSearch(headSingle, testataClass, headerMapping)) != null){ + field.setAccessible(true); + field.set(headBean, datas[i]); + } else if((field = beanSearch(headSingle, rigaClass, rowMapping)) != null){ + field.setAccessible(true); + field.set(rowBean, datas[i]); + } else { + //warn column not mapped + } + i++; + } + headBean.addRow(rowBean); + if(!hasSameHeaderKey(headBean, lastHeadBean)){ + beans.add(headBean); + lastHeadBean = headBean; + headBean = (H) testataClass.newInstance(); + } + } + } + bf.close(); + reader.close(); + + return beans; + } + + + public boolean hasSameHeaderKey(H headBean, H lastHeadBean) { + return headBean.equals(lastHeadBean); + } + + + public Field beanSearch(String headerSql, Class clazz, String[] mapping) { + Field[] fields = clazz.getDeclaredFields(); + for (Field field : fields) { + if(field.getAnnotation(SqlField.class)!=null){ + SqlField sql = field.getAnnotation(SqlField.class); + String field_sql = SqlFieldHolder.getSqlValue(sql.value(), field); + if(headerSql.equals(field_sql) && arraySearch(mapping, field_sql)) { + return field; + } + } + } + return null; + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/util/NullAwareBeanUtilsBean.java b/ems-core/src/main/java/it/integry/ems/util/NullAwareBeanUtilsBean.java new file mode 100644 index 0000000000..37cf582125 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/util/NullAwareBeanUtilsBean.java @@ -0,0 +1,16 @@ +package it.integry.ems.util; + +import java.lang.reflect.InvocationTargetException; + +import org.apache.commons.beanutils.BeanUtilsBean; + +public class NullAwareBeanUtilsBean extends BeanUtilsBean{ + + @Override + public void copyProperty(Object dest, String name, Object value) + throws IllegalAccessException, InvocationTargetException { + if(value==null)return; + super.copyProperty(dest, name, value); + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/utility/BarcodeUtility.java b/ems-core/src/main/java/it/integry/ems/utility/BarcodeUtility.java new file mode 100644 index 0000000000..cadbd09312 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/utility/BarcodeUtility.java @@ -0,0 +1,68 @@ +package it.integry.ems.utility; + +import it.integry.ems.entity.DtbOrdt; +import it.integry.ems.entity.MtbColt; + +import java.text.SimpleDateFormat; +import java.util.Date; + +public class BarcodeUtility { + + public static DtbOrdt getOrdineFromBarcode(String barcodeOrdine) throws Exception { + String gestione = null; + + char first = barcodeOrdine.charAt(0); + char c = barcodeOrdine.charAt(1); + int offset = 0; + if(first != '0') { + c = first; + offset = -1; + } + + if(c == '1') + gestione = "A"; + else if(c == '2') + gestione = "L"; + else if(c == '3') + gestione = "V"; + else + throw new Exception("gestione non prevista!"); + String dataOrdStr = barcodeOrdine.substring(2+offset, 10+offset); + dataOrdStr = dataOrdStr.substring(0, 2)+"/"+dataOrdStr.substring(2, 4)+"/"+dataOrdStr.substring(4); + Date dataOrd = UtilityString.parseDate(dataOrdStr); + Integer numOrd = Integer.parseInt(barcodeOrdine.substring(10+offset)); + + DtbOrdt dtbOrdt = new DtbOrdt(); + dtbOrdt.setGestione(gestione); + dtbOrdt.setDataOrd(dataOrd); + dtbOrdt.setNumOrd(numOrd); + return dtbOrdt; + } + + + public static MtbColt getColloFromBarcode(String barcodeCollo) throws Exception { + String gestione = null; + String c = barcodeCollo.substring(3, 5); + if(c.equals("01")) + gestione = "A"; + else if(c.equals("02")) + gestione = "L"; + else if(c.equals("03")) + gestione = "V"; + else + throw new Exception("gestione non prevista!"); + + String date = barcodeCollo.substring(5, 11); + SimpleDateFormat sdf = new SimpleDateFormat("ddMMyy"); + Date data = sdf.parse(date); + String serie = barcodeCollo.substring(11, 13); + Integer numCollo = Integer.parseInt(barcodeCollo.substring(13)); + + MtbColt mtbColt = new MtbColt(); + mtbColt.setGestione(gestione); + mtbColt.setDataCollo(data); + mtbColt.setNumCollo(numCollo); + mtbColt.setSerCollo(serie); + return mtbColt; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/utility/IntegerUtility.java b/ems-core/src/main/java/it/integry/ems/utility/IntegerUtility.java new file mode 100644 index 0000000000..e365ef775f --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/utility/IntegerUtility.java @@ -0,0 +1,17 @@ +package it.integry.ems.utility; + +import java.math.BigDecimal; + +public class IntegerUtility { + + public static Double round(Double val, Integer places) { + BigDecimal bd = new BigDecimal(Double.toString(val)); + bd = bd.setScale(places,BigDecimal.ROUND_HALF_UP); + return bd.doubleValue(); + } + + public static BigDecimal round(BigDecimal bd, Integer places) { + bd = bd.setScale(places,BigDecimal.ROUND_HALF_UP); + return bd; + } +} diff --git a/ems-core/src/main/java/it/integry/ems/utility/UtilityExport.java b/ems-core/src/main/java/it/integry/ems/utility/UtilityExport.java new file mode 100644 index 0000000000..4aee5664cf --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/utility/UtilityExport.java @@ -0,0 +1,67 @@ +package it.integry.ems.utility; + +import it.integry.ems.response.EsitoType; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.service.SetupGest; + +import java.sql.Connection; +import java.util.ArrayList; + +import org.apache.commons.codec.binary.Base64; +import org.apache.http.HttpResponse; +import org.apache.http.NameValuePair; +import org.apache.http.client.HttpClient; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; + +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; + +public class UtilityExport { + + public static ServiceRestResponse exportFileToWebsync(Connection connection, String profileDb, + String codMdep, String webExportPath, byte[] content) throws Exception { + SetupGest setupGest = new SetupGest(); + + String endpointWeb = (String) setupGest.getSetup(connection, "INTEGRETAIL", "SYNC", "ENDPOINT_WEB", + ""); + if (UtilityString.isNullOrEmpty(endpointWeb)) + throw new Exception("INTEGRETAIL/SYNC/ENDPOINT_WEB non configurato"); + + String b64Content = Base64Utility.decodeBase64AndZipString(content); + String jsonData = "{\"profileDB\": \"" + profileDb + "\", \"action\": \"upload\", \"cod_mdep\": \"" + + codMdep + "\", \"mode\": \"SERVER\", \"content\": \"" + b64Content + "\", \"filename\": \"" + + webExportPath + "\"}"; + + String data = Base64.encodeBase64String(jsonData.getBytes()); + + HttpClient client = new DefaultHttpClient(); + HttpPost httpPost = new HttpPost(endpointWeb); + ArrayList postParameters = new ArrayList(); + postParameters.add(new BasicNameValuePair("data", data)); + httpPost.setEntity(new UrlEncodedFormEntity(postParameters, "UTF-8")); + + HttpResponse response = client.execute(httpPost); + int statusCode = response.getStatusLine().getStatusCode(); + if (statusCode == 200) { + String line = EntityUtils.toString(response.getEntity(), "UTF-8"); + JsonParser p = new JsonParser(); + JsonElement el = p.parse(line); + Integer retId = el.getAsJsonObject().get("returnId").getAsInt(); + if(retId == 1) { + return new ServiceRestResponse(EsitoType.OK); + } else if(retId == -1) { + String errorText = el.getAsJsonObject().get("errorText").getAsString(); + return new ServiceRestResponse(EsitoType.KO, errorText); + } else + throw new Exception("return id non codificato"); + } else { + return new ServiceRestResponse(EsitoType.KO, + "Errore di trasmissione file al webserver (Status Code: " + statusCode + ")"); + } + } + +} diff --git a/ems-core/src/main/java/it/integry/ems/utility/UtilityFile.java b/ems-core/src/main/java/it/integry/ems/utility/UtilityFile.java new file mode 100644 index 0000000000..4a19acb3fe --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/utility/UtilityFile.java @@ -0,0 +1,91 @@ +package it.integry.ems.utility; + +import it.integry.ems.utility.UtilityString; + +import java.io.File; +import java.io.FileOutputStream; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; + +public class UtilityFile { + + public static Boolean directoryCreate(String directory) { + Boolean created = true; + directory = directory.replaceAll("\\\\", "/"); + File dir = new File(directory); + if(!dir.exists()){ + created = dir.mkdirs(); + } + return created; + } + + public static void writeFileRenameDuplicate(String folder, String fileName, + byte[] content) throws Exception { + + String pathComplete = folder + fileName; + if(new File(pathComplete).exists()){ + String[] tokens = fileName.split("\\.(?=[^\\.]+$)"); // SEPARA NOME FILE ED ESTENSIONE E LI RICOMBINA COL NUOVO NOME DEL FILE + String ext = tokens[1]; + fileName = tokens[0] + "(1)." + ext; + pathComplete = folder + fileName; + } + FileUtils.writeByteArrayToFile(new File(pathComplete), content); + } + + public static void regexCleanDirMoreOldThen(String pathDirectory, Long li_hours, String regex){ + /** Funzione che cancella tutti i file di una directory piè vecchi di tot ore che rispettano il pattern regex */ + + if (!UtilityString.isNullOrEmpty(pathDirectory)){ + File directory = new File(pathDirectory); + File[] listFiles = directory.listFiles(); + Long purgeTime = System.currentTimeMillis() - (li_hours * 60 * 60 * 1000); + for(File listFile : listFiles){ + Pattern p = Pattern.compile(regex,Pattern.CASE_INSENSITIVE | Pattern.DOTALL); + Matcher m = p.matcher(listFile.getName()); + if(m.find() && listFile.lastModified() < purgeTime){ + listFile.delete(); + } + } + } + + } + + public static boolean directoryExists(String directory){ + boolean lb_exists; + lb_exists = fileExists(directory); + return lb_exists; + } + + public static boolean fileExists(String fileName){ + boolean lb_exists; + lb_exists = (new File(fileName)).exists(); + return lb_exists; + } + + public static void saveFile(String path, String data, String name) throws Exception{ + String pathFileLog, dataLog; + pathFileLog = ""; + + //CONTROLLO SULL'ULTIMO CARATTERE DEL PERCORSO, VIENE AGGIUNTO LO SLASH SE MANCANTE + if (path.substring(path.length() -1, path.length()).compareTo("/")!= 0){ + path = path + "/"; + } + + DateFormat formato = new SimpleDateFormat("yyyyMMddHHmmssS" ); + dataLog = formato.format(new Date()); + + if (!new File(path).exists()){ + directoryCreate(path); + } + pathFileLog = path + dataLog + name +".log"; + FileOutputStream fos = new FileOutputStream(pathFileLog); + IOUtils.write(data.getBytes(), fos); + IOUtils.closeQuietly(fos); + } +} diff --git a/ems-core/src/main/java/it/integry/ems/watching/DirFilterWatcher.java b/ems-core/src/main/java/it/integry/ems/watching/DirFilterWatcher.java new file mode 100644 index 0000000000..c443ac1e61 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/watching/DirFilterWatcher.java @@ -0,0 +1,23 @@ +package it.integry.ems.watching; + +import java.io.File; +import java.io.FileFilter; + +public class DirFilterWatcher implements FileFilter { + private String filter; + + public DirFilterWatcher() { + this.filter = ""; + } + + public DirFilterWatcher(String filter) { + this.filter = filter; + } + + public boolean accept(File file) { + if ("".equals(filter)) { + return true; + } + return (file.getName().toLowerCase().endsWith(filter.toLowerCase())); + } +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/watching/DirWatcher.java b/ems-core/src/main/java/it/integry/ems/watching/DirWatcher.java new file mode 100644 index 0000000000..87a4064f91 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/watching/DirWatcher.java @@ -0,0 +1,84 @@ +package it.integry.ems.watching; + +import java.io.File; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; +import java.util.TimerTask; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +@SuppressWarnings({"unchecked", "rawtypes"}) +public abstract class DirWatcher extends TimerTask { + + private static Logger logger = LogManager.getLogger(); + + private String path; + private File filesArray[]; + private HashMap dir = new HashMap(); + private DirFilterWatcher dfw; + + public DirWatcher(String path) { + this(path, ""); + } + + + public DirWatcher(String path, String filter) { + this.path = path; + dfw = new DirFilterWatcher(filter); + filesArray = new File(path).listFiles(dfw); + logger.trace("LETTURA CARTELLA " + path); + if(filesArray!=null) { + logger.trace("FILES " + filesArray.length); + // transfer to the hashmap be used a reference and keep the + // lastModfied value + for (int i = 0; i < filesArray.length; i++) { + dir.put(filesArray[i], new Long(filesArray[i].lastModified())); + } + } + } + + public synchronized void run() { + try { + HashSet checkedFiles = new HashSet(); + filesArray = new File(path).listFiles(dfw); + + if(filesArray!=null) { + // scan the files and check for modification/addition + for (int i = 0; i < filesArray.length; i++) { + Long current = (Long) dir.get(filesArray[i]); + checkedFiles.add(filesArray[i]); + if (current == null) { + // new file + + dir.put(filesArray[i], + new Long(filesArray[i].lastModified())); + onChange(filesArray[i], "add"); + } else if (current.longValue() != filesArray[i].lastModified()) { + // modified file + dir.put(filesArray[i], + new Long(filesArray[i].lastModified())); + onChange(filesArray[i], "modify"); + } + } + + // now check for deleted files + Set ref = ((HashMap) dir.clone()).keySet(); + ref.removeAll((Set) checkedFiles); + Iterator it = ref.iterator(); + while (it.hasNext()) { + File deletedFile = (File) it.next(); + dir.remove(deletedFile); + onChange(deletedFile, "delete"); + } + } + } catch (Exception e) { + e.printStackTrace(); + logger.error(e.toString()); + } + } + + protected abstract void onChange(File file, String action) throws Exception; +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/ems/watching/FileWatcher.java b/ems-core/src/main/java/it/integry/ems/watching/FileWatcher.java new file mode 100644 index 0000000000..82663e75ae --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/watching/FileWatcher.java @@ -0,0 +1,25 @@ +package it.integry.ems.watching; + +import java.io.File; +import java.util.TimerTask; + +public abstract class FileWatcher extends TimerTask { + private long timeStamp; + private File file; + + public FileWatcher( File file ) { + this.file = file; + this.timeStamp = file.lastModified(); + } + + public final void run() { + long timeStamp = file.lastModified(); + + if( this.timeStamp != timeStamp ) { + this.timeStamp = timeStamp; + onChange(file); + } + } + + protected abstract void onChange( File file ); +} diff --git a/ems-core/src/main/java/it/integry/security/provider/RestAuthenticationProvider.java b/ems-core/src/main/java/it/integry/security/provider/RestAuthenticationProvider.java new file mode 100644 index 0000000000..741222f828 --- /dev/null +++ b/ems-core/src/main/java/it/integry/security/provider/RestAuthenticationProvider.java @@ -0,0 +1,122 @@ +package it.integry.security.provider; + +import it.integry.ems.datasource.DataSource; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.service.MailService; +import it.integry.security.utility.RestCredentials; +import it.integry.security.utility.RestToken; +import it.integry.security.utility.RestUtil; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.net.InetAddress; +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.PostConstruct; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.authentication.AuthenticationProvider; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.stereotype.Component; + +@Component +public class RestAuthenticationProvider implements AuthenticationProvider { + + @Autowired + private UserService service; + @Autowired + private EmsProperties emsProperties; + @Autowired + private MailService mailService; + + private final Logger logger = LogManager.getLogger(); + + @PostConstruct + public void initConnection() throws Exception { + try { + DataSource ds = new DataSource(); + ds.initialize(emsProperties.getDefaultDatabase(), emsProperties.getGlobalConnectionIniPath()); + System.out.println("[INFO] - init first connection"); + } catch(Exception e) { + String subj = "ERRORE - SERVIZI REST NON AVVIATI CORRETTAMENTE SU " + + InetAddress.getLocalHost().getHostName() + " DB (" + emsProperties.getDefaultDatabase() + ")"; + ByteArrayOutputStream stackTrace = new ByteArrayOutputStream(); + PrintStream pw = new PrintStream(stackTrace); + e.printStackTrace(pw); + + mailService.sendMail(new String[]{"developer@integry.it"}, null, subj, new String(stackTrace.toByteArray())); + throw e; + } + } + + @SuppressWarnings("finally") + public Authentication authenticate(Authentication authentication) throws AuthenticationException { + RestToken restToken = (RestToken) authentication; + + try{ + + // api key (aka username) + String apiKey = restToken.getPrincipal(); + // hashed blob + RestCredentials credentials = restToken.getCredentials(); + + //COMMENT FOR SIMPLE AUTH WITH DATE + /* + // get secret access key from api key + String secret=null; + try { + logger.info(restToken.getProfileDb() + " - " + apiKey); + secret = service.loadSecretByUsername(restToken.getProfileDb(), apiKey); + } catch (Exception e) { + e.printStackTrace(); + logger.info("Invalid username."); + throw new BadCredentialsException("Invalid username or password."); + } + + // if that username does not exist, throw exception + if (secret == null) { + logger.info("Username non trovato."); + throw new BadCredentialsException("Invalid username or password."); + } + + // calculate the hmac of content with secret key + String hmac = RestUtil.calculateHMAC(secret, credentials.getRequestData()); + // check if signatures match + if (!credentials.getSignature().equals(hmac)) { + logger.info("APIKEY " + apiKey); + logger.info("PASSWORD " + secret); + logger.info("REQUEST DATA " + credentials.getRequestData()); + logger.info("SIGNATURE GENERATED " + hmac); + logger.info("CREDENTIAL INPUT " + credentials.getSignature()); + throw new BadCredentialsException("Invalid username or password."); + } + + // END COMMENT FOR SIMPLE AUTH WITH DATE + */ + // this constructor create a new fully authenticated token, with the "authenticated" flag set to true + // we use null as to indicates that the user has no authorities. you can change it if you need to set some roles. + List authorities = new ArrayList(); + authorities.add(new SimpleGrantedAuthority("ROLE_USER")); + // restToken = new RestToken(secret, credentials, restToken.getTimestamp(), restToken.getProfileDb(), authorities); + +// DECOMMENT FOR SIMPLE AUTH WITH DATE + restToken = new RestToken("aa", credentials, restToken.getTimestamp(), restToken.getProfileDb(), authorities); + } catch(Exception e) { + logger.error(e.toString()); + throw new BadCredentialsException("Authentication error"); + } finally { + return restToken; + } + } + + public boolean supports(Class authentication) { + return RestToken.class.equals(authentication); + } +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/security/provider/UserService.java b/ems-core/src/main/java/it/integry/security/provider/UserService.java new file mode 100644 index 0000000000..e5dad3250d --- /dev/null +++ b/ems-core/src/main/java/it/integry/security/provider/UserService.java @@ -0,0 +1,88 @@ +package it.integry.security.provider; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; + +import org.apache.commons.codec.binary.Base64; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Service; + +import it.integry.ems.datasource.DataSource; +import it.integry.ems.properties.EmsProperties; + +@Service +public class UserService { + + @Autowired + private EmsProperties emsProperties; + + private final Logger logger = LogManager.getLogger(); + + public String loadSecretByUsername(String profileDB, String apiKey) throws Exception { + if(Base64.encodeBase64String("no_database".getBytes()).equals(Base64.encodeBase64String(profileDB.getBytes())) + && apiKey.equals(Base64.encodeBase64String("integry_ems_login_system_legacy".getBytes()))){ + logger.trace("no database"); + return Base64.encodeBase64String(emsProperties.getDefaultNodatabaseLogin().getBytes()); + } else { + DataSource ds = new DataSource(); + ds.initialize(profileDB, emsProperties.getGlobalConnectionIniPath()); + + Connection conn = ds.getConnection(); + + String sql = "select upper(password) as password from wtb_users where user_name = '"+apiKey+"'"; + PreparedStatement ps = conn.prepareStatement(sql); + + logger.trace(sql); + + ResultSet rs = ps.executeQuery(); + if(rs.next()){ + String psw = rs.getString("password"); + ds.forceClose(); + rs.close(); + ps.close(); + return psw; + }else{ + rs.close(); + ps.close(); + ds.forceClose(); + throw new UsernameNotFoundException("Errore nell'autenticazione!"); + } + } + } + public static Boolean checkUserWeb(Connection conn, String usernameWEB, String password) throws Exception { + String userActive; + Boolean existUser = false; + PreparedStatement info = null; + ResultSet res = null; + try { + String query = + "SELECT wtb_users.ctrl_state " + + " FROM wtb_users " + + " WHERE user_name = '" + usernameWEB + "' AND " + + " password = '" + password + "'"; + info = conn.prepareStatement(query); + res = info.executeQuery(); + if (res.next()){ + userActive = res.getString(1); + if ("S".equals(userActive)){ + existUser = true; + }else{ + throw new UsernameNotFoundException("Utente "+ usernameWEB + " non attivo!"); + } + } else { + throw new UsernameNotFoundException("Utente "+ usernameWEB + " non riconoscuto!"); + } + } finally { + if(res!=null) + res.close(); + if(info!=null) + info.close(); + } + return existUser; + } + +} diff --git a/ems-core/src/main/java/it/integry/security/utility/CryptoUtils.java b/ems-core/src/main/java/it/integry/security/utility/CryptoUtils.java new file mode 100644 index 0000000000..d5acf9c1af --- /dev/null +++ b/ems-core/src/main/java/it/integry/security/utility/CryptoUtils.java @@ -0,0 +1,74 @@ +package it.integry.security.utility; + +import it.integry.ems.utility.UtilityString; + +public class CryptoUtils { + + public static String decrypt(String cryptedText) { + return securedString(cryptedText, 0); + } + + public static String encrypt(String clearText) { + return securedString(clearText, 1); + } + + private static String securedString(String stringa, int flagcodedecode) { + /* + * flagcodedecode(0 / 1) + * 0 = decripta stringa + * 1 = cripta stringa + */ + String ls_stringCode, ls_stringDecode, ls_ret, ls_keyChar; + int ll_i, ll_keyASC, ll_min, ll_max, ll_asc; + char lc_keyChar; + + // System.out.println(flagcodedecode); + if (UtilityString.isNullOrEmpty(stringa)) + return ""; + + ls_keyChar = stringa.substring(0, 1); + ls_stringCode = ls_keyChar; + ls_stringDecode = ls_keyChar; + + lc_keyChar = stringa.charAt(0); + ll_keyASC = (int) lc_keyChar; + + ll_min = 0; + ll_max = 122; + + for (ll_i = 1; ll_i < stringa.length(); ll_i++) { + if (flagcodedecode == 1) { + ll_asc = (int) (stringa.charAt(ll_i)); + if (ll_asc <= ll_max) { + ll_asc = ll_asc + ll_keyASC; + if (ll_asc > ll_max) { + ll_asc = ll_asc - ll_max; + } + } else { + ll_asc = ll_asc + ll_keyASC; + } + ls_stringCode += (char) ll_asc; + } else { + ll_asc = (int) (stringa.charAt(ll_i)); + if (ll_asc <= ll_max) { + ll_asc = ll_asc - ll_keyASC; + if (ll_asc <= ll_min) { + ll_asc = ll_asc + ll_max; + } + } else { + ll_asc = ll_asc - ll_keyASC; + } + ls_stringDecode += (char) ll_asc; + } + } + + if (flagcodedecode == 1) { + ls_ret = ls_stringCode; + } else { + ls_ret = ls_stringDecode; + } + + return ls_ret; + } + +} diff --git a/ems-core/src/main/java/it/integry/security/utility/RestCredentials.java b/ems-core/src/main/java/it/integry/security/utility/RestCredentials.java new file mode 100644 index 0000000000..3378a36105 --- /dev/null +++ b/ems-core/src/main/java/it/integry/security/utility/RestCredentials.java @@ -0,0 +1,21 @@ +package it.integry.security.utility; + +public final class RestCredentials { + + private String requestData; + private String signature; + + public RestCredentials(String requestData, String signature) { + this.requestData = requestData; + this.signature = signature; + } + + public String getRequestData() { + return requestData; + } + + public String getSignature() { + return signature; + } + +} \ No newline at end of file diff --git a/ems-core/src/main/java/it/integry/security/utility/RestToken.java b/ems-core/src/main/java/it/integry/security/utility/RestToken.java new file mode 100644 index 0000000000..4a95bbb668 --- /dev/null +++ b/ems-core/src/main/java/it/integry/security/utility/RestToken.java @@ -0,0 +1,52 @@ +package it.integry.security.utility; + +import java.util.Collection; +import java.util.Date; + +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; + +@SuppressWarnings({"rawtypes", "unchecked"}) +public class RestToken extends UsernamePasswordAuthenticationToken { + + private static final long serialVersionUID = 1L; + private Date timestamp; + private String profileDb; + + // this constructor creates a non-authenticated token (see super-class) + public RestToken(String principal, RestCredentials credentials, Date timestamp, String profileDb) { + super(principal, credentials); + this.timestamp = timestamp; + this.setProfileDb(profileDb); + } + + // this constructor creates an authenticated token (see super-class) + public RestToken(String principal, RestCredentials credentials, Date timestamp, + String profileDb, Collection authorities) { + super(principal, credentials, authorities); + this.timestamp = timestamp; + this.setProfileDb(profileDb); + } + + @Override + public String getPrincipal() { + return (String) super.getPrincipal(); + } + + @Override + public RestCredentials getCredentials() { + return (RestCredentials) super.getCredentials(); + } + + public Date getTimestamp() { + return timestamp; + } + + public String getProfileDb() { + return profileDb; + } + + public void setProfileDb(String profileDb) { + this.profileDb = profileDb; + } + +} diff --git a/ems-core/src/main/java/it/integry/security/utility/RestUtil.java b/ems-core/src/main/java/it/integry/security/utility/RestUtil.java new file mode 100644 index 0000000000..6ae02c2185 --- /dev/null +++ b/ems-core/src/main/java/it/integry/security/utility/RestUtil.java @@ -0,0 +1,33 @@ +package it.integry.security.utility; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; + +import org.apache.commons.codec.binary.Base64; +import org.springframework.security.authentication.encoding.Md5PasswordEncoder; + +public class RestUtil { + + public static String generateAuth(String username, String password, String requestMethod, + String body, String contentType, String uriPath, String dateNow) throws Exception { + Md5PasswordEncoder md5 = new Md5PasswordEncoder(); + // create signature: method + content md5 + content-type + date + uri + StringBuilder signature = new StringBuilder(); + signature.append(requestMethod).append("\n") + .append(md5.encodePassword(body, null)).append("\n") + .append(contentType).append("\n") + .append(dateNow).append("\n") + .append(uriPath); + + return calculateHMAC(password, signature.toString()); + } + + public static String calculateHMAC(String secret, String data) throws Exception { + SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), "HmacSHA256"); + Mac mac = Mac.getInstance("HmacSHA256"); + mac.init(signingKey); + byte[] rawHmac = mac.doFinal(data.getBytes()); + String result = new String(Base64.encodeBase64(rawHmac)); + return result; + } +} diff --git a/ems-core/src/main/resources/rules/Agenti.drl b/ems-core/src/main/resources/rules/Agenti.drl new file mode 100644 index 0000000000..7626706764 --- /dev/null +++ b/ems-core/src/main/resources/rules/Agenti.drl @@ -0,0 +1,24 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + +rule "completeDatiAgenteFromAnag" +no-loop +when + eval(checkRulesEnabled == 0) + $Agen : VtbAgen((ragSoc == null || indirizzo == null || cap == null || citta == null || prov == null || nazione == null || tel == null || fax == null || partIva == null || codFisc == null) && codAnag != null) +then + AgentiRules.completeDatiAgenteFromAnag(conn, $Agen); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($Agen, bitMask, $Agen.getClass()); +end diff --git a/ems-core/src/main/resources/rules/DistBase.drl b/ems-core/src/main/resources/rules/DistBase.drl new file mode 100644 index 0000000000..a2a596c7bd --- /dev/null +++ b/ems-core/src/main/resources/rules/DistBase.drl @@ -0,0 +1,138 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global String postRulesEnabled +global Integer checkRulesEnabled + +rule "completeUntMisSpes" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : JtbDistClavDir(untMis == null && codJcosDir != null) + $t: java.util.Map() from DistBaseRules.completeDatiCodJcosDir(conn) +then + modify ( $entity ) { setUntMis($t.get("unt_mis").toString()) } +end + +rule "completeDescrizioneSpes" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : JtbDistClavDir(descrizione == null && codJcosDir != null) + $t: java.util.Map() from DistBaseRules.completeDatiCodJcosDir(conn) +then + modify ( $entity ) { setDescrizione($t.get("descrizione").toString()) } +end + +rule "completeDescrizioneProd" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : JtbCicl(descrizioneProd == null && codProd != null) + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $entity) +then + modify ( $entity ) { + setDescrizioneProd($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeDescrizioneDistMate" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : JtbDistMate(descrizione == null && codMart != null) + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $entity) +then + modify ( $entity ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeUntMisProd" +when + eval(checkRulesEnabled == 0) + JtbCicl(untMisProd == null && codProd != null, $entity : this) + $untMisProd: java.lang.String() from DistBaseRules.completeUntMisProd(conn, $entity.codProd) +then + modify ( $entity ) { setUntMisProd($untMisProd) } +end + +rule "completeRapConvProd" +when + eval(checkRulesEnabled == 0) + JtbCicl(rapConvProd == null && codProd != null && untMisProd != null, $entity : this) + + $rapConv: java.math.BigDecimal() from DistBaseRules.completeRapConvProd(conn, $entity) +then + modify ( $entity ) { setRapConvProd($rapConv) } +end + +rule "completeFlagQtaMultipla" +when + eval(checkRulesEnabled == 0) + JtbCicl(lottoMinOrd == 0, $entity : this) + $flagQtaMultipla: java.lang.String() from DistBaseRules.completeFlagQtaMultipla(conn, $entity.lottoMinOrd) +then + modify ( $entity ) { setFlagQtaMultipla($flagQtaMultipla) } +end + + +rule "completeRapConvDist" +when + eval(checkRulesEnabled == 0) + JtbDistMate(rapConvDist == null && codMart != null && untMisDist != null, $entity : this) + + $rapConv: java.math.BigDecimal() from DistBaseRules.completeRapConvDist(conn, $entity) +then + modify ( $entity ) { setRapConvDist($rapConv) } +end + +rule "completeModificatoDaDist" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : JtbDistMate( modificatoDa == null ) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $entity ) { setModificatoDa($fullName) } +end +rule "completeDescrizioneCosInd" +when + eval(checkRulesEnabled == 0) + JtbDistClavInd( descrizione == null && codJcosInd != null, $entity : this) + $descrizioneCosInd: java.lang.String() from DistBaseRules.completeDescrizioneCosInd(conn, $entity.codJcosInd) +then + modify ( $entity ) { setDescrizione($descrizioneCosInd) } +end +rule "completePercCost" +when + eval(checkRulesEnabled == 0) + $entity : JtbDistClavInd( percCost == null && codJcosInd != null) + $percCost: java.math.BigDecimal() from DistBaseRules.completePercCost(conn, $entity.codJcosInd) +then + modify ( $entity ) { setPercCost($percCost) } +end + +rule "completeCodJcosDir" +when + eval(checkRulesEnabled == 0) + JtbDistClavDir( numFase != 0 && codJcosDir == null, $entity : this) + $t: java.util.Map() from DistBaseRules.completeDatiCodJcosDir(conn) +then + modify ( $entity ) { + setCodJcosDir($t.get("cod_spes").toString()), + setUntMis($t.get("unt_mis").toString()), + setDescrizione($t.get("descrizione").toString()) + } +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/DocA.drl b/ems-core/src/main/resources/rules/DocA.drl new file mode 100644 index 0000000000..d2f944d822 --- /dev/null +++ b/ems-core/src/main/resources/rules/DocA.drl @@ -0,0 +1,284 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + +rule "completeDatiTipoDocA" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codDtip != null && gestione == "A") +then + DocumentRules.completeDatiTipoDoc(conn, $docT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeGeneraMovContA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codDtip != null && gestione == "A" && generaMovCont == null) + $generaMovCont : String() from DocumentRules.completeGeneraMovCont(conn, $docT) +then + modify ( $docT ) { setGeneraMovCont($generaMovCont) } +end + +rule "completeNumDocDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((numDoc == null || numDoc == 0) && dataDoc != null && codDtip != null && serDoc != null && gestione == "A") +then + DocumentRules.completeDatiTipoDoc(conn, $docT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeSerDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(serDoc == null && codDtip != null && codMdep != null && gestione == "A") + + $serDoc: String() from DocumentRules.completeSerDoc(conn, $docT) +then + modify ( $docT ) { setSerDoc($serDoc) } +end + +rule "completeDataRegDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(dataReg == null && dataDoc != null && gestione == "A") + + $dataReg: java.util.Date() from DocumentRules.completeDataReg(conn, $docT) +then + modify ( $docT ) { setDataReg($dataReg) } +end + + +rule "completeDatiFornDocA" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((porto == null || mezzo == null || codPaga == null || descrizionePaga == null ) && gestione == "A" && codAnag != null) +then + DocOrdRules.completeDatiForn(conn, $docT ); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeListinoDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(listino == null && gestione == "A" && codAnag != null) + $listino: String() from PurchasesRules.completeListAcq(conn, $docT) +then + modify ( $docT ) { setListino($listino) } +end + +rule "completeCodDiviDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codDivi == null && gestione == "A" && codAnag != null) + $codDivi : String() from DocOrdRules.completeCodDivi(conn, $docT) +then + modify ( $docT ) { setCodDivi($codDivi) } +end + +rule "completeCambioDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(cambio == null && codDivi != null && gestione == "A" ) + $cambio: java.math.BigDecimal() from CommonRules.completeCambio(conn, $docT.codDivi) +then + modify ( $docT ) { setCambio($cambio) } +end + +rule "completeCodJfasDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codJfas == null && gestione == "A" && codMdep != null) + $codJfas : String() from DocumentRules.completeCodJfas(conn, $docT) +then + modify ( $docT ) { setCodJfas($codJfas) } +end + +rule "completeDataModDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((operation == OperationType.INSERT || operation == OperationType.UPDATE || operation == OperationType.INSERT_OR_UPDATE) && gestione == "A") +then + modify ( $docT ) { setDataUltMod(new Date()) } +end +rule "completeCompilatoDaDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct (compilatoDa == null && operation == OperationType.INSERT && gestione == "A") + + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $docT ) { setCompilatoDa($fullName) } +end + +rule "completeModificatoDaDocA" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct( operation == OperationType.DELETE && gestione == "A" ) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $docT ) { setModificatoDa($fullName) } +end + + +rule "completeDescrizioneDocA" +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr( descrizione == null && codMart != null && gestione == "A") + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $docR) +then + modify ( $docR ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeQtaCnfDocA" +salience -10 // FABIO (14.7.2016): necessario perchè il calcolo della qta_cnf deve essere fatto dopo aver acquisito\calcolato il rap_conv +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(qtaCnf == null && codMart != null && gestione == "A") + + $qtaCnf: java.math.BigDecimal() from CommonRules.completeQtaCnfDB(conn, $docR) +then + modify ( $docR ) { setQtaCnf($qtaCnf) } +end + +rule "completeUntDocA" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(untDoc == null && codMart != null && gestione == "A") + $untMis: java.lang.String() from CommonRules.completeUntMis(conn, $docR.codMart) +then + modify ( $docR ) { setUntDoc($untMis) } +end + +rule "completeRapConvDocA" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(rapConv == null && codMart != null && untDoc != null && gestione == "A") + + $rapConv: java.math.BigDecimal() from CommonRules.completeRapConv(conn, $docR) +then + modify ( $docR ) { setRapConv($rapConv) } +end + +rule "completeCodAliqDocA" +salience -10 +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(codMart != null && codAliq == null && gestione == "A") + $codAliq: String() from DocOrdRules.completeCodAliq(conn, $docR) +then + modify ( $docR ) { setCodAliq($codAliq) } +end + +rule "completeCodMartDocA" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr( codMart == null && gestione == "A" && listino != null && codArtFor != null) + $codMart: String() from PurchasesRules.completeCodMartOrdDocA(conn, $docR) +then + modify ( $docR ) { setCodMart($codMart) } +end + +rule "completeInsPartitaMagDocA" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr( partitaMag != null && codMart != null && gestione == "A") + $partitaMag: MtbPartitaMag() from DocumentRules.insertPartitaMag(conn, $docR) +then + modify ( $docR ) { setMtbPartitaMag($partitaMag) } +end + +rule "completeDatiListinoDocA" +no-loop +salience 1 +when + eval(checkRulesEnabled == 0) + DtbDocr((codArtFor == null || valUnt == null || valOneri == null || percOneri == null || valPromo == null || + percPromo == null || sconto5 == null || sconto6 == null || sconto7 == null || sconto8 == null ) && + codMart != null && listino != null && "ULTC".equals(listino) == false && gestione == "A", $entity : this) +then + PurchasesRules.completeDatiArtOrdDocA(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeDatiIvaDocA" +no-loop +when + eval(checkRulesEnabled == 0) + DtbDocr((percAliq == null || tipoIva == null ) && codAliq != null && gestione == "A", $entity : this) +then + DocOrdRules.completeDatiAliq(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeImportoRigaDocA" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(importoRiga == null && qtaDoc != null && valUnt != null && gestione == "A") + + $importo: java.math.BigDecimal() from DocOrdRules.completeImportoRiga(conn, $docR) +then + modify ( $docR ) { setImportoRiga($importo) } +end + +rule "completeValUntULTCDocA" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(valUnt == null && "ULTC".equals(listino) && codMart != null && gestione == "A") + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntULTC(conn, $docR) +then + modify ( $docR ) { setValUnt($valUnt) } +end + +rule "completeCostoUntDocA" +salience -10 +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(costoUnt == null && codMart != null && gestione == "A") + $costoUnt: java.math.BigDecimal() from DocumentRules.completeCostoUntDocA(conn, $docR) +then + modify ( $docR ) { setCostoUnt($costoUnt) } +end + +rule "completeDatiDocCompDocA" +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr((codDtipComp == null || codAnagComp == null || dataDocComp == null || serDocComp == null || numDocComp == null )&& gestione == "A" && (operation == OperationType.INSERT || operation == OperationType.INSERT_OR_UPDATE)) +then + DocumentRules.completeDatiDocComp(conn, $docR); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docR, bitMask, $docR.getClass()); +end + +rule "completeCodCconA" +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(codCcon == null && gestione == "A" && generaMovCont == "S") + $codCcon : String() from DocumentRules.completeCodCcon(conn, $docR) +then + modify ( $docR ) { setCodCcon($codCcon) } +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/DocL.drl b/ems-core/src/main/resources/rules/DocL.drl new file mode 100644 index 0000000000..b7d7122c95 --- /dev/null +++ b/ems-core/src/main/resources/rules/DocL.drl @@ -0,0 +1,339 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + +rule "completeDatiTipoDocL" +no-loop +salience 20 +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codDtip != null && gestione == "L") +then + DocumentRules.completeDatiTipoDoc(conn, $docT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeNumDocDocL" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((numDoc == null || numDoc == 0) && dataDoc != null && codDtip != null && serDoc != null && gestione == "L") +then + Integer $numDoc = DocumentRules.completeNumDoc(conn, $docT); + modify ( $docT ) { setNumDoc($numDoc) } +end + +rule "completeValUntPartitaMagDocL" +salience 10 +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(valUnt == null && partitaMag != null && listino != null && codMart != null && rapConv !=null && gestione == "L") + $valUnt : java.math.BigDecimal() from DocOrdRules.completeValUntPartitaMagLav(conn, $docR) +then + modify ( $docR ) { setValUnt($valUnt) } +end + +rule "completeSerDocL" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(serDoc == null && codDtip != null && codMdep != null && gestione == "L") + + $serDoc: String() from DocumentRules.completeSerDoc(conn, $docT) +then + modify ( $docT ) { setSerDoc($serDoc) } +end + +rule "completeDataRegDocL" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(dataReg == null && dataDoc != null && gestione == "L") + + $dataReg: java.util.Date() from DocumentRules.completeDataReg(conn, $docT) +then + modify ( $docT ) { setDataReg($dataReg) } +end + + +rule "completeDatiFornDocL" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((porto == null || mezzo == null || codPaga == null || descrizionePaga == null ) && gestione == "L" && codAnag != null) +then + DocOrdRules.completeDatiForn(conn, $docT ); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeListinoDocL" +salience 10 +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(listino == null && gestione == "L" && codAnag != null) + $listino: String() from "ULTC" +then + modify ( $docT ) { setListino($listino) } +end + +rule "completeCodDiviDocL" +salience 20 +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codDivi == null && gestione == "L" && codAnag != null) + $codDivi : String() from DocOrdRules.completeCodDivi(conn, $docT) +then + modify ( $docT ) { setCodDivi($codDivi) } +end + +rule "completeCambioDocL" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(cambio == null && codDivi != null && gestione == "L" ) + $cambio: java.math.BigDecimal() from CommonRules.completeCambio(conn, $docT.codDivi) +then + modify ( $docT ) { setCambio($cambio) } +end + +rule "completeDatiProdottoDocL" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((untMisProd == null || qtaProd == null || rapConvProd == null) && gestione == "L" && codProd != null) +then + DocOrdRules.completeDatiProdotto(conn, $docT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeCodJfasDocL" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codJfas == null && gestione == "L" && codMdep != null) + $codJfas : String() from DocumentRules.completeCodJfas(conn, $docT) +then + modify ( $docT ) { setCodJfas($codJfas) } +end + +rule "completeDataModDocL" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((operation == OperationType.INSERT || operation == OperationType.UPDATE || operation == OperationType.INSERT_OR_UPDATE) && gestione == "L") +then + modify ( $docT ) { setDataUltMod(new Date()) } +end +rule "completeCompilatoDaDocL" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct (compilatoDa == null && operation == OperationType.INSERT && gestione == "L") + + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $docT ) { setCompilatoDa($fullName) } +end + +rule "completeModificatoDaDocL" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct( modificatoDa == null && operation == OperationType.UPDATE && gestione == "L") + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $docT ) { setModificatoDa($fullName) } +end + + +rule "completeDescrizioneDocL" +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr( descrizione == null && codMart != null && gestione == "L") + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $docR) +then + modify ( $docR ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeQtaCnfDocL" +salience -10 // FABIO (14.7.2016): necessario perchè il calcolo della qta_cnf deve essere fatto dopo aver acquisito\calcolato il rap_conv +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(qtaCnf == null && codMart != null && gestione == "L") + + $qtaCnf: java.math.BigDecimal() from CommonRules.completeQtaCnfDB(conn, $docR) +then + modify ( $docR ) { setQtaCnf($qtaCnf) } +end + +rule "completeUntDocL" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(untDoc == null && codMart != null && gestione == "L") + $untMis: java.lang.String() from CommonRules.completeUntMis(conn, $docR.codMart) +then + modify ( $docR ) { setUntDoc($untMis) } +end + +rule "completeRapConvDocL" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(rapConv == null && codMart != null && untDoc != null && gestione == "L") + + $rapConv: java.math.BigDecimal() from CommonRules.completeRapConv(conn, $docR) +then + modify ( $docR ) { setRapConv($rapConv) } +end + +rule "completeCodAliqDocL" +salience -10 +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(codMart != null && codAliq == null && gestione == "L") + $codAliq: String() from DocOrdRules.completeCodAliq(conn, $docR) +then + modify ( $docR ) { setCodAliq($codAliq) } +end + +rule "completeCodMartDocL" +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr( descrizione == null && codMart != null && gestione == "L") + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $docR) +then + modify ( $docR ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeValUntULTCDocL" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(valUnt == null && ("ULTC".equals(listino) || listino == null) && codMart != null && gestione == "L") + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntULTC(conn, $docR) +then + modify ( $docR ) { setValUnt($valUnt) } +end + +rule "completeValUntDISTDocL" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(valUnt == null && "DIST".equals(listino) && codMart != null && gestione == "L") + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntDIST(conn, $docR) +then + modify ( $docR ) { setValUnt($valUnt) } +end + +rule "completeValUntCMEDDocL" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(valUnt == null && "CMED".equals(listino) && codMart != null && gestione == "L") + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntCMED(conn, $docR) +then + modify ( $docR ) { setValUnt($valUnt) } +end + +rule "completeDatiIvaDocL" +no-loop +when + eval(checkRulesEnabled == 0) + DtbDocr((percAliq == null || tipoIva == null ) && codAliq != null && gestione == "L", $entity : this) +then + DocOrdRules.completeDatiAliq(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeImportoRigaDocL" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(importoRiga == null && qtaDoc != null && valUnt != null && gestione == "L") + + $importo: java.math.BigDecimal() from DocOrdRules.completeImportoRiga(conn, $docR) +then + modify ( $docR ) { setImportoRiga($importo) } +end + +rule "completeCostoUntDocL" +salience -20 +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(costoUnt == null && codMart != null && cambio != null && codDtip != null && gestione == "L") + $costoUnt: java.math.BigDecimal() from DocumentRules.completeCostoUntDocL(conn, $docR) +then + modify ( $docR ) { setCostoUnt($costoUnt) } +end + +rule "completeDatiDocCompDocL" +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr((codDtipComp == null || codAnagComp == null || dataDocComp == null || serDocComp == null || numDocComp == null )&& gestione == "L" && operation == OperationType.INSERT ) +then + DocumentRules.completeDatiDocComp(conn, $docR); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docR, bitMask, $docR.getClass()); +end + +rule "completeDatiDocValDocL" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(((codDtipVal == null || dataDocVal == null || serDocVal == null || numDocVal == null )&& gestione == "L" && previstaFat != null && previstaFat == "N" ) || + ((codDtipVal != null || dataDocVal != null || serDocVal != null || numDocVal != null )&& gestione == "L" && previstaFat != null && previstaFat == "S" )) +then + DocumentRules.completeDatiDocVal(conn, $docT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeDatiSpesDocL" +no-loop +when + eval(checkRulesEnabled == 0) + $docS : DtbDocs((descrizione == null || importo == null || qta == null || valUnt == null) && gestione == "L" && codSpes != null) +then + DocOrdRules.completeDatiSpes(conn, $docS); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docS, bitMask, $docS.getClass()); +end + +rule "completeCausaleTraspDocL" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(causaleTrasp == null && gestione == "L") + $causaleTrasp: String() from OrderRules.completeCausaleTrasp($docT.getGestione()) +then + modify ( $docT ) { setCausaleTrasp($causaleTrasp) } +end + +rule "completeQta2Qta3DocL" +salience -10 +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr( qtaDoc != null && qtaDoc2 == null && qtaDoc3 == null && codMart != null && untDoc != null && gestione == "L") + //$t: java.util.Map() from DocOrdRules.completeQta2Qta3(conn, $docR) +then + DocOrdRules.completeQta2Qta3(conn, $docR); +//then +// modify ( $docR ) { +// setQtaDoc2(new BigDecimal($t.get("qta_doc2").toString())), +// setQtaDoc3(new BigDecimal($t.get("qta_doc3").toString())), +// setUntDoc2($t.get("unt_doc2").toString()), +// setUntDoc3($t.get("unt_doc3").toString()) +// } +end diff --git a/ems-core/src/main/resources/rules/DocV.drl b/ems-core/src/main/resources/rules/DocV.drl new file mode 100644 index 0000000000..82b0e4a9bb --- /dev/null +++ b/ems-core/src/main/resources/rules/DocV.drl @@ -0,0 +1,246 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + + +rule "completeDatiTipoDocV" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codDtip != null && gestione == "V") +then + DocumentRules.completeDatiTipoDoc(conn, $docT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeNumDocDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((numDoc == null || numDoc == 0) && dataDoc != null && codDtip != null && serDoc != null && gestione == "V") +then + DocumentRules.completeDatiTipoDoc(conn, $docT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeSerDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(serDoc == null && codDtip != null && codMdep != null && gestione == "V") + + $serDoc: String() from DocumentRules.completeSerDoc(conn, $docT) +then + modify ( $docT ) { setSerDoc($serDoc) } +end + +rule "completeDataRegDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(dataReg == null && dataDoc != null && gestione == "V") + + $dataReg: java.util.Date() from DocumentRules.completeDataReg(conn, $docT) +then + modify ( $docT ) { setDataReg($dataReg) } +end + + +rule "completeDatiClienteDocV" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((porto == null || mezzo == null || codPaga == null || descrizionePaga == null ) && gestione == "V" && codAnag != null) +then + DocOrdRules.completeDatiCliente(conn, $docT ); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeListinoDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(listino == null && gestione == "V" && codAnag != null) + $listino: String() from DocOrdRules.completeLisV(conn, $docT) +then + modify ( $docT ) { setListino($listino) } +end + +rule "completeCodDiviDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codDivi == null && gestione == "V" && codAnag != null) + $codDivi : String() from DocOrdRules.completeCodDivi(conn, $docT) +then + modify ( $docT ) { setCodDivi($codDivi) } +end + +rule "completeCambioDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(cambio == null && codDivi != null && gestione == "V" ) + $cambio: java.math.BigDecimal() from CommonRules.completeCambio(conn, $docT.codDivi) +then + modify ( $docT ) { setCambio($cambio) } +end + +rule "completeCodJfasDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(codJfas == null && gestione == "V" && codMdep != null) + $codJfas : String() from DocumentRules.completeCodJfas(conn, $docT) +then + modify ( $docT ) { setCodJfas($codJfas) } +end + +rule "completeDataModDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct((operation == OperationType.INSERT || operation == OperationType.UPDATE || operation == OperationType.INSERT_OR_UPDATE) && gestione == "V") +then + modify ( $docT ) { setDataUltMod(new Date()) } +end +rule "completeCompilatoDaDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct (compilatoDa == null && operation == OperationType.INSERT && gestione == "V") + + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $docT ) { setCompilatoDa($fullName) } +end + +rule "completeModificatoDaDocV" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct( operation == OperationType.DELETE && gestione == "V" ) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $docT ) { setModificatoDa($fullName) } +end + + +rule "completeDescrizioneDocV" +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr( descrizione == null && codMart != null && gestione == "V") + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $docR) +then + modify ( $docR ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeQtaCnfDocV" +salience -10 // FABIO (14.7.2016): necessario perchè il calcolo della qta_cnf deve essere fatto dopo aver acquisito\calcolato il rap_conv +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(qtaCnf == null && codMart != null && gestione == "V") + + $qtaCnf: java.math.BigDecimal() from CommonRules.completeQtaCnfDB(conn, $docR) +then + modify ( $docR ) { setQtaCnf($qtaCnf) } +end + +rule "completeUntDocV" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(untDoc == null && codMart != null && gestione == "V") + $untMis: java.lang.String() from CommonRules.completeUntMis(conn, $docR.codMart) +then + modify ( $docR ) { setUntDoc($untMis) } +end + +rule "completeRapConvDocV" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(rapConv == null && codMart != null && untDoc != null && gestione == "V") + + $rapConv: java.math.BigDecimal() from CommonRules.completeRapConv(conn, $docR) +then + modify ( $docR ) { setRapConv($rapConv) } +end + +rule "completeCodAliqDocV" +salience -10 +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(codMart != null && codAliq == null && gestione == "V") + $codAliq: String() from DocOrdRules.completeCodAliq(conn, $docR) +then + modify ( $docR ) { setCodAliq($codAliq) } +end + +rule "completeDatiListinoDocV" +no-loop +salience 1 +when + eval(checkRulesEnabled == 0) + DtbDocr( codMart != null && listino != null && "ULTC".equals(listino) == false && gestione == "V", $entity : this) +then + SalesRules.completeDatiArtOrdDocV(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeDatiIvaDocV" +no-loop +when + eval(checkRulesEnabled == 0) + DtbDocr((percAliq == null || tipoIva == null ) && codAliq != null && gestione == "V", $entity : this) +then + DocOrdRules.completeDatiAliq(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeImportoRigaDocV" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(importoRiga == null && qtaDoc != null && valUnt != null && gestione == "V") + + $importo: java.math.BigDecimal() from DocOrdRules.completeImportoRiga(conn, $docR) +then + modify ( $docR ) { setImportoRiga($importo) } +end +/* +rule "completeValUntULTCDocV" +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(valUnt == null && "ULTC".equals(listino) && codMart != null && gestione == "V") + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntULTC(conn, $docR) +then + modify ( $docR ) { setValUnt($valUnt) } +end + +rule "completeCostoUntDocV" +salience -10 +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr(costoUnt == null && codMart != null && gestione == "V") + $costoUnt: java.math.BigDecimal() from DocumentRules.completeCostoUntDocV(conn, $docR) +then + modify ( $docR ) { setCostoUnt($costoUnt) } +end +*/ +rule "completeDatiDocCompDocV" +no-loop +when + eval(checkRulesEnabled == 0) + $docR : DtbDocr((codDtipComp == null || codAnagComp == null || dataDocComp == null || serDocComp == null || numDocComp == null )&& gestione == "V" && operation == OperationType.INSERT ) +then + DocumentRules.completeDatiDocComp(conn, $docR); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docR, bitMask, $docR.getClass()); +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/DocWebA.drl b/ems-core/src/main/resources/rules/DocWebA.drl new file mode 100644 index 0000000000..205bca03d1 --- /dev/null +++ b/ems-core/src/main/resources/rules/DocWebA.drl @@ -0,0 +1,205 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + +rule "completeDatiTipoDocWebA" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : WdtbDoct( codDtip != null && gestione == "A") +then + DocumentRules.completeDatiTipoDoc(conn, $docT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeSerDocWebA" +when + eval(checkRulesEnabled == 0) + $docT : WdtbDoct(serDoc == null && codDtip != null && codMdep != null && gestione == "A") + + $serDoc: String() from DocumentRules.completeSerDoc(conn, $docT) +then + modify ( $docT ) { setSerDoc($serDoc) } +end + +rule "completeDataRegDocWebA" +when + eval(checkRulesEnabled == 0) + $docT : WdtbDoct(dataReg == null && dataDoc != null && gestione == "A") + + $dataReg: java.util.Date() from DocumentRules.completeDataReg(conn, $docT) +then + modify ( $docT ) { setDataReg($dataReg) } +end + + +rule "completeDatiFornDocWebA" +no-loop +when + eval(checkRulesEnabled == 0) + $docT : WdtbDoct((porto == null || mezzo == null || codPaga == null || descrizionePaga == null ) && gestione == "A" && codAnag != null) +then + DocOrdRules.completeDatiForn(conn, $docT ); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($docT, bitMask, $docT.getClass()); +end + +rule "completeListinoDocWebA" +when + eval(checkRulesEnabled == 0) + $docT : WdtbDoct(listino == null && gestione == "A" && codAnag != null) + $listino: String() from PurchasesRules.completeListAcq(conn, $docT) +then + modify ( $docT ) { setListino($listino) } +end + +rule "completeCodDiviDocWebA" +when + eval(checkRulesEnabled == 0) + $docT : WdtbDoct(codDivi == null && gestione == "A" && codAnag != null) + $codDivi : String() from DocOrdRules.completeCodDivi(conn, $docT) +then + modify ( $docT ) { setCodDivi($codDivi) } +end + +rule "completeCodJfasDocWebA" +when + eval(checkRulesEnabled == 0) + $docT : WdtbDoct(codJfas == null && gestione == "A" && codMdep != null) + $codJfas : String() from DocumentRules.completeCodJfas(conn, $docT) +then + modify ( $docT ) { setCodJfas($codJfas) } +end + +rule "completeDataModDocWebA" +when + eval(checkRulesEnabled == 0) + $docT : WdtbDoct((operation == OperationType.INSERT || operation == OperationType.UPDATE || operation == OperationType.INSERT_OR_UPDATE) && gestione == "A") +then + modify ( $docT ) { setDataMod(new Date()) } +end + +rule "completeDescrizioneDocWebA" +no-loop +when + eval(checkRulesEnabled == 0) + $docR : WdtbDocr( descrizione == null && codMart != null && gestione == "A") + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $docR) +then + modify ( $docR ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeQtaCnfDocWebA" +when + eval(checkRulesEnabled == 0) + $docR : WdtbDocr(qtaCnf == null && codMart != null && gestione == "A") + + $qtaCnf: java.math.BigDecimal() from CommonRules.completeQtaCnf(conn, $docR) +then + modify ( $docR ) { setQtaCnf($qtaCnf) } +end + +rule "completeUntDocWebA" +when + eval(checkRulesEnabled == 0) + $docR : WdtbDocr(untDoc == null && codMart != null && gestione == "A") + $untMis: java.lang.String() from CommonRules.completeUntMis(conn, $docR.codMart) +then + modify ( $docR ) { setUntDoc($untMis) } +end + +rule "completeRapConvDocWebA" +when + eval(checkRulesEnabled == 0) + $docR : WdtbDocr(rapConv == null && codMart != null && untDoc != null && gestione == "A") + + $rapConv: java.math.BigDecimal() from CommonRules.completeRapConv(conn, $docR) +then + modify ( $docR ) { setRapConv($rapConv) } +end + +rule "completeCodAliqDocWebA" +salience -10 +when + eval(checkRulesEnabled == 0) + $docR : WdtbDocr(codMart != null && codAliq == null && gestione == "A") + $codAliq: String() from DocOrdRules.completeCodAliq(conn, $docR) +then + modify ( $docR ) { setCodAliq($codAliq) } +end + +rule "completeCodMartDocWebA" +when + eval(checkRulesEnabled == 0) + $docR : WdtbDocr( codMart == null && gestione == "A" && listino != null && codArtFor != null) + $codMart: String() from PurchasesRules.completeCodMartOrdDocA(conn, $docR) +then + modify ( $docR ) { setCodMart($codMart) } +end + +rule "completeDatiListinoDocWebA" +no-loop +salience 1 +when + eval(checkRulesEnabled == 0) + WdtbDocr((codArtFor == null || valUnt == null || valOneri == null || percOneri == null || valPromo == null || + percPromo == null || sconto5 == null || sconto6 == null || sconto7 == null || sconto8 == null ) && + codMart != null && listino != null && "ULTC".equals(listino) == false && gestione == "A", $entity : this) +then + PurchasesRules.completeDatiArtOrdDocA(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeDatiIvaDocWebA" +no-loop +when + eval(checkRulesEnabled == 0) + WdtbDocr((percAliq == null || tipoIva == null ) && codAliq != null && gestione == "A", $entity : this) +then + DocOrdRules.completeDatiAliq(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeImportoRigaDocWebA" +when + eval(checkRulesEnabled == 0) + $docR : WdtbDocr(importoRiga == null && qtaDoc != null && valUnt != null && gestione == "A") + + $importo: java.math.BigDecimal() from DocOrdRules.completeImportoRiga(conn, $docR) +then + modify ( $docR ) { setImportoRiga($importo) } +end + +rule "completeValUntULTCDocWebA" +when + eval(checkRulesEnabled == 0) + $docR : WdtbDocr(valUnt == null && "ULTC".equals(listino) && codMart != null && gestione == "A") + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntULTC(conn, $docR) +then + modify ( $docR ) { setValUnt($valUnt) } +end + +rule "completeCodMartFromCodBarreA" +when + eval(checkRulesEnabled == 0) + $docR : WdtbDocr(codMart == null && codBarre != null && gestione == "A") + $codMart: String() from DocOrdRules.completeCodMartFromCodBarre(conn, $docR) +then + modify ( $docR ) { setCodMart($codMart) } +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/LottiProd.drl b/ems-core/src/main/resources/rules/LottiProd.drl new file mode 100644 index 0000000000..29cf946365 --- /dev/null +++ b/ems-core/src/main/resources/rules/LottiProd.drl @@ -0,0 +1,41 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + +rule "completeIdLottoLotT" +when + eval(checkRulesEnabled == 0) + $lotT : JtbLott(idLotto == null) + $idLotto: Integer() from LottiProdRules.completeIdLotto(conn) +then + modify ( $lotT ) { setIdLotto($idLotto) } +end + +rule "completeCodJfasLotT" +no-loop +when + eval(checkRulesEnabled == 0) + $lotT : JtbLott(codJfas == null && codJflav != null) + $codJfas: String() from LottiProdRules.completeCodJfas(conn, $lotT) +then + modify ( $lotT ) { setCodJfas($codJfas) } +end + +rule "completeDataChiusuraLottoLoT" +no-loop +when + eval(checkRulesEnabled == 0) + $lotT : JtbLott(flagComp == "S" && dataChiusura == null) +then + modify ( $lotT ) { setDataChiusura(new Date()) } +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/OrdA.drl b/ems-core/src/main/resources/rules/OrdA.drl new file mode 100644 index 0000000000..248f901f59 --- /dev/null +++ b/ems-core/src/main/resources/rules/OrdA.drl @@ -0,0 +1,205 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + +rule "completeNumOrdA" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((numOrd == null || numOrd == 0) && dataOrd != null && gestione == "A" && gestioneRif==null) + $numOrd : java.lang.Integer() from OrderRules.completeNumOrd(conn, $ordT) +then + modify ( $ordT ) { setNumOrd($numOrd) } +end + +rule "completeTipoAnagOrdA" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(tipoAnag == null && gestione == "A" && gestioneRif==null) + $tipoAnag : String() from OrderRules.completeTipoAnag(conn, $ordT.getGestione()) +then + modify ( $ordT ) { setTipoAnag($tipoAnag) } +end + +rule "completeDatiFornOrdA" +no-loop +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((porto == null || mezzo == null || codPaga == null || descrizionePaga == null ) && gestione == "A" && gestioneRif==null && codAnag != null ) +then + DocOrdRules.completeDatiForn(conn, $ordT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($ordT, bitMask, $ordT.getClass()); +end + +rule "completeListinoOrdA" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(listino == null && gestione == "A" && gestioneRif==null && codAnag != null) + $listino: String() from PurchasesRules.completeListAcq(conn, $ordT) +then + modify ( $ordT ) { setListino($listino) } +end + +rule "completeCodDiviOrdA" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(codDivi == null && gestione == "A" && gestioneRif==null && codAnag != null) + $codDivi : String() from DocOrdRules.completeCodDivi(conn, $ordT) +then + modify ( $ordT ) { setCodDivi($codDivi) } +end + +rule "completeDataUltModOrdA" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((operation == OperationType.INSERT || operation == OperationType.UPDATE || operation == OperationType.INSERT_OR_UPDATE) && gestione == "A" && gestioneRif==null) +then + modify ( $ordT ) { setDataUltMod(new Date()) } +end + + +rule "completeCompilatoDaOrdA" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt (compilatoDa == null && operation == OperationType.INSERT && gestione == "A" && gestioneRif==null) + + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $ordT ) { setCompilatoDa($fullName) } +end + +rule "completeModificatoDaOrdA" +no-loop +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt( modificatoDa == null && ( operation == OperationType.UPDATE || operation == OperationType.INSERT_OR_UPDATE ) && gestione == "A" && gestioneRif==null) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $ordT ) { setModificatoDa($fullName) } +end + +rule "completeDataConsegnaOrdA" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(dataCons == null && gestione == "A" && gestioneRif==null ) + $dataCons : java.util.Date() from OrderRules.completeDataConsA(conn, $ordR) +then + modify ( $ordR ) { setDataCons($dataCons) } +end + +rule "completeDescrizioneOrdA" +no-loop +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr( descrizione == null && codMart != null && gestione == "A" && gestioneRif==null) + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $ordR) +then + modify ( $ordR ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeQtaCnfOrdA" +salience -10 +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(qtaCnf == null && codMart != null && gestione == "A" && gestioneRif==null) + + $qtaCnf: java.math.BigDecimal() from CommonRules.completeQtaCnfDB(conn, $ordR) +then + modify ( $ordR ) { setQtaCnf($qtaCnf) } +end + +rule "completeUntOrdA" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(untOrd == null && codMart != null && gestione == "A" && gestioneRif==null) + $untMis: java.lang.String() from CommonRules.completeUntMis(conn, $ordR.codMart) +then + modify ( $ordR ) { setUntOrd($untMis) } +end + +rule "completeRapConvOrdA" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(rapConv == null && codMart != null && untOrd != null && gestione == "A" && gestioneRif==null) + + $rapConv: java.math.BigDecimal() from CommonRules.completeRapConv(conn, $ordR) +then + modify ( $ordR ) { setRapConv($rapConv) } +end + +rule "completeCodAliqOrdA" +salience -10 +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(codMart != null && codAliq == null && gestione == "A" && gestioneRif==null) + //$t: java.util.Map() from CommonRules.completeCodAliqSimple(conn, $ordR.codMart) + $codAliq: String() from DocOrdRules.completeCodAliq(conn, $ordR) +then + modify ( $ordR ) { setCodAliq($codAliq) } +end + +rule "completeDatiIvaOrdA" +no-loop +when + eval(checkRulesEnabled == 0) + DtbOrdr((percAliq == null || tipoIva == null ) && codAliq != null && gestione == "A" && gestioneRif==null, $entity : this) +then + DocOrdRules.completeDatiAliq(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeCodMartOrdA" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr( codMart == null && gestione == "A" && gestioneRif==null && listino != null && codArtFor != null) + $codMart: String() from PurchasesRules.completeCodMartOrdDocA(conn, $ordR) +then + modify ( $ordR ) { setCodMart($codMart) } +end + +rule "completeDatiListinoOrdA" +no-loop +salience 1 +when + eval(checkRulesEnabled == 0) + DtbOrdr((codArtFor == null || valUnt == null || valOneri == null || percOneri == null || valPromo == null || + percPromo == null || sconto5 == null || sconto6 == null || sconto7 == null || sconto8 == null ) && + codMart != null && listino != null && "ULTC".equals(listino) == false && gestione == "A" && gestioneRif==null, $entity : this) +then + PurchasesRules.completeDatiArtOrdDocA(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeImportoRigaOrdA" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(importoRiga == null && qtaOrd != null && valUnt != null && gestione == "A" && gestioneRif==null) + + $importo: java.math.BigDecimal() from DocOrdRules.completeImportoRiga(conn, $ordR) +then + modify ( $ordR ) { setImportoRiga($importo) } +end + +rule "completeValUntULTCOrdA" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(valUnt == null && "ULTC".equals(listino) && codMart != null && gestione == "A" && gestioneRif==null) + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntULTC(conn, $ordR) +then + modify ( $ordR ) { setValUnt($valUnt) } +end diff --git a/ems-core/src/main/resources/rules/OrdL.drl b/ems-core/src/main/resources/rules/OrdL.drl new file mode 100644 index 0000000000..f8aba25326 --- /dev/null +++ b/ems-core/src/main/resources/rules/OrdL.drl @@ -0,0 +1,265 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + +rule "completeNumOrdL" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((numOrd == null || numOrd == 0) && dataOrd != null && gestione == "L") + $numOrd : java.lang.Integer() from OrderRules.completeNumOrd(conn, $ordT) +then + modify ( $ordT ) { setNumOrd($numOrd) } +end + +rule "completeTipoAnagOrdL" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(tipoAnag == null && gestione == "L") + $tipoAnag : String() from OrderRules.completeTipoAnag(conn, $ordT.getGestione()) +then + modify ( $ordT ) { setTipoAnag($tipoAnag) } +end + +rule "completeDatiFornOrdL" +no-loop +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((porto == null || mezzo == null || codPaga == null || descrizionePaga == null ) && gestione == "L" && codAnag != null ) +then + DocOrdRules.completeDatiForn(conn, $ordT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($ordT, bitMask, $ordT.getClass()); +end + +rule "completeListinoOrdL" +salience 10 +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(listino == null && gestione == "L" && codAnag != null) + $listino: String() from "ULTC" +then + modify ( $ordT ) { setListino($listino) } +end + +rule "completeCodDiviOrdL" +salience 20 +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(codDivi == null && gestione == "L" && codAnag != null) + $codDivi : String() from DocOrdRules.completeCodDivi(conn, $ordT) +then + modify ( $ordT ) { setCodDivi($codDivi) } +end + +rule "completeDataUltModOrdL" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((operation == OperationType.INSERT || operation == OperationType.UPDATE || operation == OperationType.INSERT_OR_UPDATE) && gestione == "L") +then + modify ( $ordT ) { setDataUltMod(new Date()) } +end + + +rule "completeCompilatoDaOrdL" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt (compilatoDa == null && operation == OperationType.INSERT && gestione == "L") + + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $ordT ) { setCompilatoDa($fullName) } +end + +rule "completeModificatoDaOrdL" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt( modificatoDa == null && operation == OperationType.UPDATE && gestione == "L") + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $ordT ) { setModificatoDa($fullName) } +end + +rule "completeDataConsegnaOrdL" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(dataCons == null && gestione == "L" ) + $dataCons : java.util.Date() from OrderRules.completeDataConsL(conn, $ordR) +then + modify ( $ordR ) { setDataCons($dataCons) } +end + +rule "completeDescrizioneOrdL" +no-loop +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr( descrizione == null && codMart != null && gestione == "L") + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $ordR) +then + modify ( $ordR ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeQtaCnfOrdL" +salience -10 // FABIO (14.7.2016): necessario perchè il calcolo della qta_cnf deve essere fatto dopo aver acquisito\calcolato il rap_conv +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(qtaCnf == null && codMart != null && gestione == "L") + + $qtaCnf: java.math.BigDecimal() from CommonRules.completeQtaCnfDB(conn, $ordR) +then + modify ( $ordR ) { setQtaCnf($qtaCnf) } +end + +rule "completeUntOrdL" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(untOrd == null && codMart != null && gestione == "L") + $untMis: java.lang.String() from CommonRules.completeUntMis(conn, $ordR.codMart) +then + modify ( $ordR ) { setUntOrd($untMis) } +end + +rule "completeRapConvOrdL" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(rapConv == null && codMart != null && untOrd != null && gestione == "L") + + $rapConv: java.math.BigDecimal() from CommonRules.completeRapConv(conn, $ordR) +then + modify ( $ordR ) { setRapConv($rapConv) } +end + +rule "completeCodAliqOrdL" +salience -10 +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(codMart != null && codAliq == null && gestione == "L") + $codAliq: String() from DocOrdRules.completeCodAliq(conn, $ordR) +then + modify ( $ordR ) { setCodAliq($codAliq) } +end + +rule "completeImportoRigaOrdL" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(importoRiga == null && qtaOrd != null && valUnt != null && gestione == "L") + + $importo: java.math.BigDecimal() from DocOrdRules.completeImportoRiga(conn, $ordR) +then + modify ( $ordR ) { setImportoRiga($importo) } +end + +rule "completeValUntPartitaMagOrdL" +salience 10 +no-loop +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(valUnt == null && partitaMag != null && listino != null && codMart != null && rapConv !=null && gestione == "L") + $valUnt : java.math.BigDecimal() from DocOrdRules.completeValUntPartitaMagLav(conn, $ordR) +then + modify ( $ordR ) { setValUnt($valUnt) } +end + +rule "completeValUntULTCOrdL" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(valUnt == null && rapConv != null && ("ULTC".equals(listino) || listino == null) && codMart != null && gestione == "L") + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntULTC(conn, $ordR) +then + modify ( $ordR ) { setValUnt($valUnt) } +end + +rule "completeValUntDISTOrdL" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(valUnt == null && rapConv != null && ("DIST".equals(listino) || listino == null) && codMart != null && gestione == "L") + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntDIST(conn, $ordR) +then + modify ( $ordR ) { setValUnt($valUnt) } +end + +rule "completeValUntCMEDOrdL" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(valUnt == null && rapConv != null && ("CMED".equals(listino) || listino == null) && codMart != null && gestione == "L") + $valUnt: java.math.BigDecimal() from CommonRules.completeValUntCMED(conn, $ordR) +then + modify ( $ordR ) { setValUnt($valUnt) } +end + +rule "completeDatiSpesOrdL" +no-loop +when + eval(checkRulesEnabled == 0) + $ordS : DtbOrds((descrizione == null || importo == null || qta == null || valUnt == null) && gestione == "L" && codSpes != null) +then + DocOrdRules.completeDatiSpes(conn, $ordS); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($ordS, bitMask, $ordS.getClass()); +end + +rule "completeCausaleTraspOrdL" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(causaleTrasp == null && gestione == "L") + $causaleTrasp: String() from OrderRules.completeCausaleTrasp($ordT.getGestione()) +then + modify ( $ordT ) { setCausaleTrasp($causaleTrasp) } +end + +rule "completeDatiProdottoOrdL" +no-loop +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((descrizioneProd == null || untMisProd == null || qtaProd == null || rapConvProd == null || descrEstesaProd == null) && gestione == "L" && codProd != null) +then + DocOrdRules.completeDatiProdotto(conn, $ordT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($ordT, bitMask, $ordT.getClass()); +end + +rule "completeFlagEvasoProdOrdL" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(flagEvasoForzato == "S" && gestione == "L") +then + modify ( $ordT ) { setFlagEvasoProd("E") } +end + +rule "completeCambioOrdL" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(cambio==null && codDivi != null) + $cambio: java.math.BigDecimal() from DocOrdRules.completeCambioOrd(conn, $ordT) +then + modify ( $ordT ) { setCambio($cambio) } +end + +rule "completeQta2Qta3OrdL" +salience -10 +no-loop +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr( qtaOrd != null && qtaOrd2 == null && qtaOrd3 == null && codMart != null && untOrd != null && gestione == "L") +// $t: java.util.Map() from DocOrdRules.completeQta2Qta3(conn, $ordR) +then + DocOrdRules.completeQta2Qta3(conn, $ordR); +// modify ( $ordR ) { +// setQtaOrd2(new BigDecimal($t.get("qta_ord2").toString())), +// setQtaOrd3(new BigDecimal($t.get("qta_ord3").toString())), +// setUntOrd2($t.get("unt_ord2").toString()), +// setUntOrd3($t.get("unt_ord3").toString()) +// } +end diff --git a/ems-core/src/main/resources/rules/OrdP.drl b/ems-core/src/main/resources/rules/OrdP.drl new file mode 100644 index 0000000000..c8b5cd69b5 --- /dev/null +++ b/ems-core/src/main/resources/rules/OrdP.drl @@ -0,0 +1,144 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import java.lang.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + +rule "completeNumOrdP" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((numOrd == null || numOrd == 0) && dataOrd != null && gestione == "A" && gestioneRif!=null) + $numOrd : java.lang.Integer() from OrderRules.completeNumOrd(conn, $ordT) +then + modify ( $ordT ) { setNumOrd($numOrd) } +end + +rule "completeTipoAnagOrdP" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(tipoAnag == null && gestione == "A" && gestioneRif != null) + $tipoAnag : String() from OrderRules.completeTipoAnag(conn, $ordT.getGestione()) +then + modify ( $ordT ) { setTipoAnag($tipoAnag) } +end + +rule "completeDatiFornOrdP" +no-loop +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((porto == null || mezzo == null || codPaga == null || descrizionePaga == null ) && gestione == "A" && gestioneRif != null && codAnag != null ) +then + DocOrdRules.completeDatiForn(conn, $ordT); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($ordT, bitMask, $ordT.getClass()); +end + +rule "completeCodDiviOrdP" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(codDivi == null && gestione == "A" && gestioneRif != null && codAnag != null) + $codDivi : String() from DocOrdRules.completeCodDivi(conn, $ordT) +then + modify ( $ordT ) { setCodDivi($codDivi) } +end + +rule "completeDataUltModOrdP" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt((operation == OperationType.INSERT || operation == OperationType.UPDATE || operation == OperationType.INSERT_OR_UPDATE) && gestione == "A" && gestioneRif != null) +then + modify ( $ordT ) { setDataUltMod(new Date()) } +end + + +rule "completeCompilatoDaOrdP" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt (compilatoDa == null && operation == OperationType.INSERT && gestione == "A" && gestioneRif != null) + + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $ordT ) { setCompilatoDa($fullName), + setUserName(username) } +end + +rule "completeRifOrdLavOrdP" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr (dataOrdRif == null && numOrdRif == null && operation == OperationType.UPDATE && gestione == "A" && gestioneRif != null) + $t: java.util.Map() from OrderRules.completeRifOrdLavOrdP(conn, $ordR) +then + modify ( $ordR ) { setDataOrdRif((Date) $t.get("data_ord")), + setNumOrdRif((Integer) $t.get("num_ord"))} +end + +rule "completeModificatoDaOrdP" +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt( modificatoDa == null && operation == OperationType.UPDATE && gestione == "A" && gestioneRif != null) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $ordT ) { setModificatoDa($fullName), + setUserName(username) } +end + +rule "completeDatiRifOrdProd" +salience -40 +when + eval(checkRulesEnabled == 0) + $ordT : DtbOrdt(dataOrdRif == null && numOrdRif == null && gestione == "A" && gestioneRif != null && dataOrd != null && numOrd != null) +then + modify ( $ordT ) { setGestioneRif($ordT.getGestione()), + setDataOrdRif($ordT.getDataOrd()), + setNumOrdRif($ordT.getNumOrd())} +end + +rule "completeDataConsegnaOrdP" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(dataCons == null && gestione == "A" && gestioneRif != null) + $dataCons : java.util.Date() from OrderRules.completeDataConsOrdP(conn, $ordR) +then + modify ( $ordR ) { setDataCons($dataCons) } +end + +rule "completeDataInizioConsegnaOrdP" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(dataInizProd == null && gestione == "A" && gestioneRif != null) + $dataInizProd : java.util.Date() from OrderRules.completeDataInizProdOrdP(conn, $ordR) +then + modify ( $ordR ) { setDataInizProd($dataInizProd) } +end + +rule "completeDescrizioneOrdP" +no-loop +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr( descrizione == null && codMart != null && gestione == "A" && gestioneRif != null) + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $ordR) +then + modify ( $ordR ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeUntOrdP" +when + eval(checkRulesEnabled == 0) + $ordR : DtbOrdr(untOrd == null && codMart != null && gestione == "A" && gestioneRif != null) + $untMis: java.lang.String() from CommonRules.completeUntMis(conn, $ordR.codMart) +then + modify ( $ordR ) { setUntOrd($untMis) } +end + diff --git a/ems-core/src/main/resources/rules/OrdWebV.drl b/ems-core/src/main/resources/rules/OrdWebV.drl new file mode 100644 index 0000000000..42dd88e3c3 --- /dev/null +++ b/ems-core/src/main/resources/rules/OrdWebV.drl @@ -0,0 +1,242 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + + +//ORDINI WEB TESTATE +rule "completeDataOrdWeb" +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(dataOrd == null) + $dataOrdWeb: Date() from PackagesRules.completeWithDefault(WdtbOrdt.class, "dataOrd") +then + modify ( $ordT ) { setDataOrd($dataOrdWeb) } +end + +rule "completeNumOrdWeb" +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(numOrd == null && gestione != null && dataOrd != null && serie != null) + $val: java.lang.Integer() from ProductionsRules.completeNumOrdWeb(conn, $ordT.serie, $ordT.gestione, $ordT.dataOrd) +then + modify ( $ordT ) { setNumOrd($val) } +end + +rule "completeTipoAnagOrdWeb" +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(tipoAnag == null && gestione != null) + $tipoAnag: java.lang.String() from OrderRules.completeTipoAnag(conn, $ordT.gestione) +then + modify ( $ordT ) { setTipoAnag($tipoAnag) } +end + +rule "completeCausaleTrasp" +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(causaleTrasp == null && gestione != null) + $causale: java.lang.String() from ProductionsRules.completeCausaleTrasp($ordT.gestione) +then + modify ( $ordT ) { setCausaleTrasp($causale) } +end + +rule "completePortoOrdW" +salience -1 +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(porto == null && tipoAnag == "C" && codAnag != null) + $porto: java.lang.String() from ProductionsRules.completePorto(conn, $ordT.codAnag) +then + modify ( $ordT ) { setPorto($porto) } +end + +rule "completeMezzoOrdW" +salience -1 +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(mezzo == null && tipoAnag == "C" && codAnag != null) + $mezzo: java.lang.String() from ProductionsRules.completeMezzo(conn, $ordT.codAnag) +then + modify ( $ordT ) { setMezzo($mezzo) } +end +/* +rule "completeSconto1OrdW" +no-loop +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(sconto1 == null && tipoAnag == "C" && codAnag != null) + $t: java.util.Map() from ProductionsRules.completeSconto(conn, $ordT.codAnag, "sconto1") + $value: java.math.BigDecimal() from $t.get("sconto1").toString() +then + modify ( $ordT ) { setSconto1($value) } +end +*/ + +rule "completeSconto2OrdW" +no-loop +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(sconto2 == null && tipoAnag == "C" && codAnag != null) + $t: java.util.Map() from ProductionsRules.completeSconto(conn, $ordT.codAnag, "sconto2") + $value: java.math.BigDecimal() from $t.get("sconto2").toString() +then + modify ( $ordT ) { setSconto2($value) } +end + + +rule "completeSerieOrdW" +no-loop +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(serie == null && applicationName == "WINGEST") + $serie: java.lang.String() from OrdWebRules.completeSerie(conn, $ordT.codVage) +then + modify ( $ordT ) { setSerie($serie) } +end + +rule "completeSerieOrdWTx" +no-loop +when + eval(checkRulesEnabled == 0) + $ordT: WdtbOrdt(serie == null && applicationName == "TEXTILES") + $serie: java.lang.String() from OrdWebRules.completeSerieTx($ordT.codVage) +then + modify ( $ordT ) { setSerie($serie) } +end + + +rule "completeCompilatoDa" +when + eval(checkRulesEnabled == 0) + $entity : WdtbOrdt(compilatoDa == null && operation == OperationType.INSERT) + + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify($entity){ setCompilatoDa($fullName)} +end + +//ORDINI WEB RIGHE + +rule "completeCodAliqOrdW" +when + eval(checkRulesEnabled == 0) + $wordR: WdtbOrdr(codMart != null && codAliq == null) + $codAliq: String() from DocOrdRules.completeCodAliq(conn, $wordR) +then + modify ( $wordR ) { setCodAliq($codAliq) } +end + +rule "completePercAliqOrdW" +when + eval(checkRulesEnabled == 0) + $wordR: WdtbOrdr(percAliq == null && codAliq != null) + $percAliq : java.math.BigDecimal() from CommonRules.completePercAliq(conn, $wordR) +then + modify ( $wordR ) { setPercAliq($percAliq) } +end + +rule "completeUntOrdW" +when + eval(checkRulesEnabled == 0) + $ordR: WdtbOrdr(untOrd == null && codMart != null) + $value: String() from CommonRules.completeUntMis(conn, $ordR.codMart) +then + modify ( $ordR ) { setUntOrd($value) } +end + +/* +rule "completeRapConvOrdWeb" +when + eval(checkRulesEnabled == 0) + $ordR: WdtbOrdr(rapConv == null) + $rapConv: java.lang.Double() from PackagesRules.completeWithDefault(WdtbOrdr.class, "rapConv") +then + modify ( $ordR ) { setRapConv($rapConv) } +end +*/ + +rule "completeUntOrdWeb" +when + eval(checkRulesEnabled == 0) + $wordR : WdtbOrdr(untOrd == null && codMart != null ) + $untMis: java.lang.String() from CommonRules.completeUntMis(conn, $wordR.codMart) +then + modify ( $wordR ) { setUntOrd($untMis) } +end + +rule "completeRapConvOrdWeb" +when + eval(checkRulesEnabled == 0) + $wordR : WdtbOrdr(rapConv == null && codMart != null && untOrd != null) + + $rapConv: java.math.BigDecimal() from CommonRules.completeRapConv(conn, $wordR) +then + modify ( $wordR ) { setRapConv($rapConv) } +end + +rule "completeValUntOrdW" +salience -10 +when + eval(checkRulesEnabled == 0) + $wordR: WdtbOrdr(valUnt == null && codMart != null && codCol != null && codTagl != null && listino !=null) + $value: java.math.BigDecimal() from DocOrdRules.completePrzVendTx(conn, $wordR) +then + modify ( $wordR ) { setValUnt($value) } +end + +rule "completeImportoScontiW" +salience 10 +when + eval(checkRulesEnabled == 0) + $ordR: WdtbOrdr(sconto5 == null || sconto6 == null || sconto7 == null || sconto8 == null) +then + modify ( $ordR ) { + setSconto5($ordR.getSconto5() == null ? BigDecimal.ZERO : $ordR.getSconto5()), + setSconto6($ordR.getSconto6() == null ? BigDecimal.ZERO : $ordR.getSconto6()), + setSconto7($ordR.getSconto7() == null ? BigDecimal.ZERO : $ordR.getSconto7()), + setSconto8($ordR.getSconto8() == null ? BigDecimal.ZERO : $ordR.getSconto8()) + } +end + +rule "completeImportoRigaOrdW" +no-loop +when + eval(checkRulesEnabled == 0) + $wordR: WdtbOrdr(importoRiga == null && qtaOrd != null && valUnt != null && gestione == "V") + $importo: java.math.BigDecimal() from DocOrdRules.completeImportoRiga(conn, $wordR) +then + modify ( $wordR ) { setImportoRiga($importo) } +end + +rule "completeDescrizioneOrdW" +no-loop +when + eval(checkRulesEnabled == 0) + $wordR : WdtbOrdr( descrizione == null && codMart != null && gestione == "V") + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $wordR) +then + modify ( $wordR ) { + setDescrizione($t.get("descrizione").toString()), + setDescrizioneEstesa( $t.get("descrizione_estesa") == null ? null : $t.get("descrizione_estesa").toString() ) + } +end + +rule "completeQtaCnfOrdW" +when + eval(checkRulesEnabled == 0) + $wordR : WdtbOrdr(qtaCnf == null && codMart != null) + $value : BigDecimal() from CommonRules.completeQtaCnf(conn, $wordR) +then + modify ( $wordR ) { setQtaCnf($value) } +end + \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/accounting.drl b/ems-core/src/main/resources/rules/accounting.drl new file mode 100644 index 0000000000..052d3ed967 --- /dev/null +++ b/ems-core/src/main/resources/rules/accounting.drl @@ -0,0 +1,397 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.completing.* +import it.integry.ems.rules.util.* +import java.sql.Connection +import java.text.* + +global Connection conn +global String username +global String postRulesEnabled +global Integer checkRulesEnabled + +//MOVIMENTI + +//TESTATE +rule "completeNumIreg" +when + eval(checkRulesEnabled == 0) + CtbMovt(numIreg == null && codIreg != null, $entity : this) + + $numIreg: java.lang.Integer() from AccountingRules.completeNumIreg(conn, $entity.codIreg) +then + modify ( $entity ) { setNumIreg($numIreg) } +end + +rule "completeNumCmov" +when + eval(checkRulesEnabled == 0) + CtbMovt((numCmov == null || numCmov == 0) && annoComp != null, $entity : this) + + $numCmov: java.lang.Integer() from AccountingRules.completeNumCmov(conn, $entity) +then + modify ( $entity ) { setNumCmov($numCmov) } +end + +rule "completeNumProt" +when + eval(checkRulesEnabled == 0) + $entity : CtbMovt(codIreg != null && numIreg != null && annoComp != null && tipoNumerazione == "IMMEDIATA") + + $numProt: java.lang.Integer() from AccountingRules.completeNumProt(conn, $entity) +then + modify ( $entity ) { setNumProt($numProt) } +end + +rule "completeAnnoComp" +salience 1 +when + eval(checkRulesEnabled == 0) + CtbMovt(annoComp == null, $entity : this) + + $anno: java.lang.Integer() from AccountingRules.completeAnnoComp(conn, $entity.dataCmov) +then + modify ( $entity ) { setAnnoComp($anno) } +end + +rule "completeCodBiva" +when + eval(checkRulesEnabled == 0) + CtbMovt(codAnag != null && tipoAnag != null && tipoAnag == "F", $entity : this) + $movi : CtbMovi() + $codBiva: java.lang.String() from AccountingRules.completeCodBiva(conn, $entity.codAnag) +then + modify ( $movi ) { setCodBiva($codBiva) } +end + +rule "completeDatiCausale" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : CtbMovt((descrizioneCaus == null || codIreg == null || tipoAnag == null || codCcauRc == null ) && codCcau != null) +then + AccountingRules.completeDatiCausale(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeCodJfasMov" +no-loop +when + eval(checkRulesEnabled == 0) + CtbMovr(codJfas == null && codCcon != null, $entity : this) + + $codJfas: java.lang.String() from AccountingRules.completeCodJfas(conn, $entity.codCcon) +then + modify ( $entity ) { setCodJfas($codJfas) } +end + +// MOVIMENTI IVA +rule "completeCifreDecDiviCont" +when + eval(checkRulesEnabled == 0) + CtbMovi(cifreDecDiviCont == null && codDiviCont != null, $entity : this) + + $cifreDecDiviCont: java.lang.Integer() from AccountingRules.completeCifreDecDiviCont(conn, $entity.codDiviCont) +then + modify ( $entity ) { setCifreDecDiviCont($cifreDecDiviCont) } +end + +rule "completeImpostaImponibile" +when + eval(checkRulesEnabled == 0) + CtbMovi((imposta == null || imponibile == null ) && cifreDecDiviCont != null && codAliq != null, $entity : this) +then + AccountingRules.completeImpostaImponibile(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeFlagReverseCharge" +when + eval(checkRulesEnabled == 0) + $entity : CtbMovi(flagReverseCharge == null && codAliq != null ) + $flagReverseCharge: java.lang.String() from AccountingRules.completeFlagReverseCharge(conn, $entity.codAliq) +then + modify ( $entity ) { setFlagReverseCharge($flagReverseCharge) } +end + +rule "completeCtbMovrCoan" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : CtbMovr(ctbMovrCoan.size == 0 && (codJfas != null || codJcom != null)) +then + AccountingRules.completeCtbMovrCoan(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeDatiRegIva" +when + eval(checkRulesEnabled == 0) + $entity : CtbMovt((flagScorporo == null || tipoNumerazione == null ) && codIreg != null) +then + AccountingRules.completeDatiRegIva(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "insertNewPartita" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: CtbMovt(generaScad == "S" && ctbPart == null) +then + AccountingRules.completePartita(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeDatiAnagPartita" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: CtbPart(codAnag != null && tipoAnag != null) +then + AccountingRules.completeDatiAnagPartita(conn, $entity ); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeDatiContoPDC" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: CtbMovr((tipo == null || sezione == null || percDed == null ) && codCcon != null ) +then + AccountingRules.completeDatiContoPDC(conn, $entity ); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeNumDocMov" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: CtbMovt(numDoc == null && tipoAnag != null && codAnag != null && serDoc != null && dataDoc != null && codIreg != null && numIreg !=null) + $numDoc: java.lang.Integer() from AccountingRules.completeNumDocMov(conn, $entity) +then + modify ( $entity ) { setNumDoc($numDoc)} +end + +rule "completeDatiPartitaCtbMovr" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: CtbMovr((codAnag == null || annoPart == null || serDoc == null || numDoc == null ) && tipo == 2 && sezione == 1 && dataDocTestata != null && tipoAnag != null ) +then + modify ( $entity ) { + setCodAnag($entity.getCodAnagTestata()), + setAnnoPart(Integer.parseInt(new SimpleDateFormat("yyyy").format($entity.getDataDocTestata()))), + setSerDoc($entity.getSerDocTestata()), + setNumDoc($entity.getNumDocTestata()) + } +end + +rule "completeInsertCtbParr" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: CtbMovr(ctbParr.size == 0 && tipoAnag != null && codAnag != null && annoPart != null && serDoc != null && numDoc != null) +then + AccountingRules.InsertCtbParr(conn, $entity ); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeDescrPagaScad" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: CtbScad(descrizPag == null && codPaga != null ) + $descrizione: java.lang.String() from CommonRules.completeDescrizionePaga(conn, $entity.codPaga) +then + modify ( $entity ) { setDescrizPag($descrizione) } +end + +rule "completeInseritoDaCtbMovt" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: CtbMovt(inseritoDa == null && operation != OperationType.DELETE) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $entity ) { setInseritoDa($fullName) } +end + +rule "completeModificatoDaCtbMovt" +when + eval(checkRulesEnabled == 0) + $entity : CtbMovt( operation != OperationType.DELETE ) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $entity ) { + setDataMod(new Date()), + setModificatoDa($fullName) + } +end + +rule "completeCodDiviContCtbMovt" +when + eval(checkRulesEnabled == 0) + $testata : CtbMovt(codDiviCont == null) + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + modify ( $testata ) { setCodDiviCont($t.get("cod_divi_contab").toString()) } +end + +rule "completeCodDiviContCtbMovr" +when + eval(checkRulesEnabled == 0) + $testata : CtbMovr(codDiviCont == null) + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + modify ( $testata ) { setCodDiviCont($t.get("cod_divi_contab").toString()) } +end + +rule "completeCodDiviContCtbMovrCoan" +when + eval(checkRulesEnabled == 0) + $testata : CtbMovrCoan(codDiviCont == null) + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + modify ( $testata ) { setCodDiviCont($t.get("cod_divi_contab").toString()) } +end + +rule "completeCodDiviContCtbMovi" +when + eval(checkRulesEnabled == 0) + $testata : CtbMovi(codDiviCont == null) + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + modify ( $testata ) { setCodDiviCont($t.get("cod_divi_contab").toString()) } +end + +rule "completeCodDiviContCtbParr" +when + eval(checkRulesEnabled == 0) + $testata : CtbParr(codDiviCont == null) + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + modify ( $testata ) { setCodDiviCont($t.get("cod_divi_contab").toString()) } +end + +rule "completeCodDiviContCtbPart" +when + eval(checkRulesEnabled == 0) + $testata : CtbPart(codDiviCont == null) + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + modify ( $testata ) { setCodDiviCont($t.get("cod_divi_contab").toString()) } +end + +rule "completeCodDiviCtbPart" +when + eval(checkRulesEnabled == 0) + $entity : CtbPart( codDivi == null) + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + modify ( $entity ) { setCodDivi($t.get("cod_divi_contab").toString()) } +end + +rule "completeCambioCtbPart" +when + eval(checkRulesEnabled == 0) + $entity : CtbPart( cambio == null && codDivi != null) + $cambio: BigDecimal() from CommonRules.completeCambio(conn, $entity.codDivi) +then + modify ( $entity ) { setCambio($cambio) } +end +/* +rule "completeCambioDiviCtbMovt" +when + eval(checkRulesEnabled == 0) + (CtbMovt(cambioDiviCont == null && codDiviCont != null, $entityFind : this) or + CtbMovr(cambioDiviCont == null && codDiviCont != null, $entityFind : this) or + CtbMovrCoan(cambioDiviCont == null && codDiviCont != null, $entityFind : this) or + CtbMovi(cambioDiviCont == null && codDiviCont != null, $entityFind : this) or + CtbParr(cambioDiviCont == null && codDiviCont != null, $entityFind : this) or + CtbPart(cambioDiviCont == null && codDiviCont != null, $entityFind : this)) + $entity : EntityBase() from $entityFind + $cambio: BigDecimal() from CommonRules.completeCambio(conn, $entity) +then + String[] fields = new String[]{"cambioDiviCont"}; + DroolsUtil.completeEntity($entity, fields, $cambio); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end */ + +rule "completeCambioDiviCtbMovt" +when + eval(checkRulesEnabled == 0) + $testata : CtbMovt(cambioDiviCont == null && codDiviCont != null ) + $cambio: BigDecimal() from CommonRules.completeCambio(conn, $testata.codDiviCont) +then + modify ( $testata ) { setCambioDiviCont($cambio) } +end + +rule "completeCambioDiviCtbMovr" +when + eval(checkRulesEnabled == 0) + $testata : CtbMovr(cambioDiviCont == null && codDiviCont != null ) + $cambio: BigDecimal() from CommonRules.completeCambio(conn, $testata.codDiviCont) +then + modify ( $testata ) { setCambioDiviCont($cambio) } +end + +rule "completeCambioDiviCtbMovrCoan" +when + eval(checkRulesEnabled == 0) + $testata : CtbMovrCoan(cambioDiviCont == null && codDiviCont != null ) + $cambio: BigDecimal() from CommonRules.completeCambio(conn, $testata.codDiviCont) +then + modify ( $testata ) { setCambioDiviCont($cambio) } +end + +rule "completeCambioDiviCtbMovi" +when + eval(checkRulesEnabled == 0) + $testata : CtbMovi(cambioDiviCont == null && codDiviCont != null ) + $cambio: BigDecimal() from CommonRules.completeCambio(conn, $testata.codDiviCont) +then + modify ( $testata ) { setCambioDiviCont($cambio) } +end +/* +rule "completeDatiReverceCharge" +no-loop +when + eval(checkRulesEnabled == 0) + $testata : CtbMovt(generaReverseCharge == "S" && (numCmovRc == null || numDocRc == null || numProtRc == null )) +then + AccountingRules.completeDatiReverseCharge(conn, $testata) ; + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end */ + +rule "completeCambioDiviCtbPart" +when + eval(checkRulesEnabled == 0) + $testata : CtbPart(cambioDiviCont == null && codDiviCont != null ) + $cambio: BigDecimal() from CommonRules.completeCambio(conn, $testata.codDiviCont) +then + modify ( $testata ) { setCambioDiviCont($cambio) } +end + +rule "completeCambioDiviCtbParr" +when + eval(checkRulesEnabled == 0) + $testata : CtbParr(cambioDiviCont == null && codDiviCont != null ) + $cambio: BigDecimal() from CommonRules.completeCambio(conn, $testata.codDiviCont) +then + modify ( $testata ) { setCambioDiviCont($cambio) } +end diff --git a/ems-core/src/main/resources/rules/anag.drl b/ems-core/src/main/resources/rules/anag.drl new file mode 100644 index 0000000000..bae922f9d1 --- /dev/null +++ b/ems-core/src/main/resources/rules/anag.drl @@ -0,0 +1,37 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global String postRulesEnabled +global Integer checkRulesEnabled + +//DESTINATARI +rule "completeCodVdes" +no-loop +when + eval(checkRulesEnabled == 0) + $vtbDest: VtbDest(codVdes == null && precode != null && codAnag != null) + $codVdes: String() from AnagRules.completeCodVdes(conn, $vtbDest.codAnag, $vtbDest.precode) +then + modify ( $vtbDest ) { setCodVdes($codVdes) } +end + + +rule "completeCodAnag" +no-loop +when + eval(checkRulesEnabled == 0) + //$gtbAnag: GtbAnag(codAnag == null && precode != null) + $vtbClie: VtbClie(codAnag == null && precode != null) + $codAnag: String() from AnagRules.completeCodAnag(conn, $vtbClie.precode) +then + modify ( $vtbClie ) { setCodAnag($codAnag) } +end diff --git a/ems-core/src/main/resources/rules/check_cond.drl b/ems-core/src/main/resources/rules/check_cond.drl new file mode 100644 index 0000000000..e2f763cc91 --- /dev/null +++ b/ems-core/src/main/resources/rules/check_cond.drl @@ -0,0 +1,96 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import function it.integry.ems.rules.completing.CommonRules.chk +import it.integry.ems.types.OperationType +import java.sql.Connection +import it.integry.ems.exception.CheckConstraintException + +global Connection conn +global Integer checkRulesEnabled + +rule "checkImportoTitoli" +no-loop +when + eval(checkRulesEnabled == 1) + CtbTitoli(importoTitolo < importoEvaso) + //CtbTitoli($importoTitolo : importoTitolo, $importoEvaso : importoEvaso) + //eval(chk($importoTitolo, $importoEvaso, "<")) +then + throw new CheckConstraintException("L'importo del titolo non può essere minore dell'importo evaso."); +end + +rule "checkDtbTipi1" +no-loop +when + eval(checkRulesEnabled == 1) + $dTip : DtbTipi() + eval((chk($dTip.getCodCcau(), "!=", null) && chk($dTip.getPrevistaFat(), "==", "S")) || + (chk($dTip.getTipoEmissione(), "==", "DIFFERITA") && chk($dTip.getPrevistaFat(), "==", "S"))) +then + throw new CheckConstraintException("Non è possibile prevedere fatturazione differita per questo tipo di documento."); +end + +rule "checkDtbTipi2" +no-loop +when + eval(checkRulesEnabled == 1) + $dTip : DtbTipi() + eval(chk($dTip.getSegnoQtaCar(), "<", 0) && chk($dTip.getSegnoQtaScar(), "<", 0) && + chk($dTip.getSegnoValCar(), "<", 0) && chk($dTip.getSegnoValScar(), "<", 0)) + eval(chk($dTip.getFlagTipoReso(), "==", null)) +then + throw new CheckConstraintException("Tipologia Reso Obbligatoria."); +end + +rule "checkDataDocValNtbDocT" +no-loop +when + eval(checkRulesEnabled == 1) + NtbDoct(dataDocVal != null && operation == OperationType.DELETE) +then + throw new CheckConstraintException("Impossibile cancellare lo scontrino perche' e' agganciato ad un documento."); +end + +rule "checkUntMisVend" +no-loop +when + eval(checkRulesEnabled == 1) + $entity : MtbLisvData(untMisVen != null && codMart != null) + eval(SalesRules.chkUntMisVend(conn, $entity.getCodMart(), $entity.getUntMisVen())) +then + throw new CheckConstraintException("Attezione!Unita' di misura " + $entity.getUntMisVen() + " non presente nell'articolo " + $entity.getCodMart()); +end + +rule "checkDataInizLisa" +no-loop +when + eval(checkRulesEnabled == 1) + $entity : AtbListData(dataIniz != null && dataFine == null && operation != OperationType.INSERT) + eval(PurchasesRules.checkChangeDataInizLisa(conn, $entity)) +then + throw new CheckConstraintException("Attenzione!Impossibile cambiare la data di inizio di un listino"); +end + +rule "checkNumDoc" +no-loop +when + eval(checkRulesEnabled == 1) + $entity : DtbDoct(codAnag != null && codDtip != null && serDoc != null && numDoc !=null && dataDoc != null && (operation == OperationType.INSERT || operation == OperationType.UPDATE)) + eval(DocumentCheckRules.CheckExistDoc(conn, $entity)); // Modificare metodo con return boolean +then +end + +rule "checkDataDoc" +no-loop +when + eval(checkRulesEnabled == 1) + $entity : DtbDoct(codAnag != null && codDtip != null && serDoc != null && numDoc !=null && dataDoc != null) + eval(DocumentCheckRules.checkDataDoc(conn, $entity)); // Modificare metodo con return boolean +then +end diff --git a/ems-core/src/main/resources/rules/commesse.drl b/ems-core/src/main/resources/rules/commesse.drl new file mode 100644 index 0000000000..f9bbbe0226 --- /dev/null +++ b/ems-core/src/main/resources/rules/commesse.drl @@ -0,0 +1,77 @@ +package it.integry.rules + + +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global String postRulesEnabled +global Integer checkRulesEnabled + +//TESTATA COMMESSE + +rule "completeCodDiviContComt" +no-loop +when + eval(checkRulesEnabled == 0) + $comT: JtbComt(codDiviCont == null || cambioDiviCont == null) + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + Double cambio = new Double($t.get("cambio").toString()); + String[] fields = new String[]{"codDiviCont", "cambioDiviCont"}; + DroolsUtil.completeEntity($comT, fields, $t.get("cod_divi_contab").toString(), cambio); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($comT, bitMask, $comT.getClass()); +end + +rule "completeDataIniziLav" +when + eval(checkRulesEnabled == 0) + $comT : JtbComt(dataIniziLav == null && dataOrd != null ) +then + modify ($comT) {setDataIniziLav($comT.getDataOrd())} +end + +rule "completeResponsabileCom" +when + eval(checkRulesEnabled == 0) + $comT : JtbComt(codJflav != null) + $responsabileCom: java.lang.String() from CommesseRules.completeResponsabileCom(conn, $comT.codJflav) +then + modify($comT) {setResponsabileCom($responsabileCom)} +end + +rule "completeTipoAnag" +when + eval(checkRulesEnabled == 0) + $comT : JtbComt(codAnag != null) + $tipoAnag: java.lang.String() from CommesseRules.completeTipoAnag(conn, $comT.codAnag) +then + modify($comT) {setTipoAnag($tipoAnag)} +end + +// RIGHE BUDGET +/* +rule "completeImportoBdg" +no-loop +when + eval(checkRulesEnabled == 0) + $bdg : JtbComBdg(importo!= 0 && percBdg !=0 ) + $importoBdg: java.math.BigDecimal() from CommesseRules.completeImportoBdg(conn, importo, percBdg) +then + modify($bdg) {setImportoBdg($importoBdg)} +end + +rule "completePercBdg" +no-loop +when + eval(checkRulesEnabled == 0) + $bdg : JtbComBdg(importo!= 0 && importoBdg !=0 ) + $importoBdg: java.math.BigDecimal() from CommesseRules.completePercBdg(conn, importo, importoBdg) +then + modify($bdg) {setPercBdg($percBdg)} +end +*/ diff --git a/ems-core/src/main/resources/rules/commons.drl b/ems-core/src/main/resources/rules/commons.drl new file mode 100644 index 0000000000..f750722783 --- /dev/null +++ b/ems-core/src/main/resources/rules/commons.drl @@ -0,0 +1,240 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global String postRulesEnabled +global Integer checkRulesEnabled + +rule "completeIdRilPrz" +when + eval(checkRulesEnabled == 0) + $entity : VtbRilPrzt(idRil == null || idRil == 0) + $idRil: java.lang.Integer() from CommonRules.completeIdRilPrz(conn, $entity.dataRil) +then + modify ( $entity ) { setIdRil($idRil) } +end + +rule "completeCodDivisaContAndCambioDivisaCont" +no-loop +when + eval(checkRulesEnabled == 0) + (JtbRLavt(codDiviCont == null || cambioDiviCont == null, $entityFind : this) or + JtbRLavr(codDiviCont == null || cambioDiviCont == null, $entityFind : this) or + + GtbSpes(codDiviCont == null || cambioDiviCont == null, $entityFind : this) or + GtbTipiPaga(codDiviCont == null || cambioDiviCont == null, $entityFind : this) or + + MtbPartitaMag(codDiviCont == null || cambioDiviCont == null, $entityFind : this) or + VtbArti(codDiviCont == null || cambioDiviCont == null, $entityFind : this) or + MtbSpes(codDiviCont == null || cambioDiviCont == null, $entityFind : this) or + JtbCicl(codDiviCont == null || cambioDiviCont == null, $entityFind : this) + ) + + $entity : EntityBase() from $entityFind + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + Double cambio = new Double($t.get("cambio").toString()); + String[] fields = new String[]{"codDiviCont", "cambioDiviCont"}; + DroolsUtil.completeEntity($entity, fields, $t.get("cod_divi_contab").toString(), cambio); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeGestioneDoc" +when + eval(checkRulesEnabled == 0) + $docT : DtbDoct(gestione == null && codDtip != null) + $gestione: java.lang.String() from CommonRules.getGestione(conn, $docT.codDtip) +then + modify ( $docT ) { setGestione($gestione) } +end + + +rule "completeGestioneDocWeb" +when + eval(checkRulesEnabled == 0) + $docT : WdtbDoct(gestione == null && codDtip != null) + $gestione: java.lang.String() from CommonRules.getGestione(conn, $docT.codDtip) +then + modify ( $docT ) { setGestione($gestione) } +end + +rule "completeOnlyCodDivi" +no-loop +when + eval(checkRulesEnabled == 0) + (WdtbOrdt(codDivi == null, $entityFind : this) or + NtbDoct(codDivi == null, $entityFind : this) + ) + $entity : EntityBase() from $entityFind + $t: java.util.Map() from CommonRules.completeCodDiviCont(conn) +then + String[] fields = new String[]{"codDivi"}; + DroolsUtil.completeEntity($entity, fields, $t.get("cod_divi_contab").toString()); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeCodDivisaAndCambioDivisa" +no-loop +when + eval(checkRulesEnabled == 0) + (VtbList(codDivi == null || cambio == null, $entityFind : this) ) + + $entity : EntityBase() from $entityFind + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + BigDecimal cambio = new BigDecimal($t.get("cambio").toString()); + String[] fields = new String[]{"codDivi", "cambio"}; + DroolsUtil.completeEntity($entity, fields, $t.get("cod_divi_contab").toString(), cambio); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeCodDiviCarArt" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbAart(codDiviCar == null || cambioDiviCar == null) + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + BigDecimal cambio = new BigDecimal($t.get("cambio").toString()); + String[] fields = new String[]{"codDiviCar", "cambioDiviCar"}; + DroolsUtil.completeEntity($entity, fields, $t.get("cod_divi_contab").toString(), cambio); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeInsMarchio" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbAart(marchio != null && mtbAartMarchio == null && operation != OperationType.DELETE) +then + CommonRules.insMarchio(conn, $entity); + //LongBitMask bitMask = DroolsUtil.getLongBitMask(); + //update($entity, bitMask, $entity.getClass()); +end + +rule "completeInsEqui" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbAart(idArtEqui != null && operation != OperationType.DELETE) +then + CommonRules.insEqui(conn, $entity); + //LongBitMask bitMask = DroolsUtil.getLongBitMask(); + //update($entity, bitMask, $entity.getClass()); +end + +rule "completeCodDiviScarArt" +no-loop +when + eval(checkRulesEnabled == 0) + MtbAart(codDiviScar == null || cambioDiviScar == null, $entityFind : this) + + $entity : EntityBase() from $entityFind + $t: java.util.Map() from CommonRules.completeCodDivi(conn) +then + BigDecimal cambio = new BigDecimal($t.get("cambio").toString()); + String[] fields = new String[]{"codDiviScar", "cambioDiviScar"}; + DroolsUtil.completeEntity($entity, fields, $t.get("cod_divi_contab").toString(), cambio); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeFlagKitArt" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbAart(flagKit == null ) + $flagKit : String() from CommonRules.completeFlagKitArt(conn, $entity.codMart) +then + modify ( $entity ) { setFlagKit($flagKit) } +end + +rule "completeArticoloComposto" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbAart(flagKit == "N" && articoloComposto == "S" ) +then + modify ( $entity ) { setArticoloComposto("N") } +end + +rule "completeDescrizione" +no-loop +when + eval(checkRulesEnabled == 0) + (NtbDocr(descrizione == null && codMart != null, $entityFind : this) or + WdtbOrdr(descrizione == null && codMart != null, $entityFind : this)) + $entity : EntityBase() from $entityFind + $t: java.util.Map() from CommonRules.completeDescrizione(conn, $entity) +then + String[] fields = new String[]{"descrizione", "descrizioneEstesa"}; + DroolsUtil.completeEntity($entity, fields, $t.get("descrizione"), $t.get("descrizione_estesa")); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeQtaCnf" +when + eval(checkRulesEnabled == 0) + (MtbColr(qtaCnf == null && codMart != null, $entityFind : this) or + MtbPartitaMag(qtaCnf == null && codMart != null, $entityFind : this)) + + $entity : EntityBase() from $entityFind + $value: BigDecimal() from CommonRules.completeQtaCnf(conn, $entity) +then + //modify ( $ordR ) { setQtaCnf($value) } + String[] fields = new String[]{"qtaCnf"}; + DroolsUtil.completeEntity($entity, fields, $value); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeRapConv" +when + eval(checkRulesEnabled == 0) + (MtbLisa(rapConv == null && codMart != null && untMisAcq != null, $entityFind : this) ) + + $entity : EntityBase() from $entityFind + $rapConv: java.math.BigDecimal() from CommonRules.completeRapConv(conn, $entity) +then + String[] fields = new String[]{"rapConv"}; + DroolsUtil.completeEntity($entity, fields, $rapConv); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeUntMis" +when + eval(checkRulesEnabled == 0) + NtbDocr(untMis == null && codMart != null, $entity : this) + $untMis: java.lang.String() from CommonRules.completeUntMis(conn, $entity.codMart) +then + modify ( $entity ) { setUntMis($untMis) } +end + +rule "completeDescrEstesaArt" +when + eval(checkRulesEnabled == 0) + $entity : MtbAart(descrizioneEstesa == null && descrizione != null && operation == OperationType.INSERT ) +then + modify ( $entity ) { setDescrizioneEstesa($entity.getDescrizione()) } +end +rule "completeDataUltVar" +when + eval(checkRulesEnabled == 0) + $entity : MtbAart(dataUltVar == null && operation == OperationType.INSERT) +then + modify ( $entity ) { setDataUltVar(new Date()) } +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/config_activity.drl b/ems-core/src/main/resources/rules/config_activity.drl new file mode 100644 index 0000000000..2a79cc4c2a --- /dev/null +++ b/ems-core/src/main/resources/rules/config_activity.drl @@ -0,0 +1,70 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global String postRulesEnabled +global Integer checkRulesEnabled + +//ATTIVITA +rule "completeActivityId" +when + eval(checkRulesEnabled == 0) + StbActivity(activityId == null, $entity : this) + $activityId: java.lang.String() from ConfigActivityRules.completeActivityId(conn) +then + modify ( $entity ) { setActivityId($activityId) } +end + +rule "completeCodJfas" +no-loop +when + eval(checkRulesEnabled == 0) + StbActivity(codJfas == null && activityTypeId != null && flagTipologia != null, $entity : this) + $codJfas: java.lang.String() from ConfigActivityRules.completeCodJFasAct(conn, $entity.activityTypeId, $entity.flagTipologia) +then + modify ( $entity ) { setCodJfas($codJfas) } +end + +rule "completeDataInsAct" +when + eval(checkRulesEnabled == 0) + StbActivity(dataInsAct == null, $entity : this) + $dataInsAct: java.util.Date() from ConfigActivityRules.completeDataInsAct(conn, $entity.oraInsAct) +then + modify ( $entity ) { setDataInsAct($dataInsAct) } +end + +rule "completeEffectiveEndtime" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : StbActivity(effectiveEndtime == null && effectiveTime != null) +then + modify ( $entity ) { setEffectiveEndtime($entity.getEffectiveTime()) } +end + +rule "completeEstimatedEnddtime" +no-loop +when + eval(checkRulesEnabled == 0) + StbActivity(estimatedEndtime == null && activityTypeId != null && flagTipologia != null && estimatedTime != null, $entity : this) + $estimatedEndtime: java.util.Date() from ConfigActivityRules.completeEstimatedEnddtime(conn, $entity.activityTypeId, $entity.flagTipologia, $entity.estimatedTime) +then + modify ( $entity ) { setEstimatedEndtime($estimatedEndtime) } +end + +rule "completeActivityFileOriginalSize" +when + eval(checkRulesEnabled == 0) + StbActivityFile(originalSize == null, $entity : this) +then + ConfigActivityRules.completeActivityFileOriginalSize($entity); +end diff --git a/ems-core/src/main/resources/rules/document.drl b/ems-core/src/main/resources/rules/document.drl new file mode 100644 index 0000000000..d7f55b17ff --- /dev/null +++ b/ems-core/src/main/resources/rules/document.drl @@ -0,0 +1,29 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global Integer checkRulesEnabled + +rule "completeTipiDoc1" +when + eval(checkRulesEnabled == 0) + $dTip : DtbTipi(tipoEmissione=="DIFFERITA") +then + modify ( $dTip ) { setFlagGiornaleMag("N") } +end + +rule "completeTipiDoc2" +when + eval(checkRulesEnabled == 0) + $dTip : DtbTipi(gestione != "A") +then + modify ( $dTip ) { setAggiornaList("N") } +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/inventari.drl b/ems-core/src/main/resources/rules/inventari.drl new file mode 100644 index 0000000000..4e9108edf5 --- /dev/null +++ b/ems-core/src/main/resources/rules/inventari.drl @@ -0,0 +1,93 @@ +package it.integry.rules + +import java.sql.Connection + +global Connection conn +global String username +global String applicationName +global String postRulesEnabled +global Integer checkRulesEnabled + +//INVENTARIO TESTATA +rule "completeIdInventario" +when + eval(checkRulesEnabled == 0) + $invT : MtbInvent((idInventario == null || idInventario== 0) && codMdep != null ) + $id: java.lang.Integer() from InventariRules.completeIdInventario(conn, $invT.codMdep) +then + modify($invT){setIdInventario($id)} +end + +rule "completeInseritoDa" +when + eval(checkRulesEnabled == 0) + $invT : MtbInvent(inseritoDa == null && operation == OperationType.INSERT) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ($invT) { setInseritoDa($fullName) } +end + +// INVENTARIO RIGHE +rule "completeCostoInv" +when + eval(checkRulesEnabled == 0) + $invR : MtbInvenr(costoInv == null && codMart != null) + $costo: java.math.BigDecimal() from InventariRules.completeCostoInv(conn, $invR) +then + modify ($invR) { setCostoInv($costo) } +end + +rule "completeNumConfInv" +when + eval(checkRulesEnabled == 0) + $invR : MtbInvenr(numConf == null && codMart != null ) + $numConf: java.math.BigDecimal() from InventariRules.completeNumConf(conn, $invR.getCodMart(), $invR.getQtaInv() ) +then + modify ($invR) { setNumConf($numConf) } +end + +rule "completeCodMartInv" +no-loop +when + eval(checkRulesEnabled == 0) + $invR : MtbInvenr( codMart == null && scanCodBarre != null && !InventariRules.barCodeCheck(conn, scanCodBarre) && applicationName == "WINGEST" ) + $codMart: String() from InventariRules.completeCodMart(conn, $invR.getScanCodBarre()) +then + modify ( $invR ) { setCodMart( $codMart ) } +end + + +rule "completeCodMartInvTx" +no-loop +when + eval(checkRulesEnabled == 0) + $invR : MtbInvenr( codMart == null && scanCodBarre != null && !InventariRules.barCodeCheck(conn, scanCodBarre) && applicationName == "TEXTILES") + $t: java.util.Map() from InventariRules.completeCodMartTx(conn, $invR.getScanCodBarre()) +then + modify ( $invR ) { + setCodMart( $t.get("cod_mart").toString() ), + setCodCol( $t.get("cod_col").toString() ), + setCodTagl( $t.get("cod_tagl").toString() ) + } +end + +rule "completeParitaMagInventario" +no-loop +when + eval(checkRulesEnabled == 0) + $invR : MtbInvenr( codMart != null && partitaMag != null && mtbPartitaMag == null) + $partita: MtbPartitaMag() from PackagesRules.completePartitaMag($invR.codMart, $invR.partitaMag, $invR.dataScadPartitaMag) +then + modify ( $invR ) { setMtbPartitaMag($partita) } +end +/* +rule "checkBarCodeInv"\ +no-loop +when + eval(checkRulesEnabled == 1) + $invR : MtbInvenr(scanCodBarre != null ) + eval(InventariRules.barCodeCheck(conn, $invR.getScanCodBarre())) +then + throw new CheckConstraintException("Attezione!codice a Barre " + $invR.getScanCodBarre() + " non esiste. "); +end +*/ diff --git a/ems-core/src/main/resources/rules/logistic.drl b/ems-core/src/main/resources/rules/logistic.drl new file mode 100644 index 0000000000..58c980a2fa --- /dev/null +++ b/ems-core/src/main/resources/rules/logistic.drl @@ -0,0 +1,143 @@ +package it.integry.rules + +import it.integry.ems.entity.* +import it.integry.ems.types.OperationType +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection +import java.util.Date + +global Connection conn +global Integer checkRulesEnabled + +//PACKAGES TESTATE +rule "completeCodVlis" +salience 10 +when + eval(checkRulesEnabled == 0) + $packages: MtbColt(codVlis == null && codAnag != null && gestione == "V") + $t: java.util.Map() from PackagesRules.completeCodVlis(conn, $packages.codAnag, $packages.codVdes) +then + modify ( $packages ) { setCodVlis($t.get("cod_vlis_clie").toString()) } +end + +rule "completeSegno" +salience 10 +when + eval(checkRulesEnabled == 0) + $packages: MtbColt(segno == null && gestione != null) + $val: java.lang.Integer() from PackagesRules.completeSegno($packages.gestione) +then + modify ( $packages ) { setSegno($val) } +end + +rule "completeSerCollo" +when + eval(checkRulesEnabled == 0) + $packages: MtbColt(serCollo == null) + $serCollo: String() from PackagesRules.completeWithDefault(MtbColt.class, "serCollo") +then + modify ( $packages ) { setSerCollo($serCollo) } +end + +rule "completeDataCollo" +when + eval(checkRulesEnabled == 0) + $packages: MtbColt(dataCollo == null) + $dataCollo: java.util.Date() from PackagesRules.completeWithDefault(MtbColt.class, "dataCollo") +then + modify ( $packages ) { setDataCollo($dataCollo) } +end + +rule "completeNumCollo" +salience 9 +when + eval(checkRulesEnabled == 0) + $packages: MtbColt((numCollo == null || numCollo == 0) && serCollo != null && dataCollo != null && gestione != null) + $val: java.lang.Integer() from PackagesRules.completeNumCollo(conn, $packages.serCollo, $packages.dataCollo, $packages.gestione) +then + modify ( $packages ) { setNumCollo($val) } +end + +//PARTITA MAG +rule "completeRapConv2e3Partita" +no-loop +when + eval(checkRulesEnabled == 0) + + $lotto: MtbPartitaMag((rapConv2 == null || rapConv3 == null) && codMart != null) + $t: java.util.Map() from PartitaMagRules.completeRapConv2e3(conn, $lotto.codMart) +then + BigDecimal rapConv2 = new BigDecimal($t.get("rap_conv2").toString()); + BigDecimal rapConv3 = new BigDecimal($t.get("rap_conv3").toString()); + modify ( $lotto ) { setRapConv2(rapConv2) } + modify ( $lotto ) { setRapConv3(rapConv3) } +end + +/* +rule "completeBarcodePartita" +no-loop +when + eval(checkRulesEnabled == 0) + $lotto: MtbPartitaMag(barcode == null && codMart != null) + $t: java.util.Map() from CommonRules.completeCodBarre(conn, $lotto.codMart) +then + modify ( $lotto ) { setBarcode($t.get("cod_barre").toString()) } +end +*/ +//PACKAGES RIGHE + +rule "completeDescPartitaMag" +when + eval(checkRulesEnabled == 0) + $row: MtbColr(rifPartitaMag != null && mtbPartitaMag_descrizione != null) +then + PackagesRules.completeDescPartitaMag($row.getRifPartitaMag(), $row.getMtbPartitaMag_descrizione()); +end + +rule "completePartitaMagAcquisto" +when + eval(checkRulesEnabled == 0) + $row: MtbColr(rifPartitaMag == null && gestione == 'A' && partitaMag != null) + $partita: MtbPartitaMag() from PackagesRules.completePartitaMag($row.codMart, $row.partitaMag, $row.dataScadPartita) +then + modify ( $row ) { setRifPartitaMag($partita) } +end + +rule "completePartitaMagLavoraz" +when + eval(checkRulesEnabled == 0) + $row: MtbColr(rifPartitaMag == null && gestione == 'L' && partitaMag != null) + $partita: MtbPartitaMag() from PackagesRules.completePartitaMag($row.codMart, $row.partitaMag, $row.dataScadPartita) +then + modify ( $row ) { setRifPartitaMag($partita) } +end + +/*rule "completePartitaMagVendita" +when + eval(checkRulesEnabled == 0) + $row: MtbColr(rifPartitaMag == null && gestione == 'V' && partitaMag != null) + $partita: MtbPartitaMag() from PackagesRules.completePartitaMag($row.codMart, $row.partitaMag, $row.dataScadPartita) +then + modify ( $row ) { setRifPartitaMag($partita) } +end*/ + + +rule "completeBarCodeColli" +no-loop +when + eval(checkRulesEnabled == 0) + $row: MtbColr(codBarre == null && codMart != null) + $t: java.util.Map() from CommonRules.completeCodBarre(conn, $row.codMart) +then + modify ( $row ) { setCodBarre($t.get("cod_barre").toString()) } +end + +rule "completeRiga" +when + eval(checkRulesEnabled == 0) + $row: MtbColr(riga == null && operation == OperationType.APPEND && serCollo != null && dataCollo != null && gestione != null) + $dato: java.lang.Integer() from PackagesRules.completeRiga(conn, $row.gestione, $row.dataCollo, $row.numCollo, $row.serCollo) +then + modify ( $row ) { setRiga($dato) } +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/post_calc.drl b/ems-core/src/main/resources/rules/post_calc.drl new file mode 100644 index 0000000000..4a13b13d8a --- /dev/null +++ b/ems-core/src/main/resources/rules/post_calc.drl @@ -0,0 +1,377 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection +import it.integry.ems.exception.CheckConstraintException + +global Connection conn +global String username +global String postRulesEnabled +global Integer checkRulesEnabled + +//ATTENZIONE regola più specifica, applicata prima delle altre +/*rule "completeCalcTotaliOrdWeb" +no-loop +when + eval(postRulesEnabled == "true") + $ordT: WdtbOrdt() + eval($ordT.getExecuteRecalc() == true) + $list: java.util.ArrayList() from collect(WdtbOrdr() from CommonRules.reloadRow(conn, $ordT)) + $listRow: java.util.ArrayList() from collect(WdtbOrdr() from CommonRules.calcPercAliq(conn, $list)) + //accumulate($ordR : WdtbOrdr() from $list; + //$imponib : customAccumulate($ordR), + //$totIva : customAccumulate($ordR)) + + //accumulate($ordR : WdtbOrdr(percAliq != null) from $listRow; + // $imponib : sum($ordR.getImportoRiga()*(1-$ordT.getSconto3()/100)), + // $totIva : sum($ordR.getImportoRiga()*(1-$ordT.getSconto3()/100)*($ordR.getPercAliq()/100))) + + //$imponibTrunc : Double() from CommonRules.roundValue(conn, $imponib, $ordT.codDivi) + //$totIvaTrunc : Double() from CommonRules.roundValue(conn, $totIva, $ordT.codDivi) + +then + //modify ( $ordT ) { + // setTotImponib($imponibTrunc), + // setTotIva($totIvaTrunc) + //} + DocOrdRules.calcTotali(conn, $ordT, $listRow); +end */ + +rule "completeCalcTotaliOrdWeb" +no-loop +when + eval(postRulesEnabled == "true") + $testata: WdtbOrdt() +then + CommonRules.reloadRow(conn, $testata); + DocOrdRules.calcTotali(conn, $testata); +end + +//ANNULLAMENTO RICALCOLO TOTALI ORDINI PRODUZIONE +rule "annullamentoCalcTotaliOrdP" +no-loop +when + eval(postRulesEnabled == "true") + $ordT : DtbOrdt(executeRecalc == true && gestione == "A" && gestioneRif != null) +then + modify ( $ordT ) { setExecuteRecalc(false) } +end + +rule "completeIdRigOrdProd" +no-loop +when + eval(postRulesEnabled == "true") + $ordT: DtbOrdt(gestione == "A" && gestioneRif != null) + $entity : EntityBase() from $ordT + + $list: java.util.ArrayList() from collect(EntityBase() from $ordT.dtbOrdr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigOrdLav" +no-loop +when + eval(postRulesEnabled == "true") + $ordT: DtbOrdt(gestione == "L") + $entity : EntityBase() from $ordT + + $list: java.util.ArrayList() from collect(EntityBase() from $ordT.dtbOrdr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeCalcTotaliOrd" +no-loop +when + eval(postRulesEnabled == "true") + $testata: DtbOrdt(executeRecalc == true && gestione != null) +then + CommonRules.reloadRow(conn, $testata); + DocOrdRules.calcTotali(conn, $testata); +end + +rule "completeCalcTotaliDoc" +no-loop +when + eval(postRulesEnabled == "true") + $testata: DtbDoct(executeRecalc == true) +then + CommonRules.reloadRow(conn, $testata); + DocOrdRules.calcTotali(conn, $testata); +end + +rule "completeCalcTotaliDocWeb" +no-loop +when + eval(postRulesEnabled == "true") + $testata: WdtbDoct(executeRecalc == true) + +then + CommonRules.reloadRow(conn, $testata); + DocOrdRules.calcTotali(conn, $testata); +end + +rule "completeIdArt" +no-loop +when + eval(postRulesEnabled == "true") + $ordT: WdtbOrdt() + //controllo su idArt non presente poichè è applicato il default + $list: java.util.ArrayList() from collect(WdtbOrdr(codMart != null) from $ordT.wdtbOrdr) +then + OrdWebRules.completeIdArtOrd(conn, $list); +end + +rule "completeIdRigaVett" +no-loop +when + eval(postRulesEnabled == "true") + $vetT: VtbVett() + $entity : EntityBase() from $vetT + + $list: java.util.ArrayList() from collect(EntityBase() from $vetT.vtbVetr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigaArtLink" +no-loop +when + eval(postRulesEnabled == "true") + $mtbAart: MtbAart() + $entity : EntityBase() from $mtbAart + + $list: java.util.ArrayList() from collect(EntityBase() from $mtbAart.mtbAartLink) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigaCtbMov" +no-loop +when + eval(postRulesEnabled == "true") + $ctbMovt: CtbMovt() + $entity : EntityBase() from $ctbMovt + + $list: java.util.ArrayList() from collect(EntityBase() from $ctbMovt.ctbMovr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigaJtbOff" +no-loop +when + eval(postRulesEnabled == "true") + $jtbOff: JtbOfft() + $entity : EntityBase() from $jtbOff + + $list: java.util.ArrayList() from collect(EntityBase() from $jtbOff.jtbOffr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigaInvent" +no-loop +when + eval(postRulesEnabled == "true") + $invent: MtbInvent() + $entity : EntityBase() from $invent + + $list: java.util.ArrayList() from collect(EntityBase() from $invent.mtbInvenr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigaVtbAuto" +no-loop +when + eval(postRulesEnabled == "true") + $auto: VtbAuto() + $entity : EntityBase() from $auto + + $list: java.util.ArrayList() from collect(EntityBase() from $auto.vtbAutoScad) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigaCol" +no-loop +when + eval(postRulesEnabled == "true") + $colT: MtbColt() + $entity : EntityBase() from $colT + + $list: java.util.ArrayList() from collect(EntityBase() from $colT.mtbColr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigaJtbRlav" +no-loop +when + eval(postRulesEnabled == "true") + $jtbRlavt: JtbRLavt() + $entity : EntityBase() from $jtbRlavt + + $list: java.util.ArrayList() from collect(EntityBase() from $jtbRlavt.jtbRlavr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigaReceipts" +no-loop +when + eval(postRulesEnabled == "true") + $receipts: NtbDoct() + $entity : EntityBase() from $receipts + + $listR: java.util.ArrayList() from collect(EntityBase() from $receipts.ntbDocr) + $listP: java.util.ArrayList() from collect(EntityBase() from $receipts.ntbDocp) +then + CommonRules.completeIdRigaEntity(conn, $listR, $entity); + CommonRules.completeIdRigaEntity(conn, $listP, $entity); +end + +rule "completeIdRigaJtbSchedaCq" +no-loop +when + eval(postRulesEnabled == "true") + $jtbSchedaCq: JtbSchedaCq() + $list: java.util.ArrayList() from collect(JtbSchedaCqr() from $jtbSchedaCq.jtbSchedaCqr) +then + CommonRules.completeIdRigaJtbSchedaCq(conn, $jtbSchedaCq.getCodCq(), $list); +end + +rule "completeActivityIdChild" +no-loop +when + eval(postRulesEnabled == "true") + StbActivity(activityId != null, $entity : this) +then + CommonRules.completeActivityIdChild($entity); +end + +rule "completeIdRigaDist" +no-loop +when + eval(postRulesEnabled == "true") + $distinta: JtbCicl() + $entity : EntityBase() from $distinta + + $listMate: java.util.ArrayList() from collect(EntityBase() from $distinta.jtbDistMate) + $listClavInd: java.util.ArrayList() from collect(EntityBase() from $distinta.jtbDistClavInd) + $listCiclCq: java.util.ArrayList() from collect(EntityBase() from $distinta.jtbCiclCq) + $listClavDir: java.util.ArrayList() from collect(JtbDistClavDir(idRiga == null && codJfas == null) from $distinta.jtbDistClavDir) + +then + CommonRules.completeIdRigaEntity(conn, $listMate, $entity); + CommonRules.completeIdRigaEntity(conn, $listCiclCq, $entity); + CommonRules.completeIdRigaEntity(conn, $listClavInd, $entity); + CommonRules.completeIdRigaEntity(conn, $listClavDir, $entity); +end + +rule "completeIdRigaClavDirDett" +no-loop +when + eval(postRulesEnabled == "true") + + $clavDir: JtbDistClavDir(idRiga != null) + $entity : EntityBase() from $clavDir + $listClavDirDett: java.util.ArrayList() from collect(EntityBase() from $clavDir.jtbDistClavDirDett) +then + CommonRules.completeIdRigaEntity(conn, $listClavDirDett, $entity); +end + +rule "completeIdRigaCtbMovi" +no-loop +when + eval(postRulesEnabled == "true") + $ctbMovt: CtbMovt() + $entity : EntityBase() from $ctbMovt + + $list: java.util.ArrayList(size > 0) from collect(EntityBase() from $ctbMovt.ctbMovi) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeRigaCtbMovr" +no-loop +when + eval(postRulesEnabled == "true") + $ctbMovt: CtbMovt() + $entity : EntityBase() from $ctbMovt + + $list: java.util.ArrayList(size > 0) from collect(EntityBase() from $ctbMovt.ctbMovr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + +rule "completeIdRigaCtbMovr" +no-loop +when + eval(postRulesEnabled == "true") + $ctbMovt: CtbMovt() + $entity : EntityBase() from $ctbMovt + + $list: java.util.ArrayList(size > 0) from collect(EntityBase() from $ctbMovt.ctbMovr) +then + CommonRules.completeIdRigaCtbMovr(conn, $list); +end + +rule "completeIdRigaCoan" +no-loop +when + eval(postRulesEnabled == "true") + $ctbMovr: CtbMovr() + $entity : EntityBase() from $ctbMovr + + $list: java.util.ArrayList(size > 0) from collect(EntityBase() from $ctbMovr.ctbMovrCoan) +then + CommonRules.completeIdRigaCtbMovrCoan(conn, $list, $entity); +end + +rule "completeRigaNoteAnag" +no-loop +when + eval(postRulesEnabled == "true") + $anag: GtbAnag() + $entity : EntityBase() from $anag + + $listAnagNote: java.util.ArrayList() from collect(EntityBase() from $anag.gtbAnagNote) +then + CommonRules.completeIdRigaEntity(conn, $listAnagNote, $entity); +end + +rule "completeIdRigaCommesse" +no-loop +when + eval(postRulesEnabled == "true") + $comT : JtbComt() + $entity : EntityBase() from $comT + + $listJcomImporti: java.util.ArrayList() from collect(EntityBase() from $comT.jtbComImporti) + $listJcomCostoStd: java.util.ArrayList() from collect(EntityBase() from $comT.jtbComCostoStd) +then + CommonRules.completeIdRigaEntity(conn, $listJcomImporti, $entity); + CommonRules.completeIdRigaEntity(conn, $listJcomCostoStd, $entity); +end + +rule "completeIdRigaAtbSchedaAccr" +no-loop +when + eval(postRulesEnabled == "true") + $atbSchedaAcct: AtbSchedaAcct() + $entity : EntityBase() from $atbSchedaAcct + + $list: java.util.ArrayList() from collect(EntityBase() from $atbSchedaAcct.atbSchedaAccr) +then + CommonRules.completeIdRigaEntity(conn, $list, $entity); +end + + diff --git a/ems-core/src/main/resources/rules/production.drl b/ems-core/src/main/resources/rules/production.drl new file mode 100644 index 0000000000..3b8dbef124 --- /dev/null +++ b/ems-core/src/main/resources/rules/production.drl @@ -0,0 +1,62 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection +import java.util.Date + +global Connection conn +global String username +global String postRulesEnabled +global Integer checkRulesEnabled + +//LAVORATORI +rule "completeFlagAutorizza" +when + eval(checkRulesEnabled == 0) + $jtbFlavEven: JtbFlavEventi(flagAutorizza == null && codJcau != null) + $flag: java.lang.String() from ProductionsRules.completeFlagAutorizza(conn, $jtbFlavEven.codJcau) +then + modify ( $jtbFlavEven ) { setFlagAutorizza($flag) } +end + + +//RAPPORTINI LAVORO RIGHE +rule "completeCodJfasRapLav" +no-loop +when + eval(checkRulesEnabled == 0) + $rLavR: JtbRLavr(codJfas == null && codJflav != null) + $codJfas: String() from ProductionsRules.completeCodJfas(conn, $rLavR.codJflav) +then + modify ( $rLavR ) { setCodJfas($codJfas) } +end + +rule "completePercPaga" +no-loop +when + eval(checkRulesEnabled == 0) + $rLavT: JtbRLavt(percPaga == null && giustificativo != null) + $t: java.util.Map() from ProductionsRules.completePercPaga(conn, $rLavT.giustificativo) + $value: BigDecimal() from $t.get("perc_paga").toString() +then + modify ( $rLavT ) { setPercPaga($value) } +end + +//--------------------------------------------------------------------------------------------- + + +//MACCHINARI +rule "completeDescMacchinari" +when + eval(checkRulesEnabled == 0) + $vtbAmac: VtbAmac(descrizione == null && codMart != null) + $value: java.lang.String() from ProductionsRules.completeDescMacchinari(conn, $vtbAmac.codMart) +then + modify ( $vtbAmac ) { setDescrizione($value) } +end + diff --git a/ems-core/src/main/resources/rules/purchases.drl b/ems-core/src/main/resources/rules/purchases.drl new file mode 100644 index 0000000000..2103db3d67 --- /dev/null +++ b/ems-core/src/main/resources/rules/purchases.drl @@ -0,0 +1,181 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global String username +global String postRulesEnabled +global Integer checkRulesEnabled + +rule "completeTipoVariazioneGriglie" +when + eval(checkRulesEnabled == 0) + $griglie : AtbGriglieArt(tipoVariazione == null) + $variazione : String() from PurchasesRules.completeTipoVariazione(conn, $griglie) +then + modify ( $griglie ) { setTipoVariazione($variazione) } +end + +//LISTINI ACQUISTO +rule "completeCodDiviListAcq" +no-loop +when + eval(checkRulesEnabled == 0) + (AtbList(codDiviAcq == null, $entity : this) + // or + ) + + $t: java.util.Map() from CommonRules.completeCodDiviCont(conn) +then + modify ( $entity ) { setCodDiviAcq($t.get("cod_divi_contab").toString()) } +end + +rule "completeCodDiviListDataAcq" +when + eval(checkRulesEnabled == 0) + AtbListData(codDiviAcq == null && codAlis != null, $entity : this) + $codDiviAcq: String() from PurchasesRules.completeCodDiviListDataAcq(conn, $entity.codAlis) +then + modify ( $entity ) { setCodDiviAcq($codDiviAcq) } +end + +rule "completeVersioneAcq" +when + eval(checkRulesEnabled == 0) + (AtbListData(versione == null || versione == 0, $entity : this)) +then + PurchasesRules.completeVersioneAcq(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeCodMartLisa" +no-loop +when + eval(checkRulesEnabled == 0) + (MtbLisa(codMart == null && codAlis != null && codArtFor != null, $entity : this) + // or + ) + + $codMart: String() from PurchasesRules.completeCodMart(conn, $entity.codAlis, $entity.codArtFor) +then + modify ( $entity ) { setCodMart($codMart) } +end + +rule "completeDatiLisa" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: MtbLisaData((przAcq == null || przVenSug == null || valOneri == null || percOneri == null || valPromo == null || + percPromo == null || tipoVariazione == null || perc1 == null || perc2 == null || perc3 == null || perc4 == null ) && + ( operation == OperationType.INSERT || operation == OperationType.INSERT_OR_UPDATE)) +then + PurchasesRules.completeDatiLisa(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeDatiPromo" +no-loop +when + eval(checkRulesEnabled == 0) + AtbListData(dataFine != null, $entity : this) +then + PurchasesRules.completeDatiPromo(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeMtbLisa" +when + eval(checkRulesEnabled == 0) + $entity : MtbLisaData(operation != OperationType.DELETE) + $mtbLisa : MtbLisa() from PurchasesRules.completeMtbLisa($entity) +then + modify ( $entity ) { setMtbLisa($mtbLisa) } +end + +rule "completeCodPromo" +when + eval(checkRulesEnabled == 0) + $entity : AtbListData(codPromo == null && codAlis != null && dataFine != null && versione != null) + $codPromo : String() from PurchasesRules.completeCodPromo($entity.codAlis, $entity.versione) +then + modify ( $entity ) { setCodPromo($codPromo) } +end + +rule "completeInseritoDaLisa" +when + eval(checkRulesEnabled == 0) + $entity : AtbListData( inseritoDa == null && ( operation == OperationType.INSERT || operation == OperationType.INSERT_OR_UPDATE)) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $entity ) { setInseritoDa($fullName) } +end + +rule "completeModificatoDaLisaR" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbLisaData( modificatoDa == null ) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $entity ) { setModificatoDa($fullName) } +end + +rule "completeMtbLisaPromo" +when + eval(checkRulesEnabled == 0) + $entity : MtbLisaData((percPromo1 != null && percPromo1 != 0) || + (percPromo2 != null && percPromo2 != 0) || + (percPromo3 != null && percPromo3 != 0) || + (percPromo4 != null && percPromo4 != 0)) +then + PurchasesRules.completeMtbLisaPromo(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeCodArtForMtbLisa" +no-loop +when + eval(checkRulesEnabled == 0) + (MtbLisaData(codArtFor == null && codAlis != null && codMart != null, $entity : this) // or + // MtbLisa(codArtFor == null && codAlis != null && codMart != null, $entityFind : this) + ) + + //$entity : EntityBase() from $entityFind + $codArtFor: String() from PurchasesRules.completeCodArtFor(conn, $entity.codAlis, $entity.codMart) +then + modify ( $entity ) { setCodArtFor($codArtFor) } +end + +rule "completeTestataLisa" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : AtbListData((dataIniz == null || dataIns == null || inseritoDa == null) && codAlis != null && ( versione != null || versione != 0)) + +then + PurchasesRules.completeTestataLisa(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeModificatoDaLisa" +when + eval(checkRulesEnabled == 0) + $entity : AtbListData( operation != OperationType.DELETE ) + $fullName: String() from CommonRules.getFullName(conn, username) +then + modify ( $entity ) { + setDataMod(new Date()), + setModificatoDa($fullName) + } +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/retail.drl b/ems-core/src/main/resources/rules/retail.drl new file mode 100644 index 0000000000..89033ed72d --- /dev/null +++ b/ems-core/src/main/resources/rules/retail.drl @@ -0,0 +1,106 @@ +package it.integry.rules + +import it.integry.ems.entity.* +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import java.sql.Connection + +global Connection conn +global Integer checkRulesEnabled + +//SCONTRINI TESTATE +rule "completeInsertMtbDepoOper" +when + eval(checkRulesEnabled == 0) + $receipts: NtbDoct(codMdep != null && codOper != null) + $oper: it.integry.ems.entity.MtbDepoOper() from ReceiptRules.completeMtbDepoOper(conn, $receipts.codMdep, $receipts.codOper) +then + modify ( $receipts ) { setMtbDepoOper($oper) } +end + +rule "completeInsertMtbDepoCasse" +when + eval(checkRulesEnabled == 0) + $receipts: NtbDoct(codMdep != null && codCassa != null) + $casse: it.integry.ems.entity.MtbDepoCasse() from ReceiptRules.completeMtbDepoCasse(conn, $receipts.codMdep, $receipts.codCassa) +then + modify ( $receipts ) { setMtbDepoCasse($casse) } +end + +//SCONTRINI ROW +rule "completeBarCode" +salience 10 +no-loop +when + eval(checkRulesEnabled == 0) + $row: NtbDocr(barCode == null) + $t: java.util.Map() from CommonRules.completeCodBarreScontrini(conn, $row.codMart) +then + modify ( $row ) { setBarCode($t.get("cod_barre").toString()) } +end + +rule "completeCodMart" +salience 10 +no-loop +when + eval(checkRulesEnabled == 0) + $row: NtbDocr(codMart == null) + $t: java.util.Map() from ReceiptRules.completeCodMart(conn, $row.barCode) +then + modify ( $row ) { setCodMart($t.get("cod_mart").toString()) } +end + +rule "completeCodMartNonAnagrafato" +salience 9 +//lock-on-active true +no-loop +when + eval(checkRulesEnabled == 0) + $row: NtbDocr(codMart != null) + $conto: java.lang.Integer() from ReceiptRules.completeCodMartNonAnagrafato(conn, $row.codMart) +then + modify ( $row ) { setCodMart($conto > 0 ? $row.getCodMart() : null) } +end + +rule "completeCodAliq" +salience 9 +when + eval(checkRulesEnabled == 0) + $row: NtbDocr(codAliq == null) + $t: java.util.Map() from ReceiptRules.completeCodAliq(conn, $row.codMart) +then + modify ( $row ) { setCodAliq($t.get("cod_aliq").toString()) } +end + +rule "completeCosto" +salience 9 +when + eval(checkRulesEnabled == 0) + $row: NtbDocr(costo == null && codMart != null) + $dato: java.math.BigDecimal() from ReceiptRules.completeCosto(conn, $row.codMart) +then + modify ( $row ) { setCosto($dato) } +end + +rule "completePromozione" +salience 9 +no-loop +when + eval(checkRulesEnabled == 0) + $row: NtbDocr(promozione == null && codMart != null && codMdep != null && dataDoc != null) + $t: java.util.Map() from ReceiptRules.completePromozione(conn, $row.codMart, $row.codMdep, $row.dataDoc) +then + modify ( $row ) { setPromozione($t.get("cod_promo").toString()) } +end + +//SCONTRINI PAGAMENTI +rule "completeTipiInca" +no-loop +when + eval(checkRulesEnabled == 0) + $entity: NtbDocp(tipoInca != null && codMdep != null && operation != OperationType.DELETE) +then + ReceiptRules.insTipiInca(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end diff --git a/ems-core/src/main/resources/rules/sales.drl b/ems-core/src/main/resources/rules/sales.drl new file mode 100644 index 0000000000..1346cc967f --- /dev/null +++ b/ems-core/src/main/resources/rules/sales.drl @@ -0,0 +1,214 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import it.integry.ems.types.OperationType +import java.sql.Connection +import org.drools.core.util.bitmask.LongBitMask + +global Connection conn +global Integer checkRulesEnabled + +//PREMI +rule "completeIdRigaPremi" +when + eval(checkRulesEnabled == 0) + $lisvPremi : VtbListPremi(idRiga == null && codVlis != null, $entity : this) + + $idRiga : java.lang.Integer() from SalesRules.completeIdRigaPremi(conn, $lisvPremi.codVlis) +then + modify ( $lisvPremi ) { setIdRiga($idRiga) } +end + +//LISTINI VENDITA IN DATA + +rule "completeDataInizLisvData" +when + eval(checkRulesEnabled == 0) + $lisvData: VtbListData(dataIniz == null) + $dataIniz: Date() from PackagesRules.completeWithDefault(VtbListData.class, "dataIniz") +then + modify ( $lisvData ) { setDataIniz($dataIniz) } +end + +rule "completeRicarica" +no-loop +when + eval(checkRulesEnabled == 0) + $lisvData : VtbListData(ricarica == null && codVlis != null && dataIniz != null) + + $t: java.util.Map() from SalesRules.completeRicarica(conn, $lisvData.codVlis) +then + BigDecimal ricarica = new BigDecimal($t.get("ricarica").toString()); + modify ( $lisvData ) { setRicarica(ricarica) } +end + +//LISTINI VENDITA IN DATA +rule "completeRicaricaRow" +no-loop +when + eval(checkRulesEnabled == 0) + $lisvData : MtbLisvData(ricarica == null && codVlis != null && dataIniz != null && codMart != null) + + $t: java.util.Map() from SalesRules.completeRicaricaRow(conn, $lisvData.codVlis, $lisvData.codMart, $lisvData.dataIniz) +then + BigDecimal ricarica = new BigDecimal($t.get("ricarico").toString()); + modify ( $lisvData ) { setRicarica(ricarica) } +end + +rule "completeVersioneVend" +when + eval(checkRulesEnabled == 0) + (VtbListData((versione == null || versione == 0) && codVlis != null && dataIniz != null , $entity : this)) + + $versione: java.lang.Integer() from SalesRules.completeVersioneVend(conn, $entity ) +then + modify ( $entity ) { setVersione($versione) } +end + +rule "completeTipoVariazioneLisv" +when + eval(checkRulesEnabled == 0) + $entity : MtbLisvData(tipoVariazione == null && codVlis != null && codMart != null) + $tipoVariazione : java.lang.String() from SalesRules.completeTipoVariazione(conn, $entity) +then + modify ( $entity ) { setTipoVariazione($tipoVariazione) } +end + +rule "completeUntMisVen" +when + eval(checkRulesEnabled == 0) + $entity : MtbLisvData(untMisVen == null && codMart != null ) + $untMis: java.lang.String() from SalesRules.completeUntMisLisv(conn, $entity) +then + modify ( $entity ) { setUntMisVen($untMis) } +end + +rule "completeRapConvLisv" +when + eval(checkRulesEnabled == 0) + MtbLisvData(rapConv == null && codVlis != null && codMart != null && untMisVen != null, $entity : this) + $rapConv : java.math.BigDecimal() from SalesRules.completeRapConv(conn, $entity.getCodMart(), $entity.getUntMisVen()) +then + modify ( $entity ) { setRapConv($rapConv) } +end + +rule "completeDatiLisv" +salience -1 +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbLisvData(codMart != null && (operation == OperationType.INSERT || operation == OperationType.INSERT_OR_UPDATE) && applicationName == "WINGEST") +then + SalesRules.completeDatiLisv(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +//TODO DA RIVEDERE +rule "completeValOneri" +no-loop +when + eval(checkRulesEnabled == 0) + (MtbLisvData(valOneri == 0 && codMart != null, $entity : this)) + + $valOneri: java.math.BigDecimal() from SalesRules.completeValOneri(conn, $entity) +then + modify ( $entity ) { setValOneri($valOneri) } +end + + +rule "completeDataAggPrzVend" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbLisvData(codVlis != null && operation != OperationType.DELETE) +then + modify ( $entity ) { setDataAggPrz(new Date()) } +end + +rule "completeCodVlisRif" +no-loop +when + eval(checkRulesEnabled == 0) + (VtbListData(codVlisRif == null , $entity : this)) + $codVlisRif: java.lang.String() from SalesRules.completeCodVlisRif(conn, $entity.codVlis) +then + modify ( $entity ) { setCodVlisRif($codVlisRif) } +end + +rule "completePromoVend" +no-loop +when + eval(checkRulesEnabled == 0) + (VtbListData(codVlis != null && codPromo != null, $entity : this)) +then + SalesRules.completePromoVend(conn, $entity) ; +end + +rule "completePrzVend" +when + eval(checkRulesEnabled == 0) + $entity : MtbLisvData(przVend == null && przVendIva == null && codMart != null && applicationName == "WINGEST") + + $przVend : java.math.BigDecimal() from CommonRules.completePrzVend(conn, $entity) +then + modify ( $entity ) { setPrzVend($przVend) } +end + +rule "completeCodAliqLisv" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbLisvData(codAliq == null && codMart != null )$t: java.util.Map() from CommonRules.completeCodAliqSimple(conn, $entity.codMart) +then + String[] fields = new String[]{"codAliq"}; + DroolsUtil.completeEntity($entity, fields, $t.get("cod_aliq").toString()); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completePrzVendScorporo" +when + eval(checkRulesEnabled == 0) + $entity : MtbLisvData((przVend == null || przVend == 0) && codAliq != null && codMart != null && przVendIva != null && przVendIva != 0 ) + + $przVend : java.math.BigDecimal() from CommonRules.scorporoIva(conn, $entity.przVendIva, $entity.codAliq) +then + modify ( $entity ) { setPrzVend($przVend) } +end + + +rule "completePrzVendIva" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : MtbLisvData((przVendIva == null || przVendIva == 0) && codMart != null && przVend != null && applicationName == "WINGEST") + $przVendIva : java.math.BigDecimal() from CommonRules.completePrzVendIva(conn, $entity) +then + modify ( $entity ) { setPrzVendIva($przVendIva) } +end + +rule "completeTaglie" +when + eval(checkRulesEnabled == 0) + $entity : MtbLisvData(applicationName == "TEXTILES" && operation != OperationType.DELETE ) +then + SalesRules.completeTaglie(conn, $entity); + LongBitMask bitMask = DroolsUtil.getLongBitMask(); + update($entity, bitMask, $entity.getClass()); +end + +rule "completeDescrizioneGriglia" +no-loop +when + eval(checkRulesEnabled == 0) + $entity : VtbGriglia(descrizione == null && codGriglia != null) + $descrizione: java.lang.String() from SalesRules.completeDescrizioneGriglia(conn, $entity.codGriglia) +then + modify ( $entity ) { setDescrizione($descrizione) } +end \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/tabGenTextiles.drl b/ems-core/src/main/resources/rules/tabGenTextiles.drl new file mode 100644 index 0000000000..2c6614c5c7 --- /dev/null +++ b/ems-core/src/main/resources/rules/tabGenTextiles.drl @@ -0,0 +1,22 @@ +package it.integry.rules + +import java.math.* +import java.util.* +import it.integry.ems.entity.* +import it.integry.ems.base.EntityBase +import it.integry.ems.rules.util.* +import it.integry.ems.rules.completing.* +import it.integry.ems.types.OperationType +import java.sql.Connection +import org.drools.core.util.bitmask.LongBitMask + +global Connection conn +global Integer checkRulesEnabled + +rule "completeCommessaAnnoStag" +when + eval(checkRulesEnabled == 0) + $entity : TtbAnnoStag(codJcom == null) +then + TabGenTextiles.completeCommessaAnnoStag(conn, $entity); +end \ No newline at end of file diff --git a/ems-core/src/test/java/EntityTestDefaultVal.java b/ems-core/src/test/java/EntityTestDefaultVal.java new file mode 100644 index 0000000000..b97e1d018d --- /dev/null +++ b/ems-core/src/test/java/EntityTestDefaultVal.java @@ -0,0 +1,62 @@ + +import it.integry.ems.annotation.SqlField; +import it.integry.ems.base.EntityBase; +import it.integry.ems.base.EntityPropertyHolder; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +import java.io.File; +import java.io.FileInputStream; +import java.lang.reflect.Field; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.Set; + +import org.apache.commons.io.IOUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.reflections.Reflections; + +public class EntityTestDefaultVal { + + //private static final Logger logger = LogManager.getLogger(); + + private static String[] dlrs = { "commons.drl", "production.drl", "sales.drl", "retail.drl", + "logistic.drl", "accounting.drl", "config_activity.drl", "anag.drl", "document.drl", + "purchases.drl", "post_calc.drl", "check_cond.drl" }; + + public static void main(String[] args) throws Exception { + EntityPropertyHolder holder = new EntityPropertyHolder(); + holder.scanEntityFields(); + + Reflections reflections = new Reflections("it.integry.ems.entity"); + Set> clssList = reflections.getSubTypesOf(EntityBase.class); + + for (Class clazz : clssList) { + + Field[] fields = clazz.getDeclaredFields(); + for (Field field : fields) { + + SqlField sf = field.getAnnotation(SqlField.class); + if (sf!=null && !sf.defaultObjectValue().equals("")) { + String search = clazz.getSimpleName() + "(" + field.getName() + " == null"; + for (String drl : dlrs) { + if (clazz.getResource("/rules/" + drl) != null) { + File fileDRL = new File(clazz.getResource("/rules/" + drl).toURI()); + if (fileDRL.exists()) { + String fileString = IOUtils.toString(new FileInputStream(fileDRL)); + if (fileString.contains(search)) { + System.out.println(search + " on " + drl); + } + + } + } + } + } + } + } + } + +} diff --git a/ems-core/src/test/java/select.json b/ems-core/src/test/java/select.json new file mode 100644 index 0000000000..0b67aa2fb2 --- /dev/null +++ b/ems-core/src/test/java/select.json @@ -0,0 +1 @@ +{"type":"base","operation":"SELECT", "nativeSql":"select * from ctb_cont where cod_cmas='000'"} \ No newline at end of file diff --git a/ems-core/src/test/java/sync_ctb_cont.json b/ems-core/src/test/java/sync_ctb_cont.json new file mode 100644 index 0000000000..0c6d913464 --- /dev/null +++ b/ems-core/src/test/java/sync_ctb_cont.json @@ -0,0 +1 @@ +{"type":"ctb_cont","codCcon":"000111","codCmas":"001","codCgrp":"0","descrizione":"test","operation":"INSERT","saldoAtt":"0.00","flagContAnalit":"N","flagRiscontro":"N","percDed":"0.00"} \ No newline at end of file diff --git a/ems-document.iml b/ems-document.iml new file mode 100644 index 0000000000..418832e3f3 --- /dev/null +++ b/ems-document.iml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-document/.classpath b/ems-document/.classpath new file mode 100644 index 0000000000..d0324b4a0a --- /dev/null +++ b/ems-document/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-document/.project b/ems-document/.project new file mode 100644 index 0000000000..1fb5f839b8 --- /dev/null +++ b/ems-document/.project @@ -0,0 +1,36 @@ + + + shops + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/ems-document/.settings/org.eclipse.core.resources.prefs b/ems-document/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..365bbd6097 --- /dev/null +++ b/ems-document/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/ems-document/.settings/org.eclipse.jdt.core.prefs b/ems-document/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62a317c860 --- /dev/null +++ b/ems-document/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/ems-document/.settings/org.eclipse.m2e.core.prefs b/ems-document/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..14b697b7bb --- /dev/null +++ b/ems-document/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ems-document/.settings/org.eclipse.wst.common.component b/ems-document/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000000..ef69ea48f8 --- /dev/null +++ b/ems-document/.settings/org.eclipse.wst.common.component @@ -0,0 +1,6 @@ + + + + + + diff --git a/ems-document/.settings/org.eclipse.wst.common.project.facet.core.xml b/ems-document/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000000..74af154056 --- /dev/null +++ b/ems-document/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ems-document/.settings/org.eclipse.wst.validation.prefs b/ems-document/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000000..6f1cba68d5 --- /dev/null +++ b/ems-document/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/ems-document/pom.xml b/ems-document/pom.xml new file mode 100644 index 0000000000..e7eec153c8 --- /dev/null +++ b/ems-document/pom.xml @@ -0,0 +1,199 @@ + + 4.0.0 + + it.integry + ims + 1.0 + ../pom.xml + + it.integry.ims + ems-document + jar + + Ems Document + + + + + src/main/resources + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + ${java.version} + ${java.version} + + + + + + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + + xalan + xalan + 2.6.0 + provided + + + + commons-codec + commons-codec + 1.6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.xmlbeans + xmlbeans + 2.3.0 + provided + + + + + org.apache.axis + axis + 1.4 + + + javax.xml.rpc + javax.xml.rpc-api + 1.1.1 + + + commons-discovery + commons-discovery + 0.2 + + + commons-logging + commons-logging + 1.2 + + + javax.xml.soap + saaj-api + 1.3.5 + + + wsdl4j + wsdl4j + 1.6.3 + + + + org.apache.commons + commons-lang3 + 3.4 + provided + + + + com.google.guava + guava + ${guava.version} + provided + + + + + org.jboss.resteasy + resteasy-jaxrs + ${resteasy.version} + + + org.jboss.resteasy + resteasy-client + ${resteasy.version} + + + + org.springframework + spring-web + ${spring.version} + + + org.springframework + spring-webmvc + ${spring.version} + + + + it.integry.ims + ems-core + 1.0 + + + + com.ancientprogramming.fixedformat4j + fixedformat4j + 1.4.0-SNAPSHOT + provided + + + + Racchiude il modulo che gestisce Documenti, Ordini, contabilità + diff --git a/ems-document/src/main/java/it/integry/ems/document/controller/DocumentController.java b/ems-document/src/main/java/it/integry/ems/document/controller/DocumentController.java new file mode 100644 index 0000000000..cf69871888 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/controller/DocumentController.java @@ -0,0 +1,90 @@ +package it.integry.ems.document.controller; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.document.service.DocumentService; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.response.EsitoType; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.response.StatusResponse; +import it.integry.ems.status.ServiceChecker; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Scope(value = "request") +@SuppressWarnings("finally") +public class DocumentController { + + private final Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties properties; + @Autowired + private DataSource ds; + @Autowired + private ServiceChecker serviceChecker; + @Autowired + private DocumentService documentService; + +// @RequestMapping(value = "/document/status", method = RequestMethod.GET) +// public @ResponseBody List status(HttpServletRequest request) { +// +// Method[] methods = DocumentController.class.getDeclaredMethods(); +// List list = serviceChecker.getServiceStatus(methods, DocumentController.class); +// +// return list; +// } + + @RequestMapping(value = EmsRestConstants.PATH_DOC_FROM_COLLI, method = RequestMethod.POST) + public @ResponseBody List importDocFromColli(HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestBody String xmlCollo){ + + List listResponse = new ArrayList(); + try{ + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + listResponse = documentService.importDocFromColli(xmlCollo); + } catch (Exception e) { + logger.error(e.toString()); + listResponse.add( new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e)); + } finally { + return listResponse; + } + } + + + @RequestMapping(value = EmsRestConstants.PATH_REG_MOV_CONT_DOC, method = RequestMethod.POST) + public @ResponseBody List regMovContFromDoc(HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestBody String xmlFilter){ + + List listResponse = new ArrayList(); + try{ + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + listResponse = documentService.regMovContFromDoc(xmlFilter); + } catch (Exception e) { + logger.error(e.toString()); + listResponse.add( new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e)); + } finally { + return listResponse; + } + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/EasySpedWSServiceImpl.java b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/EasySpedWSServiceImpl.java new file mode 100644 index 0000000000..bd9f1205d2 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/EasySpedWSServiceImpl.java @@ -0,0 +1,19 @@ +/** + * EasySpedWSServiceImpl.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package it.integry.ems.document.export.brt.easysped; + +import it.integry.ems.document.export.brt.easysped.ws.EasySpedDEWS; + + +public interface EasySpedWSServiceImpl extends javax.xml.rpc.Service { + public java.lang.String geteasyspedde_endpointAddress(); + + public EasySpedDEWS geteasyspedde_endpoint() throws javax.xml.rpc.ServiceException; + + public EasySpedDEWS geteasyspedde_endpoint(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/EasySpedWSServiceImplLocator.java b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/EasySpedWSServiceImplLocator.java new file mode 100644 index 0000000000..88da9d21ae --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/EasySpedWSServiceImplLocator.java @@ -0,0 +1,157 @@ +/** + * EasySpedWSServiceImplLocator.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package it.integry.ems.document.export.brt.easysped; + +import it.integry.ems.document.export.brt.easysped.ws.EasySpedDEWS; + + +public class EasySpedWSServiceImplLocator extends org.apache.axis.client.Service implements EasySpedWSServiceImpl { + + public EasySpedWSServiceImplLocator() { + } + + + public EasySpedWSServiceImplLocator(org.apache.axis.EngineConfiguration config) { + super(config); + } + + public EasySpedWSServiceImplLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException { + super(wsdlLoc, sName); + } + + // Use to get a proxy class for easyspedde_endpoint + private java.lang.String easyspedde_endpoint_address = "http://localhost:9005/easyspeddews"; + + public java.lang.String geteasyspedde_endpointAddress() { + return easyspedde_endpoint_address; + } + + // The WSDD service name defaults to the port name. + private java.lang.String easyspedde_endpointWSDDServiceName = "easyspedde_endpoint"; + + public java.lang.String geteasyspedde_endpointWSDDServiceName() { + return easyspedde_endpointWSDDServiceName; + } + + public void seteasyspedde_endpointWSDDServiceName(java.lang.String name) { + easyspedde_endpointWSDDServiceName = name; + } + + public EasySpedDEWS geteasyspedde_endpoint() throws javax.xml.rpc.ServiceException { + java.net.URL endpoint; + try { + endpoint = new java.net.URL(easyspedde_endpoint_address); + } + catch (java.net.MalformedURLException e) { + throw new javax.xml.rpc.ServiceException(e); + } + return geteasyspedde_endpoint(endpoint); + } + + public EasySpedDEWS geteasyspedde_endpoint(String endpointHost) throws javax.xml.rpc.ServiceException { + java.net.URL endpoint; + try { + easyspedde_endpoint_address = endpointHost; + endpoint = new java.net.URL(easyspedde_endpoint_address); + } + catch (java.net.MalformedURLException e) { + throw new javax.xml.rpc.ServiceException(e); + } + return geteasyspedde_endpoint(endpoint); + } + + public EasySpedDEWS geteasyspedde_endpoint(java.net.URL portAddress) throws javax.xml.rpc.ServiceException { + try { + Easyspedde_endpointStub _stub = new Easyspedde_endpointStub(portAddress, this); + _stub.setPortName(geteasyspedde_endpointWSDDServiceName()); + return _stub; + } + catch (org.apache.axis.AxisFault e) { + return null; + } + } + + public void seteasyspedde_endpointEndpointAddress(java.lang.String address) { + easyspedde_endpoint_address = address; + } + + /** + * For the given interface, get the stub implementation. + * If this service has no port for the given interface, + * then ServiceException is thrown. + */ + public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { + try { + if (EasySpedDEWS.class.isAssignableFrom(serviceEndpointInterface)) { + Easyspedde_endpointStub _stub = new Easyspedde_endpointStub(new java.net.URL(easyspedde_endpoint_address), this); + _stub.setPortName(geteasyspedde_endpointWSDDServiceName()); + return _stub; + } + } + catch (java.lang.Throwable t) { + throw new javax.xml.rpc.ServiceException(t); + } + throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); + } + + /** + * For the given interface, get the stub implementation. + * If this service has no port for the given interface, + * then ServiceException is thrown. + */ + public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { + if (portName == null) { + return getPort(serviceEndpointInterface); + } + java.lang.String inputPortName = portName.getLocalPart(); + if ("easyspedde_endpoint".equals(inputPortName)) { + return geteasyspedde_endpoint("localhost"); + } + else { + java.rmi.Remote _stub = getPort(serviceEndpointInterface); + ((org.apache.axis.client.Stub) _stub).setPortName(portName); + return _stub; + } + } + + public javax.xml.namespace.QName getServiceName() { + return new javax.xml.namespace.QName("http://tempuri.org/", "EasySpedWSServiceImpl"); + } + + private java.util.HashSet ports = null; + + public java.util.Iterator getPorts() { + if (ports == null) { + ports = new java.util.HashSet(); + ports.add(new javax.xml.namespace.QName("http://tempuri.org/", "easyspedde_endpoint")); + } + return ports.iterator(); + } + + /** + * Set the endpoint address for the specified port name. + */ + public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { + +if ("easyspedde_endpoint".equals(portName)) { + seteasyspedde_endpointEndpointAddress(address); + } + else +{ // Unknown Port Name + throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); + } + } + + /** + * Set the endpoint address for the specified port name. + */ + public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException { + setEndpointAddress(portName.getLocalPart(), address); + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/Easyspedde_endpointImpl.java b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/Easyspedde_endpointImpl.java new file mode 100644 index 0000000000..f1a3e112a0 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/Easyspedde_endpointImpl.java @@ -0,0 +1,32 @@ +/** + * Easyspedde_endpointImpl.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package it.integry.ems.document.export.brt.easysped; + +import it.integry.ems.document.export.brt.easysped.destination.DestinationAddress; +import it.integry.ems.document.export.brt.easysped.destination.DestinationAddressOut; +import it.integry.ems.document.export.brt.easysped.pdf.ArrayOfLabelToPrint; +import it.integry.ems.document.export.brt.easysped.ws.EasySpedDEWS; + +public class Easyspedde_endpointImpl implements EasySpedDEWS{ + public DestinationAddressOut calculateBRTSort(DestinationAddress address) throws java.rmi.RemoteException { + return null; + } + + public java.lang.String getLabelForZebraPrinter(ArrayOfLabelToPrint labels, java.lang.Integer x, java.lang.Integer y) throws java.rmi.RemoteException { + return null; + } + + public byte[] getLabelPDF(ArrayOfLabelToPrint labels, java.lang.Boolean dialogToPrint, java.lang.Integer fakeLabels) throws java.rmi.RemoteException { + return null; + } + + public java.lang.String sayHello(java.lang.String name) throws java.rmi.RemoteException { + return null; + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/Easyspedde_endpointStub.java b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/Easyspedde_endpointStub.java new file mode 100644 index 0000000000..d866485721 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/Easyspedde_endpointStub.java @@ -0,0 +1,461 @@ +package it.integry.ems.document.export.brt.easysped; + +import it.integry.ems.document.export.brt.easysped.destination.DestinationAddress; +import it.integry.ems.document.export.brt.easysped.destination.DestinationAddressOut; +import it.integry.ems.document.export.brt.easysped.pdf.ArrayOfLabelToPrint; +import it.integry.ems.document.export.brt.easysped.pdf.LabelToPrint; +import it.integry.ems.document.export.brt.easysped.pdf.LabelToPrintTipiEtichetta; +import it.integry.ems.document.export.brt.easysped.ws.EasySpedDEWS; + +public class Easyspedde_endpointStub extends org.apache.axis.client.Stub + implements EasySpedDEWS { + + private java.util.Vector cachedSerClasses = new java.util.Vector(); + private java.util.Vector cachedSerQNames = new java.util.Vector(); + private java.util.Vector cachedSerFactories = new java.util.Vector(); + private java.util.Vector cachedDeserFactories = new java.util.Vector(); + + static org.apache.axis.description.OperationDesc[] _operations; + + static { + _operations = new org.apache.axis.description.OperationDesc[4]; + _initOperationDesc1(); + } + + private static void _initOperationDesc1() { + org.apache.axis.description.OperationDesc oper; + org.apache.axis.description.ParameterDesc param; + oper = new org.apache.axis.description.OperationDesc(); + oper.setName("CalculateBRTSort"); + param = new org.apache.axis.description.ParameterDesc( + new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "address"), + org.apache.axis.description.ParameterDesc.IN, + new javax.xml.namespace.QName( + "http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", + "DestinationAddress"), DestinationAddress.class, false, + false); + param.setOmittable(true); + param.setNillable(true); + oper.addParameter(param); + oper.setReturnType(new javax.xml.namespace.QName( + "http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", + "DestinationAddressOut")); + oper.setReturnClass(DestinationAddressOut.class); + oper.setReturnQName(new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "CalculateBRTSortResult")); + oper.setStyle(org.apache.axis.constants.Style.WRAPPED); + oper.setUse(org.apache.axis.constants.Use.LITERAL); + _operations[0] = oper; + + oper = new org.apache.axis.description.OperationDesc(); + oper.setName("GetLabelForZebraPrinter"); + param = new org.apache.axis.description.ParameterDesc( + new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "labels"), + org.apache.axis.description.ParameterDesc.IN, + new javax.xml.namespace.QName( + "http://schemas.datacontract.org/2004/07/Bartolini.EasySped.Printlabel", + "ArrayOfLabelToPrint"), ArrayOfLabelToPrint.class, + false, false); + param.setOmittable(true); + param.setNillable(true); + oper.addParameter(param); + param = new org.apache.axis.description.ParameterDesc( + new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "x"), + org.apache.axis.description.ParameterDesc.IN, + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "int"), + java.lang.Integer.class, false, false); + param.setOmittable(true); + oper.addParameter(param); + param = new org.apache.axis.description.ParameterDesc( + new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "y"), + org.apache.axis.description.ParameterDesc.IN, + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "int"), + java.lang.Integer.class, false, false); + param.setOmittable(true); + oper.addParameter(param); + oper.setReturnType(new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "string")); + oper.setReturnClass(java.lang.String.class); + oper.setReturnQName(new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", + "GetLabelForZebraPrinterResult")); + oper.setStyle(org.apache.axis.constants.Style.WRAPPED); + oper.setUse(org.apache.axis.constants.Use.LITERAL); + _operations[1] = oper; + + oper = new org.apache.axis.description.OperationDesc(); + oper.setName("GetLabelPDF"); + param = new org.apache.axis.description.ParameterDesc( + new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "labels"), + org.apache.axis.description.ParameterDesc.IN, + new javax.xml.namespace.QName( + "http://schemas.datacontract.org/2004/07/Bartolini.EasySped.Printlabel", + "ArrayOfLabelToPrint"), ArrayOfLabelToPrint.class, + false, false); + param.setOmittable(true); + param.setNillable(true); + oper.addParameter(param); + param = new org.apache.axis.description.ParameterDesc( + new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "dialogToPrint"), + org.apache.axis.description.ParameterDesc.IN, + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "boolean"), + java.lang.Boolean.class, false, false); + param.setOmittable(true); + oper.addParameter(param); + param = new org.apache.axis.description.ParameterDesc( + new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "fakeLabels"), + org.apache.axis.description.ParameterDesc.IN, + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "int"), + java.lang.Integer.class, false, false); + param.setOmittable(true); + oper.addParameter(param); + oper.setReturnType(new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "base64Binary")); + oper.setReturnClass(byte[].class); + oper.setReturnQName(new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "GetLabelPDFResult")); + oper.setStyle(org.apache.axis.constants.Style.WRAPPED); + oper.setUse(org.apache.axis.constants.Use.LITERAL); + _operations[2] = oper; + + oper = new org.apache.axis.description.OperationDesc(); + oper.setName("SayHello"); + param = new org.apache.axis.description.ParameterDesc( + new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "name"), + org.apache.axis.description.ParameterDesc.IN, + new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "string"), + java.lang.String.class, false, false); + param.setOmittable(true); + param.setNillable(true); + oper.addParameter(param); + oper.setReturnType(new javax.xml.namespace.QName( + "http://www.w3.org/2001/XMLSchema", "string")); + oper.setReturnClass(java.lang.String.class); + oper.setReturnQName(new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "SayHelloResult")); + oper.setStyle(org.apache.axis.constants.Style.WRAPPED); + oper.setUse(org.apache.axis.constants.Use.LITERAL); + _operations[3] = oper; + + } + + public Easyspedde_endpointStub() throws org.apache.axis.AxisFault { + this(null); + } + + public Easyspedde_endpointStub(java.net.URL endpointURL, + javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { + this(service); + super.cachedEndpoint = endpointURL; + } + + public Easyspedde_endpointStub(javax.xml.rpc.Service service) + throws org.apache.axis.AxisFault { + if (service == null) { + super.service = new org.apache.axis.client.Service(); + } else { + super.service = service; + } + ((org.apache.axis.client.Service) super.service) + .setTypeMappingVersion("1.1"); + java.lang.Class cls; + javax.xml.namespace.QName qName; + javax.xml.namespace.QName qName2; + java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; + java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; + java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; + java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; + java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; + java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; + java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; + java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; + java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; + java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; + qName = new javax.xml.namespace.QName( + "http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", + "DestinationAddress"); + cachedSerQNames.add(qName); + cls = DestinationAddress.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName( + "http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", + "DestinationAddressOut"); + cachedSerQNames.add(qName); + cls = DestinationAddressOut.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName( + "http://schemas.datacontract.org/2004/07/Bartolini.EasySped.Printlabel", + "ArrayOfLabelToPrint"); + cachedSerQNames.add(qName); + cls = ArrayOfLabelToPrint.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName( + "http://schemas.datacontract.org/2004/07/Bartolini.EasySped.Printlabel", + "LabelToPrint"); + cachedSerQNames.add(qName); + cls = LabelToPrint.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName( + "http://schemas.datacontract.org/2004/07/Bartolini.EasySped.Printlabel", + "LabelToPrint.tipiEtichetta"); + cachedSerQNames.add(qName); + cls = LabelToPrintTipiEtichetta.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(enumsf); + cachedDeserFactories.add(enumdf); + + } + + protected org.apache.axis.client.Call createCall() + throws java.rmi.RemoteException { + try { + org.apache.axis.client.Call _call = super._createCall(); + if (super.maintainSessionSet) { + _call.setMaintainSession(super.maintainSession); + } + if (super.cachedUsername != null) { + _call.setUsername(super.cachedUsername); + } + if (super.cachedPassword != null) { + _call.setPassword(super.cachedPassword); + } + if (super.cachedEndpoint != null) { + _call.setTargetEndpointAddress(super.cachedEndpoint); + } + if (super.cachedTimeout != null) { + _call.setTimeout(super.cachedTimeout); + } + if (super.cachedPortName != null) { + _call.setPortName(super.cachedPortName); + } + java.util.Enumeration keys = super.cachedProperties.keys(); + while (keys.hasMoreElements()) { + java.lang.String key = (java.lang.String) keys.nextElement(); + _call.setProperty(key, super.cachedProperties.get(key)); + } + // All the type mapping information is registered + // when the first call is made. + // The type mapping information is actually registered in + // the TypeMappingRegistry of the service, which + // is the reason why registration is only needed for the first call. + synchronized (this) { + if (firstCall()) { + // must set encoding style before registering serializers + _call.setEncodingStyle(null); + for (int i = 0; i < cachedSerFactories.size(); ++i) { + java.lang.Class cls = (java.lang.Class) cachedSerClasses + .get(i); + javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames + .get(i); + java.lang.Object x = cachedSerFactories.get(i); + if (x instanceof Class) { + java.lang.Class sf = (java.lang.Class) cachedSerFactories + .get(i); + java.lang.Class df = (java.lang.Class) cachedDeserFactories + .get(i); + _call.registerTypeMapping(cls, qName, sf, df, false); + } else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) { + org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory) cachedSerFactories + .get(i); + org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory) cachedDeserFactories + .get(i); + _call.registerTypeMapping(cls, qName, sf, df, false); + } + } + } + } + return _call; + } catch (java.lang.Throwable _t) { + throw new org.apache.axis.AxisFault( + "Failure trying to get the Call object", _t); + } + } + + public DestinationAddressOut calculateBRTSort(DestinationAddress address) + throws java.rmi.RemoteException { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[0]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://easysped.bartolini.it/ws/EasySpedDEWS/CalculateBRTSort"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, + Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, + Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "CalculateBRTSort")); + + setRequestHeaders(_call); + setAttachments(_call); + try { + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] { address }); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) _resp; + } else { + extractAttachments(_call); + try { + return (DestinationAddressOut) _resp; + } catch (java.lang.Exception _exception) { + return (DestinationAddressOut) org.apache.axis.utils.JavaUtils + .convert(_resp, DestinationAddressOut.class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + throw axisFaultException; + } + } + + public java.lang.String getLabelForZebraPrinter(ArrayOfLabelToPrint labels, + java.lang.Integer x, java.lang.Integer y) + throws java.rmi.RemoteException { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[1]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://easysped.bartolini.it/ws/EasySpedDEWS/GetLabelForZebraPrinter"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, + Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, + Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "GetLabelForZebraPrinter")); + + setRequestHeaders(_call); + setAttachments(_call); + try { + java.lang.Object _resp = _call.invoke(new java.lang.Object[] { + labels, x, y }); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) _resp; + } else { + extractAttachments(_call); + try { + return (java.lang.String) _resp; + } catch (java.lang.Exception _exception) { + return (java.lang.String) org.apache.axis.utils.JavaUtils + .convert(_resp, java.lang.String.class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + throw axisFaultException; + } + } + + public byte[] getLabelPDF(ArrayOfLabelToPrint labels, + java.lang.Boolean dialogToPrint, java.lang.Integer fakeLabels) + throws java.rmi.RemoteException { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[2]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://easysped.bartolini.it/ws/EasySpedDEWS/GetLabelPDF"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, + Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, + Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "GetLabelPDF")); + + setRequestHeaders(_call); + setAttachments(_call); + try { + java.lang.Object _resp = _call.invoke(new java.lang.Object[] { + labels, dialogToPrint, fakeLabels }); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) _resp; + } else { + extractAttachments(_call); + try { + return (byte[]) _resp; + } catch (java.lang.Exception _exception) { + return (byte[]) org.apache.axis.utils.JavaUtils.convert( + _resp, byte[].class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + throw axisFaultException; + } + } + + public java.lang.String sayHello(java.lang.String name) + throws java.rmi.RemoteException { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[3]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://easysped.bartolini.it/ws/EasySpedDEWS/SayHello"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, + Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, + Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName( + "http://easysped.bartolini.it/ws", "SayHello")); + + setRequestHeaders(_call); + setAttachments(_call); + try { + java.lang.Object _resp = _call + .invoke(new java.lang.Object[] { name }); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) _resp; + } else { + extractAttachments(_call); + try { + return (java.lang.String) _resp; + } catch (java.lang.Exception _exception) { + return (java.lang.String) org.apache.axis.utils.JavaUtils + .convert(_resp, java.lang.String.class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + throw axisFaultException; + } + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/DestinationAddress.java b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/DestinationAddress.java new file mode 100644 index 0000000000..c05153d8c5 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/DestinationAddress.java @@ -0,0 +1,1288 @@ +/** + * DestinationAddress.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package it.integry.ems.document.export.brt.easysped.destination; + +import java.math.BigDecimal; + +import com.ancientprogramming.fixedformat4j.annotation.Align; +import com.ancientprogramming.fixedformat4j.annotation.Field; +import com.ancientprogramming.fixedformat4j.annotation.FixedFormatDecimal; +import com.ancientprogramming.fixedformat4j.annotation.Record; + +@Record +public class DestinationAddress implements java.io.Serializable { + private static final long serialVersionUID = 1L; + + private Integer annoSpedizione; + + private String campoInErrore; + + private String codiceErrore; + + private String codiceProdotto; + + private String descrizioneErrore; + + private String destinatarioCap; + + private String destinatarioIndirizzo; + + private String destinatarioLocalita; + + private String destinatarioNazione; + + private String destinatarioProvincia; + + private String destinatarioProvinciaAlt; + + private String destinatarioRagioneSociale; + + private String fermoDeposito; + + private Integer filialeSegnaCollo; + + private String flagVolumeBollettato; + + private String gestParticolaritaConsegna; + + private String gestParticolaritaContrassegno; + + private String gestParticolaritaGiacenza; + + private String gestParticolaritaVarie; + + private Integer meseGiornoSpedizione; + + private String mittenteNazione; + + private String mittenteProvincia; + + private String mittenteRagioneSociale; + + private String network; + + private Integer numSegnaColloDi; + + private Integer numeroSegnaCollo; + + private Integer numeroSerie; + + private Integer POArrivo; + + private String POArrivoDes; + + private Integer POPartenza; + + private String POPartenzaDes; + + private BigDecimal peso; + + private String primaConsegnaParticolare; + + private String ricercaPOArrivo; + + //N per usi futuri + private String ristampa=" N"; + + private String secondaConsegnaParticolare; + + private Integer terminalArrivo; + + private String tipoContrassegno; + + private String tipoLancio; + + private String tipoPorto; + + private String tipoServizioBolle; + + private String tipoStampante; + + private Integer totSegnaColli; + + private BigDecimal volume; + + private Integer zonaSegnaCollo; + + public DestinationAddress() { + } + + public DestinationAddress( + Integer annoSpedizione, + String campoInErrore, + String codiceErrore, + String codiceProdotto, + String descrizioneErrore, + String destinatarioCap, + String destinatarioIndirizzo, + String destinatarioLocalita, + String destinatarioNazione, + String destinatarioProvincia, + String destinatarioProvinciaAlt, + String destinatarioRagioneSociale, + String fermoDeposito, + Integer filialeSegnaCollo, + String flagVolumeBollettato, + String gestParticolaritaConsegna, + String gestParticolaritaContrassegno, + String gestParticolaritaGiacenza, + String gestParticolaritaVarie, + Integer meseGiornoSpedizione, + String mittenteNazione, + String mittenteProvincia, + String mittenteRagioneSociale, + String network, + Integer numSegnaColloDi, + Integer numeroSegnaCollo, + Integer numeroSerie, + Integer POArrivo, + String POArrivoDes, + Integer POPartenza, + String POPartenzaDes, + BigDecimal peso, + String primaConsegnaParticolare, + String ricercaPOArrivo, + String ristampa, + String secondaConsegnaParticolare, + Integer terminalArrivo, + String tipoContrassegno, + String tipoLancio, + String tipoPorto, + String tipoServizioBolle, + String tipoStampante, + Integer totSegnaColli, + BigDecimal volume, + Integer zonaSegnaCollo) { + this.annoSpedizione = annoSpedizione; + this.campoInErrore = campoInErrore; + this.codiceErrore = codiceErrore; + this.codiceProdotto = codiceProdotto; + this.descrizioneErrore = descrizioneErrore; + this.destinatarioCap = destinatarioCap; + this.destinatarioIndirizzo = destinatarioIndirizzo; + this.destinatarioLocalita = destinatarioLocalita; + this.destinatarioNazione = destinatarioNazione; + this.destinatarioProvincia = destinatarioProvincia; + this.destinatarioProvinciaAlt = destinatarioProvinciaAlt; + this.destinatarioRagioneSociale = destinatarioRagioneSociale; + this.fermoDeposito = fermoDeposito; + this.filialeSegnaCollo = filialeSegnaCollo; + this.flagVolumeBollettato = flagVolumeBollettato; + this.gestParticolaritaConsegna = gestParticolaritaConsegna; + this.gestParticolaritaContrassegno = gestParticolaritaContrassegno; + this.gestParticolaritaGiacenza = gestParticolaritaGiacenza; + this.gestParticolaritaVarie = gestParticolaritaVarie; + this.meseGiornoSpedizione = meseGiornoSpedizione; + this.mittenteNazione = mittenteNazione; + this.mittenteProvincia = mittenteProvincia; + this.mittenteRagioneSociale = mittenteRagioneSociale; + this.network = network; + this.numSegnaColloDi = numSegnaColloDi; + this.numeroSegnaCollo = numeroSegnaCollo; + this.numeroSerie = numeroSerie; + this.POArrivo = POArrivo; + this.POArrivoDes = POArrivoDes; + this.POPartenza = POPartenza; + this.POPartenzaDes = POPartenzaDes; + this.peso = peso; + this.primaConsegnaParticolare = primaConsegnaParticolare; + this.ricercaPOArrivo = ricercaPOArrivo; + this.ristampa = ristampa; + this.secondaConsegnaParticolare = secondaConsegnaParticolare; + this.terminalArrivo = terminalArrivo; + this.tipoContrassegno = tipoContrassegno; + this.tipoLancio = tipoLancio; + this.tipoPorto = tipoPorto; + this.tipoServizioBolle = tipoServizioBolle; + this.tipoStampante = tipoStampante; + this.totSegnaColli = totSegnaColli; + this.volume = volume; + this.zonaSegnaCollo = zonaSegnaCollo; + } + + @Field(offset=13, length=4) + public Integer getAnnoSpedizione() { + return annoSpedizione; + } + + public String getCampoInErrore() { + return campoInErrore; + } + + @Field(offset=237, length=1) + public String getCodiceErrore() { + return codiceErrore; + } + + @Field(offset=183, length=15) + public String getCodiceProdotto() { + return codiceProdotto; + } + + @Field(offset=238, length=80) + public String getDescrizioneErrore() { + return descrizioneErrore; + } + + @Field(offset=99, length=9) + public String getDestinatarioCap() { + return destinatarioCap; + } + + @Field(offset=108, length=35) + public String getDestinatarioIndirizzo() { + return destinatarioIndirizzo; + } + + @Field(offset=143, length=35) + public String getDestinatarioLocalita() { + return destinatarioLocalita; + } + + @Field(offset=96, length=3) + public String getDestinatarioNazione() { + return destinatarioNazione; + } + + @Field(offset=178, length=2) + public String getDestinatarioProvincia() { + return destinatarioProvincia; + } + + public String getDestinatarioProvinciaAlt() { + return destinatarioProvinciaAlt; + } + + @Field(offset=61, length=35) + public String getDestinatarioRagioneSociale() { + return destinatarioRagioneSociale; + } + + @Field(offset=199, length=1) + public String getFermoDeposito() { + return fermoDeposito; + } + + @Field(offset=393, length=2) + public Integer getFilialeSegnaCollo() { + return filialeSegnaCollo; + } + + @Field(offset=221, length=1) + public String getFlagVolumeBollettato() { + return flagVolumeBollettato; + } + + @Field(offset=385, length=2) + public String getGestParticolaritaConsegna() { + return gestParticolaritaConsegna; + } + + @Field(offset=391, length=2) + public String getGestParticolaritaContrassegno() { + return gestParticolaritaContrassegno; + } + + @Field(offset=387, length=2) + public String getGestParticolaritaGiacenza() { + return gestParticolaritaGiacenza; + } + + @Field(offset=389, length=2) + public String getGestParticolaritaVarie() { + return gestParticolaritaVarie; + } + + @Field(offset=17, length=4, align=Align.RIGHT, paddingChar='0') + public Integer getMeseGiornoSpedizione() { + return meseGiornoSpedizione; + } + + @Field(offset=56, length=2) + public String getMittenteNazione() { + return mittenteNazione; + } + + @Field(offset=58, length=3) + public String getMittenteProvincia() { + return mittenteProvincia; + } + + @Field(offset=21, length=35) + public String getMittenteRagioneSociale() { + return mittenteRagioneSociale; + } + + @Field(offset=383, length=1) + public String getNetwork() { + return network; + } + + @Field(offset=209, length=3, align=Align.RIGHT, paddingChar='0') + public Integer getNumSegnaColloDi() { + return numSegnaColloDi; + } + + @Field(offset=202, length=7, align=Align.RIGHT, paddingChar='0') + public Integer getNumeroSegnaCollo() { + return numeroSegnaCollo; + } + + @Field(offset=200, length=2) + public Integer getNumeroSerie() { + return numeroSerie; + } + + @Field(offset=232, length=3, align=Align.RIGHT, paddingChar='0') + public Integer getPOArrivo() { + return POArrivo; + } + + @Field(offset=356, length=3, align=Align.RIGHT, paddingChar='0') + public Integer getPOArrivo1() { + return POArrivo; + } + + @Field(offset=359, length=20) + public String getPOArrivoDes() { + return POArrivoDes; + } + + @Field(offset=180, length=3, align=Align.RIGHT, paddingChar='0') + public Integer getPOPartenza() { + return POPartenza; + } + + @Field(offset=318, length=35) + public String getPOPartenzaDes() { + return POPartenzaDes; + } + + @Field(offset=222, length=8, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true, decimalDelimiter='.', decimals=1) + public BigDecimal getPeso() { + return peso; + } + + @Field(offset=381, length=1) + public String getPrimaConsegnaParticolare() { + return primaConsegnaParticolare; + } + + @Field(offset=2, length=1) + public String getRicercaPOArrivo() { + return ricercaPOArrivo; + } + + @Field(offset=230, length=2) + public String getRistampa() { + return ristampa; + } + + @Field(offset=382, length=1) + public String getSecondaConsegnaParticolare() { + return secondaConsegnaParticolare; + } + + @Field(offset=353, length=3, align=Align.RIGHT, paddingChar='0') + public Integer getTerminalArrivo() { + return terminalArrivo; + } + + public String getTipoContrassegno() { + return tipoContrassegno; + } + + @Field(offset=1, length=1) + public String getTipoLancio() { + return tipoLancio; + } + + @Field(offset=384, length=1) + public String getTipoPorto() { + return tipoPorto; + } + + @Field(offset=198, length=1) + public String getTipoServizioBolle() { + return tipoServizioBolle; + } + + @Field(offset=3, length=10) + public String getTipoStampante() { + return tipoStampante; + } + + @Field(offset=212, length=3, align=Align.RIGHT, paddingChar='0') + public Integer getTotSegnaColli() { + return totSegnaColli; + } + + @Field(offset=215, length=6, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true, decimalDelimiter='.', decimals=3) + public BigDecimal getVolume() { + return volume; + } + + @Field(offset=235, length=2) + public Integer getZonaSegnaCollo() { + return zonaSegnaCollo; + } + + @Field(offset=379, length=2) + public Integer getZonaSegnaCollo1() { + return zonaSegnaCollo; + } + + public void setAnnoSpedizione(Integer annoSpedizione) { + this.annoSpedizione = annoSpedizione; + } + + public void setCampoInErrore(String campoInErrore) { + this.campoInErrore = campoInErrore; + } + + public void setCodiceErrore(String codiceErrore) { + this.codiceErrore = codiceErrore; + } + + public void setCodiceProdotto(String codiceProdotto) { + this.codiceProdotto = codiceProdotto; + } + + public void setDescrizioneErrore(String descrizioneErrore) { + this.descrizioneErrore = descrizioneErrore; + } + + public void setDestinatarioCap(String destinatarioCap) { + this.destinatarioCap = destinatarioCap; + } + + public void setDestinatarioIndirizzo(String destinatarioIndirizzo) { + this.destinatarioIndirizzo = destinatarioIndirizzo; + } + + public void setDestinatarioLocalita(String destinatarioLocalita) { + this.destinatarioLocalita = destinatarioLocalita; + } + + public void setDestinatarioNazione(String destinatarioNazione) { + this.destinatarioNazione = destinatarioNazione; + } + + public void setDestinatarioProvincia(String destinatarioProvincia) { + this.destinatarioProvincia = destinatarioProvincia; + } + + public void setDestinatarioProvinciaAlt( + String destinatarioProvinciaAlt) { + this.destinatarioProvinciaAlt = destinatarioProvinciaAlt; + } + + public void setDestinatarioRagioneSociale( + String destinatarioRagioneSociale) { + this.destinatarioRagioneSociale = destinatarioRagioneSociale; + } + + public void setFermoDeposito(String fermoDeposito) { + this.fermoDeposito = fermoDeposito; + } + + public void setFilialeSegnaCollo(Integer filialeSegnaCollo) { + this.filialeSegnaCollo = filialeSegnaCollo; + } + + public void setFlagVolumeBollettato(String flagVolumeBollettato) { + this.flagVolumeBollettato = flagVolumeBollettato; + } + + public void setGestParticolaritaConsegna( + String gestParticolaritaConsegna) { + this.gestParticolaritaConsegna = gestParticolaritaConsegna; + } + + public void setGestParticolaritaContrassegno( + String gestParticolaritaContrassegno) { + this.gestParticolaritaContrassegno = gestParticolaritaContrassegno; + } + + public void setGestParticolaritaGiacenza( + String gestParticolaritaGiacenza) { + this.gestParticolaritaGiacenza = gestParticolaritaGiacenza; + } + + public void setGestParticolaritaVarie(String gestParticolaritaVarie) { + this.gestParticolaritaVarie = gestParticolaritaVarie; + } + + public void setMeseGiornoSpedizione(Integer meseGiornoSpedizione) { + this.meseGiornoSpedizione = meseGiornoSpedizione; + } + + public void setMittenteNazione(String mittenteNazione) { + this.mittenteNazione = mittenteNazione; + } + + public void setMittenteProvincia(String mittenteProvincia) { + this.mittenteProvincia = mittenteProvincia; + } + + public void setMittenteRagioneSociale(String mittenteRagioneSociale) { + this.mittenteRagioneSociale = mittenteRagioneSociale; + } + + public void setNetwork(String network) { + this.network = network; + } + + public void setNumSegnaColloDi(Integer numSegnaColloDi) { + this.numSegnaColloDi = numSegnaColloDi; + } + + public void setNumeroSegnaCollo(Integer numeroSegnaCollo) { + this.numeroSegnaCollo = numeroSegnaCollo; + } + + public void setNumeroSerie(Integer numeroSerie) { + this.numeroSerie = numeroSerie; + } + + public void setPOArrivo(Integer pOArrivo) { + POArrivo = pOArrivo; + } + + public void setPOArrivo1(Integer pOArrivo) { + POArrivo = pOArrivo; + } + + public void setPOArrivoDes(String pOArrivoDes) { + POArrivoDes = pOArrivoDes; + } + + public void setPOPartenza(Integer pOPartenza) { + POPartenza = pOPartenza; + } + + public void setPOPartenzaDes(String pOPartenzaDes) { + POPartenzaDes = pOPartenzaDes; + } + + public void setPeso(BigDecimal peso) { + this.peso = peso; + } + + public void setPrimaConsegnaParticolare( + String primaConsegnaParticolare) { + this.primaConsegnaParticolare = primaConsegnaParticolare; + } + + public void setRicercaPOArrivo(String ricercaPOArrivo) { + this.ricercaPOArrivo = ricercaPOArrivo; + } + + public void setRistampa(String ristampa) { + this.ristampa = ristampa; + } + + public void setSecondaConsegnaParticolare( + String secondaConsegnaParticolare) { + this.secondaConsegnaParticolare = secondaConsegnaParticolare; + } + + public void setTerminalArrivo(Integer terminalArrivo) { + this.terminalArrivo = terminalArrivo; + } + + public void setTipoContrassegno(String tipoContrassegno) { + this.tipoContrassegno = tipoContrassegno; + } + + public void setTipoLancio(String tipoLancio) { + this.tipoLancio = tipoLancio; + } + + public void setTipoPorto(String tipoPorto) { + this.tipoPorto = tipoPorto; + } + + public void setTipoServizioBolle(String tipoServizioBolle) { + this.tipoServizioBolle = tipoServizioBolle; + } + + public void setTipoStampante(String tipoStampante) { + this.tipoStampante = tipoStampante; + } + + public void setTotSegnaColli(Integer totSegnaColli) { + this.totSegnaColli = totSegnaColli; + } + + public void setVolume(BigDecimal volume) { + this.volume = volume; + } + + public void setZonaSegnaCollo(Integer zonaSegnaCollo) { + this.zonaSegnaCollo = zonaSegnaCollo; + } + + public void setZonaSegnaCollo1(Integer zonaSegnaCollo) { + this.zonaSegnaCollo = zonaSegnaCollo; + } + + private Object __equalsCalc = null; + public synchronized boolean equals(Object obj) { + if (!(obj instanceof DestinationAddress)) return false; + DestinationAddress other = (DestinationAddress) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.annoSpedizione==null && other.getAnnoSpedizione()==null) || + (this.annoSpedizione!=null && + this.annoSpedizione.equals(other.getAnnoSpedizione()))) && + ((this.campoInErrore==null && other.getCampoInErrore()==null) || + (this.campoInErrore!=null && + this.campoInErrore.equals(other.getCampoInErrore()))) && + ((this.codiceErrore==null && other.getCodiceErrore()==null) || + (this.codiceErrore!=null && + this.codiceErrore.equals(other.getCodiceErrore()))) && + ((this.codiceProdotto==null && other.getCodiceProdotto()==null) || + (this.codiceProdotto!=null && + this.codiceProdotto.equals(other.getCodiceProdotto()))) && + ((this.descrizioneErrore==null && other.getDescrizioneErrore()==null) || + (this.descrizioneErrore!=null && + this.descrizioneErrore.equals(other.getDescrizioneErrore()))) && + ((this.destinatarioCap==null && other.getDestinatarioCap()==null) || + (this.destinatarioCap!=null && + this.destinatarioCap.equals(other.getDestinatarioCap()))) && + ((this.destinatarioIndirizzo==null && other.getDestinatarioIndirizzo()==null) || + (this.destinatarioIndirizzo!=null && + this.destinatarioIndirizzo.equals(other.getDestinatarioIndirizzo()))) && + ((this.destinatarioLocalita==null && other.getDestinatarioLocalita()==null) || + (this.destinatarioLocalita!=null && + this.destinatarioLocalita.equals(other.getDestinatarioLocalita()))) && + ((this.destinatarioNazione==null && other.getDestinatarioNazione()==null) || + (this.destinatarioNazione!=null && + this.destinatarioNazione.equals(other.getDestinatarioNazione()))) && + ((this.destinatarioProvincia==null && other.getDestinatarioProvincia()==null) || + (this.destinatarioProvincia!=null && + this.destinatarioProvincia.equals(other.getDestinatarioProvincia()))) && + ((this.destinatarioProvinciaAlt==null && other.getDestinatarioProvinciaAlt()==null) || + (this.destinatarioProvinciaAlt!=null && + this.destinatarioProvinciaAlt.equals(other.getDestinatarioProvinciaAlt()))) && + ((this.destinatarioRagioneSociale==null && other.getDestinatarioRagioneSociale()==null) || + (this.destinatarioRagioneSociale!=null && + this.destinatarioRagioneSociale.equals(other.getDestinatarioRagioneSociale()))) && + ((this.fermoDeposito==null && other.getFermoDeposito()==null) || + (this.fermoDeposito!=null && + this.fermoDeposito.equals(other.getFermoDeposito()))) && + ((this.filialeSegnaCollo==null && other.getFilialeSegnaCollo()==null) || + (this.filialeSegnaCollo!=null && + this.filialeSegnaCollo.equals(other.getFilialeSegnaCollo()))) && + ((this.flagVolumeBollettato==null && other.getFlagVolumeBollettato()==null) || + (this.flagVolumeBollettato!=null && + this.flagVolumeBollettato.equals(other.getFlagVolumeBollettato()))) && + ((this.gestParticolaritaConsegna==null && other.getGestParticolaritaConsegna()==null) || + (this.gestParticolaritaConsegna!=null && + this.gestParticolaritaConsegna.equals(other.getGestParticolaritaConsegna()))) && + ((this.gestParticolaritaContrassegno==null && other.getGestParticolaritaContrassegno()==null) || + (this.gestParticolaritaContrassegno!=null && + this.gestParticolaritaContrassegno.equals(other.getGestParticolaritaContrassegno()))) && + ((this.gestParticolaritaGiacenza==null && other.getGestParticolaritaGiacenza()==null) || + (this.gestParticolaritaGiacenza!=null && + this.gestParticolaritaGiacenza.equals(other.getGestParticolaritaGiacenza()))) && + ((this.gestParticolaritaVarie==null && other.getGestParticolaritaVarie()==null) || + (this.gestParticolaritaVarie!=null && + this.gestParticolaritaVarie.equals(other.getGestParticolaritaVarie()))) && + ((this.meseGiornoSpedizione==null && other.getMeseGiornoSpedizione()==null) || + (this.meseGiornoSpedizione!=null && + this.meseGiornoSpedizione.equals(other.getMeseGiornoSpedizione()))) && + ((this.mittenteNazione==null && other.getMittenteNazione()==null) || + (this.mittenteNazione!=null && + this.mittenteNazione.equals(other.getMittenteNazione()))) && + ((this.mittenteProvincia==null && other.getMittenteProvincia()==null) || + (this.mittenteProvincia!=null && + this.mittenteProvincia.equals(other.getMittenteProvincia()))) && + ((this.mittenteRagioneSociale==null && other.getMittenteRagioneSociale()==null) || + (this.mittenteRagioneSociale!=null && + this.mittenteRagioneSociale.equals(other.getMittenteRagioneSociale()))) && + ((this.network==null && other.getNetwork()==null) || + (this.network!=null && + this.network.equals(other.getNetwork()))) && + ((this.numSegnaColloDi==null && other.getNumSegnaColloDi()==null) || + (this.numSegnaColloDi!=null && + this.numSegnaColloDi.equals(other.getNumSegnaColloDi()))) && + ((this.numeroSegnaCollo==null && other.getNumeroSegnaCollo()==null) || + (this.numeroSegnaCollo!=null && + this.numeroSegnaCollo.equals(other.getNumeroSegnaCollo()))) && + ((this.numeroSerie==null && other.getNumeroSerie()==null) || + (this.numeroSerie!=null && + this.numeroSerie.equals(other.getNumeroSerie()))) && + ((this.POArrivo==null && other.getPOArrivo()==null) || + (this.POArrivo!=null && + this.POArrivo.equals(other.getPOArrivo()))) && + ((this.POArrivoDes==null && other.getPOArrivoDes()==null) || + (this.POArrivoDes!=null && + this.POArrivoDes.equals(other.getPOArrivoDes()))) && + ((this.POPartenza==null && other.getPOPartenza()==null) || + (this.POPartenza!=null && + this.POPartenza.equals(other.getPOPartenza()))) && + ((this.POPartenzaDes==null && other.getPOPartenzaDes()==null) || + (this.POPartenzaDes!=null && + this.POPartenzaDes.equals(other.getPOPartenzaDes()))) && + ((this.peso==null && other.getPeso()==null) || + (this.peso!=null && + this.peso.equals(other.getPeso()))) && + ((this.primaConsegnaParticolare==null && other.getPrimaConsegnaParticolare()==null) || + (this.primaConsegnaParticolare!=null && + this.primaConsegnaParticolare.equals(other.getPrimaConsegnaParticolare()))) && + ((this.ricercaPOArrivo==null && other.getRicercaPOArrivo()==null) || + (this.ricercaPOArrivo!=null && + this.ricercaPOArrivo.equals(other.getRicercaPOArrivo()))) && + ((this.ristampa==null && other.getRistampa()==null) || + (this.ristampa!=null && + this.ristampa.equals(other.getRistampa()))) && + ((this.secondaConsegnaParticolare==null && other.getSecondaConsegnaParticolare()==null) || + (this.secondaConsegnaParticolare!=null && + this.secondaConsegnaParticolare.equals(other.getSecondaConsegnaParticolare()))) && + ((this.terminalArrivo==null && other.getTerminalArrivo()==null) || + (this.terminalArrivo!=null && + this.terminalArrivo.equals(other.getTerminalArrivo()))) && + ((this.tipoContrassegno==null && other.getTipoContrassegno()==null) || + (this.tipoContrassegno!=null && + this.tipoContrassegno.equals(other.getTipoContrassegno()))) && + ((this.tipoLancio==null && other.getTipoLancio()==null) || + (this.tipoLancio!=null && + this.tipoLancio.equals(other.getTipoLancio()))) && + ((this.tipoPorto==null && other.getTipoPorto()==null) || + (this.tipoPorto!=null && + this.tipoPorto.equals(other.getTipoPorto()))) && + ((this.tipoServizioBolle==null && other.getTipoServizioBolle()==null) || + (this.tipoServizioBolle!=null && + this.tipoServizioBolle.equals(other.getTipoServizioBolle()))) && + ((this.tipoStampante==null && other.getTipoStampante()==null) || + (this.tipoStampante!=null && + this.tipoStampante.equals(other.getTipoStampante()))) && + ((this.totSegnaColli==null && other.getTotSegnaColli()==null) || + (this.totSegnaColli!=null && + this.totSegnaColli.equals(other.getTotSegnaColli()))) && + ((this.volume==null && other.getVolume()==null) || + (this.volume!=null && + this.volume.equals(other.getVolume()))) && + ((this.zonaSegnaCollo==null && other.getZonaSegnaCollo()==null) || + (this.zonaSegnaCollo!=null && + this.zonaSegnaCollo.equals(other.getZonaSegnaCollo()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getAnnoSpedizione() != null) { + _hashCode += getAnnoSpedizione().hashCode(); + } + if (getCampoInErrore() != null) { + _hashCode += getCampoInErrore().hashCode(); + } + if (getCodiceErrore() != null) { + _hashCode += getCodiceErrore().hashCode(); + } + if (getCodiceProdotto() != null) { + _hashCode += getCodiceProdotto().hashCode(); + } + if (getDescrizioneErrore() != null) { + _hashCode += getDescrizioneErrore().hashCode(); + } + if (getDestinatarioCap() != null) { + _hashCode += getDestinatarioCap().hashCode(); + } + if (getDestinatarioIndirizzo() != null) { + _hashCode += getDestinatarioIndirizzo().hashCode(); + } + if (getDestinatarioLocalita() != null) { + _hashCode += getDestinatarioLocalita().hashCode(); + } + if (getDestinatarioNazione() != null) { + _hashCode += getDestinatarioNazione().hashCode(); + } + if (getDestinatarioProvincia() != null) { + _hashCode += getDestinatarioProvincia().hashCode(); + } + if (getDestinatarioProvinciaAlt() != null) { + _hashCode += getDestinatarioProvinciaAlt().hashCode(); + } + if (getDestinatarioRagioneSociale() != null) { + _hashCode += getDestinatarioRagioneSociale().hashCode(); + } + if (getFermoDeposito() != null) { + _hashCode += getFermoDeposito().hashCode(); + } + if (getFilialeSegnaCollo() != null) { + _hashCode += getFilialeSegnaCollo().hashCode(); + } + if (getFlagVolumeBollettato() != null) { + _hashCode += getFlagVolumeBollettato().hashCode(); + } + if (getGestParticolaritaConsegna() != null) { + _hashCode += getGestParticolaritaConsegna().hashCode(); + } + if (getGestParticolaritaContrassegno() != null) { + _hashCode += getGestParticolaritaContrassegno().hashCode(); + } + if (getGestParticolaritaGiacenza() != null) { + _hashCode += getGestParticolaritaGiacenza().hashCode(); + } + if (getGestParticolaritaVarie() != null) { + _hashCode += getGestParticolaritaVarie().hashCode(); + } + if (getMeseGiornoSpedizione() != null) { + _hashCode += getMeseGiornoSpedizione().hashCode(); + } + if (getMittenteNazione() != null) { + _hashCode += getMittenteNazione().hashCode(); + } + if (getMittenteProvincia() != null) { + _hashCode += getMittenteProvincia().hashCode(); + } + if (getMittenteRagioneSociale() != null) { + _hashCode += getMittenteRagioneSociale().hashCode(); + } + if (getNetwork() != null) { + _hashCode += getNetwork().hashCode(); + } + if (getNumSegnaColloDi() != null) { + _hashCode += getNumSegnaColloDi().hashCode(); + } + if (getNumeroSegnaCollo() != null) { + _hashCode += getNumeroSegnaCollo().hashCode(); + } + if (getNumeroSerie() != null) { + _hashCode += getNumeroSerie().hashCode(); + } + if (getPOArrivo() != null) { + _hashCode += getPOArrivo().hashCode(); + } + if (getPOArrivoDes() != null) { + _hashCode += getPOArrivoDes().hashCode(); + } + if (getPOPartenza() != null) { + _hashCode += getPOPartenza().hashCode(); + } + if (getPOPartenzaDes() != null) { + _hashCode += getPOPartenzaDes().hashCode(); + } + if (getPeso() != null) { + _hashCode += getPeso().hashCode(); + } + if (getPrimaConsegnaParticolare() != null) { + _hashCode += getPrimaConsegnaParticolare().hashCode(); + } + if (getRicercaPOArrivo() != null) { + _hashCode += getRicercaPOArrivo().hashCode(); + } + if (getRistampa() != null) { + _hashCode += getRistampa().hashCode(); + } + if (getSecondaConsegnaParticolare() != null) { + _hashCode += getSecondaConsegnaParticolare().hashCode(); + } + if (getTerminalArrivo() != null) { + _hashCode += getTerminalArrivo().hashCode(); + } + if (getTipoContrassegno() != null) { + _hashCode += getTipoContrassegno().hashCode(); + } + if (getTipoLancio() != null) { + _hashCode += getTipoLancio().hashCode(); + } + if (getTipoPorto() != null) { + _hashCode += getTipoPorto().hashCode(); + } + if (getTipoServizioBolle() != null) { + _hashCode += getTipoServizioBolle().hashCode(); + } + if (getTipoStampante() != null) { + _hashCode += getTipoStampante().hashCode(); + } + if (getTotSegnaColli() != null) { + _hashCode += getTotSegnaColli().hashCode(); + } + if (getVolume() != null) { + _hashCode += getVolume().hashCode(); + } + if (getZonaSegnaCollo() != null) { + _hashCode += getZonaSegnaCollo().hashCode(); + } + __hashCodeCalc = false; + return _hashCode; + } + + // Type metadata + private static org.apache.axis.description.TypeDesc typeDesc = + new org.apache.axis.description.TypeDesc(DestinationAddress.class, true); + + static { + typeDesc.setXmlType(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinationAddress")); + org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("annoSpedizione"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "AnnoSpedizione")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("campoInErrore"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "CampoInErrore")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("codiceErrore"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "CodiceErrore")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("codiceProdotto"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "CodiceProdotto")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("descrizioneErrore"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DescrizioneErrore")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioCap"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioCap")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioIndirizzo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioIndirizzo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioLocalita"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioLocalita")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioNazione"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioNazione")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioProvincia"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioProvincia")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioProvinciaAlt"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioProvinciaAlt")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioRagioneSociale"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioRagioneSociale")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("fermoDeposito"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "FermoDeposito")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("filialeSegnaCollo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "FilialeSegnaCollo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("flagVolumeBollettato"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "FlagVolumeBollettato")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("gestParticolaritaConsegna"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "GestParticolaritaConsegna")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("gestParticolaritaContrassegno"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "GestParticolaritaContrassegno")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("gestParticolaritaGiacenza"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "GestParticolaritaGiacenza")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("gestParticolaritaVarie"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "GestParticolaritaVarie")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("meseGiornoSpedizione"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "MeseGiornoSpedizione")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("mittenteNazione"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "MittenteNazione")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("mittenteProvincia"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "MittenteProvincia")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("mittenteRagioneSociale"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "MittenteRagioneSociale")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("network"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "Network")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("numSegnaColloDi"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "NumSegnaColloDi")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("numeroSegnaCollo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "NumeroSegnaCollo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("numeroSerie"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "NumeroSerie")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("POArrivo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "POArrivo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("POArrivoDes"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "POArrivoDes")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("POPartenza"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "POPartenza")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("POPartenzaDes"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "POPartenzaDes")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("peso"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "Peso")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("primaConsegnaParticolare"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "PrimaConsegnaParticolare")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("ricercaPOArrivo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "RicercaPOArrivo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("ristampa"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "Ristampa")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("secondaConsegnaParticolare"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "SecondaConsegnaParticolare")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("terminalArrivo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "TerminalArrivo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("tipoContrassegno"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "TipoContrassegno")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("tipoLancio"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "TipoLancio")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("tipoPorto"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "TipoPorto")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("tipoServizioBolle"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "TipoServizioBolle")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("tipoStampante"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "TipoStampante")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("totSegnaColli"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "TotSegnaColli")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("volume"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "Volume")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("zonaSegnaCollo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "ZonaSegnaCollo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + } + + /** + * Return type metadata object + */ + public static org.apache.axis.description.TypeDesc getTypeDesc() { + return typeDesc; + } + + /** + * Get Custom Serializer + */ + public static org.apache.axis.encoding.Serializer getSerializer( + String mechType, + Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanSerializer( + _javaType, _xmlType, typeDesc); + } + + /** + * Get Custom Deserializer + */ + public static org.apache.axis.encoding.Deserializer getDeserializer( + String mechType, + Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanDeserializer( + _javaType, _xmlType, typeDesc); + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/DestinationAddressOut.java b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/DestinationAddressOut.java new file mode 100644 index 0000000000..f15c2fd01c --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/DestinationAddressOut.java @@ -0,0 +1,564 @@ +/** + * DestinationAddressOut.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package it.integry.ems.document.export.brt.easysped.destination; + +public class DestinationAddressOut implements java.io.Serializable { + private String campoInErrore; + + private String codiceErrore; + + private String descrizioneErrore; + + private String destinatarioLocalita; + + private String destinatarioProvincia; + + private String destinatarioProvinciaAlt; + + private String nazioneISO; + + private Integer POArrivo; + + private String POArrivoDes; + + private String POPartenzaDes; + + private Integer terminalArrivo; + + private String tipoStampaNetwork; + + private Integer zonaSegnaCollo; + + public DestinationAddressOut() { + } + + public DestinationAddressOut( + String campoInErrore, + String codiceErrore, + String descrizioneErrore, + String destinatarioLocalita, + String destinatarioProvincia, + String destinatarioProvinciaAlt, + String nazioneISO, + Integer POArrivo, + String POArrivoDes, + String POPartenzaDes, + Integer terminalArrivo, + String tipoStampaNetwork, + Integer zonaSegnaCollo) { + this.campoInErrore = campoInErrore; + this.codiceErrore = codiceErrore; + this.descrizioneErrore = descrizioneErrore; + this.destinatarioLocalita = destinatarioLocalita; + this.destinatarioProvincia = destinatarioProvincia; + this.destinatarioProvinciaAlt = destinatarioProvinciaAlt; + this.nazioneISO = nazioneISO; + this.POArrivo = POArrivo; + this.POArrivoDes = POArrivoDes; + this.POPartenzaDes = POPartenzaDes; + this.terminalArrivo = terminalArrivo; + this.tipoStampaNetwork = tipoStampaNetwork; + this.zonaSegnaCollo = zonaSegnaCollo; + } + + + /** + * Gets the campoInErrore value for this DestinationAddressOut. + * + * @return campoInErrore + */ + public String getCampoInErrore() { + return campoInErrore; + } + + + /** + * Sets the campoInErrore value for this DestinationAddressOut. + * + * @param campoInErrore + */ + public void setCampoInErrore(String campoInErrore) { + this.campoInErrore = campoInErrore; + } + + + /** + * Gets the codiceErrore value for this DestinationAddressOut. + * + * @return codiceErrore + */ + public String getCodiceErrore() { + return codiceErrore; + } + + + /** + * Sets the codiceErrore value for this DestinationAddressOut. + * + * @param codiceErrore + */ + public void setCodiceErrore(String codiceErrore) { + this.codiceErrore = codiceErrore; + } + + + /** + * Gets the descrizioneErrore value for this DestinationAddressOut. + * + * @return descrizioneErrore + */ + public String getDescrizioneErrore() { + return descrizioneErrore; + } + + + /** + * Sets the descrizioneErrore value for this DestinationAddressOut. + * + * @param descrizioneErrore + */ + public void setDescrizioneErrore(String descrizioneErrore) { + this.descrizioneErrore = descrizioneErrore; + } + + + /** + * Gets the destinatarioLocalita value for this DestinationAddressOut. + * + * @return destinatarioLocalita + */ + public String getDestinatarioLocalita() { + return destinatarioLocalita; + } + + + /** + * Sets the destinatarioLocalita value for this DestinationAddressOut. + * + * @param destinatarioLocalita + */ + public void setDestinatarioLocalita(String destinatarioLocalita) { + this.destinatarioLocalita = destinatarioLocalita; + } + + + /** + * Gets the destinatarioProvincia value for this DestinationAddressOut. + * + * @return destinatarioProvincia + */ + public String getDestinatarioProvincia() { + return destinatarioProvincia; + } + + + /** + * Sets the destinatarioProvincia value for this DestinationAddressOut. + * + * @param destinatarioProvincia + */ + public void setDestinatarioProvincia(String destinatarioProvincia) { + this.destinatarioProvincia = destinatarioProvincia; + } + + + /** + * Gets the destinatarioProvinciaAlt value for this DestinationAddressOut. + * + * @return destinatarioProvinciaAlt + */ + public String getDestinatarioProvinciaAlt() { + return destinatarioProvinciaAlt; + } + + + /** + * Sets the destinatarioProvinciaAlt value for this DestinationAddressOut. + * + * @param destinatarioProvinciaAlt + */ + public void setDestinatarioProvinciaAlt(String destinatarioProvinciaAlt) { + this.destinatarioProvinciaAlt = destinatarioProvinciaAlt; + } + + + /** + * Gets the nazioneISO value for this DestinationAddressOut. + * + * @return nazioneISO + */ + public String getNazioneISO() { + return nazioneISO; + } + + + /** + * Sets the nazioneISO value for this DestinationAddressOut. + * + * @param nazioneISO + */ + public void setNazioneISO(String nazioneISO) { + this.nazioneISO = nazioneISO; + } + + + /** + * Gets the POArrivo value for this DestinationAddressOut. + * + * @return POArrivo + */ + public Integer getPOArrivo() { + return POArrivo; + } + + + /** + * Sets the POArrivo value for this DestinationAddressOut. + * + * @param POArrivo + */ + public void setPOArrivo(Integer POArrivo) { + this.POArrivo = POArrivo; + } + + + /** + * Gets the POArrivoDes value for this DestinationAddressOut. + * + * @return POArrivoDes + */ + public String getPOArrivoDes() { + return POArrivoDes; + } + + + /** + * Sets the POArrivoDes value for this DestinationAddressOut. + * + * @param POArrivoDes + */ + public void setPOArrivoDes(String POArrivoDes) { + this.POArrivoDes = POArrivoDes; + } + + + /** + * Gets the POPartenzaDes value for this DestinationAddressOut. + * + * @return POPartenzaDes + */ + public String getPOPartenzaDes() { + return POPartenzaDes; + } + + + /** + * Sets the POPartenzaDes value for this DestinationAddressOut. + * + * @param POPartenzaDes + */ + public void setPOPartenzaDes(String POPartenzaDes) { + this.POPartenzaDes = POPartenzaDes; + } + + + /** + * Gets the terminalArrivo value for this DestinationAddressOut. + * + * @return terminalArrivo + */ + public Integer getTerminalArrivo() { + return terminalArrivo; + } + + + /** + * Sets the terminalArrivo value for this DestinationAddressOut. + * + * @param terminalArrivo + */ + public void setTerminalArrivo(Integer terminalArrivo) { + this.terminalArrivo = terminalArrivo; + } + + + /** + * Gets the tipoStampaNetwork value for this DestinationAddressOut. + * + * @return tipoStampaNetwork + */ + public String getTipoStampaNetwork() { + return tipoStampaNetwork; + } + + + /** + * Sets the tipoStampaNetwork value for this DestinationAddressOut. + * + * @param tipoStampaNetwork + */ + public void setTipoStampaNetwork(String tipoStampaNetwork) { + this.tipoStampaNetwork = tipoStampaNetwork; + } + + + /** + * Gets the zonaSegnaCollo value for this DestinationAddressOut. + * + * @return zonaSegnaCollo + */ + public Integer getZonaSegnaCollo() { + return zonaSegnaCollo; + } + + + /** + * Sets the zonaSegnaCollo value for this DestinationAddressOut. + * + * @param zonaSegnaCollo + */ + public void setZonaSegnaCollo(Integer zonaSegnaCollo) { + this.zonaSegnaCollo = zonaSegnaCollo; + } + + private Object __equalsCalc = null; + public synchronized boolean equals(Object obj) { + if (!(obj instanceof DestinationAddressOut)) return false; + DestinationAddressOut other = (DestinationAddressOut) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.campoInErrore==null && other.getCampoInErrore()==null) || + (this.campoInErrore!=null && + this.campoInErrore.equals(other.getCampoInErrore()))) && + ((this.codiceErrore==null && other.getCodiceErrore()==null) || + (this.codiceErrore!=null && + this.codiceErrore.equals(other.getCodiceErrore()))) && + ((this.descrizioneErrore==null && other.getDescrizioneErrore()==null) || + (this.descrizioneErrore!=null && + this.descrizioneErrore.equals(other.getDescrizioneErrore()))) && + ((this.destinatarioLocalita==null && other.getDestinatarioLocalita()==null) || + (this.destinatarioLocalita!=null && + this.destinatarioLocalita.equals(other.getDestinatarioLocalita()))) && + ((this.destinatarioProvincia==null && other.getDestinatarioProvincia()==null) || + (this.destinatarioProvincia!=null && + this.destinatarioProvincia.equals(other.getDestinatarioProvincia()))) && + ((this.destinatarioProvinciaAlt==null && other.getDestinatarioProvinciaAlt()==null) || + (this.destinatarioProvinciaAlt!=null && + this.destinatarioProvinciaAlt.equals(other.getDestinatarioProvinciaAlt()))) && + ((this.nazioneISO==null && other.getNazioneISO()==null) || + (this.nazioneISO!=null && + this.nazioneISO.equals(other.getNazioneISO()))) && + ((this.POArrivo==null && other.getPOArrivo()==null) || + (this.POArrivo!=null && + this.POArrivo.equals(other.getPOArrivo()))) && + ((this.POArrivoDes==null && other.getPOArrivoDes()==null) || + (this.POArrivoDes!=null && + this.POArrivoDes.equals(other.getPOArrivoDes()))) && + ((this.POPartenzaDes==null && other.getPOPartenzaDes()==null) || + (this.POPartenzaDes!=null && + this.POPartenzaDes.equals(other.getPOPartenzaDes()))) && + ((this.terminalArrivo==null && other.getTerminalArrivo()==null) || + (this.terminalArrivo!=null && + this.terminalArrivo.equals(other.getTerminalArrivo()))) && + ((this.tipoStampaNetwork==null && other.getTipoStampaNetwork()==null) || + (this.tipoStampaNetwork!=null && + this.tipoStampaNetwork.equals(other.getTipoStampaNetwork()))) && + ((this.zonaSegnaCollo==null && other.getZonaSegnaCollo()==null) || + (this.zonaSegnaCollo!=null && + this.zonaSegnaCollo.equals(other.getZonaSegnaCollo()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getCampoInErrore() != null) { + _hashCode += getCampoInErrore().hashCode(); + } + if (getCodiceErrore() != null) { + _hashCode += getCodiceErrore().hashCode(); + } + if (getDescrizioneErrore() != null) { + _hashCode += getDescrizioneErrore().hashCode(); + } + if (getDestinatarioLocalita() != null) { + _hashCode += getDestinatarioLocalita().hashCode(); + } + if (getDestinatarioProvincia() != null) { + _hashCode += getDestinatarioProvincia().hashCode(); + } + if (getDestinatarioProvinciaAlt() != null) { + _hashCode += getDestinatarioProvinciaAlt().hashCode(); + } + if (getNazioneISO() != null) { + _hashCode += getNazioneISO().hashCode(); + } + if (getPOArrivo() != null) { + _hashCode += getPOArrivo().hashCode(); + } + if (getPOArrivoDes() != null) { + _hashCode += getPOArrivoDes().hashCode(); + } + if (getPOPartenzaDes() != null) { + _hashCode += getPOPartenzaDes().hashCode(); + } + if (getTerminalArrivo() != null) { + _hashCode += getTerminalArrivo().hashCode(); + } + if (getTipoStampaNetwork() != null) { + _hashCode += getTipoStampaNetwork().hashCode(); + } + if (getZonaSegnaCollo() != null) { + _hashCode += getZonaSegnaCollo().hashCode(); + } + __hashCodeCalc = false; + return _hashCode; + } + + // Type metadata + private static org.apache.axis.description.TypeDesc typeDesc = + new org.apache.axis.description.TypeDesc(DestinationAddressOut.class, true); + + static { + typeDesc.setXmlType(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinationAddressOut")); + org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("campoInErrore"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "CampoInErrore")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("codiceErrore"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "CodiceErrore")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("descrizioneErrore"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DescrizioneErrore")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioLocalita"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioLocalita")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioProvincia"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioProvincia")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("destinatarioProvinciaAlt"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "DestinatarioProvinciaAlt")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("nazioneISO"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "NazioneISO")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("POArrivo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "POArrivo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("POArrivoDes"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "POArrivoDes")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("POPartenzaDes"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "POPartenzaDes")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("terminalArrivo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "TerminalArrivo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("tipoStampaNetwork"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "TipoStampaNetwork")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setMinOccurs(0); + elemField.setNillable(true); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("zonaSegnaCollo"); + elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/Bartolini.EasySped.DAL", "ZonaSegnaCollo")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); + elemField.setMinOccurs(0); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + } + + /** + * Return type metadata object + */ + public static org.apache.axis.description.TypeDesc getTypeDesc() { + return typeDesc; + } + + /** + * Get Custom Serializer + */ + public static org.apache.axis.encoding.Serializer getSerializer( + String mechType, + Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanSerializer( + _javaType, _xmlType, typeDesc); + } + + /** + * Get Custom Deserializer + */ + public static org.apache.axis.encoding.Deserializer getDeserializer( + String mechType, + Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanDeserializer( + _javaType, _xmlType, typeDesc); + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/FnVAB.java b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/FnVAB.java new file mode 100644 index 0000000000..4bc1564324 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/FnVAB.java @@ -0,0 +1,497 @@ +package it.integry.ems.document.export.brt.easysped.destination; + +import java.math.BigDecimal; + +import com.ancientprogramming.fixedformat4j.annotation.Field; +import com.ancientprogramming.fixedformat4j.annotation.Record; + +@Record +public class FnVAB { + + private String flagAnnullamento; + private String codClieMittente; + private Integer POPartenza; + private Integer annoSpedizione; + private Integer meseGiornoSpedizione; + private String numeroSpedizione; + private String codBolla; + private Integer POArrivo; + private String destinatarioRagioneSociale; + private String destinatarioRagioneSocialeAlt; + private String destinatarioIndirizzo; + private String destinatarioCap; + private String destinatarioLocalita; + private String destinatarioProvincia; + private String destinatarioNazione; + private String primoGGChiusuraDest; + private String secondoGGChiusuraDest; + private String codTariffa; + private String tipoServizioBolle; + + private BigDecimal importo; + private String divisaImporto; + private String naturaMerce; + + private Integer totSegnaColli; + private BigDecimal peso; + private BigDecimal volume; + private BigDecimal qtaDaFatturare; + private BigDecimal contrassegno; + private String tipoContrassegno; + private String divisaContrassegno; + private String gestParticolaritaContrassegno; + + private String codMittente; + private String mittenteRagioneSociale; + private Integer numeroSegnaColloDal; + private Integer numeroSegnaColloAl; + + private String cumulativoColli; + + private String note; + private String noteAggiuntive; + private Integer zonaSegnaCollo; + private String codTrattamentoMerce; + private String fermoDeposito; + + private String dataConsegnaRichiesta; + private String tipoCons; + private String oraConsegnaRichiesta; + + private String codTassazione; + private String flagTassazione; + + private BigDecimal valoreMerce; + private String divisaMerce; + + private String gestParticolaritaConsegna; + private String gestParticolaritaGiacenza; + private String gestParticolaritaVarie; + + private String primaConsegnaParticolare; + + private String secondaConsegnaParticolare; + + @Field(offset=1, length=1) + public String getFlagAnnullamento() { + return flagAnnullamento; + } + + @Field(offset=2, length=7) + public String getCodClieMittente() { + return codClieMittente; + } + + @Field(offset=9, length=3) + public Integer getPOPartenza() { + return POPartenza; + } + + @Field(offset=12, length=3) + public Integer getAnnoSpedizione() { + return annoSpedizione; + } + + public Integer getMeseGiornoSpedizione() { + return meseGiornoSpedizione; + } + + public String getNumeroSpedizione() { + return numeroSpedizione; + } + + public String getCodBolla() { + return codBolla; + } + + public Integer getPOArrivo() { + return POArrivo; + } + + public String getDestinatarioRagioneSociale() { + return destinatarioRagioneSociale; + } + + public String getDestinatarioRagioneSocialeAlt() { + return destinatarioRagioneSocialeAlt; + } + + public String getDestinatarioIndirizzo() { + return destinatarioIndirizzo; + } + + public String getDestinatarioCap() { + return destinatarioCap; + } + + public String getDestinatarioLocalita() { + return destinatarioLocalita; + } + + public String getDestinatarioProvincia() { + return destinatarioProvincia; + } + + public String getDestinatarioNazione() { + return destinatarioNazione; + } + + public String getPrimoGGChiusuraDest() { + return primoGGChiusuraDest; + } + + public String getSecondoGGChiusuraDest() { + return secondoGGChiusuraDest; + } + + public String getCodTariffa() { + return codTariffa; + } + + public String getTipoServizioBolle() { + return tipoServizioBolle; + } + + public BigDecimal getImporto() { + return importo; + } + + public String getDivisaImporto() { + return divisaImporto; + } + + public String getNaturaMerce() { + return naturaMerce; + } + + public Integer getTotSegnaColli() { + return totSegnaColli; + } + + public BigDecimal getPeso() { + return peso; + } + + public BigDecimal getVolume() { + return volume; + } + + public BigDecimal getQtaDaFatturare() { + return qtaDaFatturare; + } + + public BigDecimal getContrassegno() { + return contrassegno; + } + + public String getTipoContrassegno() { + return tipoContrassegno; + } + + public String getDivisaContrassegno() { + return divisaContrassegno; + } + + public String getGestParticolaritaContrassegno() { + return gestParticolaritaContrassegno; + } + + public String getCodMittente() { + return codMittente; + } + + public String getMittenteRagioneSociale() { + return mittenteRagioneSociale; + } + + public Integer getNumeroSegnaColloDal() { + return numeroSegnaColloDal; + } + + public Integer getNumeroSegnaColloAl() { + return numeroSegnaColloAl; + } + + public String getCumulativoColli() { + return cumulativoColli; + } + + public String getNote() { + return note; + } + + public String getNoteAggiuntive() { + return noteAggiuntive; + } + + public Integer getZonaSegnaCollo() { + return zonaSegnaCollo; + } + + public String getCodTrattamentoMerce() { + return codTrattamentoMerce; + } + + public String getFermoDeposito() { + return fermoDeposito; + } + + public String getDataConsegnaRichiesta() { + return dataConsegnaRichiesta; + } + + public String getTipoCons() { + return tipoCons; + } + + public String getOraConsegnaRichiesta() { + return oraConsegnaRichiesta; + } + + public String getCodTassazione() { + return codTassazione; + } + + public String getFlagTassazione() { + return flagTassazione; + } + + public BigDecimal getValoreMerce() { + return valoreMerce; + } + + public String getDivisaMerce() { + return divisaMerce; + } + + public String getGestParticolaritaConsegna() { + return gestParticolaritaConsegna; + } + + public String getGestParticolaritaGiacenza() { + return gestParticolaritaGiacenza; + } + + public String getGestParticolaritaVarie() { + return gestParticolaritaVarie; + } + + public String getPrimaConsegnaParticolare() { + return primaConsegnaParticolare; + } + + public String getSecondaConsegnaParticolare() { + return secondaConsegnaParticolare; + } + + public void setFlagAnnullamento(String flagAnnullamento) { + this.flagAnnullamento = flagAnnullamento; + } + + public void setCodClieMittente(String codClieMittente) { + this.codClieMittente = codClieMittente; + } + + public void setPOPartenza(Integer pOPartenza) { + POPartenza = pOPartenza; + } + + public void setAnnoSpedizione(Integer annoSpedizione) { + this.annoSpedizione = annoSpedizione; + } + + public void setMeseGiornoSpedizione(Integer meseGiornoSpedizione) { + this.meseGiornoSpedizione = meseGiornoSpedizione; + } + + public void setNumeroSpedizione(String numeroSpedizione) { + this.numeroSpedizione = numeroSpedizione; + } + + public void setCodBolla(String codBolla) { + this.codBolla = codBolla; + } + + public void setPOArrivo(Integer pOArrivo) { + POArrivo = pOArrivo; + } + + public void setDestinatarioRagioneSociale(String destinatarioRagioneSociale) { + this.destinatarioRagioneSociale = destinatarioRagioneSociale; + } + + public void setDestinatarioRagioneSocialeAlt( + String destinatarioRagioneSocialeAlt) { + this.destinatarioRagioneSocialeAlt = destinatarioRagioneSocialeAlt; + } + + public void setDestinatarioIndirizzo(String destinatarioIndirizzo) { + this.destinatarioIndirizzo = destinatarioIndirizzo; + } + + public void setDestinatarioCap(String destinatarioCap) { + this.destinatarioCap = destinatarioCap; + } + + public void setDestinatarioLocalita(String destinatarioLocalita) { + this.destinatarioLocalita = destinatarioLocalita; + } + + public void setDestinatarioProvincia(String destinatarioProvincia) { + this.destinatarioProvincia = destinatarioProvincia; + } + + public void setDestinatarioNazione(String destinatarioNazione) { + this.destinatarioNazione = destinatarioNazione; + } + + public void setPrimoGGChiusuraDest(String primoGGChiusuraDest) { + this.primoGGChiusuraDest = primoGGChiusuraDest; + } + + public void setSecondoGGChiusuraDest(String secondoGGChiusuraDest) { + this.secondoGGChiusuraDest = secondoGGChiusuraDest; + } + + public void setCodTariffa(String codTariffa) { + this.codTariffa = codTariffa; + } + + public void setTipoServizioBolle(String tipoServizioBolle) { + this.tipoServizioBolle = tipoServizioBolle; + } + + public void setImporto(BigDecimal importo) { + this.importo = importo; + } + + public void setDivisaImporto(String divisaImporto) { + this.divisaImporto = divisaImporto; + } + + public void setNaturaMerce(String naturaMerce) { + this.naturaMerce = naturaMerce; + } + + public void setTotSegnaColli(Integer totSegnaColli) { + this.totSegnaColli = totSegnaColli; + } + + public void setPeso(BigDecimal peso) { + this.peso = peso; + } + + public void setVolume(BigDecimal volume) { + this.volume = volume; + } + + public void setQtaDaFatturare(BigDecimal qtaDaFatturare) { + this.qtaDaFatturare = qtaDaFatturare; + } + + public void setContrassegno(BigDecimal contrassegno) { + this.contrassegno = contrassegno; + } + + public void setTipoContrassegno(String tipoContrassegno) { + this.tipoContrassegno = tipoContrassegno; + } + + public void setDivisaContrassegno(String divisaContrassegno) { + this.divisaContrassegno = divisaContrassegno; + } + + public void setGestParticolaritaContrassegno( + String gestParticolaritaContrassegno) { + this.gestParticolaritaContrassegno = gestParticolaritaContrassegno; + } + + public void setCodMittente(String codMittente) { + this.codMittente = codMittente; + } + + public void setMittenteRagioneSociale(String mittenteRagioneSociale) { + this.mittenteRagioneSociale = mittenteRagioneSociale; + } + + public void setNumeroSegnaColloDal(Integer numeroSegnaColloDal) { + this.numeroSegnaColloDal = numeroSegnaColloDal; + } + + public void setNumeroSegnaColloAl(Integer numeroSegnaColloAl) { + this.numeroSegnaColloAl = numeroSegnaColloAl; + } + + public void setCumulativoColli(String cumulativoColli) { + this.cumulativoColli = cumulativoColli; + } + + public void setNote(String note) { + this.note = note; + } + + public void setNoteAggiuntive(String noteAggiuntive) { + this.noteAggiuntive = noteAggiuntive; + } + + public void setZonaSegnaCollo(Integer zonaSegnaCollo) { + this.zonaSegnaCollo = zonaSegnaCollo; + } + + public void setCodTrattamentoMerce(String codTrattamentoMerce) { + this.codTrattamentoMerce = codTrattamentoMerce; + } + + public void setFermoDeposito(String fermoDeposito) { + this.fermoDeposito = fermoDeposito; + } + + public void setDataConsegnaRichiesta(String dataConsegnaRichiesta) { + this.dataConsegnaRichiesta = dataConsegnaRichiesta; + } + + public void setTipoCons(String tipoCons) { + this.tipoCons = tipoCons; + } + + public void setOraConsegnaRichiesta(String oraConsegnaRichiesta) { + this.oraConsegnaRichiesta = oraConsegnaRichiesta; + } + + public void setCodTassazione(String codTassazione) { + this.codTassazione = codTassazione; + } + + public void setFlagTassazione(String flagTassazione) { + this.flagTassazione = flagTassazione; + } + + public void setValoreMerce(BigDecimal valoreMerce) { + this.valoreMerce = valoreMerce; + } + + public void setDivisaMerce(String divisaMerce) { + this.divisaMerce = divisaMerce; + } + + public void setGestParticolaritaConsegna(String gestParticolaritaConsegna) { + this.gestParticolaritaConsegna = gestParticolaritaConsegna; + } + + public void setGestParticolaritaGiacenza(String gestParticolaritaGiacenza) { + this.gestParticolaritaGiacenza = gestParticolaritaGiacenza; + } + + public void setGestParticolaritaVarie(String gestParticolaritaVarie) { + this.gestParticolaritaVarie = gestParticolaritaVarie; + } + + public void setPrimaConsegnaParticolare(String primaConsegnaParticolare) { + this.primaConsegnaParticolare = primaConsegnaParticolare; + } + + public void setSecondaConsegnaParticolare(String secondaConsegnaParticolare) { + this.secondaConsegnaParticolare = secondaConsegnaParticolare; + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/FnVAT.java b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/FnVAT.java new file mode 100644 index 0000000000..e8a9a80346 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/destination/FnVAT.java @@ -0,0 +1,8 @@ +package it.integry.ems.document.export.brt.easysped.destination; + +import com.ancientprogramming.fixedformat4j.annotation.Record; + +@Record +public class FnVAT { + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/pdf/ArrayOfLabelToPrint.java b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/pdf/ArrayOfLabelToPrint.java new file mode 100644 index 0000000000..ce1a273987 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/brt/easysped/pdf/ArrayOfLabelToPrint.java @@ -0,0 +1,137 @@ +/** + * ArrayOfLabelToPrint.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. + */ + +package it.integry.ems.document.export.brt.easysped.pdf; + +public class ArrayOfLabelToPrint implements java.io.Serializable { + private LabelToPrint[] labelToPrint; + + public ArrayOfLabelToPrint() { + } + + public ArrayOfLabelToPrint( + LabelToPrint[] labelToPrint) { + this.labelToPrint = labelToPrint; + } + + + /** + * Gets the labelToPrint value for this ArrayOfLabelToPrint. + * + * @return labelToPrint + */ + public LabelToPrint[] getLabelToPrint() { + return labelToPrint; + } + + + /** + * Sets the labelToPrint value for this ArrayOfLabelToPrint. + * + * @param labelToPrint + */ + public void setLabelToPrint(LabelToPrint[] labelToPrint) { + this.labelToPrint = labelToPrint; + } + + public LabelToPrint getLabelToPrint(int i) { + return this.labelToPrint[i]; + } + + public void setLabelToPrint(int i, LabelToPrint _value) { + this.labelToPrint[i] = _value; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof ArrayOfLabelToPrint)) return false; + ArrayOfLabelToPrint other = (ArrayOfLabelToPrint) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.labelToPrint==null && other.getLabelToPrint()==null) || + (this.labelToPrint!=null && + java.util.Arrays.equals(this.labelToPrint, other.getLabelToPrint()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getLabelToPrint() != null) { + for (int i=0; + i status(HttpServletRequest request) { + + Method[] methods = DocumentExportController.class.getDeclaredMethods(); + + return serviceChecker.getServiceStatus(methods, DocumentExportController.class); + } + + @RequestMapping(value = EmsRestConstants.PATH_EXPORT_DOCUMENT, method = RequestMethod.POST) + public @ResponseBody ServiceRestResponse exportDocument( + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value=EmsRestConstants.USERNAME) String username, + @RequestParam(value=EmsRestConstants.TYPE) String typeImport, + @RequestParam(value=EmsRestConstants.FORMAT) DocumentExportFormat formatImport, + @RequestParam(value="dataDoc", required=false) String dataDoc, + @RequestParam(value="numDoc", required=false) String numDoc, + @RequestParam(value="codDtip", required=false) String codDtip, + @RequestParam(value="codAnag", required=false) String codAnag, + @RequestParam(value="codVdes", required=false) String codVdes, + @RequestBody(required=false) String body) { + + ServiceRestResponse response=null; + try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + + if (formatImport == DocumentExportFormat.SWINGER){ + List list = documentExporterService.exportSwingerFormat(typeImport, formatImport, + username, dataDoc, numDoc, codDtip, codAnag, codVdes); + response = new ServiceRestResponse(EsitoType.OK, list); + }else if (formatImport == DocumentExportFormat.BRT){ + if(body!=null){ + logger.trace("BRT TISIIN: " + body); + response = documentExporterService.exportBrtFormat(body); + }else + throw new Exception("Body del servizio obbligatorio"); + }else if (formatImport == DocumentExportFormat.BRT_ZEBRA){ + if(body!=null){ + logger.trace("BRT TISIIN: " + body); + response = documentExporterService.exportBrtZebraPrinter(body); + }else + throw new Exception("Body del servizio obbligatorio"); + } + } catch (Exception e) { + logger.error(e.toString()); + response = new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e); + } finally { + return response; + } + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/service/DocumentExporterService.java b/ems-document/src/main/java/it/integry/ems/document/export/service/DocumentExporterService.java new file mode 100644 index 0000000000..c552895f74 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/service/DocumentExporterService.java @@ -0,0 +1,437 @@ +package it.integry.ems.document.export.service; + +import it.integry.ems.datasource.DataSource; +import it.integry.ems.db.ResultSetMapper; +import it.integry.ems.document.export.brt.easysped.EasySpedWSServiceImplLocator; +import it.integry.ems.document.export.brt.easysped.Easyspedde_endpointStub; +import it.integry.ems.document.export.brt.easysped.destination.DestinationAddress; +import it.integry.ems.document.export.brt.easysped.destination.DestinationAddressOut; +import it.integry.ems.document.export.brt.easysped.pdf.ArrayOfLabelToPrint; +import it.integry.ems.document.export.brt.easysped.pdf.LabelToPrint; +import it.integry.ems.document.export.brt.easysped.pdf.LabelToPrintTipiEtichetta; +import it.integry.ems.document.export.swinger.AsnFooter; +import it.integry.ems.document.export.swinger.AsnHeader; +import it.integry.ems.document.export.swinger.AsnItem; +import it.integry.ems.document.export.swinger.InvRecord; +import it.integry.ems.document.export.swinger.SwingerResponse; +import it.integry.ems.document.type.DocumentExportFormat; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.response.EsitoType; +import it.integry.ems.response.FileItem; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.service.SetupGest; +import it.integry.ems.util.NullAwareBeanUtilsBean; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; + +import java.io.BufferedReader; +import java.io.StringReader; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +import org.apache.commons.beanutils.BeanUtilsBean; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; + +import com.ancientprogramming.fixedformat4j.format.FixedFormatManager; +import com.ancientprogramming.fixedformat4j.format.impl.FixedFormatManagerImpl; +import com.google.common.base.Joiner; + +@Service +@Scope(value = "request") +public class DocumentExporterService { + + @Autowired + private DataSource ds; + @Autowired + private SetupGest setupGest; + @Autowired + private EmsProperties emsProperties; + + private Boolean isErrore; + private FixedFormatManager manager = new FixedFormatManagerImpl(); + + public List exportSwingerFormat(String type, DocumentExportFormat format, String username, String dataDoc, + String numDoc, String codDtip, String codAnag, String codVdes) throws SQLException, Exception { + + PreparedStatement psClie = ds.getConnection().prepareStatement("select cod_anag from wtb_clie where user_name = '" + username + "'"); + List anags = new ArrayList(); + ResultSet rsClie = psClie.executeQuery(); + while(rsClie.next()){ + anags.add(rsClie.getString("cod_anag")); + } + psClie.close(); + rsClie.close(); + codAnag = Joiner.on("|").skipNulls().join(anags); + + if(!"".equals(codAnag)){ + + List whereCond = new ArrayList(); + whereCond.add(SqlFieldHolder.getSqlCond("dtb_doct", "data_doc", dataDoc, "D")); + whereCond.add(SqlFieldHolder.getSqlCond("dtb_doct", "num_doc", numDoc.toString(), "N")); + whereCond.add(SqlFieldHolder.getSqlCond("dtb_doct", "cod_dtip", codDtip, "")); + whereCond.add(SqlFieldHolder.getSqlCond("dtb_doct", "cod_vdes", codVdes, "")); + whereCond.add(SqlFieldHolder.getSqlCond("dtb_doct", "cod_anag", codAnag, "")); + + String sql = "select num_doc, data_doc, ser_doc, cod_dtip, cod_anag from dtb_doct " + + "where " + Joiner.on(" AND ").skipNulls().join(whereCond); + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + List list = new ArrayList(); + while(rs.next()){ + Integer numDocInt = rs.getInt("num_doc"); + String serDoc = rs.getString("ser_doc"); + codAnag = rs.getString("cod_anag"); + codDtip = rs.getString("cod_dtip"); + dataDoc = new SimpleDateFormat("yyyy-MM-dd").format(rs.getDate("data_doc")); + + list.addAll(swingerExport(type, format, username, numDocInt, dataDoc, serDoc, codDtip, codAnag)); + } + + rs.close(); + return list; + }else{ + throw new Exception("Nessun cliente trovato per l'esportazione"); + } + } + + private List swingerExport(String type, DocumentExportFormat format, String username, Integer numDoc, + String dataDoc, String serDoc, String codDtip, String codAnag) throws Exception { + + List list = new ArrayList(); + String header, footer; + + ResultSetMapper invMapper = new ResultSetMapper(); + ResultSetMapper asnHMapper = new ResultSetMapper(); + ResultSetMapper asnIMapper = new ResultSetMapper(); + + String multiplier = "1.0"; + Object result = setupGest.getSetup(ds.getConnection(),"EXPORT_DOCUMENTI", "SWINGER", "MAGGIORAZIONE", ""); + if(result != null && result != "") + multiplier = result.toString(); + + String checkComposizione = "SELECT DISTINCT art.cod_mart, art.descrizione from mtb_aart art, ttb_style style, dtb_docr doc" + + " WHERE doc.num_doc="+numDoc+" and doc.cod_anag="+UtilityDB.valueToString(codAnag) + + " and doc.cod_dtip="+UtilityDB.valueToString(codDtip)+" and doc.data_doc="+UtilityDB.valueToString(dataDoc)+" and doc.ser_doc="+UtilityDB.valueToString(serDoc) + + " and style.cod_style = art.cod_mart and doc.cod_mart = art.cod_mart and style.des_comp is null"; + PreparedStatement psCheckComposizione = ds.getConnection().prepareStatement(checkComposizione); + ResultSet rsCheckComp = psCheckComposizione.executeQuery(); + String errorComposizione = ""; + while(rsCheckComp.next()) { + errorComposizione += rsCheckComp.getString("cod_mart")+"-"+rsCheckComp.getString("descrizione")+System.getProperty("line.separator"); + } + rsCheckComp.close(); + psCheckComposizione.close(); + + if(!"".equals(errorComposizione)) + throw new Exception("COMPOSIZIONE NON PRESENTE IN " + errorComposizione); + + String sqlInv = "select DISTINCT art.cod_mart, col.cod_col, doc.cod_tagl, art.descrizione desc_art, '' as tessuto, " + + "case when style.cod_line = 'BYU' or style.cod_line = 'BYBN' THEN 'BYBLOS BAMBINO'" + + " when style.cod_line = 'BYG' or style.cod_line = 'BYB' or style.cod_line = 'BYN' THEN 'BYBLOS BAMBINA'" + + " end as linea," + +" case when right(style.anno_stag, 2) = 'PE' THEN 'P/E ' + SUBSTRING(style.anno_stag, 3, 2)" + +" when right(style.anno_stag, 2) = 'AI' THEN 'A/I' + SUBSTRING(style.anno_stag, 3, 2)+ CAST((SUBSTRING(style.anno_stag, 3, 2) + 1) AS VARCHAR)" + +" END AS anno_stag, LEFT(style.des_comp, 30) as des_comp, " + + "case when style.cod_line = 'BYU' or style.cod_line = 'BYBN' THEN 'BYBLOSO'" + + " when style.cod_line = 'BYG' or style.cod_line = 'BYB' or style.cod_line = 'BYN' THEN 'BYBLOSA'" + + " end as abbr_linea, " + +" case when right(style.anno_stag, 2) = 'PE' THEN 56 + CAST(SUBSTRING(style.anno_stag, 1, 4) AS INT) - 2014" + +" when right(style.anno_stag, 2) = 'AI' THEN 57 + CAST((SUBSTRING(style.anno_stag, 3, 2) + 1) AS INT) - 14" + +" END AS cod_stagione," + +" col.descrizione as desc_col, doc.val_unt * (1 + aliq.perc_aliq/100) as cost, ROUND(doc.val_unt * (1 + aliq.perc_aliq/100) * " + multiplier + ", 0) as prezzo_retail, doc.val_unt * (1 + aliq.perc_aliq/100) as prezzo2, doc.val_unt * (1 + aliq.perc_aliq/100) as prezzo3," + +" isnull(barcode.cod_barre, '') as upc, isnull(barcode.cod_barre, '') as alu, " + +" right(replicate('0',4)+cast(testata.cod_vdes as varchar(15)),4) as cod_vdes, art_anag.cod_mart_anag as dcs" + +" from mtb_aart art, dtb_docr doc left outer join ttb_bar_code barcode on doc.cod_mart = barcode.cod_style and" + +" doc.cod_col = barcode.cod_col and" + +" doc.cod_tagl = barcode.cod_tagl" + +" left outer join mtb_aart_anag art_anag on doc.cod_mart = art_anag.cod_mart and" + +" doc.cod_col = art_anag.cod_col and" + +" doc.cod_tagl = art_anag.cod_tagl," + +" dtb_doct testata, gtb_aliq aliq, ttb_style style , ttb_style_colori col" + +" where testata.num_doc="+numDoc+" and testata.cod_anag='"+codAnag+"' " + +" and testata.cod_dtip='"+codDtip+"' and testata.data_doc='"+dataDoc+"' and testata.ser_doc='"+serDoc+"'" + +" and doc.cod_aliq = aliq.cod_aliq" + +" and testata.num_doc = doc.num_doc and testata.cod_anag = doc.cod_anag and testata.cod_dtip = doc.cod_dtip and" + +" testata.data_doc = doc.data_doc and testata.ser_doc = doc.ser_doc" + +" and art.cod_mart = doc.cod_mart and" + +" col.cod_col=doc.cod_col" + +" and art.cod_mart = style.cod_style and" + +" style.cod_style = col.cod_style" + +" order by art.cod_mart, doc.cod_tagl, col.cod_col"; + PreparedStatement psInv = ds.getConnection().prepareStatement(sqlInv); + + String sqlItems = "select doc.cod_mart, doc.cod_tagl, doc.cod_col, " + + "doc.val_unt * (1 + aliq.perc_aliq/100) as cost, barcode.cod_barre as upc, barcode.cod_barre as alu, sum(doc.qta_doc) doc_qty" + +" from gtb_aliq aliq, dtb_docr doc left outer join ttb_bar_code barcode " + +" on doc.cod_mart = barcode.cod_style and doc.cod_col = barcode.cod_col and doc.cod_tagl = barcode.cod_tagl" + +" where doc.num_doc="+numDoc+" and doc.cod_anag='"+codAnag+"'" + +" and doc.cod_dtip='"+codDtip+"' and doc.data_doc='"+dataDoc+"'" + +" and doc.ser_doc='"+serDoc+"'" + +" and doc.cod_aliq = aliq.cod_aliq" + +" and doc.cod_mart is not null" + +" group by doc.cod_mart, doc.cod_tagl, doc.cod_col, doc.val_unt * (1 + aliq.perc_aliq/100), barcode.cod_barre" + +" order by doc.cod_mart, doc.cod_tagl, doc.cod_col"; + PreparedStatement psItems = ds.getConnection().prepareStatement(sqlItems); + + String sqlHeader = "select num_doc num_ddt, num_ord, cod_vdes, isnull(num_doc_val, num_doc) as num_fatt, " + + "isnull(data_doc_val, data_doc) as data_ddt, isnull(data_doc_val, data_doc) as data_fatt" + +" from dtb_doct" + +" where num_doc="+numDoc+" and cod_anag='"+codAnag+"' " + +" and cod_dtip='"+codDtip+"' and data_doc='"+dataDoc+"'" + +" and ser_doc='"+serDoc+"'"; + PreparedStatement psHeader = ds.getConnection().prepareStatement(sqlHeader); + + ResultSet rsInv = psInv.executeQuery(); + ResultSet rsItems = psItems.executeQuery(); + ResultSet rsHeader = psHeader.executeQuery(); + + List invList = invMapper.mapResultSetToList(rsInv, InvRecord.class); + List itemsList = asnIMapper.mapResultSetToList(rsItems, AsnItem.class); + List headerList = asnHMapper.mapResultSetToList(rsHeader, AsnHeader.class); + + psInv.close(); + psItems.close(); + psHeader.close(); + + String lineInv = "", lineAsn = ""; + + int count = 0, size=0; + int countFileName = 1; + + String sqlFile = "select file_name from wtb_users_info " + + "where User_name='"+username+"' AND export_type = '"+type+"' AND format_file ='"+format+"'"; + PreparedStatement psFileName = ds.getConnection().prepareStatement(sqlFile); + ResultSet rsFileName = psFileName.executeQuery(); + if(rsFileName != null && rsFileName.next()){ + countFileName = rsFileName.getInt("file_name"); + } + psFileName.close(); + if(rsFileName != null) + rsFileName.close(); + + String vendorCode = (String) setupGest. + getSetup(ds.getConnection(), "w_eexport_docu_dlg", "SETUP_SWINGER", "VENDOR_CODE", ""); + + String headerNum; + + checkInvListHasNoDcs(invList); + + if(itemsList != null){ + while(size < itemsList.size()){ + // + headerNum = "1" + String.valueOf(countFileName) + numDoc; + + while((size < itemsList.size() || size < invList.size()) && count < 500) { + invList.get(size).setVendorCode(vendorCode); + lineInv += manager.export(invList.get(size)) + "\n"; + //set del header num + itemsList.get(size).setHeaderNum(headerNum); + lineAsn += manager.export(itemsList.get(size)) + "\n"; + count++; + size++; + } + AsnFooter asnFooter = new AsnFooter(); + asnFooter.setHeaderNum(headerNum); + headerList.get(0).setHeaderNum(headerNum); + headerList.get(0).setVendorCode(vendorCode); + + header = manager.export(headerList.get(0)); + footer = manager.export(asnFooter); + String patternName = UtilityString.leftPad(String.valueOf(countFileName), 8, '0'); + list.add(new SwingerResponse(new FileItem(patternName+".INV", lineInv), + new FileItem(patternName+".ASN", header+"\n" + lineAsn + footer + "\n"))); + + count = 0; + countFileName++; + lineInv = ""; + lineAsn = ""; + } + + //UPDATE FILE NAME NELLA WTB USERS INFO + PreparedStatement psUpdateFilename = ds.getConnection().prepareStatement("UPDATE wtb_users_info SET file_name = " + countFileName++ + + "where User_name='"+username+"' AND export_type = '"+type+"' AND format_file ='"+format+"'"); + psUpdateFilename.executeUpdate(); + psUpdateFilename.close(); + ds.getConnection().commit(); + } else { + throw new Exception("Dati non trovati"); + } + return list; + } + + private void checkInvListHasNoDcs(List invList) throws Exception { + for (InvRecord invRecord : invList) { + if(UtilityString.isNullOrEmpty(invRecord.getDepartmentCode())) { + throw new Exception("Impossibile esportare: DCS mancante per " + invRecord.getDesc1() + " " + + invRecord.getCodCol() + " " + invRecord.getSize() + ". Rivolgersi a Swinger."); + } + } + } + + public ServiceRestResponse exportBrtFormat(String body) throws Exception { + ArrayOfLabelToPrint array = new ArrayOfLabelToPrint(); + + List destinatari = new ArrayList(); + isErrore=false; + + Easyspedde_endpointStub binding; + try { + binding = (Easyspedde_endpointStub) + new EasySpedWSServiceImplLocator().geteasyspedde_endpoint(emsProperties.getEndPointBrtWS()); + } catch (javax.xml.rpc.ServiceException jre) { + if(jre.getLinkedCause()!=null) + jre.getLinkedCause().printStackTrace(); + throw new Exception("JAX-RPC ServiceException caught: " + jre); + } + + LabelToPrint[] lbls = validateBrt(body, destinatari, array, binding); + + List list = new ArrayList(); + + String fileContent = ""; + for (DestinationAddress destinationAddress : destinatari) { + fileContent += manager.export(destinationAddress) + "\n"; + } + list.add(new FileItem("TISI57OUT.DAT", fileContent)); + + if(isErrore) { + ServiceRestResponse resp = new ServiceRestResponse(EsitoType.OK, list); + resp.setErrorMessage("Controllare le anomalie sui dati."); + return resp; + } else { + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); + Date now = new Date(); + Integer k = 1; + // 32 max limit array size + for (int j = 0; j < lbls.length;) { + LabelToPrint[] lblsSplitted = Arrays.copyOfRange(lbls, j, Math.min(j+32, lbls.length)); + + array.setLabelToPrint(lblsSplitted); + + byte[] pdfEtichette = binding.getLabelPDF(array, new Boolean(false), new Integer(1)); + list.add(new FileItem(sdf.format(now) + "_ETICHETTE_" + k + ".PDF", pdfEtichette)); + j += 32; + k++; + } + return new ServiceRestResponse(EsitoType.OK, list); + } + } + + public ServiceRestResponse exportBrtZebraPrinter(String body) throws Exception { + ArrayOfLabelToPrint array = new ArrayOfLabelToPrint(); + + List destinatari = new ArrayList(); + isErrore = false; + + Easyspedde_endpointStub binding; + try { + binding = (Easyspedde_endpointStub) + new EasySpedWSServiceImplLocator().geteasyspedde_endpoint(emsProperties.getEndPointBrtWS()); + } catch (javax.xml.rpc.ServiceException jre) { + if(jre.getLinkedCause()!=null) + jre.getLinkedCause().printStackTrace(); + throw new Exception("JAX-RPC ServiceException caught: " + jre); + } + + LabelToPrint[] lbls = validateBrt(body, destinatari, array, binding); + + List list = new ArrayList(); + + String fileContent = ""; + for (DestinationAddress destinationAddress : destinatari) { + fileContent += manager.export(destinationAddress) + "\n"; + } + list.add(new FileItem("TISI57OUT.DAT", fileContent)); + + if(isErrore) { + ServiceRestResponse resp = new ServiceRestResponse(EsitoType.OK, list); + resp.setErrorMessage("Controllare le anomalie sui dati."); + return resp; + } else { + array.setLabelToPrint(lbls); + String printZebra = binding.getLabelForZebraPrinter(array, 130, 30); + list.add(new FileItem("zebra.txt", printZebra)); + + return new ServiceRestResponse(EsitoType.OK, list); + } + } + + private LabelToPrint[] validateBrt(String body, List destinatari, + ArrayOfLabelToPrint array, Easyspedde_endpointStub binding) throws Exception { + + BufferedReader bufReader = new BufferedReader(new StringReader(body)); + String line=null; + while((line=bufReader.readLine()) != null){ + destinatari.add(manager.load(DestinationAddress.class, line)); + } + + // Time out after a minute + binding.setTimeout(600000); + + LabelToPrint[] lbls = new LabelToPrint[destinatari.size()]; + int i=0; + + for (DestinationAddress dest : destinatari) { + + if("IT".equals(dest.getDestinatarioNazione().trim())) { + dest.setDestinatarioNazione(null); + } + + DestinationAddressOut value = null; + value = binding.calculateBRTSort(dest); + + BeanUtilsBean beanUtils = new NullAwareBeanUtilsBean(); + beanUtils.copyProperties(dest, value); + if(UtilityString.isNullOrEmpty(value.getDestinatarioProvinciaAlt())) + dest.setDestinatarioProvincia(value.getDestinatarioProvincia()); + else + dest.setDestinatarioProvincia(value.getDestinatarioProvinciaAlt()); + + if(!UtilityString.isNullOrEmpty(value.getCodiceErrore())) + isErrore = true; + else { + LabelToPrint lbl = new LabelToPrint(); + BeanUtils.copyProperties(dest, lbl); + lbl.setFlagRistampa(dest.getRistampa()); + lbl.setNumeroSegnaCollo(dest.getNumeroSegnaCollo()); + lbl.setNumeroSegnaColloDi(dest.getNumSegnaColloDi()); + lbl.setTotaleSegnaColli(dest.getTotSegnaColli()); + lbl.setCodiceIsoNazione(value.getNazioneISO()); + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + Date dataSped = sdf.parse(dest.getAnnoSpedizione().toString() + dest.getMeseGiornoSpedizione().toString()); + Calendar cal = Calendar.getInstance(); + cal.setTime(dataSped); + lbl.setDataSpedizione(cal); + + lbl.setFlagVolumeBollettato(""); + lbl.setTipoEtichetta(LabelToPrintTipiEtichetta.value1); + + lbl.setNumeroRifNumerico(1L); + lbl.setNumeroSpedizione(1); + + if(dest.getFilialeSegnaCollo() == null || dest.getFilialeSegnaCollo() == 0) + lbl.setPOSegnacollo(dest.getPOPartenza()); + else + lbl.setPOSegnacollo(dest.getFilialeSegnaCollo()); + + lbl.setPOArrivoDescrizione(dest.getPOArrivoDes()); + lbl.setPOPartenzaDescrizione(dest.getPOPartenzaDes()); + lbl.setTipoStampaNetwork(" "); + lbls[i] = lbl; + i++; + } + } + return lbls; + } +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnFooter.java b/ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnFooter.java new file mode 100644 index 0000000000..a556bfe4b9 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnFooter.java @@ -0,0 +1,55 @@ +package it.integry.ems.document.export.swinger; + +import com.ancientprogramming.fixedformat4j.annotation.Align; +import com.ancientprogramming.fixedformat4j.annotation.Field; +import com.ancientprogramming.fixedformat4j.annotation.Record; + +@Record +public class AsnFooter { + + private String recordType = "S"; + + private String headerNum; + + private String comment1; + + private String comment2; + + @Field(offset=1, length=1) + public String getRecordType() { + return recordType; + } + + @Field(offset=2, length=21, align=Align.RIGHT, paddingChar='0') + public String getHeaderNum() { + return headerNum; + } + + @Field(offset=23, length=60) + public String getComment1() { + return comment1; + } + + @Field(offset=83, length=60) + public String getComment2() { + return comment2; + } + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + public void setHeaderNum(String headerNum) { + this.headerNum = headerNum; + } + + public void setComment1(String comment1) { + this.comment1 = comment1; + } + + public void setComment2(String comment2) { + this.comment2 = comment2; + } + + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnHeader.java b/ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnHeader.java new file mode 100644 index 0000000000..d931eb3987 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnHeader.java @@ -0,0 +1,167 @@ +package it.integry.ems.document.export.swinger; + +import it.integry.ems.annotation.SqlField; + +import java.util.Date; + +import com.ancientprogramming.fixedformat4j.annotation.Align; +import com.ancientprogramming.fixedformat4j.annotation.Field; +import com.ancientprogramming.fixedformat4j.annotation.FixedFormatPattern; +import com.ancientprogramming.fixedformat4j.annotation.Record; + +@Record +public class AsnHeader { + + private String recordType = "H"; + + private String headerNum; + + @SqlField("num_ord") + private Integer poNumber; + + private String subPckBcd; + + @SqlField("num_ddt") + private Integer shipmentNumber; + + private String vendorCode; + + @SqlField("cod_vdes") + private String subsid; + + private String store="001"; + + private String station="I"; + + @SqlField("num_fatt") + private Integer paymentInvoice; + + @SqlField("data_ddt") + private Date invoiceDate; + + @SqlField("data_fatt") + private Date voucherDate; + + private String divisa="EURO"; + + @Field(offset=1, length=1) + public String getRecordType() { + return recordType; + } + + @Field(offset=2, length=21, align=Align.RIGHT, paddingChar='0') + public String getHeaderNum() { + return headerNum; + } + + @Field(offset=23, length=20) + public Integer getPoNumber() { + return poNumber; + } + + @Field(offset=43, length=21) + public String getSubPckBcd() { + return subPckBcd; + } + + @Field(offset=64, length=16) + public Integer getShipmentNumber() { + return shipmentNumber; + } + + @Field(offset=80, length=6) + public String getVendorCode() { + return vendorCode; + } + + @Field(offset=86, length=4, align=Align.RIGHT, paddingChar='0') + public String getSubsid() { + return subsid; + } + + @Field(offset=90, length=3) + public String getStore() { + return store; + } + + @Field(offset=93, length=1) + public String getStation() { + return station; + } + + @Field(offset=94, length=15) + public Integer getPaymentInvoice() { + return paymentInvoice; + } + + @Field(offset=109, length=8) + @FixedFormatPattern("ddMMyyyy") + public Date getInvoiceDate() { + return invoiceDate; + } + + @Field(offset=117, length=8) + @FixedFormatPattern("ddMMyyyy") + public Date getVoucherDate() { + return voucherDate; + } + + @Field(offset=125, length=10) + public String getDivisa() { + return divisa; + } + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + public void setHeaderNum(String headerNum) { + this.headerNum = headerNum; + } + + public void setPoNumber(Integer poNumber) { + this.poNumber = poNumber; + } + + public void setSubPckBcd(String subPckBcd) { + this.subPckBcd = subPckBcd; + } + + public void setShipmentNumber(Integer shipmentNumber) { + this.shipmentNumber = shipmentNumber; + } + + public void setVendorCode(String vendorCode) { + this.vendorCode = vendorCode; + } + + public void setSubsid(String subsid) { + this.subsid = subsid; + } + + public void setStore(String store) { + this.store = store; + } + + public void setStation(String station) { + this.station = station; + } + + public void setPaymentInvoice(Integer paymentInvoice) { + this.paymentInvoice = paymentInvoice; + } + + public void setInvoiceDate(Date invoiceDate) { + this.invoiceDate = invoiceDate; + } + + public void setVoucherDate(Date voucherDate) { + this.voucherDate = voucherDate; + } + + public void setDivisa(String divisa) { + this.divisa = divisa; + } + + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnItem.java b/ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnItem.java new file mode 100644 index 0000000000..59875275c0 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/swinger/AsnItem.java @@ -0,0 +1,114 @@ +package it.integry.ems.document.export.swinger; + +import it.integry.ems.annotation.SqlField; + +import java.math.BigDecimal; + +import com.ancientprogramming.fixedformat4j.annotation.Align; +import com.ancientprogramming.fixedformat4j.annotation.Field; +import com.ancientprogramming.fixedformat4j.annotation.FixedFormatDecimal; +import com.ancientprogramming.fixedformat4j.annotation.Record; + +@Record +public class AsnItem { + + private String recordType = "I"; + + private String headerNum; + + @SqlField("upc") + private String voucherUpc; + + private BigDecimal voucherItemOrigQty=new BigDecimal(0); + + @SqlField("doc_qty") + private BigDecimal voucherItemQty=new BigDecimal(0); + + @SqlField("cost") + private BigDecimal voucherItemCost=new BigDecimal(0); + + @SqlField("alu") + private String voucherAlu; + + @Field(offset=1, length=1) + public String getRecordType() { + return recordType; + } + + @Field(offset=2, length=21, align=Align.RIGHT, paddingChar='0') + public String getHeaderNum() { + return headerNum; + } + + @Field(offset=23, length=18, align=Align.RIGHT) + public String getVoucherUpc() { + return voucherUpc; + } + + @Field(offset=41, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getVoucherItemOrigQty() { + return voucherItemOrigQty; + } + + @Field(offset=55, length=1) + public String getSpace1() { + return ""; + } + + @Field(offset=56, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getVoucherItemQty() { + return voucherItemQty; + } + + @Field(offset=70, length=1) + public String getSpace2() { + return ""; + } + + @Field(offset=71, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getVoucherItemCost() { + return voucherItemCost; + } + + @Field(offset=85, length=1) + public String getSpace3() { + return ""; + } + + @Field(offset=86, length=13, align=Align.RIGHT) + public String getVoucherAlu() { + return voucherAlu; + } + + public void setRecordType(String recordType) { + this.recordType = recordType; + } + + public void setHeaderNum(String headerNum) { + this.headerNum = headerNum; + } + + public void setVoucherUpc(String voucherUpc) { + this.voucherUpc = voucherUpc; + } + + public void setVoucherItemOrigQty(BigDecimal voucherItemOrigQty) { + this.voucherItemOrigQty = voucherItemOrigQty; + } + + public void setVoucherItemQty(BigDecimal voucherItemQty) { + this.voucherItemQty = voucherItemQty; + } + + public void setVoucherItemCost(BigDecimal voucherItemCost) { + this.voucherItemCost = voucherItemCost; + } + + public void setVoucherAlu(String voucherAlu) { + this.voucherAlu = voucherAlu; + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/swinger/InvRecord.java b/ems-document/src/main/java/it/integry/ems/document/export/swinger/InvRecord.java new file mode 100644 index 0000000000..17c955e57c --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/swinger/InvRecord.java @@ -0,0 +1,763 @@ +package it.integry.ems.document.export.swinger; + +import it.integry.ems.annotation.SqlField; + +import java.math.BigDecimal; + +import com.ancientprogramming.fixedformat4j.annotation.Align; +import com.ancientprogramming.fixedformat4j.annotation.Field; +import com.ancientprogramming.fixedformat4j.annotation.FixedFormatDecimal; +import com.ancientprogramming.fixedformat4j.annotation.Record; + +@Record +public class InvRecord { + + private String vendorCode; + + @SqlField("dcs") + private String departmentCode; + + @SqlField("cod_mart") + private String desc1; + + @SqlField("desc_art") + private String desc2; + + @SqlField("des_comp") + private String desc3; + + private String desc4; + + @SqlField("cod_col") + private String codCol; + + @SqlField("cod_tagl") + private String size; + + @SqlField("linea") + private String linea; + + @SqlField("desc_col") + private String desCol; + + private String aux3; + + private String aux4; + + private String aux5; + + private String aux6; + + private String aux7; + + private String aux8; + + private String scala; + + @SqlField("cost") + private BigDecimal cost; + + @SqlField("upc") + private String upc; + + @SqlField("alu") + private String alu; + + @SqlField("prezzo_retail") + private BigDecimal priceLevel1 = new BigDecimal("0.00"); + + @SqlField("prezzo2") + private BigDecimal priceLevel2 = new BigDecimal("0.00"); + + @SqlField("prezzo3") + private BigDecimal priceLevel3 = new BigDecimal("0.00"); + + private BigDecimal priceLevel4 = new BigDecimal("0.00"); + + private BigDecimal priceLevel5 = new BigDecimal("0.00"); + + private BigDecimal priceLevel6 = new BigDecimal("0.00"); + + private BigDecimal priceLevel7 = new BigDecimal("0.00"); + + private BigDecimal priceLevel8 = new BigDecimal("0.00"); + + private String alternateVC1; + private String alternateAlu1; + private String alternateUpc1; + + private String alternateVC2; + private String alternateAlu2; + private String alternateUpc2; + + private String alternateVC3; + private String alternateAlu3; + private String alternateUpc3; + + private String alternateVC4; + private String alternateAlu4; + private String alternateUpc4; + + private String alternateVC5; + private String alternateAlu5; + private String alternateUpc5; + + private String alternateVC6; + private String alternateAlu6; + private String alternateUpc6; + + @SqlField("anno_stag") + private String stagione; + + @SqlField("cod_stagione") + private Integer codStagione; + + @SqlField("abbr_linea") + private String abbrLinea; + + private String misc4; + + @SqlField("cod_vdes") + private String sbs; + + private String divisa="EURO"; + + private String kitItemType; + private String taxCode; + + private String longDescription; + + private String kitComp1Upc1; + private String kitComp2Upc2; + private String kitComp3Upc3; + private String kitComp4Upc4; + + private String kitComp1Alu1; + + private String kitComp1Alu2; + + private String kitComp1Alu3; + + private String kitComp1Alu4; + + + @Field(offset=1, length=6) + public String getVendorCode() { + return vendorCode; + } + + @Field(offset=7, length=9) + public String getDepartmentCode() { + return departmentCode; + } + + @Field(offset=16, length=30) + public String getDesc1() { + return desc1; + } + + @Field(offset=46, length=30) + public String getDesc2() { + return desc2; + } + + @Field(offset=76, length=30) + public String getDesc3() { + return desc3; + } + + @Field(offset=106, length=30) + public String getDesc4() { + return desc4; + } + + @Field(offset=136, length=8) + public String getCodCol() { + return codCol; + } + + @Field(offset=144, length=8) + public String getSize() { + return size; + } + + @Field(offset=152, length=20) + public String getLinea() { + return linea; + } + + @Field(offset=172, length=20) + public String getDesCol() { + return desCol; + } + + @Field(offset=192, length=20) + public String getAux3() { + return aux3; + } + + @Field(offset=212, length=20) + public String getAux4() { + return aux4; + } + + @Field(offset=232, length=20) + public String getAux5() { + return aux5; + } + + @Field(offset=252, length=20) + public String getAux6() { + return aux6; + } + + @Field(offset=272, length=20) + public String getAux7() { + return aux7; + } + + @Field(offset=292, length=20) + public String getAux8() { + return aux8; + } + + @Field(offset=312, length=3) + public String getScala() { + return scala; + } + + @Field(offset=315, length=15, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getCost() { + return cost; + } + + @Field(offset=330, length=18, align=Align.RIGHT) + public String getUpc() { + return upc; + } + + @Field(offset=348, length=20, align=Align.RIGHT) + public String getAlu() { + return alu; + } + + @Field(offset=368, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getPriceLevel1() { + return priceLevel1; + } + + @Field(offset=382, length=1) + public String getSpace1() { + return ""; + } + + @Field(offset=383, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getPriceLevel2() { + return priceLevel2; + } + + @Field(offset=397, length=1) + public String getSpace2() { + return ""; + } + + @Field(offset=398, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getPriceLevel3() { + return priceLevel3; + } + + @Field(offset=412, length=1) + public String getSpace3() { + return ""; + } + + @Field(offset=413, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getPriceLevel4() { + return priceLevel4; + } + + @Field(offset=427, length=1) + public String getSpace4() { + return ""; + } + + @Field(offset=428, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getPriceLevel5() { + return priceLevel5; + } + + @Field(offset=442, length=1) + public String getSpace5() { + return ""; + } + + @Field(offset=443, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getPriceLevel6() { + return priceLevel6; + } + + @Field(offset=457, length=1) + public String getSpace6() { + return ""; + } + + @Field(offset=458, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getPriceLevel7() { + return priceLevel7; + } + + @Field(offset=472, length=1) + public String getSpace7() { + return ""; + } + + @Field(offset=473, length=14, align=Align.RIGHT, paddingChar='0') + @FixedFormatDecimal(useDecimalDelimiter = true) + public BigDecimal getPriceLevel8() { + return priceLevel8; + } + + @Field(offset=487, length=1) + public String getSpace8() { + return ""; + } + + @Field(offset=488, length=6) + public String getAlternateVC1() { + return alternateVC1; + } + + @Field(offset=494, length=20) + public String getAlternateAlu1() { + return alternateAlu1; + } + + @Field(offset=514, length=18, paddingChar='0') + public String getAlternateUpc1() { + return alternateUpc1; + } + + @Field(offset=532, length=6) + public String getAlternateVC2() { + return alternateVC2; + } + + @Field(offset=538, length=20) + public String getAlternateAlu2() { + return alternateAlu2; + } + + @Field(offset=558, length=18, paddingChar='0') + public String getAlternateUpc2() { + return alternateUpc2; + } + + @Field(offset=576, length=6) + public String getAlternateVC3() { + return alternateVC3; + } + + @Field(offset=582, length=20) + public String getAlternateAlu3() { + return alternateAlu3; + } + + @Field(offset=602, length=18, paddingChar='0') + public String getAlternateUpc3() { + return alternateUpc3; + } + + @Field(offset=620, length=6) + public String getAlternateVC4() { + return alternateVC4; + } + + @Field(offset=626, length=20) + public String getAlternateAlu4() { + return alternateAlu4; + } + + @Field(offset=646, length=18, paddingChar='0') + public String getAlternateUpc4() { + return alternateUpc4; + } + + @Field(offset=664, length=6) + public String getAlternateVC5() { + return alternateVC5; + } + + @Field(offset=670, length=20) + public String getAlternateAlu5() { + return alternateAlu5; + } + + @Field(offset=690, length=18, paddingChar='0') + public String getAlternateUpc5() { + return alternateUpc5; + } + + @Field(offset=708, length=6) + public String getAlternateVC6() { + return alternateVC6; + } + + @Field(offset=714, length=20) + public String getAlternateAlu6() { + return alternateAlu6; + } + + @Field(offset=734, length=18, paddingChar='0') + public String getAlternateUpc6() { + return alternateUpc6; + } + + @Field(offset=752, length=7) + public String getStagione() { + return stagione; + } + + @Field(offset=759, length=7) + public Integer getCodStagione() { + return codStagione; + } + + @Field(offset=766, length=7) + public String getAbbrLinea() { + return abbrLinea; + } + + @Field(offset=773, length=7) + public String getMisc4() { + return misc4; + } + + @Field(offset=780, length=4) + public String getSbs() { + return sbs; + } + + @Field(offset=784, length=10) + public String getDivisa() { + return divisa; + } + + @Field(offset=794, length=2, paddingChar='0') + public String getKitItemType() { + return kitItemType; + } + + @Field(offset=796, length=2, paddingChar='0') + public String getTaxCode() { + return taxCode; + } + + @Field(offset=798, length=256) + public String getLongDescription() { + return longDescription; + } + + @Field(offset=1054, length=18, paddingChar='0') + public String getKitComp1Upc1() { + return kitComp1Upc1; + } + + @Field(offset=1072, length=18, paddingChar='0') + public String getKitComp2Upc2() { + return kitComp2Upc2; + } + + @Field(offset=1090, length=18, paddingChar='0') + public String getKitComp3Upc3() { + return kitComp3Upc3; + } + + @Field(offset=1108, length=18, paddingChar='0') + public String getKitComp4Upc4() { + return kitComp4Upc4; + } + + @Field(offset=1126, length=20) + public String getKitComp1Alu1() { + return kitComp1Alu1; + } + + @Field(offset=1146, length=20) + public String getKitComp1Alu2() { + return kitComp1Alu2; + } + + @Field(offset=1166, length=20) + public String getKitComp1Alu3() { + return kitComp1Alu3; + } + + @Field(offset=1186, length=20) + public String getKitComp1Alu4() { + return kitComp1Alu4; + } + + + ///////////////////////////////////// + public void setVendorCode(String vendorCode) { + this.vendorCode = vendorCode; + } + + public void setDepartmentCode(String departmentCode) { + this.departmentCode = departmentCode; + } + + public void setDesc1(String desc1) { + this.desc1 = desc1; + } + + public void setDesc2(String desc2) { + this.desc2 = desc2; + } + + public void setDesc3(String desc3) { + this.desc3 = desc3; + } + + public void setDesc4(String desc4) { + this.desc4 = desc4; + } + + public void setCodCol(String codCol) { + this.codCol = codCol; + } + + public void setSize(String size) { + this.size = size; + } + + public void setLinea(String linea) { + this.linea = linea; + } + + public void setDesCol(String desCol) { + this.desCol = desCol; + } + + public void setAux3(String aux3) { + this.aux3 = aux3; + } + + public void setAux4(String aux4) { + this.aux4 = aux4; + } + + public void setAux5(String aux5) { + this.aux5 = aux5; + } + + public void setAux6(String aux6) { + this.aux6 = aux6; + } + + public void setAux7(String aux7) { + this.aux7 = aux7; + } + + public void setAux8(String aux8) { + this.aux8 = aux8; + } + + public void setScala(String scala) { + this.scala = scala; + } + + public void setCost(BigDecimal cost) { + this.cost = cost; + } + + public void setUpc(String upc) { + this.upc = upc; + } + + public void setAlu(String alu) { + this.alu = alu; + } + + public void setPriceLevel1(BigDecimal priceLevel1) { + this.priceLevel1 = priceLevel1; + } + + public void setPriceLevel2(BigDecimal priceLevel2) { + this.priceLevel2 = priceLevel2; + } + + public void setPriceLevel3(BigDecimal priceLevel3) { + this.priceLevel3 = priceLevel3; + } + + public void setPriceLevel4(BigDecimal priceLevel4) { + this.priceLevel4 = priceLevel4; + } + + public void setPriceLevel5(BigDecimal priceLevel5) { + this.priceLevel5 = priceLevel5; + } + + public void setPriceLevel6(BigDecimal priceLevel6) { + this.priceLevel6 = priceLevel6; + } + + public void setPriceLevel7(BigDecimal priceLevel7) { + this.priceLevel7 = priceLevel7; + } + + public void setPriceLevel8(BigDecimal priceLevel8) { + this.priceLevel8 = priceLevel8; + } + + public void setAlternateVC1(String alternateVC1) { + this.alternateVC1 = alternateVC1; + } + + public void setAlternateAlu1(String alternateAlu1) { + this.alternateAlu1 = alternateAlu1; + } + + public void setAlternateUpc1(String alternateUpc1) { + this.alternateUpc1 = alternateUpc1; + } + + public void setAlternateVC2(String alternateVC2) { + this.alternateVC2 = alternateVC2; + } + + public void setAlternateAlu2(String alternateAlu2) { + this.alternateAlu2 = alternateAlu2; + } + + public void setAlternateUpc2(String alternateUpc2) { + this.alternateUpc2 = alternateUpc2; + } + + public void setAlternateVC3(String alternateVC3) { + this.alternateVC3 = alternateVC3; + } + + public void setAlternateAlu3(String alternateAlu3) { + this.alternateAlu3 = alternateAlu3; + } + + public void setAlternateUpc3(String alternateUpc3) { + this.alternateUpc3 = alternateUpc3; + } + + public void setAlternateVC4(String alternateVC4) { + this.alternateVC4 = alternateVC4; + } + + public void setAlternateAlu4(String alternateAlu4) { + this.alternateAlu4 = alternateAlu4; + } + + public void setAlternateUpc4(String alternateUpc4) { + this.alternateUpc4 = alternateUpc4; + } + + public void setAlternateVC5(String alternateVC5) { + this.alternateVC5 = alternateVC5; + } + + public void setAlternateAlu5(String alternateAlu5) { + this.alternateAlu5 = alternateAlu5; + } + + public void setAlternateUpc5(String alternateUpc5) { + this.alternateUpc5 = alternateUpc5; + } + + public void setAlternateVC6(String alternateVC6) { + this.alternateVC6 = alternateVC6; + } + + public void setAlternateAlu6(String alternateAlu6) { + this.alternateAlu6 = alternateAlu6; + } + + public void setAlternateUpc6(String alternateUpc6) { + this.alternateUpc6 = alternateUpc6; + } + + public void setStagione(String stagione) { + this.stagione = stagione; + } + + public void setCodStagione(Integer codStagione) { + this.codStagione = codStagione; + } + + public void setAbbrLinea(String abbrLinea) { + this.abbrLinea = abbrLinea; + } + + public void setMisc4(String misc4) { + this.misc4 = misc4; + } + + public void setSbs(String sbs) { + this.sbs = sbs; + } + + public void setDivisa(String divisa) { + this.divisa = divisa; + } + + public void setKitItemType(String kitItemType) { + this.kitItemType = kitItemType; + } + + public void setTaxCode(String taxCode) { + this.taxCode = taxCode; + } + + public void setLongDescription(String longDescription) { + this.longDescription = longDescription; + } + + public void setKitComp1Upc1(String kitComp1Upc1) { + this.kitComp1Upc1 = kitComp1Upc1; + } + + public void setKitComp2Upc2(String kitComp2Upc2) { + this.kitComp2Upc2 = kitComp2Upc2; + } + + public void setKitComp3Upc3(String kitComp3Upc3) { + this.kitComp3Upc3 = kitComp3Upc3; + } + + public void setKitComp4Upc4(String kitComp4Upc4) { + this.kitComp4Upc4 = kitComp4Upc4; + } + + public void setKitComp1Alu1(String kitComp1Alu1) { + this.kitComp1Alu1 = kitComp1Alu1; + } + + public void setKitComp1Alu2(String kitComp1Alu2) { + this.kitComp1Alu2 = kitComp1Alu2; + } + + public void setKitComp1Alu3(String kitComp1Alu3) { + this.kitComp1Alu3 = kitComp1Alu3; + } + + public void setKitComp1Alu4(String kitComp1Alu4) { + this.kitComp1Alu4 = kitComp1Alu4; + } + + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/export/swinger/SwingerResponse.java b/ems-document/src/main/java/it/integry/ems/document/export/swinger/SwingerResponse.java new file mode 100644 index 0000000000..f43be6e772 --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/export/swinger/SwingerResponse.java @@ -0,0 +1,32 @@ +package it.integry.ems.document.export.swinger; + +import it.integry.ems.response.FileItem; + +public class SwingerResponse { + + private FileItem inv; + private FileItem asn; + + public SwingerResponse(FileItem inv, FileItem asn) { + super(); + this.inv = inv; + this.asn = asn; + } + + public FileItem getInv() { + return inv; + } + + public FileItem getAsn() { + return asn; + } + + public void setInv(FileItem inv) { + this.inv = inv; + } + + public void setAsn(FileItem asn) { + this.asn = asn; + } + +} diff --git a/ems-document/src/main/java/it/integry/ems/document/service/DocumentService.java b/ems-document/src/main/java/it/integry/ems/document/service/DocumentService.java new file mode 100644 index 0000000000..464fdcd71b --- /dev/null +++ b/ems-document/src/main/java/it/integry/ems/document/service/DocumentService.java @@ -0,0 +1,142 @@ +package it.integry.ems.document.service; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.Date; +import java.util.List; + +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathFactory; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import com.fasterxml.jackson.databind.node.ArrayNode; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.entity.DtbDoct; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.rules.completing.DocumentRules; +import it.integry.ems.service.SetupGest; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; +import it.integry.ems.utility.UtilityXML; + +@Service +@Scope(value = "request") +public class DocumentService { + + private final Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties properties; + @Autowired + private DataSource ds; + @Autowired + private SetupGest setupGest; + @Autowired + private JSONObjectMapper jsonObjectMapper; + + public List regMovContFromDoc (String xmlFilter) throws Exception{ + List respList = null; + DtbDoct dtbDoct = new DtbDoct(); + + //DocumentRules.regMovCont(ds.getConnection(), dtbDoct); + return respList; + } + + + public List importDocFromColli(String xmlCollo) throws Exception{ + List respList = null; + StringBuffer xmlFilter = new StringBuffer(""), xmlParameter = new StringBuffer(""); + String query, gestione, serCollo, whereCond = null, codDtip, serDoc, calcPrz, assegnaDataVers, datiOrd, flagEvasoForzato; + Date dataCollo, dataDoc; + Integer numCollo; + + ArrayNode arrayNode = jsonObjectMapper.createArrayNode(); + Connection conn = ds.getConnection(); + PreparedStatement ps; + ResultSet rs; + + Document doc = UtilityXML.convertStringToDocument(xmlCollo); + XPath xPath = XPathFactory.newInstance().newXPath(); + + codDtip = xPath.compile("ROOT/COD_DTIP").evaluate(doc); + dataDoc = UtilityString.parseDate(xPath.compile("ROOT/DATA_DOC").evaluate(doc)); + serDoc = xPath.compile("ROOT/SER_DOC").evaluate(doc); + calcPrz = xPath.compile("ROOT/CALC_PRZ").evaluate(doc); + datiOrd = xPath.compile("ROOT/LEGGI_DA_ORD").evaluate(doc); + flagEvasoForzato = xPath.compile("ROOT/FLAG_EVASO_FORZATO").evaluate(doc); + assegnaDataVers = xPath.compile("ROOT/ASSEGNA_DATA_VERS").evaluate(doc); + + NodeList nodelist = doc.getElementsByTagName("COLLO"); + for (int i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-engine/.classpath b/ems-engine/.classpath new file mode 100644 index 0000000000..aa311bacd6 --- /dev/null +++ b/ems-engine/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ems-engine/.project b/ems-engine/.project new file mode 100644 index 0000000000..1a6d67fbbd --- /dev/null +++ b/ems-engine/.project @@ -0,0 +1,48 @@ + + + ems-web + + + ems-product + + + + tern.eclipse.ide.core.ternBuilder + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/ems-engine/.settings/.jsdtscope b/ems-engine/.settings/.jsdtscope new file mode 100644 index 0000000000..fac399cb99 --- /dev/null +++ b/ems-engine/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ems-engine/.settings/org.eclipse.core.resources.prefs b/ems-engine/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..365bbd6097 --- /dev/null +++ b/ems-engine/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/ems-engine/.settings/org.eclipse.jdt.core.prefs b/ems-engine/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..6428c68059 --- /dev/null +++ b/ems-engine/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/ems-engine/.settings/org.eclipse.ltk.core.refactoring.prefs b/ems-engine/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000000..cfcd1d3c22 --- /dev/null +++ b/ems-engine/.settings/org.eclipse.ltk.core.refactoring.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/ems-engine/.settings/org.eclipse.m2e.core.prefs b/ems-engine/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..14b697b7bb --- /dev/null +++ b/ems-engine/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ems-engine/.settings/org.eclipse.wst.common.component b/ems-engine/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000000..51110baabe --- /dev/null +++ b/ems-engine/.settings/org.eclipse.wst.common.component @@ -0,0 +1,42 @@ + + + + + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + uses + + + + + diff --git a/ems-engine/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/ems-engine/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml new file mode 100644 index 0000000000..1ac9c29930 --- /dev/null +++ b/ems-engine/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ems-engine/.settings/org.eclipse.wst.common.project.facet.core.xml b/ems-engine/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000000..6772ff943c --- /dev/null +++ b/ems-engine/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ems-engine/.settings/org.eclipse.wst.jsdt.ui.superType.container b/ems-engine/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000000..3bd5d0a480 --- /dev/null +++ b/ems-engine/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/ems-engine/.settings/org.eclipse.wst.jsdt.ui.superType.name b/ems-engine/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000000..05bd71b6ec --- /dev/null +++ b/ems-engine/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/ems-engine/.settings/org.eclipse.wst.validation.prefs b/ems-engine/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000000..1ca01aff5c --- /dev/null +++ b/ems-engine/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,10 @@ +DELEGATES_PREFERENCE=delegateValidatorList +USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.jboss.tools.common.validation.ValidatorManager;org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator; +USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.jboss.tools.common.validation.ValidatorManager;org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator; +USER_PREFERENCE=overrideGlobalPreferencesfalse +disabled=06target +eclipse.preferences.version=1 +override=false +suspend=false +vals/org.eclipse.wst.xsd.core.xsd/global=TF02162org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator +vf.version=3 diff --git a/ems-engine/.tern-project b/ems-engine/.tern-project new file mode 100644 index 0000000000..b6f48dd5df --- /dev/null +++ b/ems-engine/.tern-project @@ -0,0 +1 @@ +{"ide":{},"libs":["ecma5","browser"],"plugins":{"guess-types":{},"angular":{}}} \ No newline at end of file diff --git a/ems-engine/pom.xml b/ems-engine/pom.xml new file mode 100644 index 0000000000..746fb8cd10 --- /dev/null +++ b/ems-engine/pom.xml @@ -0,0 +1,207 @@ + + 4.0.0 + + it.integry + ims + 1.0 + ../pom.xml + + it.integry.ims + ems-engine + war + + Ems Engine + + + + repo-sqlserver + http://maven.lib.umd.edu/maven2 + + + + + UTF-8 + ${receipts.enabled} + ${brt.tracknumber.listener.enabled} + + + + + + src/main/resources + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + true + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-war-plugin + 2.6 + + ${ems.war.name}-api + false + + + + + + + junit + junit + 4.12 + test + + + + commons-net + commons-net + 3.4 + + + + com.microsoft.sqlserver + sqljdbc4 + 4.0 + provided + + + + com.thetransactioncompany + cors-filter + 2.5 + + + + org.quartz-scheduler + quartz + 2.2.2 + provided + + + org.quartz-scheduler + quartz-jobs + 2.2.2 + provided + + + + org.apache.xmlbeans + xmlbeans + 2.3.0 + provided + + + + org.apache.commons + commons-lang3 + 3.4 + provided + + + + org.reflections + reflections + 0.9.10 + provided + + + + + + + + + + com.google.code.gson + gson + ${gson.version} + provided + + + + org.apache.httpcomponents + httpclient + ${httpclient.version} + provided + + + + + it.integry.ims + ems-${ems.module} + 1.0 + + + + + org.jboss.resteasy + resteasy-jaxrs + ${resteasy.version} + + + org.jboss.resteasy + resteasy-client + ${resteasy.version} + + + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + jstl + jstl + 1.2 + + + + + org.springframework.security + spring-security-core + ${security.version} + + + org.springframework.security + spring-security-web + ${security.version} + + + org.springframework.security + spring-security-config + ${security.version} + + + + org.springframework + spring-web + ${spring.version} + + + org.springframework + spring-webmvc + ${spring.version} + + + + javax + javaee-web-api + 6.0 + provided + + + + diff --git a/ems-engine/src/main/java/it/integry/ems/anag/controller/AnagImportController.java b/ems-engine/src/main/java/it/integry/ems/anag/controller/AnagImportController.java new file mode 100644 index 0000000000..9224d8a0de --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/anag/controller/AnagImportController.java @@ -0,0 +1,176 @@ +package it.integry.ems.anag.controller; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.annotation.SqlField; +import it.integry.ems.base.EntityBase; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.entity.GtbAnag; +import it.integry.ems.entity.VtbDest; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.response.EsitoType; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.service.EntityProcessor; +import it.integry.ems.service.SetupGest; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.UtilityDB; + +import java.lang.reflect.Field; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Scope(value = "request") +@SuppressWarnings("finally") +public class AnagImportController { + + private final Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties properties; + @Autowired + private DataSource ds; + @Autowired + private EntityProcessor entityProcessor; + @Autowired + private SetupGest setupGest; + + @RequestMapping(value = EmsRestConstants.PATH_IMPORT_CLIE_ANAG, method = RequestMethod.POST) + public @ResponseBody ServiceRestResponse importClieAnag( + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value="precode", defaultValue="", required=false) String precode, + @RequestBody GtbAnag gtbAnag) { + + ServiceRestResponse response=null; + try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + response = importClieAnagInternal(gtbAnag, precode); + + } catch (Exception e) { + logger.error(e.toString()); + response = new ServiceRestResponse(EsitoType.KO, configuration, e); + } finally { + return response; + } + } + + private ServiceRestResponse importClieAnagInternal(GtbAnag gtbAnag, String precode) throws Exception { + ServiceRestResponse response = null; + + List whereList = new ArrayList(); + Field[] fields = gtbAnag.getClass().getDeclaredFields(); + for (Field field : fields) { + SqlField sqlField = field.getAnnotation(SqlField.class); + if (sqlField != null) { + field.setAccessible(true); + Object value = field.get(gtbAnag); + if (value != null) { + Object dato = gtbAnag.getSqlValueField(value); + whereList.add("g." + SqlFieldHolder.getSqlValue(sqlField.value(), field) + " = " + dato); + } + } + } + + whereList.add("g.cod_anag = clie.cod_anag"); + whereList.add("clie.flag_stato = 'A'"); + + String sql = "SELECT g.cod_anag FROM gtb_anag g, vtb_clie clie WHERE " + StringUtils.join(whereList, " AND "); + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + String codAnag = rs.getString("cod_anag"); + if(gtbAnag.getVtbDest().size() > 0){ + Boolean destFinded = true; + + for (VtbDest vtbDest : gtbAnag.getVtbDest()) { + List whereDest = checkDest(vtbDest); + + whereDest.add("cod_anag = "+UtilityDB.valueToString(codAnag)); + + if(whereDest.size() == 0) { + destFinded = false; + break; + } + + sql = "SELECT cod_vdes FROM vtb_dest WHERE " + StringUtils.join(whereDest, " AND "); + PreparedStatement psDest = ds.getConnection().prepareStatement(sql); + ResultSet rsDest = psDest.executeQuery(); + + if (rsDest.next()) { + vtbDest.setCodAnag(codAnag); + vtbDest.setCodVdes(rsDest.getString("cod_vdes")); + }else{ + vtbDest.setPrecode(precode); + //generazione VtbDest nuova + vtbDest.setCodAnag(codAnag); + + entityProcessor.processEntity(vtbDest, false); + } + rsDest.close(); + psDest.close(); + } + if(destFinded) + response = new ServiceRestResponse(EsitoType.OK, "", gtbAnag.getVtbDest()); + else { + gtbAnag.setCodAnag(codAnag); + gtbAnag.setOperation(OperationType.SELECT_OBJECT); + gtbAnag = (GtbAnag) entityProcessor.processEntity(gtbAnag, false); + List anagList = new ArrayList(); + anagList.add(gtbAnag); + response = new ServiceRestResponse(EsitoType.OK, "", anagList); + } + } else { + gtbAnag.setCodAnag(codAnag); + gtbAnag.setOperation(OperationType.SELECT_OBJECT); + gtbAnag = (GtbAnag) entityProcessor.processEntity(gtbAnag, false); + List anagList = new ArrayList(); + anagList.add(gtbAnag); + response = new ServiceRestResponse(EsitoType.OK, "", anagList); + } + } else { + logger.info("codAnag non trovato"); + response = new ServiceRestResponse(EsitoType.OK); + } + + rs.close(); + ps.close(); + return response; + } + + private List checkDest(VtbDest vtbDest) throws Exception { + List whereList = new ArrayList(); + Field[] fields = vtbDest.getClass().getDeclaredFields(); + for (Field field : fields) { + SqlField sqlField = field.getAnnotation(SqlField.class); + if (sqlField != null) { + field.setAccessible(true); + Object value = field.get(vtbDest); + if (value != null) { + Object dato = vtbDest.getSqlValueField(value); + whereList.add(SqlFieldHolder.getSqlValue(sqlField.value(), field) + " = " + dato); + } + } + } + if(whereList.size() > 0) + whereList.add("flag_attivo = 'S'"); + + return whereList; + } + +} diff --git a/ems-engine/src/main/java/it/integry/ems/controller/EmsController.java b/ems-engine/src/main/java/it/integry/ems/controller/EmsController.java new file mode 100644 index 0000000000..2173bdf9f0 --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/controller/EmsController.java @@ -0,0 +1,953 @@ +package it.integry.ems.controller; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.StringWriter; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Response; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; +import org.quartz.JobDetail; +import org.quartz.JobExecutionContext; +import org.quartz.JobKey; +import org.quartz.Scheduler; +import org.quartz.SchedulerException; +import org.quartz.Trigger; +import org.quartz.impl.matchers.GroupMatcher; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.mail.javamail.ConfigurableMimeFileTypeMap; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.util.HtmlUtils; + +import com.fasterxml.jackson.databind.node.ArrayNode; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.annotation.EntityChild; +import it.integry.ems.annotation.PK; +import it.integry.ems.annotation.SqlField; +import it.integry.ems.base.EntityBase; +import it.integry.ems.base.EntityPropertyHolder; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.entity.WdtbOrdt; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.metrics.listener.MetricRefreshListener; +import it.integry.ems.metrics.service.MetricService; +import it.integry.ems.model.EntityModel; +import it.integry.ems.model.FieldModel; +import it.integry.ems.model.PKFieldModel; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.report.dto.JasperDTO; +import it.integry.ems.resolver.SqlFieldHolder; +import it.integry.ems.response.EsitoType; +import it.integry.ems.response.FileItem; +import it.integry.ems.response.ModelEntityResponse; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.response.StatusResponse; +import it.integry.ems.scheduler.JobInfoDTO; +import it.integry.ems.service.EntityProcessor; +import it.integry.ems.service.PrinterService; +import it.integry.ems.service.ReportProcessor; +import it.integry.ems.status.ServiceChecker; +import it.integry.ems.sync.ASyncManager; +import it.integry.ems.sync.ConnectionCacheHolder; +import it.integry.ems.sync.SyncManager; +import it.integry.ems.types.OperationType; +import it.integry.ems.utility.Base64Utility; +import it.integry.ems.utility.UtilityDB; +import it.integry.ems.utility.UtilityString; +import it.integry.security.utility.RestUtil; + +@RestController +@Scope(value = "request") +@SuppressWarnings("finally") +public class EmsController { + + private final Logger logger = LogManager.getLogger(); + + @Autowired + private SyncManager syncManager; + @Autowired + private ASyncManager asyncManager; + @Autowired + private EntityProcessor entityProcessor; + @Autowired + private ReportProcessor reportProcessor; + @Autowired + private JSONObjectMapper jsonObjectMapper; + + @Autowired + private EntityPropertyHolder entityPropertyHolder; + + @Autowired + private EmsProperties properties; + + @Autowired + private DataSource ds; + /*@Autowired + private SetupGest setupGest;*/ + @Autowired + private PrinterService printerService; + + @Autowired + private ServiceChecker serviceChecker; + + @Autowired + private MetricService metricService; + + @Autowired + private MetricRefreshListener metricRefreshListener; + + @Autowired + private SchedulerFactoryBean quartzScheduler; + @Autowired + private EmsServices emsServices; + + @RequestMapping(value = "/engine/status", method = RequestMethod.GET) + public @ResponseBody List status(HttpServletRequest request) { + + Method[] methods = EmsController.class.getDeclaredMethods(); + + return serviceChecker.getServiceStatus(methods, EmsController.class); + } + + @RequestMapping(value = "/engine/currentTime", method = RequestMethod.GET) + public @ResponseBody String currentTime(HttpServletRequest request) { + return new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + } + + @RequestMapping(value = "/scheduler/getInfo", method = RequestMethod.GET) + public @ResponseBody List getRunningJobs(HttpServletRequest request) { + + Scheduler scheduler = quartzScheduler.getScheduler(); + List list = new ArrayList(); + try { + List running = scheduler.getCurrentlyExecutingJobs(); + //scheduler.getMetaData().getNumberOfJobsExecuted() + + for (String groupName : scheduler.getJobGroupNames()) { + for (JobKey jobKey : scheduler.getJobKeys(GroupMatcher.jobGroupEquals(groupName))) { + String jobName = jobKey.getName(); + List triggers = (List) scheduler.getTriggersOfJob(jobKey); + + JobDetail detail = scheduler.getJobDetail(jobKey); + String database = (String) detail.getJobDataMap().get("profileDb"); + if(UtilityString.isNullOrEmpty(database)) + database="no database"; + Boolean enabled = (Boolean) detail.getJobDataMap().get("enabled"); + if(UtilityString.isNullOrEmpty(enabled)) + enabled=false; + + Date nextFireTime = triggers.get(0).getNextFireTime(); + //triggers.get(0).getFinalFireTime(); + JobInfoDTO info = null; + for (JobExecutionContext jobExecutionContext : running) { + if (jobExecutionContext.getJobDetail().getKey().equals(jobKey)) { + info = new JobInfoDTO(jobKey.getName(), database, nextFireTime, true, enabled, + jobExecutionContext.getFireTime(), jobExecutionContext.getRefireCount()); + list.add(info); + } + } + if (info == null) { + info = new JobInfoDTO(jobName, database, nextFireTime, false, enabled, null, -1); + list.add(info); + } + + } + + } + } catch (SchedulerException e) { + e.printStackTrace(); + } finally { + return list; + } + } + + @RequestMapping(value = "/metric/count", method = RequestMethod.GET) + public @ResponseBody String metricCount(HttpServletRequest request) { + try { + return metricService.getJsonCountMetric(); + } catch (Exception e) { + e.printStackTrace(); + return ""; + } + } + + @RequestMapping(value = "/metric/lastUpdate", method = RequestMethod.GET) + public @ResponseBody String metriclastUpdate(HttpServletRequest request) { + try { + return new SimpleDateFormat("dd/MM/yyyy HH.mm.ss").format(metricRefreshListener.getLastUpdate()); + } catch (Exception e) { + e.printStackTrace(); + return ""; + } + } + + @RequestMapping(value = "/metric/time", method = RequestMethod.GET) + public @ResponseBody String metricTime(HttpServletRequest request) { + try { + return metricService.getJsonTimeMetric(); + } catch (Exception e) { + e.printStackTrace(); + return ""; + } + } + + @RequestMapping(value = "/metric/totCount", method = RequestMethod.GET) + public @ResponseBody String metricTotCount(HttpServletRequest request) { + try { + return metricService.getJsonTotInvokeMetric(); + } catch (Exception e) { + e.printStackTrace(); + return ""; + } + } + + @RequestMapping(value = "/metric/totMean", method = RequestMethod.GET) + public @ResponseBody String metricTotMean(HttpServletRequest request) { + try { + return metricService.getJsonTotDayMetric(); + } catch (Exception e) { + e.printStackTrace(); + return ""; + } + } + + @RequestMapping(value = "/decodeUcs", method = RequestMethod.POST) + public @ResponseBody String decodeUcs(@RequestBody String encodedUcs) { + try { + return StringEscapeUtils.unescapeJava(encodedUcs); + } catch (Exception e) { + e.printStackTrace(); + return encodedUcs; + } + } + + @RequestMapping(value = "/decodeHtml", method = RequestMethod.POST) + public @ResponseBody String decodeHtml(@RequestBody String encodedHtml) { + try { + return "" + HtmlUtils.htmlUnescape(encodedHtml); + } catch (Exception e) { + e.printStackTrace(); + return encodedHtml; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_PRINT, method = RequestMethod.POST) + public @ResponseBody Object print(HttpServletRequest request, + @RequestParam(value = "printerName", required = false) String printerName, + @RequestParam(value = "fileName", required = false) String fileName, + @RequestParam(value = "mimeType", required = false) String mimeType, + @RequestBody String encodedFile) { + ServiceRestResponse response = null; + try { + if (fileName != null && !"".equals(fileName)) { + ConfigurableMimeFileTypeMap map = new ConfigurableMimeFileTypeMap(); + printerService.print(printerName, fileName, map.getContentType(fileName)); + } else { + byte[] stream = Base64Utility.decodeBase64Zipped(encodedFile); + printerService.print(printerName, new ByteArrayInputStream(stream), mimeType); + } + response = new ServiceRestResponse(EsitoType.OK); + } catch (Exception e) { + logger.error(e.toString()); + response = new ServiceRestResponse(EsitoType.KO, e.getLocalizedMessage(), null, + entityProcessor.isSyncActive()); + } finally { + return response; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_SYNC_OFFLINE, method = RequestMethod.POST) + public @ResponseBody ServiceRestResponse syncOffline(HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value = "publicationID") String publicationID, + @RequestParam(value = "subscriptors", required = false) String subscriptors) { + ServiceRestResponse response = null; + Connection conn = null; + Client client = null; + PreparedStatement ps = null; + PreparedStatement psUpdate = null; + ResultSet rs = null; + + EsitoType esito = null; + Date execDate = null; + Integer currTransactID = null; + String jsonBody = null; + String username = null; + + try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + conn = ds.getConnection(); + + List list = new ArrayList(); + if (UtilityString.isNullOrEmpty(subscriptors)) { + String sql = "select user_name from stb_subscriptions_user " + "where publication_id = " + + UtilityDB.valueToString(publicationID) + " and flag_attivo = 'S'"; + ps = conn.prepareStatement(sql); + rs = ps.executeQuery(); + while (rs.next()) { + list.add(rs.getString("user_name")); + } + ps.close(); + rs.close(); + } else if (subscriptors.contains("|")) { + list = Arrays.asList(subscriptors.split("\\|")); + } else { + list.add(subscriptors); + } + + for (int i = 0; i < list.size(); i++) { + username = list.get(i); + String userSubSql = "select last_transaction_id,endpoint_url from stb_subscriptions_user" + + " where publication_id=" + UtilityDB.valueToString(publicationID) + + " and user_name=" + UtilityDB.valueToString(username) + " and flag_attivo = 'S'"; + ps = conn.prepareStatement(userSubSql); + rs = ps.executeQuery(); + if (rs.next()) { + String transactID = rs.getString("last_transaction_id"); + String endpointUrl = rs.getString("endpoint_url"); + + String tLogSql = "select transaction_json,transaction_id from stb_transaction_log_db " + + "where transaction_id > " + transactID + + " and transaction_json is not null order by transaction_id"; + PreparedStatement psTlogSql = conn.prepareStatement(tLogSql); + ResultSet rsTlogSql = psTlogSql.executeQuery(); + while (rsTlogSql.next()) { + String json = new String(Base64.decodeBase64(rsTlogSql.getBytes("transaction_json"))); + currTransactID = rsTlogSql.getInt("transaction_id"); + if (json != null) { + EntityBase[] entityList = null; + // json to entity + if (json.charAt(0) == '[') { + entityList = jsonObjectMapper.readValue(json, EntityBase[].class); + } else if (json.charAt(0) == '{') { + EntityBase ent = jsonObjectMapper.readValue(json, EntityBase.class); + entityList = new EntityBase[] { ent }; + } + + if (entityList != null) { + ArrayNode array = jsonObjectMapper.createArrayNode(); + for (EntityBase entity : entityList) { + array.addPOJO(entity); + } + + // chiamata sync offline + StringWriter writer = new StringWriter(); + jsonObjectMapper.writeValue(writer, array); + + jsonBody = writer.toString(); + + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD) + .format(new Date()); + String auth = RestUtil.generateAuth(configuration, configuration, + request.getMethod(), jsonBody, "application/json", + properties.getRootApi() + EmsRestConstants.PATH_PROCESS_SYNC, now); + + client = new ResteasyClientBuilder() + .establishConnectionTimeout(1, TimeUnit.MINUTES) + .socketTimeout(9, TimeUnit.MINUTES).build(); + + final WebTarget resource = client.target(endpointUrl) + .path(properties.getRootApi() + EmsRestConstants.PATH_PROCESS_SYNC) + .resolveTemplate("mode", "sync"); + Response respEndpoint = resource + .queryParam(CommonConstants.PROFILE_DB, username) + .queryParam("publicatorID", publicationID) + .queryParam("senderPublicatorID", configuration) + .queryParam("currTransactID", currTransactID).request() + .header("Authorization", configuration + ":" + auth) + .header("Content-Type", "application/json").header("SignDate", now) + .post(Entity.json(json)); + String value = respEndpoint.readEntity(String.class); + logger.info(respEndpoint.getStatus() + " - " + value); + + respEndpoint.close(); + client.close(); + + ServiceRestResponse[] respWrapped = jsonObjectMapper.readValue(value, + ServiceRestResponse[].class); + + ServiceRestResponse responseOk = null; + for (ServiceRestResponse serviceRestResponse : respWrapped) { + if (EsitoType.KO.equals(serviceRestResponse.getEsito())) { + // invio mail + Exception e = new Exception(serviceRestResponse.getErrorMessage()); + syncManager.notifyFailSyncronization(e, ds.getProfile(), username, + currTransactID.toString(), jsonBody.getBytes()); + + DataSource dsError = new DataSource(); + dsError.initialize(ds.getProfile(), + properties.getGlobalConnectionIniPath()); + + esito = serviceRestResponse.getEsito(); + execDate = serviceRestResponse.getExecDate(); + PreparedStatement psUpdateTlog = dsError + .getConnection() + .prepareStatement( + "update stb_transaction_log_db set esito = " + + UtilityDB.valueToString(esito.value()) + + ", error_msg = " + + UtilityDB.valueToString(serviceRestResponse + .getErrorMessage()) + + ", exec_date = " + + UtilityDB.valueDateToString(execDate, + CommonConstants.DATETIME_FORMAT_YMD) + + " WHERE transaction_id = " + currTransactID); + psUpdateTlog.executeUpdate(); + psUpdateTlog.close(); + dsError.getConnection().commit(); + dsError.forceClose(); + throw new Exception(serviceRestResponse.getErrorMessage()); + } else + responseOk = serviceRestResponse; + } + + esito = responseOk.getEsito(); + execDate = responseOk.getExecDate(); + if (EsitoType.OK.equals(esito)) { + PreparedStatement psUpdateTlog = conn + .prepareStatement("update stb_transaction_log_db set esito = " + + UtilityDB.valueToString(esito.value()) + + ", exec_date = " + + UtilityDB.valueDateToString(execDate, + CommonConstants.DATETIME_FORMAT_YMD) + + " WHERE transaction_id = " + currTransactID); + psUpdateTlog.executeUpdate(); + psUpdateTlog.close(); + + String sql = ""; + if (responseOk.getLastTransactionIdImport() != null) + sql = ", last_transaction_id_import = " + + responseOk.getLastTransactionIdImport(); + // //////////////////////////////// + // AGGIORNAMENTO ULTIMA TRANSAZIONE + psUpdate = conn.prepareStatement("UPDATE stb_subscriptions_user " + + "SET last_transaction_id = " + currTransactID + sql + + " WHERE publication_id = " + + UtilityDB.valueToString(publicationID) + " AND user_name = " + + UtilityDB.valueToString(username)); + psUpdate.executeUpdate(); + psUpdate.close(); + + conn.commit(); + } + } + } + } + rsTlogSql.close(); + psTlogSql.close(); + } + rs.close(); + ps.close(); + } + response = new ServiceRestResponse(EsitoType.OK, null, configuration); + } catch (Exception e) { + // SocketTimeoutException + syncManager.notifyFailSyncronization(e, ds.getProfile(), username, currTransactID.toString(), + jsonBody.getBytes()); + logger.error(e.toString()); + conn.rollback(); + client.close(); + response = new ServiceRestResponse(EsitoType.KO, configuration, e, entityProcessor.isSyncActive()); + } finally { + return response; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_EXPORT_TRANSACTIONS, method = RequestMethod.POST) + public @ResponseBody ServiceRestResponse exportTransactions(HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value = "transactionStart") String transactionStart, + @RequestParam(value = "transactionEnd") String transactionEnd, + @RequestParam(value = "folder") String folder) { + + ServiceRestResponse response = null; + Connection conn = null; + PreparedStatement ps = null; + ResultSet rs = null; + try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + conn = ds.getConnection(); + + String tLogSql = "select * from stb_transaction_log_db " + "where transaction_id between " + + transactionStart + " AND " + transactionEnd + " order by transaction_id"; + ps = conn.prepareStatement(tLogSql); + rs = ps.executeQuery(); + while (!rs.isClosed() && rs.next()) { + String json = rs.getString("transaction_json"); + String currTransactID = rs.getString("transaction_id"); + + File f = new File(folder + "/" + currTransactID + ".txt"); + FileOutputStream fos = new FileOutputStream(f); + byte[] buffer = json.getBytes(); + int number_of_lines = 1; + + FileChannel rwChannel = fos.getChannel(); + ByteBuffer wrBuf = rwChannel.map(FileChannel.MapMode.READ_WRITE, 0, buffer.length + * number_of_lines); + for (int i = 0; i < number_of_lines; i++) { + wrBuf.put(buffer); + } + wrBuf.clear(); + rwChannel.close(); + fos.close(); + } + + rs.close(); + ps.close(); + + logger.info("Esportazione effettuata con successo in " + folder); + response = new ServiceRestResponse(EsitoType.OK); + } catch (Exception e) { + logger.error(e.toString()); + response = new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e); + } finally { + return response; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_ENTITY_MODEL, method = RequestMethod.POST) + public @ResponseBody ModelEntityResponse entityModel(HttpServletRequest request, + @RequestParam(value = "entityType") String entityType) { + ModelEntityResponse response = null; + try { + response = new ModelEntityResponse(); + Class clazz = WdtbOrdt.class; + EntityModel model = recursiveEntityModel(clazz); + model.setEntityType(entityType); + response.addModel(model); + } catch (Exception e) { + logger.error(e.toString()); + e.printStackTrace(); + } finally { + return response; + } + } + + private EntityModel recursiveEntityModel(Class clazz) { + Field[] fields = clazz.getDeclaredFields(); + EntityModel model = new EntityModel(); + + for (Field field : fields) { + SqlField sqlField = field.getAnnotation(SqlField.class); + if (sqlField != null) { + PK pk = field.getAnnotation(PK.class); + if (pk != null) { + model.addFieldModel(new PKFieldModel( + UtilityString.isNullOrEmpty(sqlField.value()) ? field.getName() : sqlField + .value())); + } else { + model.addFieldModel(new FieldModel(UtilityString.isNullOrEmpty(sqlField.value()) ? field + .getName() : sqlField.value())); + } + } + EntityChild child = field.getAnnotation(EntityChild.class); + if (child != null) { + ParameterizedType genericListType = (ParameterizedType) field.getGenericType(); + EntityModel modelChild = recursiveEntityModel((Class) genericListType + .getActualTypeArguments()[0]); + model.addChildModel(modelChild); + } + } + return model; + } + + @RequestMapping(value = EmsRestConstants.PATH_PROCESS_REPORT, method = RequestMethod.POST) + public @ResponseBody Object processReport( + HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value = "exportFormat", required = false, defaultValue = "PDF") String exportFormat, + @RequestBody JasperDTO reportDTO) { + ServiceRestResponse response = null; + try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + byte[] content = null; + if (!UtilityString.isNullOrEmpty(reportDTO.getB64XmlReport())) { + content = reportProcessor.processReportBase64(reportDTO); + } else { + content = reportProcessor.processReport(reportDTO, exportFormat.toUpperCase()); + } + FileItem item = new FileItem(null, content, exportFormat); + + response = new ServiceRestResponse(EsitoType.OK, configuration, item); + } catch (Exception e) { + logger.error(e.toString()); + response = new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e); + } finally { + return response; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_SELECT_RAW_DATA, method = RequestMethod.POST) + public @ResponseBody Object selectRawData(@RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value="numResult", required=false, defaultValue = "1") Integer numResult, + @RequestBody String sql) { + ServiceRestResponse response = null; + List objs = null; + try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + if(numResult != -1) { + sql = sql.replaceAll("select", "select TOP " + numResult + " "); + sql = sql.replaceAll("SELECT", "SELECT TOP " + numResult + " "); + } + objs = entityProcessor.selectRawData(sql); + response = new ServiceRestResponse(EsitoType.OK, objs); + } catch (Exception e) { + logger.error(e.toString()); + response = new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e); + } finally { + return response; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_PROCESS_ENTITY, method = RequestMethod.POST) + public @ResponseBody Object processEntity(HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value = "isSync", required = false, defaultValue = "true") Boolean isSync, + @RequestBody EntityBase entity) { + ServiceRestResponse response = null; + Object obj = null; + + try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + entityProcessor.setDsSyncList(new HashMap()); + entityProcessor.setPrimaryProfileDB(ds.getProfile()); + + obj = entityProcessor.processEntity(entity, isSync, request.getHeader("username")); + + + List entityList = new ArrayList(); + + if(obj != null){ + if (obj instanceof EntityBase[]){ + entityList = Arrays.asList((EntityBase[]) obj); + }else{ + entityList.add((EntityBase) obj); + } + } + + if (isSync) { + asyncManager.proceedSyncronization(entityProcessor.getDsSyncList()); + } + + if(entity.getOperation() == OperationType.SELECT || entity.getOperation() == OperationType.SELECT_OBJECT){ + response = new ServiceRestResponse(EsitoType.OK, entityList, configuration, ""); + } + else { + response = new ServiceRestResponse(EsitoType.OK, entity, configuration, entityProcessor.isSyncActive()); + } + + } catch (Exception e) { + logger.error(e.toString()); + response = new ServiceRestResponse(EsitoType.KO, e, ds.getProfile(), entity, + entityProcessor.isSyncActive()); + } finally { + if(entity.getOperation() == OperationType.SELECT_OBJECT) { + return obj; + } else return response; + } + + // 2016-11-30 (FABIO-GIUSEPPE): ottimizzati controlli su ritorno esito in caso di SELECT e SELECT_OBJECT +/* try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + entityProcessor.setDsSyncList(new HashMap()); + entityProcessor.setPrimaryProfileDB(ds.getProfile()); + + obj = entityProcessor.processEntity(entity, isSync, request.getHeader("username")); + + + if (isSync) { + asyncManager.proceedSyncronization(entityProcessor.getDsSyncList()); + } + response = new ServiceRestResponse(EsitoType.OK, entity, configuration, + entityProcessor.isSyncActive()); + } catch (Exception e) { + logger.error(e.toString()); + response = new ServiceRestResponse(EsitoType.KO, e, ds.getProfile(), entity, + entityProcessor.isSyncActive()); + } finally { + if (obj != null) + return obj; + else + return response; + }*/ + } + + @RequestMapping(value = EmsRestConstants.PATH_PROCESS_SYNC, method = RequestMethod.POST) + public @ResponseBody List processSync( + HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam("publicatorID") String publicatorID, + @RequestParam("senderPublicatorID") String senderPublicatorID, + @RequestParam(value = "currTransactID", required = false) Integer currTransactID, + @RequestParam(value = "isSync", required = false, defaultValue = "true") Boolean isSync, + @RequestParam(value = "forceTransaction", required = false, defaultValue = "false") Boolean forceTransaction, + @RequestBody List entityList) { + + List responseList = new ArrayList(); + try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + + PreparedStatement ps = ds.getConnection().prepareStatement( + "SELECT last_transaction_id_import, last_transaction_id from stb_subscriptions_user" + + " where publication_id=" + UtilityDB.valueToString(publicatorID) + + " AND user_name = " + UtilityDB.valueToString(senderPublicatorID)); + ResultSet rs = ps.executeQuery(); + + Integer lastTransactionIdImport = 0, lastTransactionId = 0; + if (rs.next()) { + lastTransactionIdImport = rs.getInt("last_transaction_id_import"); + lastTransactionId = rs.getInt("last_transaction_id"); + } + rs.close(); + ps.close(); + ds.forceClose(); + + Boolean error = false; + if (currTransactID > lastTransactionIdImport) { + + List entityListFiltered = new ArrayList(); + + for (EntityBase entity : entityList) { + entity.setEntityHolder(entityPropertyHolder); + + Boolean hasOnline = false; + String checkSyncOnline = "select * from stb_subscription " + + "where table_name="+ UtilityDB.valueToString(entity.getTableName().toUpperCase()) + " and flag_attivo='S'"; + PreparedStatement psCheck = ds.getConnection().prepareStatement(checkSyncOnline); + ResultSet rsCheck = psCheck.executeQuery(); + + if(rsCheck.next()) { + hasOnline = true; + } + rsCheck.close(); + psCheck.close(); + + PreparedStatement psSubscript = ds.getConnection() + .prepareStatement("SELECT where_cond_sql, recalc_columns from stb_subscriptions_user_detail " + + " where publication_id="+ UtilityDB.valueToString(publicatorID) + + " and user_name="+ UtilityDB.valueToString(senderPublicatorID) + + " and entity_name="+ UtilityDB.valueToString(entity.getTableName().toUpperCase())); + ResultSet rsSubscript = psSubscript.executeQuery(); + + if(rsSubscript.next()) { + String whereCond = rsSubscript.getString("where_cond_sql"); + + if (!UtilityString.isNullOrEmpty(whereCond) + && !SqlFieldHolder.evalCondition(entity, whereCond)) { + continue; + } + + if(!hasOnline) { + if (rsSubscript.getString("recalc_columns") != null) { + entity.setRecalcColumns(Arrays.asList(rsSubscript.getString("recalc_columns").split(","))); + } else + entity.setRecalcColumns(new ArrayList()); + } + } + rsSubscript.close(); + psSubscript.close(); + entityListFiltered.add(entity); + } + + responseList = processEntityList(request, configuration, true, forceTransaction, true, entityListFiltered); + for (ServiceRestResponse resp : responseList) { + resp.setLastTransactionIdImport(lastTransactionId); + if (resp.getEsito() == EsitoType.KO) { + error = true; + break; + } + } + if (!error) { + // AGGIORNAMENTO LAST TRANSACTION ID IMPORT + PreparedStatement psUpdate = ds.getConnection().prepareStatement( + "UPDATE stb_subscriptions_user " + "SET last_transaction_id_import = " + + currTransactID + " WHERE publication_id = " + + UtilityDB.valueToString(publicatorID) + " AND user_name = " + + UtilityDB.valueToString(senderPublicatorID)); + psUpdate.executeUpdate(); + ds.getConnection().commit(); + psUpdate.close(); + } + } else { + ServiceRestResponse resp = new ServiceRestResponse(EsitoType.OK); + resp.setLastTransactionIdImport(lastTransactionId); + responseList.add(resp); + } + } catch (Exception e) { + logger.error(e.toString()); + ServiceRestResponse resp = new ServiceRestResponse(EsitoType.KO, configuration, e, isSync); + responseList.add(resp); + } finally { + return responseList; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_IMPORT, method = RequestMethod.POST) + public @ResponseBody List importEntity( + HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value=EmsRestConstants.TYPE, required=false) String type, + @RequestParam(value=EmsRestConstants.FORMAT, required=false) String format, + @RequestBody(required=false) String data) { + List responseList = new ArrayList(); + final Client client = ClientBuilder.newClient(); + try { + + if(UtilityString.isNullOrEmpty(type)) + throw new Exception("Tipo non configurato"); + if(UtilityString.isNullOrEmpty(format)) + throw new Exception("Formato non configurato"); + + responseList = emsServices.importEntity(client, configuration, request, type, format, data); + + } catch (Exception e) { + logger.error(e.toString()); + ServiceRestResponse response = new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e); + responseList.add(response); + } finally { + client.close(); + return responseList; + } + } + + @RequestMapping(value = EmsRestConstants.PATH_PROCESS_ENTITY_LIST, method = RequestMethod.POST) + public @ResponseBody List processEntityList( + HttpServletRequest request, + @RequestParam(CommonConstants.PROFILE_DB) String configuration, + @RequestParam(value = "isSync", required = false, defaultValue = "true") Boolean isSync, + @RequestParam(value = "forceTransaction", required = false, defaultValue = "true") Boolean forceTransaction, + @RequestParam(value = "ordinaSuPriorita", required = false, defaultValue = "true") Boolean ordinaSuPriorita, + @RequestBody List entityList) { + List responseList = new ArrayList(); + try { + // gestione errore nell'inizializzazione connessione + try { + ds.initialize(configuration, properties.getGlobalConnectionIniPath()); + } catch (Exception e) { + logger.error(e.toString()); + ServiceRestResponse response = new ServiceRestResponse(EsitoType.KO, ds.getProfile(), e); + responseList.add(response); + return responseList; + } + + // riordino della lista delle entity in base alla priorita' + // DA VALUTARE SE IL DEFAULT DEVE ESSERE TRUE COME ADESSO O FALSE (FABIO) 29-12-2016 + if(ordinaSuPriorita) + entityList = entityPropertyHolder.getEntityChain(entityList, ds.getConnection()); + + entityProcessor.setDsSyncList(new HashMap()); + entityProcessor.setPrimaryProfileDB(ds.getProfile()); + + if (forceTransaction) { + EntityBase entity = null; + try { + Boolean firstEntity = true; + for (int i = 0; i < entityList.size(); i++) { + entity = entityList.get(i); + entityProcessor.processEntity(entity, isSync, forceTransaction, firstEntity, + request.getHeader("username")); + ServiceRestResponse response = new ServiceRestResponse(EsitoType.OK, entity, + configuration, entityProcessor.isSyncActive()); + responseList.add(response); + firstEntity = false; + } + + if (isSync) { + asyncManager.proceedSyncronization(entityProcessor.getDsSyncList()); + } + + // ///////////////////////// + if (!ds.getConnection().isClosed()) + ds.getConnection().commit(); + ds.getConnection().close(); + + for (String key : entityProcessor.getDsSyncList().keySet()) { + Connection dsSync = entityProcessor.getDsSyncList().get(key); + dsSync.commit(); + ConnectionCacheHolder.releaseProfile(dsSync.getCatalog()); + dsSync.close(); + } + // ///////////////////////// + } catch (Exception e) { + // ///////////////////////// + if (!ds.getConnection().isClosed()) + ds.getConnection().rollback(); + ds.getConnection().close(); + + for (String key : entityProcessor.getDsSyncList().keySet()) { + Connection dsSync = entityProcessor.getDsSyncList().get(key); + dsSync.rollback(); + ConnectionCacheHolder.releaseProfile(dsSync.getCatalog()); + dsSync.close(); + } + // ///////////////////////// + logger.error(e.toString()); + ServiceRestResponse response = new ServiceRestResponse(EsitoType.KO, e, ds.getProfile(), + entity, entityProcessor.isSyncActive()); + responseList.add(response); + } + } else { + Boolean firstEntity = true; + for (int i = 0; i < entityList.size(); i++) { + EntityBase entity = entityList.get(i); + ServiceRestResponse response = null; + try { + entityProcessor.processEntity(entity, isSync, false, firstEntity, + request.getHeader("username")); + response = new ServiceRestResponse(EsitoType.OK, entity, configuration, + entityProcessor.isSyncActive()); + } catch (Exception e) { + logger.error(e.toString()); + response = new ServiceRestResponse(EsitoType.KO, e, ds.getProfile(), entity, + entityProcessor.isSyncActive()); + } + responseList.add(response); + firstEntity = false; + } + ds.getConnection().close(); + + for (String key : entityProcessor.getDsSyncList().keySet()) { + Connection dsSync = entityProcessor.getDsSyncList().get(key); + dsSync.close(); + } + } + } finally { + return responseList; + } + } + +} diff --git a/ems-engine/src/main/java/it/integry/ems/controller/EmsResponseEntityExceptionHandler.java b/ems-engine/src/main/java/it/integry/ems/controller/EmsResponseEntityExceptionHandler.java new file mode 100644 index 0000000000..d71a3704fa --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/controller/EmsResponseEntityExceptionHandler.java @@ -0,0 +1,41 @@ +package it.integry.ems.controller; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.http.converter.HttpMessageNotReadableException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.context.request.WebRequest; +import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; + +import it.integry.ems.base.EntityNotFound; + +@ControllerAdvice +public class EmsResponseEntityExceptionHandler extends ResponseEntityExceptionHandler { + + protected final Logger logger = LogManager.getLogger(); + + @Override + protected ResponseEntity handleHttpMessageNotReadable(HttpMessageNotReadableException ex, + HttpHeaders headers, HttpStatus status, WebRequest request) { + + Throwable mostSpecificCause = ex.getMostSpecificCause(); + String message; + + if(mostSpecificCause instanceof EntityNotFound){ + status = HttpStatus.OK; + } + +// if (mostSpecificCause != null) { +// message = mostSpecificCause.getMessage(); +// } else { + message = ex.getMessage(); + logger.error(message); +// } + + String json = "{\"esito\":-1, \"errorMessage\":\""+message+"\"}"; + return new ResponseEntity(json, headers, status); + } +} diff --git a/ems-engine/src/main/java/it/integry/ems/controller/EmsServices.java b/ems-engine/src/main/java/it/integry/ems/controller/EmsServices.java new file mode 100644 index 0000000000..6fb6e1dec0 --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/controller/EmsServices.java @@ -0,0 +1,272 @@ +package it.integry.ems.controller; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FilenameFilter; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Response; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Service; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.datasource.DataSource; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.response.EsitoType; +import it.integry.ems.response.ServiceRestResponse; +import it.integry.ems.service.SetupGest; +import it.integry.ems.utility.UtilityString; +import it.integry.security.utility.RestUtil; + +@Service +@Scope(value = "request") +public class EmsServices { + + private Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties properties; + @Autowired + private JSONObjectMapper jsonObjectMapper; + @Autowired + private SetupGest setupGest; + + public List importEntity(Client client, String configuration, HttpServletRequest request, String type, String format, Object data) throws Exception { + List responseList = new ArrayList(); + + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + String body = null; + if (!UtilityString.isNullOrEmpty(data)){ + body = data.toString(); + } + + if("LISTINI ACQUISTO".equals(type)){ + String auth = RestUtil.generateAuth(configuration, configuration, "POST", body, "text/plain", + properties.getRootApi() + EmsRestConstants.PATH_IMPORT_LISA, now); + + final WebTarget resource = client.target(properties.getEndPointWS()) + .path(properties.getRootApi() + EmsRestConstants.PATH_IMPORT_LISA); + Response response = resource.queryParam(CommonConstants.PROFILE_DB, configuration) + .queryParam(EmsRestConstants.TYPE, type) + .queryParam(EmsRestConstants.FORMAT, format).request() + .header("Authorization", configuration + ":" + auth).header("SignDate", now) + .header("username", request.getHeader("username")) + .header("password", request.getHeader("password")) + .post(Entity.text(data)); + + String str = response.readEntity(String.class); + response.close(); + + responseList = Arrays.asList(jsonObjectMapper.readValue(str, ServiceRestResponse[].class)); + }else if("ANAGRAFICHE".equals(type)){ + String auth = RestUtil.generateAuth(configuration, configuration, "POST", body, "application/json", + properties.getRootApi() + EmsRestConstants.PATH_IMPORT_ECEDI, now); + + final WebTarget resource = client.target(properties.getEndPointWS()) + .path(properties.getRootApi() + EmsRestConstants.PATH_IMPORT_ECEDI); + Response response = resource.queryParam(CommonConstants.PROFILE_DB, configuration) + .request() + .header("Authorization", configuration + ":" + auth).header("SignDate", now) + .header("username", request.getHeader("username")) + .header("password", request.getHeader("password")) + .post(Entity.text(data)); + + String str = response.readEntity(String.class); + response.close(); + + responseList = Arrays.asList(jsonObjectMapper.readValue(str, ServiceRestResponse[].class)); + } else if("ORDINI WEB".equals(type)) { + if("CONQUIST".equals(format)) + importClientieOrdiniQuore(); + else if("AMAZON".equals(format)) + importOrdiniAmazon(); + } else { + throw new Exception("Tipo non trovato"); + } + + return responseList; + + } + + private void importClientieOrdiniQuore() throws Exception { + DataSource ds = new DataSource(); + ds.initialize(properties.getDefaultDatabase(), properties.getGlobalConnectionIniPath()); + + Boolean enabled = Boolean.parseBoolean((String) setupGest.getSetup(ds.getConnection(), + "IMPORT_ORDINI WEB", "CONQUIST", "ENABLED")); + String folder = (String) setupGest.getSetup(ds.getConnection(), "IMPORT_ORDINI WEB", "CONQUIST", "FOLDER"); + ds.forceClose(); + + if (UtilityString.isNullOrEmpty(folder)) + throw new Exception("IMPORT_ORDINI WEB/CONQUIST/FOLDER non configurato correttamente"); + + if (enabled && "/ems-api".equals(properties.getRootApi())) { + String csv, now, auth; + String database = properties.getDefaultDatabase(); + + File errorDirectory = new File(folder + "/import/error"); + if(!errorDirectory.exists()) + errorDirectory.mkdir(); + + File[] files = getFileListQuore(folder, "clienti_"); + for (int i = 0; i < files.length; i++) { + File f = files[i]; + if (f.exists()) { + csv = FileUtils.readFileToString(f); + + now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + auth = RestUtil.generateAuth(database, database, "POST", "", "text/plain", + properties.getRootApi() + EmsRestConstants.PATH_IMPORT_CLIENTI_CQ, now); + + Client client = ClientBuilder.newClient(); + WebTarget resource = client.target(properties.getEndPointWS()).path( + properties.getRootApi() + EmsRestConstants.PATH_IMPORT_CLIENTI_CQ); + Response responseEms = resource.queryParam(CommonConstants.PROFILE_DB, database) + .request().header("Authorization", database + ":" + auth).header("SignDate", now) + .post(Entity.text(csv)); + + String value = responseEms.readEntity(String.class); + logger.info("CLIENTI RESPONSE: " + value); + if(!UtilityString.isNullOrEmpty(value)) { + ServiceRestResponse resp = jsonObjectMapper.readValue(value, ServiceRestResponse.class); + + if (resp.getEsito() == EsitoType.KO) { + File dest = new File(folder + "/import/error/" + f.getName()); + FileOutputStream fos = new FileOutputStream(dest); + FileInputStream is = new FileInputStream(f); + IOUtils.copy(is, fos); + is.close(); + fos.close(); + f.delete(); + + logger.error("ERRORE IMPORTAZIONE CLIENTI CQ: " + value); + throw new Exception("Errore importazione clienti CQ"); + } else if (resp.getEsito() == EsitoType.OK) { + // cancellazione file clienti + f.delete(); + } + } + responseEms.close(); + client.close(); + } + } + + files = getFileListQuore(folder, "ordini_"); + for (int i = 0; i < files.length; i++) { + File f = files[i]; + if (f.exists()) { + csv = FileUtils.readFileToString(f); + + now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + auth = RestUtil.generateAuth(database, database, "POST", "", "text/plain", + properties.getRootApi() + EmsRestConstants.PATH_IMPORT_ORDINI_CQ, now); + + Client client = ClientBuilder.newClient(); + WebTarget resource = client.target(properties.getEndPointWS()).path( + properties.getRootApi() + EmsRestConstants.PATH_IMPORT_ORDINI_CQ); + Response responseEms = resource.queryParam(CommonConstants.PROFILE_DB, database) + .request().header("Authorization", database + ":" + auth).header("SignDate", now) + .post(Entity.text(csv)); + + String value = responseEms.readEntity(String.class); + ServiceRestResponse resp = jsonObjectMapper.readValue(value, ServiceRestResponse.class); + + if (resp.getEsito() == EsitoType.KO) { + File dest = new File(folder + "/import/error/" + f.getName()); + FileOutputStream fos = new FileOutputStream(dest); + FileInputStream is = new FileInputStream(f); + IOUtils.copy(is, fos); + is.close(); + fos.close(); + f.delete(); + + logger.error("ERRORE IMPORTAZIONE ORDINI CQ: " + value); + throw new Exception("Errore importazione ORDINI CQ"); + } + responseEms.close(); + client.close(); + + // cancellazione file ordini + f.delete(); + } + } + } + } + + private void importOrdiniAmazon() throws Exception { + if(Boolean.parseBoolean(properties.getAmazonImportEnabled()) && "/ems-api".equals(properties.getRootApi())) { + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + String auth = RestUtil.generateAuth(properties.getDefaultDatabase(), properties.getDefaultDatabase(), "POST", + "", "text/plain", properties.getRootApi() + EmsRestConstants.PATH_IMPORT_ORDERS_AMAZON, now); + + final Client client = ClientBuilder.newClient(); + final WebTarget resource = client.target(properties.getEndPointWS()) + .path(properties.getRootApi() + EmsRestConstants.PATH_IMPORT_ORDERS_AMAZON); + Response response = resource.queryParam(CommonConstants.PROFILE_DB, properties.getDefaultDatabase()) + .request() + .header("Authorization", properties.getDefaultDatabase() + ":" +auth) + .header("SignDate", now) + .post(Entity.text("")); + + String value = response.readEntity(String.class); + + response.close(); + client.close(); + } + } + + private File[] getFileListQuore(String folder, final String fileNameFilter) { + File directory = new File(folder + "/import"); + File[] files = directory.listFiles(new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.startsWith(fileNameFilter); + } + }); + + Arrays.sort(files, new Comparator() { + public int compare(File f1, File f2) { + + String[] dataF1 = f1.getName().replace(".csv", "").split("_"); + String[] dataF2 = f2.getName().replace(".csv", "").split("_"); + + Date d1 = new Date(); + try { + d1 = new SimpleDateFormat("yyyyMMddHHmmss").parse(dataF1[1] + dataF1[2]); + } catch (Exception e) { + logger.error(e.toString()); + e.printStackTrace(); + } + Date d2 = new Date(); + try { + d2 = new SimpleDateFormat("yyyyMMddHHmmss").parse(dataF2[1] + dataF2[2]); + } catch (Exception e) { + logger.error(e.toString()); + e.printStackTrace(); + } + return d1.compareTo(d2); + } + }); + return files; + } + +} diff --git a/ems-engine/src/main/java/it/integry/ems/controller/HeaderModifierAdvice.java b/ems-engine/src/main/java/it/integry/ems/controller/HeaderModifierAdvice.java new file mode 100644 index 0000000000..30f76ca54c --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/controller/HeaderModifierAdvice.java @@ -0,0 +1,28 @@ +package it.integry.ems.controller; + +import org.springframework.core.MethodParameter; +import org.springframework.http.MediaType; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.server.ServerHttpRequest; +import org.springframework.http.server.ServerHttpResponse; +import org.springframework.http.server.ServletServerHttpRequest; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; + +@ControllerAdvice +public class HeaderModifierAdvice implements ResponseBodyAdvice { + + @Override + public boolean supports(MethodParameter returnType, Class> converterType) { + return true; + } + + @Override + public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, + Class> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) { + if(((ServletServerHttpRequest)request).getServletRequest().getServletPath().contains("export")) { + + } + return body; + } +} diff --git a/ems-engine/src/main/java/it/integry/ems/interceptors/BodyLogger.java b/ems-engine/src/main/java/it/integry/ems/interceptors/BodyLogger.java new file mode 100644 index 0000000000..0ed8dd75eb --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/interceptors/BodyLogger.java @@ -0,0 +1,26 @@ +package it.integry.ems.interceptors; + +import java.util.HashMap; +import java.util.Map; + +import org.springframework.stereotype.Service; + +@Service +@Deprecated +public class BodyLogger { + + private Map bodyMap = new HashMap(); + + public void put(String id, Object value) { + bodyMap.put(id, value); + } + + public Object get(String id){ + return bodyMap.get(id); + } + + public void remove(String id) { + bodyMap.remove(id); + } + +} \ No newline at end of file diff --git a/ems-engine/src/main/java/it/integry/ems/interceptors/ExportInterceptor.java b/ems-engine/src/main/java/it/integry/ems/interceptors/ExportInterceptor.java new file mode 100644 index 0000000000..df8cf031b7 --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/interceptors/ExportInterceptor.java @@ -0,0 +1,249 @@ +package it.integry.ems.interceptors; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.StringWriter; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Map; +import java.util.TreeMap; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.InvocationCallback; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Response; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.net.ftp.FTP; +import org.apache.commons.net.ftp.FTPClient; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.ModelAndView; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.config.EmsRestConstants; +import it.integry.ems.json.JSONObjectMapper; +import it.integry.ems.properties.EmsProperties; +import it.integry.security.utility.RestUtil; + +public class ExportInterceptor implements HandlerInterceptor { + + private final Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties properties; + @Autowired + private JSONObjectMapper jsonObjectMapper; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) + throws Exception { + return true; + } + + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, + Object handler, ModelAndView view) throws Exception { + } + + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, + Exception exception) throws Exception { + + String requestStr = IOUtils.toString(request.getInputStream()); + + Map prMap = new TreeMap(); + + if (exception == null && request.getServletPath().contains("export")) { + /* + String username = request.getParameter(EmsRestConstants.USERNAME); + if (UtilityString.isNullOrEmpty(username)) + username = request.getHeader(EmsRestConstants.USERNAME); + + String type = request.getParameter(EmsRestConstants.TYPE); + if (UtilityString.isNullOrEmpty(type)) + type = request.getHeader(EmsRestConstants.TYPE); + + String format = request.getParameter(EmsRestConstants.FORMAT); + if (UtilityString.isNullOrEmpty(format)) + format = request.getHeader(EmsRestConstants.FORMAT); + + if (!UtilityString.isNullOrEmpty(username) && !UtilityString.isNullOrEmpty(type) + && !UtilityString.isNullOrEmpty(format)) { + + String profileDB = request.getParameter(CommonConstants.PROFILE_DB); + DataSource ds = new DataSource(); + ds.initialize(profileDB, properties.getGlobalConnectionIniPath()); + String sql = "SELECT wtb_users_info.Ftp_host, " + +" wtb_users_info.Ftp_user, wtb_users_info.Ftp_password, " + + " wtb_users_info.Ftp_directory, wtb_users_info.email, " + + " wtb_users_info.File_path, wtb_users_info.Ws_endpoint, " + + " wtb_users_info.Ws_user, wtb_users_info.Ws_password, " + + " wtb_users_info.Priority, wtb_users_info.email_cc, " + + " wtb_users_info.email_ccn, wtb_users_info.export_type, " + + " wtb_users_info.format_file, wtb_users_info.filter_cond, " + + " wtb_users_info.file_name, wtb_users_info.flag_state, " + + " wtb_users_info.export_type_data, wtb_users_info.flag_file_compress, " + + " wtb_users_info.email_notification, wtb_users_info_plan_status.last_export, " + + " wtb_users_info.flag_shared_anag_art, wtb_users_info.Ftp_create_directory, " + + " wtb_users_info.flag_append_file, IsNull(wtb_users_info.ftp_retries, 1) as ftp_retries, " + + " wtb_users_info.get_file_name, wtb_users_info.export_mode, wtb_users_info.query_custom " + + " FROM wtb_users_info LEFT OUTER JOIN wtb_users_info_plan_status ON wtb_users_info.user_name = wtb_users_info_plan_status.user_name AND " + + " wtb_users_info.export_type = wtb_users_info_plan_status.export_type AND " + + " wtb_users_info.format_file = wtb_users_info_plan_status.format_file" + + " WHERE user_name = " + UtilityDB.valueToString(username) + + " AND export_type = " + UtilityDB.valueToString(type) + + " AND format_file = " + UtilityDB.valueToString(format); + + PreparedStatement ps = ds.getConnection().prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + while (rs.next()) { + if ("S".equals(rs.getString("flag_state")) + && !UtilityString.isNullOrEmpty(rs.getString("priority"))) { + String[] priorityList = rs.getString("priority").split("\\|"); + for (String priority : priorityList) { + String[] nameVal = priority.split(":"); + String[] list = nameVal[1].split(";"); + if (list.length > 0) { + for (String singleVal : list) { + prMap.put(Integer.parseInt(nameVal[0]), singleVal); + } + } else { + prMap.put(Integer.parseInt(nameVal[0]), nameVal[1]); + } + } + + Set keys = prMap.keySet(); + for (Integer key : keys) { + if ("FILE".equals(prMap.get(key))) { + saveFile(rs.getString("File_path"), rs.getString("file_name"), + rs.getString("flag_file_compress"), rs.getString("flag_append_file")); + } else if ("EMAIL".equals(prMap.get(key))) { + sendEmailService(ds.getProfile(), rs.getString("email"), rs.getString("email_cc"), + rs.getString("email_ccn"), type, format); + } else if ("FTP".equals(prMap.get(key))) { + sendFtpService(rs.getString("Ftp_host"), rs.getString("Ftp_user"), rs.getString("Ftp_password"), + rs.getString("Ftp_directory"), rs.getString("ftp_create_directory"), rs.getInt("ftp_retries"), + "", ""); + } else if ("WEBSERVICES".equals(prMap.get(key))) { + + } // TODO + else if ("REST".equals(prMap.get(key))) { + + } + } + } + } + } else { + logger.info("Nessun tipo/formato di esportazione definito!!!"); + } + */ + } + } + + private void saveFile(String path, String fileName, String flagCompress, String flagAppend) throws Exception { + File dir = new File(path); + if(!dir.exists()) + dir.mkdir(); + + File f = new File(path + "/" + fileName); + if(!f.exists()) + f.createNewFile(); + FileOutputStream fos = null; + if("S".equals(flagAppend)){ + fos = new FileOutputStream(f, true); + } else + fos = new FileOutputStream(f); + //TODO WRITE DATA + //IOUtils.write(data, fos, "UTF-8"); + fos.close(); + } + + private void sendFtpService(String ftpHost, String ftpUser, String ftpPass, String ftpDir, + String flagCreateDir, Integer retries, String fileName, String data) throws IOException { + + while(retries != 0) { + + FTPClient ftpClient = new FTPClient(); + try { + ftpClient.connect(ftpHost, 21); + ftpClient.login(ftpUser, ftpPass); + ftpClient.setFileType(FTP.BINARY_FILE_TYPE); + ftpClient.enterLocalPassiveMode(); + + if("S".equals(flagCreateDir)){ + ftpClient.makeDirectory(ftpDir); + } + ftpClient.changeWorkingDirectory(ftpDir); + + OutputStream os = ftpClient.storeFileStream(fileName); + IOUtils.write(data, os, "UTF-8"); + os.close(); + boolean completed = ftpClient.completePendingCommand(); + if (completed) { + + } + retries = 0; + } catch (Exception ex) { + retries--; + ex.printStackTrace(); + logger.error(ex.toString()); + } finally { + if (ftpClient.isConnected()) { + ftpClient.logout(); + ftpClient.disconnect(); + } + } + + } + + } + + private void sendEmailService(String database, String to, String cc, String ccn, String exportType, String formatType) throws Exception { + StringWriter writer = new StringWriter(); + //jsonObjectMapper.writeValue(writer, dto); + + String jsonBody = writer.toString(); + + String now = new SimpleDateFormat(CommonConstants.DATETIME_FORMAT_YMD).format(new Date()); + String auth = RestUtil.generateAuth(database, database, "POST", jsonBody, + "application/json", properties.getRootApi() + EmsRestConstants.PATH_SEND_MAIL, now); + + final Client client = ClientBuilder.newClient(); + WebTarget resource = client.target(properties.getEndPointWS()).path( + properties.getRootApi() + EmsRestConstants.PATH_SEND_MAIL) + .resolveTemplate("mode", "async"); + resource = resource.queryParam(CommonConstants.PROFILE_DB, database) + .queryParam("from", "").queryParam("to", to) + .queryParam("cc", cc).queryParam("ccn", ccn) + .queryParam("subject", "INVIO " + exportType) + .queryParam("msgText", "Messaggio creato automaticamente: " + "INVIO " + exportType + " formato" + formatType); + + resource.request().header("Authorization", database + ":" + auth) + .header("SignDate", now).async() + .post(Entity.json(jsonBody), new InvocationCallback() { + @Override + public void completed(Response response) { + String value = response.readEntity(String.class); + logger.info(response.getStatus() + " - " + value); + response.close(); + client.close(); + } + + @Override + public void failed(Throwable throwable) { + throwable.printStackTrace(); + logger.error(throwable); + client.close(); + } + }); + } +} diff --git a/ems-engine/src/main/java/it/integry/ems/metrics/filter/MetricFilter.java b/ems-engine/src/main/java/it/integry/ems/metrics/filter/MetricFilter.java new file mode 100644 index 0000000000..2384abc821 --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/metrics/filter/MetricFilter.java @@ -0,0 +1,53 @@ +package it.integry.ems.metrics.filter; + +import it.integry.ems.metrics.service.MetricService; +import it.integry.ems.utility.UtilityString; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.context.support.WebApplicationContextUtils; + +@Component +public class MetricFilter implements Filter { + + @Autowired + private MetricService metricService; + + @Override + public void init(final FilterConfig config) throws ServletException { + if (metricService == null) { + metricService = (MetricService) WebApplicationContextUtils. + getRequiredWebApplicationContext(config.getServletContext()).getBean("metricService"); + } + } + + @Override + public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws java.io.IOException, ServletException { + final HttpServletRequest httpRequest = ((HttpServletRequest) request); + if(!UtilityString.isNullOrEmpty(httpRequest.getServletPath())) { + final String req = httpRequest.getServletPath().substring(1); + long startTime = System.nanoTime(); + + chain.doFilter(request, response); + + double stopTime = System.nanoTime(); + double execTime = (stopTime - startTime)/1000000000; + // final int status = ((HttpServletResponse) response).getStatus(); + Double duration = Double.valueOf(execTime); + metricService.updateCountTimeForService(req, duration); + } + } + + @Override + public void destroy() { + + } +} diff --git a/ems-engine/src/main/java/it/integry/ems/metrics/listener/MetricRefreshListener.java b/ems-engine/src/main/java/it/integry/ems/metrics/listener/MetricRefreshListener.java new file mode 100644 index 0000000000..efa990c5c5 --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/metrics/listener/MetricRefreshListener.java @@ -0,0 +1,52 @@ +package it.integry.ems.metrics.listener; + +import it.integry.ems.metrics.service.MetricService; + +import java.util.Date; +import java.util.Timer; +import java.util.TimerTask; + +import javax.annotation.PostConstruct; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class MetricRefreshListener { + + private Logger logger = LogManager.getLogger(); + + @Autowired + private MetricService metricService; + + private Date lastUpdate = new Date(); + + @PostConstruct + public void init() { + TimerTask task = new TimerTask() { + + @Override + public void run() { + metricService.resetMetric(); + setLastUpdate(new Date()); + logger.debug("RESET METRICHE ENTITY"); + } + }; + + // EVERY 1 day + Timer timer = new Timer(); + timer.schedule(task, new Date(), 24 * 60 * 60 * 1000); + } + + public Date getLastUpdate() { + return lastUpdate; + } + + public void setLastUpdate(Date lastUpdate) { + this.lastUpdate = lastUpdate; + } + +} + diff --git a/ems-engine/src/main/java/it/integry/ems/metrics/service/MetricService.java b/ems-engine/src/main/java/it/integry/ems/metrics/service/MetricService.java new file mode 100644 index 0000000000..4c25e399e4 --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/metrics/service/MetricService.java @@ -0,0 +1,125 @@ +package it.integry.ems.metrics.service; + +import it.integry.ems.json.JSONObjectMapper; + +import java.io.StringWriter; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.atomic.AtomicInteger; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class MetricService { + + private static int DAY_HOUR = 24; + + private ConcurrentMap barchartCountService; + private ConcurrentMap> barchartTimeExecService; + + private int[] dayHalfHourLoad = new int[DAY_HOUR * 2]; + + @Autowired + private JSONObjectMapper jsonObjectMapper; + + private Integer totCount = 0; + private AtomicInteger totCountHalfHour = new AtomicInteger(0); + private AtomicInteger idxArray; + + private SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); + + public MetricService() { + barchartCountService = new ConcurrentHashMap(); + barchartTimeExecService = new ConcurrentHashMap>(); + } + + public void updateCountTimeForService(String serviceName, Double timeExec) { + + if (!serviceName.startsWith("metric") && !serviceName.startsWith("js") + && !serviceName.startsWith("fonts") && !serviceName.startsWith("css") + && !serviceName.startsWith("index.jsp") && !serviceName.endsWith("/status")) { + + String[] hourMin = sdf.format(new Date()).split(":"); + idxArray = new AtomicInteger(Integer.parseInt(hourMin[0])); + + int incr = 0; + if (Integer.parseInt(hourMin[1]) > 29) { + incr = 1; + totCountHalfHour.getAndSet(0); + } + + totCountHalfHour.getAndIncrement(); + + dayHalfHourLoad[idxArray.get() * 2 + incr] = totCountHalfHour.get(); + + totCount++; + + Integer count = barchartCountService.get(serviceName); + + if (count == null) + count = 0; + count++; + barchartCountService.put(serviceName, count); + + List list = barchartTimeExecService.get(serviceName); + + if (list == null) + list = new ArrayList(); + list.add(timeExec); + barchartTimeExecService.put(serviceName, list); + } + } + + public String getJsonCountMetric() throws Exception { + StringWriter sw = new StringWriter(); + jsonObjectMapper.writeValue(sw, barchartCountService); + + return sw.toString(); + } + + public String getJsonTimeMetric() throws Exception { + StringWriter sw = new StringWriter(); + jsonObjectMapper.writeValue(sw, barchartTimeExecService); + + return sw.toString(); + } + + public String getJsonTotInvokeMetric() throws Exception { + + String[] hourMin = sdf.format(new Date()).split(":"); + idxArray = new AtomicInteger(Integer.parseInt(hourMin[0])); + + int incr = 0; + if (Integer.parseInt(hourMin[1]) > 29) { + incr = 1; + } + + Integer totHalf = dayHalfHourLoad[idxArray.get() * 2 + incr]; + + return "{\"totCount\":" + totHalf + "}"; + } + + public String getJsonTotDayMetric() throws Exception { + Double sum = 0d, count = 0d, mean = 0d; + for (int i = 0; i < dayHalfHourLoad.length; i++) { + if(dayHalfHourLoad[i] != 0){ + sum += dayHalfHourLoad[i]; + count++; + } + } + if(sum != 0 && count != 0) + mean = sum/count; + return "{\"totMean\":" + mean + "}"; + } + + public void resetMetric() { + totCount = 0; + barchartCountService.clear(); + barchartTimeExecService.clear(); + } +} diff --git a/ems-engine/src/main/java/it/integry/ems/properties/listener/DirectoryPropertiesFileListener.java b/ems-engine/src/main/java/it/integry/ems/properties/listener/DirectoryPropertiesFileListener.java new file mode 100644 index 0000000000..f38b0889a9 --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/properties/listener/DirectoryPropertiesFileListener.java @@ -0,0 +1,46 @@ +package it.integry.ems.properties.listener; + +import it.integry.ems.directory.DirectoryService; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.watching.DirWatcher; + +import java.io.File; +import java.util.Date; +import java.util.Timer; +import java.util.TimerTask; + +import javax.annotation.PostConstruct; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class DirectoryPropertiesFileListener { + + private Logger logger = LogManager.getLogger(); + + @Autowired + private EmsProperties emsProp; + @Autowired + private DirectoryService directoryService; + + @PostConstruct + public void init() { + TimerTask task = new DirWatcher(System.getProperty("catalina.home") + + "/conf/directory", "properties") { + protected void onChange(File file, String action) throws Exception { + if ("modify".equals(action) && file.isFile()) { + logger.debug(file.getName()); + + logger.info("FILE " + file.getName() + " CHANGED!!!"); + directoryService.readConfig(); + } + } + }; + Timer timer = new Timer(); + timer.schedule(task, new Date(), 1000); + } + +} diff --git a/ems-engine/src/main/java/it/integry/ems/scheduler/CustomSchedulerFactoryBean.java b/ems-engine/src/main/java/it/integry/ems/scheduler/CustomSchedulerFactoryBean.java new file mode 100644 index 0000000000..6ed295519b --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/scheduler/CustomSchedulerFactoryBean.java @@ -0,0 +1,60 @@ +package it.integry.ems.scheduler; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.quartz.JobDetail; +import org.quartz.Trigger; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.SmartLifecycle; +import org.springframework.scheduling.quartz.CronTriggerFactoryBean; +import org.springframework.scheduling.quartz.JobDetailFactoryBean; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; + +public class CustomSchedulerFactoryBean extends SchedulerFactoryBean implements + ApplicationContextAware, InitializingBean, DisposableBean, + SmartLifecycle { + + @Override + public void afterPropertiesSet() throws Exception { + String[] beanNameJobs = ctx.getBeanNamesForType(JobDetailFactoryBean.class); + String[] beanNameTriggers = ctx.getBeanNamesForType(CronTriggerFactoryBean.class); + String[] beanNameSimpleTriggers = ctx.getBeanNamesForType(SimpleTriggerFactoryBean.class); + + int i=0; + JobDetail[] jobDetails = new JobDetail[beanNameJobs.length]; + for (String job : beanNameJobs) { + logger.debug("Caricato job: " + job); + jobDetails[i] = ((JobDetailFactoryBean) ctx.getBean(job)).getObject(); + i++; + } + setJobDetails(jobDetails); + + i=0; + Trigger[] triggers = new Trigger[beanNameTriggers.length + beanNameSimpleTriggers.length]; + for (String trigger : beanNameTriggers) { + triggers[i] = ((CronTriggerFactoryBean) ctx.getBean(trigger)).getObject(); + i++; + } + for (String trigger : beanNameSimpleTriggers) { + triggers[i] = ((SimpleTriggerFactoryBean) ctx.getBean(trigger)).getObject(); + i++; + } + + setTriggers(triggers); + super.afterPropertiesSet(); + } + + private ApplicationContext ctx; + + private final Logger logger = LogManager.getLogger(); + + @Override + public void setApplicationContext(ApplicationContext applicationContext) { + this.ctx = applicationContext; + } + +} diff --git a/ems-engine/src/main/java/it/integry/ems/scheduler/JobInfoDTO.java b/ems-engine/src/main/java/it/integry/ems/scheduler/JobInfoDTO.java new file mode 100644 index 0000000000..dde3caebfb --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/scheduler/JobInfoDTO.java @@ -0,0 +1,68 @@ +package it.integry.ems.scheduler; + +import java.util.Date; + +public class JobInfoDTO { + + private String jobName; + private String profileDb=""; + private Date nextFireTime; + private Boolean isRunning=false; + private Boolean isEnabled=false; + private Date fireTime; + private Integer execCount; + public JobInfoDTO(String jobName, String profileDb, Date nextFireTime, Boolean isRunning, + Boolean isEnabled, Date fireTime, Integer execCount) { + super(); + this.jobName = jobName; + this.profileDb = profileDb; + this.nextFireTime = nextFireTime; + this.isRunning = isRunning; + this.isEnabled = isEnabled; + this.fireTime = fireTime; + this.execCount = execCount; + } + public String getJobName() { + return jobName; + } + public void setJobName(String jobName) { + this.jobName = jobName; + } + public String getProfileDb() { + return profileDb; + } + public void setProfileDb(String profileDb) { + this.profileDb = profileDb; + } + public Date getNextFireTime() { + return nextFireTime; + } + public void setNextFireTime(Date nextFireTime) { + this.nextFireTime = nextFireTime; + } + public Boolean getIsRunning() { + return isRunning; + } + public void setIsRunning(Boolean isRunning) { + this.isRunning = isRunning; + } + public Boolean getIsEnabled() { + return isEnabled; + } + public void setIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + } + public Date getFireTime() { + return fireTime; + } + public void setFireTime(Date fireTime) { + this.fireTime = fireTime; + } + public Integer getExecCount() { + return execCount; + } + public void setExecCount(Integer execCount) { + this.execCount = execCount; + } + +} diff --git a/ems-engine/src/main/java/it/integry/ems/scheduler/SchedulerService.java b/ems-engine/src/main/java/it/integry/ems/scheduler/SchedulerService.java new file mode 100644 index 0000000000..4e6982ff3a --- /dev/null +++ b/ems-engine/src/main/java/it/integry/ems/scheduler/SchedulerService.java @@ -0,0 +1,107 @@ +package it.integry.ems.scheduler; + +import it.integry.ems.datasource.DataSource; +import it.integry.ems.properties.EmsProperties; +import it.integry.ems.service.SetupGest; +import it.integry.ems.utility.UtilityString; + +import java.io.File; +import java.io.FileInputStream; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import javax.annotation.PostConstruct; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.scheduling.quartz.CronTriggerFactoryBean; +import org.springframework.scheduling.quartz.JobDetailFactoryBean; +import org.springframework.stereotype.Service; + +@Service +public class SchedulerService { + + private Logger logger = LogManager.getLogger(); + + @Autowired + private ApplicationContext ctx; + @Autowired + private EmsProperties properties; + @Autowired + private SetupGest setupGest; + + @PostConstruct + public void readConfig() throws Exception { + + if("/ems-api".equals(properties.getRootApi())) { + File f = new File(System.getProperty("catalina.home") + "/conf/integry/scheduler.properties"); + if(f.exists()) { + Properties prop = new Properties(); + prop.load(new FileInputStream(f)); + Integer count = 1; + + ConfigurableListableBeanFactory beanFactory = ((ConfigurableApplicationContext) ctx).getBeanFactory(); + + while(!UtilityString.isNullOrEmpty(prop.get("database." + count)) && + !UtilityString.isNullOrEmpty(prop.get("service.jobname." + count)) && + !UtilityString.isNullOrEmpty(prop.get("service.jobclass." + count)) && + !UtilityString.isNullOrEmpty(prop.get("cron." + count)) && + !UtilityString.isNullOrEmpty(prop.get("setup.gest.branch." + count))) { + + DataSource ds = new DataSource(); + ds.initialize(prop.get("database." + count).toString(), properties.getGlobalConnectionIniPath()); + + JobDetailFactoryBean bean = new JobDetailFactoryBean(); + bean.setApplicationContext(ctx); + bean.setBeanName(prop.get("service.jobname." + count).toString()); + bean.setDurability(true); + bean.setJobClass(Class.forName(prop.get("service.jobclass." + count).toString())); + bean.afterPropertiesSet(); + + Map jobDataAsMap = new HashMap(); + jobDataAsMap.put("profileDb", prop.get("database." + count).toString()); + String[] params = prop.get("setup.gest.branch." + count).toString().split("\\|"); + if(params.length >= 3) { + String entries = (String) setupGest.getSetup(ds.getConnection(), + params[0], params[1], params[2] + "PARAMS", ""); + for (String entry : entries.split("&")) { + String[] nameValue = entry.split("="); + Object obj = ctx.getBean(nameValue[1]); + if(obj == null) + obj = nameValue[1]; + jobDataAsMap.put(nameValue[0], obj); + } + String serviceEnabled = (String) setupGest.getSetup(ds.getConnection(), + params[0], params[1], params[2] + "ENABLED", ""); + + jobDataAsMap.put("branch", prop.get("setup.gest.branch." + count).toString()); + + if(UtilityString.isNullOrEmpty(serviceEnabled)) + serviceEnabled = "false"; + jobDataAsMap.put("enabled", Boolean.parseBoolean(serviceEnabled)); + } + if(!UtilityString.isNullOrEmpty(prop.get("service.name." + count))) + jobDataAsMap.put("serviceName", prop.get("service.name." + count).toString()); + + bean.setJobDataAsMap(jobDataAsMap); + beanFactory.registerSingleton(prop.get("service.jobname." + count).toString(), bean); + + CronTriggerFactoryBean cronBean = new CronTriggerFactoryBean(); + cronBean.setBeanName(prop.get("service.jobname." + count).toString()+"Trigger"); + cronBean.setCronExpression(prop.get("cron." + count).toString()); + cronBean.setJobDetail(bean.getObject()); + cronBean.afterPropertiesSet(); + beanFactory.registerSingleton(prop.get("service.jobname." + count).toString()+"Trigger", cronBean); + + ds.forceClose(); + count++; + } + } + } + } +} diff --git a/ems-engine/src/main/java/it/integry/security/AuthenticationRequestWrapper.java b/ems-engine/src/main/java/it/integry/security/AuthenticationRequestWrapper.java new file mode 100644 index 0000000000..ed8f9e0c33 --- /dev/null +++ b/ems-engine/src/main/java/it/integry/security/AuthenticationRequestWrapper.java @@ -0,0 +1,89 @@ +package it.integry.security; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + +import javax.servlet.ReadListener; +import javax.servlet.ServletInputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.security.authentication.LockedException; +import org.springframework.security.core.AuthenticationException; + +public class AuthenticationRequestWrapper extends HttpServletRequestWrapper { + + private final Logger logger = LogManager.getLogger(); + + private final String payload; + + public String getPayload() { + return payload; + } + + public AuthenticationRequestWrapper (HttpServletRequest request) throws AuthenticationException { + super(request); + + // read the original payload into the payload variable + StringBuilder stringBuilder = new StringBuilder(); + BufferedReader bufferedReader = null; + try { + // read the payload into the StringBuilder + InputStream inputStream = request.getInputStream(); + if (inputStream != null) { + bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); + char[] charBuffer = new char[128]; + int bytesRead = -1; + while ((bytesRead = bufferedReader.read(charBuffer)) > 0) { + stringBuilder.append(charBuffer, 0, bytesRead); + } + } else { + // make an empty string since there is no payload + stringBuilder.append(""); + } + } catch (IOException ex) { + logger.error("Error reading the request payload", ex); + throw new LockedException("Error reading the request payload", ex); + } finally { + if (bufferedReader != null) { + try { + bufferedReader.close(); + } catch (IOException iox) { + // ignore + } + } + } + payload = stringBuilder.toString(); + } + + @Override + public ServletInputStream getInputStream () throws IOException { + final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(payload.getBytes()); + ServletInputStream inputStream = new ServletInputStream() { + public int read () throws IOException { + return byteArrayInputStream.read(); + } + + @Override + public boolean isFinished() { + return byteArrayInputStream.available() == 0; + } + + @Override + public boolean isReady() { + return false; + } + + @Override + public void setReadListener(ReadListener readListener) { + + } + }; + return inputStream; + } +} \ No newline at end of file diff --git a/ems-engine/src/main/java/it/integry/security/RestAuthenticationEntryPoint.java b/ems-engine/src/main/java/it/integry/security/RestAuthenticationEntryPoint.java new file mode 100644 index 0000000000..4d29be75dd --- /dev/null +++ b/ems-engine/src/main/java/it/integry/security/RestAuthenticationEntryPoint.java @@ -0,0 +1,23 @@ +package it.integry.security; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint; + +public class RestAuthenticationEntryPoint extends BasicAuthenticationEntryPoint { + + @Override + public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { + response.addHeader("WWW-Authenticate", getRealmName() + " " + request.getServletContext()); + response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); + PrintWriter writer = response.getWriter(); + writer.println("HTTP Status " + HttpServletResponse.SC_UNAUTHORIZED + " - " + authException.getMessage()); + } + +} \ No newline at end of file diff --git a/ems-engine/src/main/java/it/integry/security/filter/RestLoggerBodyFilter.java b/ems-engine/src/main/java/it/integry/security/filter/RestLoggerBodyFilter.java new file mode 100644 index 0000000000..ae484a3f9d --- /dev/null +++ b/ems-engine/src/main/java/it/integry/security/filter/RestLoggerBodyFilter.java @@ -0,0 +1,57 @@ +package it.integry.security.filter; + +import java.util.Enumeration; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.web.filter.AbstractRequestLoggingFilter; + +public class RestLoggerBodyFilter extends AbstractRequestLoggingFilter { + + private final Logger logger = LogManager.getLogger(); + + @Override + protected boolean shouldLog(HttpServletRequest request) { + setMaxPayloadLength(Integer.MAX_VALUE); + return logger.isWarnEnabled(); + } + + /** + * Writes a log message before the request is processed. + */ + @Override + protected void beforeRequest(HttpServletRequest request, String message) { + if(logger.isDebugEnabled()) { + logger.debug(request.getMethod() + " " + request.getContextPath() + request.getServletPath()); + Enumeration enums = request.getHeaderNames(); + while(enums.hasMoreElements()) { + String key = enums.nextElement(); + logger.debug("[KEY] " + key + " [VALUE] " +request.getHeader(key)); + } + + enums = request.getParameterNames(); + logger.debug("[PARAMS]"); + while(enums.hasMoreElements()) { + String key = enums.nextElement(); + logger.debug("[KEY] " + key + " [VALUE] " +request.getHeader(key)); + } + } + } + + /** + * Writes a log message after the request is processed. + */ + @Override + protected void afterRequest(HttpServletRequest request, String message) { + final String serviceName = request.getServletPath().substring(1); + + if(!serviceName.startsWith("metric") && !serviceName.startsWith("js") + && !serviceName.startsWith("fonts") && !serviceName.startsWith("css") + && !serviceName.startsWith("index.jsp") && !serviceName.endsWith("/status")) { + logger.warn("BODY REST CALL AFTER REQUEST: " + message); + } + } + +} diff --git a/ems-engine/src/main/java/it/integry/security/filter/RestSecurityFilter.java b/ems-engine/src/main/java/it/integry/security/filter/RestSecurityFilter.java new file mode 100644 index 0000000000..33b569444e --- /dev/null +++ b/ems-engine/src/main/java/it/integry/security/filter/RestSecurityFilter.java @@ -0,0 +1,181 @@ +package it.integry.security.filter; + +import it.integry.common.var.CommonConstants; +import it.integry.ems.utility.UtilityString; +import it.integry.security.AuthenticationRequestWrapper; +import it.integry.security.RestAuthenticationEntryPoint; +import it.integry.security.utility.RestCredentials; +import it.integry.security.utility.RestToken; + +import java.io.IOException; +import java.util.Date; +import java.util.Set; +import java.util.TreeSet; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.codec.binary.Base64; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.ThreadContext; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.encoding.Md5PasswordEncoder; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; + +public class RestSecurityFilter extends AbstractAuthenticationProcessingFilter { + + private static final String DEFAULT_FILTER_PROCESSES_URL = "/**"; + private static final String POST = "POST"; + + // Enable Multi-Read for PUT and POST requests + private static final Set METHOD_HAS_CONTENT = new TreeSet(String.CASE_INSENSITIVE_ORDER) { + private static final long serialVersionUID = 1L; + { + add("PUT"); + add("POST"); + } + }; + + private Md5PasswordEncoder md5 = new Md5PasswordEncoder(); + + private Logger logger = LogManager.getLogger(); + + private RestAuthenticationEntryPoint authenticationEntryPoint; + + private Date nowDate = new Date(); + private Date date = null; + + private final Long TEN_MINUTES = 10 * 60 * 1000L; + private final Long FIVE_MINUTE_DIFF = -5 * 60000L; + + public RestSecurityFilter(AuthenticationManager manager, + RestAuthenticationEntryPoint authenticationEntryPoint) { + super(new AntPathRequestMatcher(DEFAULT_FILTER_PROCESSES_URL, POST)); + this.authenticationEntryPoint = authenticationEntryPoint; + setAuthenticationManager(manager); + } + + @Override + public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, + ServletException { + // use wrapper to read multiple times the content + AuthenticationRequestWrapper request = new AuthenticationRequestWrapper((HttpServletRequest) req); + HttpServletResponse response = (HttpServletResponse) resp; + + // reset del context + SecurityContextHolder.clearContext(); + nowDate = new Date(); + if (!requiresAuthentication(request, response)) { + + chain.doFilter(request, response); + return; + } + + Authentication authentication = attemptAuthentication(request, response); + try { + // Request the authentication manager to authenticate the token + // (throws exception) + Authentication successfulAuthentication = getAuthenticationManager().authenticate(authentication); + + logger.trace("is auth?: " + successfulAuthentication.isAuthenticated()); + if (successfulAuthentication.isAuthenticated()) { + logger.trace("TIMER VALIDATION START"); + + Long diff = nowDate.getTime() - date.getTime(); + if (diff < FIVE_MINUTE_DIFF || diff >= TEN_MINUTES) { + throw new BadCredentialsException("Autentication error."); + } + logger.trace("TIMER VALIDATION OK"); + // Pass the successful token to the SecurityHolder where it can + // be + // retrieved by this thread at any stage. + SecurityContextHolder.getContext().setAuthentication(successfulAuthentication); + + // Continue with the Filters + chain.doFilter(request, response); + } else { + throw new BadCredentialsException("Errore nell'autenticazione!"); + } + } catch (AuthenticationException authenticationException) { + // If it fails clear this threads context and kick off the + // authentication entry point process. + SecurityContextHolder.clearContext(); + authenticationEntryPoint.commence(request, response, authenticationException); + } + } + + @Override + public Authentication attemptAuthentication(HttpServletRequest req, HttpServletResponse response) + throws AuthenticationException, IOException, ServletException { + + AuthenticationRequestWrapper request = (AuthenticationRequestWrapper) req; + + // Get authorization header + String credentials = request.getHeader("Authorization"); + + if (credentials == null) + throw new BadCredentialsException(""); + + if (credentials.startsWith("Basic ")) { + final String encodedUserPassword = credentials.replaceFirst("Basic ", ""); + // Decode username and password + credentials = new String(Base64.decodeBase64(encodedUserPassword)); + } + + // Authorization header is in the form : + String auth[] = credentials.split(":"); + + // get md5 content and content-type if the request is POST or PUT method + boolean hasContent = METHOD_HAS_CONTENT.contains(request.getMethod()); + String contentMd5 = hasContent ? md5.encodePassword(request.getPayload(), null) : ""; + String contentType = hasContent ? request.getContentType() : ""; + + // get timestamp + String timestamp = request.getHeader("SignDate"); + + // calculate content to sign + StringBuilder toSign = new StringBuilder(); + toSign.append(request.getMethod()).append("\n").append(contentMd5).append("\n").append(contentType) + .append("\n").append(timestamp).append("\n").append(request.getRequestURI()); + + if(UtilityString.isNullOrEmpty(req.getHeader("username"))) { + if(UtilityString.isNullOrEmpty(req.getParameter("username"))) + ThreadContext.put("username", auth[0]); + else { + ThreadContext.put("username", req.getParameter("username")); + + } + } else + ThreadContext.put("username", req.getHeader("username")); + logger.trace("IP CHIAMANTE - " + request.getRemoteAddr()); + logger.trace("Authorization - " + auth[0] + " ::: " + auth[1]); + logger.trace("SignDate - " + timestamp); + logger.trace("signature - " + toSign.toString()); + + // a rest credential is composed by request data to sign and the + // signature + RestCredentials restCredential = new RestCredentials(toSign.toString(), auth[1]); + + // calculate UTC time from timestamp (usually Date header is GMT but + // still...) + + if (timestamp == null) + date = new Date(); + else + date = UtilityString.parseDate(timestamp); + + // Create an authentication token + return new RestToken(auth[0], restCredential, date, request.getParameter(CommonConstants.PROFILE_DB)); + } + +} \ No newline at end of file diff --git a/ems-engine/src/main/resources/META-INF/drools.packagebuilder.conf b/ems-engine/src/main/resources/META-INF/drools.packagebuilder.conf new file mode 100644 index 0000000000..0dca213f71 --- /dev/null +++ b/ems-engine/src/main/resources/META-INF/drools.packagebuilder.conf @@ -0,0 +1 @@ +drools.accumulate.function.customAccumulate=it.integry.ems.rules.util.CustomAccumulateFunction \ No newline at end of file diff --git a/ems-engine/src/main/resources/META-INF/spring.handlers b/ems-engine/src/main/resources/META-INF/spring.handlers new file mode 100644 index 0000000000..4bb3684b84 --- /dev/null +++ b/ems-engine/src/main/resources/META-INF/spring.handlers @@ -0,0 +1 @@ +http\://robertmaldon.com/springbeans/condbean=it.integry.ems.spring.etl.ConditionalBeanNamespaceHandler \ No newline at end of file diff --git a/ems-engine/src/main/resources/META-INF/spring.schemas b/ems-engine/src/main/resources/META-INF/spring.schemas new file mode 100644 index 0000000000..027475f211 --- /dev/null +++ b/ems-engine/src/main/resources/META-INF/spring.schemas @@ -0,0 +1 @@ +http\://robertmaldon.com/springbeans/condbean/condbean.xsd=conditional/springbeans/condbean.xsd \ No newline at end of file diff --git a/ems-engine/src/main/resources/conditional/springbeans/condbean.xsd b/ems-engine/src/main/resources/conditional/springbeans/condbean.xsd new file mode 100644 index 0000000000..6c55d198e9 --- /dev/null +++ b/ems-engine/src/main/resources/conditional/springbeans/condbean.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-engine/src/main/resources/configs/mail.properties b/ems-engine/src/main/resources/configs/mail.properties new file mode 100644 index 0000000000..21661b68c8 --- /dev/null +++ b/ems-engine/src/main/resources/configs/mail.properties @@ -0,0 +1,7 @@ +smtp=smtp.integry.it +smtp.port=25 +smtp.auth=true +smtp.starttls.enable=false + +sender.user=info@integry.it +sender.pwd=sqliy@ \ No newline at end of file diff --git a/ems-engine/src/main/resources/configs/root.properties b/ems-engine/src/main/resources/configs/root.properties new file mode 100644 index 0000000000..a946c4c56d --- /dev/null +++ b/ems-engine/src/main/resources/configs/root.properties @@ -0,0 +1 @@ +root.api=/${ems.war.name}-api \ No newline at end of file diff --git a/ems-engine/src/main/resources/ems/ems.properties b/ems-engine/src/main/resources/ems/ems.properties new file mode 100644 index 0000000000..ffc3109e81 --- /dev/null +++ b/ems-engine/src/main/resources/ems/ems.properties @@ -0,0 +1,8 @@ +#ini.path= +#global.connection.ini.path=C:/MLSetupWS/connectDB.ini +#endpoint.ws=http://localhost:8080 +#receipts.folder=c:/test +#quartz.enabled=false +#cron.expr=0 0/30 * 1/1 * ? * +#default.printer.name= +#root.api=${ems.war.name}-api \ No newline at end of file diff --git a/ems-engine/src/main/resources/locales/messages.properties b/ems-engine/src/main/resources/locales/messages.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ems-engine/src/main/resources/locales/messages_it.properties b/ems-engine/src/main/resources/locales/messages_it.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ems-engine/src/main/resources/log4j2.xml b/ems-engine/src/main/resources/log4j2.xml new file mode 100644 index 0000000000..64ba409add --- /dev/null +++ b/ems-engine/src/main/resources/log4j2.xml @@ -0,0 +1,72 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1.1.9}.java:%L %X{username} - %m%n + + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1.1.9}.java:%L %X{username} - %m%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-engine/src/main/resources/mvc-dispatcher-servlet.xml b/ems-engine/src/main/resources/mvc-dispatcher-servlet.xml new file mode 100644 index 0000000000..2d5c3db33b --- /dev/null +++ b/ems-engine/src/main/resources/mvc-dispatcher-servlet.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-engine/src/main/resources/quartz/config.properties b/ems-engine/src/main/resources/quartz/config.properties new file mode 100644 index 0000000000..36bdcd4bf9 --- /dev/null +++ b/ems-engine/src/main/resources/quartz/config.properties @@ -0,0 +1,9 @@ +org.quartz.scheduler.instanceId=AUTO +org.quartz.scheduler.instanceName=MY_JOB_SCHEDULER + +org.quartz.scheduler.rmi.export = false +org.quartz.scheduler.rmi.proxy = false +org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool +org.quartz.threadPool.threadCount = 10 +org.quartz.threadPool.threadPriority = 5 +org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true \ No newline at end of file diff --git a/ems-engine/src/main/resources/rules/general.drl b/ems-engine/src/main/resources/rules/general.drl new file mode 100644 index 0000000000..b8b1627be0 --- /dev/null +++ b/ems-engine/src/main/resources/rules/general.drl @@ -0,0 +1,7 @@ +package it.integry.rules + +import it.integry.ems.entity.* +import java.sql.Connection + +global Connection conn + diff --git a/ems-engine/src/main/resources/spring/applicationContext-security.xml b/ems-engine/src/main/resources/spring/applicationContext-security.xml new file mode 100644 index 0000000000..fd37eb5d2a --- /dev/null +++ b/ems-engine/src/main/resources/spring/applicationContext-security.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-engine/src/main/resources/spring/applicationContext.xml b/ems-engine/src/main/resources/spring/applicationContext.xml new file mode 100644 index 0000000000..14a6757b18 --- /dev/null +++ b/ems-engine/src/main/resources/spring/applicationContext.xml @@ -0,0 +1,91 @@ + + + + + + + + + + classpath*:configs/*.properties + file:///${catalina.home}/conf/integry/ems.properties + file:///${catalina.home}/conf/integry/ordikids.properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${smtp} + ${smtp.port} + ${smtp.auth} + ${smtp.starttls.enable} + + + + \ No newline at end of file diff --git a/ems-engine/src/main/webapp/META-INF/context.xml b/ems-engine/src/main/webapp/META-INF/context.xml new file mode 100644 index 0000000000..00e6551eb1 --- /dev/null +++ b/ems-engine/src/main/webapp/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/ems-engine/src/main/webapp/WEB-INF/web.xml b/ems-engine/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..68a611d504 --- /dev/null +++ b/ems-engine/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,142 @@ + + + RESTFul Ws Translator + + contextConfigLocation + + classpath:spring/applicationContext.xml + classpath:spring/applicationContext-security.xml + + + + log4jContextName + ems + + + log4jConfiguration + classpath:log4j2.xml + + + + org.apache.logging.log4j.web.Log4jServletContextListener + + + org.springframework.web.context.ContextLoaderListener + + + org.springframework.web.context.request.RequestContextListener + + + + SpringDispatcherServlet + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + classpath:mvc-dispatcher-servlet.xml + + 1 + + + SpringDispatcherServlet + / + + + + metricFilter + it.integry.ems.metrics.filter.MetricFilter + + + metricFilter + /* + + + + CORS + com.thetransactioncompany.cors.CORSFilter + + cors.allowGenericHttpRequests + true + + + + cors.allowOrigin + * + + + + cors.allowSubdomains + false + + + + cors.supportedMethods + GET, HEAD, POST, OPTIONS + + + + cors.supportedHeaders + * + + + + cors.exposedHeaders + SignDate, Authorization, Content-Type + + + + cors.supportsCredentials + true + + + + cors.maxAge + 3600 + + + + + + requestLoggingFilter + it.integry.security.filter.RestLoggerBodyFilter + + includeClientInfo + true + + + includePayload + true + + + includeQueryString + false + + + + requestLoggingFilter + /* + + + + CORS + /* + + + + springSecurityFilterChain + org.springframework.web.filter.DelegatingFilterProxy + + + springSecurityFilterChain + /* + + + 30 + + ems + + index.jsp + + \ No newline at end of file diff --git a/ems-engine/src/main/webapp/css/bootstrap-theme.min.css b/ems-engine/src/main/webapp/css/bootstrap-theme.min.css new file mode 100644 index 0000000000..dc95d8e4e4 --- /dev/null +++ b/ems-engine/src/main/webapp/css/bootstrap-theme.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} +/*# sourceMappingURL=bootstrap-theme.min.css.map */ \ No newline at end of file diff --git a/ems-engine/src/main/webapp/css/bootstrap.min.css b/ems-engine/src/main/webapp/css/bootstrap.min.css new file mode 100644 index 0000000000..4cf729e434 --- /dev/null +++ b/ems-engine/src/main/webapp/css/bootstrap.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/ems-engine/src/main/webapp/css/cerch.png b/ems-engine/src/main/webapp/css/cerch.png new file mode 100644 index 0000000000..e6962d0d83 Binary files /dev/null and b/ems-engine/src/main/webapp/css/cerch.png differ diff --git a/ems-engine/src/main/webapp/css/codemirror.css b/ems-engine/src/main/webapp/css/codemirror.css new file mode 100644 index 0000000000..c95db6445c --- /dev/null +++ b/ems-engine/src/main/webapp/css/codemirror.css @@ -0,0 +1,259 @@ +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; +} +.CodeMirror-scroll { + /* Set scrolling behaviour here */ + overflow: auto; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; +} + +/* CURSOR */ + +.CodeMirror div.CodeMirror-cursor { + border-left: 1px solid black; + z-index: 3; +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { + width: auto; + border: 0; + background: #7e7; + z-index: 1; +} +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {} + +.cm-tab { display: inline-block; } + +/* DEFAULT THEME */ + +.cm-s-default .cm-keyword {color: #708;} +.cm-s-default .cm-atom {color: #219;} +.cm-s-default .cm-number {color: #164;} +.cm-s-default .cm-def {color: #00f;} +.cm-s-default .cm-variable {color: black;} +.cm-s-default .cm-variable-2 {color: #05a;} +.cm-s-default .cm-variable-3 {color: #085;} +.cm-s-default .cm-property {color: black;} +.cm-s-default .cm-operator {color: black;} +.cm-s-default .cm-comment {color: #a50;} +.cm-s-default .cm-string {color: #a11;} +.cm-s-default .cm-string-2 {color: #f50;} +.cm-s-default .cm-meta {color: #555;} +.cm-s-default .cm-error {color: #f00;} +.cm-s-default .cm-qualifier {color: #555;} +.cm-s-default .cm-builtin {color: #30a;} +.cm-s-default .cm-bracket {color: #997;} +.cm-s-default .cm-tag {color: #170;} +.cm-s-default .cm-attribute {color: #00c;} +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-s-default .cm-hr {color: #999;} +.cm-s-default .cm-link {color: #00c;} + +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-link {text-decoration: underline;} + +.cm-invalidchar {color: #f00;} + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} +.CodeMirror-activeline-background {background: #e8f2ff;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + line-height: 1; + position: relative; + overflow: hidden; + background: white; + color: black; +} + +.CodeMirror-scroll { + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -30px; margin-right: -30px; + padding-bottom: 30px; padding-right: 30px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; +} +.CodeMirror-sizer { + position: relative; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actuall scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; +} +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + padding-bottom: 30px; + z-index: 3; +} +.CodeMirror-gutter { + white-space: normal; + height: 100%; + padding-bottom: 30px; + margin-bottom: -32px; + display: inline-block; + /* Hack to make IE7 behave */ + *zoom:1; + *display:inline; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} + +.CodeMirror-lines { + cursor: text; +} +.CodeMirror pre { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; +} +.CodeMirror-wrap pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} +.CodeMirror-code pre { + border-right: 30px solid transparent; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; +} +.CodeMirror-wrap .CodeMirror-code pre { + border-right: none; + width: auto; +} +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + overflow: auto; +} + +.CodeMirror-widget { +} + +.CodeMirror-wrap .CodeMirror-scroll { + overflow-x: hidden; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; height: 0px; + overflow: hidden; + visibility: hidden; +} +.CodeMirror-measure pre { position: static; } + +.CodeMirror div.CodeMirror-cursor { + position: absolute; + visibility: hidden; + border-right: none; + width: 0; +} +.CodeMirror-focused div.CodeMirror-cursor { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } +.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } + +.cm-searching { + background: #ffa; + background: rgba(255, 255, 0, .4); +} + +/* IE7 hack to prevent it from returning funny offsetTops on the spans */ +.CodeMirror span { *vertical-align: text-bottom; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursor { + visibility: hidden; + } +} diff --git a/ems-engine/src/main/webapp/css/demo.css b/ems-engine/src/main/webapp/css/demo.css new file mode 100644 index 0000000000..2d97c0af65 --- /dev/null +++ b/ems-engine/src/main/webapp/css/demo.css @@ -0,0 +1,107 @@ +@import url(http://fonts.googleapis.com/css?family=Inconsolata); + +html, body{ + margin: 0; + padding: 0; +} + +body{ + font-family: sans; + color: #222; + background-color: #fdfdfd; + width: 98%; + margin: 2%; + margin-top: 1em; +} + +.buttons{ + margin: 1em 0; + display: table; + width: 100%; + text-align: center; +} + +button{ + display: inline-block; + padding: 6px 12px; + margin-bottom: 0px; + font-size: 14px; + font-weight: normal; + line-height: 1.42857; + text-align: center; + white-space: nowrap; + vertical-align: middle; + cursor: pointer; + border: 1px solid transparent; + border-radius: 4px 4px 4px 4px; + -moz-user-select: none; + color: rgb(51, 51, 51); + background-color: rgb(255, 255, 255); + border-color: rgb(204, 204, 204); + color: rgb(255, 255, 255); + background-color: rgb(66, 139, 202); + border-color: rgb(53, 126, 189); +} + +button:hover, button:focus, button:active{ + color: rgb(255, 255, 255); + background-color: rgb(50, 118, 177); + border-color: rgb(40, 94, 142); +} + +.CodeMirror{ + border: 1px solid #ddd; +} + +.btn { + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset; +} +.btn-danger { + background-color: #1d9d74; + border-color: #198764; + color: #ffffff; +} +.btn { + -moz-user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; + cursor: pointer; + display: inline-block; + font-size: 14px; + font-weight: normal; + line-height: 1.42857; + margin-bottom: 0; + padding: 6px 12px; + text-align: center; + vertical-align: middle; + white-space: nowrap; +} + +.jh-root { + font-family: 'Inconsolata' ; +} + +.filterable { + margin-top: 15px; +} +.filterable .panel-heading .pull-right { + margin-top: -20px; +} +.filterable .filters input[disabled] { + background-color: transparent; + border: none; + cursor: auto; + box-shadow: none; + padding: 0; + height: auto; +} +.filterable .filters input[disabled]::-webkit-input-placeholder { + color: #333; +} +.filterable .filters input[disabled]::-moz-placeholder { + color: #333; +} +.filterable .filters input[disabled]:-ms-input-placeholder { + color: #333; +} \ No newline at end of file diff --git a/ems-engine/src/main/webapp/css/false.png b/ems-engine/src/main/webapp/css/false.png new file mode 100644 index 0000000000..0877f43893 Binary files /dev/null and b/ems-engine/src/main/webapp/css/false.png differ diff --git a/ems-engine/src/main/webapp/css/font-awesome.css b/ems-engine/src/main/webapp/css/font-awesome.css new file mode 100644 index 0000000000..880eb82503 --- /dev/null +++ b/ems-engine/src/main/webapp/css/font-awesome.css @@ -0,0 +1,2026 @@ +/*! + * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'FontAwesome'; + src: url('../fonts/fontawesome-webfont.eot?v=4.4.0'); + src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg'); + font-weight: normal; + font-style: normal; +} +.fa { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +/* makes the font 33% larger relative to the icon container */ +.fa-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.fa-2x { + font-size: 2em; +} +.fa-3x { + font-size: 3em; +} +.fa-4x { + font-size: 4em; +} +.fa-5x { + font-size: 5em; +} +.fa-fw { + width: 1.28571429em; + text-align: center; +} +.fa-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} +.fa-ul > li { + position: relative; +} +.fa-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} +.fa-li.fa-lg { + left: -1.85714286em; +} +.fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} +.fa-pull-left { + float: left; +} +.fa-pull-right { + float: right; +} +.fa.fa-pull-left { + margin-right: .3em; +} +.fa.fa-pull-right { + margin-left: .3em; +} +/* Deprecated as of 4.4.0 */ +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.fa.pull-left { + margin-right: .3em; +} +.fa.pull-right { + margin-left: .3em; +} +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); +} +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.fa-rotate-90 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.fa-rotate-180 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.fa-rotate-270 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} +.fa-flip-horizontal { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.fa-flip-vertical { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + filter: none; +} +.fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.fa-stack-1x, +.fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.fa-stack-1x { + line-height: inherit; +} +.fa-stack-2x { + font-size: 2em; +} +.fa-inverse { + color: #ffffff; +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.fa-glass:before { + content: "\f000"; +} +.fa-music:before { + content: "\f001"; +} +.fa-search:before { + content: "\f002"; +} +.fa-envelope-o:before { + content: "\f003"; +} +.fa-heart:before { + content: "\f004"; +} +.fa-star:before { + content: "\f005"; +} +.fa-star-o:before { + content: "\f006"; +} +.fa-user:before { + content: "\f007"; +} +.fa-film:before { + content: "\f008"; +} +.fa-th-large:before { + content: "\f009"; +} +.fa-th:before { + content: "\f00a"; +} +.fa-th-list:before { + content: "\f00b"; +} +.fa-check:before { + content: "\f00c"; +} +.fa-remove:before, +.fa-close:before, +.fa-times:before { + content: "\f00d"; +} +.fa-search-plus:before { + content: "\f00e"; +} +.fa-search-minus:before { + content: "\f010"; +} +.fa-power-off:before { + content: "\f011"; +} +.fa-signal:before { + content: "\f012"; +} +.fa-gear:before, +.fa-cog:before { + content: "\f013"; +} +.fa-trash-o:before { + content: "\f014"; +} +.fa-home:before { + content: "\f015"; +} +.fa-file-o:before { + content: "\f016"; +} +.fa-clock-o:before { + content: "\f017"; +} +.fa-road:before { + content: "\f018"; +} +.fa-download:before { + content: "\f019"; +} +.fa-arrow-circle-o-down:before { + content: "\f01a"; +} +.fa-arrow-circle-o-up:before { + content: "\f01b"; +} +.fa-inbox:before { + content: "\f01c"; +} +.fa-play-circle-o:before { + content: "\f01d"; +} +.fa-rotate-right:before, +.fa-repeat:before { + content: "\f01e"; +} +.fa-refresh:before { + content: "\f021"; +} +.fa-list-alt:before { + content: "\f022"; +} +.fa-lock:before { + content: "\f023"; +} +.fa-flag:before { + content: "\f024"; +} +.fa-headphones:before { + content: "\f025"; +} +.fa-volume-off:before { + content: "\f026"; +} +.fa-volume-down:before { + content: "\f027"; +} +.fa-volume-up:before { + content: "\f028"; +} +.fa-qrcode:before { + content: "\f029"; +} +.fa-barcode:before { + content: "\f02a"; +} +.fa-tag:before { + content: "\f02b"; +} +.fa-tags:before { + content: "\f02c"; +} +.fa-book:before { + content: "\f02d"; +} +.fa-bookmark:before { + content: "\f02e"; +} +.fa-print:before { + content: "\f02f"; +} +.fa-camera:before { + content: "\f030"; +} +.fa-font:before { + content: "\f031"; +} +.fa-bold:before { + content: "\f032"; +} +.fa-italic:before { + content: "\f033"; +} +.fa-text-height:before { + content: "\f034"; +} +.fa-text-width:before { + content: "\f035"; +} +.fa-align-left:before { + content: "\f036"; +} +.fa-align-center:before { + content: "\f037"; +} +.fa-align-right:before { + content: "\f038"; +} +.fa-align-justify:before { + content: "\f039"; +} +.fa-list:before { + content: "\f03a"; +} +.fa-dedent:before, +.fa-outdent:before { + content: "\f03b"; +} +.fa-indent:before { + content: "\f03c"; +} +.fa-video-camera:before { + content: "\f03d"; +} +.fa-photo:before, +.fa-image:before, +.fa-picture-o:before { + content: "\f03e"; +} +.fa-pencil:before { + content: "\f040"; +} +.fa-map-marker:before { + content: "\f041"; +} +.fa-adjust:before { + content: "\f042"; +} +.fa-tint:before { + content: "\f043"; +} +.fa-edit:before, +.fa-pencil-square-o:before { + content: "\f044"; +} +.fa-share-square-o:before { + content: "\f045"; +} +.fa-check-square-o:before { + content: "\f046"; +} +.fa-arrows:before { + content: "\f047"; +} +.fa-step-backward:before { + content: "\f048"; +} +.fa-fast-backward:before { + content: "\f049"; +} +.fa-backward:before { + content: "\f04a"; +} +.fa-play:before { + content: "\f04b"; +} +.fa-pause:before { + content: "\f04c"; +} +.fa-stop:before { + content: "\f04d"; +} +.fa-forward:before { + content: "\f04e"; +} +.fa-fast-forward:before { + content: "\f050"; +} +.fa-step-forward:before { + content: "\f051"; +} +.fa-eject:before { + content: "\f052"; +} +.fa-chevron-left:before { + content: "\f053"; +} +.fa-chevron-right:before { + content: "\f054"; +} +.fa-plus-circle:before { + content: "\f055"; +} +.fa-minus-circle:before { + content: "\f056"; +} +.fa-times-circle:before { + content: "\f057"; +} +.fa-check-circle:before { + content: "\f058"; +} +.fa-question-circle:before { + content: "\f059"; +} +.fa-info-circle:before { + content: "\f05a"; +} +.fa-crosshairs:before { + content: "\f05b"; +} +.fa-times-circle-o:before { + content: "\f05c"; +} +.fa-check-circle-o:before { + content: "\f05d"; +} +.fa-ban:before { + content: "\f05e"; +} +.fa-arrow-left:before { + content: "\f060"; +} +.fa-arrow-right:before { + content: "\f061"; +} +.fa-arrow-up:before { + content: "\f062"; +} +.fa-arrow-down:before { + content: "\f063"; +} +.fa-mail-forward:before, +.fa-share:before { + content: "\f064"; +} +.fa-expand:before { + content: "\f065"; +} +.fa-compress:before { + content: "\f066"; +} +.fa-plus:before { + content: "\f067"; +} +.fa-minus:before { + content: "\f068"; +} +.fa-asterisk:before { + content: "\f069"; +} +.fa-exclamation-circle:before { + content: "\f06a"; +} +.fa-gift:before { + content: "\f06b"; +} +.fa-leaf:before { + content: "\f06c"; +} +.fa-fire:before { + content: "\f06d"; +} +.fa-eye:before { + content: "\f06e"; +} +.fa-eye-slash:before { + content: "\f070"; +} +.fa-warning:before, +.fa-exclamation-triangle:before { + content: "\f071"; +} +.fa-plane:before { + content: "\f072"; +} +.fa-calendar:before { + content: "\f073"; +} +.fa-random:before { + content: "\f074"; +} +.fa-comment:before { + content: "\f075"; +} +.fa-magnet:before { + content: "\f076"; +} +.fa-chevron-up:before { + content: "\f077"; +} +.fa-chevron-down:before { + content: "\f078"; +} +.fa-retweet:before { + content: "\f079"; +} +.fa-shopping-cart:before { + content: "\f07a"; +} +.fa-folder:before { + content: "\f07b"; +} +.fa-folder-open:before { + content: "\f07c"; +} +.fa-arrows-v:before { + content: "\f07d"; +} +.fa-arrows-h:before { + content: "\f07e"; +} +.fa-bar-chart-o:before, +.fa-bar-chart:before { + content: "\f080"; +} +.fa-twitter-square:before { + content: "\f081"; +} +.fa-facebook-square:before { + content: "\f082"; +} +.fa-camera-retro:before { + content: "\f083"; +} +.fa-key:before { + content: "\f084"; +} +.fa-gears:before, +.fa-cogs:before { + content: "\f085"; +} +.fa-comments:before { + content: "\f086"; +} +.fa-thumbs-o-up:before { + content: "\f087"; +} +.fa-thumbs-o-down:before { + content: "\f088"; +} +.fa-star-half:before { + content: "\f089"; +} +.fa-heart-o:before { + content: "\f08a"; +} +.fa-sign-out:before { + content: "\f08b"; +} +.fa-linkedin-square:before { + content: "\f08c"; +} +.fa-thumb-tack:before { + content: "\f08d"; +} +.fa-external-link:before { + content: "\f08e"; +} +.fa-sign-in:before { + content: "\f090"; +} +.fa-trophy:before { + content: "\f091"; +} +.fa-github-square:before { + content: "\f092"; +} +.fa-upload:before { + content: "\f093"; +} +.fa-lemon-o:before { + content: "\f094"; +} +.fa-phone:before { + content: "\f095"; +} +.fa-square-o:before { + content: "\f096"; +} +.fa-bookmark-o:before { + content: "\f097"; +} +.fa-phone-square:before { + content: "\f098"; +} +.fa-twitter:before { + content: "\f099"; +} +.fa-facebook-f:before, +.fa-facebook:before { + content: "\f09a"; +} +.fa-github:before { + content: "\f09b"; +} +.fa-unlock:before { + content: "\f09c"; +} +.fa-credit-card:before { + content: "\f09d"; +} +.fa-feed:before, +.fa-rss:before { + content: "\f09e"; +} +.fa-hdd-o:before { + content: "\f0a0"; +} +.fa-bullhorn:before { + content: "\f0a1"; +} +.fa-bell:before { + content: "\f0f3"; +} +.fa-certificate:before { + content: "\f0a3"; +} +.fa-hand-o-right:before { + content: "\f0a4"; +} +.fa-hand-o-left:before { + content: "\f0a5"; +} +.fa-hand-o-up:before { + content: "\f0a6"; +} +.fa-hand-o-down:before { + content: "\f0a7"; +} +.fa-arrow-circle-left:before { + content: "\f0a8"; +} +.fa-arrow-circle-right:before { + content: "\f0a9"; +} +.fa-arrow-circle-up:before { + content: "\f0aa"; +} +.fa-arrow-circle-down:before { + content: "\f0ab"; +} +.fa-globe:before { + content: "\f0ac"; +} +.fa-wrench:before { + content: "\f0ad"; +} +.fa-tasks:before { + content: "\f0ae"; +} +.fa-filter:before { + content: "\f0b0"; +} +.fa-briefcase:before { + content: "\f0b1"; +} +.fa-arrows-alt:before { + content: "\f0b2"; +} +.fa-group:before, +.fa-users:before { + content: "\f0c0"; +} +.fa-chain:before, +.fa-link:before { + content: "\f0c1"; +} +.fa-cloud:before { + content: "\f0c2"; +} +.fa-flask:before { + content: "\f0c3"; +} +.fa-cut:before, +.fa-scissors:before { + content: "\f0c4"; +} +.fa-copy:before, +.fa-files-o:before { + content: "\f0c5"; +} +.fa-paperclip:before { + content: "\f0c6"; +} +.fa-save:before, +.fa-floppy-o:before { + content: "\f0c7"; +} +.fa-square:before { + content: "\f0c8"; +} +.fa-navicon:before, +.fa-reorder:before, +.fa-bars:before { + content: "\f0c9"; +} +.fa-list-ul:before { + content: "\f0ca"; +} +.fa-list-ol:before { + content: "\f0cb"; +} +.fa-strikethrough:before { + content: "\f0cc"; +} +.fa-underline:before { + content: "\f0cd"; +} +.fa-table:before { + content: "\f0ce"; +} +.fa-magic:before { + content: "\f0d0"; +} +.fa-truck:before { + content: "\f0d1"; +} +.fa-pinterest:before { + content: "\f0d2"; +} +.fa-pinterest-square:before { + content: "\f0d3"; +} +.fa-google-plus-square:before { + content: "\f0d4"; +} +.fa-google-plus:before { + content: "\f0d5"; +} +.fa-money:before { + content: "\f0d6"; +} +.fa-caret-down:before { + content: "\f0d7"; +} +.fa-caret-up:before { + content: "\f0d8"; +} +.fa-caret-left:before { + content: "\f0d9"; +} +.fa-caret-right:before { + content: "\f0da"; +} +.fa-columns:before { + content: "\f0db"; +} +.fa-unsorted:before, +.fa-sort:before { + content: "\f0dc"; +} +.fa-sort-down:before, +.fa-sort-desc:before { + content: "\f0dd"; +} +.fa-sort-up:before, +.fa-sort-asc:before { + content: "\f0de"; +} +.fa-envelope:before { + content: "\f0e0"; +} +.fa-linkedin:before { + content: "\f0e1"; +} +.fa-rotate-left:before, +.fa-undo:before { + content: "\f0e2"; +} +.fa-legal:before, +.fa-gavel:before { + content: "\f0e3"; +} +.fa-dashboard:before, +.fa-tachometer:before { + content: "\f0e4"; +} +.fa-comment-o:before { + content: "\f0e5"; +} +.fa-comments-o:before { + content: "\f0e6"; +} +.fa-flash:before, +.fa-bolt:before { + content: "\f0e7"; +} +.fa-sitemap:before { + content: "\f0e8"; +} +.fa-umbrella:before { + content: "\f0e9"; +} +.fa-paste:before, +.fa-clipboard:before { + content: "\f0ea"; +} +.fa-lightbulb-o:before { + content: "\f0eb"; +} +.fa-exchange:before { + content: "\f0ec"; +} +.fa-cloud-download:before { + content: "\f0ed"; +} +.fa-cloud-upload:before { + content: "\f0ee"; +} +.fa-user-md:before { + content: "\f0f0"; +} +.fa-stethoscope:before { + content: "\f0f1"; +} +.fa-suitcase:before { + content: "\f0f2"; +} +.fa-bell-o:before { + content: "\f0a2"; +} +.fa-coffee:before { + content: "\f0f4"; +} +.fa-cutlery:before { + content: "\f0f5"; +} +.fa-file-text-o:before { + content: "\f0f6"; +} +.fa-building-o:before { + content: "\f0f7"; +} +.fa-hospital-o:before { + content: "\f0f8"; +} +.fa-ambulance:before { + content: "\f0f9"; +} +.fa-medkit:before { + content: "\f0fa"; +} +.fa-fighter-jet:before { + content: "\f0fb"; +} +.fa-beer:before { + content: "\f0fc"; +} +.fa-h-square:before { + content: "\f0fd"; +} +.fa-plus-square:before { + content: "\f0fe"; +} +.fa-angle-double-left:before { + content: "\f100"; +} +.fa-angle-double-right:before { + content: "\f101"; +} +.fa-angle-double-up:before { + content: "\f102"; +} +.fa-angle-double-down:before { + content: "\f103"; +} +.fa-angle-left:before { + content: "\f104"; +} +.fa-angle-right:before { + content: "\f105"; +} +.fa-angle-up:before { + content: "\f106"; +} +.fa-angle-down:before { + content: "\f107"; +} +.fa-desktop:before { + content: "\f108"; +} +.fa-laptop:before { + content: "\f109"; +} +.fa-tablet:before { + content: "\f10a"; +} +.fa-mobile-phone:before, +.fa-mobile:before { + content: "\f10b"; +} +.fa-circle-o:before { + content: "\f10c"; +} +.fa-quote-left:before { + content: "\f10d"; +} +.fa-quote-right:before { + content: "\f10e"; +} +.fa-spinner:before { + content: "\f110"; +} +.fa-circle:before { + content: "\f111"; +} +.fa-mail-reply:before, +.fa-reply:before { + content: "\f112"; +} +.fa-github-alt:before { + content: "\f113"; +} +.fa-folder-o:before { + content: "\f114"; +} +.fa-folder-open-o:before { + content: "\f115"; +} +.fa-smile-o:before { + content: "\f118"; +} +.fa-frown-o:before { + content: "\f119"; +} +.fa-meh-o:before { + content: "\f11a"; +} +.fa-gamepad:before { + content: "\f11b"; +} +.fa-keyboard-o:before { + content: "\f11c"; +} +.fa-flag-o:before { + content: "\f11d"; +} +.fa-flag-checkered:before { + content: "\f11e"; +} +.fa-terminal:before { + content: "\f120"; +} +.fa-code:before { + content: "\f121"; +} +.fa-mail-reply-all:before, +.fa-reply-all:before { + content: "\f122"; +} +.fa-star-half-empty:before, +.fa-star-half-full:before, +.fa-star-half-o:before { + content: "\f123"; +} +.fa-location-arrow:before { + content: "\f124"; +} +.fa-crop:before { + content: "\f125"; +} +.fa-code-fork:before { + content: "\f126"; +} +.fa-unlink:before, +.fa-chain-broken:before { + content: "\f127"; +} +.fa-question:before { + content: "\f128"; +} +.fa-info:before { + content: "\f129"; +} +.fa-exclamation:before { + content: "\f12a"; +} +.fa-superscript:before { + content: "\f12b"; +} +.fa-subscript:before { + content: "\f12c"; +} +.fa-eraser:before { + content: "\f12d"; +} +.fa-puzzle-piece:before { + content: "\f12e"; +} +.fa-microphone:before { + content: "\f130"; +} +.fa-microphone-slash:before { + content: "\f131"; +} +.fa-shield:before { + content: "\f132"; +} +.fa-calendar-o:before { + content: "\f133"; +} +.fa-fire-extinguisher:before { + content: "\f134"; +} +.fa-rocket:before { + content: "\f135"; +} +.fa-maxcdn:before { + content: "\f136"; +} +.fa-chevron-circle-left:before { + content: "\f137"; +} +.fa-chevron-circle-right:before { + content: "\f138"; +} +.fa-chevron-circle-up:before { + content: "\f139"; +} +.fa-chevron-circle-down:before { + content: "\f13a"; +} +.fa-html5:before { + content: "\f13b"; +} +.fa-css3:before { + content: "\f13c"; +} +.fa-anchor:before { + content: "\f13d"; +} +.fa-unlock-alt:before { + content: "\f13e"; +} +.fa-bullseye:before { + content: "\f140"; +} +.fa-ellipsis-h:before { + content: "\f141"; +} +.fa-ellipsis-v:before { + content: "\f142"; +} +.fa-rss-square:before { + content: "\f143"; +} +.fa-play-circle:before { + content: "\f144"; +} +.fa-ticket:before { + content: "\f145"; +} +.fa-minus-square:before { + content: "\f146"; +} +.fa-minus-square-o:before { + content: "\f147"; +} +.fa-level-up:before { + content: "\f148"; +} +.fa-level-down:before { + content: "\f149"; +} +.fa-check-square:before { + content: "\f14a"; +} +.fa-pencil-square:before { + content: "\f14b"; +} +.fa-external-link-square:before { + content: "\f14c"; +} +.fa-share-square:before { + content: "\f14d"; +} +.fa-compass:before { + content: "\f14e"; +} +.fa-toggle-down:before, +.fa-caret-square-o-down:before { + content: "\f150"; +} +.fa-toggle-up:before, +.fa-caret-square-o-up:before { + content: "\f151"; +} +.fa-toggle-right:before, +.fa-caret-square-o-right:before { + content: "\f152"; +} +.fa-euro:before, +.fa-eur:before { + content: "\f153"; +} +.fa-gbp:before { + content: "\f154"; +} +.fa-dollar:before, +.fa-usd:before { + content: "\f155"; +} +.fa-rupee:before, +.fa-inr:before { + content: "\f156"; +} +.fa-cny:before, +.fa-rmb:before, +.fa-yen:before, +.fa-jpy:before { + content: "\f157"; +} +.fa-ruble:before, +.fa-rouble:before, +.fa-rub:before { + content: "\f158"; +} +.fa-won:before, +.fa-krw:before { + content: "\f159"; +} +.fa-bitcoin:before, +.fa-btc:before { + content: "\f15a"; +} +.fa-file:before { + content: "\f15b"; +} +.fa-file-text:before { + content: "\f15c"; +} +.fa-sort-alpha-asc:before { + content: "\f15d"; +} +.fa-sort-alpha-desc:before { + content: "\f15e"; +} +.fa-sort-amount-asc:before { + content: "\f160"; +} +.fa-sort-amount-desc:before { + content: "\f161"; +} +.fa-sort-numeric-asc:before { + content: "\f162"; +} +.fa-sort-numeric-desc:before { + content: "\f163"; +} +.fa-thumbs-up:before { + content: "\f164"; +} +.fa-thumbs-down:before { + content: "\f165"; +} +.fa-youtube-square:before { + content: "\f166"; +} +.fa-youtube:before { + content: "\f167"; +} +.fa-xing:before { + content: "\f168"; +} +.fa-xing-square:before { + content: "\f169"; +} +.fa-youtube-play:before { + content: "\f16a"; +} +.fa-dropbox:before { + content: "\f16b"; +} +.fa-stack-overflow:before { + content: "\f16c"; +} +.fa-instagram:before { + content: "\f16d"; +} +.fa-flickr:before { + content: "\f16e"; +} +.fa-adn:before { + content: "\f170"; +} +.fa-bitbucket:before { + content: "\f171"; +} +.fa-bitbucket-square:before { + content: "\f172"; +} +.fa-tumblr:before { + content: "\f173"; +} +.fa-tumblr-square:before { + content: "\f174"; +} +.fa-long-arrow-down:before { + content: "\f175"; +} +.fa-long-arrow-up:before { + content: "\f176"; +} +.fa-long-arrow-left:before { + content: "\f177"; +} +.fa-long-arrow-right:before { + content: "\f178"; +} +.fa-apple:before { + content: "\f179"; +} +.fa-windows:before { + content: "\f17a"; +} +.fa-android:before { + content: "\f17b"; +} +.fa-linux:before { + content: "\f17c"; +} +.fa-dribbble:before { + content: "\f17d"; +} +.fa-skype:before { + content: "\f17e"; +} +.fa-foursquare:before { + content: "\f180"; +} +.fa-trello:before { + content: "\f181"; +} +.fa-female:before { + content: "\f182"; +} +.fa-male:before { + content: "\f183"; +} +.fa-gittip:before, +.fa-gratipay:before { + content: "\f184"; +} +.fa-sun-o:before { + content: "\f185"; +} +.fa-moon-o:before { + content: "\f186"; +} +.fa-archive:before { + content: "\f187"; +} +.fa-bug:before { + content: "\f188"; +} +.fa-vk:before { + content: "\f189"; +} +.fa-weibo:before { + content: "\f18a"; +} +.fa-renren:before { + content: "\f18b"; +} +.fa-pagelines:before { + content: "\f18c"; +} +.fa-stack-exchange:before { + content: "\f18d"; +} +.fa-arrow-circle-o-right:before { + content: "\f18e"; +} +.fa-arrow-circle-o-left:before { + content: "\f190"; +} +.fa-toggle-left:before, +.fa-caret-square-o-left:before { + content: "\f191"; +} +.fa-dot-circle-o:before { + content: "\f192"; +} +.fa-wheelchair:before { + content: "\f193"; +} +.fa-vimeo-square:before { + content: "\f194"; +} +.fa-turkish-lira:before, +.fa-try:before { + content: "\f195"; +} +.fa-plus-square-o:before { + content: "\f196"; +} +.fa-space-shuttle:before { + content: "\f197"; +} +.fa-slack:before { + content: "\f198"; +} +.fa-envelope-square:before { + content: "\f199"; +} +.fa-wordpress:before { + content: "\f19a"; +} +.fa-openid:before { + content: "\f19b"; +} +.fa-institution:before, +.fa-bank:before, +.fa-university:before { + content: "\f19c"; +} +.fa-mortar-board:before, +.fa-graduation-cap:before { + content: "\f19d"; +} +.fa-yahoo:before { + content: "\f19e"; +} +.fa-google:before { + content: "\f1a0"; +} +.fa-reddit:before { + content: "\f1a1"; +} +.fa-reddit-square:before { + content: "\f1a2"; +} +.fa-stumbleupon-circle:before { + content: "\f1a3"; +} +.fa-stumbleupon:before { + content: "\f1a4"; +} +.fa-delicious:before { + content: "\f1a5"; +} +.fa-digg:before { + content: "\f1a6"; +} +.fa-pied-piper:before { + content: "\f1a7"; +} +.fa-pied-piper-alt:before { + content: "\f1a8"; +} +.fa-drupal:before { + content: "\f1a9"; +} +.fa-joomla:before { + content: "\f1aa"; +} +.fa-language:before { + content: "\f1ab"; +} +.fa-fax:before { + content: "\f1ac"; +} +.fa-building:before { + content: "\f1ad"; +} +.fa-child:before { + content: "\f1ae"; +} +.fa-paw:before { + content: "\f1b0"; +} +.fa-spoon:before { + content: "\f1b1"; +} +.fa-cube:before { + content: "\f1b2"; +} +.fa-cubes:before { + content: "\f1b3"; +} +.fa-behance:before { + content: "\f1b4"; +} +.fa-behance-square:before { + content: "\f1b5"; +} +.fa-steam:before { + content: "\f1b6"; +} +.fa-steam-square:before { + content: "\f1b7"; +} +.fa-recycle:before { + content: "\f1b8"; +} +.fa-automobile:before, +.fa-car:before { + content: "\f1b9"; +} +.fa-cab:before, +.fa-taxi:before { + content: "\f1ba"; +} +.fa-tree:before { + content: "\f1bb"; +} +.fa-spotify:before { + content: "\f1bc"; +} +.fa-deviantart:before { + content: "\f1bd"; +} +.fa-soundcloud:before { + content: "\f1be"; +} +.fa-database:before { + content: "\f1c0"; +} +.fa-file-pdf-o:before { + content: "\f1c1"; +} +.fa-file-word-o:before { + content: "\f1c2"; +} +.fa-file-excel-o:before { + content: "\f1c3"; +} +.fa-file-powerpoint-o:before { + content: "\f1c4"; +} +.fa-file-photo-o:before, +.fa-file-picture-o:before, +.fa-file-image-o:before { + content: "\f1c5"; +} +.fa-file-zip-o:before, +.fa-file-archive-o:before { + content: "\f1c6"; +} +.fa-file-sound-o:before, +.fa-file-audio-o:before { + content: "\f1c7"; +} +.fa-file-movie-o:before, +.fa-file-video-o:before { + content: "\f1c8"; +} +.fa-file-code-o:before { + content: "\f1c9"; +} +.fa-vine:before { + content: "\f1ca"; +} +.fa-codepen:before { + content: "\f1cb"; +} +.fa-jsfiddle:before { + content: "\f1cc"; +} +.fa-life-bouy:before, +.fa-life-buoy:before, +.fa-life-saver:before, +.fa-support:before, +.fa-life-ring:before { + content: "\f1cd"; +} +.fa-circle-o-notch:before { + content: "\f1ce"; +} +.fa-ra:before, +.fa-rebel:before { + content: "\f1d0"; +} +.fa-ge:before, +.fa-empire:before { + content: "\f1d1"; +} +.fa-git-square:before { + content: "\f1d2"; +} +.fa-git:before { + content: "\f1d3"; +} +.fa-y-combinator-square:before, +.fa-yc-square:before, +.fa-hacker-news:before { + content: "\f1d4"; +} +.fa-tencent-weibo:before { + content: "\f1d5"; +} +.fa-qq:before { + content: "\f1d6"; +} +.fa-wechat:before, +.fa-weixin:before { + content: "\f1d7"; +} +.fa-send:before, +.fa-paper-plane:before { + content: "\f1d8"; +} +.fa-send-o:before, +.fa-paper-plane-o:before { + content: "\f1d9"; +} +.fa-history:before { + content: "\f1da"; +} +.fa-circle-thin:before { + content: "\f1db"; +} +.fa-header:before { + content: "\f1dc"; +} +.fa-paragraph:before { + content: "\f1dd"; +} +.fa-sliders:before { + content: "\f1de"; +} +.fa-share-alt:before { + content: "\f1e0"; +} +.fa-share-alt-square:before { + content: "\f1e1"; +} +.fa-bomb:before { + content: "\f1e2"; +} +.fa-soccer-ball-o:before, +.fa-futbol-o:before { + content: "\f1e3"; +} +.fa-tty:before { + content: "\f1e4"; +} +.fa-binoculars:before { + content: "\f1e5"; +} +.fa-plug:before { + content: "\f1e6"; +} +.fa-slideshare:before { + content: "\f1e7"; +} +.fa-twitch:before { + content: "\f1e8"; +} +.fa-yelp:before { + content: "\f1e9"; +} +.fa-newspaper-o:before { + content: "\f1ea"; +} +.fa-wifi:before { + content: "\f1eb"; +} +.fa-calculator:before { + content: "\f1ec"; +} +.fa-paypal:before { + content: "\f1ed"; +} +.fa-google-wallet:before { + content: "\f1ee"; +} +.fa-cc-visa:before { + content: "\f1f0"; +} +.fa-cc-mastercard:before { + content: "\f1f1"; +} +.fa-cc-discover:before { + content: "\f1f2"; +} +.fa-cc-amex:before { + content: "\f1f3"; +} +.fa-cc-paypal:before { + content: "\f1f4"; +} +.fa-cc-stripe:before { + content: "\f1f5"; +} +.fa-bell-slash:before { + content: "\f1f6"; +} +.fa-bell-slash-o:before { + content: "\f1f7"; +} +.fa-trash:before { + content: "\f1f8"; +} +.fa-copyright:before { + content: "\f1f9"; +} +.fa-at:before { + content: "\f1fa"; +} +.fa-eyedropper:before { + content: "\f1fb"; +} +.fa-paint-brush:before { + content: "\f1fc"; +} +.fa-birthday-cake:before { + content: "\f1fd"; +} +.fa-area-chart:before { + content: "\f1fe"; +} +.fa-pie-chart:before { + content: "\f200"; +} +.fa-line-chart:before { + content: "\f201"; +} +.fa-lastfm:before { + content: "\f202"; +} +.fa-lastfm-square:before { + content: "\f203"; +} +.fa-toggle-off:before { + content: "\f204"; +} +.fa-toggle-on:before { + content: "\f205"; +} +.fa-bicycle:before { + content: "\f206"; +} +.fa-bus:before { + content: "\f207"; +} +.fa-ioxhost:before { + content: "\f208"; +} +.fa-angellist:before { + content: "\f209"; +} +.fa-cc:before { + content: "\f20a"; +} +.fa-shekel:before, +.fa-sheqel:before, +.fa-ils:before { + content: "\f20b"; +} +.fa-meanpath:before { + content: "\f20c"; +} +.fa-buysellads:before { + content: "\f20d"; +} +.fa-connectdevelop:before { + content: "\f20e"; +} +.fa-dashcube:before { + content: "\f210"; +} +.fa-forumbee:before { + content: "\f211"; +} +.fa-leanpub:before { + content: "\f212"; +} +.fa-sellsy:before { + content: "\f213"; +} +.fa-shirtsinbulk:before { + content: "\f214"; +} +.fa-simplybuilt:before { + content: "\f215"; +} +.fa-skyatlas:before { + content: "\f216"; +} +.fa-cart-plus:before { + content: "\f217"; +} +.fa-cart-arrow-down:before { + content: "\f218"; +} +.fa-diamond:before { + content: "\f219"; +} +.fa-ship:before { + content: "\f21a"; +} +.fa-user-secret:before { + content: "\f21b"; +} +.fa-motorcycle:before { + content: "\f21c"; +} +.fa-street-view:before { + content: "\f21d"; +} +.fa-heartbeat:before { + content: "\f21e"; +} +.fa-venus:before { + content: "\f221"; +} +.fa-mars:before { + content: "\f222"; +} +.fa-mercury:before { + content: "\f223"; +} +.fa-intersex:before, +.fa-transgender:before { + content: "\f224"; +} +.fa-transgender-alt:before { + content: "\f225"; +} +.fa-venus-double:before { + content: "\f226"; +} +.fa-mars-double:before { + content: "\f227"; +} +.fa-venus-mars:before { + content: "\f228"; +} +.fa-mars-stroke:before { + content: "\f229"; +} +.fa-mars-stroke-v:before { + content: "\f22a"; +} +.fa-mars-stroke-h:before { + content: "\f22b"; +} +.fa-neuter:before { + content: "\f22c"; +} +.fa-genderless:before { + content: "\f22d"; +} +.fa-facebook-official:before { + content: "\f230"; +} +.fa-pinterest-p:before { + content: "\f231"; +} +.fa-whatsapp:before { + content: "\f232"; +} +.fa-server:before { + content: "\f233"; +} +.fa-user-plus:before { + content: "\f234"; +} +.fa-user-times:before { + content: "\f235"; +} +.fa-hotel:before, +.fa-bed:before { + content: "\f236"; +} +.fa-viacoin:before { + content: "\f237"; +} +.fa-train:before { + content: "\f238"; +} +.fa-subway:before { + content: "\f239"; +} +.fa-medium:before { + content: "\f23a"; +} +.fa-yc:before, +.fa-y-combinator:before { + content: "\f23b"; +} +.fa-optin-monster:before { + content: "\f23c"; +} +.fa-opencart:before { + content: "\f23d"; +} +.fa-expeditedssl:before { + content: "\f23e"; +} +.fa-battery-4:before, +.fa-battery-full:before { + content: "\f240"; +} +.fa-battery-3:before, +.fa-battery-three-quarters:before { + content: "\f241"; +} +.fa-battery-2:before, +.fa-battery-half:before { + content: "\f242"; +} +.fa-battery-1:before, +.fa-battery-quarter:before { + content: "\f243"; +} +.fa-battery-0:before, +.fa-battery-empty:before { + content: "\f244"; +} +.fa-mouse-pointer:before { + content: "\f245"; +} +.fa-i-cursor:before { + content: "\f246"; +} +.fa-object-group:before { + content: "\f247"; +} +.fa-object-ungroup:before { + content: "\f248"; +} +.fa-sticky-note:before { + content: "\f249"; +} +.fa-sticky-note-o:before { + content: "\f24a"; +} +.fa-cc-jcb:before { + content: "\f24b"; +} +.fa-cc-diners-club:before { + content: "\f24c"; +} +.fa-clone:before { + content: "\f24d"; +} +.fa-balance-scale:before { + content: "\f24e"; +} +.fa-hourglass-o:before { + content: "\f250"; +} +.fa-hourglass-1:before, +.fa-hourglass-start:before { + content: "\f251"; +} +.fa-hourglass-2:before, +.fa-hourglass-half:before { + content: "\f252"; +} +.fa-hourglass-3:before, +.fa-hourglass-end:before { + content: "\f253"; +} +.fa-hourglass:before { + content: "\f254"; +} +.fa-hand-grab-o:before, +.fa-hand-rock-o:before { + content: "\f255"; +} +.fa-hand-stop-o:before, +.fa-hand-paper-o:before { + content: "\f256"; +} +.fa-hand-scissors-o:before { + content: "\f257"; +} +.fa-hand-lizard-o:before { + content: "\f258"; +} +.fa-hand-spock-o:before { + content: "\f259"; +} +.fa-hand-pointer-o:before { + content: "\f25a"; +} +.fa-hand-peace-o:before { + content: "\f25b"; +} +.fa-trademark:before { + content: "\f25c"; +} +.fa-registered:before { + content: "\f25d"; +} +.fa-creative-commons:before { + content: "\f25e"; +} +.fa-gg:before { + content: "\f260"; +} +.fa-gg-circle:before { + content: "\f261"; +} +.fa-tripadvisor:before { + content: "\f262"; +} +.fa-odnoklassniki:before { + content: "\f263"; +} +.fa-odnoklassniki-square:before { + content: "\f264"; +} +.fa-get-pocket:before { + content: "\f265"; +} +.fa-wikipedia-w:before { + content: "\f266"; +} +.fa-safari:before { + content: "\f267"; +} +.fa-chrome:before { + content: "\f268"; +} +.fa-firefox:before { + content: "\f269"; +} +.fa-opera:before { + content: "\f26a"; +} +.fa-internet-explorer:before { + content: "\f26b"; +} +.fa-tv:before, +.fa-television:before { + content: "\f26c"; +} +.fa-contao:before { + content: "\f26d"; +} +.fa-500px:before { + content: "\f26e"; +} +.fa-amazon:before { + content: "\f270"; +} +.fa-calendar-plus-o:before { + content: "\f271"; +} +.fa-calendar-minus-o:before { + content: "\f272"; +} +.fa-calendar-times-o:before { + content: "\f273"; +} +.fa-calendar-check-o:before { + content: "\f274"; +} +.fa-industry:before { + content: "\f275"; +} +.fa-map-pin:before { + content: "\f276"; +} +.fa-map-signs:before { + content: "\f277"; +} +.fa-map-o:before { + content: "\f278"; +} +.fa-map:before { + content: "\f279"; +} +.fa-commenting:before { + content: "\f27a"; +} +.fa-commenting-o:before { + content: "\f27b"; +} +.fa-houzz:before { + content: "\f27c"; +} +.fa-vimeo:before { + content: "\f27d"; +} +.fa-black-tie:before { + content: "\f27e"; +} +.fa-fonticons:before { + content: "\f280"; +} diff --git a/ems-engine/src/main/webapp/css/font-awesome.min.css b/ems-engine/src/main/webapp/css/font-awesome.min.css new file mode 100644 index 0000000000..ee4e9782bf --- /dev/null +++ b/ems-engine/src/main/webapp/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.4.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"} diff --git a/ems-engine/src/main/webapp/css/helper.css b/ems-engine/src/main/webapp/css/helper.css new file mode 100644 index 0000000000..c09b9291ae --- /dev/null +++ b/ems-engine/src/main/webapp/css/helper.css @@ -0,0 +1,92 @@ + + h1 {font-size:16pt} + h1 span {color:blue} + + h2 {font-size:12pt;margin:0;padding:0;border-bottom:thin solid gray;} + + h3 {font-size:12pt;margin:0;padding:0;border-bottom:thin solid gray;} + + div.heading {} + div.heading h1 {font-size:16pt} + div.heading h1 span {color:blue} + div.heading table {width:100%;font-size:9pt;} + span.date {font-size:9pt;color:gray} + + div.download { padding:5px;} + + div.notes { padding:5px;} + div.notes ul {margin:0;font-size:10pt;} + div.notes .version {margin-left:5px;font-size:11pt;margin-top:10px;} + + div.usage {border:none;margin:10px;background-color:#dddddc;padding:5px;} + + div.javascript { background-color: #c3e0f9; border: 1px solid #8fc3f1; font-family:Arial; font-size:10pt; width:95%; margin-top:10px; margin-bottom:10px; padding:5px;} + div.javascript pre { + margin:0; + padding:0; + background:none; + border:none; + white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */ + white-space: -pre-wrap; /* Opera 4 - 6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */ + word-wrap: break-word; /* IE 5.5+ */ + } + + div.html { background-color: #e0f8bf; border: 1px solid #c4ef8a; font-family:Arial; font-size:10pt; width:95%; margin-top:10px; margin-bottom:10px; padding:5px;} + div.html pre { + margin:0; + padding:0; + background:none; + border:none; + white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */ + white-space: -pre-wrap; /* Opera 4 - 6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */ + word-wrap: break-word; /* IE 5.5+ */ + } + + span.linked {color:blue;cursor:pointer;} + span.linked:hover {text-decoration:underline;} + + div.example {padding:0; font-size:11pt; margin-left:20px;margin-top:20px;} + div.example h3 {font-size:14pt;color:#2d2f98} + + #releaseNotes ul {margin:0;} + + #yahooFeed {list-style:none} + .yahooSportsEntry {padding: 5px 5px 5px 0;font-size:13px;} + .yahooSportsEntry .thumbnail {float: left;margin-bottom: 3px;margin-right: 8px;position: relative;} + .yahooSportsEntry .thumbnail img {border:none; height: 50px; position: static; width: 50px;} + .yahooSportsEntry .text {margin-left: 0px;} + .yahooSportsEntry .title { font-size: inherit; font-weight: bold; padding-bottom: 3px; width: 100%;} + .yahooSportsEntry .description {letter-spacing: normal;word-spacing: normal;} + .yahooSportsEntry .description img {display:none} + + .googleCalendarEntry a div {display:inline;} + .googleCalendarEntry span {margin-left:2px;} + + #flickrImages ul {list-style:none;} + .flickrImage {display:block;height:55px;} + .flickrImage .image {float:left;position:relative;} + .flickrImage .image img {width:50px;height:50px;position:static;} + .flickrImage .text {margin-left:55px;} + + #twitterFeed {font:13px/1.5 Helvetica Neue,Arial,Helvetica,'Liberation Sans',FreeSans,sans-serif;list-style:none;} + + .twitterFeed {border-bottom: 1px solid #EBEBEB;clear: both; display: block; min-height: 60px; outline: medium none; position: relative; padding:10px;} + .twitterFeed:hover {background-color:rgba(0,132,180,0.1);border-color:rgba(0,132,180,0.1);} + .twitterFeed .user {margin-left:60px;} + .twitterFeed .user a {color:#333333;font-size:15px;font-weight:bold;text-decoration:none;} + .twitterFeed .user a:hover {color:#0084B4;text-decoration:underline;} + .twitterFeed .user span {color:#999999;font-size:12px;margin-left:5px;} + .twitterFeed .text {font-family: Arial,"Helvetica Neue",sans-serif;line-height: 19px;padding: 0;font-size:15px;margin-left:63px;} + .twitterFeed .date {color:gray;font-size:9px;margin-left:60px;} + + div.twitterFeed .source {float:right;margin-right:5px;color:gray;font-size:9px;display:inline;} + + .barChart ul {list-style:none;} + .barChart li {display:inline-block;padding:5px;} + .barChart .group {} + .barChart .label {text-align:center;} + .barChart .bar {width:50px;background-color:blue;} \ No newline at end of file diff --git a/ems-engine/src/main/webapp/css/jquery-cron.css b/ems-engine/src/main/webapp/css/jquery-cron.css new file mode 100644 index 0000000000..d2a1322ac5 --- /dev/null +++ b/ems-engine/src/main/webapp/css/jquery-cron.css @@ -0,0 +1,24 @@ +.cron-button { + height: 16px; + padding-left: 20px; + margin-left: 5px; + background-repeat: no-repeat; + background-position: center center; + cursor: pointer; +} +.cron-button-save { + background-image: url('img/disk.png'); +} +.cron-changed { + padding-top: 5px; + padding-bottom: 5px; + background-color: #fdd; +} +.cron-controls { + margin-left: 10px; + color: #c77; + font-size: 0.9em; +} +.cron-controls > span.cron-loading { + background-image: url('img/loading.gif'); +} \ No newline at end of file diff --git a/ems-engine/src/main/webapp/css/json.human.css b/ems-engine/src/main/webapp/css/json.human.css new file mode 100644 index 0000000000..b1dfe0fa5f --- /dev/null +++ b/ems-engine/src/main/webapp/css/json.human.css @@ -0,0 +1,169 @@ +.jh-root, .jh-type-object, .jh-type-array, .jh-key, .jh-value, .jh-root tr{ + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* Opera/IE 8+ */ + font-weight: bold; +} + +.jh-single { + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* Opera/IE 8+ */ + font-weight: bold; + border: 1px solid #ccc; + margin: 0.2em; +} + +.jh-root:hover{ + border: 1px solid #F99927; +} + +.jh-key, .jh-value{ + margin: 0; + padding: 0.2em; + font-weight: bold; +} + +.jh-value{ + border-left: 1px solid #ddd; +} + +.jh-type-number{ + text-align: center; + color: #5286BC; +} + +.jh-type-bool-true{ + color: #5A811C; +} + +.jh-type-bool-active{ + color: #5A811C; + margin-left: 15px; +} + +.jh-type-bool-false{ + color: #CC3300; +} + +.jh-type-bool-method{ + text-align: center; + color: #D45317; +} + +.jh-type-bool-image { + width: 20px; + height: 20px; + margin-right: 5px; + vertical-align: bottom; +} + +.jh-type-required-true { + content: "\002A"; + color: #CC3300; +} + +.jh-type-required-false { + +} + +.jh-type-logo { + background-image: url("cerch.png"); + background-repeat: no-repeat; + background-size: 100% 100%; + height: 20px; + width: 20px; +} + +.jh-type-bool-image-true { + background-image: url("true.png"); + background-repeat: no-repeat; + background-size: 100% 100%; + height: 20px; + vertical-align: top; + width: 20px; + margin-left: 15px; +} + +.jh-type-bool-image-false { + background-image: url("true.png"); + background-repeat: no-repeat; + background-size: 100% 100%; + height: 20px; + vertical-align: top; + width: 20px; + margin-left: 15px; +} + +.jh-type-string{ + font-style: italic; + color: #6E6E6E; +} + +.jh-array-key{ + font-style: italic; + font-size: small; + text-align: center; +} + +.jh-object-key, .jh-array-key{ + color: #444; + vertical-align: top; +} + +.jh-type-object >> tr:nth-child(odd), .jh-type-array >> tr:nth-child(odd){ + background-color: #f5f5f5; +} + +.jh-type-object >> tr:nth-child(even), .jh-type-array >> tr:nth-child(even){ + background-color: #fff; +} + +.jh-type-object, .jh-type-array{ + width: 100%; + border-collapse: collapse; +} + +.jh-root{ + border: 1px solid #ccc; + margin: 0.2em; +} + +th.jh-key{ + text-align: left; + width: 30%; +} + +.jh-type-object > tr, .jh-type-array > tr{ + border: 1px solid #ddd; + border-bottom: none; +} + +.jh-type-object > tr:last-child, .jh-type-array > tr:last-child{ + border-bottom: 1px solid #ddd; +} + +.jh-type-object > tr:hover, .jh-type-array > tr:hover{ + border: 1px solid #F99927; +} + +.jh-empty{ + font-style: italic; + color: #999; + font-size: small; +} + +.jh-a { + text-decoration: none; +} + +.jh-a:hover{ + text-decoration: underline; +} + +.jh-a span.jh-type-string { + text-decoration: none; + color : #268ddd; + font-style: normal; +} + diff --git a/ems-engine/src/main/webapp/css/true.png b/ems-engine/src/main/webapp/css/true.png new file mode 100644 index 0000000000..27a1cdca39 Binary files /dev/null and b/ems-engine/src/main/webapp/css/true.png differ diff --git a/ems-engine/src/main/webapp/fonts/FontAwesome.otf b/ems-engine/src/main/webapp/fonts/FontAwesome.otf new file mode 100644 index 0000000000..681bdd4d4c Binary files /dev/null and b/ems-engine/src/main/webapp/fonts/FontAwesome.otf differ diff --git a/ems-engine/src/main/webapp/fonts/fontawesome-webfont.eot b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000000..a30335d748 Binary files /dev/null and b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.eot differ diff --git a/ems-engine/src/main/webapp/fonts/fontawesome-webfont.svg b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000000..6fd19abcb9 --- /dev/null +++ b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.svg @@ -0,0 +1,640 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ems-engine/src/main/webapp/fonts/fontawesome-webfont.ttf b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000000..d7994e1308 Binary files /dev/null and b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.ttf differ diff --git a/ems-engine/src/main/webapp/fonts/fontawesome-webfont.woff b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000000..6fd4ede0f3 Binary files /dev/null and b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.woff differ diff --git a/ems-engine/src/main/webapp/fonts/fontawesome-webfont.woff2 b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000000..5560193ccc Binary files /dev/null and b/ems-engine/src/main/webapp/fonts/fontawesome-webfont.woff2 differ diff --git a/ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.ttf b/ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000000..1413fc609a Binary files /dev/null and b/ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.ttf differ diff --git a/ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.woff b/ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000000..9e612858f8 Binary files /dev/null and b/ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.woff differ diff --git a/ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 b/ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000000..64539b54c3 Binary files /dev/null and b/ems-engine/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/ems-engine/src/main/webapp/index.jsp b/ems-engine/src/main/webapp/index.jsp new file mode 100644 index 0000000000..d2e22b8c0b --- /dev/null +++ b/ems-engine/src/main/webapp/index.jsp @@ -0,0 +1,299 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + +Lista servizi deployati + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

Integry Managment System REST

+
+
+ +
+
+
+
+ + Filtra per nome servizio: +
+
+
+
+
+
{{service.path}}
+
+
+
{{service.method}}
+
+ Body: +
{{service.bodyClass}}
+ +
+ +
+ Resp.: +
{{service.returnClass}}
+
+
+ + Parametri +
+ + + + + + + + + + +
nome:classe{{param.name}} + : {{param.className}}
defaultValue{{param.defaultValue}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Job in esecuzione

+
+ +
+
+ + + + + + + + + + + + + + + +
{{job.jobName}}{{job.nextFireTime}}{{job.fireTime}}
+
+
+
+
+
+
+
+

Job in attesa

+
+ +
+
+ + + + + + + + + + + + + + + + + +
{{job.jobName}}{{job.profileDb}}{{job.isEnabled}}{{job.nextFireTime}}
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/ems-engine/src/main/webapp/js/angular.min.js b/ems-engine/src/main/webapp/js/angular.min.js new file mode 100644 index 0000000000..22af422a19 --- /dev/null +++ b/ems-engine/src/main/webapp/js/angular.min.js @@ -0,0 +1,215 @@ +/* + AngularJS v1.2.23 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(Q,X,t){'use strict';function x(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.2.23/"+(b?b+"/":"")+a;for(c=1;c").append(b).html();try{return 3===b[0].nodeType?N(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+N(b)})}catch(d){return N(c)}}function dc(b){try{return decodeURIComponent(b)}catch(a){}}function ec(b){var a={},c,d;r((b||"").split("&"),function(b){b&&(c=b.replace(/\+/g,"%20").split("="),d=dc(c[0]),A(d)&&(b=A(c[1])?dc(c[1]):!0,ib.call(a,d)?H(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Cb(b){var a= +[];r(b,function(b,d){H(b)?r(b,function(b){a.push(Ba(d,!0)+(!0===b?"":"="+Ba(b,!0)))}):a.push(Ba(d,!0)+(!0===b?"":"="+Ba(b,!0)))});return a.length?a.join("&"):""}function jb(b){return Ba(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Ba(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function Xc(b,a){function c(a){a&&d.push(a)}var d=[b],e,f,g=["ng:app","ng-app","x-ng-app", +"data-ng-app"],k=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;r(g,function(a){g[a]=!0;c(X.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(r(b.querySelectorAll("."+a),c),r(b.querySelectorAll("."+a+"\\:"),c),r(b.querySelectorAll("["+a+"]"),c))});r(d,function(a){if(!e){var b=k.exec(" "+a.className+" ");b?(e=a,f=(b[2]||"").replace(/\s+/g,",")):r(a.attributes,function(b){!e&&g[b.name]&&(e=a,f=b.value)})}});e&&a(e,f?[f]:[])}function fc(b,a){var c=function(){b=u(b);if(b.injector()){var c=b[0]===X? +"document":ha(b);throw Sa("btstrpd",c.replace(//,">"));}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=gc(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(Q&&!d.test(Q.name))return c();Q.name=Q.name.replace(d,"");Ua.resumeBootstrap=function(b){r(b,function(b){a.push(b)});c()}}function kb(b,a){a= +a||"_";return b.replace(Yc,function(b,d){return(d?a:"")+b.toLowerCase()})}function Db(b,a,c){if(!b)throw Sa("areq",a||"?",c||"required");return b}function Va(b,a,c){c&&H(b)&&(b=b[b.length-1]);Db(P(b),a,"not a function, got "+(b&&"object"===typeof b?b.constructor.name||"Object":typeof b));return b}function Ca(b,a){if("hasOwnProperty"===b)throw Sa("badname",a);}function hc(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,f=a.length,g=0;g 
"+e[1]+a.replace(me,"<$1>")+e[2];d.removeChild(d.firstChild);for(a=e[0];a--;)d=d.lastChild;a=0;for(e=d.childNodes.length;a=R?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Ka(b,a){var c=typeof b,d;"function"==c||"object"==c&&null!==b?"function"==typeof(d= +b.$$hashKey)?d=b.$$hashKey():d===t&&(d=b.$$hashKey=(a||gb)()):d=b;return c+":"+d}function ab(b,a){if(a){var c=0;this.nextUid=function(){return++c}}r(b,this.put,this)}function sc(b){var a,c;"function"===typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace(pe,""),c=c.match(qe),r(c[1].split(re),function(b){b.replace(se,function(b,c,d){a.push(d)})})),b.$inject=a):H(b)?(c=b.length-1,Va(b[c],"fn"),a=b.slice(0,c)):Va(b,"fn",!0);return a}function gc(b){function a(a){return function(b,c){if(T(b))r(b, +$b(a));else return a(b,c)}}function c(a,b){Ca(a,"service");if(P(b)||H(b))b=n.instantiate(b);if(!b.$get)throw bb("pget",a);return l[a+k]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[],c,d,f,k;r(a,function(a){if(!h.get(a)){h.put(a,!0);try{if(z(a))for(c=Xa(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,f=0,k=d.length;f 4096 bytes)!"));else{if(m.cookie!==ea)for(ea=m.cookie, +d=ea.split("; "),W={},f=0;fh&&this.remove(p.key),b},get:function(a){if(h").parent()[0])});var f=K(a,b,a,c,d,e);da(a,"ng-scope");return function(b,c,d,e){Db(b,"scope");var g=c?La.clone.call(a):a;r(d,function(a,b){g.data("$"+b+"Controller",a)});d=0;for(var m=g.length;d +arguments.length&&(b=a,a=t);Ea&&(c=ea);return p(a,b,c)}var v,M,w,I,E,J,ea={},qb;v=c===f?d:ga(d,new Ob(u(f),d.$attr));M=v.$$element;if(K){var Na=/^\s*([@=&])(\??)\s*(\w*)\s*$/;J=e.$new(!0);!F||F!==K&&F!==K.$$originalDirective?M.data("$isolateScopeNoTemplate",J):M.data("$isolateScope",J);da(M,"ng-isolate-scope");r(K.scope,function(a,c){var d=a.match(Na)||[],f=d[3]||c,g="?"==d[2],d=d[1],m,l,n,p;J.$$isolateBindings[c]=d+f;switch(d){case "@":v.$observe(f,function(a){J[c]=a});v.$$observers[f].$$scope=e; +v[f]&&(J[c]=b(v[f])(e));break;case "=":if(g&&!v[f])break;l=q(v[f]);p=l.literal?za:function(a,b){return a===b||a!==a&&b!==b};n=l.assign||function(){m=J[c]=l(e);throw ia("nonassign",v[f],K.name);};m=J[c]=l(e);J.$watch(function(){var a=l(e);p(a,J[c])||(p(a,m)?n(e,a=J[c]):J[c]=a);return m=a},null,l.literal);break;case "&":l=q(v[f]);J[c]=function(a){return l(e,a)};break;default:throw ia("iscp",K.name,c,a);}})}qb=p&&L;W&&r(W,function(a){var b={$scope:a===K||a.$$isolateScope?J:e,$element:M,$attrs:v,$transclude:qb}, +c;E=a.controller;"@"==E&&(E=v[a.name]);c=s(E,b);ea[a.name]=c;Ea||M.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});g=0;for(w=m.length;gG.priority)break;if(U=G.scope)I=I||G,G.templateUrl||(N("new/isolated scope",K,G,x),T(U)&&(K=G));oa=G.name;!G.templateUrl&&G.controller&&(U=G.controller,W=W||{},N("'"+oa+"' controller",W[oa],G,x),W[oa]=G);if(U=G.transclude)D= +!0,G.$$tlb||(N("transclusion",ca,G,x),ca=G),"element"==U?(Ea=!0,v=G.priority,U=x,x=d.$$element=u(X.createComment(" "+oa+": "+d[oa]+" ")),c=x[0],Na(f,Aa.call(U,0),c),S=w(U,e,v,g&&g.name,{nonTlbTranscludeDirective:ca})):(U=u(Kb(c)).contents(),x.empty(),S=w(U,e));if(G.template)if(B=!0,N("template",F,G,x),F=G,U=P(G.template)?G.template(x,d):G.template,U=Z(U),G.replace){g=G;U=Ib.test(U)?u(aa(U)):[];c=U[0];if(1!=U.length||1!==c.nodeType)throw ia("tplrt",oa,"");Na(f,x,c);pa={$attr:{}};U=ea(c,[],pa);var $= +a.splice(Q+1,a.length-(Q+1));K&&pb(U);a=a.concat(U).concat($);A(d,pa);pa=a.length}else x.html(U);if(G.templateUrl)B=!0,N("template",F,G,x),F=G,G.replace&&(g=G),O=y(a.splice(Q,a.length-Q),x,d,f,D&&S,m,n,{controllerDirectives:W,newIsolateScopeDirective:K,templateDirective:F,nonTlbTranscludeDirective:ca}),pa=a.length;else if(G.compile)try{R=G.compile(x,d,S),P(R)?L(null,R,V,Y):R&&L(R.pre,R.post,V,Y)}catch(ba){l(ba,ha(x))}G.terminal&&(O.terminal=!0,v=Math.max(v,G.priority))}O.scope=I&&!0===I.scope;O.transcludeOnThisElement= +D;O.templateOnThisElement=B;O.transclude=S;p.hasElementTranscludeDirective=Ea;return O}function pb(a){for(var b=0,c=a.length;bp.priority)&&-1!=p.restrict.indexOf(f)&&(q&&(p=bc(p,{$$start:q,$$end:n})),b.push(p),h=p)}catch(L){l(L)}}return h}function A(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;r(a,function(d,e){"$"!= +e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,f){"class"==f?(da(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function y(a,b,c,d,e,f,g,m){var h=[],l,q,s=b[0],v=a.shift(),L=B({},v,{templateUrl:null,transclude:null,replace:null,$$originalDirective:v}),O=P(v.templateUrl)?v.templateUrl(b,c):v.templateUrl; +b.empty();n.get(C.getTrustedResourceUrl(O),{cache:p}).success(function(n){var p,C;n=Z(n);if(v.replace){n=Ib.test(n)?u(aa(n)):[];p=n[0];if(1!=n.length||1!==p.nodeType)throw ia("tplrt",v.name,O);n={$attr:{}};Na(d,b,p);var w=ea(p,[],n);T(v.scope)&&pb(w);a=w.concat(a);A(c,n)}else p=s,b.html(n);a.unshift(L);l=F(a,p,c,e,b,v,f,g,m);r(d,function(a,c){a==p&&(d[c]=b[0])});for(q=K(b[0].childNodes,e);h.length;){n=h.shift();C=h.shift();var I=h.shift(),E=h.shift(),w=b[0];if(C!==s){var J=C.className;m.hasElementTranscludeDirective&& +v.replace||(w=Kb(p));Na(I,u(C),w);da(u(w),J)}C=l.transcludeOnThisElement?W(n,l.transclude,E):E;l(q,n,w,d,C)}h=null}).error(function(a,b,c,d){throw ia("tpload",d.url);});return function(a,b,c,d,e){a=e;h?(h.push(b),h.push(c),h.push(d),h.push(a)):(l.transcludeOnThisElement&&(a=W(b,l.transclude,e)),l(q,b,c,d,a))}}function D(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.namea.status?d:n.reject(d)}var c={method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},d=function(a){var b=e.headers,c=B({},a.headers),d,f,b=B({},b.common,b[N(a.method)]); +a:for(d in b){a=N(d);for(f in c)if(N(f)===a)continue a;c[d]=b[d]}(function(a){var b;r(a,function(c,d){P(c)&&(b=c(),null!=b?a[d]=b:delete a[d])})})(c);return c}(a);B(c,a);c.headers=d;c.method=Ia(c.method);var f=[function(a){d=a.headers;var c=xc(a.data,wc(d),a.transformRequest);D(c)&&r(d,function(a,b){"content-type"===N(b)&&delete d[b]});D(a.withCredentials)&&!D(e.withCredentials)&&(a.withCredentials=e.withCredentials);return s(a,c,d).then(b,b)},t],g=n.when(c);for(r(C,function(a){(a.request||a.requestError)&& +f.unshift(a.request,a.requestError);(a.response||a.responseError)&&f.push(a.response,a.responseError)});f.length;){a=f.shift();var m=f.shift(),g=g.then(a,m)}g.success=function(a){g.then(function(b){a(b.data,b.status,b.headers,c)});return g};g.error=function(a){g.then(null,function(b){a(b.data,b.status,b.headers,c)});return g};return g}function s(c,f,g){function h(a,b,c,e){E&&(200<=a&&300>a?E.put(u,[a,b,vc(c),e]):E.remove(u));p(b,a,c,e);d.$$phase||d.$apply()}function p(a,b,d,e){b=Math.max(b,0);(200<= +b&&300>b?C.resolve:C.reject)({data:a,status:b,headers:wc(d),config:c,statusText:e})}function s(){var a=Qa(q.pendingRequests,c);-1!==a&&q.pendingRequests.splice(a,1)}var C=n.defer(),r=C.promise,E,F,u=L(c.url,c.params);q.pendingRequests.push(c);r.then(s,s);!c.cache&&!e.cache||(!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method)||(E=T(c.cache)?c.cache:T(e.cache)?e.cache:v);if(E)if(F=E.get(u),A(F)){if(F&&P(F.then))return F.then(s,s),F;H(F)?p(F[1],F[0],ga(F[2]),F[3]):p(F,200,{},"OK")}else E.put(u,r);D(F)&& +((F=Pb(c.url)?b.cookies()[c.xsrfCookieName||e.xsrfCookieName]:t)&&(g[c.xsrfHeaderName||e.xsrfHeaderName]=F),a(c.method,u,f,h,g,c.timeout,c.withCredentials,c.responseType));return r}function L(a,b){if(!b)return a;var c=[];Tc(b,function(a,b){null===a||D(a)||(H(a)||(a=[a]),r(a,function(a){T(a)&&(sa(a)?a=a.toISOString():T(a)&&(a=ta(a)));c.push(Ba(b)+"="+Ba(a))}))});0=R&&(!b.match(/^(get|post|head|put|delete|options)$/i)|| +!Q.XMLHttpRequest))return new Q.ActiveXObject("Microsoft.XMLHTTP");if(Q.XMLHttpRequest)return new Q.XMLHttpRequest;throw x("$httpBackend")("noxhr");}function Vd(){this.$get=["$browser","$window","$document",function(b,a,c){return we(b,ve,b.defer,a.angular.callbacks,c[0])}]}function we(b,a,c,d,e){function f(a,b,c){var f=e.createElement("script"),g=null;f.type="text/javascript";f.src=a;f.async=!0;g=function(a){Za(f,"load",g);Za(f,"error",g);e.body.removeChild(f);f=null;var k=-1,s="unknown";a&&("load"!== +a.type||d[b].called||(a={type:"error"}),s=a.type,k="error"===a.type?404:200);c&&c(k,s)};rb(f,"load",g);rb(f,"error",g);8>=R&&(f.onreadystatechange=function(){z(f.readyState)&&/loaded|complete/.test(f.readyState)&&(f.onreadystatechange=null,g({type:"load"}))});e.body.appendChild(f);return g}var g=-1;return function(e,m,h,l,n,p,q,s){function L(){C=g;I&&I();w&&w.abort()}function v(a,d,e,f,g){K&&c.cancel(K);I=w=null;0===d&&(d=e?200:"file"==ua(m).protocol?404:0);a(1223===d?204:d,e,f,g||"");b.$$completeOutstandingRequest(y)} +var C;b.$$incOutstandingRequestCount();m=m||b.url();if("jsonp"==N(e)){var O="_"+(d.counter++).toString(36);d[O]=function(a){d[O].data=a;d[O].called=!0};var I=f(m.replace("JSON_CALLBACK","angular.callbacks."+O),O,function(a,b){v(l,a,d[O].data,"",b);d[O]=y})}else{var w=a(e);w.open(e,m,!0);r(n,function(a,b){A(a)&&w.setRequestHeader(b,a)});w.onreadystatechange=function(){if(w&&4==w.readyState){var a=null,b=null,c="";C!==g&&(a=w.getAllResponseHeaders(),b="response"in w?w.response:w.responseText);C===g&& +10>R||(c=w.statusText);v(l,C||w.status,b,a,c)}};q&&(w.withCredentials=!0);if(s)try{w.responseType=s}catch(da){if("json"!==s)throw da;}w.send(h||null)}if(0=k&&(n.resolve(q),l(p.$$intervalId),delete e[p.$$intervalId]);s||b.$apply()},g);e[p.$$intervalId]=n;return p}var e={};d.cancel= +function(b){return b&&b.$$intervalId in e?(e[b.$$intervalId].reject("canceled"),a.clearInterval(b.$$intervalId),delete e[b.$$intervalId],!0):!1};return d}]}function bd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "), +SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function Qb(b){b=b.split("/");for(var a=b.length;a--;)b[a]= +jb(b[a]);return b.join("/")}function zc(b,a,c){b=ua(b,c);a.$$protocol=b.protocol;a.$$host=b.hostname;a.$$port=Z(b.port)||xe[b.protocol]||null}function Ac(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=ua(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?b.pathname.substring(1):b.pathname);a.$$search=ec(b.search);a.$$hash=decodeURIComponent(b.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function qa(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function cb(b){var a= +b.indexOf("#");return-1==a?b:b.substr(0,a)}function Rb(b){return b.substr(0,cb(b).lastIndexOf("/")+1)}function Bc(b,a){this.$$html5=!0;a=a||"";var c=Rb(b);zc(b,this,b);this.$$parse=function(a){var e=qa(c,a);if(!z(e))throw Sb("ipthprfx",a,c);Ac(e,this,b);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Cb(this.$$search),b=this.$$hash?"#"+jb(this.$$hash):"";this.$$url=Qb(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e; +if((e=qa(b,d))!==t)return d=e,(e=qa(a,e))!==t?c+(qa("/",e)||e):b+d;if((e=qa(c,d))!==t)return c+e;if(c==d+"/")return c}}function Tb(b,a){var c=Rb(b);zc(b,this,b);this.$$parse=function(d){var e=qa(b,d)||qa(c,d),e="#"==e.charAt(0)?qa(a,e):this.$$html5?e:"";if(!z(e))throw Sb("ihshprfx",d,a);Ac(e,this,b);d=this.$$path;var f=/^\/[A-Z]:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));f.exec(e)||(d=(e=f.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Cb(this.$$search),e=this.$$hash? +"#"+jb(this.$$hash):"";this.$$url=Qb(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(cb(b)==cb(a))return a}}function Ub(b,a){this.$$html5=!0;Tb.apply(this,arguments);var c=Rb(b);this.$$rewrite=function(d){var e;if(b==cb(d))return d;if(e=qa(c,d))return b+a+e;if(c===d+"/")return c};this.$$compose=function(){var c=Cb(this.$$search),e=this.$$hash?"#"+jb(this.$$hash):"";this.$$url=Qb(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+a+this.$$url}}function sb(b){return function(){return this[b]}} +function Cc(b,a){return function(c){if(D(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Wd(){var b="",a=!1;this.hashPrefix=function(a){return A(a)?(b=a,this):b};this.html5Mode=function(b){return A(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,f){function g(a){c.$broadcast("$locationChangeSuccess",k.absUrl(),a)}var k,m,h=d.baseHref(),l=d.url(),n;a?(n=l.substring(0,l.indexOf("/",l.indexOf("//")+2))+(h||"/"),m=e.history?Bc:Ub):(n= +cb(l),m=Tb);k=new m(n,"#"+b);k.$$parse(k.$$rewrite(l));var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var e=u(a.target);"a"!==N(e[0].nodeName);)if(e[0]===f[0]||!(e=e.parent())[0])return;var g=e.prop("href");T(g)&&"[object SVGAnimatedString]"===g.toString()&&(g=ua(g.animVal).href);if(!p.test(g)){if(m===Ub){var h=e.attr("href")||e.attr("xlink:href");if(h&&0>h.indexOf("://"))if(g="#"+b,"/"==h[0])g=n+g+h;else if("#"==h[0])g=n+g+(k.path()||"/")+h; +else{var l=k.path().split("/"),h=h.split("/");2!==l.length||l[1]||(l.length=1);for(var q=0;qe?Dc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,f){var g=0,k;do k=Dc(d[g++],d[g++],d[g++],d[g++],d[g++],c,a)(b,f),f=t,b=k;while(ga)for(b in h++,e)e.hasOwnProperty(b)&&!d.hasOwnProperty(b)&&(r--,delete e[b])}else e!==d&&(e=d,h++);return h},function(){n?(n=!1,b(d,d,c)):b(d,g,c);if(k)if(T(d))if(fb(d)){g=Array(d.length);for(var a=0;at&&(u=4-t,W[u]||(W[u]=[]),J=P(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp, +J+="; newVal: "+ta(f)+"; oldVal: "+ta(g),W[u].push(J));else if(d===c){w=!1;break a}}catch(A){p.$$phase=null,e(A)}if(!(k=K.$$childHead||K!==this&&K.$$nextSibling))for(;K!==this&&!(k=K.$$nextSibling);)K=K.$parent}while(K=k);if((w||h.length)&&!t--)throw p.$$phase=null,a("infdig",b,ta(W));}while(w||h.length);for(p.$$phase=null;l.length;)try{l.shift()()}catch(x){e(x)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this!==p&&(r(this.$$listenerCount, +Bb(null,l,this)),a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=null,this.$$listeners={},this.$$watchers=this.$$asyncQueue=this.$$postDigestQueue=[],this.$destroy=this.$digest=this.$apply=y,this.$on= +this.$watch=function(){return y})}},$eval:function(a,b){return f(a)(this,b)},$evalAsync:function(a){p.$$phase||p.$$asyncQueue.length||g.defer(function(){p.$$asyncQueue.length&&p.$digest()});this.$$asyncQueue.push({scope:this,expression:a})},$$postDigest:function(a){this.$$postDigestQueue.push(a)},$apply:function(a){try{return m("$apply"),this.$eval(a)}catch(b){e(b)}finally{p.$$phase=null;try{p.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]= +c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){c[Qa(c,b)]=null;l(e,1,a)}},$emit:function(a,b){var c=[],d,f=this,g=!1,k={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){k.defaultPrevented=!0},defaultPrevented:!1},h=[k].concat(Aa.call(arguments,1)),m,l;do{d=f.$$listeners[a]||c;k.currentScope=f;m=0;for(l=d.length;mc.msieDocumentMode)throw wa("iequirks");var e=ga(fa);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b}, +e.valueOf=Ga);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var f=e.parseAs,g=e.getTrusted,k=e.trustAs;r(fa,function(a,b){var c=N(b);e[Ya("parse_as_"+c)]=function(b){return f(a,b)};e[Ya("get_trusted_"+c)]=function(b){return g(a,b)};e[Ya("trust_as_"+c)]=function(b){return k(a,b)}});return e}]}function ce(){this.$get=["$window","$document",function(b,a){var c={},d=Z((/android (\d+)/.exec(N((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator|| +{}).userAgent),f=a[0]||{},g=f.documentMode,k,m=/^(Moz|webkit|O|ms)(?=[A-Z])/,h=f.body&&f.body.style,l=!1,n=!1;if(h){for(var p in h)if(l=m.exec(p)){k=l[0];k=k.substr(0,1).toUpperCase()+k.substr(1);break}k||(k="WebkitOpacity"in h&&"webkit");l=!!("transition"in h||k+"Transition"in h);n=!!("animation"in h||k+"Animation"in h);!d||l&&n||(l=z(f.body.style.webkitTransition),n=z(f.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!g||7< +g),hasEvent:function(a){if("input"==a&&9==R)return!1;if(D(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:Wa(),vendorPrefix:k,transitions:l,animations:n,android:d,msie:R,msieDocumentMode:g}}]}function ee(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,k,m){var h=c.defer(),l=h.promise,n=A(m)&&!m;k=a.defer(function(){try{h.resolve(e())}catch(a){h.reject(a),d(a)}finally{delete f[l.$$timeoutId]}n||b.$apply()},k);l.$$timeoutId=k;f[k]=h; +return l}var f={};e.cancel=function(b){return b&&b.$$timeoutId in f?(f[b.$$timeoutId].reject("canceled"),delete f[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return e}]}function ua(b,a){var c=b;R&&(V.setAttribute("href",c),c=V.href);V.setAttribute("href",c);return{href:V.href,protocol:V.protocol?V.protocol.replace(/:$/,""):"",host:V.host,search:V.search?V.search.replace(/^\?/,""):"",hash:V.hash?V.hash.replace(/^#/,""):"",hostname:V.hostname,port:V.port,pathname:"/"===V.pathname.charAt(0)?V.pathname: +"/"+V.pathname}}function Pb(b){b=z(b)?ua(b):b;return b.protocol===Hc.protocol&&b.host===Hc.host}function fe(){this.$get=$(Q)}function mc(b){function a(d,e){if(T(d)){var f={};r(d,function(b,c){f[c]=a(c,b)});return f}return b.factory(d+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Ic);a("date",Jc);a("filter",Ae);a("json",Be);a("limitTo",Ce);a("lowercase",De);a("number",Kc);a("orderBy",Lc);a("uppercase",Ee)}function Ae(){return function(b, +a,c){if(!H(b))return b;var d=typeof c,e=[];e.check=function(a){for(var b=0;bb;b=Math.abs(b);var g=b+"",k="",m=[],h=!1;if(-1!==g.indexOf("e")){var l=g.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&& +l[3]>e+1?(g="0",b=0):(k=g,h=!0)}if(h)0b)&&(k=b.toFixed(e));else{g=(g.split(Nc)[1]||"").length;D(e)&&(e=Math.min(Math.max(a.minFrac,g),a.maxFrac));b=+(Math.round(+(b.toString()+"e"+e)).toString()+"e"+-e);b=(""+b).split(Nc);g=b[0];b=b[1]||"";var l=0,n=a.lgSize,p=a.gSize;if(g.length>=n+p)for(l=g.length-n,h=0;hb&&(d="-",b=-b);for(b=""+b;b.length-c)e+=c;0===e&&-12==c&&(e=12);return Xb(e,a,d)}}function ub(b,a){return function(c,d){var e=c["get"+b](),f=Ia(a?"SHORT"+b:b);return d[f][e]}}function Jc(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear: +a.setFullYear,m=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=Z(b[9]+b[10]),g=Z(b[9]+b[11]));k.call(a,Z(b[1]),Z(b[2])-1,Z(b[3]));f=Z(b[4]||0)-f;g=Z(b[5]||0)-g;k=Z(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));m.call(a,f,g,k,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var f="",g=[],k,m;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;z(c)&&(c=Fe.test(c)?Z(c):a(c));Ab(c)&&(c=new Date(c));if(!sa(c))return c; +for(;e;)(m=Ge.exec(e))?(g=g.concat(Aa.call(m,1)),e=g.pop()):(g.push(e),e=null);r(g,function(a){k=He[a];f+=k?k(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return f}}function Be(){return function(b){return ta(b,!0)}}function Ce(){return function(b,a){if(!H(b)&&!z(b))return b;a=Infinity===Math.abs(Number(a))?Number(a):Z(a);if(z(b))return a?0<=a?b.slice(0,a):b.slice(a,b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0a||37<=a&&40>=a)||q()});if(e.hasEvent("paste"))a.on("paste cut",q)}a.on("change",n);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var s=c.ngPattern;s&&((e=s.match(/^\/(.*)\/([gim]*)$/))?(s=RegExp(e[1],e[2]),e=function(a){return ra(d, +"pattern",d.$isEmpty(a)||s.test(a),a)}):e=function(c){var e=b.$eval(s);if(!e||!e.test)throw x("ngPattern")("noregexp",s,e,ha(a));return ra(d,"pattern",d.$isEmpty(c)||e.test(c),c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var r=Z(c.ngMinlength);e=function(a){return ra(d,"minlength",d.$isEmpty(a)||a.length>=r,a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var v=Z(c.ngMaxlength);e=function(a){return ra(d,"maxlength",d.$isEmpty(a)||a.length<=v,a)};d.$parsers.push(e); +d.$formatters.push(e)}}function Yb(b,a){b="ngClass"+b;return["$animate",function(c){function d(a,b){var c=[],d=0;a:for(;dR?function(b){b=b.nodeName?b:b[0];return b.scopeName&&"HTML"!=b.scopeName?Ia(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var Wa=function(){if(A(Wa.isActive_))return Wa.isActive_;var b=!(!X.querySelector("[ng-csp]")&&!X.querySelector("[data-ng-csp]")); +if(!b)try{new Function("")}catch(a){b=!0}return Wa.isActive_=b},Yc=/[A-Z]/g,ad={full:"1.2.23",major:1,minor:2,dot:23,codeName:"superficial-malady"};S.expando="ng339";var $a=S.cache={},ne=1,rb=Q.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},Za=Q.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)};S._data=function(b){return this.cache[b[this.expando]]||{}};var ie=/([\:\-\_]+(.))/g, +je=/^moz([A-Z])/,Hb=x("jqLite"),ke=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Ib=/<|&#?\w+;/,le=/<([\w:]+)/,me=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ba.optgroup=ba.option;ba.tbody=ba.tfoot=ba.colgroup=ba.caption=ba.thead;ba.th= +ba.td;var La=S.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===X.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),S(Q).on("load",a))},toString:function(){var b=[];r(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?u(this[b]):u(this[this.length+b])},length:0,push:Ke,sort:[].sort,splice:[].splice},ob={};r("multiple selected checked disabled readOnly required open".split(" "),function(b){ob[N(b)]=b});var rc={};r("input select option textarea button form details".split(" "), +function(b){rc[Ia(b)]=!0});r({data:Mb,removeData:Lb},function(b,a){S[a]=b});r({data:Mb,inheritedData:nb,scope:function(b){return u.data(b,"$scope")||nb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return u.data(b,"$isolateScope")||u.data(b,"$isolateScopeNoTemplate")},controller:oc,injector:function(b){return nb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Nb,css:function(b,a,c){a=Ya(a);if(A(c))b.style[a]=c;else{var d;8>=R&&(d=b.currentStyle&&b.currentStyle[a], +""===d&&(d="auto"));d=d||b.style[a];8>=R&&(d=""===d?t:d);return d}},attr:function(b,a,c){var d=N(a);if(ob[d])if(A(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||y).specified?d:t;else if(A(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?t:b},prop:function(b,a,c){if(A(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType];if(D(d))return e?b[e]:"";b[e]=d}var a=[];9>R?(a[1]= +"innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,a){if(D(a)){if("SELECT"===Ma(b)&&b.multiple){var c=[];r(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(D(a))return b.innerHTML;for(var c=0,d=b.childNodes;c":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Pe={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Wb=function(a){this.options=a};Wb.prototype= +{constructor:Wb,lex:function(a){this.text=a;this.index=0;this.ch=t;this.lastCh=":";for(this.tokens=[];this.index=a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=A(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw ka("lexerr",a,c,this.text); +},readNumber:function(){for(var a="",c=this.index;this.index","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(db.ZERO,a.fn,this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()): +this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=Ec(d,this.options,this.text);return B(function(c,d,k){return e(k||a(c,d))},{assign:function(e,g,k){(k=a(e,k))||a.assign(e,k={});return tb(k,d,g,c.text,c.options)}})},objectIndex:function(a){var c=this,d=this.expression();this.consume("]");return B(function(e,f){var g=a(e,f),k=d(e,f),m;ja(k,c.text);if(!g)return t;(g=Oa(g[k],c.text))&&(g.then&&c.options.unwrapPromises)&&(m=g,"$$v"in g||(m.$$v=t,m.then(function(a){m.$$v=a})),g= +g.$$v);return g},{assign:function(e,f,g){var k=ja(d(e,g),c.text);(g=Oa(a(e,g),c.text))||a.assign(e,g={});return g[k]=f}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this;return function(f,g){for(var k=[],m=c?c(f,g):f,h=0;ha.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Xb(Math[0=R&&(c.href||c.name||c.$set("href",""),a.append(X.createComment("IE fix")));if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){var f="[object SVGAnimatedString]"===ya.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(f)||a.preventDefault()})}}}),Fb={};r(ob,function(a, +c){if("multiple"!=a){var d=na("ng-"+c);Fb[d]=function(){return{priority:100,link:function(a,f,g){a.$watch(g[d],function(a){g.$set(c,!!a)})}}}}});r(["src","srcset","href"],function(a){var c=na("ng-"+a);Fb[c]=function(){return{priority:99,link:function(d,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===ya.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$observe(c,function(c){c?(f.$set(k,c),R&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}});var xb={$addControl:y, +$removeControl:y,$setValidity:y,$setDirty:y,$setPristine:y};Oc.$inject=["$element","$attrs","$scope","$animate"];var Rc=function(a){return["$timeout",function(c){return{name:"form",restrict:a?"EAC":"E",controller:Oc,compile:function(){return{pre:function(a,e,f,g){if(!f.action){var k=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};rb(e[0],"submit",k);e.on("$destroy",function(){c(function(){Za(e[0],"submit",k)},0,!1)})}var m=e.parent().controller("form"),h=f.name||f.ngForm;h&&tb(a, +h,g,h);if(m)e.on("$destroy",function(){m.$removeControl(g);h&&tb(a,h,t,h);B(g,xb)})}}}}}]},ed=Rc(),rd=Rc(!0),Qe=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Re=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Se=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Sc={text:zb,number:function(a,c,d,e,f,g){zb(a,c,d,e,f,g);e.$parsers.push(function(a){var c=e.$isEmpty(a);if(c||Se.test(a))return e.$setValidity("number",!0),""=== +a?null:c?a:parseFloat(a);e.$setValidity("number",!1);return t});Ie(e,"number",Te,null,e.$$validityState);e.$formatters.push(function(a){return e.$isEmpty(a)?"":""+a});d.min&&(a=function(a){var c=parseFloat(d.min);return ra(e,"min",e.$isEmpty(a)||a>=c,a)},e.$parsers.push(a),e.$formatters.push(a));d.max&&(a=function(a){var c=parseFloat(d.max);return ra(e,"max",e.$isEmpty(a)||a<=c,a)},e.$parsers.push(a),e.$formatters.push(a));e.$formatters.push(function(a){return ra(e,"number",e.$isEmpty(a)||Ab(a),a)})}, +url:function(a,c,d,e,f,g){zb(a,c,d,e,f,g);a=function(a){return ra(e,"url",e.$isEmpty(a)||Qe.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,f,g){zb(a,c,d,e,f,g);a=function(a){return ra(e,"email",e.$isEmpty(a)||Re.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){D(d.name)&&c.attr("name",gb());c.on("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value", +e.$render)},checkbox:function(a,c,d,e){var f=d.ngTrueValue,g=d.ngFalseValue;z(f)||(f=!0);z(g)||(g=!1);c.on("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return a!==f};e.$formatters.push(function(a){return a===f});e.$parsers.push(function(a){return a?f:g})},hidden:y,button:y,submit:y,reset:y,file:y},Te=["badInput"],jc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d, +e,f,g){g&&(Sc[N(f.type)]||Sc.text)(d,e,f,g,c,a)}}}],wb="ng-valid",vb="ng-invalid",Pa="ng-pristine",yb="ng-dirty",Ue=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate",function(a,c,d,e,f,g){function k(a,c){c=c?"-"+kb(c,"-"):"";g.removeClass(e,(a?vb:wb)+c);g.addClass(e,(a?wb:vb)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var m=f(d.ngModel), +h=m.assign;if(!h)throw x("ngModel")("nonassign",d.ngModel,ha(e));this.$render=y;this.$isEmpty=function(a){return D(a)||""===a||null===a||a!==a};var l=e.inheritedData("$formController")||xb,n=0,p=this.$error={};e.addClass(Pa);k(!0);this.$setValidity=function(a,c){p[a]!==!c&&(c?(p[a]&&n--,n||(k(!0),this.$valid=!0,this.$invalid=!1)):(k(!1),this.$invalid=!0,this.$valid=!1,n++),p[a]=!c,k(c,a),l.$setValidity(a,c,this))};this.$setPristine=function(){this.$dirty=!1;this.$pristine=!0;g.removeClass(e,yb);g.addClass(e, +Pa)};this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&(this.$dirty=!0,this.$pristine=!1,g.removeClass(e,Pa),g.addClass(e,yb),l.$setDirty());r(this.$parsers,function(a){d=a(d)});this.$modelValue!==d&&(this.$modelValue=d,h(a,d),r(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}}))};var q=this;a.$watch(function(){var c=m(a);if(q.$modelValue!==c){var d=q.$formatters,e=d.length;for(q.$modelValue=c;e--;)c=d[e](c);q.$viewValue!==c&&(q.$viewValue=c,q.$render())}return c})}],Gd= +function(){return{require:["ngModel","^?form"],controller:Ue,link:function(a,c,d,e){var f=e[0],g=e[1]||xb;g.$addControl(f);a.$on("$destroy",function(){g.$removeControl(f)})}}},Id=$({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),kc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var f=function(a){if(d.required&&e.$isEmpty(a))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(f); +e.$parsers.unshift(f);d.$observe("required",function(){f(e.$viewValue)})}}}},Hd=function(){return{require:"ngModel",link:function(a,c,d,e){var f=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){if(!D(a)){var c=[];a&&r(a.split(f),function(a){a&&c.push(aa(a))});return c}});e.$formatters.push(function(a){return H(a)?a.join(", "):t});e.$isEmpty=function(a){return!a||!a.length}}}},Ve=/^(true|false|\d+)$/,Jd=function(){return{priority:100,compile:function(a,c){return Ve.test(c.ngValue)? +function(a,c,f){f.$set("value",a.$eval(f.ngValue))}:function(a,c,f){a.$watch(f.ngValue,function(a){f.$set("value",a)})}}}},jd=xa({compile:function(a){a.addClass("ng-binding");return function(a,d,e){d.data("$binding",e.ngBind);a.$watch(e.ngBind,function(a){d.text(a==t?"":a)})}}}),ld=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],kd=["$sce","$parse",function(a,c){return{compile:function(d){d.addClass("ng-binding"); +return function(d,f,g){f.data("$binding",g.ngBindHtml);var k=c(g.ngBindHtml);d.$watch(function(){return(k(d)||"").toString()},function(c){f.html(a.getTrustedHtml(k(d))||"")})}}}}],md=Yb("",!0),od=Yb("Odd",0),nd=Yb("Even",1),pd=xa({compile:function(a,c){c.$set("ngCloak",t);a.removeClass("ng-cloak")}}),qd=[function(){return{scope:!0,controller:"@",priority:500}}],lc={};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "), +function(a){var c=na("ng-"+a);lc[c]=["$parse",function(d){return{compile:function(e,f){var g=d(f[c]);return function(c,d){d.on(N(a),function(a){c.$apply(function(){g(c,{$event:a})})})}}}}]});var td=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var k,m,h;c.$watch(e.ngIf,function(f){Ta(f)?m||(m=c.$new(),g(m,function(c){c[c.length++]=X.createComment(" end ngIf: "+e.ngIf+" ");k={clone:c};a.enter(c,d.parent(),d)})):(h&&(h.remove(), +h=null),m&&(m.$destroy(),m=null),k&&(h=Eb(k.clone),a.leave(h,function(){h=null}),k=null))})}}}],ud=["$http","$templateCache","$anchorScroll","$animate","$sce",function(a,c,d,e,f){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ua.noop,compile:function(g,k){var m=k.ngInclude||k.src,h=k.onload||"",l=k.autoscroll;return function(g,k,q,r,L){var v=0,t,u,I,w=function(){u&&(u.remove(),u=null);t&&(t.$destroy(),t=null);I&&(e.leave(I,function(){u=null}),u=I,I=null)};g.$watch(f.parseAsResourceUrl(m), +function(f){var m=function(){!A(l)||l&&!g.$eval(l)||d()},q=++v;f?(a.get(f,{cache:c}).success(function(a){if(q===v){var c=g.$new();r.template=a;a=L(c,function(a){w();e.enter(a,null,k,m)});t=c;I=a;t.$emit("$includeContentLoaded");g.$eval(h)}}).error(function(){q===v&&w()}),g.$emit("$includeContentRequested")):(w(),r.template=null)})}}}}],Kd=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){d.html(f.template);a(d.contents())(c)}}}],vd=xa({priority:450, +compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),wd=xa({terminal:!0,priority:1E3}),xd=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,f,g){var k=g.count,m=g.$attr.when&&f.attr(g.$attr.when),h=g.offset||0,l=e.$eval(m)||{},n={},p=c.startSymbol(),q=c.endSymbol(),s=/^when(Minus)?(.+)$/;r(g,function(a,c){s.test(c)&&(l[N(c.replace("when","").replace("Minus","-"))]=f.attr(g.$attr[c]))});r(l,function(a,e){n[e]=c(a.replace(d,p+k+"-"+h+q))});e.$watch(function(){var c= +parseFloat(e.$eval(k));if(isNaN(c))return"";c in l||(c=a.pluralCat(c-h));return n[c](e,f,!0)},function(a){f.text(a)})}}}],yd=["$parse","$animate",function(a,c){var d=x("ngRepeat");return{transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,link:function(e,f,g,k,m){var h=g.ngRepeat,l=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),n,p,q,s,t,v,C={$id:Ka};if(!l)throw d("iexp",h);g=l[1];k=l[2];(l=l[3])?(n=a(l),p=function(a,c,d){v&&(C[v]=a);C[t]=c;C.$index=d;return n(e, +C)}):(q=function(a,c){return Ka(c)},s=function(a){return a});l=g.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!l)throw d("iidexp",g);t=l[3]||l[1];v=l[2];var A={};e.$watchCollection(k,function(a){var g,k,l=f[0],n,C={},J,E,F,x,z,y,H=[];if(fb(a))z=a,n=p||q;else{n=p||s;z=[];for(F in a)a.hasOwnProperty(F)&&"$"!=F.charAt(0)&&z.push(F);z.sort()}J=z.length;k=H.length=z.length;for(g=0;gB;)t.pop().element.remove()}for(;z.length>M;)z.pop()[0].element.remove()}var h;if(!(h=s.match(d)))throw We("iexp",s,ha(f));var l=c(h[2]||h[1]),m=h[4]||h[6],n=h[5],p=c(h[3]||""),r=c(h[2]?h[1]:m),v=c(h[7]),u=h[8]?c(h[8]):null,z=[[{element:f,label:""}]];x&&(a(x)(e),x.removeClass("ng-scope"),x.remove());f.empty();f.on("change",function(){e.$apply(function(){var a,c=v(e)||[],d={},h,l,p,s,w,x,y;if(q)for(l=[],s=0,x=z.length;s< +x;s++)for(a=z[s],p=1,w=a.length;p@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}.ng-hide-add-active,.ng-hide-remove{display:block!important;}'); +//# sourceMappingURL=angular.min.js.map diff --git a/ems-engine/src/main/webapp/js/bootstrap.min.js b/ems-engine/src/main/webapp/js/bootstrap.min.js new file mode 100644 index 0000000000..e79c065134 --- /dev/null +++ b/ems-engine/src/main/webapp/js/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/ems-engine/src/main/webapp/js/charts.js b/ems-engine/src/main/webapp/js/charts.js new file mode 100644 index 0000000000..aea7c0c548 --- /dev/null +++ b/ems-engine/src/main/webapp/js/charts.js @@ -0,0 +1,584 @@ + +Array.prototype.average = function () { + var sum = 0, j = 0; + for (var i = 0; i < this.length, isFinite(this[i]); i++) { + sum += parseFloat(this[i]); ++j; + } + return j ? sum / j : 0; +}; + +Array.prototype.contains = function(obj) { + var i = this.length; + while (i--) { + if (this[i] == obj) { + return true; + } + } + return false; +} + +$(function () { + + var categories = []; + var num = []; + var time = []; + + $.ajax({ + type: "GET", + url: "metric/lastUpdate", + success : function(data) { + $("#lastUpd").html('Ultimo refresh dati ' + data + ''); + } + }); + + + $.ajax({ + type: "GET", + url: "metric/time", + async: false, + success : function(data) { + var json = $.parseJSON(data); + $.each(json,function(key,value){ + categories.push(key); + time.push(parseFloat(value.average().toFixed(2))); + }); + } + }); + + $.ajax({ + type: "GET", + url: "metric/count", + async: false, + success : function(data) { + var json = $.parseJSON(data); + $.each(json,function(key,value){ + num.push(value); + }); + } + }); + + dataAggr = []; + + $.ajax({ + type: "GET", + url: "engine/status", + async: false, + success : function(data) { + var sum = 0; + $.each(data, function(key,value){ + var idx = categories.indexOf(value.path.substring(1)); + if(idx > -1) { + sum = sum + num[idx]; + } + }); + data = Array(); + data = ['Engine', sum]; + dataAggr.push(data); + } + }); + + $.ajax({ + type: "GET", + url: "product/status", + async: false, + success : function(data) { + var sum = 0; + $.each(data, function(key,value){ + var idx = categories.indexOf(value.path.substring(1)); + if(idx > -1) { + sum = sum + num[idx]; + } + }); + data = Array(); + data = ['Product', sum]; + dataAggr.push(data); + } + }); + + $.ajax({ + type: "GET", + url: "contabil/status", + async: false, + success : function(data) { + var sum = 0; + $.each(data, function(key,value){ + var idx = categories.indexOf(value.path.substring(1)); + if(idx > -1) { + sum = sum + num[idx]; + } + }); + data = Array(); + data = ['Contabil', sum]; + dataAggr.push(data); + } + }); + + $.ajax({ + type: "GET", + url: "logistic/status", + async: false, + success : function(data) { + var sum = 0; + $.each(data, function(key,value){ + var idx = categories.indexOf(value.path.substring(1)); + if(idx > -1) { + sum = sum + num[idx]; + } + }); + data = Array(); + data = ['Logistic', sum]; + dataAggr.push(data); + } + }); + + $.ajax({ + type: "GET", + url: "order/status", + async: false, + success : function(data) { + var sum = 0; + $.each(data, function(key,value){ + var idx = categories.indexOf(value.path.substring(1)); + if(idx > -1) { + sum = sum + num[idx]; + } + }); + data = Array(); + data = ['Order', sum]; + dataAggr.push(data); + } + }); + + $.ajax({ + type: "GET", + url: "ordikids/status", + async: false, + success : function(data) { + var sum = 0; + $.each(data, function(key,value){ + var idx = categories.indexOf(value.path.substring(1)); + if(idx > -1) { + sum = sum + num[idx]; + } + }); + data = Array(); + data = ['Ordikids', sum]; + dataAggr.push(data); + } + }); + + $.ajax({ + type: "GET", + url: "document/status", + async: false, + success : function(data) { + var sum = 0; + $.each(data, function(key,value){ + var idx = categories.indexOf(value.path.substring(1)); + if(idx > -1) { + sum = sum + num[idx]; + } + }); + data = Array(); + data = ['Document', sum]; + dataAggr.push(data); + } + }); + + $.ajax({ + type: "GET", + url: "retail/status", + async: false, + success : function(data) { + var sum = 0; + $.each(data, function(key,value){ + var idx = categories.indexOf(value.path.substring(1)); + if(idx > -1) { + sum = sum + num[idx]; + } + }); + data = Array(); + data = ['Retail', sum]; + dataAggr.push(data); + } + }); + + $.ajax({ + type: "GET", + url: "system/status", + async: false, + success : function(data) { + var sum = 0; + $.each(data, function(key,value){ + var idx = categories.indexOf(value.path.substring(1)); + if(idx > -1) { + sum = sum + num[idx]; + } + }); + data = Array(); + data = ['System', sum]; + dataAggr.push(data); + } + }); + + var jobsData = []; + $.ajax({ + type: "GET", + url: "scheduler/getInfo", + async: false, + success : function(data) { + jobsData = data; + } + }); + + function searchStat(profile) { + var keySearch = undefined; + $.each(dbStat, function(key, value) { + if(value[0] == profile){ + keySearch = key; + return keySearch; + } + }); + return keySearch; + } + + var countExec=0; + var countAtt=0; + var dbStat=[]; + $.each(window.jobsData, function(key, value) { + if(value.isRunning==true) { + countExec++; + } else { + countAtt++; + } + var key; + if((key = searchStat(value.profileDb)) == undefined){ + var arr = [value.profileDb, 1] + dbStat.push(arr); + } else { + dbStat[0][1] = dbStat[0][1] + 1; + } + }); + + $('#pieDbJobs').highcharts({ + chart: { + plotBackgroundColor: null, + plotBorderWidth: 0, + plotShadow: false + }, + title: { + text: 'Database coinvolti', + align: 'center', + verticalAlign: 'middle', + y: 50, + style: { + fontSize:10 + } + }, + tooltip: { + pointFormat: '{series.name}: {point.percentage:.1f}%' + }, + plotOptions: { + pie: { + dataLabels: { + enabled: true, + distance: -50, + style: { + fontWeight: 'bold', + color: 'white', + textShadow: '0px 1px 2px black' + } + }, + startAngle: -90, + endAngle: 90, + center: ['50%', '75%'] + } + }, + series: [{ + type: 'pie', + name: '', + innerSize: '50%', + data: [ + ['Carelli', 3], + ['Panimal', 6], + ['Gestfood', 2] + ] + }] + }); + + $('#pieJobs').highcharts({ + chart: { + plotBackgroundColor: null, + plotBorderWidth: 0, + plotShadow: false + }, + title: { + text: 'Attesa/Esecuz.', + align: 'center', + verticalAlign: 'middle', + y: 50, + style: { + fontSize:10 + } + }, + tooltip: { + pointFormat: '{series.name}: {point.percentage:.1f}%' + }, + plotOptions: { + pie: { + dataLabels: { + enabled: true, + distance: -50, + style: { + fontWeight: 'bold', + color: 'white', + textShadow: '0px 1px 2px black' + } + }, + startAngle: -90, + endAngle: 90, + center: ['50%', '75%'] + } + }, + series: [{ + type: 'pie', + name: '', + innerSize: '50%', + data: [ + ['In esecuzione', countExec], + ['In attesa', countAtt] + ] + }] + }); + + $('#chartCountTime').highcharts({ + chart: { + zoomType: 'xy' + }, + title: { + text: 'Numero chiamate e tempi di risposta servizi singoli' + }, + subtitle: { + text: 'Ultimi 30 min' + }, + xAxis: [{ + categories: categories, + crosshair: true + }], + yAxis: [{ // Primary yAxis + labels: { + format: '{value} s', + style: { + color: Highcharts.getOptions().colors[1] + } + }, + title: { + text: 'Tempo medio esecuzione', + style: { + color: Highcharts.getOptions().colors[1] + } + } + }, { // Secondary yAxis + title: { + text: 'Num. chiamate', + style: { + color: Highcharts.getOptions().colors[0] + } + }, + labels: { + format: '{value}', + style: { + color: Highcharts.getOptions().colors[0] + } + }, + opposite: true + }], + series: [{ + name: 'Num. chiamate', + type: 'column', + yAxis: 1, + data: num, + tooltip: { + valueSuffix: '{value}' + } + + }, { + name: 'Tempo medio esecuzione', + type: 'spline', + data: time, + tooltip: { + valueSuffix: '{value} s' + } + }] + }); + + $('#chartCount').highcharts({ + chart: { + plotBackgroundColor: null, + plotBorderWidth: null, + plotShadow: false, + type: 'pie' + }, + title: { + text: 'Numero chiamate aggregate per modulo' + }, + subtitle: { + text: 'Ultimi 30 min' + }, + plotOptions: { + pie: { + allowPointSelect: true, + cursor: 'pointer', + dataLabels: { + enabled: true, + style: { + color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black' + } + } + }, + point: { + events: { + mouseOver: function(event) { + var point = this; + $('div.'+point.name).css({'background-color':'green', 'cursor':'pointer'}); + } + } + }, + events: { + mouseOut: function() { + var point = this; + $('div.'+point.name).css({'background-color':'none', 'cursor':'pointer'}); + } + } + },series: [{ + type: 'pie', + data: dataAggr + }] + }); + + var totCount = 0; + $.ajax({ + type: "GET", + url: "metric/totCount", + async: false, + success : function(data) { + var json = $.parseJSON(data); + totCount = parseFloat((parseInt(json.totCount)/30).toFixed(2)); + } + }); + + var totMean = 0; + $.ajax({ + type: "GET", + url: "metric/totMean", + async: false, + success : function(data) { + var json = $.parseJSON(data); + totMean = parseFloat((parseInt(json.totMean)/30).toFixed(2)); + } + }); + + $('#gaugeLoadSystem').highcharts({ + + chart: { + type: 'gauge', + plotBackgroundColor: null, + plotBackgroundImage: null, + plotBorderWidth: 0, + plotShadow: false + }, + title: { + text: 'Carico sistema attuale' + }, + pane: { + startAngle: -150, + endAngle: 150, + background: [{ + backgroundColor: { + linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, + stops: [ + [0, '#FFF'], + [1, '#333'] + ] + }, + borderWidth: 0, + outerRadius: '109%' + }, { + backgroundColor: { + linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, + stops: [ + [0, '#333'], + [1, '#FFF'] + ] + }, + borderWidth: 1, + outerRadius: '107%' + }, { + // default background + }, { + backgroundColor: '#DDD', + borderWidth: 0, + outerRadius: '105%', + innerRadius: '103%' + }] + }, + + // the value axis + yAxis: { + min: 0, + max: 1200, + + minorTickInterval: 'auto', + minorTickWidth: 1, + minorTickLength: 10, + minorTickPosition: 'inside', + minorTickColor: '#666', + + tickPixelInterval: 30, + tickWidth: 2, + tickPosition: 'inside', + tickLength: 10, + tickColor: '#666', + labels: { + step: 2, + rotation: 'auto' + }, + title: { + text: 'call/min' + }, + plotBands: [{ + from: 0, + to: 500, + color: '#55BF3B' // green + }, { + from: 501, + to: 800, + color: '#DDDF0D' // yellow + }, { + from: 801, + to: 1200, + color: '#DF5353' // red + }] + }, + + series: [{ + name: 'Mean', + data: [totMean], + tooltip: { + valueSuffix: ' call/today' + }, + dial: { + backgroundColor: '#2E9AFE' + } + }, { + name: 'Load', + data: [totCount], + tooltip: { + valueSuffix: ' call/min' + } + }] + + }); + +}); + diff --git a/ems-engine/src/main/webapp/js/exporting.js b/ems-engine/src/main/webapp/js/exporting.js new file mode 100644 index 0000000000..36a850565d --- /dev/null +++ b/ems-engine/src/main/webapp/js/exporting.js @@ -0,0 +1,24 @@ +/* + Highcharts JS v4.2.1 (2015-12-21) + Exporting module + + (c) 2010-2014 Torstein Honsi + + License: www.highcharts.com/license +*/ +(function(f){typeof module==="object"&&module.exports?module.exports=f:f(Highcharts)})(function(f){var r=f.win,m=r.document,A=f.Chart,t=f.addEvent,B=f.removeEvent,C=f.fireEvent,n=f.createElement,s=f.discardElement,v=f.css,l=f.merge,i=f.each,q=f.extend,F=f.splat,G=Math.max,H=f.isTouchDevice,I=f.Renderer.prototype.symbols,y=f.getOptions(),z;q(y.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image", +contextButtonTitle:"Chart context menu"});y.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF",padding:"5px 0"},menuItemStyle:{padding:"0 10px",background:"none",color:"#303030",fontSize:H?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{symbolFill:"#E0E0E0",symbolSize:14,symbolStroke:"#666",symbolStrokeWidth:3,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,theme:{fill:"white",stroke:"none"},verticalAlign:"top",width:24}}; +y.exporting={type:"image/png",url:"http://export.highcharts.com/",buttons:{contextButton:{menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG", +onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}};f.post=function(a,b,e){var c,a=n("form",l({method:"post",action:a,enctype:"multipart/form-data"},e),{display:"none"},m.body);for(c in b)n("input",{type:"hidden",name:c,value:b[c]},null,a);a.submit();s(a)};q(A.prototype,{sanitizeSVG:function(a){return a.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/.*?$/,"").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"').replace(/ /g,"\u00a0").replace(/­/g,"\u00ad").replace(//g,"<$1title>").replace(/height=([^" ]+)/g,'height="$1"').replace(/width=([^" ]+)/g,'width="$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href="$1"/>').replace(/ id=([^" >]+)/g,' id="$1"').replace(/class=([^" >]+)/g,'class="$1"').replace(/ transform /g, +" ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(b){return b.toLowerCase()})},getChartHTML:function(){return this.container.innerHTML},getSVG:function(a){var b=this,e,c,g,j,k,d=l(b.options,a),J=d.exporting.allowHTML;if(!m.createElementNS)m.createElementNS=function(b,a){return m.createElement(a)};c=n("div",null,{position:"absolute",top:"-9999em",width:b.chartWidth+"px",height:b.chartHeight+"px"},m.body);g=b.renderTo.style.width;k=b.renderTo.style.height;g=d.exporting.sourceWidth|| +d.chart.width||/px$/.test(g)&&parseInt(g,10)||600;k=d.exporting.sourceHeight||d.chart.height||/px$/.test(k)&&parseInt(k,10)||400;q(d.chart,{animation:!1,renderTo:c,forExport:!0,renderer:"SVGRenderer",width:g,height:k});d.exporting.enabled=!1;delete d.data;d.series=[];i(b.series,function(a){j=l(a.options,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});j.isInternal||d.series.push(j)});a&&i(["xAxis","yAxis"],function(b){i(F(a[b]),function(a,c){d[b][c]=l(d[b][c],a)})});e=new f.Chart(d, +b.callback);i(["xAxis","yAxis"],function(a){i(b[a],function(b,c){var d=e[a][c],f=b.getExtremes(),g=f.userMin,f=f.userMax;d&&(g!==void 0||f!==void 0)&&d.setExtremes(g,f,!0,!1)})});g=e.getChartHTML();d=null;e.destroy();s(c);if(J&&(c=g.match(/<\/svg>(.*?$)/)))c=''+c[1]+"",g=g.replace("",c+"");g=this.sanitizeSVG(g);return g=g.replace(/(url\(#highcharts-[0-9]+)"/g,"$1").replace(/"/g, +"'")},getSVGForExport:function(a,b){var e=this.options.exporting;return this.getSVG(l({chart:{borderRadius:0}},e.chartOptions,b,{exporting:{sourceWidth:a&&a.sourceWidth||e.sourceWidth,sourceHeight:a&&a.sourceHeight||e.sourceHeight}}))},exportChart:function(a,b){var e=this.getSVGForExport(a,b),a=l(this.options.exporting,a);f.post(a.url,{filename:a.filename||"chart",type:a.type,width:a.width||0,scale:a.scale||2,svg:e},a.formAttributes)},print:function(){var a=this,b=a.container,e=[],c=b.parentNode, +f=m.body,j=f.childNodes;if(!a.isPrinting)a.isPrinting=!0,a.pointer.reset(null,0),C(a,"beforePrint"),i(j,function(a,b){if(a.nodeType===1)e[b]=a.style.display,a.style.display="none"}),f.appendChild(b),r.focus(),r.print(),setTimeout(function(){c.appendChild(b);i(j,function(a,b){if(a.nodeType===1)a.style.display=e[b]});a.isPrinting=!1;C(a,"afterPrint")},1E3)},contextMenu:function(a,b,e,c,f,j,k){var d=this,l=d.options.navigation,D=l.menuItemStyle,o=d.chartWidth,p=d.chartHeight,E="cache-"+a,h=d[E],u=G(f, +j),w,x,r,s=function(b){d.pointer.inClass(b.target,a)||x()};if(!h)d[E]=h=n("div",{className:a},{position:"absolute",zIndex:1E3,padding:u+"px"},d.container),w=n("div",null,q({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},l.menuStyle),h),x=function(){v(h,{display:"none"});k&&k.setState(0);d.openMenu=!1},t(h,"mouseleave",function(){r=setTimeout(x,500)}),t(h,"mouseenter",function(){clearTimeout(r)}),t(m,"mouseup",s),t(d,"destroy",function(){B(m,"mouseup", +s)}),i(b,function(a){if(a){var b=a.separator?n("hr",null,null,w):n("div",{onmouseover:function(){v(this,l.menuItemHoverStyle)},onmouseout:function(){v(this,D)},onclick:function(b){b&&b.stopPropagation();x();a.onclick&&a.onclick.apply(d,arguments)},innerHTML:a.text||d.options.lang[a.textKey]},q({cursor:"pointer"},D),w);d.exportDivElements.push(b)}}),d.exportDivElements.push(w,h),d.exportMenuWidth=h.offsetWidth,d.exportMenuHeight=h.offsetHeight;b={display:"block"};e+d.exportMenuWidth>o?b.right=o-e- +f-u+"px":b.left=e-u+"px";c+j+d.exportMenuHeight>p&&k.alignOptions.verticalAlign!=="top"?b.bottom=p-c-u+"px":b.top=c+j-u+"px";v(h,b);d.openMenu=!0},addButton:function(a){var b=this,e=b.renderer,c=l(b.options.navigation.buttonOptions,a),g=c.onclick,j=c.menuItems,k,d,m={stroke:c.symbolStroke,fill:c.symbolFill},i=c.symbolSize||12;if(!b.btnCount)b.btnCount=0;if(!b.exportDivElements)b.exportDivElements=[],b.exportSVGElements=[];if(c.enabled!==!1){var o=c.theme,p=o.states,n=p&&p.hover,p=p&&p.select,h;delete o.states; +g?h=function(a){a.stopPropagation();g.call(b,a)}:j&&(h=function(){b.contextMenu(d.menuClassName,j,d.translateX,d.translateY,d.width,d.height,d);d.setState(2)});c.text&&c.symbol?o.paddingLeft=f.pick(o.paddingLeft,25):c.text||q(o,{width:c.width,height:c.height,padding:0});d=e.button(c.text,0,0,h,o,n,p).attr({title:b.options.lang[c._titleKey],"stroke-linecap":"round"});d.menuClassName=a.menuClassName||"highcharts-menu-"+b.btnCount++;c.symbol&&(k=e.symbol(c.symbol,c.symbolX-i/2,c.symbolY-i/2,i,i).attr(q(m, +{"stroke-width":c.symbolStrokeWidth||1,zIndex:1})).add(d));d.add().align(q(c,{width:d.width,x:f.pick(c.x,z)}),!0,"spacingBox");z+=(d.width+c.buttonSpacing)*(c.align==="right"?-1:1);b.exportSVGElements.push(d,k)}},destroyExport:function(a){var a=a.target,b,e;for(b=0;b12)?(ld.getHours()-12):(ld.getHours()===0?12: + ld.getHours())) + ':' + ((ld.getMinutes()<10)?('0' + + ld.getMinutes()):(ld.getMinutes())) + ' ' + + ((ld.getHours()>=12)?'PM':'AM'); + } else { + // if only a DATE was matched + dateString = parseInt(month, 10) + '/' + parseInt(dateMonth, 10); + } + return dateString; +} \ No newline at end of file diff --git a/ems-engine/src/main/webapp/js/highcharts-more.js b/ems-engine/src/main/webapp/js/highcharts-more.js new file mode 100644 index 0000000000..b9438d6329 --- /dev/null +++ b/ems-engine/src/main/webapp/js/highcharts-more.js @@ -0,0 +1,56 @@ +/* + Highcharts JS v4.2.1 (2015-12-21) + + (c) 2009-2014 Torstein Honsi + + License: www.highcharts.com/license +*/ +(function(n){typeof module==="object"&&module.exports?module.exports=n:n(Highcharts)})(function(n){function K(a,b,c){this.init(a,b,c)}var P=n.arrayMin,Q=n.arrayMax,s=n.each,H=n.extend,t=n.merge,R=n.map,o=n.pick,A=n.pInt,p=n.getOptions().plotOptions,i=n.seriesTypes,u=n.extendClass,L=n.splat,r=n.wrap,M=n.Axis,z=n.Tick,I=n.Point,S=n.Pointer,T=n.CenteredSeriesMixin,B=n.TrackerMixin,w=n.Series,y=Math,E=y.round,C=y.floor,N=y.max,U=n.Color,v=function(){};H(K.prototype,{init:function(a,b,c){var f=this,e= +f.defaultOptions;f.chart=b;f.options=a=t(e,b.angular?{background:{}}:void 0,a);(a=a.background)&&s([].concat(L(a)).reverse(),function(a){var b=a.backgroundColor,j=c.userOptions,a=t(f.defaultBackgroundOptions,a);if(b)a.backgroundColor=b;a.color=a.backgroundColor;c.options.plotBands.unshift(a);j.plotBands=j.plotBands||[];j.plotBands!==c.options.plotBands&&j.plotBands.unshift(a)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{shape:"circle",borderWidth:1,borderColor:"silver", +backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#DDD"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}});var G=M.prototype,z=z.prototype,V={getOffset:v,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:v,setCategories:v,setTitle:v},O={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1, +tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,distance:15,x:0,y:null},maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(a){a=this.options=t(this.defaultOptions,this.defaultRadialOptions,a);if(!a.plotBands)a.plotBands=[]},getOffset:function(){G.getOffset.call(this); +this.chart.axisOffset[this.side]=0;this.center=this.pane.center=T.getCenter.call(this.pane)},getLinePath:function(a,b){var c=this.center,b=o(b,c[2]/2-this.offset);return this.chart.renderer.symbols.arc(this.left+c[0],this.top+c[1],b,b,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})},setAxisTranslation:function(){G.setAxisTranslation.call(this);if(this.center)this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.center[2]/2/(this.max-this.min|| +1),this.minPixelPadding=this.isXAxis?this.transA*this.minPointOffset:0},beforeSetTickPositions:function(){this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)},setAxisSize:function(){G.setAxisSize.call(this);if(this.isRadial){this.center=this.pane.center=n.CenteredSeriesMixin.getCenter.call(this.pane);if(this.isCircular)this.sector=this.endAngleRad-this.startAngleRad;this.len=this.width=this.height=this.center[2]*o(this.sector,1)/2}},getPosition:function(a, +b){return this.postTranslate(this.isCircular?this.translate(a):0,o(this.isCircular?b:this.translate(a),this.center[2]/2)-this.offset)},postTranslate:function(a,b){var c=this.chart,f=this.center,a=this.startAngleRad+a;return{x:c.plotLeft+f[0]+Math.cos(a)*b,y:c.plotTop+f[1]+Math.sin(a)*b}},getPlotBandPath:function(a,b,c){var f=this.center,e=this.startAngleRad,d=f[2]/2,h=[o(c.outerRadius,"100%"),c.innerRadius,o(c.thickness,10)],j=/%$/,m,g=this.isCircular;this.options.gridLineInterpolation==="polygon"? +f=this.getPlotLinePath(a).concat(this.getPlotLinePath(b,!0)):(a=Math.max(a,this.min),b=Math.min(b,this.max),g||(h[0]=this.translate(a),h[1]=this.translate(b)),h=R(h,function(a){j.test(a)&&(a=A(a,10)*d/100);return a}),c.shape==="circle"||!g?(a=-Math.PI/2,b=Math.PI*1.5,m=!0):(a=e+this.translate(a),b=e+this.translate(b)),f=this.chart.renderer.symbols.arc(this.left+f[0],this.top+f[1],h[0],h[0],{start:Math.min(a,b),end:Math.max(a,b),innerR:o(h[1],h[0]-h[2]),open:m}));return f},getPlotLinePath:function(a, +b){var c=this,f=c.center,e=c.chart,d=c.getPosition(a),h,j,m;c.isCircular?m=["M",f[0]+e.plotLeft,f[1]+e.plotTop,"L",d.x,d.y]:c.options.gridLineInterpolation==="circle"?(a=c.translate(a))&&(m=c.getLinePath(0,a)):(s(e.xAxis,function(a){a.pane===c.pane&&(h=a)}),m=[],a=c.translate(a),f=h.tickPositions,h.autoConnect&&(f=f.concat([f[0]])),b&&(f=[].concat(f).reverse()),s(f,function(d,b){j=h.getPosition(d,a);m.push(b?"L":"M",j.x,j.y)}));return m},getTitlePosition:function(){var a=this.center,b=this.chart, +c=this.options.title;return{x:b.plotLeft+a[0]+(c.x||0),y:b.plotTop+a[1]-{high:0.5,middle:0.25,low:0}[c.align]*a[2]+(c.y||0)}}};r(G,"init",function(a,b,c){var k;var f=b.angular,e=b.polar,d=c.isX,h=f&&d,j,m;m=b.options;var g=c.pane||0;if(f){if(H(this,h?V:O),j=!d)this.defaultRadialOptions=this.defaultRadialGaugeOptions}else if(e)H(this,O),this.defaultRadialOptions=(j=d)?this.defaultRadialXOptions:t(this.defaultYAxisOptions,this.defaultRadialYOptions);a.call(this,b,c);if(!h&&(f||e)){a=this.options;if(!b.panes)b.panes= +[];this.pane=(k=b.panes[g]=b.panes[g]||new K(L(m.pane)[g],b,this),g=k);g=g.options;b.inverted=!1;m.chart.zoomType=null;this.startAngleRad=b=(g.startAngle-90)*Math.PI/180;this.endAngleRad=m=(o(g.endAngle,g.startAngle+360)-90)*Math.PI/180;this.offset=a.offset||0;if((this.isCircular=j)&&c.max===void 0&&m-b===2*Math.PI)this.autoConnect=!0}});r(z,"getPosition",function(a,b,c,f,e){var d=this.axis;return d.getPosition?d.getPosition(c):a.call(this,b,c,f,e)});r(z,"getLabelPosition",function(a,b,c,f,e,d,h, +j,m){var g=this.axis,l=d.y,k=20,i=d.align,x=(g.translate(this.pos)+g.startAngleRad+Math.PI/2)/Math.PI*180%360;g.isRadial?(a=g.getPosition(this.pos,g.center[2]/2+o(d.distance,-25)),d.rotation==="auto"?f.attr({rotation:x}):l===null&&(l=g.chart.renderer.fontMetrics(f.styles.fontSize).b-f.getBBox().height/2),i===null&&(g.isCircular?(this.label.getBBox().width>g.len*g.tickInterval/(g.max-g.min)&&(k=0),i=x>k&&x<180-k?"left":x>180+k&&x<360-k?"right":"center"):i="center",f.attr({align:i})),a.x+=d.x,a.y+= +l):a=a.call(this,b,c,f,e,d,h,j,m);return a});r(z,"getMarkPath",function(a,b,c,f,e,d,h){var j=this.axis;j.isRadial?(a=j.getPosition(this.pos,j.center[2]/2+f),b=["M",b,c,"L",a.x,a.y]):b=a.call(this,b,c,f,e,d,h);return b});p.arearange=t(p.area,{lineWidth:1,marker:null,threshold:null,tooltip:{pointFormat:'\u25cf {series.name}: {point.low} - {point.high}
'},trackByArea:!0,dataLabels:{align:null,verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0}, +states:{hover:{halo:!1}}});i.arearange=u(i.area,{type:"arearange",pointArrayMap:["low","high"],dataLabelCollections:["dataLabel","dataLabelUpper"],toYData:function(a){return[a.low,a.high]},pointValKey:"low",deferTranslatePolar:!0,highToXY:function(a){var b=this.chart,c=this.xAxis.postTranslate(a.rectPlotX,this.yAxis.len-a.plotHigh);a.plotHighX=c.x-b.plotLeft;a.plotHigh=c.y-b.plotTop},getSegments:function(){var a=this;s(a.points,function(b){if(!a.options.connectNulls&&(b.low===null||b.high===null))b.y= +null;else if(b.low===null&&b.high!==null)b.y=b.high});w.prototype.getSegments.call(this)},translate:function(){var a=this,b=a.yAxis;i.area.prototype.translate.apply(a);s(a.points,function(a){var f=a.low,e=a.high,d=a.plotY;e===null&&f===null?a.y=null:f===null?(a.plotLow=a.plotY=null,a.plotHigh=b.translate(e,0,1,0,1)):e===null?(a.plotLow=d,a.plotHigh=null):(a.plotLow=d,a.plotHigh=b.translate(e,0,1,0,1))});this.chart.polar&&s(this.points,function(b){a.highToXY(b)})},getSegmentPath:function(a){var b, +c=[],f=a.length,e=w.prototype.getSegmentPath,d,h;h=this.options;var j=h.step;for(b=n.grep(a,function(a){return a.plotLow!==null});f--;)d=a[f],d.plotHigh!==null&&c.push({plotX:d.plotHighX||d.plotX,plotY:d.plotHigh});a=e.call(this,b);if(j)j===!0&&(j="left"),h.step={left:"right",center:"center",right:"left"}[j];c=e.call(this,c);h.step=j;h=[].concat(a,c);this.chart.polar||(c[0]="L");this.areaPath=this.areaPath.concat(a,c);return h},drawDataLabels:function(){var a=this.data,b=a.length,c,f=[],e=w.prototype, +d=this.options.dataLabels,h=d.align,j=d.verticalAlign,m=d.inside,g,l,k=this.chart.inverted;if(d.enabled||this._hasPointLabels){for(c=b;c--;)if(g=a[c]){l=m?g.plotHighg.plotLow;g.y=g.high;g._plotY=g.plotY;g.plotY=g.plotHigh;f[c]=g.dataLabel;g.dataLabel=g.dataLabelUpper;g.below=l;if(k){if(!h)d.align=l?"right":"left"}else if(!j)d.verticalAlign=l?"top":"bottom";d.x=d.xHigh;d.y=d.yHigh}e.drawDataLabels&&e.drawDataLabels.apply(this,arguments);for(c=b;c--;)if(g=a[c]){l=m?g.plotHigh< +g.plotLow:g.plotHigh>g.plotLow;g.dataLabelUpper=g.dataLabel;g.dataLabel=f[c];g.y=g.low;g.plotY=g._plotY;g.below=!l;if(k){if(!h)d.align=l?"left":"right"}else if(!j)d.verticalAlign=l?"bottom":"top";d.x=d.xLow;d.y=d.yLow}e.drawDataLabels&&e.drawDataLabels.apply(this,arguments)}d.align=h;d.verticalAlign=j},alignDataLabel:function(){i.column.prototype.alignDataLabel.apply(this,arguments)},setStackedPoints:v,getSymbol:v,drawPoints:v});p.areasplinerange=t(p.arearange);i.areasplinerange=u(i.arearange,{type:"areasplinerange", +getPointSpline:i.spline.prototype.getPointSpline});(function(){var a=i.column.prototype;p.columnrange=t(p.column,p.arearange,{lineWidth:1,pointRange:null});i.columnrange=u(i.arearange,{type:"columnrange",translate:function(){var b=this,c=b.yAxis,f=b.xAxis,e=b.chart,d;a.translate.apply(b);s(b.points,function(a){var j=a.shapeArgs,m=b.options.minPointLength,g,l;a.plotHigh=d=c.translate(a.high,0,1,0,1);a.plotLow=a.plotY;l=d;g=a.plotY-d;Math.abs(g)\u25cf {series.name}
Maximum: {point.high}
Upper quartile: {point.q3}
Median: {point.median}
Lower quartile: {point.q1}
Minimum: {point.low}
'},whiskerLength:"50%",whiskerWidth:2});i.boxplot= +u(i.column,{type:"boxplot",pointArrayMap:["low","q1","median","q3","high"],toYData:function(a){return[a.low,a.q1,a.median,a.q3,a.high]},pointValKey:"high",pointAttrToOptions:{fill:"fillColor",stroke:"color","stroke-width":"lineWidth"},drawDataLabels:v,translate:function(){var a=this.yAxis,b=this.pointArrayMap;i.column.prototype.translate.apply(this);s(this.points,function(c){s(b,function(b){c[b]!==null&&(c[b+"Plot"]=a.translate(c[b],0,1,0,1))})})},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer, +f,e,d,h,j,m,g,l,k,i,x,n,J,p,t,r,v,u,w,y,B,A,z=a.doQuartiles!==!1,F,D=a.options.whiskerLength;s(a.points,function(q){k=q.graphic;B=q.shapeArgs;x={};p={};r={};A=q.color||a.color;if(q.plotY!==void 0)if(f=q.pointAttr[q.selected?"selected":""],v=B.width,u=C(B.x),w=u+v,y=E(v/2),e=C(z?q.q1Plot:q.lowPlot),d=C(z?q.q3Plot:q.lowPlot),h=C(q.highPlot),j=C(q.lowPlot),x.stroke=q.stemColor||b.stemColor||A,x["stroke-width"]=o(q.stemWidth,b.stemWidth,b.lineWidth),x.dashstyle=q.stemDashStyle||b.stemDashStyle,p.stroke= +q.whiskerColor||b.whiskerColor||A,p["stroke-width"]=o(q.whiskerWidth,b.whiskerWidth,b.lineWidth),r.stroke=q.medianColor||b.medianColor||A,r["stroke-width"]=o(q.medianWidth,b.medianWidth,b.lineWidth),g=x["stroke-width"]%2/2,l=u+y+g,i=["M",l,d,"L",l,h,"M",l,e,"L",l,j],z&&(g=f["stroke-width"]%2/2,l=C(l)+g,e=C(e)+g,d=C(d)+g,u+=g,w+=g,n=["M",u,d,"L",u,e,"L",w,e,"L",w,d,"L",u,d,"z"]),D&&(g=p["stroke-width"]%2/2,h+=g,j+=g,F=/%$/.test(D)?y*parseFloat(D)/100:D/2,J=["M",l-F,h,"L",l+F,h,"M",l-F,j,"L",l+F,j]), +g=r["stroke-width"]%2/2,m=E(q.medianPlot)+g,t=["M",u,m,"L",w,m],k)q.stem.animate({d:i}),D&&q.whiskers.animate({d:J}),z&&q.box.animate({d:n}),q.medianShape.animate({d:t});else{q.graphic=k=c.g().add(a.group);q.stem=c.path(i).attr(x).add(k);if(D)q.whiskers=c.path(J).attr(p).add(k);if(z)q.box=c.path(n).attr(f).add(k);q.medianShape=c.path(t).attr(r).add(k)}})},setStackedPoints:v});p.errorbar=t(p.boxplot,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:'\u25cf {series.name}: {point.low} - {point.high}
'}, +whiskerWidth:null});i.errorbar=u(i.boxplot,{type:"errorbar",pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"high",doQuartiles:!1,drawDataLabels:i.arearange?i.arearange.prototype.drawDataLabels:v,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||i.column.prototype.getColumnMetrics.call(this)}});p.waterfall=t(p.column,{lineWidth:1,lineColor:"#333",dashStyle:"dot",borderColor:"#333",dataLabels:{inside:!0},states:{hover:{lineWidthPlus:0}}}); +i.waterfall=u(i.column,{type:"waterfall",upColorProp:"fill",pointValKey:"y",translate:function(){var a=this.options,b=this.yAxis,c,f,e,d,h,j,m,g,l,k=o(a.minPointLength,5),n=a.threshold,x=a.stacking;i.column.prototype.translate.apply(this);this.minPointLengthOffset=0;m=g=n;f=this.points;for(c=0,a=f.length;c0?b.translate(m,0,1)-d.y:b.translate(m,0,1)-b.translate(m-j,0,1);m+=j}d.height<0&&(d.y+=d.height,d.height*=-1);e.plotY=d.y=E(d.y)-this.borderWidth%2/2;d.height=N(E(d.height),0.001);e.yBottom= +d.y+d.height;if(d.height<=k)d.height=k,this.minPointLengthOffset+=k;d.y-=this.minPointLengthOffset;d=e.plotY+(e.negative?d.height:0)-this.minPointLengthOffset;this.chart.inverted?e.tooltipPos[0]=b.len-d:e.tooltipPos[1]=d}},processData:function(a){var b=this.yData,c=this.options.data,f,e=b.length,d,h,j,m,g,l;h=d=j=m=this.options.threshold||0;for(l=0;l0?(d.pointAttr= +e,d.color=f):d.pointAttr=a.pointAttr})},getGraphPath:function(){var a=this.data,b=a.length,c=E(this.options.lineWidth+this.borderWidth)%2/2,f=[],e,d,h;for(h=1;h0?(h-a)/i:0.5,l&&h>=0&&(h=Math.sqrt(h)),h=y.ceil(c+h*(f-c))/2),m.push(h);this.radii=m},animate:function(a){var b=this.options.animation;if(!a)s(this.points, +function(a){var f=a.graphic,a=a.shapeArgs;f&&a&&(f.attr("r",1),f.animate({r:a.r},b))}),this.animate=null},translate:function(){var a,b=this.data,c,f,e=this.radii;i.scatter.prototype.translate.call(this);for(a=b.length;a--;)c=b[a],f=e?e[a]:0,typeof f==="number"&&f>=this.minPxSize/2?(c.shapeType="circle",c.shapeArgs={x:c.plotX,y:c.plotY,r:f},c.dlBox={x:c.plotX-f,y:c.plotY-f,width:2*f,height:2*f}):c.shapeArgs=c.plotY=c.dlBox=void 0},drawLegendSymbol:function(a,b){var c=this.chart.renderer,f=c.fontMetrics(a.itemStyle.fontSize).f/ +2;b.legendSymbol=c.circle(f,a.baseline-f,f).attr({zIndex:3}).add(b.legendGroup);b.legendSymbol.isMarker=!0},drawPoints:i.column.prototype.drawPoints,alignDataLabel:i.column.prototype.alignDataLabel,buildKDTree:v,applyZones:v});M.prototype.beforePadding=function(){var a=this,b=this.len,c=this.chart,f=0,e=b,d=this.isXAxis,h=d?"xData":"yData",j=this.min,m={},g=y.min(c.plotWidth,c.plotHeight),l=Number.MAX_VALUE,k=-Number.MAX_VALUE,i=this.max-j,n=b/i,p=[];s(this.series,function(b){var h=b.options;if(b.bubblePadding&& +(b.visible||!c.options.chart.ignoreHiddenSeries))if(a.allowZoomOutside=!0,p.push(b),d)s(["minSize","maxSize"],function(a){var d=h[a],b=/%$/.test(d),d=A(d);m[a]=b?g*d/100:d}),b.minPxSize=m.minSize,b.maxPxSize=m.maxSize,b=b.zData,b.length&&(l=o(h.zMin,y.min(l,y.max(P(b),h.displayNegative===!1?h.zThreshold:-Number.MAX_VALUE))),k=o(h.zMax,y.max(k,Q(b))))});s(p,function(a){var b=a[h],c=b.length,g;d&&a.getRadii(l,k,a.minPxSize,a.maxPxSize);if(i>0)for(;c--;)typeof b[c]==="number"&&(g=a.radii[c],f=Math.min((b[c]- +j)*n-g,f),e=Math.max((b[c]-j)*n+g,e))});p.length&&i>0&&!this.isLog&&(e-=b,n*=(b+f-e)/b,s([["min","userMin",f],["max","userMax",e]],function(d){o(a.options[d[0]],a[d[1]])===void 0&&(a[d[0]]+=d[2]/n)}))};(function(){function a(a,b,c){a.call(this,b,c);if(this.chart.polar)this.closeSegment=function(a){var d=this.xAxis.center;a.push("L",d[0],d[1])},this.closedStacks=!0}function b(a,b){var c=this.chart,f=this.options.animation,g=this.group,e=this.markerGroup,k=this.xAxis.center,i=c.plotLeft,n=c.plotTop; +if(c.polar){if(c.renderer.isSVG)f===!0&&(f={}),b?(c={translateX:k[0]+i,translateY:k[1]+n,scaleX:0.001,scaleY:0.001},g.attr(c),e&&e.attr(c)):(c={translateX:i,translateY:n,scaleX:1,scaleY:1},g.animate(c,f),e&&e.animate(c,f),this.animate=null)}else a.call(this,b)}var c=w.prototype,f=S.prototype,e;c.searchPointByAngle=function(a){var b=this.chart,c=this.xAxis.pane.center;return this.searchKDTree({clientX:180+Math.atan2(a.chartX-c[0]-b.plotLeft,a.chartY-c[1]-b.plotTop)*(-180/Math.PI)})};r(c,"buildKDTree", +function(a){if(this.chart.polar)this.kdByAngle?this.searchPoint=this.searchPointByAngle:this.kdDimensions=2;a.apply(this)});c.toXY=function(a){var b,c=this.chart,f=a.plotX;b=a.plotY;a.rectPlotX=f;a.rectPlotY=b;b=this.xAxis.postTranslate(a.plotX,this.yAxis.len-b);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop;this.kdByAngle?(c=(f/Math.PI*180+this.xAxis.pane.options.startAngle)%360,c<0&&(c+=360),a.clientX=c):a.clientX=a.plotX};i.area&&r(i.area.prototype,"init",a);i.areaspline&& +r(i.areaspline.prototype,"init",a);i.spline&&r(i.spline.prototype,"getPointSpline",function(a,b,c,f){var g,e,k,i,n,p,o;if(this.chart.polar){g=c.plotX;e=c.plotY;a=b[f-1];k=b[f+1];this.connectEnds&&(a||(a=b[b.length-2]),k||(k=b[1]));if(a&&k)i=a.plotX,n=a.plotY,b=k.plotX,p=k.plotY,i=(1.5*g+i)/2.5,n=(1.5*e+n)/2.5,k=(1.5*g+b)/2.5,o=(1.5*e+p)/2.5,b=Math.sqrt(Math.pow(i-g,2)+Math.pow(n-e,2)),p=Math.sqrt(Math.pow(k-g,2)+Math.pow(o-e,2)),i=Math.atan2(n-e,i-g),n=Math.atan2(o-e,k-g),o=Math.PI/2+(i+n)/2,Math.abs(i- +o)>Math.PI/2&&(o-=Math.PI),i=g+Math.cos(o)*b,n=e+Math.sin(o)*b,k=g+Math.cos(Math.PI+o)*p,o=e+Math.sin(Math.PI+o)*p,c.rightContX=k,c.rightContY=o;f?(c=["C",a.rightContX||a.plotX,a.rightContY||a.plotY,i||g,n||e,g,e],a.rightContX=a.rightContY=null):c=["M",g,e]}else c=a.call(this,b,c,f);return c});r(c,"translate",function(a){var b=this.chart;a.call(this);if(b.polar&&(this.kdByAngle=b.tooltip&&b.tooltip.shared,!this.preventPostTranslate)){a=this.points;for(b=a.length;b--;)this.toXY(a[b])}});r(c,"getSegmentPath", +function(a,b){var c=this.points;if(this.chart.polar&&this.options.connectEnds!==!1&&b[b.length-1]===c[c.length-1]&&c[0].y!==null)this.connectEnds=!0,b=[].concat(b,[c[0]]);return a.call(this,b)});r(c,"animate",b);if(i.column)e=i.column.prototype,r(e,"animate",b),r(e,"translate",function(a){var b=this.xAxis,c=this.yAxis.len,e=b.center,g=b.startAngleRad,f=this.chart.renderer,k,i;this.preventPostTranslate=!0;a.call(this);if(b.isRadial){b=this.points;for(i=b.length;i--;)k=b[i],a=k.barX+g,k.shapeType="path", +k.shapeArgs={d:f.symbols.arc(e[0],e[1],c-k.plotY,null,{start:a,end:a+k.pointWidth,innerR:c-o(k.yBottom,c)})},this.toXY(k),k.tooltipPos=[k.plotX,k.plotY],k.ttBelow=k.plotY>e[1]}}),r(e,"alignDataLabel",function(a,b,e,f,g,i){if(this.chart.polar){a=b.rectPlotX/Math.PI*180;if(f.align===null)f.align=a>20&&a<160?"left":a>200&&a<340?"right":"center";if(f.verticalAlign===null)f.verticalAlign=a<45||a>315?"bottom":a>135&&a<225?"top":"middle";c.alignDataLabel.call(this,b,e,f,g,i)}else a.call(this,b,e,f,g,i)}); +r(f,"getCoordinates",function(a,b){var c=this.chart,f={xAxis:[],yAxis:[]};c.polar?s(c.axes,function(a){var d=a.isXAxis,e=a.center,i=b.chartX-e[0]-c.plotLeft,e=b.chartY-e[1]-c.plotTop;f[d?"xAxis":"yAxis"].push({axis:a,value:a.translate(d?Math.PI-Math.atan2(i,e):Math.sqrt(Math.pow(i,2)+Math.pow(e,2)),!0)})}):f=a.call(this,b);return f})})()}); diff --git a/ems-engine/src/main/webapp/js/highcharts.js b/ems-engine/src/main/webapp/js/highcharts.js new file mode 100644 index 0000000000..2ef06f23a9 --- /dev/null +++ b/ems-engine/src/main/webapp/js/highcharts.js @@ -0,0 +1,337 @@ +/* + Highcharts JS v4.2.1 (2015-12-21) + + (c) 2009-2014 Torstein Honsi + + License: www.highcharts.com/license +*/ +(function(C,Y){typeof module==="object"&&module.exports?module.exports=C.document?Y(C):Y:C.Highcharts=Y(C)})(typeof window!=="undefined"?window:this,function(C){function Y(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw Error(c);C.console&&console.log(c)}function qb(a,b,c){this.options=b;this.elem=a;this.prop=c}function D(){var a,b=arguments,c,d={},e=function(a,b){var c,d;typeof a!=="object"&&(a={});for(d in b)b.hasOwnProperty(d)&&(c=b[d],a[d]=c&&typeof c==="object"&& +Object.prototype.toString.call(c)!=="[object Array]"&&d!=="renderTo"&&typeof c.nodeType!=="number"?e(a[d]||{},c):b[d]);return a};b[0]===!0&&(d=b[1],b=Array.prototype.slice.call(b,2));c=b.length;for(a=0;a-1?h.thousandsSep:""))):e=Ra(f,e)}k.push(e);a=a.slice(c+1);c=(d=!d)?"}":"{"}k.push(a);return k.join("")}function sb(a){return V.pow(10,S(V.log(a)/V.LN10))}function tb(a,b,c,d,e){var f,g=a,c=p(c,1);f=a/c;b||(b=[1,2,2.5,5,10],d===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;d=a||!e&&f<=(b[d]+(b[d+1]||b[d]))/ +2)break;g*=c;return g}function jb(a,b){var c=a.length,d,e;for(e=0;ec&&(c=a[b]);return c}function Ta(a,b){for(var c in a)a[c]&&a[c]!==b&&a[c].destroy&&a[c].destroy(),delete a[c]}function Ua(a){kb||(kb=$(Ma));a&&kb.appendChild(a);kb.innerHTML=""}function fa(a,b){return parseFloat(a.toPrecision(b|| +14))}function Va(a,b){b.renderer.globalAnimation=p(a,b.animation)}function Fb(){var a=O.global,b=a.useUTC,c=b?"getUTC":"get",d=b?"setUTC":"set";oa=a.Date||C.Date;rb=b&&a.timezoneOffset;ib=b&&a.getTimezoneOffset;lb=function(a,c,d,h,i,k){var j;b?(j=oa.UTC.apply(0,arguments),j+=Za(j)):j=(new oa(a,c,p(d,1),p(h,0),p(i,0),p(k,0))).getTime();return j};ub=c+"Minutes";vb=c+"Hours";wb=c+"Day";$a=c+"Date";ab=c+"Month";bb=c+"FullYear";Gb=d+"Milliseconds";Hb=d+"Seconds";Ib=d+"Minutes";Jb=d+"Hours";xb=d+"Date"; +yb=d+"Month";zb=d+"FullYear"}function ia(a){if(!(this instanceof ia))return new ia(a);this.init(a)}function Q(){}function Wa(a,b,c,d){this.axis=a;this.pos=b;this.type=c||"";this.isNew=!0;!c&&!d&&this.addLabel()}function Kb(a,b,c,d,e){var f=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=b;this.x=d;this.total=null;this.points={};this.stack=e;this.alignOptions={align:b.align||(f?c?"left":"right":"center"),verticalAlign:b.verticalAlign||(f?"middle":c?"bottom":"top"),y:p(b.y,f?4:c?14:-6), +x:p(b.x,f?c?-6:6:0)};this.textAlign=b.textAlign||(f?c?"right":"left":"center")}var B,z=C.document,V=Math,A=V.round,S=V.floor,ua=V.ceil,s=V.max,E=V.min,P=V.abs,T=V.cos,aa=V.sin,pa=V.PI,ga=pa*2/360,Aa=C.navigator&&C.navigator.userAgent||"",Lb=C.opera,za=/(msie|trident|edge)/i.test(Aa)&&!Lb,mb=z&&z.documentMode===8,nb=!za&&/AppleWebKit/.test(Aa),Na=/Firefox/.test(Aa),Mb=/(Mobile|Android|Windows Phone)/.test(Aa),Ea="http://www.w3.org/2000/svg",da=z&&z.createElementNS&&!!z.createElementNS(Ea,"svg").createSVGRect, +Qb=Na&&parseInt(Aa.split("Firefox/")[1],10)<4,ha=z&&!da&&!za&&!!z.createElement("canvas").getContext,cb,db,Nb={},Ab=0,kb,O,Ra,G,va=function(){},W=[],eb=0,Ma="div",Rb=/^[0-9]+$/,ob=["plotTop","marginRight","marginBottom","plotLeft"],oa,lb,rb,ib,ub,vb,wb,$a,ab,bb,Gb,Hb,Ib,Jb,xb,yb,zb,I={},u;u=C.Highcharts?Y(16,!0):{win:C};u.seriesTypes=I;var Fa=[],Ga,qa,o,Oa,Bb,Ha,N,U,H,Xa,Pa;qb.prototype={dSetter:function(){var a=this.paths[0],b=this.paths[1],c=[],d=this.now,e=a.length,f;if(d===1)c=this.toD;else if(e=== +b.length&&d<1)for(;e--;)f=parseFloat(a[e]),c[e]=isNaN(f)?a[e]:d*parseFloat(b[e]-f)+f;else c=b;this.elem.attr("d",c)},update:function(){var a=this.elem,b=this.prop,c=this.now,d=this.options.step;if(this[b+"Setter"])this[b+"Setter"]();else a.attr?a.element&&a.attr(b,c):a.style[b]=c+this.unit;d&&d.call(a,c,this)},run:function(a,b,c){var d=this,e=function(a){return e.stopped?!1:d.step(a)},f;this.startTime=+new oa;this.start=a;this.end=b;this.unit=c;this.now=this.start;this.pos=0;e.elem=this.elem;if(e()&& +Fa.push(e)===1)e.timerId=setInterval(function(){for(f=0;f=f+this.startTime){this.now=this.end;this.pos=1;this.update();a=g[this.prop]=!0;for(h in g)g[h]!==!0&&(a=!1);a&&e&&e.call(c);c=!1}else this.pos=d.easing((b-this.startTime)/f),this.now=this.start+(this.end-this.start)* +this.pos,this.update(),c=!0;return c},initPath:function(a,b,c){var b=b||"",d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g,b=b.split(" "),c=[].concat(c),h,i,k=function(a){for(g=a.length;g--;)a[g]==="M"&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(k(b),k(c));a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6));if(d<=c.length/f&&b.length===c.length)for(;d--;)c=[].concat(c).splice(0,f).concat(c);a.shift=0;if(b.length)for(a=c.length;b.length3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+P(a-c).toFixed(f).slice(2):"")};Math.easeInOutSine=function(a){return-0.5* +(Math.cos(Math.PI*a)-1)};Ga=function(a,b){var c=C.getComputedStyle(a,void 0);return c&&F(c.getPropertyValue(b))};qa=function(a,b){return b.indexOf?b.indexOf(a):[].indexOf.call(b,a)};Oa=function(a,b){return[].filter.call(a,b)};Ha=function(a,b){for(var c=[],d=0,e=a.length;d-1&&(f.splice(h,1),g[b]=f),d(b,c)):(e(),g[b]=[])):(e(),a.hcEvents={})};H=function(a,b,c,d){var e;e=a.hcEvents;var f,g,h,i,c=c||{};if(z.createEvent&&(a.dispatchEvent||a.fireEvent))e=z.createEvent("Events"),e.initEvent(b,!0,!0),e.target=a,v(e,c),a.dispatchEvent? +a.dispatchEvent(e):a.fireEvent(b,e);else if(e){e=e[b]||[];f=e.length;h=function(){c.defaultPrevented=!0};for(g=0;g{point.key}
',pointFormat:'\u25cf {series.name}: {point.y}
',shadow:!0,snap:Mb?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090", +fontSize:"9px"}}};var ba=O.plotOptions,ea=ba.line;Fb();ia.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(a){return[F(a[1]),F(a[2]),F(a[3]),parseFloat(a[4],10)]}},{regex:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(a){return[F(a[1],16),F(a[2],16),F(a[3],16),1]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[F(a[1]),F(a[2]),F(a[3]),1]}}], +init:function(a){var b,c,d,e;if((this.input=a)&&a.stops)this.stops=Ha(a.stops,function(a){return new ia(a[1])});else for(d=this.parsers.length;d--&&!c;)e=this.parsers[d],(b=e.regex.exec(a))&&(c=e.parse(b));this.rgba=c||[]},get:function(a){var b=this.input,c=this.rgba,d;this.stops?(d=D(b),d.stops=[].concat(d.stops),o(this.stops,function(b,c){d.stops[c]=[d.stops[c][0],b.get(a)]})):d=c&&!isNaN(c[0])?a==="rgb"||!a&&c[3]===1?"rgb("+c[0]+","+c[1]+","+c[2]+")":a==="a"?c[3]:"rgba("+c.join(",")+")":b;return d}, +brighten:function(a){var b,c=this.rgba;if(this.stops)o(this.stops,function(b){b.brighten(a)});else if(ka(a)&&a!==0)for(b=0;b<3;b++)c[b]+=F(a*255),c[b]<0&&(c[b]=0),c[b]>255&&(c[b]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this}};Q.prototype={opacity:1,textProps:"direction,fontSize,fontWeight,fontFamily,fontStyle,color,lineHeight,width,textDecoration,textOverflow,textShadow".split(","),init:function(a,b){this.element=b==="span"?$(b):z.createElementNS(Ea,b);this.renderer=a},animate:function(a, +b,c){b=p(b,this.renderer.globalAnimation,!0);Pa(this);if(b){b=D(b,{});if(c)b.complete=c;Xa(this,a,b)}else this.attr(a,null,c);return this},colorGradient:function(a,b,c){var d=this.renderer,e,f,g,h,i,k,j,m,l,n,t,r=[],p;a.linearGradient?f="linearGradient":a.radialGradient&&(f="radialGradient");if(f){g=a[f];i=d.gradients;j=a.stops;n=c.radialReference;Ja(g)&&(a[f]=g={x1:g[0],y1:g[1],x2:g[2],y2:g[3],gradientUnits:"userSpaceOnUse"});f==="radialGradient"&&n&&!q(g.gradientUnits)&&(h=g,g=D(g,d.getRadialAttr(n, +h),{gradientUnits:"userSpaceOnUse"}));for(t in g)t!=="id"&&r.push(t,g[t]);for(t in j)r.push(j[t]);r=r.join(",");i[r]?n=i[r].attr("id"):(g.id=n="highcharts-"+Ab++,i[r]=k=d.createElement(f).attr(g).add(d.defs),k.radAttr=h,k.stops=[],o(j,function(a){a[1].indexOf("rgba")===0?(e=ia(a[1]),m=e.get("rgb"),l=e.get("a")):(m=a[1],l=1);a=d.createElement("stop").attr({offset:a[0],"stop-color":m,"stop-opacity":l}).add(k);k.stops.push(a)}));p="url("+d.url+"#"+n+")";c.setAttribute(b,p);c.gradient=r;a.toString=function(){return p}}}, +applyTextShadow:function(a){var b=this.element,c,d=a.indexOf("contrast")!==-1,e={},f=this.renderer.forExport,g=f||b.style.textShadow!==B&&!za;if(d)e.textShadow=a=a.replace(/contrast/g,this.renderer.getContrast(b.style.fill));if(nb||f)e.textRendering="geometricPrecision";g?this.css(e):(this.fakeTS=!0,this.ySetter=this.xSetter,c=[].slice.call(b.getElementsByTagName("tspan")),o(a.split(/\s?,\s?/g),function(a){var d=b.firstChild,e,f,a=a.split(" ");e=a[a.length-1];(f=a[a.length-2])&&o(c,function(a,c){var g; +c===0&&(a.setAttribute("x",b.getAttribute("x")),c=b.getAttribute("y"),a.setAttribute("y",c||0),c===null&&b.setAttribute("y",0));g=a.cloneNode(1);L(g,{"class":"highcharts-text-shadow",fill:e,stroke:e,"stroke-opacity":1/s(F(f),3),"stroke-width":f,"stroke-linejoin":"round"});b.insertBefore(g,d)})}))},attr:function(a,b,c){var d,e=this.element,f,g=this,h;typeof a==="string"&&b!==B&&(d=a,a={},a[d]=b);if(typeof a==="string")g=(this[a+"Getter"]||this._defaultGetter).call(this,a,e);else{for(d in a){b=a[d]; +h=!1;this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(d)&&(f||(this.symbolAttr(a),f=!0),h=!0);if(this.rotation&&(d==="x"||d==="y"))this.doTransform=!0;h||(this[d+"Setter"]||this._defaultSetter).call(this,b,d,e);this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(d)&&this.updateShadows(d,b)}if(this.doTransform)this.updateTransform(),this.doTransform=!1}c&&c();return g},updateShadows:function(a,b){for(var c=this.shadows,d=c.length;d--;)c[d].setAttribute(a, +a==="height"?Math.max(b-(c[d].cutHeight||0),0):a==="d"?this.d:b)},addClass:function(a){var b=this.element,c=L(b,"class")||"";c.indexOf(a)===-1&&L(b,"class",c+" "+a);return this},symbolAttr:function(a){var b=this;o("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(c){b[c]=p(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a){var b, +c={},d,e=a.strokeWidth||this.strokeWidth||0;d=A(e)%2/2;a.x=S(a.x||this.x||0)+d;a.y=S(a.y||this.y||0)+d;a.width=S((a.width||this.width||0)-2*d);a.height=S((a.height||this.height||0)-2*d);a.strokeWidth=e;for(b in a)this[b]!==a[b]&&(this[b]=c[b]=a[b]);return c},css:function(a){var b=this.styles,c={},d=this.element,e,f,g="";e=!b;if(a&&a.color)a.fill=a.color;if(b)for(f in a)a[f]!==b[f]&&(c[f]=a[f],e=!0);if(e){e=this.textWidth=a&&a.width&&d.nodeName.toLowerCase()==="text"&&F(a.width)||this.textWidth;b&& +(a=v(b,c));this.styles=a;e&&(ha||!da&&this.renderer.forExport)&&delete a.width;if(za&&!da)M(this.element,a);else{b=function(a,b){return"-"+b.toLowerCase()};for(f in a)g+=f.replace(/([A-Z])/g,b)+":"+a[f]+";";L(d,"style",g)}e&&this.added&&this.renderer.buildText(this)}return this},on:function(a,b){var c=this,d=c.element;db&&a==="click"?(d.ontouchstart=function(a){c.touchEventFired=oa.now();a.preventDefault();b.call(d,a)},d.onclick=function(a){(Aa.indexOf("Android")===-1||oa.now()-(c.touchEventFired|| +0)>1100)&&b.call(d,a)}):d["on"+a]=b;return this},setRadialReference:function(a){var b=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;b&&b.radAttr&&b.animate(this.renderer.getRadialAttr(a,b.radAttr));return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=!0;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.scaleX,d=this.scaleY,e=this.inverted, +f=this.rotation,g=this.element;e&&(a+=this.attr("width"),b+=this.attr("height"));a=["translate("+a+","+b+")"];e?a.push("rotate(90) scale(-1,1)"):f&&a.push("rotate("+f+" "+(g.getAttribute("x")||0)+" "+(g.getAttribute("y")||0)+")");(q(c)||q(d))&&a.push("scale("+p(c,1)+" "+p(d,1)+")");a.length&&g.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){var d,e,f,g,h={};e=this.renderer;f=e.alignedObjects;if(a){if(this.alignOptions= +a,this.alignByTranslate=b,!c||ya(c))this.alignTo=d=c||"renderer",ma(f,this),f.push(this),c=null}else a=this.alignOptions,b=this.alignByTranslate,d=this.alignTo;c=p(c,e[d],e);d=a.align;e=a.verticalAlign;f=(c.x||0)+(a.x||0);g=(c.y||0)+(a.y||0);if(d==="right"||d==="center")f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=A(f);if(e==="bottom"||e==="middle")g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=A(g);this[this.placed?"animate":"attr"](h);this.placed= +!0;this.alignAttr=h;return this},getBBox:function(a,b){var c,d=this.renderer,e,f,g,h=this.element,i=this.styles;e=this.textStr;var k,j=h.style,m,l=d.cache,n=d.cacheKeys,t;f=p(b,this.rotation);g=f*ga;e!==B&&(t=["",f||0,i&&i.fontSize,h.style.width].join(","),t=e===""||Rb.test(e)?"num:"+e.toString().length+t:e+t);t&&!a&&(c=l[t]);if(!c){if(h.namespaceURI===Ea||d.forExport){try{m=this.fakeTS&&function(a){o(h.querySelectorAll(".highcharts-text-shadow"),function(b){b.style.display=a})},Na&&j.textShadow? +(k=j.textShadow,j.textShadow=""):m&&m("none"),c=h.getBBox?v({},h.getBBox()):{width:h.offsetWidth,height:h.offsetHeight},k?j.textShadow=k:m&&m("")}catch(r){}if(!c||c.width<0)c={width:0,height:0}}else c=this.htmlGetBBox();if(d.isSVG){d=c.width;e=c.height;if(za&&i&&i.fontSize==="11px"&&e.toPrecision(3)==="16.9")c.height=e=14;if(f)c.width=P(e*aa(g))+P(d*T(g)),c.height=P(e*T(g))+P(d*aa(g))}if(t){for(;n.length>250;)delete l[n.shift()];l[t]||n.push(t);l[t]=c}}return c},show:function(a){return this.attr({visibility:a? +"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.attr({y:-9999})}})},add:function(a){var b=this.renderer,c=this.element,d;if(a)this.parentGroup=a;this.parentInverted=a&&a.inverted;this.textStr!==void 0&&b.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)d=this.zIndexSetter();d||(a?a.element:b.box).appendChild(c);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b= +a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},c=a.shadows,d=a.renderer.isSVG&&b.nodeName==="SPAN"&&a.parentGroup,e,f;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;Pa(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(f=0;f]*>/g,"")))},textSetter:function(a){if(a!==this.textStr)delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this)},fillSetter:function(a,b,c){typeof a==="string"?c.setAttribute(b,a):a&&this.colorGradient(a,b,c)},visibilitySetter:function(a,b,c){a=== +"inherit"?c.removeAttribute(b):c.setAttribute(b,a)},zIndexSetter:function(a,b){var c=this.renderer,d=this.parentGroup,c=(d||c).element||c.box,e,f,g=this.element,h;e=this.added;var i;q(a)&&(g.setAttribute(b,a),a=+a,this[b]===a&&(e=!1),this[b]=a);if(e){if((a=this.zIndex)&&d)d.handleZ=!0;d=c.childNodes;for(i=0;ia||!q(a)&&q(f)))c.insertBefore(g,e),h=!0;h||c.appendChild(g)}return h},_defaultSetter:function(a,b,c){c.setAttribute(b,a)}};Q.prototype.yGetter= +Q.prototype.xGetter;Q.prototype.translateXSetter=Q.prototype.translateYSetter=Q.prototype.rotationSetter=Q.prototype.verticalAlignSetter=Q.prototype.scaleXSetter=Q.prototype.scaleYSetter=function(a,b){this[b]=a;this.doTransform=!0};Q.prototype["stroke-widthSetter"]=Q.prototype.strokeSetter=function(a,b,c){this[b]=a;if(this.stroke&&this["stroke-width"])this.strokeWidth=this["stroke-width"],Q.prototype.fillSetter.call(this,this.stroke,"stroke",c),c.setAttribute("stroke-width",this["stroke-width"]), +this.hasStroke=!0;else if(b==="stroke-width"&&a===0&&this.hasStroke)c.removeAttribute("stroke"),this.hasStroke=!1};var Ba=function(){this.init.apply(this,arguments)};Ba.prototype={Element:Q,init:function(a,b,c,d,e,f){var g,d=this.createElement("svg").attr({version:"1.1"}).css(this.getStyle(d));g=d.element;a.appendChild(g);a.innerHTML.indexOf("xmlns")===-1&&L(g,"xmlns",Ea);this.isSVG=!0;this.box=g;this.boxWrapper=d;this.alignedObjects=[];this.url=(Na||nb)&&z.getElementsByTagName("base").length?C.location.href.replace(/#.*?$/, +"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(z.createTextNode("Created with Highcharts 4.2.1"));this.defs=this.createElement("defs").add();this.allowHTML=f;this.forExport=e;this.gradients={};this.cache={};this.cacheKeys=[];this.setSize(b,c,!1);var h;if(Na&&a.getBoundingClientRect)this.subPixelFix=b=function(){M(a,{left:0,top:0});h=a.getBoundingClientRect();M(a,{left:ua(h.left)-h.left+"px",top:ua(h.top)-h.top+"px"})},b(),N(C,"resize", +b)},getStyle:function(a){return this.style=v({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();Ta(this.gradients||{});this.gradients=null;if(a)this.defs=a.destroy();this.subPixelFix&&U(C,"resize",this.subPixelFix);return this.alignedObjects=null},createElement:function(a){var b=new this.Element; +b.init(this,a);return b},draw:function(){},getRadialAttr:function(a,b){return{cx:a[0]-a[2]/2+b.cx*a[2],cy:a[1]-a[2]/2+b.cy*a[2],r:b.r*a[2]}},buildText:function(a){for(var b=a.element,c=this,d=c.forExport,e=p(a.textStr,"").toString(),f=e.indexOf("<")!==-1,g=b.childNodes,h,i,k=L(b,"x"),j=a.styles,m=a.textWidth,l=j&&j.lineHeight,n=j&&j.textShadow,t=j&&j.textOverflow==="ellipsis",r=g.length,X=m&&!a.added&&this.box,y=function(a){return l?F(l):c.fontMetrics(/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize: +j&&j.fontSize||c.style.fontSize||12,a).h},x=function(a){return a.replace(/</g,"<").replace(/>/g,">")};r--;)b.removeChild(g[r]);!f&&!n&&!t&&e.indexOf(" ")===-1?b.appendChild(z.createTextNode(x(e))):(h=/<.*style="([^"]+)".*>/,i=/<.*href="(http[^"]+)".*>/,X&&X.appendChild(b),e=f?e.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g):[e],e[e.length-1]=== +""&&e.pop(),o(e,function(e,f){var g,l=0,e=e.replace(//g,"|||");g=e.split("|||");o(g,function(e){if(e!==""||g.length===1){var n={},r=z.createElementNS(Ea,"tspan"),p;h.test(e)&&(p=e.match(h)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),L(r,"style",p));i.test(e)&&!d&&(L(r,"onclick",'location.href="'+e.match(i)[1]+'"'),M(r,{cursor:"pointer"}));e=x(e.replace(/<(.|\n)*?>/g,"")||" ");if(e!==" "){r.appendChild(z.createTextNode(e));if(l)n.dx=0;else if(f&&k!==null)n.x= +k;L(r,n);b.appendChild(r);!l&&f&&(!da&&d&&M(r,{display:"block"}),L(r,"dy",y(r)));if(m){for(var n=e.replace(/([^\^])-/g,"$1- ").split(" "),X=g.length>1||f||n.length>1&&j.whiteSpace!=="nowrap",o,w,q,s=[],v=y(r),B=1,A=a.rotation,u=e,D=u.length;(X||t)&&(n.length||s.length);)a.rotation=0,o=a.getBBox(!0),q=o.width,!da&&c.forExport&&(q=c.measureSpanWidth(r.firstChild.data,a.styles)),o=q>m,w===void 0&&(w=o),t&&w?(D/=2,u===""||!o&&D<0.5?n=[]:(o&&(w=!0),u=e.substring(0,u.length+(o?-1:1)*ua(D)),n=[u+(m>3?"\u2026": +"")],r.removeChild(r.firstChild))):!o||n.length===1?(n=s,s=[],n.length&&(B++,r=z.createElementNS(Ea,"tspan"),L(r,{dy:v,x:k}),p&&L(r,"style",p),b.appendChild(r)),q>m&&(m=q)):(r.removeChild(r.firstChild),s.unshift(n.pop())),n.length&&r.appendChild(z.createTextNode(n.join(" ").replace(/- /g,"-")));w&&a.attr("title",a.textStr);a.rotation=A}l++}}})}),X&&X.removeChild(b),n&&a.applyTextShadow&&a.applyTextShadow(n))},getContrast:function(a){a=ia(a).rgba;return a[0]+a[1]+a[2]>384?"#000000":"#FFFFFF"},button:function(a, +b,c,d,e,f,g,h,i){var k=this.label(a,b,c,i,null,null,null,null,"button"),j=0,m,l,n,t,r,p,a={x1:0,y1:0,x2:0,y2:1},e=D({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:a,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},e);n=e.style;delete e.style;f=D(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#FFF"],[1,"#ACF"]]}},f);t=f.style;delete f.style;g=D(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#9BD"],[1,"#CDF"]]}},g);r=g.style;delete g.style;h=D(e,{style:{color:"#CCC"}}, +h);p=h.style;delete h.style;N(k.element,za?"mouseover":"mouseenter",function(){j!==3&&k.attr(f).css(t)});N(k.element,za?"mouseout":"mouseleave",function(){j!==3&&(m=[e,f,g][j],l=[n,t,r][j],k.attr(m).css(l))});k.setState=function(a){(k.state=j=a)?a===2?k.attr(g).css(r):a===3&&k.attr(h).css(p):k.attr(e).css(n)};return k.on("click",function(a){j!==3&&d.call(k,a)}).attr(e).css(v({cursor:"default"},n))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=A(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=A(a[2])+b%2/ +2);return a},path:function(a){var b={fill:"none"};Ja(a)?b.d=a:Z(a)&&v(b,a);return this.createElement("path").attr(b)},circle:function(a,b,c){a=Z(a)?a:{x:a,y:b,r:c};b=this.createElement("circle");b.xSetter=function(a){this.element.setAttribute("cx",a)};b.ySetter=function(a){this.element.setAttribute("cy",a)};return b.attr(a)},arc:function(a,b,c,d,e,f){if(Z(a))b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x;a=this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0});a.r=c;return a},rect:function(a, +b,c,d,e,f){var e=Z(a)?a.r:e,g=this.createElement("rect"),a=Z(a)?a:a===B?{}:{x:a,y:b,width:s(c,0),height:s(d,0)};if(f!==B)a.strokeWidth=f,a=g.crisp(a);if(e)a.r=e;g.rSetter=function(a){L(this.element,{rx:a,ry:a})};return g.attr(a)},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[p(c,!0)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return q(a)?b.attr({"class":"highcharts-"+a}):b},image:function(a, +b,c,d,e){var f={preserveAspectRatio:"none"};arguments.length>1&&v(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(A(b),A(c),d,e,f),i=/^url\((.*?)\)$/,k,j;if(h)g=this.path(h),v(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&v(g,f);else if(i.test(a))j=function(a,b){a.element&&(a.attr({width:b[0], +height:b[1]}),a.alignByTranslate||a.translate(A((d-b[0])/2),A((e-b[1])/2)))},k=a.match(i)[1],a=Nb[k]||f&&f.width&&f.height&&[f.width,f.height],g=this.image(k).attr({x:b,y:c}),g.isImg=!0,a?j(g,a):(g.attr({width:0,height:0}),$("img",{onload:function(){this.width===0&&(M(this,{position:"absolute",top:"-999em"}),z.body.appendChild(this));j(g,Nb[k]=[this.width,this.height]);this.parentNode&&this.parentNode.removeChild(this)},src:k}));return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return["M", +a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,c=e.r||c||d,g=e.end-0.001,d=e.innerR,h=e.open,i=T(f),k=aa(f),j=T(g),g=aa(g),e=e.end-fc&&e>b+g&&eb+g&&e +d&&h>a+g&&ha+g&&hl&&/[ \-]/.test(b.textContent||b.innerText))M(b,{width:l+"px",display:"block",whiteSpace:k&&k.whiteSpace||"normal"}),i=l;this.getSpanCorrection(i,m,h,j,g)}M(b,{left:e+(this.xCorr||0)+"px",top:f+(this.yCorr||0)+"px"});if(nb)m=b.offsetHeight;this.cTT= +n}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,c){var d={},e=za?"-ms-transform":nb?"-webkit-transform":Na?"MozTransform":Lb?"-o-transform":"";d[e]=d.transform="rotate("+a+"deg)";d[e+(Na?"Origin":"-origin")]=d.transformOrigin=b*100+"% "+c+"px";M(this.element,d)},getSpanCorrection:function(a,b,c){this.xCorr=-a*c;this.yCorr=-b}});v(Ba.prototype,{html:function(a,b,c){var d=this.createElement("span"),e=d.element,f=d.renderer;d.textSetter=function(a){a!==e.innerHTML&&delete this.bBox;e.innerHTML= +this.textStr=a;d.htmlUpdateTransform()};d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,b){b==="align"&&(b="textAlign");d[b]=a;d.htmlUpdateTransform()};d.attr({text:a,x:A(b),y:A(c)}).css({position:"absolute",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});e.style.whiteSpace="nowrap";d.css=d.htmlCss;if(f.isSVG)d.add=function(a){var b,c=f.box.parentNode,k=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)k.push(a),a=a.parentGroup;o(k.reverse(),function(a){var d,e=L(a.element, +"class");e&&(e={className:e});b=a.div=a.div||$(Ma,e,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px"},b||c);d=b.style;v(a,{translateXSetter:function(b,c){d.left=b+"px";a[c]=b;a.doTransform=!0},translateYSetter:function(b,c){d.top=b+"px";a[c]=b;a.doTransform=!0}});o(["opacity","visibility"],function(b){fb(a,b+"Setter",function(a,b,c,e){a.call(this,b,c,e);d[c]=b})})})}}else b=c;b.appendChild(e);d.added=!0;d.alignOnAdd&&d.htmlUpdateTransform();return d};return d}});var K;if(!da&& +!ha){K={init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ","absolute",";"],e=b===Ma;(b==="shape"||e)&&d.push("left:0;top:0;width:1px;height:1px;");d.push("visibility: ",e?"hidden":"visible");c.push(' style="',d.join(""),'"/>');if(b)c=e||b==="span"||b==="img"?c.join(""):a.prepVML(c),this.element=$(c);this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box,e=a&&a.inverted,d=a?a.element||a:d;if(a)this.parentGroup=a;e&&b.invertChild(c,d);d.appendChild(c);this.added= +!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();if(this.onAdd)this.onAdd();return this},updateTransform:Q.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=T(a*ga),c=aa(a*ga);M(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11=",b,", M12=",-c,", M21=",c,", M22=",b,", sizingMethod='auto expand')"].join(""):"none"})},getSpanCorrection:function(a,b,c,d,e){var f=d?T(d*ga):1,g=d?aa(d*ga):0,h=p(this.elemHeight,this.element.offsetHeight), +i;this.xCorr=f<0&&-a;this.yCorr=g<0&&-h;i=f*g<0;this.xCorr+=g*b*(i?1-c:c);this.yCorr-=f*b*(d?i?c:1-c:1);e&&e!=="left"&&(this.xCorr-=a*c*(f<0?-1:1),d&&(this.yCorr-=h*c*(g<0?-1:1)),M(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)if(ka(a[b]))c[b]=A(a[b]*10)-5;else if(a[b]==="Z")c[b]="x";else if(c[b]=a[b],a.isArc&&(a[b]==="wa"||a[b]==="at"))c[b+5]===c[b+7]&&(c[b+7]+=a[b+7]>a[b+5]?1:-1),c[b+6]===c[b+8]&&(c[b+8]+=a[b+8]>a[b+6]?1:-1);return c.join(" ")||"x"},clip:function(a){var b= +this,c;a?(c=a.members,ma(c,b),c.push(b),b.destroyClip=function(){ma(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:mb?"inherit":"rect(auto)"});return b.css(a)},css:Q.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Ua(a)},destroy:function(){this.destroyClip&&this.destroyClip();return Q.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=C.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c,a=a.split(/[ ,]/);c=a.length; +if(c===9||c===11)a[c-4]=a[c-2]=F(a[c-2])-10*b;return a.join(" ")},shadow:function(a,b,c){var d=[],e,f=this.element,g=this.renderer,h,i=f.style,k,j=f.path,m,l,n,t;j&&typeof j.value!=="string"&&(j="x");l=j;if(a){n=p(a.width,3);t=(a.opacity||0.15)/n;for(e=1;e<=3;e++){m=n*2+1-2*e;c&&(l=this.cutOffPath(j.value,m+0.5));k=[''];h=$(g.prepVML(k),null,{left:F(i.left)+p(a.offsetX,1),top:F(i.top)+ +p(a.offsetY,1)});if(c)h.cutOff=m+1;k=[''];$(g.prepVML(k),null,null,h);b?b.element.appendChild(h):f.parentNode.insertBefore(h,f);d.push(h)}this.shadows=d}return this},updateShadows:va,setAttr:function(a,b){mb?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){this.element.className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||$(this.renderer.prepVML([""]),null,null,c))[b]=a||"solid"; +this[b]=a},dSetter:function(a,b,c){var d=this.shadows,a=a||[];this.d=a.join&&a.join(" ");c.path=a=this.pathToVML(a);if(d)for(c=d.length;c--;)d[c].path=d[c].cutOff?this.cutOffPath(a,d[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var d=c.nodeName;if(d==="SPAN")c.style.color=a;else if(d!=="IMG")c.filled=a!=="none",this.setAttr("fillcolor",this.renderer.color(a,c,b,this))},"fill-opacitySetter":function(a,b,c){$(this.renderer.prepVML(["<",b.split("-")[0],' opacity="',a,'"/>']),null,null, +c)},opacitySetter:va,rotationSetter:function(a,b,c){c=c.style;this[b]=c[b]=a;c.left=-A(aa(a*ga)+1)+"px";c.top=A(T(a*ga))+"px"},strokeSetter:function(a,b,c){this.setAttr("strokecolor",this.renderer.color(a,c,b,this))},"stroke-widthSetter":function(a,b,c){c.stroked=!!a;this[b]=a;ka(a)&&(a+="px");this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){a==="inherit"&&(a="visible");this.shadows&&o(this.shadows,function(c){c.style[b]=a});c.nodeName=== +"DIV"&&(a=a==="hidden"?"-999em":0,mb||(c.style[b]=a?"visible":"hidden"),b="top");c.style[b]=a},xSetter:function(a,b,c){this[b]=a;b==="x"?b="left":b==="y"&&(b="top");this.updateClipping?(this[b]=a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,b,c){c.style[b]=a}};K["stroke-opacitySetter"]=K["fill-opacitySetter"];u.VMLElement=K=na(Q,K);K.prototype.ySetter=K.prototype.widthSetter=K.prototype.heightSetter=K.prototype.xSetter;var Cb={Element:K,isIE8:Aa.indexOf("MSIE 8.0")>-1,init:function(a, +b,c,d){var e;this.alignedObjects=[];d=this.createElement(Ma).css(v(this.getStyle(d),{position:"relative"}));e=d.element;a.appendChild(d.element);this.isVML=!0;this.box=e;this.boxWrapper=d;this.gradients={};this.cache={};this.cacheKeys=[];this.setSize(b,c,!1);if(!z.namespaces.hcv){z.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{z.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(f){z.styleSheets[0].cssText+= +"hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var e=this.createElement(),f=Z(a);return v(e,{members:[],count:0,left:(f?a.x:a)+1,top:(f?a.y:b)+1,width:(f?a.width:c)-1,height:(f?a.height:d)-1,getCSS:function(a){var b=a.element,c=b.nodeName,a=a.inverted,d=this.top-(c==="shape"?b.offsetTop:0),e=this.left,b=e+this.width,f=d+this.height,d={clip:"rect("+A(a?e:d)+"px,"+ +A(a?f:b)+"px,"+A(a?b:f)+"px,"+A(a?d:e)+"px)"};!a&&mb&&c==="DIV"&&v(d,{width:b+"px",height:f+"px"});return d},updateClipping:function(){o(e.members,function(a){a.element&&a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var e=this,f,g=/^rgba/,h,i,k="none";a&&a.linearGradient?i="gradient":a&&a.radialGradient&&(i="pattern");if(i){var j,m,l=a.linearGradient||a.radialGradient,n,t,r,p,y,x="",a=a.stops,w,q=[],ca=function(){h=[''];$(e.prepVML(h),null,null,b)};n=a[0];w=a[a.length-1];n[0]>0&&a.unshift([0,n[1]]);w[0]<1&&a.push([1,w[1]]);o(a,function(a,b){g.test(a[1])?(f=ia(a[1]),j=f.get("rgb"),m=f.get("a")):(j=a[1],m=1);q.push(a[0]*100+"% "+j);b?(r=m,p=j):(t=m,y=j)});if(c==="fill")if(i==="gradient")c=l.x1||l[0]||0,a=l.y1||l[1]||0,n=l.x2||l[2]||0,l=l.y2||l[3]||0,x='angle="'+(90-V.atan((l-a)/(n-c))*180/pa)+'"',ca();else{var k=l.r,s=k*2,v=k*2,B=l.cx,A=l.cy,u=b.radialReference,z,k=function(){u&&(z= +d.getBBox(),B+=(u[0]-z.x)/z.width-0.5,A+=(u[1]-z.y)/z.height-0.5,s*=u[2]/z.width,v*=u[2]/z.height);x='src="'+O.global.VMLRadialGradientURL+'" size="'+s+","+v+'" origin="0.5,0.5" position="'+B+","+A+'" color2="'+y+'" ';ca()};d.added?k():d.onAdd=k;k=p}else k=j}else if(g.test(a)&&b.tagName!=="IMG")f=ia(a),d[c+"-opacitySetter"](f.get("a"),c,b),k=f.get("rgb");else{k=b.getElementsByTagName(c);if(k.length)k[0].opacity=1,k[0].type="solid";k=a}return k},prepVML:function(a){var b=this.isIE8,a=a.join("");b? +(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","1&&f.attr({x:b,y:c,width:d,height:e});return f},createElement:function(a){return a==="rect"?this.symbol(a):Ba.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this,d=b.style,e=a.tagName==="IMG"&&a.style;M(a,{flip:"x",left:F(d.width)-(e?F(e.top): +1),top:F(d.height)-(e?F(e.left):1),rotation:-90});o(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=e.innerR,d=T(f),i=aa(f),k=T(g),j=aa(g);if(g-f===0)return["x"];f=["wa",a-h,b-h,a+h,b+h,a+h*d,b+h*i,a+h*k,b+h*j];e.open&&!c&&f.push("e","M",a,b);f.push("at",a-c,b-c,a+c,b+c,a+c*k,b+c*j,a+c*d,b+c*i,"x","e");f.isArc=!0;return f},circle:function(a,b,c,d,e){e&&(c=d=2*e.r);e&&e.isCircle&&(a-=c/2,b-=d/2);return["wa",a,b,a+c,b+d,a+c,b+d/2,a+ +c,b+d/2,"e"]},rect:function(a,b,c,d,e){return Ba.prototype.symbols[!q(e)||!e.r?"square":"callout"].call(0,a,b,c,d,e)}}};u.VMLRenderer=K=function(){this.init.apply(this,arguments)};K.prototype=D(Ba.prototype,Cb);cb=K}Ba.prototype.measureSpanWidth=function(a,b){var c=z.createElement("span"),d;d=z.createTextNode(a);c.appendChild(d);M(c,b);this.box.appendChild(c);d=c.offsetWidth;Ua(c);return d};var Ob;if(ha)u.CanVGRenderer=K=function(){Ea="http://www.w3.org/1999/xhtml"},K.prototype.symbols={},Ob=function(){function a(){var a= +b.length,d;for(d=0;d0&&c+i*k>e&&(l=A((d-c)/T(h*ga)));else if(d=c+(1-i)*k,c-i*ke&&(j=e-a.x+j*i,m=-1),j=E(b.slotWidth,j),jj||b.autoRotation&&g.styles.width)l=j;if(l){n.width= +l;if(!b.options.labels.style.textOverflow)n.textOverflow="ellipsis";g.css(n)}},getPosition:function(a,b,c,d){var e=this.axis,f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+c,null,null,d)+e.transB:e.left+e.offset+(e.opposite?(d&&f.oldChartWidth||f.chartWidth)-e.right-e.left:0),y:a?g-e.bottom+e.offset-(e.opposite?e.height:0):g-e.translate(b+c,null,null,d)-e.transB}},getLabelPosition:function(a,b,c,d,e,f,g,h){var i=this.axis,k=i.transA,j=i.reversed,m=i.staggerLines,l=i.tickRotCorr|| +{x:0,y:0},n=e.y;q(n)||(n=i.side===2?l.y+8:n=T(c.rotation*ga)*(l.y-c.getBBox(!1,0).height/2));a=a+e.x+l.x-(f&&d?f*k*(j?-1:1):0);b=b+n-(f&&!d?f*k*(j?1:-1):0);m&&(c=g/(h||1)%m,i.opposite&&(c=m-c-1),b+=c*(i.labelOffset/m));return{x:a,y:A(b)}},getMarkPath:function(a,b,c,d,e,f){return f.crispLine(["M",a,b,"L",a+(e?0:-c),b+(e?c:0)],d)},render:function(a,b,c){var d=this.axis,e=d.options,f=d.chart.renderer,g=d.horiz,h=this.type,i=this.label,k=this.pos,j=e.labels,m=this.gridLine,l=h?h+"Grid":"grid",n=h?h+"Tick": +"tick",t=e[l+"LineWidth"],r=e[l+"LineColor"],o=e[l+"LineDashStyle"],y=e[n+"Length"],l=p(e[n+"Width"],!h&&d.isXAxis?1:0),x=e[n+"Color"],w=e[n+"Position"],n=this.mark,q=j.step,ca=!0,s=d.tickmarkOffset,v=this.getPosition(g,k,s,b),u=v.x,v=v.y,A=g&&u===d.pos+d.len||!g&&v===d.pos?-1:1,c=p(c,1);this.isActive=!0;if(t){k=d.getPlotLinePath(k+s,t*A,b,!0);if(m===B){m={stroke:r,"stroke-width":t};if(o)m.dashstyle=o;if(!h)m.zIndex=1;if(b)m.opacity=0;this.gridLine=m=t?f.path(k).attr(m).add(d.gridGroup):null}if(!b&& +m&&k)m[this.isNew?"attr":"animate"]({d:k,opacity:c})}if(l&&y)w==="inside"&&(y=-y),d.opposite&&(y=-y),h=this.getMarkPath(u,v,y,l*A,g,f),n?n.animate({d:h,opacity:c}):this.mark=f.path(h).attr({stroke:x,"stroke-width":l,opacity:c}).add(d.axisGroup);if(i&&!isNaN(u))i.xy=v=this.getLabelPosition(u,v,i,g,j,s,a,q),this.isFirst&&!this.isLast&&!p(e.showFirstLabel,1)||this.isLast&&!this.isFirst&&!p(e.showLastLabel,1)?ca=!1:g&&!d.isRadial&&!j.step&&!j.rotation&&!b&&c!==0&&this.handleOverflow(v),q&&a%q&&(ca=!1), +ca&&!isNaN(v.y)?(v.opacity=c,i[this.isNew?"attr":"animate"](v),this.isNew=!1):i.attr("y",-9999)},destroy:function(){Ta(this,this.axis)}};u.PlotLineOrBand=function(a,b){this.axis=a;if(b)this.options=b,this.id=b.id};u.PlotLineOrBand.prototype={render:function(){var a=this,b=a.axis,c=b.horiz,d=a.options,e=d.label,f=a.label,g=d.width,h=d.to,i=d.from,k=q(i)&&q(h),j=d.value,m=d.dashStyle,l=a.svgElem,n=[],t,r=d.color,p=d.zIndex,o=d.events,x={},w=b.chart.renderer;b.isLog&&(i=Ca(i),h=Ca(h),j=Ca(j));if(g){if(n= +b.getPlotLinePath(j,g),x={stroke:r,"stroke-width":g},m)x.dashstyle=m}else if(k){n=b.getPlotBandPath(i,h,d);if(r)x.fill=r;if(d.borderWidth)x.stroke=d.borderColor,x["stroke-width"]=d.borderWidth}else return;if(q(p))x.zIndex=p;if(l)if(n)l.show(),l.animate({d:n});else{if(l.hide(),f)a.label=f=f.destroy()}else if(n&&n.length&&(a.svgElem=l=w.path(n).attr(x).add(),o))for(t in d=function(b){l.on(b,function(c){o[b].apply(a,[c])})},o)d(t);if(e&&q(e.text)&&n&&n.length&&b.width>0&&b.height>0&&!n.flat){e=D({align:c&& +k&&"center",x:c?!k&&4:10,verticalAlign:!c&&k&&"middle",y:c?k?16:10:k?6:-4,rotation:c&&!k&&90},e);if(!f){x={align:e.textAlign||e.align,rotation:e.rotation};if(q(p))x.zIndex=p;a.label=f=w.text(e.text,0,0,e.useHTML).attr(x).css(e.style).add()}b=[n[1],n[4],k?n[6]:n[1]];k=[n[2],n[5],k?n[7]:n[2]];n=Sa(b);c=Sa(k);f.align(e,!1,{x:n,y:c,width:Da(b)-n,height:Da(k)-c});f.show()}else f&&f.hide();return a},destroy:function(){ma(this.axis.plotLinesAndBands,this);delete this.axis;Ta(this)}};var ja=u.Axis=function(){this.init.apply(this, +arguments)};ja.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#D8D8D8",labels:{enabled:!0,style:{color:"#606060",cursor:"default",fontSize:"11px"},x:0,y:15},lineColor:"#C0D0E0",lineWidth:1,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1, +startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return u.numberFormat(this.total,-1)},style:D(ba.line.dataLabels.style,{color:"#000000"})}}, +defaultLeftAxisOptions:{labels:{x:-15,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0,y:null},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0,y:-15},title:{rotation:0}},init:function(a,b){var c=b.isX;this.chart=a;this.horiz=a.inverted?!c:c;this.coll=(this.isXAxis=c)?"xAxis":"yAxis";this.opposite=b.opposite;this.side=b.side||(this.horiz?this.opposite?0:2:this.opposite? +1:3);this.setOptions(b);var d=this.options,e=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter;this.userOptions=b;this.minPixelPadding=0;this.reversed=d.reversed;this.visible=d.visible!==!1;this.zoomEnabled=d.zoomEnabled!==!1;this.categories=d.categories||e==="category";this.names=this.names||[];this.isLog=e==="logarithmic";this.isDatetimeAxis=e==="datetime";this.isLinked=q(d.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands= +{};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0;this.stacks={};this.oldStacks={};this.stacksTouched=0;this.min=this.max=null;this.crosshair=p(d.crosshair,ta(a.options.tooltip.crosshairs)[c?0:1],!1);var f,d=this.options.events;qa(this,a.axes)===-1&&(c&&!this.isColorAxis?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this));this.series=this.series||[];if(a.inverted&&c&&this.reversed===B)this.reversed=!0;this.removePlotLine= +this.removePlotBand=this.removePlotBandOrLine;for(f in d)N(this,f,d[f]);if(this.isLog)this.val2lin=Ca,this.lin2val=la},setOptions:function(a){this.options=D(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],D(O[this.coll],a))},defaultLabelFormatter:function(){var a=this.axis,b=this.value,c=a.categories,d=this.dateTimeLabelFormat,e=O.lang.numericSymbols,f=e&&e.length, +g,h=a.options.labels.format,a=a.isLog?b:a.tickInterval;if(h)g=La(h,this);else if(c)g=b;else if(d)g=Ra(d,b);else if(f&&a>=1E3)for(;f--&&g===B;)c=Math.pow(1E3,f+1),a>=c&&b*10%c===0&&e[f]!==null&&(g=u.numberFormat(b/c,-1)+e[f]);g===B&&(g=P(b)>=1E4?u.numberFormat(b,-1):u.numberFormat(b,-1,B,""));return g},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();o(a.series,function(c){if(c.visible|| +!b.options.chart.ignoreHiddenSeries){var d=c.options,e=d.threshold,f;a.hasVisibleSeries=!0;a.isLog&&e<=0&&(e=null);if(a.isXAxis){if(d=c.xData,d.length)a.dataMin=E(p(a.dataMin,d[0]),Sa(d)),a.dataMax=s(p(a.dataMax,d[0]),Da(d))}else{c.getExtremes();f=c.dataMax;c=c.dataMin;if(q(c)&&q(f))a.dataMin=E(p(a.dataMin,c),c),a.dataMax=s(p(a.dataMax,f),f);if(q(e))a.threshold=e;if(!d.softThreshold||a.isLog)a.softThreshold=!1}}})},translate:function(a,b,c,d,e,f){var g=this.linkedParent||this,h=1,i=0,k=d?g.oldTransA: +g.transA,d=d?g.oldMin:g.min,j=g.minPixelPadding,e=(g.doPostTranslate||g.isLog&&e)&&g.lin2val;if(!k)k=g.transA;if(c)h*=-1,i=g.len;g.reversed&&(h*=-1,i-=h*(g.sector||g.len));b?(a=a*h+i,a-=j,a=a/k+d,e&&(a=g.lin2val(a))):(e&&(a=g.val2lin(a)),f==="between"&&(f=0.5),a=h*(a-d)*k+i+h*j+(ka(f)?k*f*g.pointRange:0));return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a, +b,c,d,e){var f=this.chart,g=this.left,h=this.top,i,k,j=c&&f.oldChartHeight||f.chartHeight,m=c&&f.oldChartWidth||f.chartWidth,l;i=this.transB;var n=function(a,b,c){if(ac)d?a=E(s(b,a),c):l=!0;return a},e=p(e,this.translate(a,null,null,c)),a=c=A(e+i);i=k=A(j-e-i);isNaN(e)?l=!0:this.horiz?(i=h,k=j-this.bottom,a=c=n(a,g,g+this.width)):(a=g,c=m-this.right,i=k=n(i,h,h+this.height));return l&&!d?null:f.renderer.crispLine(["M",a,i,"L",c,k],b||1)},getLinearTickPositions:function(a,b,c){var d,e=fa(S(b/ +a)*a),f=fa(ua(c/a)*a),g=[];if(b===c&&ka(b))return[b];for(b=e;b<=f;){g.push(b);b=fa(b+a);if(b===d)break;d=b}return g},getMinorTickPositions:function(){var a=this.options,b=this.tickPositions,c=this.minorTickInterval,d=[],e,f=this.pointRangePadding||0;e=this.min-f;var f=this.max+f,g=f-e;if(g&&g/c=this.minRange,f,g,h,i,k,j;if(this.isXAxis&&this.minRange===B&&!this.isLog)q(a.min)||q(a.max)?this.minRange=null:(o(this.series,function(a){i=a.xData;for(g=k=a.xIncrement?1:i.length-1;g>0;g--)if(h=i[g]-i[g-1],f===B||h=n?(r=n,k=0):b.dataMax<=n&&(X=n, +i=0)),b.min=p(y,r,b.dataMin),b.max=p(x,X,b.dataMax));if(e)!a&&E(b.min,p(b.dataMin,b.min))<=0&&Y(10,1),b.min=fa(Ca(b.min),15),b.max=fa(Ca(b.max),15);if(b.range&&q(b.max))b.userMin=b.min=y=s(b.min,b.minFromRange()),b.userMax=x=b.max,b.range=null;b.beforePadding&&b.beforePadding();b.adjustForMinRange();if(!l&&!b.axisPointRange&&!b.usePercentage&&!h&&q(b.min)&&q(b.max)&&(c=b.max-b.min))!q(y)&&k&&(b.min-=c*k),!q(x)&&i&&(b.max+=c*i);if(ka(d.floor))b.min=s(b.min,d.floor);if(ka(d.ceiling))b.max=E(b.max,d.ceiling); +if(t&&q(b.dataMin))if(n=n||0,!q(y)&&b.min=n)b.min=n;else if(!q(x)&&b.max>n&&b.dataMax<=n)b.max=n;b.tickInterval=b.min===b.max||b.min===void 0||b.max===void 0?1:h&&!j&&m===b.linkedParent.options.tickPixelInterval?j=b.linkedParent.tickInterval:p(j,this.tickAmount?(b.max-b.min)/s(this.tickAmount-1,1):void 0,l?1:(b.max-b.min)*m/s(b.len,m));g&&!a&&o(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&&b.beforeSetTickPositions(); +if(b.postProcessTickInterval)b.tickInterval=b.postProcessTickInterval(b.tickInterval);if(b.pointRange&&!j)b.tickInterval=s(b.pointRange,b.tickInterval);a=p(d.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);if(!j&&b.tickInterval0.5&&b.tickInterval<5&&b.max>1E3&&b.max<9999)),!!this.tickAmount);if(!this.tickAmount&&this.len)b.tickInterval=b.unsquish();this.setTickPositions()}, +setTickPositions:function(){var a=this.options,b,c=a.tickPositions,d=a.tickPositioner,e=a.startOnTick,f=a.endOnTick,g;this.tickmarkOffset=this.categories&&a.tickmarkPlacement==="between"&&this.tickInterval===1?0.5:0;this.minorTickInterval=a.minorTickInterval==="auto"&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.tickPositions=b=c&&c.slice();if(!b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions, +this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,d&&(d=d.apply(this,[this.min,this.max]))))this.tickPositions=b=d;if(!this.isLinked)this.trimTicks(b,e,f),this.min===this.max&&q(this.min)&&!this.tickAmount&&(g=!0,this.min-=0.5,this.max+=0.5),this.single=g,!c&&!d&&this.adjustTickAmount()},trimTicks:function(a,b,c){var d=a[0],e= +a[a.length-1],f=this.minPointOffset||0;b?this.min=d:this.min-f>d&&a.shift();c?this.max=e:this.max+fc&&(this.tickInterval*=2,this.setTickPositions());if(q(d)){for(a=c=b.length;a--;)(d===3&&a%2===1|| +d<=2&&a>0&&a=e&&(b=e));this.displayBtn=a!==B||b!==B;this.setExtremes(a,b,!1,B,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=this.horiz,e=p(b.width,a.plotWidth-c+(b.offsetRight||0)),f=p(b.height,a.plotHeight),g=p(b.top,a.plotTop),b=p(b.left,a.plotLeft+c),c=/%$/;c.test(f)&&(f=parseFloat(f)/100*a.plotHeight);c.test(g)&&(g=parseFloat(g)/100*a.plotHeight+a.plotTop);this.left=b;this.top=g;this.width=e;this.height=f;this.bottom=a.chartHeight- +f-g;this.right=a.chartWidth-e-b;this.len=s(d?e:f,0);this.pos=d?b:g},getExtremes:function(){var a=this.isLog;return{min:a?fa(la(this.min)):this.min,max:a?fa(la(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?la(this.min):this.min,b=b?la(this.max):this.max;a===null?a=b<0?b:c:c>a?a=c:b15&& +a<165?"right":a>195&&a<345?"left":"center"},unsquish:function(){var a=this.ticks,b=this.options.labels,c=this.horiz,d=this.tickInterval,e=d,f=this.len/(((this.categories?1:0)+this.max-this.min)/d),g,h=b.rotation,i=this.chart.renderer.fontMetrics(b.style.fontSize,a[0]&&a[0].label),k,j=Number.MAX_VALUE,m,l=function(a){a/=f||1;a=a>1?ua(a):1;return a*d};c?(m=!b.staggerLines&&!b.step&&(q(h)?[h]:f=-90&&a<=90)k=l(P(i.h/aa(ga* +a))),b=k+P(a/360),bl)l=a.labelLength}),l>i&&l>h.h?k.rotation=this.labelRotation:this.labelRotation=0;else if(g&&(m={width:i+"px"},!j)){m.textOverflow="clip";for(n=c.length;!f&&n--;)if(t=c[n],i=d[t].label)if(i.styles.textOverflow==="ellipsis"&&i.css({textOverflow:"clip"}),i.getBBox().height>this.len/c.length-(h.h-h.f)||d[t].labelLength>g)i.specCss={textOverflow:"ellipsis"}}if(k.rotation&& +(m={width:(l>a.chartHeight*0.5?a.chartHeight*0.33:a.chartHeight)+"px"},!j))m.textOverflow="ellipsis";this.labelAlign=k.align=e.align||this.autoLabelAlign(this.labelRotation);o(c,function(a){var b=(a=d[a])&&a.label;if(b)b.attr(k),m&&b.css(D(m,b.specCss)),delete b.specCss,a.rotation=k.rotation});this.tickRotCorr=b.rotCorr(h.b,this.labelRotation||0,this.side!==0)},hasData:function(){return this.hasVisibleSeries||q(this.min)&&q(this.max)&&!!this.tickPositions},getOffset:function(){var a=this,b=a.chart, +c=b.renderer,d=a.options,e=a.tickPositions,f=a.ticks,g=a.horiz,h=a.side,i=b.inverted?[1,0,3,2][h]:h,k,j,m=0,l,n=0,t=d.title,r=d.labels,X=0,y=a.opposite,x=b.axisOffset,b=b.clipOffset,w=[-1,1,1,-1][h],v,ca=a.axisParent;k=a.hasData();a.showAxis=j=k||p(d.showEmpty,!0);a.staggerLines=a.horiz&&r.staggerLines;if(!a.axisGroup)a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).add(ca),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).add(ca),a.labelGroup=c.g("axis-labels").attr({zIndex:r.zIndex||7}).addClass("highcharts-"+ +a.coll.toLowerCase()+"-labels").add(ca);if(k||a.isLinked){if(o(e,function(b){f[b]?f[b].addLabel():f[b]=new Wa(a,b)}),a.renderUnsquish(),r.reserveSpace!==!1&&(h===0||h===2||{1:"left",3:"right"}[h]===a.labelAlign||a.labelAlign==="center")&&o(e,function(a){X=s(f[a].getLabelSize(),X)}),a.staggerLines)X*=a.staggerLines,a.labelOffset=X*(a.opposite?-1:1)}else for(v in f)f[v].destroy(),delete f[v];if(t&&t.text&&t.enabled!==!1){if(!a.axisTitle)a.axisTitle=c.text(t.text,0,0,t.useHTML).attr({zIndex:7,rotation:t.rotation|| +0,align:t.textAlign||{low:y?"right":"left",middle:"center",high:y?"left":"right"}[t.align]}).addClass("highcharts-"+this.coll.toLowerCase()+"-title").css(t.style).add(a.axisGroup),a.axisTitle.isNew=!0;if(j)m=a.axisTitle.getBBox()[g?"height":"width"],l=t.offset,n=q(l)?0:p(t.margin,g?5:10);a.axisTitle[j?"show":"hide"](!0)}a.offset=w*p(d.offset,x[h]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};c=h===2?a.tickRotCorr.y:0;g=Math.abs(X)+n+(X&&w*(g?p(r.y,a.tickRotCorr.y+8):r.x)-c);a.axisTitleMargin=p(l,g);x[h]= +s(x[h],a.axisTitleMargin+m+w*a.offset,g);d=d.offset?0:S(d.lineWidth/2)*2;b[i]=s(b[i],d)},getLinePath:function(a){var b=this.chart,c=this.opposite,d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d,d=b.chartHeight-this.bottom-(c?this.height:0)+d;c&&(a*=-1);return b.renderer.crispLine(["M",e?this.left:f,e?d:this.top,"L",e?b.chartWidth-this.right:f,e?d:b.chartHeight-this.bottom],a)},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,e=this.options.title,f=a?b:c,g=this.opposite, +h=this.offset,i=e.x||0,k=e.y||0,j=F(e.style.fontSize||12),d={low:f+(a?0:d),middle:f+d/2,high:f+(a?d:0)}[e.align],b=(a?c+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+(this.side===2?j:0);return{x:a?d+i:b+(g?this.width:0)+h+i,y:a?b+k-(g?this.height:0)+h:d+k}},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,e=a.isLog,f=a.isLinked,g=a.tickPositions,h=a.axisTitle,i=a.ticks,k=a.minorTicks,j=a.alternateBands,m=d.stackLabels,l=d.alternateGridColor,n=a.tickmarkOffset,t=d.lineWidth, +r,p=b.hasRendered&&q(a.oldMin)&&!isNaN(a.oldMin),y=a.showAxis,x=c.globalAnimation,w,s;a.labelEdge.length=0;a.overlap=!1;o([i,k,j],function(a){for(var b in a)a[b].isActive=!1});if(a.hasData()||f){a.minorTickInterval&&!a.categories&&o(a.getMinorTickPositions(),function(b){k[b]||(k[b]=new Wa(a,b,"minor"));p&&k[b].isNew&&k[b].render(null,!0);k[b].render(null,!1,1)});if(g.length&&(o(g,function(b,c){if(!f||b>=a.min&&b<=a.max)i[b]||(i[b]=new Wa(a,b)),p&&i[b].isNew&&i[b].render(c,!0,0.1),i[b].render(c)}), +n&&(a.min===0||a.single)))i[-1]||(i[-1]=new Wa(a,-1,null,!0)),i[-1].render(-1);l&&o(g,function(c,d){s=g[d+1]!==B?g[d+1]+n:a.max-n;if(d%2===0&&c=G.second?0:j*S(i.getMilliseconds()/j));if(k>=G.second)i[Hb](k>=G.minute?0:j*S(i.getSeconds()/j));if(k>=G.minute)i[Ib](k>=G.hour?0:j*S(i[ub]()/j));if(k>=G.hour)i[Jb](k>=G.day?0:j*S(i[vb]()/j));if(k>=G.day)i[xb](k>=G.month?1:j*S(i[$a]()/j));k>=G.month&&(i[yb](k>=G.year?0:j*S(i[ab]()/j)),h=i[bb]());k>=G.year&&(h-=h%j,i[zb](h));if(k===G.week)i[xb](i[$a]()- +i[wb]()+p(d,1));b=1;if(rb||ib)i=i.getTime(),i=new oa(i+Za(i));h=i[bb]();for(var d=i.getTime(),m=i[ab](),l=i[$a](),n=(G.day+(g?Za(i):i.getTimezoneOffset()*6E4))%G.day;d=0.5)a=A(a),g=this.getLinearTickPositions(a,b,c);else if(a>=0.08)for(var f=S(b),h,i,k,j,m,e=a>0.3?[1,2,4]:a>0.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];fb&&(!d||j<=c)&&j!==B&&g.push(j),j>c&&(m=!0),j=k}else if(b=la(b),c=la(c),a=e[d?"minorTickInterval":"tickInterval"],a=p(a==="auto"?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length: +f)||1)),a=tb(a,null,sb(a)),g=Ha(this.getLinearTickPositions(a,b,c),Ca),!d)this._minorAutoInterval=a/5;if(!d)this.tickInterval=a;return g};var Pb=u.Tooltip=function(){this.init.apply(this,arguments)};Pb.prototype={init:function(a,b){var c=b.borderWidth,d=b.style,e=F(d.padding);this.chart=a;this.options=b;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.label=a.renderer.label("",0,0,b.shape||"callout",null,null,b.useHTML,null,"tooltip").attr({padding:e,fill:b.backgroundColor,"stroke-width":c, +r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).add().attr({y:-9999});ha||this.label.shadow(b.shadow);this.shared=b.shared},destroy:function(){if(this.label)this.label=this.label.destroy();clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,b,c,d){var e=this,f=e.now,g=e.options.animation!==!1&&!e.isHidden&&(P(a-f.x)>1||P(b-f.y)>1),h=e.followPointer||e.len>1;v(f,{x:g?(2*f.x+a)/3:a,y:g?(f.y+b)/2:b,anchorX:h?B:g?(2*f.anchorX+c)/3:c,anchorY:h?B:g?(f.anchorY+d)/2:d});e.label.attr(f); +if(g)clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32)},hide:function(a){var b=this;clearTimeout(this.hideTimer);a=p(a,this.options.hideDelay,500);if(!this.isHidden)this.hideTimer=Qa(function(){b.label[a?"fadeOut":"hide"]();b.isHidden=!0},a)},getAnchor:function(a,b){var c,d=this.chart,e=d.inverted,f=d.plotTop,g=d.plotLeft,h=0,i=0,k,j,a=ta(a);c=a[0].tooltipPos;this.followPointer&&b&&(b.chartX===B&&(b=d.pointer.normalize(b)),c=[b.chartX-d.plotLeft,b.chartY- +f]);c||(o(a,function(a){k=a.series.yAxis;j=a.series.xAxis;h+=a.plotX+(!e&&j?j.left-g:0);i+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&k?k.top-f:0)}),h/=a.length,i/=a.length,c=[e?d.plotWidth-i:h,this.shared&&!e&&a.length>1&&b?b.chartY-f:e?d.plotHeight-h:i]);return Ha(c,A)},getPosition:function(a,b,c){var d=this.chart,e=this.distance,f={},g=c.h||0,h,i=["y",d.chartHeight,b,c.plotY+d.plotTop,d.plotTop,d.plotTop+d.plotHeight],k=["x",d.chartWidth,a,c.plotX+d.plotLeft,d.plotLeft,d.plotLeft+d.plotWidth], +j=p(c.ttBelow,d.inverted&&!c.negative||!d.inverted&&c.negative),m=function(a,b,c,d,h,i){var k=cb?d:d+g);else return!1},l=function(a,b,c,d){var g;db-e?g=!1:f[a]=db-c/2?b-c-2:d-c/2;return g},n=function(a){var b=i;i=k;k=b;h=a},t=function(){m.apply(0,i)!==!1?l.apply(0,k)===!1&&!h&&(n(!0),t()):h?f.x=f.y=0:(n(!0),t())};(d.inverted||this.len>1)&&n();t();return f},defaultFormatter:function(a){var b= +this.points||ta(this),c;c=[a.tooltipFooterHeaderFormatter(b[0])];c=c.concat(a.bodyFormatter(b));c.push(a.tooltipFooterHeaderFormatter(b[0],!0));return c.join("")},refresh:function(a,b){var c=this.chart,d=this.label,e=this.options,f,g,h,i={},k,j=[];k=e.formatter||this.defaultFormatter;var i=c.hoverPoints,m,l=this.shared;clearTimeout(this.hideTimer);this.followPointer=ta(a)[0].series.tooltipOptions.followPointer;h=this.getAnchor(a,b);f=h[0];g=h[1];l&&(!a.series||!a.series.noSharedTooltip)?(c.hoverPoints= +a,i&&o(i,function(a){a.setState()}),o(a,function(a){a.setState("hover");j.push(a.getLabelConfig())}),i={x:a[0].category,y:a[0].y},i.points=j,this.len=j.length,a=a[0]):i=a.getLabelConfig();k=k.call(i,this);i=a.series;this.distance=p(i.tooltipOptions.distance,16);k===!1?this.hide():(this.isHidden&&(Pa(d),d.attr("opacity",1).show()),d.attr({text:k}),m=e.borderColor||a.color||i.color||"#606060",d.attr({stroke:m}),this.updatePosition({plotX:f,plotY:g,negative:a.negative,ttBelow:a.ttBelow,h:h[2]||0}),this.isHidden= +!1);H(c,"tooltipRefresh",{text:k,x:f+c.plotLeft,y:g+c.plotTop,borderColor:m})},updatePosition:function(a){var b=this.chart,c=this.label,c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(A(c.x),A(c.y||0),a.plotX+b.plotLeft,a.plotY+b.plotTop)},getXDateFormat:function(a,b,c){var d,b=b.dateTimeLabelFormats,e=c&&c.closestPointRange,f,g={millisecond:15,second:12,minute:9,hour:6,day:3},h,i="millisecond";if(e){h=Ra("%m-%d %H:%M:%S.%L",a.x);for(f in G){if(e===G.week&&+Ra("%w", +a.x)===c.options.startOfWeek&&h.substr(6)==="00:00:00.000"){f="week";break}if(G[f]>e){f=i;break}if(g[f]&&h.substr(g[f])!=="01-01 00:00:00.000".substr(g[f]))break;f!=="week"&&(i=f)}f&&(d=b[f])}else d=b.day;return d||b.year},tooltipFooterHeaderFormatter:function(a,b){var c=b?"footer":"header",d=a.series,e=d.tooltipOptions,f=e.xDateFormat,g=d.xAxis,h=g&&g.options.type==="datetime"&&ka(a.key),c=e[c+"Format"];h&&!f&&(f=this.getXDateFormat(a,e,g));h&&f&&(c=c.replace("{point.key}","{point.key:"+f+"}")); +return La(c,{point:a,series:d})},bodyFormatter:function(a){return Ha(a,function(a){var c=a.series.tooltipOptions;return(c.pointFormatter||a.point.tooltipFormatter).call(a.point,c.pointFormat)})}};var ra;db=z&&z.documentElement.ontouchstart!==B;var Ya=u.Pointer=function(a,b){this.init(a,b)};Ya.prototype={init:function(a,b){var c=b.chart,d=c.events,e=ha?"":c.zoomType,c=a.inverted,f;this.options=b;this.chart=a;this.zoomX=f=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=f&&!c||e&&c;this.zoomVert=e&& +!c||f&&c;this.hasZoom=f||e;this.runChartClick=d&&!!d.click;this.pinchDown=[];this.lastValidTouch={};if(u.Tooltip&&b.tooltip.enabled)a.tooltip=new Pb(a,b.tooltip),this.followTouchMove=p(b.tooltip.followTouchMove,!0);this.setDOMEvents()},normalize:function(a,b){var c,d,a=a||C.event;if(!a.target)a.target=a.srcElement;d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;if(!b)this.chartPosition=b=Bb(this.chart.container);d.pageX===B?(c=s(a.x,a.clientX-b.left),d=a.y):(c=d.pageX-b.left, +d=d.pageY-b.top);return v(a,{chartX:A(c),chartY:A(d)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};o(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},runPointActions:function(a){var b=this.chart,c=b.series,d=b.tooltip,e=d?d.shared:!1,f=b.hoverPoint,g=b.hoverSeries,h,i=Number.MAX_VALUE,k,j,m,l=[],n,t;if(!e&&!g)for(h=0;hh+k&&(d=h+k),ei+j&&(e=i+j),this.hasDragged=Math.sqrt(Math.pow(n-d,2)+Math.pow(t-e,2)),this.hasDragged>10){m=b.isInsidePlot(n-h,t-i);if(b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&m&&!r&& +!l)this.selectionMarker=l=b.renderer.rect(h,i,f?1:k,g?1:j,0).attr({fill:c.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add();l&&f&&(d-=n,l.attr({width:P(d),x:(d>0?0:d)+n}));l&&g&&(d=e-t,l.attr({height:P(d),y:(d>0?0:d)+t}));m&&!l&&c.panning&&b.pan(a,c.panning)}},drop:function(a){var b=this,c=this.chart,d=this.hasPinched;if(this.selectionMarker){var e={xAxis:[],yAxis:[]},f=this.selectionMarker,g=f.attr?f.attr("x"):f.x,h=f.attr?f.attr("y"):f.y,i=f.attr?f.attr("width"):f.width,k=f.attr?f.attr("height"): +f.height,j;if(this.hasDragged||d)o(c.axes,function(c){if(c.zoomEnabled&&q(c.min)&&(d||b[{xAxis:"zoomX",yAxis:"zoomY"}[c.coll]])){var f=c.horiz,n=a.type==="touchend"?c.minPixelPadding:0,t=c.toValue((f?g:h)+n),f=c.toValue((f?g+i:h+k)-n);e[c.coll].push({axis:c,min:E(t,f),max:s(t,f)});j=!0}}),j&&H(c,"selection",e,function(a){c.zoom(v(a,d?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();d&&this.scaleGroups()}if(c)M(c.container,{cursor:c._cursor}),c.cancelClick=this.hasDragged> +10,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[]},onContainerMouseDown:function(a){a=this.normalize(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(a){W[ra]&&W[ra].pointer.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition,a=this.normalize(a,c);c&&!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&this.reset()},onContainerMouseLeave:function(){var a=W[ra];if(a)a.pointer.reset(), +a.pointer.chartPosition=null},onContainerMouseMove:function(a){var b=this.chart;ra=b.index;a=this.normalize(a);a.returnValue=!1;b.mouseIsDown==="mousedown"&&this.drag(a);(this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop))&&!b.openMenu&&this.runPointActions(a)},inClass:function(a,b){for(var c;a;){if(c=L(a,"class")){if(c.indexOf(b)!==-1)return!0;if(c.indexOf("highcharts-container")!==-1)return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries, +a=a.relatedTarget||a.toElement;if(b&&!b.options.stickyTracking&&!this.inClass(a,"highcharts-tooltip")&&!this.inClass(a,"highcharts-series-"+b.index))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop,a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(H(c.series,"click",v(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(v(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-e)&&H(b,"click",a)))},setDOMEvents:function(){var a= +this,b=a.chart.container;b.onmousedown=function(b){a.onContainerMouseDown(b)};b.onmousemove=function(b){a.onContainerMouseMove(b)};b.onclick=function(b){a.onContainerClick(b)};N(b,"mouseleave",a.onContainerMouseLeave);eb===1&&N(z,"mouseup",a.onDocumentMouseUp);if(db)b.ontouchstart=function(b){a.onContainerTouchStart(b)},b.ontouchmove=function(b){a.onContainerTouchMove(b)},eb===1&&N(z,"touchend",a.onDocumentTouchEnd)},destroy:function(){var a;U(this.chart.container,"mouseleave",this.onContainerMouseLeave); +eb||(U(z,"mouseup",this.onDocumentMouseUp),U(z,"touchend",this.onDocumentTouchEnd));clearInterval(this.tooltipTimeout);for(a in this)this[a]=null}};v(u.Pointer.prototype,{pinchTranslate:function(a,b,c,d,e,f){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,a,b,c,d,e,f);(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,a,b,c,d,e,f)},pinchTranslateDirection:function(a,b,c,d,e,f,g,h){var i=this.chart,k=a?"x":"y",j=a?"X":"Y",m="chart"+j,l=a?"width":"height",n=i["plot"+(a? +"Left":"Top")],t,r,p=h||1,o=i.inverted,x=i.bounds[a?"h":"v"],w=b.length===1,q=b[0][m],s=c[0][m],v=!w&&b[1][m],u=!w&&c[1][m],A,c=function(){!w&&P(q-v)>20&&(p=h||P(s-u)/P(q-v));r=(n-s)/p+q;t=i["plot"+(a?"Width":"Height")]/p};c();b=r;bx.max&&(b=x.max-t,A=!0);A?(s-=0.8*(s-g[k][0]),w||(u-=0.8*(u-g[k][1])),c()):g[k]=[s,u];o||(f[k]=r-n,f[l]=t);f=o?1/p:p;e[l]=t;e[k]=b;d[o?a?"scaleY":"scaleX":"scale"+j]=p;d["translate"+j]=f*n+(s-f*q)},pinch:function(a){var b=this,c=b.chart,d=b.pinchDown, +e=a.touches,f=e.length,g=b.lastValidTouch,h=b.hasZoom,i=b.selectionMarker,k={},j=f===1&&(b.inClass(a.target,"highcharts-tracker")&&c.runTrackerClick||b.runChartClick),m={};if(f>1)b.initiated=!0;h&&b.initiated&&!j&&a.preventDefault();Ha(e,function(a){return b.normalize(a)});if(a.type==="touchstart")o(e,function(a,b){d[b]={chartX:a.chartX,chartY:a.chartY}}),g.x=[d[0].chartX,d[1]&&d[1].chartX],g.y=[d[0].chartY,d[1]&&d[1].chartY],o(c.axes,function(a){if(a.zoomEnabled){var b=c.bounds[a.horiz?"h":"v"], +d=a.minPixelPadding,e=a.toPixels(p(a.options.min,a.dataMin)),f=a.toPixels(p(a.options.max,a.dataMax)),g=E(e,f),e=s(e,f);b.min=E(a.pos,g-d);b.max=s(a.pos+a.len,e+d)}}),b.res=!0;else if(d.length){if(!i)b.selectionMarker=i=v({destroy:va,touch:!0},c.plotBox);b.pinchTranslate(d,e,k,i,m,g);b.hasPinched=h;b.scaleGroups(k,m);if(!h&&b.followTouchMove&&f===1)this.runPointActions(b.normalize(a));else if(b.res)b.res=!1,this.reset(!1,0)}},touch:function(a,b){var c=this.chart;ra=c.index;a.touches.length===1?(a= +this.normalize(a),c.isInsidePlot(a.chartX-c.plotLeft,a.chartY-c.plotTop)&&!c.openMenu?(b&&this.runPointActions(a),this.pinch(a)):b&&this.reset()):a.touches.length===2&&this.pinch(a)},onContainerTouchStart:function(a){this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(a){W[ra]&&W[ra].pointer.drop(a)}});if(C.PointerEvent||C.MSPointerEvent){var wa={},Db=!!C.PointerEvent,Sb=function(){var a,b=[];b.item=function(a){return this[a]};for(a in wa)wa.hasOwnProperty(a)&& +b.push({pageX:wa[a].pageX,pageY:wa[a].pageY,target:wa[a].target});return b},Eb=function(a,b,c,d){if((a.pointerType==="touch"||a.pointerType===a.MSPOINTER_TYPE_TOUCH)&&W[ra])d(a),d=W[ra].pointer,d[b]({type:c,target:a.currentTarget,preventDefault:va,touches:Sb()})};v(Ya.prototype,{onContainerPointerDown:function(a){Eb(a,"onContainerTouchStart","touchstart",function(a){wa[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){Eb(a,"onContainerTouchMove", +"touchmove",function(a){wa[a.pointerId]={pageX:a.pageX,pageY:a.pageY};if(!wa[a.pointerId].target)wa[a.pointerId].target=a.currentTarget})},onDocumentPointerUp:function(a){Eb(a,"onDocumentTouchEnd","touchend",function(a){delete wa[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,Db?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,Db?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(z,Db?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}); +fb(Ya.prototype,"init",function(a,b,c){a.call(this,b,c);this.hasZoom&&M(b.container,{"-ms-touch-action":"none","touch-action":"none"})});fb(Ya.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(N)});fb(Ya.prototype,"destroy",function(a){this.batchMSEvents(U);a.call(this)})}var pb=u.Legend=function(a,b){this.init(a,b)};pb.prototype={init:function(a,b){var c=this,d=b.itemStyle,e=b.itemMarginTop||0;this.options=b;if(b.enabled)c.itemStyle=d,c.itemHiddenStyle= +D(d,b.itemHiddenStyle),c.itemMarginTop=e,c.padding=d=p(b.padding,8),c.initialItemX=d,c.initialItemY=d-5,c.maxItemWidth=0,c.chart=a,c.itemHeight=0,c.symbolWidth=p(b.symbolWidth,16),c.pages=[],c.render(),N(c.chart,"endResize",function(){c.positionCheckboxes()})},colorizeItem:function(a,b){var c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,c=b?c.itemStyle.color:g,h=b?a.legendColor||a.color||"#CCC":g,g=a.options&&a.options.marker,i={fill:h},k;d&&d.css({fill:c, +color:c});e&&e.attr({stroke:h});if(f){if(g&&f.isMarker)for(k in i.stroke=h,g=a.convertAttribs(g),g)d=g[k],d!==B&&(i[k]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(b?e:this.legendWidth-e-2*c-4,d);if(f)f.x=e,f.y=d},destroyItem:function(a){var b=a.checkbox;o(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&Ua(a.checkbox)}, +destroy:function(){var a=this.group,b=this.box;if(b)this.box=b.destroy();if(a)this.group=a.destroy()},positionCheckboxes:function(a){var b=this.group.alignAttr,c,d=this.clipHeight||this.legendHeight,e=this.titleHeight;if(b)c=b.translateY,o(this.allItems,function(f){var g=f.checkbox,h;g&&(h=c+e+g.y+(a||0)+3,M(g,{left:b.translateX+f.checkboxOffset+g.x-20+"px",top:h+"px",display:h>c-6&&h(l||b.chartWidth-2*k-r-d.x))this.itemX=r,this.itemY+=t+this.lastLineHeight+ +n,this.lastLineHeight=0;this.maxItemWidth=s(this.maxItemWidth,f);this.lastItemY=t+this.itemY+n;this.lastLineHeight=s(g,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];e?this.itemX+=f:(this.itemY+=t+g+n,this.lastLineHeight=g);this.offsetWidth=l||s((e?this.itemX-r-j:f)+k,this.offsetWidth)},getAllItems:function(){var a=[];o(this.chart.series,function(b){var c=b.options;if(p(c.showInLegend,!q(c.linkedTo)?B:!1,!0))a=a.concat(b.legendItems||(c.legendType==="point"?b.data:b))});return a},adjustMargins:function(a, +b){var c=this.chart,d=this.options,e=d.align.charAt(0)+d.verticalAlign.charAt(0)+d.layout.charAt(0);this.display&&!d.floating&&o([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(f,g){f.test(e)&&!q(a[g])&&(c[ob[g]]=s(c[ob[g]],c.legend[(g+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][g]*d[g%2?"x":"y"]+p(d.margin,12)+b[g]))})},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.group,e,f,g,h,i=a.box,k=a.options,j=a.padding,m=k.borderWidth,l=k.backgroundColor;a.itemX=a.initialItemX; +a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;if(!d)a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup);a.renderTitle();e=a.getAllItems();jb(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});k.reversed&&e.reverse();a.allItems=e;a.display=f=!!e.length;a.lastLineHeight=0;o(e,function(b){a.renderItem(b)});g=(k.width||a.offsetWidth)+j;h=a.lastItemY+a.lastLineHeight+ +a.titleHeight;h=a.handleOverflow(h);h+=j;if(m||l){if(i){if(g>0&&h>0)i[i.isNew?"attr":"animate"](i.crisp({width:g,height:h})),i.isNew=!1}else a.box=i=c.rect(0,0,g,h,k.borderRadius,m||0).attr({stroke:k.borderColor,"stroke-width":m||0,fill:l||"none"}).add(d).shadow(k.shadow),i.isNew=!0;i[f?"show":"hide"]()}a.legendWidth=g;a.legendHeight=h;o(e,function(b){a.positionItem(b)});f&&d.align(v({width:g,height:h},k),!0,"spacingBox");b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this, +c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+(e.verticalAlign==="top"?-f:f)-this.padding,g=e.maxHeight,h,i=this.clipRect,k=e.navigation,j=p(k.animation,!0),m=k.arrowSize||12,l=this.nav,n=this.pages,t=this.padding,r,q=this.allItems,y=function(a){i.attr({height:a});if(b.contentGroup.div)b.contentGroup.div.style.clip="rect("+t+"px,9999px,"+(t+a)+"px,0)"};e.layout==="horizontal"&&(f/=2);g&&(f=E(f,g));n.length=0;if(a>f){this.clipHeight=h=s(f-20-this.titleHeight-t,0);this.currentPage= +p(this.currentPage,1);this.fullHeight=a;o(q,function(a,b){var c=a._legendItemPos[1],d=A(a.legendItem.getBBox().height),e=n.length;if(!e||c-n[e-1]>h&&(r||c)!==n[e-1])n.push(r||c),e++;b===q.length-1&&c+d-n[e-1]>h&&n.push(c);c!==r&&(r=c)});if(!i)i=b.clipRect=d.clipRect(0,t,9999,0),b.contentGroup.clip(i);y(h);if(!l)this.nav=l=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,m,m).on("click",function(){b.scroll(-1,j)}).add(l),this.pager=d.text("",15,10).css(k.style).add(l),this.down= +d.symbol("triangle-down",0,0,m,m).on("click",function(){b.scroll(1,j)}).add(l);b.scroll(0);a=f}else if(l)y(c.chartHeight),l.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0;return a},scroll:function(a,b){var c=this.pages,d=c.length,e=this.currentPage+a,f=this.clipHeight,g=this.options.navigation,h=g.activeColor,g=g.inactiveColor,i=this.pager,k=this.padding;e>d&&(e=d);if(e>0)b!==B&&Va(b,this.chart),this.nav.attr({translateX:k,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}), +this.up.attr({fill:e===1?g:h}).css({cursor:e===1?"default":"pointer"}),i.attr({text:e+"/"+d}),this.down.attr({x:18+this.pager.getBBox().width,fill:e===d?g:h}).css({cursor:e===d?"default":"pointer"}),c=-c[e-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=e,this.positionCheckboxes(c)}};K=u.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.options.symbolHeight||a.fontMetrics.f;b.legendSymbol=this.chart.renderer.rect(0,a.baseline-c+1,a.symbolWidth,c,a.options.symbolRadius|| +0).attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var b=this.options,c=b.marker,d=a.symbolWidth,e=this.chart.renderer,f=this.legendGroup,a=a.baseline-A(a.fontMetrics.b*0.3),g;if(b.lineWidth){g={"stroke-width":b.lineWidth};if(b.dashStyle)g.dashstyle=b.dashStyle;this.legendLine=e.path(["M",0,a,"L",d,a]).attr(g).add(f)}if(c&&c.enabled!==!1)b=c.radius,this.legendSymbol=c=e.symbol(this.symbol,d/2-b,a-b,2*b,2*b,c).add(f),c.isMarker=!0}};(/Trident\/7\.0/.test(Aa)||Na)&&fb(pb.prototype,"positionItem", +function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d();setTimeout(d)});var hb=u.Chart=function(){this.getArgs.apply(this,arguments)};u.chart=function(a,b,c){return new hb(a,b,c)};hb.prototype={callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(ya(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(a,b){var c,d=a.series;a.series=null;c=D(O,a);c.series=a.series=d;this.userOptions=a;d=c.chart;this.margin=this.splashArray("margin",d);this.spacing= +this.splashArray("spacing",d);var e=d.events;this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;var f=this,g;f.index=W.length;W.push(f);eb++;d.reflow!==!1&&N(f,"load",function(){f.initReflow()});if(e)for(g in e)N(f,g,e[g]);f.xAxis=[];f.yAxis=[];f.animation=ha?!1:p(d.animation,!0);f.pointCount=f.colorCounter=f.symbolCounter=0;f.firstRender()},initSeries:function(a){var b=this.options.chart;(b=I[a.type||b.type||b.defaultSeriesType])|| +Y(17,!0);b=new b;b.init(this,a);return b},isInsidePlot:function(a,b,c){var d=c?b:a,a=c?a:b;return d>=0&&d<=this.plotWidth&&a>=0&&a<=this.plotHeight},redraw:function(a){var b=this.axes,c=this.series,d=this.pointer,e=this.legend,f=this.isDirtyLegend,g,h,i=this.hasCartesianSeries,k=this.isDirtyBox,j=c.length,m=j,l=this.renderer,n=l.isHidden(),p=[];Va(a,this);n&&this.cloneRenderTo();for(this.layOutTitles();m--;)if(a=c[m],a.options.stacking&&(g=!0,a.isDirty)){h=!0;break}if(h)for(m=j;m--;)if(a=c[m],a.options.stacking)a.isDirty= +!0;o(c,function(a){a.isDirty&&a.options.legendType==="point"&&(a.updateTotals&&a.updateTotals(),f=!0)});if(f&&e.options.enabled)e.render(),this.isDirtyLegend=!1;g&&this.getStacks();if(i&&!this.isResizing)this.maxTicks=null,o(b,function(a){a.setScale()});this.getMargins();i&&(o(b,function(a){a.isDirty&&(k=!0)}),o(b,function(a){var b=a.min+","+a.max;if(a.extKey!==b)a.extKey=b,p.push(function(){H(a,"afterSetExtremes",v(a.eventArgs,a.getExtremes()));delete a.eventArgs});(k||g)&&a.redraw()}));k&&this.drawChartBox(); +o(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});d&&d.reset(!0);l.draw();H(this,"redraw");n&&this.cloneRenderTo(!0);o(p,function(a){a.call()})},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;d19?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),Ua(b),delete this.renderToClone):(c&&c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),M(b,{position:"absolute",top:"-9999px",display:"block"}),b.style.setProperty&& +b.style.setProperty("display","block","important"),z.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,b=this.options,c=b.chart,d,e;a=this.renderTo;var f="highcharts-"+Ab++;if(!a)this.renderTo=a=c.renderTo;if(ya(a))this.renderTo=a=z.getElementById(a);a||Y(13,!0);d=F(L(a,"data-highcharts-chart"));!isNaN(d)&&W[d]&&W[d].hasRendered&&W[d].destroy();L(a,"data-highcharts-chart",this.index);a.innerHTML="";!c.skipClone&&!a.offsetWidth&&this.cloneRenderTo();this.getChartSize();d=this.chartWidth; +e=this.chartHeight;this.container=a=$(Ma,{className:"highcharts-container"+(c.className?" "+c.className:""),id:f},v({position:"relative",overflow:"hidden",width:d+"px",height:e+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},c.style),this.renderToClone||a);this._cursor=a.style.cursor;this.renderer=new (u[c.renderer]||cb)(a,d,e,c.style,c.forExport,b.exporting&&b.exporting.allowHTML);ha&&this.renderer.create(this,a,d,e);this.renderer.chartIndex=this.index}, +getMargins:function(a){var b=this.spacing,c=this.margin,d=this.titleOffset;this.resetMargins();if(d&&!q(c[0]))this.plotTop=s(this.plotTop,d+this.options.title.margin+b[0]);this.legend.adjustMargins(c,b);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],c=a.margin;a.hasCartesianSeries&&o(a.axes,function(a){a.visible&&a.getOffset()});o(ob, +function(d,e){q(c[e])||(a[d]+=b[e])});a.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,d=b.renderTo,e=c.width||Ga(d,"width"),f=c.height||Ga(d,"height"),c=a?a.target:C;if(!b.hasUserSize&&!b.isPrinting&&e&&f&&(c===C||c===z)){if(e!==b.containerWidth||f!==b.containerHeight)clearTimeout(b.reflowTimeout),b.reflowTimeout=Qa(function(){if(b.container)b.setSize(e,f,!1),b.hasUserSize=null},a?100:0);b.containerWidth=e;b.containerHeight=f}},initReflow:function(){var a=this,b=function(b){a.reflow(b)}; +N(C,"resize",b);N(a,"destroy",function(){U(C,"resize",b)})},setSize:function(a,b,c){var d=this,e,f,g=d.renderer;d.isResizing+=1;Va(c,d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;if(q(a))d.chartWidth=e=s(0,A(a)),d.hasUserSize=!!e;if(q(b))d.chartHeight=f=s(0,A(b));a=g.globalAnimation;(a?Xa:M)(d.container,{width:e+"px",height:f+"px"},a);d.setChartSize(!0);g.setSize(e,f,c);d.maxTicks=null;o(d.axes,function(a){a.isDirty=!0;a.setScale()});o(d.series,function(a){a.isDirty=!0});d.isDirtyLegend= +!0;d.isDirtyBox=!0;d.layOutTitles();d.getMargins();d.redraw(c);d.oldChartHeight=null;H(d,"resize");a=g.globalAnimation;Qa(function(){d&&H(d,"endResize",null,function(){d.isResizing-=1})},a===!1?0:a&&a.duration||500)},setChartSize:function(a){var b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,g=this.spacing,h=this.clipOffset,i,k,j,m;this.plotLeft=i=A(this.plotLeft);this.plotTop=k=A(this.plotTop);this.plotWidth=j=s(0,A(d-i-this.marginRight));this.plotHeight= +m=s(0,A(e-k-this.marginBottom));this.plotSizeX=b?m:j;this.plotSizeY=b?j:m;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:g[3],y:g[0],width:d-g[3]-g[1],height:e-g[0]-g[2]};this.plotBox=c.plotBox={x:i,y:k,width:j,height:m};d=2*S(this.plotBorderWidth/2);b=ua(s(d,h[3])/2);c=ua(s(d,h[0])/2);this.clipBox={x:b,y:c,width:S(this.plotSizeX-s(d,h[1])/2-b),height:s(0,S(this.plotSizeY-s(d,h[2])/2-c))};a||o(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a= +this;o(ob,function(b,c){a[b]=p(a.margin[c],a.spacing[c])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,h=this.plotBGImage,i=a.borderWidth||0,k=a.backgroundColor,j=a.plotBackgroundColor,m=a.plotBackgroundImage,l=a.plotBorderWidth||0,n,p=this.plotLeft,o=this.plotTop,q=this.plotWidth,y=this.plotHeight,x=this.plotBox,s=this.clipRect,v= +this.clipBox;n=i+(a.shadow?8:0);if(i||k)if(e)e.animate(e.crisp({width:c-n,height:d-n}));else{e={fill:k||"none"};if(i)e.stroke=a.borderColor,e["stroke-width"]=i;this.chartBackground=b.rect(n/2,n/2,c-n,d-n,a.borderRadius,i).attr(e).addClass("highcharts-background").add().shadow(a.shadow)}if(j)f?f.animate(x):this.plotBackground=b.rect(p,o,q,y,0).attr({fill:j}).add().shadow(a.plotShadow);if(m)h?h.animate(x):this.plotBGImage=b.image(m,p,o,q,y).add();s?s.animate({width:v.width,height:v.height}):this.clipRect= +b.clipRect(v);if(l)g?g.animate(g.crisp({x:p,y:o,width:q,height:y,strokeWidth:-l})):this.plotBorder=b.rect(p,o,q,y,0,-l).attr({stroke:a.plotBorderColor,"stroke-width":l,fill:"none",zIndex:1}).add();this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;o(["inverted","angular","polar"],function(g){c=I[b.type||b.defaultSeriesType];f=a[g]||b[g]||c&&c.prototype[g];for(e=d&&d.length;!f&&e--;)(c=I[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},linkSeries:function(){var a= +this,b=a.series;o(b,function(a){a.linkedSeries.length=0});o(b,function(b){var d=b.options.linkedTo;if(ya(d)&&(d=d===":previous"?a.series[b.index-1]:a.get(d)))d.linkedSeries.push(b),b.linkedParent=d,b.visible=p(b.options.visible,d.options.visible,b.visible)})},renderSeries:function(){o(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&o(b.items,function(c){var d=v(b.style,c.style),e=F(d.left)+a.plotLeft,f=F(d.top)+a.plotTop+12;delete d.left; +delete d.top;a.renderer.text(c.html,e,f).attr({zIndex:2}).css(d).add()})},render:function(){var a=this.axes,b=this.renderer,c=this.options,d,e,f,g;this.setTitle();this.legend=new pb(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();d=this.plotWidth;e=this.plotHeight-=21;o(a,function(a){a.setScale()});this.getAxisMargins();f=d/this.plotWidth>1.1;g=e/this.plotHeight>1.05;if(f||g)this.maxTicks=null,o(a,function(a){(a.horiz&&f||!a.horiz&&g)&&a.setTickInterval(!0)}), +this.getMargins();this.drawChartBox();this.hasCartesianSeries&&o(a,function(a){a.visible&&a.render()});if(!this.seriesGroup)this.seriesGroup=b.g("series-group").attr({zIndex:3}).add();this.renderSeries();this.renderLabels();this.showCredits(c.credits);this.hasRendered=!0},showCredits:function(a){if(a.enabled&&!this.credits)this.credits=this.renderer.text(a.text,0,0).on("click",function(){if(a.href)C.location.href=a.href}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position)}, +destroy:function(){var a=this,b=a.axes,c=a.series,d=a.container,e,f=d&&d.parentNode;H(a,"destroy");W[a.index]=B;eb--;a.renderTo.removeAttribute("data-highcharts-chart");U(a);for(e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy();o("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())});if(d)d.innerHTML= +"",U(d),f&&Ua(d);for(e in a)delete a[e]},isReadyToRender:function(){var a=this;return!da&&C==C.top&&z.readyState!=="complete"||ha&&!C.canvg?(ha?Ob.push(function(){a.firstRender()},a.options.global.canvasToolsURL):z.attachEvent("onreadystatechange",function(){z.detachEvent("onreadystatechange",a.firstRender);z.readyState==="complete"&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options,c=a.callback;if(a.isReadyToRender()){a.getContainer();H(a,"init");a.resetMargins();a.setChartSize(); +a.propFromSeries();a.getAxes();o(b.series||[],function(b){a.initSeries(b)});a.linkSeries();H(a,"beforeRender");if(u.Pointer)a.pointer=new Ya(a,b);a.render();a.renderer.draw();c&&c.apply(a,[a]);o(a.callbacks,function(b){a.index!==B&&b.apply(a,[a])});H(a,"load");a.cloneRenderTo(!0)}},splashArray:function(a,b){var c=b[a],c=Z(c)?c:[c,c,c,c];return[p(b[a+"Top"],c[0]),p(b[a+"Right"],c[1]),p(b[a+"Bottom"],c[2]),p(b[a+"Left"],c[3])]}};var Cb=u.CenteredSeriesMixin={getCenter:function(){var a=this.options, +b=this.chart,c=2*(a.slicedOffset||0),d=b.plotWidth-2*c,b=b.plotHeight-2*c,e=a.center,e=[p(e[0],"50%"),p(e[1],"50%"),a.size||"100%",a.innerSize||0],f=E(d,b),g,h;for(g=0;g<4;++g)h=e[g],a=g<2||g===2&&/%$/.test(h),e[g]=(/%$/.test(h)?[d,b,f,e[2]][g]*parseFloat(h)/100:parseFloat(h))+(a?c:0);e[3]>e[2]&&(e[3]=e[2]);return e}},Ia=function(){};Ia.prototype={init:function(a,b,c){this.series=a;this.color=a.color;this.applyOptions(b,c);this.pointAttr={};if(a.options.colorByPoint&&(b=a.options.colors||a.chart.options.colors, +this.color=this.color||b[a.colorCounter++],a.colorCounter===b.length))a.colorCounter=0;a.chart.pointCount++;return this},applyOptions:function(a,b){var c=this.series,d=c.options.pointValKey||c.pointValKey,a=Ia.prototype.optionsToObject.call(this,a);v(this,a);this.options=this.options?v(this.options,a):a;if(d)this.y=this[d];if(this.x===B&&c)this.x=b===B?c.autoIncrement():b;return this},optionsToObject:function(a){var b={},c=this.series,d=c.options.keys,e=d||c.pointArrayMap||["y"],f=e.length,g=0,h= +0;if(typeof a==="number"||a===null)b[e[0]]=a;else if(Ja(a)){if(!d&&a.length>f){c=typeof a[0];if(c==="string")b.name=a[0];else if(c==="number")b.x=a[0];g++}for(;ha+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions||{},e=c[this.type];this.userOptions=a;c=D(e,c.series,a);this.tooltipOptions=D(O.tooltip,O.plotOptions[this.type].tooltip,b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip);e.marker===null&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=(c.zones||[]).slice();if((c.negativeColor|| +c.negativeFillColor)&&!c.zones)a.push({value:c[this.zoneAxis+"Threshold"]||c.threshold||0,color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&q(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});return c},getCyclic:function(a,b,c){var d=this.userOptions,e="_"+a+"Index",f=a+"Counter";b||(q(d[e])?b=d[e]:(d[e]=b=this.chart[f]%c.length,this.chart[f]+=1),b=c[b]);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color|| +ba[this.type].color,this.chart.options.colors)},getSymbol:function(){var a=this.options.marker;this.getCyclic("symbol",a.symbol,this.chart.options.symbols);if(/^url/.test(this.symbol))a.radius=0},drawLegendSymbol:K.drawLineMarker,setData:function(a,b,c,d){var e=this,f=e.points,g=f&&f.length||0,h,i=e.options,k=e.chart,j=null,m=e.xAxis,l=m&&!!m.categories,n=i.turboThreshold,t=this.xData,r=this.yData,s=(h=e.pointArrayMap)&&h.length,a=a||[];h=a.length;b=p(b,!0);if(d!==!1&&h&&g===h&&!e.cropped&&!e.hasGroupedData&& +e.visible)o(a,function(a,b){f[b].update&&a!==i.data[b]&&f[b].update(a,!1,null,!1)});else{e.xIncrement=null;e.colorCounter=0;o(this.parallelArrays,function(a){e[a+"Data"].length=0});if(n&&h>n){for(c=0;j===null&&ci||this.forceCrop))if(b[d-1]l)b=[],c=[];else if(b[0]l)e=this.cropData(this.xData,this.yData,m,l),b=e.xData,c=e.yData,e=e.start,f=!0;for(i=b.length-1;i>=0;i--)d=b[i]-b[i-1],d>0&&(g===B||d=c){f=s(0,i-h);break}for(c=i;cd){g=c+h;break}return{xData:a.slice(f,g),yData:b.slice(f,g),start:f,end:g}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length,h=this.cropStart||0,i,k=this.hasGroupedData,j,m=[],l;if(!b&&!k)b=[],b.length=a.length,b=this.data=b;for(l=0;l0),k=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(c[m+1]||k)>=g&&(c[m-1]||k)<=h,i&&k)if(i=j.length)for(;i--;)j[i]!==null&&(e[f++]=j[i]);else e[f++]=j;this.dataMin=Sa(e);this.dataMax=Da(e)},translate:function(){this.processedXData||this.processData();this.generatePoints();for(var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,e=this.yAxis,f=this.points,g=f.length,h=!!this.modifyValue,i=a.pointPlacement,k=i==="between"||ka(i),j=a.threshold, +m=a.startFromThreshold?j:0,l,n,t,o,v=Number.MAX_VALUE,a=0;a=0&&n<=e.len&&l>=0&&l<=c.len;y.clientX=k?c.translate(x,0,0,0,1):l;y.negative=y.y<(j||0);y.category=d&&d[y.x]!==B?d[y.x]:y.x;a&&(v=E(v,P(l-t)));t=l}this.closestPointRangePx=v;this.getSegments()},setClip:function(a){var b=this.chart,c=this.options,d=b.renderer,e=b.inverted, +f=this.clipBox,g=f||b.clipBox,h=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,g.height,c.xAxis,c.yAxis].join(","),i=b[h],k=b[h+"m"];if(!i){if(a)g.width=0,b[h+"m"]=k=d.clipRect(-99,e?-b.plotLeft:-b.plotTop,99,e?b.chartWidth:b.chartHeight);b[h]=i=d.clipRect(g)}a&&(i.count+=1);if(c.clip!==!1)this.group.clip(a||f?i:b.clipRect),this.markerGroup.clip(k),this.sharedClipKey=h;a||(i.count-=1,i.count<=0&&h&&b[h]&&(f||(b[h]=b[h].destroy()),b[h+"m"]&&(b[h+"m"]=b[h+"m"].destroy())))},animate:function(a){var b= +this.chart,c=this.options.animation,d;if(c&&!Z(c))c=ba[this.type].animation;a?this.setClip(c):(d=this.sharedClipKey,(a=b[d])&&a.animate({width:b.plotSizeX},c),b[d+"m"]&&b[d+"m"].animate({width:b.plotSizeX+99},c),this.animate=null)},afterAnimate:function(){this.setClip();H(this,"afterAnimate")},drawPoints:function(){var a,b=this.points,c=this.chart,d,e,f,g,h,i,k,j,m=this.options.marker,l=this.pointAttr[""],n,o,r,q=this.markerGroup,s=p(m.enabled,this.xAxis.isRadial,this.closestPointRangePx>2*m.radius); +if(m.enabled!==!1||this._hasPointMarkers)for(f=b.length;f--;)if(g=b[f],d=S(g.plotX),e=g.plotY,j=g.graphic,n=g.marker||{},o=!!g.marker,a=s&&n.enabled===B||n.enabled,r=g.isInside,a&&e!==B&&!isNaN(e)&&g.y!==null)if(a=g.pointAttr[g.selected?"select":""]||l,h=a.r,i=p(n.symbol,this.symbol),k=i.indexOf("url")===0,j)j[r?"show":"hide"](!0).animate(v({x:d-h,y:e-h},j.symbolName?{width:2*h,height:2*h}:{}));else{if(r&&(h>0||k))g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h,o?n:m).attr(a).add(q)}else if(j)g.graphic= +j.destroy()},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={},a=a||{},b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=p(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=a.options,c=ba[a.type].marker?b.marker:b,d=c.states,e=d.hover,f,g=a.color,h=a.options.negativeColor;f={stroke:g,fill:g};var i=a.points||[],k,j,m=[],l=a.pointAttrToOptions;k=a.hasPointSpecificOptions;var n=c.lineColor,t=c.fillColor;j=b.turboThreshold;var r=a.zones,s=a.zoneAxis||"y",y;b.marker? +(e.radius=e.radius||c.radius+e.radiusPlus,e.lineWidth=e.lineWidth||c.lineWidth+e.lineWidthPlus):(e.color=e.color||ia(e.color||g).brighten(e.brightness).get(),e.negativeColor=e.negativeColor||ia(e.negativeColor||h).brighten(e.brightness).get());m[""]=a.convertAttribs(c,f);o(["hover","select"],function(b){m[b]=a.convertAttribs(d[b],m[""])});a.pointAttr=m;g=i.length;if(!j||g= +f.value;)f=r[++k];j.color=j.fillColor=p(f.color,a.color)}k=b.colorByPoint||j.color;if(j.options)for(y in l)q(c[l[y]])&&(k=!0);if(k){c=c||{};k=[];d=c.states||{};f=d.hover=d.hover||{};if(!b.marker||j.negative&&!f.fillColor&&!e.fillColor)f[a.pointAttrToOptions.fill]=f.color||!j.options.color&&e[j.negative&&h?"negativeColor":"color"]||ia(j.color).brighten(f.brightness||e.brightness).get();f={color:j.color};if(!t)f.fillColor=j.color;if(!n)f.lineColor=j.color;c.hasOwnProperty("color")&&!c.color&&delete c.color; +k[""]=a.convertAttribs(v(f,c),m[""]);k.hover=a.convertAttribs(d.hover,m.hover,k[""]);k.select=a.convertAttribs(d.select,m.select,k[""])}else k=m;j.pointAttr=k}},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit\/533/.test(Aa),d,e=a.data||[],f,g,h;H(a,"destroy");U(a);o(a.axisTypes||[],function(b){if(h=a[b])ma(h.series,a),h.isDirty=h.forceRedraw=!0});a.legendItem&&a.chart.legend.destroyItem(a);for(d=e.length;d--;)(f=e[d])&&f.destroy&&f.destroy();a.points=null;clearTimeout(a.animationTimeout);for(g in a)a[g]instanceof +Q&&!a[g].survive&&(d=c&&g==="group"?"hide":"destroy",a[g][d]());if(b.hoverSeries===a)b.hoverSeries=null;ma(b.series,a);for(g in a)delete a[g]},getSegmentPath:function(a){var b=this,c=[],d=b.options.step;o(a,function(e,f){var g=e.plotX,h=e.plotY,i;b.getPointSpline?c.push.apply(c,b.getPointSpline(a,e,f)):(c.push(f?"L":"M"),d&&f&&(i=a[f-1],d==="right"?c.push(i.plotX,h,"L"):d==="center"?c.push((i.plotX+g)/2,i.plotY,"L",(i.plotX+g)/2,h,"L"):c.push(g,i.plotY,"L")),c.push(e.plotX,e.plotY))});return c},getGraphPath:function(){var a= +this,b=[],c,d=[];o(a.segments,function(e){c=a.getSegmentPath(e);e.length>1?b=b.concat(c):d.push(e[0])});a.singlePoints=d;return a.graphPath=b},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||this.color,b.dashStyle]],d=b.lineWidth,e=b.linecap!=="square",f=this.getGraphPath(),g=this.fillGraph&&this.color||"none";o(this.zones,function(d,e){c.push(["zoneGraph"+e,d.color||a.color,d.dashStyle||b.dashStyle])});o(c,function(c,i){var k=c[0],j=a[k];if(j)j.animate({d:f});else if((d|| +g)&&f.length)j={stroke:c[1],"stroke-width":d,fill:g,zIndex:1},c[2]?j.dashstyle=c[2]:e&&(j["stroke-linecap"]=j["stroke-linejoin"]="round"),a[k]=a.chart.renderer.path(f).attr(j).add(a.group).shadow(i<2&&b.shadow)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,d=this.zones,e,f,g=this.clips||[],h,i=this.graph,k=this.area,j=s(b.chartWidth,b.chartHeight),m=this[(this.zoneAxis||"y")+"Axis"],l,n=m.reversed,t=b.inverted,r=m.horiz,q,y,x,v=!1;if(d.length&&(i||k)&&m.min!==B)i&&i.hide(),k&&k.hide(), +l=m.getExtremes(),o(d,function(d,o){e=n?r?b.plotWidth:0:r?0:m.toPixels(l.min);e=E(s(p(f,e),0),j);f=E(s(A(m.toPixels(p(d.value,l.max),!0)),0),j);v&&(e=f=m.toPixels(l.max));q=Math.abs(e-f);y=E(e,f);x=s(e,f);if(m.isXAxis){if(h={x:t?x:y,y:0,width:q,height:j},!r)h.x=b.plotHeight-h.x}else if(h={x:0,y:t?x:y,width:j,height:q},r)h.y=b.plotWidth-h.y;b.inverted&&c.isVML&&(h=m.isXAxis?{x:0,y:n?y:x,height:h.width,width:b.chartWidth}:{x:h.y-b.plotLeft-b.spacingBox.x,y:0,width:h.height,height:b.chartHeight});g[o]? +g[o].animate(h):(g[o]=c.clipRect(h),i&&a["zoneGraph"+o].clip(g[o]),k&&a["zoneArea"+o].clip(g[o]));v=d.value>l.max}),this.clips=g},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};o(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;if(b.xAxis)N(c,"resize",a),N(b,"destroy",function(){U(c,"resize",a)}),a(),b.invertGroups=a},plotGroup:function(a,b,c,d,e){var f=this[a],g=!f;g&&(this[a]=f=this.chart.renderer.g(b).attr({zIndex:d||0.1}).add(e), +f.addClass("highcharts-series-"+this.index));f.attr({visibility:c})[g?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;if(a.inverted)b=c,c=this.xAxis;return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,d=a.options,e=(c=d.animation)&&!!a.animate&&b.renderer.isSVG&&p(c.duration,500)||0,f=a.visible?"inherit":"hidden",g=d.zIndex,h=a.hasRendered,i=b.seriesGroup;c=a.plotGroup("group", +"series",f,g,i);a.markerGroup=a.plotGroup("markerGroup","markers",f,g,i);e&&a.animate(!0);a.getAttribs();c.inverted=a.isCartesian?b.inverted:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());o(a.points,function(a){a.redraw&&a.redraw()});a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&a.options.enableMouseTracking!==!1&&a.drawTracker();b.inverted&&a.invertGroups();d.clip!==!1&&!a.sharedClipKey&&!h&&c.clip(b.clipRect);e&&a.animate();if(!h)a.animationTimeout=Qa(function(){a.afterAnimate()}, +e);a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirtyData,c=this.isDirty,d=this.group,e=this.xAxis,f=this.yAxis;d&&(a.inverted&&d.attr({width:a.plotWidth,height:a.plotHeight}),d.animate({translateX:p(e&&e.left,a.plotLeft),translateY:p(f&&f.top,a.plotTop)}));this.translate();this.render();b&&H(this,"updatedData");(c||b)&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,d=this.yAxis,e=this.chart.inverted; +return this.searchKDTree({clientX:e?c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:e?d.len-a.chartX+d.pos:a.chartY-d.pos},b)},buildKDTree:function(){function a(c,e,f){var g,h;if(h=c&&c.length)return g=b.kdAxisArray[e%f],c.sort(function(a,b){return a[g]-b[g]}),h=Math.floor(h/2),{point:c[h],left:a(c.slice(0,h),e+1,f),right:a(c.slice(h+1),e+1,f)}}var b=this,c=b.kdDimensions;delete b.kdTree;Qa(function(){var d=Oa(b.points||[],function(a){return a.y!==null});b.kdTree=a(d,c,c)},b.options.kdNow?0:1)},searchKDTree:function(a, +b){function c(a,b,k,j){var m=b.point,l=d.kdAxisArray[k%j],n,p,o=m;p=q(a[e])&&q(m[e])?Math.pow(a[e]-m[e],2):null;n=q(a[f])&&q(m[f])?Math.pow(a[f]-m[f],2):null;n=(p||0)+(n||0);m.dist=q(n)?Math.sqrt(n):Number.MAX_VALUE;m.distX=q(p)?Math.sqrt(p):Number.MAX_VALUE;l=a[l]-m[l];n=l<0?"left":"right";p=l<0?"right":"left";b[n]&&(n=c(a,b[n],k+1,j),o=n[g]0&&this.singleStacks===!1&&(q.points[y][0]=q.points[this.index+","+w+",0"][0]);e==="percent"?(r=r?i:k,j&&l[r]&&l[r][w]?(r=l[r][w],q.total=r.total=s(r.total,q.total)+P(u)||0):q.total=fa(q.total+(P(u)||0))):q.total=fa(q.total+(u||0));q.cum=p(q.cum,g)+(u||0);q.points[y].push(q.cum); +c[v]=q.cum}if(e==="percent")m.usePercentage=!0;this.stackedYData=c;m.oldStacks={}}};R.prototype.setPercentStacks=function(){var a=this,b=a.stackKey,c=a.yAxis.stacks,d=a.processedXData,e;o([b,"-"+b],function(b){var f;for(var g=d.length,h,i;g--;)if(h=d[g],e=a.getStackIndicator(e,h,a.index),f=(i=c[b]&&c[b][h])&&i.points[e.key],h=f)i=i.total?100/i.total:0,h[0]=fa(h[0]*i),h[1]=fa(h[1]*i),a.stackedYData[g]=h[1]})};R.prototype.getStackIndicator=function(a,b,c){!q(a)||a.x!==b?a={x:b,index:0}:a.index++;a.key= +[c,b,a.index].join(",");return a};v(hb.prototype,{addSeries:function(a,b,c){var d,e=this;a&&(b=p(b,!0),H(e,"addSeries",{options:a},function(){d=e.initSeries(a);e.isDirtyLegend=!0;e.linkSeries();b&&e.redraw(c)}));return d},addAxis:function(a,b,c,d){var e=b?"xAxis":"yAxis",f=this.options;new ja(this,D(a,{index:this[e].length,isX:b}));f[e]=ta(f[e]||{});f[e].push(a);p(c,!0)&&this.redraw(d)},showLoading:function(a){var b=this,c=b.options,d=b.loadingDiv,e=c.loading,f=function(){d&&M(d,{left:b.plotLeft+ +"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};if(!d)b.loadingDiv=d=$(Ma,{className:"highcharts-loading"},v(e.style,{zIndex:10,display:"none"}),b.container),b.loadingSpan=$("span",null,e.labelStyle,d),N(b,"redraw",f);b.loadingSpan.innerHTML=a||c.lang.loading;if(!b.loadingShown)M(d,{opacity:0,display:""}),Xa(d,{opacity:e.style.opacity},{duration:e.showDuration||0}),b.loadingShown=!0;f()},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&Xa(b,{opacity:0},{duration:a.loading.hideDuration|| +100,complete:function(){M(b,{display:"none"})}});this.loadingShown=!1}});v(Ia.prototype,{update:function(a,b,c,d){function e(){f.applyOptions(a);if(f.y===null&&h)f.graphic=h.destroy();if(Z(a)&&!Ja(a))f.redraw=function(){if(h&&h.element&&a&&a.marker&&a.marker.symbol)f.graphic=h.destroy();if(a&&a.dataLabels&&f.dataLabel)f.dataLabel=f.dataLabel.destroy();f.redraw=null};i=f.index;g.updateParallelArrays(f,i);if(m&&f.name)m[f.x]=f.name;j.data[i]=Z(j.data[i])?f.options:a;g.isDirty=g.isDirtyData=!0;if(!g.fixedBox&& +g.hasCartesianSeries)k.isDirtyBox=!0;if(j.legendType==="point")k.isDirtyLegend=!0;b&&k.redraw(c)}var f=this,g=f.series,h=f.graphic,i,k=g.chart,j=g.options,m=g.xAxis&&g.xAxis.names,b=p(b,!0);d===!1?e():f.firePointEvent("update",{options:a},e)},remove:function(a,b){this.series.removePoint(qa(this,this.series.data),a,b)}});v(R.prototype,{addPoint:function(a,b,c,d){var e=this,f=e.options,g=e.data,h=e.graph,i=e.area,k=e.chart,j=e.xAxis&&e.xAxis.names,m=h&&h.shift||0,l=["graph","area"],h=f.data,n,t=e.xData; +Va(d,k);if(c){for(d=e.zones.length;d--;)l.push("zoneGraph"+d,"zoneArea"+d);o(l,function(a){if(e[a])e[a].shift=m+(f.step?2:1)})}if(i)i.isArea=!0;b=p(b,!0);i={series:e};e.pointClass.prototype.applyOptions.apply(i,[a]);l=i.x;d=t.length;if(e.requireSorting&&ll;)d--;e.updateParallelArrays(i,"splice",d,0,0);e.updateParallelArrays(i,d);if(j&&i.name)j[l]=i.name;h.splice(d,0,a);n&&(e.data.splice(d,0,null),e.processData());f.legendType==="point"&&e.generatePoints();c&&(g[0]&&g[0].remove? +g[0].remove(!1):(g.shift(),e.updateParallelArrays(i,"shift"),h.shift()));e.isDirty=!0;e.isDirtyData=!0;b&&(e.getAttribs(),k.redraw())},removePoint:function(a,b,c){var d=this,e=d.data,f=e[a],g=d.points,h=d.chart,i=function(){e.length===g.length&&g.splice(a,1);e.splice(a,1);d.options.data.splice(a,1);d.updateParallelArrays(f||{series:d},"splice",a,1);f&&f.destroy();d.isDirty=!0;d.isDirtyData=!0;b&&h.redraw()};Va(c,h);b=p(b,!0);f?f.firePointEvent("remove",null,i):i()},remove:function(a,b){var c=this, +d=c.chart;H(c,"remove",null,function(){c.destroy();d.isDirtyLegend=d.isDirtyBox=!0;d.linkSeries();p(a,!0)&&d.redraw(b)})},update:function(a,b){var c=this,d=this.chart,e=this.userOptions,f=this.type,g=I[f].prototype,h=["group","markerGroup","dataLabelsGroup"],i;if(a.type&&a.type!==f||a.zIndex!==void 0)h.length=0;o(h,function(a){h[a]=c[a];delete c[a]});a=D(e,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},a);this.remove(!1);for(i in g)this[i]=B;v(this,I[a.type||f].prototype); +o(h,function(a){c[a]=h[a]});this.init(d,a);d.linkSeries();p(b,!0)&&d.redraw(!1)}});v(ja.prototype,{update:function(a,b){var c=this.chart,a=c.options[this.coll][this.options.index]=D(this.userOptions,a);this.destroy(!0);this._addedPlotLB=this.chart._labelPanes=B;this.init(c,v(a,{events:B}));c.isDirtyBox=!0;p(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,d=this.series,e=d.length;e--;)d[e]&&d[e].remove(!1);ma(b.axes,this);ma(b[c],this);b.options[c].splice(this.options.index, +1);o(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;p(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}});var xa=na(R);I.line=xa;ba.area=D(ea,{softThreshold:!1,threshold:0});var sa=na(R,{type:"area",singleStacks:!1,getSegments:function(){var a=this,b=[],c=[],d=[],e=this.xAxis,f=this.yAxis,g=f.stacks[this.stackKey],h={},i,k,j=this.points,m=this.options.connectNulls,l,n,p;if(this.options.stacking&&!this.cropped){for(n= +0;n=0;d--)g=p(a[d].yBottom,f),da&&i>e?(i=s(a,e),j=2*e-i):ig&&j>e?(j=s(g,e),i=2*e-j):j0.5;b=Math.round(b)+f;d-=b;g&&(b-=1,d+=1);return{x:a,y:b,width:c,height:d}},translate:function(){var a=this,b=a.chart,c=a.options,d=a.borderWidth=p(c.borderWidth,a.closestPointRange*a.xAxis.transA<2?0:1),e=a.yAxis,f=a.translatedThreshold=e.getThreshold(c.threshold),g=p(c.minPointLength,5),h=a.getColumnMetrics(),i=h.width, +k=a.barW=s(i,1+2*d),j=a.pointXOffset=h.offset;b.inverted&&(f-=0.5);c.pointPadding&&(k=ua(k));R.prototype.translate.apply(a);o(a.points,function(c){var d=E(p(c.yBottom,f),9E4),h=999+P(d),h=E(s(-h,c.plotY),e.len+h),o=c.plotX+j,q=k,v=E(h,d),y,u=s(h,d)-v;P(u)g?d-g:f-(y?g:0));c.barX=o;c.pointWidth=i;c.tooltipPos=b.inverted?[e.len+e.pos-b.plotLeft-h,a.xAxis.len-o-q/2,u]:[o+q/2,h+e.pos-b.plotTop,u];c.shapeType="rect";c.shapeArgs=a.crispCol(o, +v,q,u)})},getSymbol:va,drawLegendSymbol:K.drawRectangle,drawGraph:va,drawPoints:function(){var a=this,b=this.chart,c=a.options,d=b.renderer,e=c.animationLimit||250,f,g;o(a.points,function(h){var i=h.plotY,k=h.graphic;if(i!==B&&!isNaN(i)&&h.y!==null)f=h.shapeArgs,i=q(a.borderWidth)?{"stroke-width":a.borderWidth}:{},g=h.pointAttr[h.selected?"select":""]||a.pointAttr[""],k?(Pa(k),k.attr(i).attr(g)[b.pointCount\u25cf {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}});sa=na(R,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1, +kdDimensions:2,drawGraph:function(){this.options.lineWidth&&R.prototype.drawGraph.call(this)}});I.scatter=sa;ba.pie=D(ea,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.y===null?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:0.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});ea={type:"pie", +isCartesian:!1,pointClass:na(Ia,{init:function(){Ia.prototype.init.apply(this,arguments);var a=this,b;a.name=p(a.name,"Slice");b=function(b){a.slice(b.type==="select")};N(a,"select",b);N(a,"unselect",b);return a},setVisible:function(a,b){var c=this,d=c.series,e=d.chart,f=d.options.ignoreHiddenPoint,b=p(b,f);if(a!==c.visible){c.visible=c.options.visible=a=a===B?!c.visible:a;d.options.data[qa(c,d.data)]=c.options;o(["graphic","dataLabel","connector","shadowGroup"],function(b){if(c[b])c[b][a?"show": +"hide"](!0)});c.legendItem&&e.legend.colorizeItem(c,a);!a&&c.state==="hover"&&c.setState("");if(f)d.isDirty=!0;b&&e.redraw()}},slice:function(a,b,c){var d=this.series;Va(c,d.chart);p(b,!0);this.sliced=this.options.sliced=a=q(a)?a:!this.sliced;d.options.data[qa(this,d.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)},haloPath:function(a){var b=this.shapeArgs,c=this.series.chart;return this.sliced||!this.visible? +[]:this.series.chart.renderer.symbols.arc(c.plotLeft+b.x,c.plotTop+b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,start:b.start,end:b.end})}}),requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},animate:function(a){var b=this,c=b.points,d=b.startAngleRad;if(!a)o(c,function(a){var c=a.graphic,g=a.shapeArgs;c&&(c.attr({r:a.startR||b.center[3]/2,start:d,end:d}),c.animate({r:g.r, +start:g.start,end:g.end},b.options.animation))}),b.animate=null},updateTotals:function(){var a,b=0,c=this.points,d=c.length,e,f=this.options.ignoreHiddenPoint;for(a=0;a0&&(e.visible||!f)?e.y/b*100:0,e.total=b},generatePoints:function(){R.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var b=0,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f,g,h,i=c.startAngle|| +0,k=this.startAngleRad=pa/180*(i-90),i=(this.endAngleRad=pa/180*(p(c.endAngle,i+360)-90))-k,j=this.points,m=c.dataLabels.distance,c=c.ignoreHiddenPoint,l,n=j.length,o;if(!a)this.center=a=this.getCenter();this.getX=function(b,c){h=V.asin(E((b-a[1])/(a[2]/2+m),1));return a[0]+(c?-1:1)*T(h)*(a[2]/2+m)};for(l=0;l1.5*pa? +h-=2*pa:h<-pa/2&&(h+=2*pa);o.slicedTranslation={translateX:A(T(h)*d),translateY:A(aa(h)*d)};f=T(h)*a[2]/2;g=aa(h)*a[2]/2;o.tooltipPos=[a[0]+f*0.7,a[1]+g*0.7];o.half=h<-pa/2||h>pa/2?1:0;o.angle=h;e=E(e,m/2);o.labelPos=[a[0]+f+T(h)*m,a[1]+g+aa(h)*m,a[0]+f+T(h)*e,a[1]+g+aa(h)*e,a[0]+f,a[1]+g,m<0?"center":o.half?"right":"left",h]}},drawGraph:null,drawPoints:function(){var a=this,b=a.chart.renderer,c,d,e=a.options.shadow,f,g,h,i;if(e&&!a.shadowGroup)a.shadowGroup=b.g("shadow").add(a.group);o(a.points, +function(k){if(k.y!==null){d=k.graphic;h=k.shapeArgs;f=k.shadowGroup;g=k.pointAttr[k.selected?"select":""];if(!g.stroke)g.stroke=g.fill;if(e&&!f)f=k.shadowGroup=b.g("shadow").add(a.shadowGroup);c=k.sliced?k.slicedTranslation:{translateX:0,translateY:0};f&&f.attr(c);if(d)d.setRadialReference(a.center).attr(g).animate(v(h,c));else{i={"stroke-linejoin":"round"};if(!k.visible)i.visibility="hidden";k.graphic=d=b[k.shapeType](h).setRadialReference(a.center).attr(g).attr(i).attr(c).add(a.group).shadow(e, +f)}}})},searchPoint:va,sortByAngle:function(a,b){a.sort(function(a,d){return a.angle!==void 0&&(d.angle-a.angle)*b})},drawLegendSymbol:K.drawRectangle,getCenter:Cb.getCenter,getSymbol:va};ea=na(R,ea);I.pie=ea;R.prototype.drawDataLabels=function(){var a=this,b=a.options,c=b.cursor,d=b.dataLabels,e=a.points,f,g,h=a.hasRendered||0,i,k,j=a.chart.renderer;if(d.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(d),k=a.plotGroup("dataLabelsGroup","data-labels",d.defer?"hidden":"visible",d.zIndex|| +6),p(d.defer,!0)&&(k.attr({opacity:+h}),h||N(a,"afterAnimate",function(){a.visible&&k.show();k[b.animation?"animate":"attr"]({opacity:1},{duration:200})})),g=d,o(e,function(e){var h,n=e.dataLabel,o,r,s=e.connector,u=!0,x,w={};f=e.dlOptions||e.options&&e.options.dataLabels;h=p(f&&f.enabled,g.enabled)&&e.y!==null;if(n&&!h)e.dataLabel=n.destroy();else if(h){d=D(g,f);x=d.style;h=d.rotation;o=e.getLabelConfig();i=d.format?La(d.format,o):d.formatter.call(o,d);x.color=p(d.color,x.color,a.color,"black"); +if(n)if(q(i))n.attr({text:i}),u=!1;else{if(e.dataLabel=n=n.destroy(),s)e.connector=s.destroy()}else if(q(i)){n={fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":d.borderWidth,r:d.borderRadius||0,rotation:h,padding:d.padding,zIndex:1};if(x.color==="contrast")w.color=d.inside||d.distance<0||b.stacking?j.getContrast(e.color||a.color):"#000000";if(c)w.cursor=c;for(r in n)n[r]===B&&delete n[r];n=e.dataLabel=j[h?"text":"label"](i,0,-9999,d.shape,null,null,d.useHTML).attr(n).css(v(x,w)).add(k).shadow(d.shadow)}n&& +a.alignDataLabel(e,n,d,null,u)}})};R.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=p(a.plotX,-9999),i=p(a.plotY,-9999),k=b.getBBox(),j=f.renderer.fontMetrics(c.style.fontSize).b,m=this.visible&&(a.series.forceDL||f.isInsidePlot(h,A(i),g)||d&&f.isInsidePlot(h,g?d.x+1:d.y+d.height-1,g));if(m)d=v({x:g?f.plotWidth-i:h,y:A(g?f.plotHeight-h:i),width:0,height:0},d),v(c,{width:k.width,height:k.height}),c.rotation?(a=f.renderer.rotCorr(j,c.rotation),b[e?"attr":"animate"]({x:d.x+ +c.x+d.width/2+a.x,y:d.y+c.y+d.height/2}).attr({align:c.align})):(b.align(c,null,d),g=b.alignAttr,p(c.overflow,"justify")==="justify"?this.justifyDataLabel(b,c,g,k,d,e):p(c.crop,!0)&&(m=f.isInsidePlot(g.x,g.y)&&f.isInsidePlot(g.x+k.width,g.y+k.height)),c.shape&&b.attr({anchorX:a.plotX,anchorY:a.plotY}));if(!m)Pa(b),b.attr({y:-9999}),b.placed=!1};R.prototype.justifyDataLabel=function(a,b,c,d,e,f){var g=this.chart,h=b.align,i=b.verticalAlign,k,j,m=a.box?0:a.padding||0;k=c.x+m;if(k<0)h==="right"?b.align= +"left":b.x=-k,j=!0;k=c.x+d.width-m;if(k>g.plotWidth)h==="left"?b.align="right":b.x=g.plotWidth-k,j=!0;k=c.y+m;if(k<0)i==="bottom"?b.verticalAlign="top":b.y=-k,j=!0;k=c.y+d.height-m;if(k>g.plotHeight)i==="top"?b.verticalAlign="bottom":b.y=g.plotHeight-k,j=!0;if(j)a.placed=!f,a.align(b,null,e)};if(I.pie)I.pie.prototype.drawDataLabels=function(){var a=this,b=a.data,c,d=a.chart,e=a.options.dataLabels,f=p(e.connectorPadding,10),g=p(e.connectorWidth,1),h=d.plotWidth,i=d.plotHeight,k,j,m=p(e.softConnector, +!0),l=e.distance,n=a.center,q=n[2]/2,r=n[1],v=l>0,u,x,w,B=[[],[]],z,C,D,F,J,G=[0,0,0,0],M=function(a,b){return b.y-a.y};if(a.visible&&(e.enabled||a._hasPointLabels)){R.prototype.drawDataLabels.apply(a);o(b,function(a){a.dataLabel&&a.visible&&B[a.half].push(a)});for(F=2;F--;){var H=[],N=[],I=B[F],L=I.length,K;if(L){a.sortByAngle(I,F-0.5);for(J=b=0;!b&&I[J];)b=I[J]&&I[J].dataLabel&&(I[J].dataLabel.getBBox().height||21),J++;if(l>0){x=E(r+q+l,d.plotHeight);for(J=s(0,r-q-l);J<=x;J+=b)H.push(J);x=H.length; +if(L>x){c=[].concat(I);c.sort(M);for(J=L;J--;)c[J].rank=J;for(J=L;J--;)I[J].rank>=x&&I.splice(J,1);L=I.length}for(J=0;J0){if(x=N.pop(),K=x.i,C=x.y,c>C&&H[K+1]!==null||ch-f&&(G[1]=s(A(z+x-h+f),G[1])),C-b/2<0?G[0]=s(A(-C+b/2),G[0]):C+b/2>i&&(G[2]=s(A(C+b/2-i),G[2]))}}}if(Da(G)===0||this.verifyDataLabelOverflow(G))this.placeDataLabels(),v&&g&&o(this.points,function(b){k=b.connector;w=b.labelPos; +if((u=b.dataLabel)&&u._pos&&b.visible)D=u._attr.visibility,z=u.connX,C=u.connY,j=m?["M",z+(w[6]==="left"?5:-5),C,"C",z,C,2*w[2]-w[4],2*w[3]-w[5],w[2],w[3],"L",w[4],w[5]]:["M",z+(w[6]==="left"?5:-5),C,"L",w[2],w[3],"L",w[4],w[5]],k?(k.animate({d:j}),k.attr("visibility",D)):b.connector=k=a.chart.renderer.path(j).attr({"stroke-width":g,stroke:e.connectorColor||b.color||"#606060",visibility:D}).add(a.dataLabelsGroup);else if(k)b.connector=k.destroy()})}},I.pie.prototype.placeDataLabels=function(){o(this.points, +function(a){var b=a.dataLabel;if(b&&a.visible)(a=b._pos)?(b.attr(b._attr),b[b.moved?"animate":"attr"](a),b.moved=!0):b&&b.attr({y:-9999})})},I.pie.prototype.alignDataLabel=va,I.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,d=c.center,e=c.minSize||80,f=e,g;d[0]!==null?f=s(b[2]-s(a[1],a[3]),e):(f=s(b[2]-a[1]-a[3],e),b[0]+=(a[3]-a[1])/2);d[1]!==null?f=s(E(f,b[2]-s(a[0],a[2])),e):(f=s(E(f,b[2]-a[0]-a[2]),e),b[1]+=(a[0]-a[2])/2);fp(this.translatedThreshold,g.yAxis.len)),k=p(c.inside,!!this.options.stacking);if(h){d=D(h);if(d.y<0)d.height+=d.y,d.y=0;h=d.y+d.height-g.yAxis.len; +h>0&&(d.height-=h);f&&(d={x:g.yAxis.len-d.y-d.height,y:g.xAxis.len-d.x-d.width,width:d.height,height:d.width});if(!k)f?(d.x+=i?0:d.width,d.width=0):(d.y+=i?d.height:0,d.height=0)}c.align=p(c.align,!f||k?"center":i?"right":"left");c.verticalAlign=p(c.verticalAlign,f||k?"middle":i?"top":"bottom");R.prototype.alignDataLabel.call(this,a,b,c,d,e)};(function(a){var b=a.Chart,c=a.each,d=a.pick,e=a.addEvent;b.prototype.callbacks.push(function(a){function b(){var e=[];c(a.series,function(a){var b=a.options.dataLabels, +f=a.dataLabelCollections||["dataLabel"];(b.enabled||a._hasPointLabels)&&!b.allowOverlap&&a.visible&&c(f,function(b){c(a.points,function(a){if(a[b])a[b].labelrank=d(a.labelrank,a.shapeArgs&&a.shapeArgs.height),e.push(a[b])})})});a.hideOverlappingLabels(e)}b();e(a,"redraw",b)});b.prototype.hideOverlappingLabels=function(a){var b=a.length,d,e,k,j,m,l,n;for(e=0;em.x+(k.width-n)||l.x+(j.width-n)m.y+(k.height-n)||l.y+(j.height-n)d;if(h.series.length&&(i||m>E(j.dataMin,j.min))&& +(!i||k + * + * Notes: + * At this stage, we only support a subset of possible cron options. + * For example, each cron entry can only be digits or "*", no commas + * to denote multiple entries. We also limit the allowed combinations: + * - Every minute : * * * * * + * - Every hour : ? * * * * + * - Every day : ? ? * * * + * - Every week : ? ? * * ? + * - Every month : ? ? ? * * + * - Every year : ? ? ? ? * + */ +(function($) { + + var defaults = { + initial : "* * * * *", + minuteOpts : { + minWidth : 100, // only applies if columns and itemWidth not set + itemWidth : 30, + columns : 4, + rows : undefined, + title : "Minutes Past the Hour" + }, + timeHourOpts : { + minWidth : 100, // only applies if columns and itemWidth not set + itemWidth : 20, + columns : 2, + rows : undefined, + title : "Time: Hour" + }, + domOpts : { + minWidth : 100, // only applies if columns and itemWidth not set + itemWidth : 30, + columns : undefined, + rows : 10, + title : "Day of Month" + }, + monthOpts : { + minWidth : 100, // only applies if columns and itemWidth not set + itemWidth : 100, + columns : 2, + rows : undefined, + title : undefined + }, + dowOpts : { + minWidth : 100, // only applies if columns and itemWidth not set + itemWidth : undefined, + columns : undefined, + rows : undefined, + title : undefined + }, + timeMinuteOpts : { + minWidth : 100, // only applies if columns and itemWidth not set + itemWidth : 20, + columns : 4, + rows : undefined, + title : "Time: Minute" + }, + effectOpts : { + openSpeed : 400, + closeSpeed : 400, + openEffect : "slide", + closeEffect : "slide", + hideOnMouseOut : true + }, + url_set : undefined, + customValues : undefined, + onChange: undefined, // callback function each time value changes + useGentleSelect: false + }; + + // ------- build some static data ------- + + // options for minutes in an hour + var str_opt_mih = ""; + for (var i = 0; i < 60; i++) { + var j = (i < 10)? "0":""; + str_opt_mih += "\n"; + } + + // options for hours in a day + var str_opt_hid = ""; + for (var i = 0; i < 24; i++) { + var j = (i < 10)? "0":""; + str_opt_hid += "\n"; + } + + // options for days of month + var str_opt_dom = ""; + for (var i = 1; i < 32; i++) { + if (i == 1 || i == 21 || i == 31) { var suffix = "st"; } + else if (i == 2 || i == 22) { var suffix = "nd"; } + else if (i == 3 || i == 23) { var suffix = "rd"; } + else { var suffix = "th"; } + str_opt_dom += "\n"; + } + + // options for months + var str_opt_month = ""; + var months = ["January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December"]; + for (var i = 0; i < months.length; i++) { + str_opt_month += "\n"; + } + + // options for day of week + var str_opt_dow = ""; + var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", + "Friday", "Saturday"]; + for (var i = 0; i < days.length; i++) { + str_opt_dow += "\n"; + } + + // options for period + var str_opt_period = ""; + var periods = ["minute", "hour", "day", "week", "month", "year"]; + for (var i = 0; i < periods.length; i++) { + str_opt_period += "\n"; + } + + // display matrix + var toDisplay = { + "minute" : [], + "hour" : ["mins"], + "day" : ["time"], + "week" : ["dow", "time"], + "month" : ["dom", "time"], + "year" : ["dom", "month", "time"] + }; + + var combinations = { + "minute" : /^(\*\s){4}\*$/, // "* * * * *" + "hour" : /^\d{1,2}\s(\*\s){3}\*$/, // "? * * * *" + "day" : /^(\d{1,2}\s){2}(\*\s){2}\*$/, // "? ? * * *" + "week" : /^(\d{1,2}\s){2}(\*\s){2}\d{1,2}$/, // "? ? * * ?" + "month" : /^(\d{1,2}\s){3}\*\s\*$/, // "? ? ? * *" + "year" : /^(\d{1,2}\s){4}\*$/ // "? ? ? ? *" + }; + + // ------------------ internal functions --------------- + function defined(obj) { + if (typeof obj == "undefined") { return false; } + else { return true; } + } + + function undefinedOrObject(obj) { + return (!defined(obj) || typeof obj == "object") + } + + function getCronType(cron_str, opts) { + // if customValues defined, check for matches there first + if (defined(opts.customValues)) { + for (key in opts.customValues) { + if (cron_str == opts.customValues[key]) { return key; } + } + } + + // check format of initial cron value + var valid_cron = /^((\d{1,2}|\*)\s){4}(\d{1,2}|\*)$/ + if (typeof cron_str != "string" || !valid_cron.test(cron_str)) { + $.error("cron: invalid initial value"); + return undefined; + } + + // check actual cron values + var d = cron_str.split(" "); + // mm, hh, DD, MM, DOW + var minval = [ 0, 0, 1, 1, 0]; + var maxval = [59, 23, 31, 12, 6]; + for (var i = 0; i < d.length; i++) { + if (d[i] == "*") continue; + var v = parseInt(d[i]); + if (defined(v) && v <= maxval[i] && v >= minval[i]) continue; + + $.error("cron: invalid value found (col "+(i+1)+") in " + o.initial); + return undefined; + } + + // determine combination + for (var t in combinations) { + if (combinations[t].test(cron_str)) { return t; } + } + + // unknown combination + $.error("cron: valid but unsupported cron format. sorry."); + return undefined; + } + + function hasError(c, o) { + if (!defined(getCronType(o.initial, o))) { return true; } + if (!undefinedOrObject(o.customValues)) { return true; } + + // ensure that customValues keys do not coincide with existing fields + if (defined(o.customValues)) { + for (key in o.customValues) { + if (combinations.hasOwnProperty(key)) { + $.error("cron: reserved keyword '" + key + + "' should not be used as customValues key."); + return true; + } + } + } + + return false; + } + + function getCurrentValue(c) { + var b = c.data("block"); + var min = hour = day = month = dow = "*"; + var selectedPeriod = b["period"].find("select").val(); + switch (selectedPeriod) { + case "minute": + break; + + case "hour": + min = b["mins"].find("select").val(); + break; + + case "day": + min = b["time"].find("select.cron-time-min").val(); + hour = b["time"].find("select.cron-time-hour").val(); + break; + + case "week": + min = b["time"].find("select.cron-time-min").val(); + hour = b["time"].find("select.cron-time-hour").val(); + dow = b["dow"].find("select").val(); + break; + + case "month": + min = b["time"].find("select.cron-time-min").val(); + hour = b["time"].find("select.cron-time-hour").val(); + day = b["dom"].find("select").val(); + break; + + case "year": + min = b["time"].find("select.cron-time-min").val(); + hour = b["time"].find("select.cron-time-hour").val(); + day = b["dom"].find("select").val(); + month = b["month"].find("select").val(); + break; + + default: + // we assume this only happens when customValues is set + return selectedPeriod; + } + return [min, hour, day, month, dow].join(" "); + } + + // ------------------- PUBLIC METHODS ----------------- + + var methods = { + init : function(opts) { + + // init options + var options = opts ? opts : {}; /* default to empty obj */ + var o = $.extend([], defaults, options); + var eo = $.extend({}, defaults.effectOpts, options.effectOpts); + $.extend(o, { + minuteOpts : $.extend({}, defaults.minuteOpts, eo, options.minuteOpts), + domOpts : $.extend({}, defaults.domOpts, eo, options.domOpts), + monthOpts : $.extend({}, defaults.monthOpts, eo, options.monthOpts), + dowOpts : $.extend({}, defaults.dowOpts, eo, options.dowOpts), + timeHourOpts : $.extend({}, defaults.timeHourOpts, eo, options.timeHourOpts), + timeMinuteOpts : $.extend({}, defaults.timeMinuteOpts, eo, options.timeMinuteOpts) + }); + + // error checking + if (hasError(this, o)) { return this; } + + // ---- define select boxes in the right order ----- + + var block = [], custom_periods = "", cv = o.customValues; + if (defined(cv)) { // prepend custom values if specified + for (var key in cv) { + custom_periods += "\n"; + } + } + + block["period"] = $("" + + "Every ") + .appendTo(this) + .data("root", this); + + var select = block["period"].find("select"); + select.bind("change.cron", event_handlers.periodChanged) + .data("root", this); + if (o.useGentleSelect) select.gentleSelect(eo); + + block["dom"] = $("" + + " on the ") + .appendTo(this) + .data("root", this); + + select = block["dom"].find("select").data("root", this); + if (o.useGentleSelect) select.gentleSelect(o.domOpts); + + block["month"] = $("" + + " of ") + .appendTo(this) + .data("root", this); + + select = block["month"].find("select").data("root", this); + if (o.useGentleSelect) select.gentleSelect(o.monthOpts); + + block["mins"] = $("" + + " at minutes past the hour ") + .appendTo(this) + .data("root", this); + + select = block["mins"].find("select").data("root", this); + if (o.useGentleSelect) select.gentleSelect(o.minuteOpts); + + block["dow"] = $("" + + " on ") + .appendTo(this) + .data("root", this); + + select = block["dow"].find("select").data("root", this); + if (o.useGentleSelect) select.gentleSelect(o.dowOpts); + + block["time"] = $("" + + " at :",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="
","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("