-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/lunasoft/sw-sdk-java int…
…o feature/SMARTER-1406 # Conflicts: # pom.xml # src/main/java/Utils/Constants.java # src/test/java/Tests/Issue/SWIssueServiceTest.java
- Loading branch information
Showing
45 changed files
with
2,033 additions
and
894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package Services.Issue; | ||
|
||
import Exceptions.AuthException; | ||
import Exceptions.GeneralException; | ||
import Utils.Requests.Issue.IssueOptionsRequest; | ||
import Utils.Requests.Issue.IssueRequest; | ||
import Utils.Responses.IResponse; | ||
|
||
import java.io.IOException; | ||
import java.nio.charset.Charset; | ||
|
||
public class SWIssueServiceV2 extends SWIssueService { | ||
|
||
public SWIssueServiceV2(String user, String password, String URI) throws AuthException { | ||
super(user, password, URI); | ||
} | ||
|
||
public SWIssueServiceV2(String token, String URI) { | ||
super(token, URI); | ||
} | ||
|
||
public SWIssueServiceV2(String user, String password, String URI, String proxyHost, int proxyPort) throws AuthException { | ||
super(user, password, URI, proxyHost, proxyPort); | ||
} | ||
|
||
public SWIssueServiceV2(String token, String URI, String proxyHost, int proxyPort) { | ||
super(token, URI, proxyHost, proxyPort); | ||
} | ||
|
||
public IResponse IssueXml(String xml, String version) throws AuthException, GeneralException, IOException { | ||
IssueOptionsRequest settings = new IssueOptionsRequest(getToken(), getURI(), xml, version, true, getProxyHost(), getProxyPort(), true); | ||
IssueRequest req = new IssueRequest(); | ||
return req.sendRequestXml(settings); | ||
} | ||
public IResponse IssueXml(byte[] xmlfile, String version) throws AuthException, GeneralException, IOException { | ||
String xmlProcess = new String(xmlfile, Charset.forName("UTF-8")); | ||
IssueOptionsRequest settings = new IssueOptionsRequest(getToken(), getURI(), xmlProcess, version, true, getProxyHost(), getProxyPort(), true); | ||
IssueRequest req = new IssueRequest(); | ||
return req.sendRequestXml(settings); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package Services.Stamp; | ||
|
||
import Exceptions.AuthException; | ||
import Exceptions.GeneralException; | ||
import Services.SWService; | ||
import Utils.Requests.Stamp.StampOptionsRequest; | ||
import Utils.Requests.Stamp.StampRequest; | ||
|
||
import Utils.Responses.IResponse; | ||
|
||
import java.io.IOException; | ||
import java.nio.charset.Charset; | ||
|
||
public class SWStampServiceV2 extends SWService { | ||
|
||
public SWStampServiceV2(String user, String password, String URI) throws AuthException { | ||
super(user, password, URI); | ||
} | ||
|
||
public SWStampServiceV2(String token, String URI) { | ||
super(token, URI); | ||
} | ||
|
||
public SWStampServiceV2(String user, String password, String URI, String proxyHost, int proxyPort) throws AuthException { | ||
super(user, password, URI, proxyHost, proxyPort); | ||
} | ||
|
||
public SWStampServiceV2(String token, String URI, String proxyHost, int proxyPort) { | ||
super(token, URI, proxyHost, proxyPort); | ||
} | ||
|
||
public IResponse Stamp(String xml, String version) throws AuthException, GeneralException, IOException { | ||
StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xml, version, getProxyHost(), getProxyPort(), true); | ||
StampRequest req = new StampRequest(); | ||
return req.sendRequest(settings); | ||
} | ||
|
||
public IResponse Stamp(String xml, String version, boolean isb64) | ||
throws AuthException, GeneralException, IOException { | ||
if (isb64) { | ||
StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xml, version, isb64, getProxyHost(), getProxyPort(), true); | ||
StampRequest req = new StampRequest(); | ||
return req.sendRequest(settings); | ||
} else { | ||
StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xml, version, getProxyHost(), getProxyPort(), true); | ||
StampRequest req = new StampRequest(); | ||
return req.sendRequest(settings); | ||
} | ||
} | ||
|
||
public IResponse Stamp(byte[] xmlFile, String version, boolean isb64) | ||
throws AuthException, GeneralException, IOException { | ||
String xmlProcess = new String(xmlFile, Charset.forName("UTF-8")); | ||
StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xmlProcess, version, getProxyHost(), getProxyPort(), true); | ||
StampRequest req = new StampRequest(); | ||
return req.sendRequest(settings); | ||
} | ||
|
||
public IResponse Stamp(byte[] xmlFile, String version) throws AuthException, GeneralException, IOException { | ||
String xmlProcess = new String(xmlFile, Charset.forName("UTF-8")); | ||
StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xmlProcess, version, getProxyHost(), getProxyPort(), true); | ||
StampRequest req = new StampRequest(); | ||
return req.sendRequest(settings); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.