Skip to content

Commit 067d4a7

Browse files
committed
Ajuste identação do código
1 parent 9825d27 commit 067d4a7

File tree

7 files changed

+108
-108
lines changed

7 files changed

+108
-108
lines changed

src/main/java/br/com/swconsultoria/nfe/CancelarA3.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111

1212
public class CancelarA3 {
1313

14-
static TRetEnvEvento eventoCancelamento(ConfiguracoesNfe config, boolean valida, DocumentoEnum tipoDocumento, String xmlAssinado)
15-
throws NfeException {
16-
try {
17-
String xmlRetorno = EventosA3.enviarEvento(config, xmlAssinado, ServicosEnum.CANCELAMENTO, valida, tipoDocumento);
18-
return XmlNfeUtil.xmlToObject(xmlRetorno, TRetEnvEvento.class);
14+
static TRetEnvEvento eventoCancelamento(ConfiguracoesNfe config, boolean valida, DocumentoEnum tipoDocumento, String xmlAssinado)
15+
throws NfeException {
16+
try {
17+
String xmlRetorno = EventosA3.enviarEvento(config, xmlAssinado, ServicosEnum.CANCELAMENTO, valida, tipoDocumento);
18+
return XmlNfeUtil.xmlToObject(xmlRetorno, TRetEnvEvento.class);
1919

20-
} catch (JAXBException e) {
21-
throw new NfeException(e.getMessage());
22-
}
23-
}
20+
} catch (JAXBException e) {
21+
throw new NfeException(e.getMessage());
22+
}
23+
}
2424

2525
static br.com.swconsultoria.nfe.schema.envEventoCancSubst.TRetEnvEvento eventoCancelamentoSubstituicao(ConfiguracoesNfe config, boolean valida, DocumentoEnum tipoDocumento, String xmlAssinado)
2626
throws NfeException {
@@ -33,20 +33,20 @@ static br.com.swconsultoria.nfe.schema.envEventoCancSubst.TRetEnvEvento eventoC
3333
}
3434
}
3535

36-
static String montaXmleventoCancelamento(ConfiguracoesNfe config, TEnvEvento enviEvento)
37-
throws NfeException {
38-
try {
36+
static String montaXmleventoCancelamento(ConfiguracoesNfe config, TEnvEvento enviEvento)
37+
throws NfeException {
38+
try {
3939
String xml = XmlNfeUtil.objectToXml(enviEvento, config.getEncode());
4040

4141
xml = xml.replaceAll(" xmlns:ns2=\"http://www.w3.org/2000/09/xmldsig#\"", "");
4242
xml = xml.replaceAll("<evento v", "<evento xmlns=\"http://www.portalfiscal.inf.br/nfe\" v");
4343

44-
return xml;
44+
return xml;
4545

46-
} catch (JAXBException e) {
47-
throw new NfeException(e.getMessage());
48-
}
49-
}
46+
} catch (JAXBException e) {
47+
throw new NfeException(e.getMessage());
48+
}
49+
}
5050

5151
static String montaXmleventoCancelamentoSubstituicao(ConfiguracoesNfe config, br.com.swconsultoria.nfe.schema.envEventoCancSubst.TEnvEvento enviEvento)
5252
throws NfeException {

src/main/java/br/com/swconsultoria/nfe/CartaCorrecaoA3.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@
1111

1212
public class CartaCorrecaoA3 {
1313

14-
static TRetEnvEvento eventoCCe(ConfiguracoesNfe config, boolean valida, String xmlAssinado)
15-
throws NfeException {
16-
try {
17-
String xmlRetorno = EventosA3.enviarEvento(config, xmlAssinado, ServicosEnum.CCE, valida, DocumentoEnum.NFE);
18-
19-
return XmlNfeUtil.xmlToObject(xmlRetorno, TRetEnvEvento.class);
20-
21-
} catch (JAXBException e) {
22-
throw new NfeException(e.getMessage());
23-
}
24-
25-
}
26-
27-
static String montaXmlCartaCorrecao(ConfiguracoesNfe config, TEnvEvento enviEvento)
28-
throws NfeException {
29-
try {
14+
static TRetEnvEvento eventoCCe(ConfiguracoesNfe config, boolean valida, String xmlAssinado)
15+
throws NfeException {
16+
try {
17+
String xmlRetorno = EventosA3.enviarEvento(config, xmlAssinado, ServicosEnum.CCE, valida, DocumentoEnum.NFE);
18+
19+
return XmlNfeUtil.xmlToObject(xmlRetorno, TRetEnvEvento.class);
20+
21+
} catch (JAXBException e) {
22+
throw new NfeException(e.getMessage());
23+
}
24+
25+
}
26+
27+
static String montaXmlCartaCorrecao(ConfiguracoesNfe config, TEnvEvento enviEvento)
28+
throws NfeException {
29+
try {
3030
String xml = XmlNfeUtil.objectToXml(enviEvento, config.getEncode());
3131

3232
xml = xml.replaceAll(" xmlns:ns2=\"http://www.w3.org/2000/09/xmldsig#\"", "");
3333
xml = xml.replaceAll("<evento v", "<evento xmlns=\"http://www.portalfiscal.inf.br/nfe\" v");
3434

35-
return xml;
35+
return xml;
3636

37-
} catch (JAXBException e) {
38-
throw new NfeException(e.getMessage());
39-
}
37+
} catch (JAXBException e) {
38+
throw new NfeException(e.getMessage());
39+
}
4040

41-
}
41+
}
4242
}

src/main/java/br/com/swconsultoria/nfe/DistribuicaoDFeA3.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323

2424
@Log
2525
public class DistribuicaoDFeA3 {
26-
27-
static RetDistDFeInt consultaNfe(ConfiguracoesNfe config, String xmlAssinado) throws NfeException {
28-
try {
26+
27+
static RetDistDFeInt consultaNfe(ConfiguracoesNfe config, String xmlAssinado) throws NfeException {
28+
try {
2929
log.info("[XML-ENVIO]: " + xmlAssinado);
3030

3131
OMElement ome = AXIOMUtil.stringToOM(xmlAssinado);
@@ -51,13 +51,13 @@ static RetDistDFeInt consultaNfe(ConfiguracoesNfe config, String xmlAssinado) th
5151
return XmlNfeUtil.xmlToObject(result.getNfeDistDFeInteresseResult().getExtraElement().toString(),
5252
RetDistDFeInt.class);
5353

54-
} catch (RemoteException | XMLStreamException | JAXBException e) {
55-
throw new NfeException(e.getMessage());
56-
}
54+
} catch (RemoteException | XMLStreamException | JAXBException e) {
55+
throw new NfeException(e.getMessage());
56+
}
57+
58+
}
5759

58-
}
59-
60-
static String montarXML(ConfiguracoesNfe config, PessoaEnum tipoPessoa, String cpfCnpj, ConsultaDFeEnum tipoConsulta,
60+
static String montarXML(ConfiguracoesNfe config, PessoaEnum tipoPessoa, String cpfCnpj, ConsultaDFeEnum tipoConsulta,
6161
String nsuChave) throws JAXBException, NfeException {
6262
DistDFeInt distDFeInt = new DistDFeInt();
6363
distDFeInt.setVersao(ConstantesUtil.VERSAO.DIST_DFE);
@@ -90,6 +90,6 @@ static String montarXML(ConfiguracoesNfe config, PessoaEnum tipoPessoa, String c
9090

9191
return XmlNfeUtil.objectToXml(distDFeInt, config.getEncode());
9292

93-
}
94-
93+
}
94+
9595
}

src/main/java/br/com/swconsultoria/nfe/EnviarA3.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ static TEnviNFe montaNfeA3(ConfiguracoesNfe config, String xmlAssinado, boolean
3333
throw new NfeException(e.getMessage());
3434
}
3535
}
36-
36+
3737
}

src/main/java/br/com/swconsultoria/nfe/InutilizarA3.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
@Log
2222
public class InutilizarA3 {
2323

24-
static TRetInutNFe inutiliza(ConfiguracoesNfe config, DocumentoEnum tipoDocumento, boolean validar, String xmlAssinado)
25-
throws NfeException {
26-
try {
24+
static TRetInutNFe inutiliza(ConfiguracoesNfe config, DocumentoEnum tipoDocumento, boolean validar, String xmlAssinado)
25+
throws NfeException {
26+
try {
2727

2828
log.info("[XML-ENVIO]: " + xmlAssinado);
2929

@@ -48,21 +48,21 @@ static TRetInutNFe inutiliza(ConfiguracoesNfe config, DocumentoEnum tipoDocument
4848
log.info("[XML-RETORNO]: " + result.getExtraElement().toString());
4949
return XmlNfeUtil.xmlToObject(result.getExtraElement().toString(), TRetInutNFe.class);
5050

51-
} catch (RemoteException | XMLStreamException | JAXBException e) {
52-
throw new NfeException(e.getMessage());
53-
}
51+
} catch (RemoteException | XMLStreamException | JAXBException e) {
52+
throw new NfeException(e.getMessage());
53+
}
5454

55-
}
55+
}
5656

57-
static String montaXmlInutlizacao(ConfiguracoesNfe config, TInutNFe inutNFe)
58-
throws NfeException {
59-
try {
57+
static String montaXmlInutlizacao(ConfiguracoesNfe config, TInutNFe inutNFe)
58+
throws NfeException {
59+
try {
6060

6161
String xml = XmlNfeUtil.objectToXml(inutNFe, config.getEncode());
6262
return xml.replaceAll(" xmlns:ns2=\"http://www.w3.org/2000/09/xmldsig#\"", "");
6363

64-
} catch (JAXBException e) {
65-
throw new NfeException(e.getMessage());
66-
}
67-
}
64+
} catch (JAXBException e) {
65+
throw new NfeException(e.getMessage());
66+
}
67+
}
6868
}

src/main/java/br/com/swconsultoria/nfe/ManifestacaoDestinatarioA3.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212

1313
@Log
1414
public class ManifestacaoDestinatarioA3 {
15-
16-
static TRetEnvEvento eventoManifestacao(ConfiguracoesNfe config, boolean valida, String xmlAssinado) throws NfeException {
17-
try {
15+
16+
static TRetEnvEvento eventoManifestacao(ConfiguracoesNfe config, boolean valida, String xmlAssinado) throws NfeException {
17+
try {
1818
log.info("[XML-ENVIO]: " + xmlAssinado);
19-
xmlAssinado = EventosA3.enviarEvento(config, xmlAssinado, ServicosEnum.MANIFESTACAO, valida, DocumentoEnum.NFE);
19+
xmlAssinado = EventosA3.enviarEvento(config, xmlAssinado, ServicosEnum.MANIFESTACAO, valida, DocumentoEnum.NFE);
2020
return XmlNfeUtil.xmlToObject(xmlAssinado, TRetEnvEvento.class);
21-
} catch (JAXBException e) {
22-
throw new NfeException(e.getMessage());
23-
}
24-
}
21+
} catch (JAXBException e) {
22+
throw new NfeException(e.getMessage());
23+
}
24+
}
2525

26-
static String montarXML(ConfiguracoesNfe config, TEnvEvento envEvento) throws NfeException {
27-
try {
26+
static String montarXML(ConfiguracoesNfe config, TEnvEvento envEvento) throws NfeException {
27+
try {
2828
String xml = XmlNfeUtil.objectToXml(envEvento, config.getEncode());
2929
xml = xml.replaceAll(" xmlns:ns2=\"http://www.w3.org/2000/09/xmldsig#\"", "");
3030
xml = xml.replaceAll("<evento v", "<evento xmlns=\"http://www.portalfiscal.inf.br/nfe\" v");
3131
return xml;
32-
} catch (JAXBException e) {
33-
throw new NfeException(e.getMessage());
34-
}
35-
}
36-
32+
} catch (JAXBException e) {
33+
throw new NfeException(e.getMessage());
34+
}
35+
}
36+
3737

3838
}

src/main/java/br/com/swconsultoria/nfe/NfeA3.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
public class NfeA3 {
2020

21-
public static String montaXmlA3(ConfiguracoesNfe config, TEnviNFe enviNFe) throws NfeException {
21+
public static String montaXmlA3(ConfiguracoesNfe config, TEnviNFe enviNFe) throws NfeException {
2222
return EnviarA3.montaXmlA3(ConfiguracoesUtil.iniciaConfiguracoes(config), enviNFe);
2323
}
2424

@@ -31,12 +31,12 @@ public static TRetEnviNFe enviarNfeA3(ConfiguracoesNfe config, TEnviNFe enviNFe,
3131
}
3232

3333
public static String montaXmleventoCancelamento(ConfiguracoesNfe config, TEnvEvento enviEvento) throws NfeException {
34-
return CancelarA3.montaXmleventoCancelamento(ConfiguracoesUtil.iniciaConfiguracoes(config), enviEvento);
35-
}
34+
return CancelarA3.montaXmleventoCancelamento(ConfiguracoesUtil.iniciaConfiguracoes(config), enviEvento);
35+
}
3636

37-
public static TRetEnvEvento cancelarNfeA3(ConfiguracoesNfe config, String xlmAssinado, boolean valida, DocumentoEnum tipoDocumento) throws NfeException {
38-
return CancelarA3.eventoCancelamento(ConfiguracoesUtil.iniciaConfiguracoes(config), valida, tipoDocumento, xlmAssinado);
39-
}
37+
public static TRetEnvEvento cancelarNfeA3(ConfiguracoesNfe config, String xlmAssinado, boolean valida, DocumentoEnum tipoDocumento) throws NfeException {
38+
return CancelarA3.eventoCancelamento(ConfiguracoesUtil.iniciaConfiguracoes(config), valida, tipoDocumento, xlmAssinado);
39+
}
4040

4141
public static String montaXmleventoCancelamentoSubstituicao(ConfiguracoesNfe config, br.com.swconsultoria.nfe.schema.envEventoCancSubst.TEnvEvento enviEvento) throws NfeException {
4242
return CancelarA3.montaXmleventoCancelamentoSubstituicao(ConfiguracoesUtil.iniciaConfiguracoes(config), enviEvento);
@@ -46,39 +46,39 @@ public static br.com.swconsultoria.nfe.schema.envEventoCancSubst.TRetEnvEvento
4646
return CancelarA3.eventoCancelamentoSubstituicao(ConfiguracoesUtil.iniciaConfiguracoes(config), valida, tipoDocumento, xlmAssinado);
4747
}
4848

49-
public static TRetInutNFe inutilizacaoA3(ConfiguracoesNfe config, DocumentoEnum tipoDocumento, boolean validar, String xmlAssinado) throws NfeException {
50-
return InutilizarA3.inutiliza(ConfiguracoesUtil.iniciaConfiguracoes(config), tipoDocumento, validar, xmlAssinado);
51-
}
49+
public static TRetInutNFe inutilizacaoA3(ConfiguracoesNfe config, DocumentoEnum tipoDocumento, boolean validar, String xmlAssinado) throws NfeException {
50+
return InutilizarA3.inutiliza(ConfiguracoesUtil.iniciaConfiguracoes(config), tipoDocumento, validar, xmlAssinado);
51+
}
5252

53-
public static String montaXmlInutilizaco(ConfiguracoesNfe config, TInutNFe inutNFe) throws NfeException {
54-
return InutilizarA3.montaXmlInutlizacao(ConfiguracoesUtil.iniciaConfiguracoes(config), inutNFe);
55-
}
56-
57-
public static br.com.swconsultoria.nfe.schema.envcce.TRetEnvEvento cceA3(ConfiguracoesNfe config, boolean valida, String xmlAssinado) throws NfeException {
53+
public static String montaXmlInutilizaco(ConfiguracoesNfe config, TInutNFe inutNFe) throws NfeException {
54+
return InutilizarA3.montaXmlInutlizacao(ConfiguracoesUtil.iniciaConfiguracoes(config), inutNFe);
55+
}
56+
57+
public static br.com.swconsultoria.nfe.schema.envcce.TRetEnvEvento cceA3(ConfiguracoesNfe config, boolean valida, String xmlAssinado) throws NfeException {
5858
return CartaCorrecaoA3.eventoCCe(ConfiguracoesUtil.iniciaConfiguracoes(config), valida, xmlAssinado);
5959

60-
}
60+
}
6161

62-
public static String montaXmlCce(ConfiguracoesNfe config, br.com.swconsultoria.nfe.schema.envcce.TEnvEvento evento) throws NfeException {
62+
public static String montaXmlCce(ConfiguracoesNfe config, br.com.swconsultoria.nfe.schema.envcce.TEnvEvento evento) throws NfeException {
6363
return CartaCorrecaoA3.montaXmlCartaCorrecao(ConfiguracoesUtil.iniciaConfiguracoes(config), evento);
64-
}
64+
}
6565

66-
public static RetDistDFeInt distribuicaoDfeA3(ConfiguracoesNfe config, String xmlAssinado) throws NfeException {
66+
public static RetDistDFeInt distribuicaoDfeA3(ConfiguracoesNfe config, String xmlAssinado) throws NfeException {
6767
return DistribuicaoDFeA3.consultaNfe(ConfiguracoesUtil.iniciaConfiguracoes(config), xmlAssinado);
68-
}
69-
70-
public static String distribuicaoDfeMontaXmlA3(ConfiguracoesNfe config, PessoaEnum tipoPessoa, String cpfCnpj,
71-
ConsultaDFeEnum tipoConsulta, String nsuChave) throws NfeException, JAXBException {
68+
}
69+
70+
public static String distribuicaoDfeMontaXmlA3(ConfiguracoesNfe config, PessoaEnum tipoPessoa, String cpfCnpj,
71+
ConsultaDFeEnum tipoConsulta, String nsuChave) throws NfeException, JAXBException {
7272
return DistribuicaoDFeA3.montarXML(ConfiguracoesUtil.iniciaConfiguracoes(config), tipoPessoa, cpfCnpj, tipoConsulta, nsuChave);
73-
}
74-
75-
public static br.com.swconsultoria.nfe.schema.envConfRecebto.TRetEnvEvento manifestacaoA3(ConfiguracoesNfe config, boolean valida, String xmlAssinado) throws NfeException {
73+
}
74+
75+
public static br.com.swconsultoria.nfe.schema.envConfRecebto.TRetEnvEvento manifestacaoA3(ConfiguracoesNfe config, boolean valida, String xmlAssinado) throws NfeException {
7676
return ManifestacaoDestinatarioA3.eventoManifestacao(ConfiguracoesUtil.iniciaConfiguracoes(config), valida, xmlAssinado);
77-
}
77+
}
7878

79-
public static String manifestacaoMontaXmlA3(ConfiguracoesNfe config,
79+
public static String manifestacaoMontaXmlA3(ConfiguracoesNfe config,
8080
br.com.swconsultoria.nfe.schema.envConfRecebto.TEnvEvento evento) throws NfeException {
8181
return ManifestacaoDestinatarioA3.montarXML(ConfiguracoesUtil.iniciaConfiguracoes(config), evento);
82-
}
83-
82+
}
83+
8484
}

0 commit comments

Comments
 (0)